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:
-rw-r--r--CMakeLists.txt40
-rw-r--r--GNUmakefile49
-rw-r--r--SConstruct31
-rw-r--r--build_files/buildbot/config/user-config-i686.py4
-rw-r--r--build_files/buildbot/config/user-config-x86_64.py4
-rw-r--r--build_files/cmake/Modules/FindOpenCOLLADA.cmake27
-rw-r--r--build_files/cmake/Modules/FindPCRE.cmake69
-rw-r--r--build_files/cmake/Modules/FindXML2.cmake68
-rw-r--r--build_files/cmake/cmake_static_check_cppcheck.py76
-rw-r--r--build_files/cmake/cmake_static_check_sparse.py66
-rw-r--r--build_files/cmake/cmake_static_check_splint.py98
-rw-r--r--build_files/cmake/macros.cmake12
-rw-r--r--build_files/cmake/project_source_info.py165
-rw-r--r--build_files/scons/config/darwin-config.py2
-rw-r--r--build_files/scons/config/linuxcross-config.py1
-rw-r--r--build_files/scons/config/win32-mingw-config.py2
-rw-r--r--build_files/scons/config/win64-vc-config.py9
-rw-r--r--build_files/scons/tools/Blender.py12
-rw-r--r--build_files/scons/tools/btools.py18
-rw-r--r--doc/python_api/examples/bge.texture.1.py2
-rw-r--r--doc/python_api/examples/bpy.types.ID.user_clear.1.py2
-rw-r--r--doc/python_api/examples/bpy.types.Operator.py2
-rw-r--r--doc/python_api/rst/bgl.rst90
-rw-r--r--doc/python_api/rst/gpu.rst531
-rw-r--r--doc/python_api/rst/info_best_practice.rst65
-rw-r--r--doc/python_api/rst/info_gotcha.rst63
-rw-r--r--doc/python_api/rst/info_quickstart.rst48
-rw-r--r--doc/python_api/rst/info_tips_and_tricks.rst234
-rw-r--r--doc/python_api/sphinx_doc_gen.py68
-rwxr-xr-xdoc/python_api/sphinx_doc_gen.sh33
-rw-r--r--extern/CMakeLists.txt4
-rw-r--r--extern/SConscript3
-rw-r--r--extern/glew/README.txt18
-rw-r--r--extern/glew/include/GL/glew.h657
-rw-r--r--extern/glew/include/GL/glxew.h19
-rw-r--r--extern/glew/include/GL/wglew.h2
-rw-r--r--extern/glew/src/glew.c494
-rw-r--r--extern/recastnavigation/CMakeLists.txt70
-rw-r--r--extern/recastnavigation/Detour/Include/DetourCommon.h167
-rw-r--r--extern/recastnavigation/Detour/Include/DetourNode.h149
-rw-r--r--extern/recastnavigation/Detour/Include/DetourStatNavMesh.h234
-rw-r--r--extern/recastnavigation/Detour/Include/DetourStatNavMeshBuilder.h33
-rw-r--r--extern/recastnavigation/Detour/Include/DetourTileNavMesh.h315
-rw-r--r--extern/recastnavigation/Detour/Include/DetourTileNavMeshBuilder.h29
-rw-r--r--extern/recastnavigation/Detour/Source/DetourCommon.cpp244
-rw-r--r--extern/recastnavigation/Detour/Source/DetourNode.cpp140
-rw-r--r--extern/recastnavigation/Detour/Source/DetourStatNavMesh.cpp876
-rw-r--r--extern/recastnavigation/Detour/Source/DetourStatNavMeshBuilder.cpp346
-rw-r--r--extern/recastnavigation/Detour/Source/DetourTileNavMesh.cpp1428
-rw-r--r--extern/recastnavigation/Detour/Source/DetourTileNavMeshBuilder.cpp213
-rw-r--r--extern/recastnavigation/License.txt18
-rw-r--r--extern/recastnavigation/Readme.txt120
-rw-r--r--extern/recastnavigation/Recast/Include/Recast.h501
-rw-r--r--extern/recastnavigation/Recast/Include/RecastLog.h80
-rw-r--r--extern/recastnavigation/Recast/Include/RecastTimer.h31
-rw-r--r--extern/recastnavigation/Recast/Source/Recast.cpp272
-rw-r--r--extern/recastnavigation/Recast/Source/RecastContour.cpp732
-rw-r--r--extern/recastnavigation/Recast/Source/RecastFilter.cpp249
-rw-r--r--extern/recastnavigation/Recast/Source/RecastLog.cpp77
-rw-r--r--extern/recastnavigation/Recast/Source/RecastMesh.cpp1218
-rw-r--r--extern/recastnavigation/Recast/Source/RecastMeshDetail.cpp982
-rw-r--r--extern/recastnavigation/Recast/Source/RecastRasterization.cpp308
-rw-r--r--extern/recastnavigation/Recast/Source/RecastRegion.cpp1081
-rw-r--r--extern/recastnavigation/Recast/Source/RecastTimer.cpp58
-rw-r--r--extern/recastnavigation/SConscript12
-rw-r--r--extern/recastnavigation/recast-capi.cpp37
-rw-r--r--extern/recastnavigation/recast-capi.h (renamed from source/blender/blenkernel/BKE_endian.h)34
-rw-r--r--intern/audaspace/intern/AUD_ConverterReader.cpp12
-rw-r--r--intern/audaspace/intern/AUD_JOSResampleReader.cpp11
-rw-r--r--intern/audaspace/intern/AUD_Mixer.cpp13
-rw-r--r--intern/audaspace/intern/AUD_SequencerHandle.cpp4
-rw-r--r--intern/audaspace/intern/AUD_SequencerHandle.h3
-rw-r--r--intern/audaspace/intern/AUD_SequencerReader.cpp4
-rw-r--r--intern/elbeem/CMakeLists.txt17
-rw-r--r--intern/ghost/intern/GHOST_NDOFManager.cpp4
-rw-r--r--intern/guardedalloc/MEM_sys_types.h5
-rw-r--r--intern/guardedalloc/intern/mallocn.c6
-rw-r--r--intern/itasc/kdl/frames.hpp2
-rw-r--r--intern/opennl/CMakeLists.txt7
-rw-r--r--intern/smoke/CMakeLists.txt7
-rw-r--r--intern/smoke/SConscript2
-rw-r--r--intern/smoke/intern/FFT_NOISE.h2
-rw-r--r--intern/smoke/intern/WTURBULENCE.cpp2
-rw-r--r--intern/string/intern/STR_String.cpp2
-rw-r--r--po/POTFILES.in222
-rw-r--r--po/messages.txt5433
-rwxr-xr-xpo/update_mo.py53
-rwxr-xr-xpo/update_po.py52
-rwxr-xr-xpo/update_pot.py95
-rw-r--r--release/bin/.blender/.Blanguages13
-rw-r--r--release/bin/.blender/fonts/droidsans.ttf.gzbin0 -> 1961584 bytes
-rw-r--r--release/datafiles/blenderbuttonsbin199229 -> 200029 bytes
-rw-r--r--release/scripts/modules/bpy/utils.py4
-rw-r--r--release/scripts/modules/bpy_extras/io_utils.py4
-rw-r--r--release/scripts/modules/bpy_types.py28
-rw-r--r--release/scripts/modules/console_python.py2
-rw-r--r--release/scripts/modules/rna_info.py6
-rw-r--r--release/scripts/startup/bl_operators/animsys_update.py1
-rw-r--r--release/scripts/startup/bl_operators/image.py2
-rw-r--r--release/scripts/startup/bl_operators/nla.py9
-rw-r--r--release/scripts/startup/bl_operators/object.py8
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py12
-rw-r--r--release/scripts/startup/bl_operators/sequencer.py4
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_follow_active.py4
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_lightmap.py2
-rw-r--r--release/scripts/startup/bl_operators/uvcalc_smart_project.py4
-rw-r--r--release/scripts/startup/bl_operators/wm.py67
-rw-r--r--release/scripts/startup/bl_ui/properties_animviz.py36
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py70
-rw-r--r--release/scripts/startup/bl_ui/properties_data_bone.py86
-rw-r--r--release/scripts/startup/bl_ui/properties_data_camera.py28
-rw-r--r--release/scripts/startup/bl_ui/properties_data_curve.py111
-rw-r--r--release/scripts/startup/bl_ui/properties_data_empty.py12
-rw-r--r--release/scripts/startup/bl_ui/properties_data_lamp.py110
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py83
-rw-r--r--release/scripts/startup/bl_ui/properties_data_metaball.py32
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py381
-rw-r--r--release/scripts/startup/bl_ui/properties_data_speaker.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py229
-rw-r--r--release/scripts/startup/bl_ui/properties_material.py181
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py98
-rw-r--r--release/scripts/startup/bl_ui/properties_object_constraint.py222
-rw-r--r--release/scripts/startup/bl_ui/properties_particle.py243
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_cloth.py60
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_common.py62
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_field.py62
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_fluid.py98
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_smoke.py44
-rw-r--r--release/scripts/startup/bl_ui/properties_physics_softbody.py58
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py151
-rw-r--r--release/scripts/startup/bl_ui/properties_scene.py44
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py267
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py29
-rw-r--r--release/scripts/startup/bl_ui/space_console.py3
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py59
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py57
-rw-r--r--release/scripts/startup/bl_ui/space_image.py87
-rw-r--r--release/scripts/startup/bl_ui/space_info.py134
-rw-r--r--release/scripts/startup/bl_ui/space_logic.py9
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py41
-rw-r--r--release/scripts/startup/bl_ui/space_node.py17
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py199
-rw-r--r--release/scripts/startup/bl_ui/space_text.py23
-rw-r--r--release/scripts/startup/bl_ui/space_time.py23
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py320
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py23
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py568
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py54
-rw-r--r--release/scripts/templates/operator_export.py2
-rw-r--r--source/blender/avi/intern/avirgb.c17
-rw-r--r--source/blender/avi/intern/endian.c16
-rw-r--r--source/blender/blenfont/BLF_api.h16
-rw-r--r--source/blender/blenfont/BLF_translation.h66
-rw-r--r--source/blender/blenfont/CMakeLists.txt6
-rw-r--r--source/blender/blenfont/SConscript1
-rw-r--r--source/blender/blenfont/intern/blf.c275
-rw-r--r--source/blender/blenfont/intern/blf_dir.c30
-rw-r--r--source/blender/blenfont/intern/blf_font.c355
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c149
-rw-r--r--source/blender/blenfont/intern/blf_internal.h2
-rw-r--r--source/blender/blenfont/intern/blf_internal_types.h14
-rw-r--r--source/blender/blenfont/intern/blf_lang.c135
-rw-r--r--source/blender/blenfont/intern/blf_translation.c86
-rw-r--r--source/blender/blenfont/intern/blf_util.c10
-rw-r--r--source/blender/blenkernel/BKE_armature.h2
-rw-r--r--source/blender/blenkernel/BKE_blender.h4
-rw-r--r--source/blender/blenkernel/BKE_colortools.h8
-rw-r--r--source/blender/blenkernel/BKE_curve.h13
-rw-r--r--source/blender/blenkernel/BKE_global.h13
-rw-r--r--source/blender/blenkernel/BKE_image.h3
-rw-r--r--source/blender/blenkernel/BKE_material.h20
-rw-r--r--source/blender/blenkernel/BKE_mesh.h2
-rw-r--r--source/blender/blenkernel/BKE_navmesh_conversion.h65
-rw-r--r--source/blender/blenkernel/BKE_node.h344
-rw-r--r--source/blender/blenkernel/BKE_object.h2
-rw-r--r--source/blender/blenkernel/BKE_paint.h2
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h2
-rw-r--r--source/blender/blenkernel/BKE_sound.h9
-rw-r--r--source/blender/blenkernel/BKE_utildefines.h26
-rw-r--r--source/blender/blenkernel/CMakeLists.txt12
-rw-r--r--source/blender/blenkernel/SConscript9
-rw-r--r--source/blender/blenkernel/intern/DerivedMesh.c276
-rw-r--r--source/blender/blenkernel/intern/action.c12
-rw-r--r--source/blender/blenkernel/intern/anim.c8
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c4
-rw-r--r--source/blender/blenkernel/intern/armature.c31
-rw-r--r--source/blender/blenkernel/intern/blender.c21
-rw-r--r--source/blender/blenkernel/intern/boids.c8
-rw-r--r--source/blender/blenkernel/intern/brush.c8
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c61
-rw-r--r--source/blender/blenkernel/intern/collision.c30
-rw-r--r--source/blender/blenkernel/intern/colortools.c14
-rw-r--r--source/blender/blenkernel/intern/constraint.c4
-rw-r--r--source/blender/blenkernel/intern/curve.c50
-rw-r--r--source/blender/blenkernel/intern/customdata.c14
-rw-r--r--source/blender/blenkernel/intern/displist.c4
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c2
-rw-r--r--source/blender/blenkernel/intern/effect.c26
-rw-r--r--source/blender/blenkernel/intern/image.c19
-rw-r--r--source/blender/blenkernel/intern/ipo.c2
-rw-r--r--source/blender/blenkernel/intern/material.c519
-rw-r--r--source/blender/blenkernel/intern/mesh.c6
-rw-r--r--source/blender/blenkernel/intern/mesh_validate.c2
-rw-r--r--source/blender/blenkernel/intern/navmesh_conversion.c517
-rw-r--r--source/blender/blenkernel/intern/node.c3319
-rw-r--r--source/blender/blenkernel/intern/object.c77
-rw-r--r--source/blender/blenkernel/intern/paint.c4
-rw-r--r--source/blender/blenkernel/intern/particle.c6
-rw-r--r--source/blender/blenkernel/intern/sca.c16
-rw-r--r--source/blender/blenkernel/intern/scene.c17
-rw-r--r--source/blender/blenkernel/intern/screen.c3
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c2
-rw-r--r--source/blender/blenkernel/intern/sequencer.c5
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c16
-rw-r--r--source/blender/blenkernel/intern/sketch.c10
-rw-r--r--source/blender/blenkernel/intern/sound.c68
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c28
-rw-r--r--source/blender/blenkernel/intern/texture.c4
-rw-r--r--source/blender/blenkernel/intern/unit.c2
-rw-r--r--source/blender/blenlib/BLI_fileops.h1
-rw-r--r--source/blender/blenlib/BLI_math_inline.h5
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h5
-rw-r--r--source/blender/blenlib/BLI_math_rotation.h2
-rw-r--r--source/blender/blenlib/BLI_math_vector.h7
-rw-r--r--source/blender/blenlib/BLI_string.h9
-rw-r--r--source/blender/blenlib/BLI_utildefines.h12
-rw-r--r--source/blender/blenlib/BLI_voxel.h8
-rw-r--r--source/blender/blenlib/CMakeLists.txt1
-rw-r--r--source/blender/blenlib/intern/BLI_kdopbvh.c21
-rw-r--r--source/blender/blenlib/intern/fileops.c45
-rw-r--r--source/blender/blenlib/intern/graph.c4
-rw-r--r--source/blender/blenlib/intern/math_matrix.c32
-rw-r--r--source/blender/blenlib/intern/math_rotation.c46
-rw-r--r--source/blender/blenlib/intern/math_vector.c8
-rw-r--r--source/blender/blenlib/intern/math_vector_inline.c22
-rw-r--r--source/blender/blenlib/intern/noise.c16
-rw-r--r--source/blender/blenlib/intern/string.c120
-rw-r--r--source/blender/blenlib/intern/string_utf8.c185
-rw-r--r--source/blender/blenlib/intern/voxel.c10
-rw-r--r--source/blender/blenloader/BLO_sys_types.h9
-rw-r--r--source/blender/blenloader/CMakeLists.txt1
-rw-r--r--source/blender/blenloader/SConscript2
-rw-r--r--source/blender/blenloader/intern/readfile.c401
-rw-r--r--source/blender/blenloader/intern/writefile.c68
-rw-r--r--source/blender/collada/AnimationExporter.cpp20
-rw-r--r--source/blender/collada/AnimationImporter.cpp19
-rw-r--r--source/blender/collada/AnimationImporter.h4
-rw-r--r--source/blender/collada/ArmatureExporter.cpp6
-rw-r--r--source/blender/collada/ArmatureExporter.h33
-rw-r--r--source/blender/collada/ArmatureImporter.cpp7
-rw-r--r--source/blender/collada/CMakeLists.txt6
-rw-r--r--source/blender/collada/CameraExporter.cpp8
-rw-r--r--source/blender/collada/CameraExporter.h8
-rw-r--r--source/blender/collada/DocumentExporter.cpp199
-rw-r--r--source/blender/collada/DocumentExporter.h7
-rw-r--r--source/blender/collada/DocumentImporter.cpp19
-rw-r--r--source/blender/collada/EffectExporter.cpp15
-rw-r--r--source/blender/collada/EffectExporter.h10
-rw-r--r--source/blender/collada/ErrorHandler.cpp89
-rw-r--r--source/blender/collada/ErrorHandler.h58
-rw-r--r--source/blender/collada/ExportSettings.cpp29
-rw-r--r--source/blender/collada/ExportSettings.h39
-rw-r--r--source/blender/collada/GeometryExporter.cpp8
-rw-r--r--source/blender/collada/GeometryExporter.h10
-rw-r--r--source/blender/collada/ImageExporter.cpp8
-rw-r--r--source/blender/collada/ImageExporter.h10
-rw-r--r--source/blender/collada/LightExporter.cpp6
-rw-r--r--source/blender/collada/LightExporter.h7
-rw-r--r--source/blender/collada/MaterialExporter.cpp6
-rw-r--r--source/blender/collada/MaterialExporter.h6
-rw-r--r--source/blender/collada/MeshImporter.cpp2
-rw-r--r--source/blender/collada/MeshImporter.h2
-rw-r--r--source/blender/collada/SceneExporter.cpp161
-rw-r--r--source/blender/collada/SceneExporter.h109
-rw-r--r--source/blender/collada/TransformReader.cpp5
-rw-r--r--source/blender/collada/TransformWriter.cpp6
-rw-r--r--source/blender/collada/collada.cpp13
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c20
-rw-r--r--source/blender/editors/animation/anim_draw.c4
-rw-r--r--source/blender/editors/animation/anim_filter.c2
-rw-r--r--source/blender/editors/animation/anim_ops.c4
-rw-r--r--source/blender/editors/animation/drivers.c6
-rw-r--r--source/blender/editors/animation/fmodifier_ui.c2
-rw-r--r--source/blender/editors/animation/keyframes_edit.c6
-rw-r--r--source/blender/editors/animation/keyframes_general.c2
-rw-r--r--source/blender/editors/animation/keyframing.c26
-rw-r--r--source/blender/editors/animation/keyingsets.c2
-rw-r--r--source/blender/editors/armature/CMakeLists.txt1
-rw-r--r--source/blender/editors/armature/SConscript2
-rw-r--r--source/blender/editors/armature/editarmature.c50
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c16
-rw-r--r--source/blender/editors/armature/meshlaplacian.c51
-rw-r--r--source/blender/editors/armature/poseSlide.c11
-rw-r--r--source/blender/editors/armature/poselib.c17
-rw-r--r--source/blender/editors/armature/poseobject.c81
-rw-r--r--source/blender/editors/curve/curve_ops.c1
-rw-r--r--source/blender/editors/curve/editcurve.c145
-rw-r--r--source/blender/editors/curve/editfont.c30
-rw-r--r--source/blender/editors/datafiles/blenderbuttons.c8895
-rw-r--r--source/blender/editors/gpencil/CMakeLists.txt1
-rw-r--r--source/blender/editors/gpencil/drawgpencil.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_intern.h7
-rw-r--r--source/blender/editors/gpencil/gpencil_ops.c3
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c265
-rw-r--r--source/blender/editors/gpencil/gpencil_undo.c168
-rw-r--r--source/blender/editors/include/ED_armature.h1
-rw-r--r--source/blender/editors/include/ED_curve.h2
-rw-r--r--source/blender/editors/include/ED_gpencil.h4
-rw-r--r--source/blender/editors/include/ED_mesh.h2
-rw-r--r--source/blender/editors/include/ED_node.h5
-rw-r--r--source/blender/editors/include/ED_object.h4
-rw-r--r--source/blender/editors/include/ED_sculpt.h1
-rw-r--r--source/blender/editors/include/ED_sequencer.h4
-rw-r--r--source/blender/editors/include/ED_view3d.h1
-rw-r--r--source/blender/editors/include/UI_icons.h2
-rw-r--r--source/blender/editors/include/UI_interface.h27
-rw-r--r--source/blender/editors/include/UI_resources.h3
-rw-r--r--source/blender/editors/interface/interface.c62
-rw-r--r--source/blender/editors/interface/interface_draw.c80
-rw-r--r--source/blender/editors/interface/interface_handlers.c6
-rw-r--r--source/blender/editors/interface/interface_intern.h4
-rw-r--r--source/blender/editors/interface/interface_layout.c76
-rw-r--r--source/blender/editors/interface/interface_ops.c4
-rw-r--r--source/blender/editors/interface/interface_panel.c18
-rw-r--r--source/blender/editors/interface/interface_regions.c35
-rw-r--r--source/blender/editors/interface/interface_style.c35
-rw-r--r--source/blender/editors/interface/interface_templates.c236
-rw-r--r--source/blender/editors/interface/interface_utils.c4
-rw-r--r--source/blender/editors/interface/interface_widgets.c380
-rw-r--r--source/blender/editors/interface/resources.c17
-rw-r--r--source/blender/editors/interface/view2d.c10
-rw-r--r--source/blender/editors/interface/view2d_ops.c7
-rw-r--r--source/blender/editors/mesh/editmesh.c106
-rw-r--r--source/blender/editors/mesh/editmesh_add.c18
-rw-r--r--source/blender/editors/mesh/editmesh_lib.c22
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c46
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c58
-rw-r--r--source/blender/editors/mesh/mesh_data.c15
-rw-r--r--source/blender/editors/mesh/meshtools.c8
-rw-r--r--source/blender/editors/metaball/mball_edit.c4
-rw-r--r--source/blender/editors/object/CMakeLists.txt14
-rw-r--r--source/blender/editors/object/SConscript6
-rw-r--r--source/blender/editors/object/object_add.c2
-rw-r--r--source/blender/editors/object/object_constraint.c30
-rw-r--r--source/blender/editors/object/object_edit.c6
-rw-r--r--source/blender/editors/object/object_hook.c29
-rw-r--r--source/blender/editors/object/object_intern.h7
-rw-r--r--source/blender/editors/object/object_modifier.c18
-rw-r--r--source/blender/editors/object/object_navmesh.cpp628
-rw-r--r--source/blender/editors/object/object_ops.c11
-rw-r--r--source/blender/editors/object/object_relations.c14
-rw-r--r--source/blender/editors/object/object_select.c52
-rw-r--r--source/blender/editors/object/object_shapekey.c2
-rw-r--r--source/blender/editors/object/object_transform.c10
-rw-r--r--source/blender/editors/object/object_vgroup.c594
-rw-r--r--source/blender/editors/physics/particle_edit.c8
-rw-r--r--source/blender/editors/physics/physics_fluid.c12
-rw-r--r--source/blender/editors/render/render_internal.c4
-rw-r--r--source/blender/editors/render/render_opengl.c6
-rw-r--r--source/blender/editors/render/render_shading.c31
-rw-r--r--source/blender/editors/screen/area.c21
-rw-r--r--source/blender/editors/screen/screen_context.c6
-rw-r--r--source/blender/editors/screen/screen_ops.c30
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c38
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h5
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c15
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c23
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c76
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c867
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c51
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c4
-rw-r--r--source/blender/editors/sound/sound_intern.h2
-rw-r--r--source/blender/editors/sound/sound_ops.c32
-rw-r--r--source/blender/editors/space_action/action_edit.c2
-rw-r--r--source/blender/editors/space_action/action_select.c6
-rw-r--r--source/blender/editors/space_buttons/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_buttons/SConscript2
-rw-r--r--source/blender/editors/space_buttons/buttons_header.c30
-rw-r--r--source/blender/editors/space_console/console_ops.c46
-rw-r--r--source/blender/editors/space_console/space_console.c9
-rw-r--r--source/blender/editors/space_file/file_draw.c19
-rw-r--r--source/blender/editors/space_file/file_ops.c41
-rw-r--r--source/blender/editors/space_file/file_panels.c4
-rw-r--r--source/blender/editors/space_file/filelist.c4
-rw-r--r--source/blender/editors/space_file/filesel.c10
-rw-r--r--source/blender/editors/space_graph/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_graph/SConscript2
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c7
-rw-r--r--source/blender/editors/space_graph/graph_edit.c12
-rw-r--r--source/blender/editors/space_graph/graph_ops.c4
-rw-r--r--source/blender/editors/space_graph/graph_select.c2
-rw-r--r--source/blender/editors/space_image/image_buttons.c6
-rw-r--r--source/blender/editors/space_image/image_ops.c54
-rw-r--r--source/blender/editors/space_image/space_image.c2
-rw-r--r--source/blender/editors/space_info/info_ops.c8
-rw-r--r--source/blender/editors/space_info/info_report.c2
-rw-r--r--source/blender/editors/space_info/info_stats.c4
-rw-r--r--source/blender/editors/space_info/space_info.c4
-rw-r--r--source/blender/editors/space_logic/CMakeLists.txt3
-rw-r--r--source/blender/editors/space_logic/logic_ops.c43
-rw-r--r--source/blender/editors/space_logic/logic_window.c142
-rw-r--r--source/blender/editors/space_nla/CMakeLists.txt1
-rw-r--r--source/blender/editors/space_nla/SConscript2
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c5
-rw-r--r--source/blender/editors/space_nla/nla_channels.c2
-rw-r--r--source/blender/editors/space_nla/nla_draw.c4
-rw-r--r--source/blender/editors/space_nla/nla_edit.c22
-rw-r--r--source/blender/editors/space_nla/nla_select.c12
-rw-r--r--source/blender/editors/space_node/drawnode.c757
-rw-r--r--source/blender/editors/space_node/node_buttons.c4
-rw-r--r--source/blender/editors/space_node/node_draw.c691
-rw-r--r--source/blender/editors/space_node/node_edit.c708
-rw-r--r--source/blender/editors/space_node/node_header.c199
-rw-r--r--source/blender/editors/space_node/node_intern.h15
-rw-r--r--source/blender/editors/space_node/node_ops.c3
-rw-r--r--source/blender/editors/space_node/node_select.c36
-rw-r--r--source/blender/editors/space_node/node_state.c37
-rw-r--r--source/blender/editors/space_node/space_node.c22
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c54
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c22
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h21
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c14
-rw-r--r--source/blender/editors/space_outliner/outliner_tree.c54
-rw-r--r--source/blender/editors/space_sequencer/sequencer_add.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c26
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c28
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c10
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c138
-rw-r--r--source/blender/editors/space_text/text_draw.c6
-rw-r--r--source/blender/editors/space_text/text_ops.c28
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c154
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c133
-rw-r--r--source/blender/editors/space_view3d/drawobject.c355
-rw-r--r--source/blender/editors/space_view3d/drawvolume.c51
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c16
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c337
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c60
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c64
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c206
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_toolbar.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c12
-rw-r--r--source/blender/editors/transform/CMakeLists.txt1
-rw-r--r--source/blender/editors/transform/SConscript2
-rw-r--r--source/blender/editors/transform/transform.c89
-rw-r--r--source/blender/editors/transform/transform_constraints.c40
-rw-r--r--source/blender/editors/transform/transform_conversions.c190
-rw-r--r--source/blender/editors/transform/transform_generics.c58
-rw-r--r--source/blender/editors/transform/transform_manipulator.c16
-rw-r--r--source/blender/editors/transform/transform_ops.c10
-rw-r--r--source/blender/editors/transform/transform_orientations.c35
-rw-r--r--source/blender/editors/transform/transform_snap.c88
-rw-r--r--source/blender/editors/util/SConscript2
-rw-r--r--source/blender/editors/util/undo.c6
-rw-r--r--source/blender/editors/uvedit/uvedit_draw.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c40
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.c8
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c52
-rw-r--r--source/blender/gpu/GPU_draw.h6
-rw-r--r--source/blender/gpu/GPU_extensions.h2
-rw-r--r--source/blender/gpu/GPU_material.h79
-rw-r--r--source/blender/gpu/SConscript2
-rw-r--r--source/blender/gpu/intern/gpu_buffers.c6
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c143
-rw-r--r--source/blender/gpu/intern/gpu_codegen.h103
-rw-r--r--source/blender/gpu/intern/gpu_draw.c80
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c10
-rw-r--r--source/blender/gpu/intern/gpu_material.c212
-rw-r--r--source/blender/gpu/intern/gpu_shader_material.glsl24
-rw-r--r--source/blender/gpu/intern/gpu_shader_material.glsl.c1818
-rw-r--r--source/blender/imbuf/CMakeLists.txt14
-rw-r--r--source/blender/imbuf/SConscript7
-rw-r--r--source/blender/imbuf/intern/IMB_anim.h65
-rw-r--r--source/blender/imbuf/intern/IMB_indexer.h2
-rw-r--r--source/blender/imbuf/intern/cineon/cineonlib.c5
-rw-r--r--source/blender/imbuf/intern/cineon/logImageCore.h4
-rw-r--r--source/blender/imbuf/intern/filter.c2
-rw-r--r--source/blender/imbuf/intern/imbuf.h27
-rw-r--r--source/blender/imbuf/intern/indexer.c18
-rw-r--r--source/blender/imbuf/intern/iris.c13
-rw-r--r--source/blender/imbuf/intern/jp2.c9
-rw-r--r--source/blender/imbuf/intern/md5.c6
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c7
-rw-r--r--source/blender/imbuf/intern/tiff.c4
-rw-r--r--source/blender/makesdna/DNA_ID.h18
-rw-r--r--source/blender/makesdna/DNA_action_types.h15
-rw-r--r--source/blender/makesdna/DNA_actuator_types.h25
-rw-r--r--source/blender/makesdna/DNA_customdata_types.h4
-rw-r--r--source/blender/makesdna/DNA_material_types.h40
-rw-r--r--source/blender/makesdna/DNA_mesh_types.h2
-rw-r--r--source/blender/makesdna/DNA_meshdata_types.h6
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h181
-rw-r--r--source/blender/makesdna/DNA_node_types.h176
-rw-r--r--source/blender/makesdna/DNA_object_types.h10
-rw-r--r--source/blender/makesdna/DNA_outliner_types.h2
-rw-r--r--source/blender/makesdna/DNA_scene_types.h56
-rw-r--r--source/blender/makesdna/DNA_sequence_types.h2
-rw-r--r--source/blender/makesdna/DNA_space_types.h1
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h10
-rw-r--r--source/blender/makesrna/RNA_access.h31
-rw-r--r--source/blender/makesrna/RNA_enum_types.h2
-rw-r--r--source/blender/makesrna/RNA_types.h5
-rw-r--r--source/blender/makesrna/SConscript4
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt6
-rw-r--r--source/blender/makesrna/intern/SConscript5
-rw-r--r--source/blender/makesrna/intern/makesrna.c14
-rw-r--r--source/blender/makesrna/intern/rna_ID.c33
-rw-r--r--source/blender/makesrna/intern/rna_access.c103
-rw-r--r--source/blender/makesrna/intern/rna_action.c30
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c224
-rw-r--r--source/blender/makesrna/intern/rna_actuator_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_animation.c40
-rw-r--r--source/blender/makesrna/intern/rna_armature.c12
-rw-r--r--source/blender/makesrna/intern/rna_armature_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_color.c4
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c2
-rw-r--r--source/blender/makesrna/intern/rna_controller_api.c12
-rw-r--r--source/blender/makesrna/intern/rna_curve.c56
-rw-r--r--source/blender/makesrna/intern/rna_dynamicpaint.c2
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c44
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c10
-rw-r--r--source/blender/makesrna/intern/rna_group.c8
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c53
-rw-r--r--source/blender/makesrna/intern/rna_internal.h1
-rw-r--r--source/blender/makesrna/intern/rna_key.c2
-rw-r--r--source/blender/makesrna/intern/rna_main.c56
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c259
-rw-r--r--source/blender/makesrna/intern/rna_material.c218
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c62
-rw-r--r--source/blender/makesrna/intern/rna_mesh_api.c11
-rw-r--r--source/blender/makesrna/intern/rna_meta.c10
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c382
-rw-r--r--source/blender/makesrna/intern/rna_nla.c18
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c489
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h10
-rw-r--r--source/blender/makesrna/intern/rna_object.c122
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c70
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c5
-rw-r--r--source/blender/makesrna/intern/rna_particle.c16
-rw-r--r--source/blender/makesrna/intern/rna_pose.c19
-rw-r--r--source/blender/makesrna/intern/rna_pose_api.c5
-rw-r--r--source/blender/makesrna/intern/rna_property.c2
-rw-r--r--source/blender/makesrna/intern/rna_render.c27
-rw-r--r--source/blender/makesrna/intern/rna_rna.c36
-rw-r--r--source/blender/makesrna/intern/rna_scene.c204
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c20
-rw-r--r--source/blender/makesrna/intern/rna_screen.c10
-rw-r--r--source/blender/makesrna/intern/rna_sensor_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c4
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c5
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c12
-rw-r--r--source/blender/makesrna/intern/rna_sound.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c54
-rw-r--r--source/blender/makesrna/intern/rna_speaker.c30
-rw-r--r--source/blender/makesrna/intern/rna_text.c4
-rw-r--r--source/blender/makesrna/intern/rna_text_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_texture.c35
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c57
-rw-r--r--source/blender/makesrna/intern/rna_ui.c85
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c203
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c110
-rw-r--r--source/blender/makesrna/intern/rna_wm.c35
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c64
-rw-r--r--source/blender/makesrna/intern/rna_world.c2
-rw-r--r--source/blender/modifiers/CMakeLists.txt17
-rw-r--r--source/blender/modifiers/MOD_modifiertypes.h4
-rw-r--r--source/blender/modifiers/SConscript9
-rw-r--r--source/blender/modifiers/intern/MOD_navmesh.c307
-rw-r--r--source/blender/modifiers/intern/MOD_util.c4
-rw-r--r--source/blender/modifiers/intern/MOD_uvproject.c1
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c4
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c326
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.h90
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c330
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgmix.c464
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c573
-rw-r--r--source/blender/nodes/CMakeLists.txt230
-rw-r--r--source/blender/nodes/NOD_composite.h (renamed from source/blender/nodes/CMP_node.h)12
-rw-r--r--source/blender/nodes/NOD_shader.h (renamed from source/blender/nodes/SHD_node.h)12
-rw-r--r--source/blender/nodes/NOD_socket.h90
-rw-r--r--source/blender/nodes/NOD_texture.h (renamed from source/blender/nodes/TEX_node.h)12
-rw-r--r--source/blender/nodes/SConscript8
-rw-r--r--source/blender/nodes/composite/node_composite_tree.c837
-rw-r--r--source/blender/nodes/composite/node_composite_util.c (renamed from source/blender/nodes/intern/CMP_util.c)10
-rw-r--r--source/blender/nodes/composite/node_composite_util.h (renamed from source/blender/nodes/intern/CMP_util.h)11
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_alphaOver.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c)22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bilateralblur.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c)22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_blur.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_blur.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_brightness.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_brightness.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_channelMatte.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_chromaMatte.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c)22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorMatte.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c)22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorSpill.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c)24
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorbalance.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c)22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_common.c373
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_composite.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_composite.c)16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_crop.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_crop.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_curves.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_curves.c)48
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_defocus.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_defocus.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_diffMatte.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c)32
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_dilate.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_dilate.c)16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_directionalblur.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_directionalblur.c)19
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_displace.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_displace.c)22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_distanceMatte.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c)22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_filter.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_filter.c)18
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_flip.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_flip.c)16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_gamma.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_gamma.c)18
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_glare.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_glare.c)19
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_hueSatVal.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_huecorrect.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_idMask.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_idMask.c)16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_image.c)30
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_invert.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_invert.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_lensdist.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_lensdist.c)23
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_levels.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_levels.c)35
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_lummaMatte.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mapUV.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c)18
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mapValue.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c)18
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_math.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_math.c)19
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mixrgb.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_normal.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_normal.c)34
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_normalize.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_normalize.c)16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_outputFile.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c)16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_premulkey.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_premulkey.c)16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_rgb.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_rgb.c)27
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_rotate.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_rotate.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_scale.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_scale.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c)40
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c)40
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c)40
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c)40
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_setalpha.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_setalpha.c)18
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_splitViewer.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c)16
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_texture.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_texture.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_tonemap.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c)19
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_translate.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_translate.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_valToRgb.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c)30
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_value.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_value.c)27
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_vecBlur.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c)22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_viewer.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_viewer.c)20
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_zcombine.c (renamed from source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c)24
-rw-r--r--source/blender/nodes/intern/SHD_util.c221
-rw-r--r--source/blender/nodes/intern/node_common.c983
-rw-r--r--source/blender/nodes/intern/node_common.h66
-rw-r--r--source/blender/nodes/intern/node_exec.c309
-rw-r--r--source/blender/nodes/intern/node_exec.h90
-rw-r--r--source/blender/nodes/intern/node_socket.c433
-rw-r--r--source/blender/nodes/intern/node_util.c18
-rw-r--r--source/blender/nodes/intern/node_util.h13
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c225
-rw-r--r--source/blender/nodes/shader/node_shader_util.c289
-rw-r--r--source/blender/nodes/shader/node_shader_util.h (renamed from source/blender/nodes/intern/SHD_util.h)13
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_camera.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_camera.c)16
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_common.c327
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_curves.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_curves.c)36
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_dynamic.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c)8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_geom.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_geom.c)45
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_hueSatVal.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c)26
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_invert.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_invert.c)18
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mapping.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_mapping.c)18
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_material.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_material.c)90
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_math.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_math.c)18
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mixRgb.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c)22
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_normal.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_normal.c)34
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_output.c)16
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_rgb.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_rgb.c)30
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c)38
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_squeeze.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c)26
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_texture.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_texture.c)20
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_valToRgb.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c)32
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_value.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_value.c)30
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vectMath.c (renamed from source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c)20
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c251
-rw-r--r--source/blender/nodes/texture/node_texture_util.c (renamed from source/blender/nodes/intern/TEX_util.c)53
-rw-r--r--source/blender/nodes/texture/node_texture_util.h (renamed from source/blender/nodes/intern/TEX_util.h)10
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_at.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_at.c)21
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_bricks.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_bricks.c)34
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_checker.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_checker.c)23
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_common.c271
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_compose.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_compose.c)25
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_coord.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_coord.c)15
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_curves.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_curves.c)31
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_decompose.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_decompose.c)25
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_distance.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_distance.c)21
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_hueSatVal.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c)27
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_image.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_image.c)16
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_invert.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_invert.c)19
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_math.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_math.c)21
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_mixRgb.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c)23
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_output.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_output.c)19
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_proc.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_proc.c)88
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_rotate.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_rotate.c)23
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_scale.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_scale.c)19
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_texture.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_texture.c)25
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_translate.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_translate.c)21
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToNor.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c)21
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToRgb.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c)30
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_viewer.c (renamed from source/blender/nodes/intern/TEX_nodes/TEX_viewer.c)17
-rw-r--r--source/blender/python/SConscript5
-rw-r--r--source/blender/python/generic/CMakeLists.txt3
-rw-r--r--source/blender/python/generic/bgl.c12
-rw-r--r--source/blender/python/generic/blf_py_api.c34
-rw-r--r--source/blender/python/generic/bpy_internal_import.c4
-rw-r--r--source/blender/python/generic/py_capi_utils.c114
-rw-r--r--source/blender/python/generic/py_capi_utils.h1
-rw-r--r--source/blender/python/intern/CMakeLists.txt4
-rw-r--r--source/blender/python/intern/bpy.h4
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c4
-rw-r--r--source/blender/python/intern/bpy_interface.c8
-rw-r--r--source/blender/python/intern/bpy_interface_atexit.c94
-rw-r--r--source/blender/python/intern/bpy_rna.c59
-rw-r--r--source/blender/python/intern/gpu.c291
-rw-r--r--source/blender/python/intern/gpu.h41
-rw-r--r--source/blender/python/mathutils/mathutils_Euler.c16
-rw-r--r--source/blender/python/mathutils/mathutils_Matrix.c115
-rw-r--r--source/blender/python/mathutils/mathutils_Quaternion.c12
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c87
-rw-r--r--source/blender/python/mathutils/mathutils_geometry.c12
-rw-r--r--source/blender/render/extern/include/RE_render_ext.h4
-rw-r--r--source/blender/render/intern/include/pixelshading.h6
-rw-r--r--source/blender/render/intern/include/render_types.h6
-rw-r--r--source/blender/render/intern/include/rendercore.h4
-rw-r--r--source/blender/render/intern/include/renderdatabase.h2
-rw-r--r--source/blender/render/intern/include/shadbuf.h4
-rw-r--r--source/blender/render/intern/include/shading.h4
-rw-r--r--source/blender/render/intern/include/texture.h12
-rw-r--r--source/blender/render/intern/include/volumetric.h4
-rw-r--r--source/blender/render/intern/include/voxeldata.h2
-rw-r--r--source/blender/render/intern/include/zbuf.h6
-rw-r--r--source/blender/render/intern/raytrace/rayobject_octree.cpp2
-rw-r--r--source/blender/render/intern/source/convertblender.c219
-rw-r--r--source/blender/render/intern/source/envmap.c4
-rw-r--r--source/blender/render/intern/source/imagetexture.c10
-rw-r--r--source/blender/render/intern/source/occlusion.c20
-rw-r--r--source/blender/render/intern/source/pipeline.c2
-rw-r--r--source/blender/render/intern/source/pixelshading.c49
-rw-r--r--source/blender/render/intern/source/pointdensity.c6
-rw-r--r--source/blender/render/intern/source/render_texture.c136
-rw-r--r--source/blender/render/intern/source/rendercore.c24
-rw-r--r--source/blender/render/intern/source/renderdatabase.c29
-rw-r--r--source/blender/render/intern/source/shadbuf.c59
-rw-r--r--source/blender/render/intern/source/shadeinput.c99
-rw-r--r--source/blender/render/intern/source/shadeoutput.c54
-rw-r--r--source/blender/render/intern/source/sss.c8
-rw-r--r--source/blender/render/intern/source/volume_precache.c8
-rw-r--r--source/blender/render/intern/source/volumetric.c78
-rw-r--r--source/blender/render/intern/source/voxeldata.c2
-rw-r--r--source/blender/render/intern/source/zbuf.c19
-rw-r--r--source/blender/windowmanager/SConscript3
-rw-r--r--source/blender/windowmanager/WM_api.h1
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c2
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c14
-rw-r--r--source/blender/windowmanager/intern/wm_files.c11
-rw-r--r--source/blender/windowmanager/intern/wm_gesture.c4
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c39
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c12
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c134
-rw-r--r--source/blender/windowmanager/intern/wm_window.c10
-rw-r--r--source/blenderplayer/CMakeLists.txt1
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c6
-rw-r--r--source/creator/CMakeLists.txt42
-rw-r--r--source/creator/creator.c21
-rw-r--r--source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp20
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.cpp1
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp235
-rw-r--r--source/gameengine/Converter/BL_SkinDeformer.cpp6
-rw-r--r--source/gameengine/Converter/CMakeLists.txt1
-rw-r--r--source/gameengine/Converter/KX_BlenderSceneConverter.cpp6
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp62
-rw-r--r--source/gameengine/Converter/SConscript1
-rw-r--r--source/gameengine/Expressions/IfExpr.h2
-rw-r--r--source/gameengine/Expressions/ListValue.cpp4
-rw-r--r--source/gameengine/Expressions/Value.cpp4
-rw-r--r--source/gameengine/GameLogic/SCA_IActuator.h1
-rw-r--r--source/gameengine/GamePlayer/ghost/CMakeLists.txt4
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.cpp20
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_Application.h7
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp25
-rw-r--r--source/gameengine/GamePlayer/ghost/SConscript3
-rw-r--r--source/gameengine/Ketsji/BL_BlenderShader.cpp8
-rw-r--r--source/gameengine/Ketsji/BL_BlenderShader.h4
-rw-r--r--source/gameengine/Ketsji/BL_Material.cpp3
-rw-r--r--source/gameengine/Ketsji/BL_Material.h9
-rw-r--r--source/gameengine/Ketsji/CMakeLists.txt8
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.cpp87
-rw-r--r--source/gameengine/Ketsji/KX_BlenderMaterial.h3
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp2
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp22
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.h14
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.cpp18
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.h13
-rw-r--r--source/gameengine/Ketsji/KX_NavMeshObject.cpp722
-rw-r--r--source/gameengine/Ketsji/KX_NavMeshObject.h83
-rw-r--r--source/gameengine/Ketsji/KX_ObstacleSimulation.cpp869
-rw-r--r--source/gameengine/Ketsji/KX_ObstacleSimulation.h145
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.cpp26
-rw-r--r--source/gameengine/Ketsji/KX_PolygonMaterial.h4
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp53
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.h3
-rw-r--r--source/gameengine/Ketsji/KX_PythonInitTypes.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp42
-rw-r--r--source/gameengine/Ketsji/KX_Scene.h8
-rw-r--r--source/gameengine/Ketsji/KX_SoundActuator.cpp10
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.cpp630
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.h130
-rw-r--r--source/gameengine/Ketsji/SConscript1
-rw-r--r--source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp49
-rw-r--r--source/gameengine/Rasterizer/RAS_IPolygonMaterial.h25
-rw-r--r--source/gameengine/Rasterizer/RAS_IRasterizer.h18
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp100
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h43
-rw-r--r--source/gameengine/VideoTexture/CMakeLists.txt1
-rw-r--r--source/gameengine/VideoTexture/blendVideoTex.cpp4
817 files changed, 54742 insertions, 19117 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38ce8689855..2c0e069cf5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -105,6 +105,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib CACHE INTERNAL "" FORCE )
get_blender_version()
+
# Blender internal features
option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
mark_as_advanced(WITH_BLENDER)
@@ -452,15 +453,8 @@ if(UNIX AND NOT APPLE)
if(WITH_OPENCOLLADA)
find_package(OpenCOLLADA)
if(OPENCOLLADA_FOUND)
- set(PCRE /usr CACHE PATH "PCRE Directory")
- mark_as_advanced(PCRE)
- set(PCRE_LIBPATH ${PCRE}/lib)
- set(PCRE_LIB pcre)
-
- set(EXPAT /usr CACHE PATH "Expat Directory")
- mark_as_advanced(EXPAT)
- set(EXPAT_LIBPATH ${EXPAT}/lib)
- set(EXPAT_LIB expat)
+ find_package(XML2)
+ find_package(PCRE)
else()
set(WITH_OPENCOLLADA OFF)
endif()
@@ -649,11 +643,7 @@ elseif(WIN32)
set(GETTEXT ${LIBDIR}/gettext)
set(GETTEXT_INC ${GETTEXT}/include)
set(GETTEXT_LIBPATH ${GETTEXT}/lib)
- if(CMAKE_CL_64)
- set(GETTEXT_LIB gettext)
- else()
- set(GETTEXT_LIB gnu_gettext)
- endif()
+ set(GETTEXT_LIB gnu_gettext)
endif()
if(CMAKE_CL_64)
@@ -709,7 +699,7 @@ elseif(WIN32)
${LIBDIR}/opencollada/lib/ftoa.lib
${LIBDIR}/opencollada/lib/UTF.lib
)
- set(PCRE_LIB
+ set(PCRE_LIBRARIES
${LIBDIR}/opencollada/lib/pcre.lib
)
endif()
@@ -797,7 +787,7 @@ elseif(WIN32)
else()
# keep GCC spesific stuff here
if(CMAKE_COMPILER_IS_GNUCC)
- set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
+ set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32")
set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
@@ -851,7 +841,7 @@ elseif(WIN32)
)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
- set(PCRE_LIB pcre)
+ set(PCRE_LIBRARIES pcre)
endif()
if(WITH_CODEC_FFMPEG)
@@ -1073,7 +1063,7 @@ elseif(APPLE)
#pcre is bundled with openCollada
#set(PCRE ${LIBDIR}/pcre)
#set(PCRE_LIBPATH ${PCRE}/lib)
- set(PCRE_LIB pcre)
+ set(PCRE_LIBRARIES pcre)
#libxml2 is used
#set(EXPAT ${LIBDIR}/expat)
#set(EXPAT_LIBPATH ${EXPAT}/lib)
@@ -1161,6 +1151,18 @@ if(WITH_RAYOPTIMIZATION)
unset(_sse2)
endif()
+
+# set the endian define
+include(TestBigEndian)
+test_big_endian(_SYSTEM_BIG_ENDIAN)
+if(_SYSTEM_BIG_ENDIAN)
+ add_definitions(-D__BIG_ENDIAN__)
+else()
+ add_definitions(-D__LITTLE_ENDIAN__)
+endif()
+unset(_SYSTEM_BIG_ENDIAN)
+
+
if(WITH_IMAGE_OPENJPEG)
if(UNIX AND NOT APPLE)
# dealt with above
@@ -1267,6 +1269,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_POINTER_ARITH -Wpointer-arith)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNUSED_PARAMETER -Wunused-parameter)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_WRITE_STRINGS -Wwrite-strings)
+ ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_UNDEFINED -Wundef)
# disable because it gives warnings for printf() & friends.
# ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_DOUBLE_PROMOTION -Wdouble-promotion -Wno-error=double-promotion)
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_NO_ERROR_UNUSED_BUT_SET_VARIABLE -Wno-error=unused-but-set-variable)
@@ -1274,6 +1277,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_ALL -Wall)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
+ ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEFINED -Wundef)
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
diff --git a/GNUmakefile b/GNUmakefile
index 8446541cfae..1c8bb0f82a9 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -36,7 +36,7 @@ OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
BLENDER_DIR:=$(shell pwd -P)
BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE)
BUILD_TYPE:=Release
-BUILD_CMAKE_ARGS:=""
+BUILD_CMAKE_ARGS:=
# -----------------------------------------------------------------------------
@@ -77,6 +77,16 @@ ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
endif
+
+# -----------------------------------------------------------------------------
+# Macro for configuring cmake
+
+CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
+ -H$(BLENDER_DIR) \
+ -B$(BUILD_DIR) \
+ -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
+
+
# -----------------------------------------------------------------------------
# Build Blender
all:
@@ -84,7 +94,7 @@ all:
@echo Configuring Blender ...
if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
- cmake $(BUILD_CMAKE_ARGS) -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE); \
+ $(CMAKE_CONFIG); \
fi
@echo
@@ -120,12 +130,21 @@ help:
@echo " * package_pacman - build an arch linux pacmanpackage"
@echo " * package_archive - build an archive package"
@echo ""
+ @echo "Other Targets"
+ @echo " * translations - update blenders translation files in po/"
+ # TODO, doxygen and sphinx docs
+ @echo ""
@echo "Testing Targets (not assosiated with building blender)"
@echo " * test - run ctest, currently tests import/export, operator execution and that python modules load"
@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 ""
+ @echo "Static Source Code Checking (not assosiated with building blender)"
+ @echo " * check_cppcheck - run blender source through cppcheck (C & C++)"
+ @echo " * check_splint - run blenders source through splint (C only)"
+ @echo " * check_sparse - run blenders source through sparse (C only)"
+ @echo ""
# -----------------------------------------------------------------------------
# Packages
@@ -142,6 +161,15 @@ package_archive:
# -----------------------------------------------------------------------------
+# Other Targets
+#
+translations:
+ python3 po/update_pot.py
+ python3 po/update_po.py
+ python3 po/update_mo.py
+
+
+# -----------------------------------------------------------------------------
# Tests
#
test:
@@ -176,6 +204,23 @@ project_eclipse:
cmake -G"Eclipse CDT4 - Unix Makefiles" -H$(BLENDER_DIR) -B$(BUILD_DIR)
+# -----------------------------------------------------------------------------
+# Static Checking
+#
+
+check_cppcheck:
+ $(CMAKE_CONFIG)
+ cd $(BUILD_DIR) ; python3 $(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
+
+check_sparse:
+ $(CMAKE_CONFIG)
+ cd $(BUILD_DIR) ; python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
+
+
clean:
$(MAKE) -C $(BUILD_DIR) clean
diff --git a/SConstruct b/SConstruct
index 2531872af6c..42ee3342031 100644
--- a/SConstruct
+++ b/SConstruct
@@ -337,6 +337,17 @@ if env['BF_NO_ELBEEM'] == 1:
env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
+
+if btools.ENDIAN == "big":
+ env['CPPFLAGS'].append('-D__BIG_ENDIAN__')
+ env['CXXFLAGS'].append('-D__BIG_ENDIAN__')
+ env['CCFLAGS'].append('-D__BIG_ENDIAN__')
+else:
+ env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
+ env['CXXFLAGS'].append('-D__LITTLE_ENDIAN__')
+ env['CCFLAGS'].append('-D__LITTLE_ENDIAN__')
+
+
# TODO, make optional
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
env['CXXFLAGS'].append('-DWITH_AUDASPACE')
@@ -501,31 +512,35 @@ datafilestargetlist = []
dottargetlist = []
scriptinstall = []
-if env['OURPLATFORM']!='darwin':
- for dp, dn, df in os.walk('bin/.blender'):
+if env['OURPLATFORM']!='darwin':
+ for dp, dn, df in os.walk('release/bin/.blender'):
+ dp = os.path.normpath(dp)
+
if '.svn' in dn:
dn.remove('.svn')
if '_svn' in dn:
dn.remove('_svn')
for f in df:
+ # This files aren't used anymore
+ if f in ['.Blanguages', '.bfont.ttf']:
+ continue
+
if not env['WITH_BF_INTERNATIONAL']:
if 'locale' in dp:
continue
- if f == '.Blanguages':
- continue
if not env['WITH_BF_FREETYPE']:
if f.endswith('.ttf'):
continue
- if 'locale' in dp:
+ if 'locale' in dp or 'fonts' in dp:
datafileslist.append(os.path.join(dp,f))
- dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
+ dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[3:])) # skip bin
datafilestargetlist.append(dir + os.sep + f)
else:
dotblendlist.append(os.path.join(dp, f))
- dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
+ dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[3:])) # skip bin
dottargetlist.append(dir + os.sep + f)
dotblenderinstall = []
@@ -645,7 +660,7 @@ else:
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
dllsources = []
- if not env['OURPLATFORM'] in ('win32-mingw', 'win64-vc', 'linuxcross'):
+ if not env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
# For MinGW and linuxcross static linking will be used
dllsources += ['${LCGDIR}/gettext/lib/gnu_gettext.dll']
diff --git a/build_files/buildbot/config/user-config-i686.py b/build_files/buildbot/config/user-config-i686.py
index 07dc4a9d831..5fe3d6891fd 100644
--- a/build_files/buildbot/config/user-config-i686.py
+++ b/build_files/buildbot/config/user-config-i686.py
@@ -87,6 +87,10 @@ WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/home/sources/staticlibs/spnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib32'
+# FFT
+WITH_BF_FFTW3 = True
+WITH_BF_STATICFFTW3 = True
+
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
diff --git a/build_files/buildbot/config/user-config-x86_64.py b/build_files/buildbot/config/user-config-x86_64.py
index 9c569ff4458..b8b2d7f7a5f 100644
--- a/build_files/buildbot/config/user-config-x86_64.py
+++ b/build_files/buildbot/config/user-config-x86_64.py
@@ -87,6 +87,10 @@ WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/home/sources/staticlibs/spnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib64'
+# FFT
+WITH_BF_FFTW3 = True
+WITH_BF_STATICFFTW3 = True
+
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
diff --git a/build_files/cmake/Modules/FindOpenCOLLADA.cmake b/build_files/cmake/Modules/FindOpenCOLLADA.cmake
index c7637283514..0c8d8c8d841 100644
--- a/build_files/cmake/Modules/FindOpenCOLLADA.cmake
+++ b/build_files/cmake/Modules/FindOpenCOLLADA.cmake
@@ -49,12 +49,14 @@ SET(_opencollada_FIND_COMPONENTS
OpenCOLLADAFramework
OpenCOLLADABaseUtils
GeneratedSaxParser
- UTF
MathMLSolver
- pcre
+)
+
+# Fedora openCOLLADA package links these statically
+SET(_opencollada_FIND_STATIC_COMPONENTS
+ UTF
ftoa
buffer
- xml2
)
SET(_opencollada_SEARCH_DIRS
@@ -104,6 +106,25 @@ FOREACH(COMPONENT ${_opencollada_FIND_COMPONENTS})
LIST(APPEND _opencollada_LIBRARIES "${OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY}")
ENDFOREACH()
+FOREACH(COMPONENT ${_opencollada_FIND_STATIC_COMPONENTS})
+ STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+
+ FIND_LIBRARY(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY
+ NAMES
+ ${COMPONENT}
+ HINTS
+ ${_opencollada_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+ # Ubuntu ppa needs this.
+ lib64/opencollada lib/opencollada
+ )
+ MARK_AS_ADVANCED(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
+ IF(OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY)
+ LIST(APPEND _opencollada_LIBRARIES "${OPENCOLLADA_${UPPERCOMPONENT}_LIBRARY}")
+ ENDIF()
+ENDFOREACH()
+
# handle the QUIETLY and REQUIRED arguments and set OPENCOLLADA_FOUND to TRUE if
# all listed variables are TRUE
diff --git a/build_files/cmake/Modules/FindPCRE.cmake b/build_files/cmake/Modules/FindPCRE.cmake
new file mode 100644
index 00000000000..9d73e9200d9
--- /dev/null
+++ b/build_files/cmake/Modules/FindPCRE.cmake
@@ -0,0 +1,69 @@
+# - Find PCRE library
+# Find the native PCRE includes and library
+# This module defines
+# PCRE_INCLUDE_DIRS, where to find pcre.h, Set when
+# PCRE_INCLUDE_DIR is found.
+# PCRE_LIBRARIES, libraries to link against to use PCRE.
+# PCRE_ROOT_DIR, The base directory to search for PCRE.
+# This can also be an environment variable.
+# PCRE_FOUND, If false, do not try to use PCRE.
+#
+# also defined, but not for general use are
+# PCRE_LIBRARY, where to find the PCRE library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If PCRE_ROOT_DIR was defined in the environment, use it.
+IF(NOT PCRE_ROOT_DIR AND NOT $ENV{PCRE_ROOT_DIR} STREQUAL "")
+ SET(PCRE_ROOT_DIR $ENV{PCRE_ROOT_DIR})
+ENDIF()
+
+SET(_pcre_SEARCH_DIRS
+ ${PCRE_ROOT_DIR}
+ /usr/local
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+)
+
+FIND_PATH(PCRE_INCLUDE_DIR pcre.h
+ HINTS
+ ${_pcre_SEARCH_DIRS}
+ PATH_SUFFIXES
+ include
+ include
+)
+
+FIND_LIBRARY(PCRE_LIBRARY
+ NAMES
+ pcre
+ HINTS
+ ${_pcre_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+ )
+
+# handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCRE DEFAULT_MSG
+ PCRE_LIBRARY PCRE_INCLUDE_DIR)
+
+IF(PCRE_FOUND)
+ SET(PCRE_LIBRARIES ${PCRE_LIBRARY})
+ SET(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
+ENDIF(PCRE_FOUND)
+
+MARK_AS_ADVANCED(
+ PCRE_INCLUDE_DIR
+ PCRE_LIBRARY
+)
diff --git a/build_files/cmake/Modules/FindXML2.cmake b/build_files/cmake/Modules/FindXML2.cmake
new file mode 100644
index 00000000000..40cc332fb88
--- /dev/null
+++ b/build_files/cmake/Modules/FindXML2.cmake
@@ -0,0 +1,68 @@
+# - Find XML2 library
+# Find the native XML2 includes and library
+# This module defines
+# XML2_INCLUDE_DIRS, where to find xml2.h, Set when
+# XML2_INCLUDE_DIR is found.
+# XML2_LIBRARIES, libraries to link against to use XML2.
+# XML2_ROOT_DIR, The base directory to search for XML2.
+# This can also be an environment variable.
+# XML2_FOUND, If false, do not try to use XML2.
+#
+# also defined, but not for general use are
+# XML2_LIBRARY, where to find the XML2 library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If XML2_ROOT_DIR was defined in the environment, use it.
+IF(NOT XML2_ROOT_DIR AND NOT $ENV{XML2_ROOT_DIR} STREQUAL "")
+ SET(XML2_ROOT_DIR $ENV{XML2_ROOT_DIR})
+ENDIF()
+
+SET(_xml2_SEARCH_DIRS
+ ${XML2_ROOT_DIR}
+ /usr/local
+ /sw # Fink
+ /opt/local # DarwinPorts
+ /opt/csw # Blastwave
+)
+
+FIND_PATH(XML2_INCLUDE_DIR libxml2/libxml/xpath.h
+ HINTS
+ ${_xml2_SEARCH_DIRS}
+ PATH_SUFFIXES
+ include
+)
+
+FIND_LIBRARY(XML2_LIBRARY
+ NAMES
+ xml2
+ HINTS
+ ${_xml2_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+ )
+
+# handle the QUIETLY and REQUIRED arguments and set XML2_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(XML2 DEFAULT_MSG
+ XML2_LIBRARY XML2_INCLUDE_DIR)
+
+IF(XML2_FOUND)
+ SET(XML2_LIBRARIES ${XML2_LIBRARY})
+ SET(XML2_INCLUDE_DIRS ${XML2_INCLUDE_DIR})
+ENDIF(XML2_FOUND)
+
+MARK_AS_ADVANCED(
+ XML2_INCLUDE_DIR
+ XML2_LIBRARY
+)
diff --git a/build_files/cmake/cmake_static_check_cppcheck.py b/build_files/cmake/cmake_static_check_cppcheck.py
new file mode 100644
index 00000000000..f6d46904794
--- /dev/null
+++ b/build_files/cmake/cmake_static_check_cppcheck.py
@@ -0,0 +1,76 @@
+#!/usr/bin/env python
+
+# $Id$
+# ***** 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 *****
+
+# <pep8 compliant>
+
+import project_source_info
+import subprocess
+import sys
+import os
+
+CHECKER_IGNORE_PREFIX = [
+ "extern",
+ "intern/moto",
+ ]
+
+CHECKER_BIN = "cppcheck"
+
+CHECKER_ARGS = [
+ # not sure why this is needed, but it is.
+ "-I" + os.path.join(project_source_info.SOURCE_DIR, "extern/glew/include"),
+
+ # "--check-config", # when includes are missing
+ # "--enable=all", # if you want sixty hundred pedantic suggestions
+ ]
+
+def main():
+ source_info = project_source_info.build_info(ignore_prefix_list=CHECKER_IGNORE_PREFIX)
+
+ check_commands = []
+ for c, inc_dirs, defs in source_info:
+ cmd = ([CHECKER_BIN] +
+ CHECKER_ARGS +
+ [c] +
+ [("-I%s" % i) for i in inc_dirs] +
+ [("-D%s" % d) for d in defs]
+ )
+
+ check_commands.append((c, cmd))
+
+ for i, (c, cmd) in enumerate(check_commands):
+ percent = 100.0 * (i / (len(check_commands)-1))
+ percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
+
+ # if percent < 27.9:
+ # continue
+
+ # let cppcheck finish the line off...
+ sys.stdout.write("%s " % percent_str)
+
+ sys.stdout.flush()
+ process = subprocess.Popen(cmd)
+ process.wait()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/build_files/cmake/cmake_static_check_sparse.py b/build_files/cmake/cmake_static_check_sparse.py
new file mode 100644
index 00000000000..9af53ed8008
--- /dev/null
+++ b/build_files/cmake/cmake_static_check_sparse.py
@@ -0,0 +1,66 @@
+#!/usr/bin/env python
+
+# $Id$
+# ***** 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 *****
+
+# <pep8 compliant>
+
+CHECKER_IGNORE_PREFIX = [
+ "extern",
+ "intern/moto",
+ ]
+
+CHECKER_BIN = "sparse"
+CHECKER_ARGS = [
+ ]
+
+import project_source_info
+import subprocess
+import sys
+
+
+def main():
+ source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
+
+ check_commands = []
+ for c, inc_dirs, defs in source_info:
+
+ cmd = ([CHECKER_BIN] +
+ CHECKER_ARGS +
+ [c] +
+ [("-I%s" % i) for i in inc_dirs] +
+ [("-D%s" % d) for d in defs]
+ )
+
+ check_commands.append((c, cmd))
+
+ for i, (c, cmd) in enumerate(check_commands):
+ percent = 100.0 * (i / (len(check_commands) - 1))
+ percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
+
+ sys.stdout.write("%s %s\n" % (percent_str, c))
+ sys.stdout.flush()
+
+ process = subprocess.Popen(cmd)
+ process.wait()
+
+if __name__ == "__main__":
+ main()
diff --git a/build_files/cmake/cmake_static_check_splint.py b/build_files/cmake/cmake_static_check_splint.py
new file mode 100644
index 00000000000..3614ab48cf8
--- /dev/null
+++ b/build_files/cmake/cmake_static_check_splint.py
@@ -0,0 +1,98 @@
+#!/usr/bin/env python
+
+# $Id$
+# ***** 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 *****
+
+# <pep8 compliant>
+
+CHECKER_IGNORE_PREFIX = [
+ "extern",
+ "intern/moto",
+ ]
+
+CHECKER_BIN = "splint"
+
+CHECKER_ARGS = [
+ "-weak",
+ "-posix-lib",
+ "-linelen", "10000",
+ "+ignorequals",
+ "+relaxtypes",
+ "-retvalother",
+ "+matchanyintegral",
+ "+longintegral",
+ "+ignoresigns",
+ "-nestcomment",
+ "-predboolothers",
+ "-ifempty",
+ "-unrecogcomments",
+
+ # we may want to remove these later
+ "-type",
+ "-fixedformalarray",
+ "-fullinitblock",
+ "-fcnuse",
+ "-initallelements",
+ "-castfcnptr",
+ # -forcehints,
+ "-bufferoverflowhigh", # warns a lot about sprintf()
+
+ # re-definitions, rna causes most of these
+ "-redef",
+ "-syntax",
+
+ # dummy, witjout this splint complains with:
+ # /usr/include/bits/confname.h:31:27: *** Internal Bug at cscannerHelp.c:2428: Unexpanded macro not function or constant: int _PC_MAX_CANON
+ "-D_PC_MAX_CANON=0",
+ ]
+
+
+import project_source_info
+import subprocess
+import sys
+
+
+def main():
+ source_info = project_source_info.build_info(use_cxx=False, ignore_prefix_list=CHECKER_IGNORE_PREFIX)
+
+ check_commands = []
+ for c, inc_dirs, defs in source_info:
+ cmd = ([CHECKER_BIN] +
+ CHECKER_ARGS +
+ [c] +
+ [("-I%s" % i) for i in inc_dirs] +
+ [("-D%s" % d) for d in defs]
+ )
+
+ check_commands.append((c, cmd))
+
+ for i, (c, cmd) in enumerate(check_commands):
+ percent = 100.0 * (i / (len(check_commands) - 1))
+ percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
+
+ sys.stdout.write("%s %s\n" % (percent_str, c))
+ sys.stdout.flush()
+
+ process = subprocess.Popen(cmd)
+ process.wait()
+
+if __name__ == "__main__":
+ main()
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 58938c8b0b0..aec7a9fd96c 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -295,10 +295,10 @@ macro(setup_liblinks
target_link_libraries_optimized(${target} "${OPENCOLLADA_LIBRARIES}")
unset(OPENCOLLADA_LIBRARIES_DEBUG)
- file_list_suffix(PCRE_LIB_DEBUG "${PCRE_LIB}" "_d")
- target_link_libraries_debug(${target} "${PCRE_LIB_DEBUG}")
- target_link_libraries_optimized(${target} "${PCRE_LIB}")
- unset(PCRE_LIB_DEBUG)
+ file_list_suffix(PCRE_LIBRARIES_DEBUG "${PCRE_LIBRARIES}" "_d")
+ target_link_libraries_debug(${target} "${PCRE_LIBRARIES_DEBUG}")
+ target_link_libraries_optimized(${target} "${PCRE_LIBRARIES}")
+ unset(PCRE_LIBRARIES_DEBUG)
if(EXPAT_LIB)
file_list_suffix(EXPAT_LIB_DEBUG "${EXPAT_LIB}" "_d")
@@ -309,7 +309,8 @@ macro(setup_liblinks
else()
target_link_libraries(${target}
${OPENCOLLADA_LIBRARIES}
- ${PCRE_LIB}
+ ${PCRE_LIBRARIES}
+ ${XML2_LIBRARIES}
${EXPAT_LIB})
endif()
endif()
@@ -392,6 +393,7 @@ macro(remove_strict_flags)
remove_flag("-Wstrict-prototypes")
remove_flag("-Wunused-parameter")
remove_flag("-Wwrite-strings")
+ remove_flag("-Wundef")
remove_flag("-Wshadow")
remove_flag("-Werror=[^ ]+")
remove_flag("-Werror")
diff --git a/build_files/cmake/project_source_info.py b/build_files/cmake/project_source_info.py
new file mode 100644
index 00000000000..c4b83d20ea5
--- /dev/null
+++ b/build_files/cmake/project_source_info.py
@@ -0,0 +1,165 @@
+# $Id$
+# ***** 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 *****
+
+# <pep8 compliant>
+
+__all__ = (
+ "build_info",
+ "SOURCE_DIR",
+ )
+
+import os
+import sys
+from os.path import join, dirname, normpath, abspath
+
+SOURCE_DIR = join(dirname(__file__), "..", "..")
+SOURCE_DIR = normpath(SOURCE_DIR)
+SOURCE_DIR = abspath(SOURCE_DIR)
+
+
+def is_c_header(filename):
+ ext = os.path.splitext(filename)[1]
+ return (ext in (".h", ".hpp", ".hxx"))
+
+
+def is_c_header(filename):
+ ext = os.path.splitext(filename)[1]
+ return (ext in (".h", ".hpp", ".hxx"))
+
+
+def is_c(filename):
+ ext = os.path.splitext(filename)[1]
+ return (ext in (".c", ".cpp", ".cxx", ".m", ".mm", ".rc"))
+
+
+def is_c_any(filename):
+ return os.path.s_c(filename) or is_c_header(filename)
+
+
+# copied from project_info.py
+CMAKE_DIR = "."
+
+
+def cmake_cache_var(var):
+ cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"))
+ lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
+ cache_file.close()
+
+ for l in lines:
+ if l.split(":")[0] == var:
+ return l.split("=", 1)[-1]
+ return None
+
+
+def do_ignore(filepath, ignore_prefix_list):
+ if ignore_prefix_list is None:
+ return False
+
+ relpath = os.path.relpath(filepath, SOURCE_DIR)
+ return any([relpath.startswith(prefix) for prefix in ignore_prefix_list])
+
+
+def makefile_log():
+ import subprocess
+ # Check blender is not 2.5x until it supports playback again
+ print("running make with --dry-run ...")
+ process = subprocess.Popen(["make", "--always-make", "--dry-run", "--keep-going", "VERBOSE=1"],
+ stdout=subprocess.PIPE,
+ )
+
+ while process.poll():
+ time.sleep(1)
+
+ out = process.stdout.read()
+ process.stdout.close()
+ print("done!", len(out), "bytes")
+ return out.decode("ascii").split("\n")
+
+
+def build_info(use_c=True, use_cxx=True, ignore_prefix_list=None):
+
+ makelog = makefile_log()
+
+ source = []
+
+ compilers = []
+ if use_c:
+ compilers.append(cmake_cache_var("CMAKE_C_COMPILER"))
+ if use_cxx:
+ compilers.append(cmake_cache_var("CMAKE_CXX_COMPILER"))
+
+ print("compilers:", " ".join(compilers))
+
+ fake_compiler = "%COMPILER%"
+
+ print("parsing make log ...")
+
+ for line in makelog:
+
+ args = line.split()
+
+ if not any([(c in args) for c in compilers]):
+ continue
+
+ # join args incase they are not.
+ args = ' '.join(args)
+ args = args.replace(" -isystem", " -I")
+ args = args.replace(" -D ", " -D")
+ args = args.replace(" -I ", " -I")
+
+ for c in compilers:
+ args = args.replace(c, fake_compiler)
+ args = args.split()
+ # end
+
+ # remove compiler
+ args[:args.index(fake_compiler) + 1] = []
+
+ c_files = [f for f in args if is_c(f)]
+ inc_dirs = [f[2:].strip() for f in args if f.startswith('-I')]
+ defs = [f[2:].strip() for f in args if f.startswith('-D')]
+ for c in sorted(c_files):
+
+ if do_ignore(c, ignore_prefix_list):
+ continue
+
+ source.append((c, inc_dirs, defs))
+
+ # safety check that our includes are ok
+ for f in inc_dirs:
+ if not os.path.exists(f):
+ raise Exception("%s missing" % f)
+
+ print("done!")
+
+ return source
+
+
+def main():
+ if not os.path.exists(join(CMAKE_DIR, "CMakeCache.txt")):
+ print("This script must run from the cmake build dir")
+ return
+
+ for s in build_info():
+ print(s)
+
+if __name__ == "__main__":
+ main()
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index 102ec73a4e3..29d2b39323e 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -14,7 +14,7 @@ USE_SDK=True
################### Cocoa & architecture settings ##################
#############################################################################
WITH_GHOST_COCOA=True
-MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
+MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
cmd = 'uname -p'
diff --git a/build_files/scons/config/linuxcross-config.py b/build_files/scons/config/linuxcross-config.py
index 1bdf735f458..8057d478c31 100644
--- a/build_files/scons/config/linuxcross-config.py
+++ b/build_files/scons/config/linuxcross-config.py
@@ -127,6 +127,7 @@ WITH_BF_BINRELOC = False
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR + '/ffmpeg'
BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
+BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py
index c815b76ef73..37d693db560 100644
--- a/build_files/scons/config/win32-mingw-config.py
+++ b/build_files/scons/config/win32-mingw-config.py
@@ -174,7 +174,7 @@ C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-pro
CC_WARN = [ '-Wall' ]
-LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid']
+LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32']
PLATFORM_LINKFLAGS = ['--stack,2097152']
diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py
index ba9633a6b4c..280ba3dd3f1 100644
--- a/build_files/scons/config/win64-vc-config.py
+++ b/build_files/scons/config/win64-vc-config.py
@@ -96,11 +96,11 @@ BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'libz'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
-WITH_BF_INTERNATIONAL = False
+WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
-BF_GETTEXT_LIB = 'gettext'
+BF_GETTEXT_LIB = 'gnu_gettext'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE = True
@@ -188,11 +188,6 @@ CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
-if BF_DEBUG:
- BF_NUMJOBS=1
-else:
- BF_NUMJOBS=6
-
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
BF_BUILDDIR = '..\\build\\blender25-win64-vc'
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index c537e435de8..54fa6077bf7 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -564,11 +564,11 @@ def AppIt(target=None, source=None, env=None):
# print cmd
commands.getoutput(cmd)
cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
- shutil.copy(bldroot + '/release/bin/.blender/.bfont.ttf', cmd)
- shutil.copy(bldroot + '/release/bin/.blender/.Blanguages', cmd)
- cmd = 'cp -R %s/release/bin/%s/locale %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
+ cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
commands.getoutput(cmd)
- cmd = 'cp -R %s/release/bin/%s/locale %s/%s.app/Contents/MacOS/%s/'%(bldroot,VERSION,installdir,binary,VERSION)
+ cmd = 'cp -R %s/release/bin/.blender/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
+ commands.getoutput(cmd)
+ cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
commands.getoutput(cmd)
@@ -581,10 +581,6 @@ def AppIt(target=None, source=None, env=None):
if binary == 'blender':#not copy everything for blenderplayer
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
- cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
- commands.getoutput(cmd)
- cmd = 'cp -R %s/release/io %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
- commands.getoutput(cmd)
cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
commands.getoutput(cmd)
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index be059241727..caa83ea41be 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -63,9 +63,27 @@ def get_revision():
return 'r' + build_rev
+
+# copied from: http://www.scons.org/wiki/AutoconfRecipes
+def checkEndian():
+ import struct
+ array = struct.pack('cccc', '\x01', '\x02', '\x03', '\x04')
+ i = struct.unpack('i', array)
+ # Little Endian
+ if i == struct.unpack('<i', array):
+ return "little"
+ # Big Endian
+ elif i == struct.unpack('>i', array):
+ return "big"
+ else:
+ raise Exception("cant find endian")
+
+
# This is used in creating the local config directories
VERSION, VERSION_DISPLAY = get_version()
REVISION = get_revision()
+ENDIAN = checkEndian()
+
def print_arguments(args, bc):
if len(args):
diff --git a/doc/python_api/examples/bge.texture.1.py b/doc/python_api/examples/bge.texture.1.py
index faa0ae736e8..4be6f51de67 100644
--- a/doc/python_api/examples/bge.texture.1.py
+++ b/doc/python_api/examples/bge.texture.1.py
@@ -14,7 +14,7 @@ def createTexture(cont):
object = cont.owner
# get the reference pointer (ID) of the internal texture
- ID = texture.materialID(obj, 'IMoriginal.png')
+ ID = texture.materialID(object, 'IMoriginal.png')
# create a texture object
object_texture = texture.Texture(object, ID)
diff --git a/doc/python_api/examples/bpy.types.ID.user_clear.1.py b/doc/python_api/examples/bpy.types.ID.user_clear.1.py
index 68c35caa7d4..239ed41c66c 100644
--- a/doc/python_api/examples/bpy.types.ID.user_clear.1.py
+++ b/doc/python_api/examples/bpy.types.ID.user_clear.1.py
@@ -1,6 +1,4 @@
"""
-User Clear
-++++++++++
This function is for advanced use only, misuse can crash blender since the user
count is used to prevent data being removed when it is used.
"""
diff --git a/doc/python_api/examples/bpy.types.Operator.py b/doc/python_api/examples/bpy.types.Operator.py
index 52edfa0a61b..0981712e1ff 100644
--- a/doc/python_api/examples/bpy.types.Operator.py
+++ b/doc/python_api/examples/bpy.types.Operator.py
@@ -21,7 +21,7 @@ class HelloWorldOperator(bpy.types.Operator):
print("Hello World")
return {'FINISHED'}
-bpy.utils.register_class(SimpleOperator)
+bpy.utils.register_class(HelloWorldOperator)
# test call to the newly defined operator
bpy.ops.wm.hello_world()
diff --git a/doc/python_api/rst/bgl.rst b/doc/python_api/rst/bgl.rst
index 5f3158bf5dd..61400351d16 100644
--- a/doc/python_api/rst/bgl.rst
+++ b/doc/python_api/rst/bgl.rst
@@ -56,9 +56,9 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type n: int
:arg n: Specifies the number of textures to be queried.
- :type textures: :class:`Buffer` object I{type GL_INT}
+ :type textures: :class:`bgl.Buffer` object I{type GL_INT}
:arg textures: Specifies an array containing the names of the textures to be queried
- :type residences: :class:`Buffer` object I{type GL_INT}(boolean)
+ :type residences: :class:`bgl.Buffer` object I{type GL_INT}(boolean)
:arg residences: An array in which the texture residence status in returned.
The residence status of a texture named by an element of textures is
returned in the corresponding element of residences.
@@ -101,7 +101,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type xmove, ymove: float
:arg xmove, ymove: Specify the x and y offsets to be added to the current raster position after
the bitmap is drawn.
- :type bitmap: :class:`Buffer` object I{type GL_BYTE}
+ :type bitmap: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg bitmap: Specifies the address of the bitmap image.
@@ -139,7 +139,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg n: Specifies the number of display lists to be executed.
:type type: Enumerated constant
:arg type: Specifies the type of values in lists.
- :type lists: :class:`Buffer` object
+ :type lists: :class:`bgl.Buffer` object
:arg lists: Specifies the address of an array of name offsets in the display list.
The pointer type is void because the offsets can be bytes, shorts, ints, or floats,
depending on the value of type.
@@ -217,7 +217,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type plane: Enumerated constant
:arg plane: Specifies which clipping plane is being positioned.
- :type equation: :class:`Buffer` object I{type GL_FLOAT}(double)
+ :type equation: :class:`bgl.Buffer` object I{type GL_FLOAT}(double)
:arg equation: Specifies the address of an array of four double- precision
floating-point values. These values are interpreted as a plane equation.
@@ -340,7 +340,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type n: int
:arg n: Specifies the number of textures to be deleted
- :type textures: :class:`Buffer` I{GL_INT}
+ :type textures: :class:`bgl.Buffer` I{GL_INT}
:arg textures: Specifies an array of textures to be deleted
@@ -413,7 +413,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg format: Specifies the format of the pixel data.
:type type: Enumerated constant
:arg type: Specifies the data type for pixels.
- :type pixels: :class:`Buffer` object
+ :type pixels: :class:`bgl.Buffer` object
:arg pixels: Specifies a pointer to the pixel data.
@@ -512,7 +512,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type type: Enumerated constant
:arg type: Specifies a symbolic constant that describes the information that
will be returned for each vertex.
- :type buffer: :class:`Buffer` object I{GL_FLOAT}
+ :type buffer: :class:`bgl.Buffer` object I{GL_FLOAT}
:arg buffer: Returns the feedback data.
@@ -592,7 +592,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type n: int
:arg n: Specifies the number of textures name to be generated.
- :type textures: :class:`Buffer` object I{type GL_INT}
+ :type textures: :class:`bgl.Buffer` object I{type GL_INT}
:arg textures: Specifies an array in which the generated textures names are stored.
@@ -620,7 +620,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg plane: Specifies a clipping plane. The number of clipping planes depends on the
implementation, but at least six clipping planes are supported. They are identified by
symbolic names of the form GL_CLIP_PLANEi where 0 < i < GL_MAX_CLIP_PLANES.
- :type equation: :class:`Buffer` object I{type GL_FLOAT}
+ :type equation: :class:`bgl.Buffer` object I{type GL_FLOAT}
:arg equation: Returns four float (double)-precision values that are the coefficients of the
plane equation of plane in eye coordinates. The initial value is (0, 0, 0, 0).
@@ -646,7 +646,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
names of the form GL_LIGHTi where 0 < i < GL_MAX_LIGHTS.
:type pname: Enumerated constant
:arg pname: Specifies a light source parameter for light.
- :type params: :class:`Buffer` object. Depends on function prototype.
+ :type params: :class:`bgl.Buffer` object. Depends on function prototype.
:arg params: Returns the requested data.
@@ -662,7 +662,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg target: Specifies the symbolic name of a map.
:type query: Enumerated constant
:arg query: Specifies which parameter to return.
- :type v: :class:`Buffer` object. Depends on function prototype.
+ :type v: :class:`bgl.Buffer` object. Depends on function prototype.
:arg v: Returns the requested data.
@@ -679,7 +679,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
representing the front and back materials, respectively.
:type pname: Enumerated constant
:arg pname: Specifies the material parameter to return.
- :type params: :class:`Buffer` object. Depends on function prototype.
+ :type params: :class:`bgl.Buffer` object. Depends on function prototype.
:arg params: Returns the requested data.
@@ -693,7 +693,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type map: Enumerated constant
:arg map: Specifies the name of the pixel map to return.
- :type values: :class:`Buffer` object. Depends on function prototype.
+ :type values: :class:`bgl.Buffer` object. Depends on function prototype.
:arg values: Returns the pixel map contents.
@@ -703,7 +703,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/getpolygonstipple.html>`_
- :type mask: :class:`Buffer` object I{type GL_BYTE}
+ :type mask: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg mask: Returns the stipple pattern. The initial value is all 1's.
@@ -730,7 +730,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg target: Specifies a texture environment. Must be GL_TEXTURE_ENV.
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of a texture environment parameter.
- :type params: :class:`Buffer` object. Depends on function prototype.
+ :type params: :class:`bgl.Buffer` object. Depends on function prototype.
:arg params: Returns the requested data.
@@ -746,7 +746,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg coord: Specifies a texture coordinate.
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of the value(s) to be returned.
- :type params: :class:`Buffer` object. Depends on function prototype.
+ :type params: :class:`bgl.Buffer` object. Depends on function prototype.
:arg params: Returns the requested data.
@@ -765,7 +765,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg format: Specifies a pixel format for the returned data.
:type type: Enumerated constant
:arg type: Specifies a pixel type for the returned data.
- :type pixels: :class:`Buffer` object.
+ :type pixels: :class:`bgl.Buffer` object.
:arg pixels: Returns the texture image. Should be a pointer to an array of the
type specified by type
@@ -785,7 +785,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
Level 0 is the base image level. Level n is the nth mipmap reduction image.
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name of a texture parameter.
- :type params: :class:`Buffer` object. Depends on function prototype.
+ :type params: :class:`bgl.Buffer` object. Depends on function prototype.
:arg params: Returns the requested data.
@@ -801,7 +801,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg target: Specifies the symbolic name of the target texture.
:type pname: Enumerated constant
:arg pname: Specifies the symbolic name the target texture.
- :type params: :class:`Buffer` object. Depends on function prototype.
+ :type params: :class:`bgl.Buffer` object. Depends on function prototype.
:arg params: Returns the texture parameters.
@@ -826,7 +826,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/index_.html>`_
- :type c: :class:`Buffer` object. Depends on function prototype.
+ :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
the current color index.
@@ -956,7 +956,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/loadmatrix.html>`_
- :type m: :class:`Buffer` object. Depends on function prototype.
+ :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
of a 4x4 column-major matrix.
@@ -1002,7 +1002,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
occupy contiguous memory locations.
:type order: int
:arg order: Specifies the number of control points. Must be positive.
- :type points: :class:`Buffer` object. Depends on function prototype.
+ :type points: :class:`bgl.Buffer` object. Depends on function prototype.
:arg points: Specifies a pointer to the array of control points.
@@ -1043,7 +1043,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type vorder: int
:arg vorder: Specifies the dimension of the control point array in the v axis.
Must be positive. The initial value is 1.
- :type points: :class:`Buffer` object. Depends on function prototype.
+ :type points: :class:`bgl.Buffer` object. Depends on function prototype.
:arg points: Specifies a pointer to the array of control points.
@@ -1103,7 +1103,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/multmatrix.html>`_
- :type m: :class:`Buffer` object. Depends on function prototype.
+ :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
major matrix.
@@ -1132,7 +1132,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
: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.
The initial value of the current normal is the unit vector, (0, 0, 1).
- :type v: :class:`Buffer` object. Depends on function prototype. ('v' prototypes)
+ :type v: :class:`bgl.Buffer` object. Depends on function prototype. ('v' prototypes)
:arg v: Specifies a pointer to an array of three elements: the x, y, and z coordinates
of the new current normal.
@@ -1177,7 +1177,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg map: Specifies a symbolic map name.
:type mapsize: int
:arg mapsize: Specifies the size of the map being defined.
- :type values: :class:`Buffer` object. Depends on function prototype.
+ :type values: :class:`bgl.Buffer` object. Depends on function prototype.
:arg values: Specifies an array of mapsize values.
@@ -1266,7 +1266,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
.. seealso:: `OpenGL Docs <http://www.opengl.org/documentation/specs/man_pages/hardcopy/GL/html/gl/polygonstipple.html>`_
- :type mask: :class:`Buffer` object I{type GL_BYTE}
+ :type mask: :class:`bgl.Buffer` object I{type GL_BYTE}
:arg mask: Specifies a pointer to a 32x32 stipple pattern that will be unpacked
from memory in the same way that glDrawPixels unpacks pixels.
@@ -1307,9 +1307,9 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type n: int
:arg n: Specifies the number of textures to be prioritized.
- :type textures: :class:`Buffer` I{type GL_INT}
+ :type textures: :class:`bgl.Buffer` I{type GL_INT}
:arg textures: Specifies an array containing the names of the textures to be prioritized.
- :type priorities: :class:`Buffer` I{type GL_FLOAT}
+ :type priorities: :class:`bgl.Buffer` I{type GL_FLOAT}
:arg priorities: Specifies an array containing the texture priorities.
A priority given in an element of priorities applies to the texture named
by the corresponding element of textures.
@@ -1417,7 +1417,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg format: Specifies the format of the pixel data.
:type type: Enumerated constant
:arg type: Specifies the data type of the pixel data.
- :type pixels: :class:`Buffer` object
+ :type pixels: :class:`bgl.Buffer` object
:arg pixels: Returns the pixel data.
@@ -1496,7 +1496,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type size: int
:arg size: Specifies the size of buffer
- :type buffer: :class:`Buffer` I{type GL_INT}
+ :type buffer: :class:`bgl.Buffer` I{type GL_INT}
:arg buffer: Returns the selection data
@@ -1575,7 +1575,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
: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
present in all forms of the command.
- :type v: :class:`Buffer` object. Depends on function prototype. (for 'v' prototypes only)
+ :type v: :class:`bgl.Buffer` object. Depends on function prototype. (for 'v' prototypes only)
:arg v: Specifies a pointer to an array of one, two, three, or four elements,
which in turn specify the s, t, r, and q texture coordinates.
@@ -1642,7 +1642,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg format: Specifies the format of the pixel data.
:type type: Enumerated constant
:arg type: Specifies the data type of the pixel data.
- :type pixels: :class:`Buffer` object.
+ :type pixels: :class:`bgl.Buffer` object.
:arg pixels: Specifies a pointer to the image data in memory.
@@ -1673,7 +1673,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg format: Specifies the format of the pixel data.
:type type: Enumerated constant
:arg type: Specifies the data type of the pixel data.
- :type pixels: :class:`Buffer` object.
+ :type pixels: :class:`bgl.Buffer` object.
:arg pixels: Specifies a pointer to the image data in memory.
@@ -1720,7 +1720,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
: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
are present in all forms of the command.
- :type v: :class:`Buffer` object. Depends of function prototype (for 'v'
+ :type v: :class:`bgl.Buffer` object. Depends of function prototype (for 'v'
prototypes only)
:arg v: Specifies a pointer to an array of two, three, or four elements. The
elements of a two-element array are x and y; of a three-element array,
@@ -1795,7 +1795,7 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:arg x, y: Specify the center of a picking region in window coordinates.
:type width, height: double
:arg width, height: Specify the width and height, respectively, of the picking region in window coordinates.
- :type viewport: :class:`Buffer` object. [int]
+ :type viewport: :class:`bgl.Buffer` object. [int]
:arg viewport: Specifies the current viewport.
@@ -1807,13 +1807,13 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type objx, objy, objz: double
:arg objx, objy, objz: Specify the object coordinates.
- :type modelMatrix: :class:`Buffer` object. [double]
+ :type modelMatrix: :class:`bgl.Buffer` object. [double]
:arg modelMatrix: Specifies the current modelview matrix (as from a glGetDoublev call).
- :type projMatrix: :class:`Buffer` object. [double]
+ :type projMatrix: :class:`bgl.Buffer` object. [double]
:arg projMatrix: Specifies the current projection matrix (as from a glGetDoublev call).
- :type viewport: :class:`Buffer` object. [int]
+ :type viewport: :class:`bgl.Buffer` object. [int]
:arg viewport: Specifies the current viewport (as from a glGetIntegerv call).
- :type winx, winy, winz: :class:`Buffer` object. [double]
+ :type winx, winy, winz: :class:`bgl.Buffer` object. [double]
:arg winx, winy, winz: Return the computed window coordinates.
@@ -1825,13 +1825,13 @@ OpenGL}" and the online NeHe tutorials are two of the best resources.
:type winx, winy, winz: double
:arg winx, winy, winz: Specify the window coordinates to be mapped.
- :type modelMatrix: :class:`Buffer` object. [double]
+ :type modelMatrix: :class:`bgl.Buffer` object. [double]
:arg modelMatrix: Specifies the current modelview matrix (as from a glGetDoublev call).
- :type projMatrix: :class:`Buffer` object. [double]
+ :type projMatrix: :class:`bgl.Buffer` object. [double]
:arg projMatrix: Specifies the current projection matrix (as from a glGetDoublev call).
- :type viewport: :class:`Buffer` object. [int]
+ :type viewport: :class:`bgl.Buffer` object. [int]
:arg viewport: Specifies the current viewport (as from a glGetIntegerv call).
- :type objx, objy, objz: :class:`Buffer` object. [double]
+ :type objx, objy, objz: :class:`bgl.Buffer` object. [double]
:arg objx, objy, objz: Return the computed object coordinates.
diff --git a/doc/python_api/rst/gpu.rst b/doc/python_api/rst/gpu.rst
new file mode 100644
index 00000000000..72a5dc2f5d3
--- /dev/null
+++ b/doc/python_api/rst/gpu.rst
@@ -0,0 +1,531 @@
+
+GPU functions (gpu)
+===================
+
+*****
+Intro
+*****
+
+Module to provide functions concerning the GPU implementation in Blender, in particular
+the GLSL shaders that blender generates automatically to render materials in the 3D view
+and in the game engine.
+
+.. warning::
+
+ The API provided by this module should be consider unstable. The data exposed by the API
+ are are closely related to Blender's internal GLSL code and may change if the GLSL code
+ is modified (e.g. new uniform type).
+
+.. module:: gpu
+
+*********
+Constants
+*********
+
+--------------
+GLSL data type
+--------------
+
+.. _data-type:
+
+Type of GLSL data.
+For shader uniforms, the data type determines which glUniform function
+variant to use to send the uniform value to the GPU.
+For vertex attributes, the data type determines which glVertexAttrib function
+variant to use to send the vertex attribute to the GPU.
+
+See export_shader_
+
+.. data:: GPU_DATA_1I
+
+ one integer
+
+ :value: 1
+
+.. data:: GPU_DATA_1F
+
+ one float
+
+ :value: 2
+
+.. data:: GPU_DATA_2F
+
+ two floats
+
+ :value: 3
+
+.. data:: GPU_DATA_3F
+
+ three floats
+
+ :value: 4
+
+.. data:: GPU_DATA_4F
+
+ four floats
+
+ :value: 5
+
+.. data:: GPU_DATA_9F
+
+ matrix 3x3 in column-major order
+
+ :value: 6
+
+.. data:: GPU_DATA_16F
+
+ matrix 4x4 in column-major order
+
+ :value: 7
+
+.. data:: GPU_DATA_4UB
+
+ four unsigned byte
+
+ :value: 8
+
+-----------------
+GLSL uniform type
+-----------------
+
+.. _uniform-type:
+
+Constants that specify the type of uniform used in a GLSL shader.
+The uniform type determines the data type, origin and method
+of calculation used by Blender to compute the uniform value.
+
+The calculation of some of the uniforms is based on matrices available in the scene:
+
+ .. _mat4_cam_to_world:
+ .. _mat4_world_to_cam:
+
+ *mat4_cam_to_world*
+ Model matrix of the camera. OpenGL 4x4 matrix that converts
+ camera local coordinates to world coordinates. In blender this is obtained from the
+ 'matrix_world' attribute of the camera object.
+
+ Some uniform will need the *mat4_world_to_cam*
+ matrix computed as the inverse of this matrix.
+
+ .. _mat4_object_to_world:
+ .. _mat4_world_to_object:
+
+ *mat4_object_to_world*
+ Model matrix of the object that is being rendered. OpenGL 4x4 matric that converts
+ object local coordinates to world coordinates. In blender this is obtained from the
+ 'matrix_world' attribute of the object.
+
+ Some uniform will need the *mat4_world_to_object* matrix, computed as the inverse of this matrix.
+
+ .. _mat4_lamp_to_world:
+ .. _mat4_world_to_lamp:
+
+ *mat4_lamp_to_world*
+ Model matrix of the lamp lighting the object. OpenGL 4x4 matrix that converts lamp
+ local coordinates to world coordinates. In blender this is obtained from the
+ 'matrix_world' attribute of the lamp object.
+
+ Some uniform will need the *mat4_world_to_lamp* matrix
+ computed as the inverse of this matrix.
+
+.. data:: GPU_DYNAMIC_OBJECT_VIEWMAT
+
+ The uniform is a 4x4 GL matrix that converts world coordinates to
+ camera coordinates (see mat4_world_to_cam_). Can be set once per frame.
+ There is at most one uniform of that type per shader.
+
+ :value: 1
+
+.. data:: GPU_DYNAMIC_OBJECT_MAT
+
+ The uniform is a 4x4 GL matrix that converts object coordinates
+ to world coordinates (see mat4_object_to_world_). Must be set before drawing the object.
+ There is at most one uniform of that type per shader.
+
+ :value: 2
+
+.. data:: GPU_DYNAMIC_OBJECT_VIEWIMAT
+
+ The uniform is a 4x4 GL matrix that converts coordinates
+ in camera space to world coordinates (see mat4_cam_to_world_).
+ Can be set once per frame.
+ There is at most one uniform of that type per shader.
+
+ :value: 3
+
+.. data:: GPU_DYNAMIC_OBJECT_IMAT
+
+ The uniform is a 4x4 GL matrix that converts world coodinates
+ to object coordinates (see mat4_world_to_object_).
+ Must be set before drawing the object.
+ There is at most one uniform of that type per shader.
+
+ :value: 4
+
+.. data:: GPU_DYNAMIC_OBJECT_COLOR
+
+ The uniform is a vector of 4 float representing a RGB color + alpha defined at object level.
+ Each values between 0.0 and 1.0. In blender it corresponds to the 'color' attribute of the object.
+ Must be set before drawing the object.
+ There is at most one uniform of that type per shader.
+
+ :value: 5
+
+.. data:: GPU_DYNAMIC_LAMP_DYNVEC
+
+ The uniform is a vector of 3 float representing the direction of light in camera space.
+ In Blender, this is computed by
+
+ mat4_world_to_cam_ * (-vec3_lamp_Z_axis)
+
+ as the lamp Z axis points to the opposite direction of light.
+ The norm of the vector should be unity. Can be set once per frame.
+ There is one uniform of that type per lamp lighting the material.
+
+ :value: 6
+
+.. data:: GPU_DYNAMIC_LAMP_DYNCO
+
+ The uniform is a vector of 3 float representing the position of the light in camera space.
+ Computed as
+
+ mat4_world_to_cam_ * vec3_lamp_pos
+
+ Can be set once per frame.
+ There is one uniform of that type per lamp lighting the material.
+
+ :value: 7
+
+.. data:: GPU_DYNAMIC_LAMP_DYNIMAT
+
+ The uniform is a 4x4 GL matrix that converts vector in camera space to lamp space.
+ Computed as
+
+ mat4_world_to_lamp_ * mat4_cam_to_world_
+
+ Can be set once per frame.
+ There is one uniform of that type per lamp lighting the material.
+
+ :value: 8
+
+.. data:: GPU_DYNAMIC_LAMP_DYNPERSMAT
+
+ The uniform is a 4x4 GL matrix that converts a vector in camera space to shadow buffer depth space.
+ Computed as
+
+ mat4_perspective_to_depth_ * mat4_lamp_to_perspective_ * mat4_world_to_lamp_ * mat4_cam_to_world_.
+
+ .. _mat4_perspective_to_depth:
+
+ *mat4_perspective_to_depth* is a fixed matrix defined as follow::
+
+ 0.5 0.0 0.0 0.5
+ 0.0 0.5 0.0 0.5
+ 0.0 0.0 0.5 0.5
+ 0.0 0.0 0.0 1.0
+
+ This uniform can be set once per frame. There is one uniform of that type per lamp casting shadow in the scene.
+
+ :value: 9
+
+.. data:: GPU_DYNAMIC_LAMP_DYNENERGY
+
+ The uniform is a single float representing the lamp energy. In blender it corresponds
+ to the 'energy' attribute of the lamp data block.
+ There is one uniform of that type per lamp lighting the material.
+
+ :value: 10
+
+.. data:: GPU_DYNAMIC_LAMP_DYNCOL
+
+ The uniform is a vector of 3 float representing the lamp color.
+ Color elements are between 0.0 and 1.0. In blender it corresponds
+ to the 'color' attribute of the lamp data block.
+ There is one uniform of that type per lamp lighting the material.
+
+ :value: 11
+
+.. data:: GPU_DYNAMIC_SAMPLER_2DBUFFER
+
+ The uniform is an integer representing an internal texture used for certain effect
+ (color band, etc).
+
+ :value: 12
+
+.. data:: GPU_DYNAMIC_SAMPLER_2DIMAGE
+
+ The uniform is an integer representing a texture loaded from an image file.
+
+ :value: 13
+
+.. data:: GPU_DYNAMIC_SAMPLER_2DSHADOW
+
+ The uniform is an integer representing a shadow buffer corresponding to a lamp
+ casting shadow.
+
+ :value: 14
+
+-------------------
+GLSL attribute type
+-------------------
+
+.. _attribute-type:
+
+Type of the vertex attribute used in the GLSL shader. Determines the mesh custom data
+layer that contains the vertex attribute.
+
+.. data:: CD_MTFACE
+
+ Vertex attribute is a UV layer. Data type is vector of 2 float.
+
+ There can be more than one attribute of that type, they are differenciated by name.
+ In blender, you can retrieve the attribute data with:
+
+ .. code-block:: python
+
+ mesh.uv_textures[attribute['name']]
+
+ :value: 5
+
+.. data:: CD_MCOL
+
+ Vertex attribute is color layer. Data type is vector 4 unsigned byte (RGBA).
+
+ There can be more than one attribute of that type, they are differenciated by name.
+ In blender you can retrieve the attribute data with:
+
+ .. code-block:: python
+
+ mesh.vertex_colors[attribute['name']]
+
+ :value: 6
+
+.. data:: CD_ORCO
+
+ Vertex attribute is original coordinates. Data type is vector 3 float.
+
+ There can be only 1 attribute of that type per shader.
+ In blender you can retrieve the attribute data with:
+
+ .. code-block:: python
+
+ mesh.vertices
+
+ :value: 14
+
+.. data:: CD_TANGENT
+
+ Vertex attribute is the tangent vector. Data type is vector 4 float.
+
+ There can be only 1 attribute of that type per shader.
+ There is currently no way to retrieve this attribute data via the RNA API but a standalone
+ C function to compute the tangent layer from the other layers can be obtained from
+ blender.org.
+
+ :value: 18
+
+*********
+Functions
+*********
+
+.. _export_shader:
+
+.. function:: export_shader(scene,material)
+
+ Extracts the GLSL shader producing the visual effect of material in scene for the purpose of
+ reusing the shader in an external engine. This function is meant to be used in material exporter
+ so that the GLSL shader can be exported entirely. The return value is a dictionary containing the
+ shader source code and all associated data.
+
+ :arg scene: the scene in which the material in rendered.
+ :type scene: :class:`bpy.types.Scene`
+ :arg material: the material that you want to export the GLSL shader
+ :type material: :class:`bpy.types.Material`
+ :return: the shader source code and all associated data in a dictionary
+ :rtype: dictionary
+
+ The dictionary contains the following elements:
+
+ * ['fragment'] : string
+ fragment shader source code.
+
+ * ['vertex'] : string
+ vertex shader source code.
+
+ * ['uniforms'] : sequence
+ list of uniforms used in fragment shader, can be empty list. Each element of the
+ sequence is a dictionary with the following elements:
+
+ * ['varname'] : string
+ name of the uniform in the fragment shader. Always of the form 'unf<number>'.
+
+ * ['datatype'] : integer
+ data type of the uniform variable. Can be one of the following:
+
+ * :data:`gpu.GPU_DATA_1I` : use glUniform1i
+ * :data:`gpu.GPU_DATA_1F` : use glUniform1fv
+ * :data:`gpu.GPU_DATA_2F` : use glUniform2fv
+ * :data:`gpu.GPU_DATA_3F` : use glUniform3fv
+ * :data:`gpu.GPU_DATA_4F` : use glUniform4fv
+ * :data:`gpu.GPU_DATA_9F` : use glUniformMatrix3fv
+ * :data:`gpu.GPU_DATA_16F` : use glUniformMatrix4fv
+
+ * ['type'] : integer
+ type of uniform, determines the origin and method of calculation. See uniform-type_.
+ Depending on the type, more elements will be be present.
+
+ * ['lamp'] : :class:`bpy.types.Object`
+ Reference to the lamp object from which the uniforms value are extracted. Set for the following uniforms types:
+
+ .. hlist::
+ :columns: 3
+
+ * :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`
+ * :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`
+ * :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT`
+ * :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
+ * :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY`
+ * :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL`
+ * :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`
+
+ Notes:
+
+ * The uniforms :data:`gpu.GPU_DYNAMIC_LAMP_DYNVEC`, :data:`gpu.GPU_DYNAMIC_LAMP_DYNCO`, :data:`gpu.GPU_DYNAMIC_LAMP_DYNIMAT` and :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT`
+ refer to the lamp object position and orientation, both of can be derived from the object world matrix:
+
+ .. code-block:: python
+
+ obmat = uniform['lamp'].matrix_world
+
+ where obmat is the mat4_lamp_to_world_ matrix of the lamp as a 2 dimensional array,
+ the lamp world location location is in obmat[3].
+
+ * The uniform types :data:`gpu.GPU_DYNAMIC_LAMP_DYNENERGY` and :data:`gpu.GPU_DYNAMIC_LAMP_DYNCOL` refer to the lamp data bloc that you get from:
+
+ .. code-block:: python
+
+ la = uniform['lamp'].data
+
+ from which you get la.energy and la.color
+
+ * Lamp duplication is not supported: if you have duplicated lamps in your scene
+ (i.e. lamp that are instantiated by dupligroup, etc), this element will only
+ give you a reference to the orignal lamp and you will not know which instance
+ of the lamp it is refering too. You can still handle that case in the exporter
+ by distributing the uniforms amongst the duplicated lamps.
+
+ * ['image'] : :class:`bpy.types.Image`
+ Reference to the image databloc. Set for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE`. You can get the image data from:
+
+ .. code-block:: python
+
+ # full path to image file
+ uniform['image'].filepath
+ # image size as a 2-dimensional array of int
+ uniform['image'].size
+
+ * ['texnumber'] : integer
+ Channel number to which the texture is bound when drawing the object.
+ Set for uniform types :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`, :data:`gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE` and :data:`gpu.GPU_DYNAMIC_SAMPLER_2DSHADOW`.
+
+ This is provided for information only: when reusing the shader outside blencer,
+ you are free to assign the textures to the channel of your choice and to pass
+ that number channel to the GPU in the uniform.
+
+ * ['texpixels'] : byte array
+ texture data for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`. Although
+ the corresponding uniform is a 2D sampler, the texture is always a 1D texture
+ of n x 1 pixel. The texture size n is provided in ['texsize'] element.
+ These texture are only used for computer generated texture (colorband, etc).
+ The texture data is provided so that you can make a real image out of it in the
+ exporter.
+
+ * ['texsize'] : integer
+ horizontal size of texture for uniform type :data:`gpu.GPU_DYNAMIC_SAMPLER_2DBUFFER`.
+ The texture data is in ['texpixels'].
+
+ * ['attributes'] : sequence
+ list of attributes used in vertex shader, can be empty. Blender doesn't use
+ standard attributes except for vertex position and normal. All other vertex
+ attributes must be passed using the generic glVertexAttrib functions.
+ The attribute data can be found in the derived mesh custom data using RNA.
+ Each element of the sequence is a dictionary containing the following elements:
+
+ * ['varname'] : string
+ name of the uniform in the vertex shader. Always of the form 'att<number>'.
+
+ * ['datatype'] : integer
+ data type of vertex attribute, can be one of the following:
+
+ * :data:`gpu.GPU_DATA_2F` : use glVertexAttrib2fv
+ * :data:`gpu.GPU_DATA_3F` : use glVertexAttrib3fv
+ * :data:`gpu.GPU_DATA_4F` : use glVertexAttrib4fv
+ * :data:`gpu.GPU_DATA_4UB` : use glVertexAttrib4ubv
+
+ * ['number'] : integer
+ generic attribute number. This is provided for information only. Blender
+ doesn't use glBindAttribLocation to place generic attributes at specific location,
+ it lets the shader compiler place the attributes automatically and query the
+ placement with glGetAttribLocation. The result of this placement is returned in
+ this element.
+
+ When using this shader in a render engine, you should either use
+ glBindAttribLocation to force the attribute at this location or use
+ glGetAttribLocation to get the placement chosen by the compiler of your GPU.
+
+ * ['type'] : integer
+ type of the mesh custom data from which the vertex attribute is loaded.
+ See attribute-type_.
+
+ * ['name'] : string or integer
+ custom data layer name, used for attribute type :data:`gpu.CD_MTFACE` and :data:`gpu.CD_MCOL`.
+
+ Example:
+
+ .. code-block:: python
+
+ import gpu
+ # get GLSL shader of material Mat.001 in scene Scene.001
+ scene = bpy.data.scenes['Scene.001']
+ material = bpy.data.materials['Mat.001']
+ shader = gpu.export_shader(scene,material)
+ # scan the uniform list and find the images used in the shader
+ for uniform in shader['uniforms']:
+ if uniform['type'] == gpu.GPU_DYNAMIC_SAMPLER_2DIMAGE:
+ print("uniform {0} is using image {1}".format(uniform['varname'], uniform['image'].filepath))
+ # scan the attribute list and find the UV layer used in the shader
+ for attribute in shader['attributes']:
+ if attribute['type'] == gpu.CD_MTFACE:
+ print("attribute {0} is using UV layer {1}".format(attribute['varname'], attribute['name']))
+
+*****
+Notes
+*****
+
+.. _mat4_lamp_to_perspective:
+
+1. Calculation of the *mat4_lamp_to_perspective* matrix for a spot lamp.
+
+ The following pseudo code shows how the *mat4_lamp_to_perspective* matrix is computed
+ in blender for uniforms of :data:`gpu.GPU_DYNAMIC_LAMP_DYNPERSMAT` type::
+
+ #Get the lamp datablock with:
+ lamp=bpy.data.objects[uniform['lamp']].data
+
+ #Compute the projection matrix:
+ # You will need these lamp attributes:
+ # lamp.clipsta : near clip plane in world unit
+ # lamp.clipend : far clip plane in world unit
+ # lamp.spotsize : angle in degree of the spot light
+
+ #The size of the projection plane is computed with the usual formula:
+ wsize = lamp.clista * tan(lamp.spotsize/2)
+
+ #And the projection matrix:
+ mat4_lamp_to_perspective = glFrustum(-wsize,wsize,-wsize,wsize,lamp.clista,lamp.clipend)
+
+2. Creation of the shadow map for a spot lamp.
+
+ The shadow map is the depth buffer of a render performed by placing the camera at the
+ spot light position. The size of the shadow map is given by the attribute lamp.bufsize :
+ shadow map size in pixel, same size in both dimensions.
diff --git a/doc/python_api/rst/info_best_practice.rst b/doc/python_api/rst/info_best_practice.rst
new file mode 100644
index 00000000000..2fbc636613c
--- /dev/null
+++ b/doc/python_api/rst/info_best_practice.rst
@@ -0,0 +1,65 @@
+*************
+Best Practice
+*************
+
+
+TODO: Intro text
+
+
+Style Conventions
+=================
+
+For Blender 2.5 we have chosen to follow python suggested style guide to avoid mixing styles amongst our own scripts and make it easier to use python scripts from other projects.
+
+Using our style guide for your own scripts makes it easier if you eventually want to contribute them to blender.
+
+This style guide is known as pep8 and can be found `here <http://www.python.org/dev/peps/pep-0008>`_
+
+A brief listing of pep8 criteria.
+
+* camel caps for class names: MyClass
+
+* all lower case underscore separated module names: my_module
+
+* indentation of 4 spaces (no tabs)
+
+* spaces around operators. ``1 + 1``, not ``1+1``
+
+* only use explicit imports, (no importing '*')
+
+* don't use single line: ``if val: body``, separate onto 2 lines instead.
+
+
+As well as pep8 we have other conventions used for blender python scripts.
+
+* Use single quotes for enums, and double quotes for strings.
+
+ Both are of course strings but in our internal API enums are unique items from a limited set. eg.
+
+ .. code-block:: python
+
+ bpy.context.scene.render.file_format = 'PNG'
+ bpy.context.scene.render.filepath = "//render_out"
+
+* pep8 also defines that lines should not exceed 79 characters, we felt this is too restrictive so this is optional per script.
+
+Periodically we run checks for pep8 compliance on blender scripts, for scripts to be included in this check add this line as a comment at the top of the script.
+
+``# <pep8 compliant>``
+
+To enable line length checks use this instead.
+
+``# <pep8-80 compliant>``
+
+
+User Interface Layout
+=====================
+
+TODO: Thomas
+
+
+Script Efficiency
+=================
+
+TODO: Campbell
+
diff --git a/doc/python_api/rst/info_gotcha.rst b/doc/python_api/rst/info_gotcha.rst
index c97fc3ab427..e7903dcf96a 100644
--- a/doc/python_api/rst/info_gotcha.rst
+++ b/doc/python_api/rst/info_gotcha.rst
@@ -1,6 +1,6 @@
-********
-Gotcha's
-********
+*******
+Gotchas
+*******
This document attempts to help you work with the Blender API in areas that can be troublesome and avoid practices that are known to give instability.
@@ -32,12 +32,12 @@ Which raises the question as to what the correct context might be?
Typically operators check for the active area type, a selection or active object they can operate on, but some operators are more picky about when they run.
-In most cases you can figure out what context an operator needs simply be seeing how its used in Blender and thinking about what it does.
+In most cases you can figure out what context an operator needs simply be seeing how it's used in Blender and thinking about what it does.
Unfortunately if you're still stuck - the only way to **really** know whats going on is to read the source code for the poll function and see what its checking.
-For python operators its not so hard to find the source since its included with with Blender and the source file/line is included in the operator reference docs.
+For python operators it's not so hard to find the source since it's included with Blender and the source file/line is included in the operator reference docs.
Downloading and searching the C code isn't so simple, especially if you're not familiar with the C language but by searching the operator name or description you should be able to find the poll function with no knowledge of C.
@@ -74,7 +74,7 @@ Sometimes you want to modify values from python and immediately access the updat
Once changing the objects :class:`bpy.types.Object.location` you may want to access its transformation right after from :class:`bpy.types.Object.matrix_world`, but this doesn't work as you might expect.
-Consider the calculations that might go into working out the objects final transformation, this includes:
+Consider the calculations that might go into working out the object's final transformation, this includes:
* animation function curves.
* drivers and their pythons expressions.
@@ -106,7 +106,7 @@ Modal operators execute on user input or setup their own timers to run frequentl
Transform, Painting, Fly-Mode and File-Select are example of a modal operators.
-Writing modal operators takes more effort then a simple ``for`` loop that happens to redraw but is more flexible and integrates better with Blenders design.
+Writing modal operators takes more effort than a simple ``for`` loop that happens to redraw but is more flexible and integrates better with Blenders design.
**Ok, Ok! I still want to draw from python**
@@ -129,7 +129,7 @@ This is different to **numpy** which is row-major which matches what you would e
I can't edit the mesh in edit-mode!
===================================
-Blenders EditMesh is an internal data structure (not saved and not exposed to python), this gives the main annoyance that you need to exit edit-mode to edit the mesh from python.
+Blender's EditMesh is an internal data structure (not saved and not exposed to python), this gives the main annoyance that you need to exit edit-mode to edit the mesh from python.
The reason we have not made much attempt to fix this yet is because we
will likely move to BMesh mesh API eventually, so any work on the API now will be wasted effort.
@@ -226,13 +226,13 @@ This is mainly an issue with editmode since pose data can be manipulated without
Unicode Problems
================
-Python supports many different encpdings so there is nothing stopping you from writing a script in latin1 or iso-8859-15.
+Python supports many different encodings so there is nothing stopping you from writing a script in latin1 or iso-8859-15.
See `pep-0263 <http://www.python.org/dev/peps/pep-0263/>`_
-However this complicates things for the python api because blend files themselves dont have an encoding.
+However this complicates things for the python api because blend files themselves don't have an encoding.
-To simplify the problem for python integration and script authors we have decieded all strings in blend files **must** be UTF-8 or ASCII compatible.
+To simplify the problem for python integration and script authors we have decided all strings in blend files **must** be UTF-8 or ASCII compatible.
This means assigning strings with different encodings to an object names for instance will raise an error.
@@ -331,13 +331,13 @@ This an example of a timer which runs many times a second and moves the default
my_timer()
-Use cases like the one above which leave the thread running once the script finishes may seem to work for a while but end up causing random crashes or errors in Blenders own drawing code.
+Use cases like the one above which leave the thread running once the script finishes may seem to work for a while but end up causing random crashes or errors in Blender's own drawing code.
-So far no work has gone into making Blenders python integration thread safe, so until its properly supported, best not make use of this.
+So far, no work has gone into making Blender's python integration thread safe, so until its properly supported, best not make use of this.
.. note::
- Pythons threads only allow co-currency and wont speed up you're scripts on multi-processor systems, the ``subprocess`` and ``multiprocess`` modules can be used with blender and make use of multiple CPU's too.
+ Pythons threads only allow co-currency and won't speed up your scripts on multi-processor systems, the ``subprocess`` and ``multiprocess`` modules can be used with blender and make use of multiple CPU's too.
Help! My script crashes Blender
@@ -378,6 +378,41 @@ This example shows how you can tell undo changes the memory locations.
As suggested above, simply not holding references to data when Blender is used interactively by the user is the only way to ensure the script doesn't become unstable.
+Edit Mode / Memory Access
+-------------------------
+
+Switching edit-mode ``bpy.ops.object.mode_set(mode='EDIT')`` / ``bpy.ops.object.mode_set(mode='OBJECT')`` will re-allocate objects data, any references to a meshes vertices/faces/uvs, armatures bones, curves points etc cannot be accessed after switching edit-mode.
+
+Only the reference to the data its self can be re-accessed, the following example will crash.
+
+.. code-block:: python
+
+ mesh = bpy.context.active_object.data
+ faces = mesh.faces
+ bpy.ops.object.mode_set(mode='EDIT')
+ bpy.ops.object.mode_set(mode='OBJECT')
+
+ # this will crash
+ print(faces)
+
+
+So after switching edit-mode you need to re-access any object data variables, the following example shows how to avoid the crash above.
+
+.. code-block:: python
+
+ mesh = bpy.context.active_object.data
+ faces = mesh.faces
+ bpy.ops.object.mode_set(mode='EDIT')
+ bpy.ops.object.mode_set(mode='OBJECT')
+
+ # faces have been re-allocated
+ faces = mesh.faces
+ print(faces)
+
+
+These kinds of problems can happen for any functions which re-allocate the object data but are most common when switching edit-mode.
+
+
Array Re-Allocation
-------------------
diff --git a/doc/python_api/rst/info_quickstart.rst b/doc/python_api/rst/info_quickstart.rst
index e77e9a76d7f..e7f2900b212 100644
--- a/doc/python_api/rst/info_quickstart.rst
+++ b/doc/python_api/rst/info_quickstart.rst
@@ -156,7 +156,7 @@ Note that these properties can only be assigned basic Python types.
* array of ints/floats
-* dictionary (only string keys types on this list)
+* dictionary (only string keys are supported, values must be basic types too)
These properties are valid outside of Python. They can be animated by curves or used in driver paths.
@@ -420,49 +420,3 @@ Using Low-Level Functions:
fcu_z.keyframe_points[0].co = 10.0, 0.0
fcu_z.keyframe_points[1].co = 20.0, 1.0
-
-Style Conventions
-=================
-
-For Blender 2.5 we have chosen to follow python suggested style guide to avoid mixing styles amongst our own scripts and make it easier to use python scripts from other projects.
-
-Using our style guide for your own scripts makes it easier if you eventually want to contribute them to blender.
-
-This style guide is known as pep8 and can be found `here <http://www.python.org/dev/peps/pep-0008>`_
-
-A brief listing of pep8 criteria.
-
-* camel caps for class names: MyClass
-
-* all lower case underscore separated module names: my_module
-
-* indentation of 4 spaces (no tabs)
-
-* spaces around operators. ``1 + 1``, not ``1+1``
-
-* only use explicit imports, (no importing '*')
-
-* don't use single line: ``if val: body``, separate onto 2 lines instead.
-
-
-As well as pep8 we have other conventions used for blender python scripts.
-
-* Use single quotes for enums, and double quotes for strings.
-
- Both are of course strings but in our internal API enums are unique items from a limited set. eg.
-
- .. code-block:: python
-
- bpy.context.scene.render.file_format = 'PNG'
- bpy.context.scene.render.filepath = "//render_out"
-
-* pep8 also defines that lines should not exceed 79 characters, we felt this is too restrictive so this is optional per script.
-
-Periodically we run checks for pep8 compliance on blender scripts, for scripts to be included in this check add this line as a comment at the top of the script.
-
-``# <pep8 compliant>``
-
-To enable line length checks use this instead.
-
-``# <pep8-80 compliant>``
-
diff --git a/doc/python_api/rst/info_tips_and_tricks.rst b/doc/python_api/rst/info_tips_and_tricks.rst
index bd5faf000c8..f88be5de3a8 100644
--- a/doc/python_api/rst/info_tips_and_tricks.rst
+++ b/doc/python_api/rst/info_tips_and_tricks.rst
@@ -1,57 +1,235 @@
-###############
+***************
Tips and Tricks
-###############
+***************
-Some of these are just python features that scripters may not have thaught to use with blender.
+Here are various suggestions that you might find useful when writing scripts.
+
+Some of these are just python features that scripters may not have thought to use with blender, others are blender specific.
-****************
Use The Terminal
-****************
+================
+
+When writing python scripts, it's useful to have a terminal open, this is not the built-in python console but a terminal application which is used to start blender.
+
+There are 3 main uses for the terminal, these are:
+
+* You can see the output of ``print()`` as you're script runs, which is useful to view debug info.
+
+* The error trace-back is printed in full to the terminal which won't always generate an error popup in blender's user interface (depending on how the script is executed).
+
+* If the script runs for too long or you accidentally enter an infinite loop, Ctrl+C in the terminal (Ctrl+Break on Windows) will quit the script early.
+
+.. note::
+ For Linux and OSX users this means starting the terminal first, then running blender from within it. On Windows the terminal can be enabled from the help menu.
+
+
+Show All Operators
+==================
+
+While blender logs operators in the Info space, this only reports operators with the ``REGISTER`` option enabeld so as not to flood the Info view with calls to ``bpy.ops.view3d.smoothview`` and ``bpy.ops.view3d.zoom``.
+
+However, for testing it can be useful to see **every** operator called in a terminal, do this by enabling the debug option either by passing the ``--debug`` argument when starting blender or by setting :mod:`bpy.app.debug` to True while blender is running.
+
+
+Use an External Editor
+======================
+
+Blenders text editor is fine for small changes and writing tests but its not full featured, for larger projects you'll probably want to use a standalone editor or python IDE.
+
+Editing a text file externally and having the same text open in blender does work but isn't that optimal so here are 2 ways you can easily use an external file from blender.
+
+Using the following examples you'll still need textblock in blender to execute, but reference an external file rather then including it directly.
+
+Executing External Scripts
+--------------------------
+
+This is the equivalent to running the script directly, referencing a scripts path from a 2 line textblock.
+
+.. code-block:: python
+
+ filename = "/full/path/to/myscript.py"
+ exec(compile(open(filename).read(), filename, 'exec'))
+
+
+You might want to reference a script relative to the blend file.
+
+.. code-block:: python
-For Linux and OSX users this means starting the terminal first, then running blender from within it. on Windows the terminal can be enabled from the help menu.
+ import bpy
+ import os
-********************
-Run External Scripts
-********************
+ filename = os.path.join(os.path.basename(bpy.data.filepath), "myscript.py")
+ exec(compile(open(filename).read(), filename, 'exec'))
+
+
+Executing Modules
+-----------------
+
+This example shows loading a script in as a module and executing a module function.
+
+.. code-block:: python
+
+ import myscript
+ import imp
+
+ imp.reload(myscript)
+ myscript.main()
+
+
+Notice that the script is reloaded every time, this forces use of the modified version, otherwise the cached one in ``sys.modules`` would be used until blender was restarted.
+
+The important difference between this and executing the script directly is it has to call a function in the module, in this case ``main()`` but it can be any function, an advantage with this is you can pass arguments to the function from this small script which is often useful for testing different settings quickly.
+
+The other issue with this is the script has to be in pythons module search path.
+While this is not best practice - for testing you can extend the search path, this example adds the current blend files directory to the search path, then loads the script as a module.
+
+.. code-block:: python
+
+ import sys
+ import os
+ import bpy
+
+ blend_dir = os.path.basename(bpy.data.filepath)
+ if blend_dir not in sys.path:
+ sys.path.append(blend_dir)
+
+ import myscript
+ import imp
+ imp.reload(myscript)
+ myscript.main()
-******************
Don't Use Blender!
-******************
+==================
+
+While developing your own scripts blenders interface can get in the way, manually reloading, running the scripts, opening file import etc. adds overhead.
+
+For scripts that are not interactive it can end up being more efficient not to use blenders interface at all and instead execute the script on the command line.
+
+.. code-block:: python
+
+ blender --background --python myscript.py
+
+
+You might want to run this with a blend file so the script has some data to operate on.
+
+.. code-block:: python
+
+ blender myscene.blend --background --python myscript.py
+
+
+.. note::
+
+ Depending on your setup you might have to enter the full path to the blender executable.
+
+
+Once the script is running properly in background mode, you'll want to check the output of the script, this depends completely on the task at hand however here are some suggestions.
+
+* render the output to an image, use an image viewer and keep writing over the same image each time.
+
+* save a new blend file, or export the file using one of blenders exporters.
+
+* if the results can be displayed as text - print them or write them to a file.
+
+
+This can take a little time to setup, but it can be well worth the effort to reduce the time it takes to test changes - you can even have blender running the script ever few seconds with a viewer updating the results, so no need to leave you're text editor to see changes.
-******************
Use External Tools
-******************
+==================
+
+When there are no readily available python modules to perform specific tasks it's worth keeping in mind you may be able to have python execute an external command on you're data and read the result back in.
+
+Using external programs adds an extra dependency and may limit who can use the script but to quickly setup you're own custom pipeline or writing one-off scripts this can be handy.
+
+Examples include:
+* Run The Gimp in batch mode to execute custom scripts for advanced image processing.
-**************
-Bundled Python
-**************
+* Write out 3D models to use external mesh manipulation tools and read back in the results.
-Blender from blender.org includes a compleate python installation on all platforms, this has the disadvantage that any extensions you have installed in you're systems python wont be found by blender.
+* Convert files into recognizable formats before reading.
+
+
+Bundled Python & Extensions
+===========================
+
+The Blender releases distributed from blender.org include a complete python installation on all platforms, this has the disadvantage that any extensions you have installed in you're systems python wont be found by blender.
There are 2 ways around this:
-* remove blender python subdirectory, blender will then look for the systems python and use that instead **python version must match the one that blender comes with**.
+* remove blender python sub-directory, blender will then fallback on the systems python and use that instead **python version must match the one that blender comes with**.
+
+* copy the extensions into blender's python sub-directory so blender can access them, you could also copy the entire python installation into blenders sub-directory, replacing the one blender comes with. This works as long as the python versions match and the paths are created in the same relative locations. Doing this has the advantage that you can redistribute this bundle to others with blender and/or the game player, including any extensions you rely on.
+
+
+Drop Into a Python Interpreter in You're Script
+===============================================
+
+In the middle of a script you may want to inspect some variables, run some function and generally dig about to see whats going on.
+
+.. code-block:: python
+
+ import code
+ code.interact(local=locals())
+
+
+If you want to access both global and local variables do this...
+
+.. code-block:: python
+
+ import code
+ namespace = globals().copy()
+ namespace.update(locals())
+ code.interact(local=namespace)
+
+
+The next example is an equivalent single line version of the script above which is easier to paste into you're code:
+
+.. code-block:: python
+
+ __import__('code').interact(local={k: v for ns in (globals(), locals()) for k, v in ns.items()})
+
+
+``code.interact`` can be added at any line in the script and will pause the script an launch an interactive interpreter in the terminal, when you're done you can quit the interpreter and the script will continue execution.
+
+
+Admittedly this highlights the lack of any python debugging support built into blender, but its still handy to know.
+
+.. note::
+
+ This works in the game engine as well, it can be handy to inspect the state of a running game.
-* copy the extensions into blender's python subdirectry so blender can access them, you could also copy the entire python installation into blenders subdirectory, replacing the one blender comes with. This works as long as the python versions match and the paths are created in the same location relative locations. Doing this has the advantage that you can redistribute this bundle to others with blender and/or the game player, including any extensions you rely on.
-********
Advanced
-********
+========
-===================
Blender as a module
-===================
+-------------------
+
+From a python perspective it's nicer to have everything as an extension which lets the python script combine many components.
+
+Advantages include:
+
+* you can use external editors/IDE's with blenders python API and execute scripts within the IDE (step over code, inspect variables as the script runs).
+
+* editors/IDE's can auto complete blender modules & variables.
+
+* existing scripts can import blender API's without having to run inside blender.
+
+
+This is marked advanced because to run blender as a python module requires a special build option.
+
+For instructions on building see `Building blender as a python module <http://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule>`_
-============================
Python Safety (Build Option)
-============================
+----------------------------
+
+Since it's possible to access data which has been removed (see Gotcha's), this can be hard to track down the cause of crashes.
+
+To raise python exceptions on accessing freed data (rather then crashing), enable the CMake build option WITH_PYTHON_SAFETY.
-=================
-CTypes in Blender
-=================
+This enables data tracking which makes data access about 2x slower which is why the option is not enabled in release builds.
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index e378dd19e73..1792cb00210 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -76,7 +76,7 @@ else:
"bpy.props",
"bpy.utils",
"bpy.context",
- "bpy.types", # supports filtering
+ # "bpy.types", # supports filtering
"bpy.ops", # supports filtering
"bpy_extras",
"bge",
@@ -87,7 +87,7 @@ else:
"mathutils.geometry",
)
- FILTER_BPY_TYPES = ("bpy_struct", "Panel", "ID") # allow
+ FILTER_BPY_TYPES = ("bpy_struct", "Operator", "ID") # allow
FILTER_BPY_OPS = ("import.scene", ) # allow
# for quick rebuilds
@@ -103,6 +103,8 @@ sphinx-build doc/python_api/sphinx-in doc/python_api/sphinx-out
INFO_DOCS = (
("info_quickstart.rst", "Blender/Python Quickstart: new to blender/scripting and want to get you're feet wet?"),
("info_overview.rst", "Blender/Python API Overview: a more complete explanation of python integration"),
+ ("info_best_practice.rst", "Best Practice: Conventions to follow for writing good scripts"),
+ ("info_tips_and_tricks.rst", "Tips and Tricks: Hints to help you while writeing scripts for blender"),
("info_gotcha.rst", "Gotcha's: some of the problems you may come up against when writing scripts"),
)
@@ -578,6 +580,7 @@ def pycontext2sphinx(BASEPATH):
"sequences": ("Sequence", True),
"smoke": ("SmokeModifier", False),
"soft_body": ("SoftBodyModifier", False),
+ "speaker": ("Speaker", False),
"texture": ("Texture", False),
"texture_slot": ("MaterialTextureSlot", False),
"vertex_paint_object": ("Object", False),
@@ -618,6 +621,30 @@ def pycontext2sphinx(BASEPATH):
file.close()
+def pyrna_enum2sphinx(prop, use_empty_descriptions=False):
+ """ write a bullet point list of enum + descrptons
+ """
+
+ if use_empty_descriptions:
+ ok = True
+ else:
+ ok = False
+ for identifier, name, description in prop.enum_items:
+ if description:
+ ok = True
+ break
+
+ if ok:
+ return "".join(["* ``%s`` %s.\n" %
+ (identifier,
+ ", ".join(val for val in (name, description) if val),
+ )
+ for identifier, name, description in prop.enum_items
+ ])
+ else:
+ return ""
+
+
def pyrna2sphinx(BASEPATH):
""" bpy.types and bpy.ops
"""
@@ -645,8 +672,22 @@ def pyrna2sphinx(BASEPATH):
kwargs["collection_id"] = _BPY_PROP_COLLECTION_ID
type_descr = prop.get_type_description(**kwargs)
- if prop.name or prop.description:
- fw(ident + ":%s%s: %s\n" % (id_name, identifier, ", ".join(val for val in (prop.name, prop.description) if val)))
+
+ enum_text = pyrna_enum2sphinx(prop)
+
+ if prop.name or prop.description or enum_text:
+ fw(ident + ":%s%s:\n\n" % (id_name, identifier))
+
+ if prop.name or prop.description:
+ fw(ident + " " + ", ".join(val for val in (prop.name, prop.description) if val) + "\n\n")
+
+ # special exception, cant use genric code here for enums
+ if enum_text:
+ write_indented_lines(ident + " ", fw, enum_text)
+ fw("\n")
+ del enum_text
+ # end enum exception
+
fw(ident + ":%s%s: %s\n" % (id_type, identifier, type_descr))
def write_struct(struct):
@@ -724,6 +765,16 @@ def pyrna2sphinx(BASEPATH):
fw(" .. attribute:: %s\n\n" % prop.identifier)
if prop.description:
fw(" %s\n\n" % prop.description)
+
+ # special exception, cant use genric code here for enums
+ if prop.type == "enum":
+ enum_text = pyrna_enum2sphinx(prop)
+ if enum_text:
+ write_indented_lines(" ", fw, enum_text)
+ fw("\n")
+ del enum_text
+ # end enum exception
+
fw(" :type: %s\n\n" % type_descr)
# python attributes
@@ -747,6 +798,7 @@ def pyrna2sphinx(BASEPATH):
elif func.return_values: # multiple return values
fw(" :return (%s):\n" % ", ".join(prop.identifier for prop in func.return_values))
for prop in func.return_values:
+ # TODO, pyrna_enum2sphinx for multiple return values... actually dont think we even use this but still!!!
type_descr = prop.get_type_description(as_ret=True, class_fmt=":class:`%s`", collection_id=_BPY_PROP_COLLECTION_ID)
descr = prop.description
if not descr:
@@ -984,8 +1036,12 @@ def rna2sphinx(BASEPATH):
fw("copyright = u'Blender Foundation'\n")
fw("version = '%s - API'\n" % version_string)
fw("release = '%s - API'\n" % version_string)
- fw("html_theme = 'blender-org'\n")
- fw("html_theme_path = ['../']\n")
+
+ # until we get a theme for 'Naiad'
+ if 0:
+ fw("html_theme = 'blender-org'\n")
+ fw("html_theme_path = ['../']\n")
+
fw("html_favicon = 'favicon.ico'\n")
# not helpful since the source us generated, adds to upload size.
fw("html_copy_source = False\n")
diff --git a/doc/python_api/sphinx_doc_gen.sh b/doc/python_api/sphinx_doc_gen.sh
index ea55fbb3907..307476d9a92 100755
--- a/doc/python_api/sphinx_doc_gen.sh
+++ b/doc/python_api/sphinx_doc_gen.sh
@@ -9,6 +9,10 @@
# disable for testing
DO_UPLOAD=true
+DO_EXE_BLENDER=true
+DO_OUT_HTML=true
+DO_OUT_PDF=true
+
BLENDER="./blender.bin"
SSH_USER="ideasman42"
@@ -36,28 +40,39 @@ fi
SSH_UPLOAD_FULL=$SSH_UPLOAD/"blender_python_api_"$BLENDER_VERSION
-SPHINXBASE=doc/python_api/
+SPHINXBASE=doc/python_api
# ----------------------------------------------------------------------------
# Generate reStructuredText (blender/python only)
-# dont delete existing docs, now partial updates are used for quick builds.
-$BLENDER --background --factory-startup --python $SPHINXBASE/sphinx_doc_gen.py
+if $DO_EXE_BLENDER ; then
+ # dont delete existing docs, now partial updates are used for quick builds.
+ $BLENDER --background --factory-startup --python $SPHINXBASE/sphinx_doc_gen.py
+fi
# ----------------------------------------------------------------------------
# Generate HTML (sphinx)
-sphinx-build -n -b html $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
+if $DO_OUT_HTML ; then
+ # sphinx-build -n -b html $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
+
+ # annoying bug in sphinx makes it very slow unless we do this. should report.
+ cd $SPHINXBASE
+ sphinx-build -n -b html sphinx-in sphinx-out
+ cd -
+fi
# ----------------------------------------------------------------------------
# Generate PDF (sphinx/laytex)
-sphinx-build -n -b latex $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
-make -C $SPHINXBASE/sphinx-out
-mv $SPHINXBASE/sphinx-out/contents.pdf $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf
+if $DO_OUT_PDF ; then
+ sphinx-build -n -b latex $SPHINXBASE/sphinx-in $SPHINXBASE/sphinx-out
+ make -C $SPHINXBASE/sphinx-out
+ mv $SPHINXBASE/sphinx-out/contents.pdf $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf
+fi
# ----------------------------------------------------------------------------
# Upload to blender servers, comment this section for testing
@@ -85,5 +100,5 @@ fi
echo ""
echo "Finished! view the docs from: "
-echo " html:" $SPHINXBASE/sphinx-out/contents.html
-echo " pdf:" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf
+if $DO_OUT_HTML ; then echo " html:" $SPHINXBASE/sphinx-out/contents.html ; fi
+if $DO_OUT_PDF ; then echo " pdf:" $SPHINXBASE/sphinx-out/blender_python_reference_$BLENDER_VERSION.pdf ; fi
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index 3990d132757..0386b3d71d8 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -43,6 +43,10 @@ if(WITH_BUILTIN_GLEW)
add_subdirectory(glew)
endif()
+if(WITH_GAMEENGINE)
+ add_subdirectory(recastnavigation)
+endif()
+
if(WITH_IMAGE_OPENJPEG AND (NOT UNIX OR APPLE))
add_subdirectory(libopenjpeg)
endif()
diff --git a/extern/SConscript b/extern/SConscript
index 061bd1ba6a3..6bb060adeda 100644
--- a/extern/SConscript
+++ b/extern/SConscript
@@ -4,6 +4,9 @@ Import('env')
SConscript(['glew/SConscript'])
+if env['WITH_BF_GAMEENGINE']:
+ SConscript(['recastnavigation/SConscript'])
+
if env['WITH_BF_ELTOPO']:
SConscript(['eltopo/SConscript'])
diff --git a/extern/glew/README.txt b/extern/glew/README.txt
deleted file mode 100644
index 1b19c53523f..00000000000
--- a/extern/glew/README.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-See doc/index.html for more information.
-
-If you downloaded the tarball from the GLEW website, you just need to:
-
- Unix:
-
- make
-
- Windows:
-
- use the project file in build/vc6/
-
-If you wish to build GLEW from scratch (update the extension data from
-the net or add your own extension information), you need a Unix
-environment (including wget, perl, and GNU make). The extension data
-is regenerated from the top level source directory with:
-
- make extensions
diff --git a/extern/glew/include/GL/glew.h b/extern/glew/include/GL/glew.h
index 1775aa784dc..cdf5b70db59 100644
--- a/extern/glew/include/GL/glew.h
+++ b/extern/glew/include/GL/glew.h
@@ -199,9 +199,10 @@ typedef _W64 int ptrdiff_t;
#include <stddef.h>
-/* SGI MIPSPro doesn't like stdint.h in C++ mode */
+/* SGI MIPSPro doesn't like stdint.h in C++ mode */
+/* ID: 3376260 Solaris 9 has inttypes.h, but not stdint.h */
-#if defined(__sgi) && !defined(__GNUC__)
+#if (defined(__sgi) || defined(__sun)) && !defined(__GNUC__)
#include <inttypes.h>
#else
#include <stdint.h>
@@ -1490,8 +1491,8 @@ typedef void (GLAPIENTRY * PFNGLFOGCOORDDPROC) (GLdouble coord);
typedef void (GLAPIENTRY * PFNGLFOGCOORDDVPROC) (const GLdouble *coord);
typedef void (GLAPIENTRY * PFNGLFOGCOORDFPROC) (GLfloat coord);
typedef void (GLAPIENTRY * PFNGLFOGCOORDFVPROC) (const GLfloat *coord);
-typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
-typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
typedef void (GLAPIENTRY * PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
@@ -2408,6 +2409,15 @@ typedef void (GLAPIENTRY * PFNGLMINSAMPLESHADINGPROC) (GLclampf value);
#endif /* GL_VERSION_4_1 */
+/* ----------------------------- GL_VERSION_4_2 ---------------------------- */
+
+#ifndef GL_VERSION_4_2
+#define GL_VERSION_4_2 1
+
+#define GLEW_VERSION_4_2 GLEW_GET_VAR(__GLEW_VERSION_4_2)
+
+#endif /* GL_VERSION_4_2 */
+
/* -------------------------- GL_3DFX_multisample -------------------------- */
#ifndef GL_3DFX_multisample
@@ -2535,6 +2545,21 @@ typedef void (GLAPIENTRY * PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC) (GLuint buf, GL
#endif /* GL_AMD_draw_buffers_blend */
+/* ----------------------- GL_AMD_multi_draw_indirect ---------------------- */
+
+#ifndef GL_AMD_multi_draw_indirect
+#define GL_AMD_multi_draw_indirect 1
+
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC) (GLenum mode, const void* indirect, GLsizei primcount, GLsizei stride);
+typedef void (GLAPIENTRY * PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC) (GLenum mode, GLenum type, const void* indirect, GLsizei primcount, GLsizei stride);
+
+#define glMultiDrawArraysIndirectAMD GLEW_GET_FUN(__glewMultiDrawArraysIndirectAMD)
+#define glMultiDrawElementsIndirectAMD GLEW_GET_FUN(__glewMultiDrawElementsIndirectAMD)
+
+#define GLEW_AMD_multi_draw_indirect GLEW_GET_VAR(__GLEW_AMD_multi_draw_indirect)
+
+#endif /* GL_AMD_multi_draw_indirect */
+
/* ------------------------- GL_AMD_name_gen_delete ------------------------ */
#ifndef GL_AMD_name_gen_delete
@@ -3033,6 +3058,23 @@ typedef void (GLAPIENTRY * PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint*
#endif /* GL_ARB_ES2_compatibility */
+/* -------------------------- GL_ARB_base_instance ------------------------- */
+
+#ifndef GL_ARB_base_instance
+#define GL_ARB_base_instance 1
+
+typedef void (GLAPIENTRY * PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount, GLuint baseinstance);
+typedef void (GLAPIENTRY * PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void* indices, GLsizei primcount, GLint basevertex, GLuint baseinstance);
+
+#define glDrawArraysInstancedBaseInstance GLEW_GET_FUN(__glewDrawArraysInstancedBaseInstance)
+#define glDrawElementsInstancedBaseInstance GLEW_GET_FUN(__glewDrawElementsInstancedBaseInstance)
+#define glDrawElementsInstancedBaseVertexBaseInstance GLEW_GET_FUN(__glewDrawElementsInstancedBaseVertexBaseInstance)
+
+#define GLEW_ARB_base_instance GLEW_GET_VAR(__GLEW_ARB_base_instance)
+
+#endif /* GL_ARB_base_instance */
+
/* ----------------------- GL_ARB_blend_func_extended ---------------------- */
#ifndef GL_ARB_blend_func_extended
@@ -3100,6 +3142,33 @@ typedef void (GLAPIENTRY * PFNGLCLAMPCOLORARBPROC) (GLenum target, GLenum clamp)
#endif /* GL_ARB_compatibility */
+/* ---------------- GL_ARB_compressed_texture_pixel_storage ---------------- */
+
+#ifndef GL_ARB_compressed_texture_pixel_storage
+#define GL_ARB_compressed_texture_pixel_storage 1
+
+#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
+#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
+#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
+#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
+#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
+#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
+#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
+#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
+
+#define GLEW_ARB_compressed_texture_pixel_storage GLEW_GET_VAR(__GLEW_ARB_compressed_texture_pixel_storage)
+
+#endif /* GL_ARB_compressed_texture_pixel_storage */
+
+/* ----------------------- GL_ARB_conservative_depth ----------------------- */
+
+#ifndef GL_ARB_conservative_depth
+#define GL_ARB_conservative_depth 1
+
+#define GLEW_ARB_conservative_depth GLEW_GET_VAR(__GLEW_ARB_conservative_depth)
+
+#endif /* GL_ARB_conservative_depth */
+
/* --------------------------- GL_ARB_copy_buffer -------------------------- */
#ifndef GL_ARB_copy_buffer
@@ -3862,6 +3931,32 @@ typedef void (GLAPIENTRY * PFNGLVERTEXATTRIBDIVISORARBPROC) (GLuint index, GLuin
#endif /* GL_ARB_instanced_arrays */
+/* ---------------------- GL_ARB_internalformat_query ---------------------- */
+
+#ifndef GL_ARB_internalformat_query
+#define GL_ARB_internalformat_query 1
+
+#define GL_NUM_SAMPLE_COUNTS 0x9380
+
+typedef void (GLAPIENTRY * PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params);
+
+#define glGetInternalformativ GLEW_GET_FUN(__glewGetInternalformativ)
+
+#define GLEW_ARB_internalformat_query GLEW_GET_VAR(__GLEW_ARB_internalformat_query)
+
+#endif /* GL_ARB_internalformat_query */
+
+/* ---------------------- GL_ARB_map_buffer_alignment ---------------------- */
+
+#ifndef GL_ARB_map_buffer_alignment
+#define GL_ARB_map_buffer_alignment 1
+
+#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
+
+#define GLEW_ARB_map_buffer_alignment GLEW_GET_VAR(__GLEW_ARB_map_buffer_alignment)
+
+#endif /* GL_ARB_map_buffer_alignment */
+
/* ------------------------ GL_ARB_map_buffer_range ------------------------ */
#ifndef GL_ARB_map_buffer_range
@@ -4175,6 +4270,7 @@ typedef void (GLAPIENTRY * PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
+typedef GLenum (GLAPIENTRY * PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
typedef void (GLAPIENTRY * PFNGLGETNCOLORTABLEARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* table);
typedef void (GLAPIENTRY * PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, void* img);
typedef void (GLAPIENTRY * PFNGLGETNCONVOLUTIONFILTERARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, void* image);
@@ -4195,6 +4291,7 @@ typedef void (GLAPIENTRY * PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint loc
typedef void (GLAPIENTRY * PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint* params);
typedef void (GLAPIENTRY * PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void* data);
+#define glGetGraphicsResetStatusARB GLEW_GET_FUN(__glewGetGraphicsResetStatusARB)
#define glGetnColorTableARB GLEW_GET_FUN(__glewGetnColorTableARB)
#define glGetnCompressedTexImageARB GLEW_GET_FUN(__glewGetnCompressedTexImageARB)
#define glGetnConvolutionFilterARB GLEW_GET_FUN(__glewGetnConvolutionFilterARB)
@@ -4428,6 +4525,49 @@ typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
#endif /* GL_ARB_separate_shader_objects */
+/* --------------------- GL_ARB_shader_atomic_counters --------------------- */
+
+#ifndef GL_ARB_shader_atomic_counters
+#define GL_ARB_shader_atomic_counters 1
+
+#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
+#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
+#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
+#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
+#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
+#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
+#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
+#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
+#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
+#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
+#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
+#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
+
+typedef void (GLAPIENTRY * PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint* params);
+
+#define glGetActiveAtomicCounterBufferiv GLEW_GET_FUN(__glewGetActiveAtomicCounterBufferiv)
+
+#define GLEW_ARB_shader_atomic_counters GLEW_GET_VAR(__GLEW_ARB_shader_atomic_counters)
+
+#endif /* GL_ARB_shader_atomic_counters */
+
/* ----------------------- GL_ARB_shader_bit_encoding ---------------------- */
#ifndef GL_ARB_shader_bit_encoding
@@ -4437,6 +4577,86 @@ typedef void (GLAPIENTRY * PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
#endif /* GL_ARB_shader_bit_encoding */
+/* --------------------- GL_ARB_shader_image_load_store -------------------- */
+
+#ifndef GL_ARB_shader_image_load_store
+#define GL_ARB_shader_image_load_store 1
+
+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
+#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
+#define GL_UNIFORM_BARRIER_BIT 0x00000004
+#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
+#define GL_COMMAND_BARRIER_BIT 0x00000040
+#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
+#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
+#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
+#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
+#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
+#define GL_MAX_IMAGE_UNITS 0x8F38
+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
+#define GL_IMAGE_BINDING_NAME 0x8F3A
+#define GL_IMAGE_BINDING_LEVEL 0x8F3B
+#define GL_IMAGE_BINDING_LAYERED 0x8F3C
+#define GL_IMAGE_BINDING_LAYER 0x8F3D
+#define GL_IMAGE_BINDING_ACCESS 0x8F3E
+#define GL_IMAGE_1D 0x904C
+#define GL_IMAGE_2D 0x904D
+#define GL_IMAGE_3D 0x904E
+#define GL_IMAGE_2D_RECT 0x904F
+#define GL_IMAGE_CUBE 0x9050
+#define GL_IMAGE_BUFFER 0x9051
+#define GL_IMAGE_1D_ARRAY 0x9052
+#define GL_IMAGE_2D_ARRAY 0x9053
+#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
+#define GL_IMAGE_2D_MULTISAMPLE 0x9055
+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
+#define GL_INT_IMAGE_1D 0x9057
+#define GL_INT_IMAGE_2D 0x9058
+#define GL_INT_IMAGE_3D 0x9059
+#define GL_INT_IMAGE_2D_RECT 0x905A
+#define GL_INT_IMAGE_CUBE 0x905B
+#define GL_INT_IMAGE_BUFFER 0x905C
+#define GL_INT_IMAGE_1D_ARRAY 0x905D
+#define GL_INT_IMAGE_2D_ARRAY 0x905E
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
+#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
+#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
+#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
+#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
+#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
+#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
+#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
+#define GL_MAX_IMAGE_SAMPLES 0x906D
+#define GL_IMAGE_BINDING_FORMAT 0x906E
+#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
+#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
+#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
+#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
+#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
+
+typedef void (GLAPIENTRY * PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+typedef void (GLAPIENTRY * PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
+
+#define glBindImageTexture GLEW_GET_FUN(__glewBindImageTexture)
+#define glMemoryBarrier GLEW_GET_FUN(__glewMemoryBarrier)
+
+#define GLEW_ARB_shader_image_load_store GLEW_GET_VAR(__GLEW_ARB_shader_image_load_store)
+
+#endif /* GL_ARB_shader_image_load_store */
+
/* ------------------------- GL_ARB_shader_objects ------------------------- */
#ifndef GL_ARB_shader_objects
@@ -4639,6 +4859,15 @@ typedef void (GLAPIENTRY * PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, G
#endif /* GL_ARB_shading_language_100 */
+/* -------------------- GL_ARB_shading_language_420pack -------------------- */
+
+#ifndef GL_ARB_shading_language_420pack
+#define GL_ARB_shading_language_420pack 1
+
+#define GLEW_ARB_shading_language_420pack GLEW_GET_VAR(__GLEW_ARB_shading_language_420pack)
+
+#endif /* GL_ARB_shading_language_420pack */
+
/* -------------------- GL_ARB_shading_language_include -------------------- */
#ifndef GL_ARB_shading_language_include
@@ -4666,6 +4895,15 @@ typedef void (GLAPIENTRY * PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen,
#endif /* GL_ARB_shading_language_include */
+/* -------------------- GL_ARB_shading_language_packing -------------------- */
+
+#ifndef GL_ARB_shading_language_packing
+#define GL_ARB_shading_language_packing 1
+
+#define GLEW_ARB_shading_language_packing GLEW_GET_VAR(__GLEW_ARB_shading_language_packing)
+
+#endif /* GL_ARB_shading_language_packing */
+
/* ----------------------------- GL_ARB_shadow ----------------------------- */
#ifndef GL_ARB_shadow
@@ -5159,6 +5397,34 @@ typedef void (GLAPIENTRY * PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsiz
#endif /* GL_ARB_texture_rgb10_a2ui */
+/* ------------------------- GL_ARB_texture_storage ------------------------ */
+
+#ifndef GL_ARB_texture_storage
+#define GL_ARB_texture_storage 1
+
+#define GL_ALPHA8_EXT 0x803C
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
+
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GLAPIENTRY * PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+
+#define glTexStorage1D GLEW_GET_FUN(__glewTexStorage1D)
+#define glTexStorage2D GLEW_GET_FUN(__glewTexStorage2D)
+#define glTexStorage3D GLEW_GET_FUN(__glewTexStorage3D)
+#define glTextureStorage1DEXT GLEW_GET_FUN(__glewTextureStorage1DEXT)
+#define glTextureStorage2DEXT GLEW_GET_FUN(__glewTextureStorage2DEXT)
+#define glTextureStorage3DEXT GLEW_GET_FUN(__glewTextureStorage3DEXT)
+
+#define GLEW_ARB_texture_storage GLEW_GET_VAR(__GLEW_ARB_texture_storage)
+
+#endif /* GL_ARB_texture_storage */
+
/* ------------------------- GL_ARB_texture_swizzle ------------------------ */
#ifndef GL_ARB_texture_swizzle
@@ -5246,6 +5512,21 @@ typedef void (GLAPIENTRY * PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint in
#endif /* GL_ARB_transform_feedback3 */
+/* ------------------ GL_ARB_transform_feedback_instanced ------------------ */
+
+#ifndef GL_ARB_transform_feedback_instanced
+#define GL_ARB_transform_feedback_instanced 1
+
+typedef void (GLAPIENTRY * PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei primcount);
+typedef void (GLAPIENTRY * PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei primcount);
+
+#define glDrawTransformFeedbackInstanced GLEW_GET_FUN(__glewDrawTransformFeedbackInstanced)
+#define glDrawTransformFeedbackStreamInstanced GLEW_GET_FUN(__glewDrawTransformFeedbackStreamInstanced)
+
+#define GLEW_ARB_transform_feedback_instanced GLEW_GET_VAR(__GLEW_ARB_transform_feedback_instanced)
+
+#endif /* GL_ARB_transform_feedback_instanced */
+
/* ------------------------ GL_ARB_transpose_matrix ------------------------ */
#ifndef GL_ARB_transpose_matrix
@@ -7489,6 +7770,18 @@ typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC) (GLenum t
#endif /* GL_EXT_framebuffer_multisample */
+/* --------------- GL_EXT_framebuffer_multisample_blit_scaled -------------- */
+
+#ifndef GL_EXT_framebuffer_multisample_blit_scaled
+#define GL_EXT_framebuffer_multisample_blit_scaled 1
+
+#define GL_SCALED_RESOLVE_FASTEST_EXT 0x90BA
+#define GL_SCALED_RESOLVE_NICEST_EXT 0x90BB
+
+#define GLEW_EXT_framebuffer_multisample_blit_scaled GLEW_GET_VAR(__GLEW_EXT_framebuffer_multisample_blit_scaled)
+
+#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
+
/* ----------------------- GL_EXT_framebuffer_object ----------------------- */
#ifndef GL_EXT_framebuffer_object
@@ -9622,17 +9915,17 @@ typedef void (GLAPIENTRY * PFNGLTEXSCISSORINTELPROC) (GLenum target, GLclampf tl
#define GL_KTX_Z_REGION 0x2
#define GL_KTX_STENCIL_REGION 0x3
-typedef GLuint (GLAPIENTRY * PFNGLBUFFERREGIONENABLEDEXTPROC) (void);
-typedef void (GLAPIENTRY * PFNGLDELETEBUFFERREGIONEXTPROC) (GLenum region);
-typedef void (GLAPIENTRY * PFNGLDRAWBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height, GLint xDest, GLint yDest);
-typedef GLuint (GLAPIENTRY * PFNGLNEWBUFFERREGIONEXTPROC) (GLenum region);
-typedef void (GLAPIENTRY * PFNGLREADBUFFERREGIONEXTPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef GLuint (GLAPIENTRY * PFNGLBUFFERREGIONENABLEDPROC) (void);
+typedef void (GLAPIENTRY * PFNGLDELETEBUFFERREGIONPROC) (GLenum region);
+typedef void (GLAPIENTRY * PFNGLDRAWBUFFERREGIONPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height, GLint xDest, GLint yDest);
+typedef GLuint (GLAPIENTRY * PFNGLNEWBUFFERREGIONPROC) (GLenum region);
+typedef void (GLAPIENTRY * PFNGLREADBUFFERREGIONPROC) (GLuint region, GLint x, GLint y, GLsizei width, GLsizei height);
-#define glBufferRegionEnabledEXT GLEW_GET_FUN(__glewBufferRegionEnabledEXT)
-#define glDeleteBufferRegionEXT GLEW_GET_FUN(__glewDeleteBufferRegionEXT)
-#define glDrawBufferRegionEXT GLEW_GET_FUN(__glewDrawBufferRegionEXT)
-#define glNewBufferRegionEXT GLEW_GET_FUN(__glewNewBufferRegionEXT)
-#define glReadBufferRegionEXT GLEW_GET_FUN(__glewReadBufferRegionEXT)
+#define glBufferRegionEnabled GLEW_GET_FUN(__glewBufferRegionEnabled)
+#define glDeleteBufferRegion GLEW_GET_FUN(__glewDeleteBufferRegion)
+#define glDrawBufferRegion GLEW_GET_FUN(__glewDrawBufferRegion)
+#define glNewBufferRegion GLEW_GET_FUN(__glewNewBufferRegion)
+#define glReadBufferRegion GLEW_GET_FUN(__glewReadBufferRegion)
#define GLEW_KTX_buffer_region GLEW_GET_VAR(__GLEW_KTX_buffer_region)
@@ -10516,6 +10809,242 @@ typedef void (GLAPIENTRY * PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC) (GLenum target,
#endif /* GL_NV_parameter_buffer_object2 */
+/* -------------------------- GL_NV_path_rendering ------------------------- */
+
+#ifndef GL_NV_path_rendering
+#define GL_NV_path_rendering 1
+
+#define GL_CLOSE_PATH_NV 0x00
+#define GL_BOLD_BIT_NV 0x01
+#define GL_GLYPH_WIDTH_BIT_NV 0x01
+#define GL_MOVE_TO_NV 0x02
+#define GL_GLYPH_HEIGHT_BIT_NV 0x02
+#define GL_ITALIC_BIT_NV 0x02
+#define GL_RELATIVE_MOVE_TO_NV 0x03
+#define GL_LINE_TO_NV 0x04
+#define GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV 0x04
+#define GL_RELATIVE_LINE_TO_NV 0x05
+#define GL_HORIZONTAL_LINE_TO_NV 0x06
+#define GL_RELATIVE_HORIZONTAL_LINE_TO_NV 0x07
+#define GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV 0x08
+#define GL_VERTICAL_LINE_TO_NV 0x08
+#define GL_RELATIVE_VERTICAL_LINE_TO_NV 0x09
+#define GL_QUADRATIC_CURVE_TO_NV 0x0A
+#define GL_RELATIVE_QUADRATIC_CURVE_TO_NV 0x0B
+#define GL_CUBIC_CURVE_TO_NV 0x0C
+#define GL_RELATIVE_CUBIC_CURVE_TO_NV 0x0D
+#define GL_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0E
+#define GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV 0x0F
+#define GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV 0x10
+#define GL_SMOOTH_CUBIC_CURVE_TO_NV 0x10
+#define GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV 0x11
+#define GL_SMALL_CCW_ARC_TO_NV 0x12
+#define GL_RELATIVE_SMALL_CCW_ARC_TO_NV 0x13
+#define GL_SMALL_CW_ARC_TO_NV 0x14
+#define GL_RELATIVE_SMALL_CW_ARC_TO_NV 0x15
+#define GL_LARGE_CCW_ARC_TO_NV 0x16
+#define GL_RELATIVE_LARGE_CCW_ARC_TO_NV 0x17
+#define GL_LARGE_CW_ARC_TO_NV 0x18
+#define GL_RELATIVE_LARGE_CW_ARC_TO_NV 0x19
+#define GL_GLYPH_VERTICAL_BEARING_X_BIT_NV 0x20
+#define GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV 0x40
+#define GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV 0x80
+#define GL_CIRCULAR_CCW_ARC_TO_NV 0xF8
+#define GL_CIRCULAR_CW_ARC_TO_NV 0xFA
+#define GL_CIRCULAR_TANGENT_ARC_TO_NV 0xFC
+#define GL_ARC_TO_NV 0xFE
+#define GL_RELATIVE_ARC_TO_NV 0xFF
+#define GL_GLYPH_HAS_KERNING_NV 0x100
+#define GL_PRIMARY_COLOR_NV 0x852C
+#define GL_SECONDARY_COLOR_NV 0x852D
+#define GL_PRIMARY_COLOR 0x8577
+#define GL_PATH_FORMAT_SVG_NV 0x9070
+#define GL_PATH_FORMAT_PS_NV 0x9071
+#define GL_STANDARD_FONT_NAME_NV 0x9072
+#define GL_SYSTEM_FONT_NAME_NV 0x9073
+#define GL_FILE_NAME_NV 0x9074
+#define GL_PATH_STROKE_WIDTH_NV 0x9075
+#define GL_PATH_END_CAPS_NV 0x9076
+#define GL_PATH_INITIAL_END_CAP_NV 0x9077
+#define GL_PATH_TERMINAL_END_CAP_NV 0x9078
+#define GL_PATH_JOIN_STYLE_NV 0x9079
+#define GL_PATH_MITER_LIMIT_NV 0x907A
+#define GL_PATH_DASH_CAPS_NV 0x907B
+#define GL_PATH_INITIAL_DASH_CAP_NV 0x907C
+#define GL_PATH_TERMINAL_DASH_CAP_NV 0x907D
+#define GL_PATH_DASH_OFFSET_NV 0x907E
+#define GL_PATH_CLIENT_LENGTH_NV 0x907F
+#define GL_PATH_FILL_MODE_NV 0x9080
+#define GL_PATH_FILL_MASK_NV 0x9081
+#define GL_PATH_FILL_COVER_MODE_NV 0x9082
+#define GL_PATH_STROKE_COVER_MODE_NV 0x9083
+#define GL_PATH_STROKE_MASK_NV 0x9084
+#define GL_COUNT_UP_NV 0x9088
+#define GL_COUNT_DOWN_NV 0x9089
+#define GL_PATH_OBJECT_BOUNDING_BOX_NV 0x908A
+#define GL_CONVEX_HULL_NV 0x908B
+#define GL_BOUNDING_BOX_NV 0x908D
+#define GL_TRANSLATE_X_NV 0x908E
+#define GL_TRANSLATE_Y_NV 0x908F
+#define GL_TRANSLATE_2D_NV 0x9090
+#define GL_TRANSLATE_3D_NV 0x9091
+#define GL_AFFINE_2D_NV 0x9092
+#define GL_AFFINE_3D_NV 0x9094
+#define GL_TRANSPOSE_AFFINE_2D_NV 0x9096
+#define GL_TRANSPOSE_AFFINE_3D_NV 0x9098
+#define GL_UTF8_NV 0x909A
+#define GL_UTF16_NV 0x909B
+#define GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV 0x909C
+#define GL_PATH_COMMAND_COUNT_NV 0x909D
+#define GL_PATH_COORD_COUNT_NV 0x909E
+#define GL_PATH_DASH_ARRAY_COUNT_NV 0x909F
+#define GL_PATH_COMPUTED_LENGTH_NV 0x90A0
+#define GL_PATH_FILL_BOUNDING_BOX_NV 0x90A1
+#define GL_PATH_STROKE_BOUNDING_BOX_NV 0x90A2
+#define GL_SQUARE_NV 0x90A3
+#define GL_ROUND_NV 0x90A4
+#define GL_TRIANGULAR_NV 0x90A5
+#define GL_BEVEL_NV 0x90A6
+#define GL_MITER_REVERT_NV 0x90A7
+#define GL_MITER_TRUNCATE_NV 0x90A8
+#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
+#define GL_USE_MISSING_GLYPH_NV 0x90AA
+#define GL_PATH_ERROR_POSITION_NV 0x90AB
+#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
+#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
+#define GL_ADJACENT_PAIRS_NV 0x90AE
+#define GL_FIRST_TO_REST_NV 0x90AF
+#define GL_PATH_GEN_MODE_NV 0x90B0
+#define GL_PATH_GEN_COEFF_NV 0x90B1
+#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
+#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
+#define GL_PATH_DASH_OFFSET_RESET_NV 0x90B4
+#define GL_MOVE_TO_RESETS_NV 0x90B5
+#define GL_MOVE_TO_CONTINUES_NV 0x90B6
+#define GL_PATH_STENCIL_FUNC_NV 0x90B7
+#define GL_PATH_STENCIL_REF_NV 0x90B8
+#define GL_PATH_STENCIL_VALUE_MASK_NV 0x90B9
+#define GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV 0x90BD
+#define GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV 0x90BE
+#define GL_PATH_COVER_DEPTH_FUNC_NV 0x90BF
+#define GL_FONT_X_MIN_BOUNDS_NV 0x00010000
+#define GL_FONT_Y_MIN_BOUNDS_NV 0x00020000
+#define GL_FONT_X_MAX_BOUNDS_NV 0x00040000
+#define GL_FONT_Y_MAX_BOUNDS_NV 0x00080000
+#define GL_FONT_UNITS_PER_EM_NV 0x00100000
+#define GL_FONT_ASCENDER_NV 0x00200000
+#define GL_FONT_DESCENDER_NV 0x00400000
+#define GL_FONT_HEIGHT_NV 0x00800000
+#define GL_FONT_MAX_ADVANCE_WIDTH_NV 0x01000000
+#define GL_FONT_MAX_ADVANCE_HEIGHT_NV 0x02000000
+#define GL_FONT_UNDERLINE_POSITION_NV 0x04000000
+#define GL_FONT_UNDERLINE_THICKNESS_NV 0x08000000
+#define GL_FONT_HAS_KERNING_NV 0x10000000
+
+typedef void (GLAPIENTRY * PFNGLCOPYPATHNVPROC) (GLuint resultPath, GLuint srcPath);
+typedef void (GLAPIENTRY * PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
+typedef void (GLAPIENTRY * PFNGLCOVERSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLCOVERSTROKEPATHNVPROC) (GLuint name, GLenum coverMode);
+typedef void (GLAPIENTRY * PFNGLDELETEPATHSNVPROC) (GLuint path, GLsizei range);
+typedef GLuint (GLAPIENTRY * PFNGLGENPATHSNVPROC) (GLsizei range);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOMMANDSNVPROC) (GLuint name, GLubyte* commands);
+typedef void (GLAPIENTRY * PFNGLGETPATHCOORDSNVPROC) (GLuint name, GLfloat* coords);
+typedef void (GLAPIENTRY * PFNGLGETPATHDASHARRAYNVPROC) (GLuint name, GLfloat* dashArray);
+typedef GLfloat (GLAPIENTRY * PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
+typedef void (GLAPIENTRY * PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint fistPathName, GLsizei numPaths, GLsizei stride, GLfloat* metrics);
+typedef void (GLAPIENTRY * PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
+typedef void (GLAPIENTRY * PFNGLGETPATHPARAMETERFVNVPROC) (GLuint name, GLenum param, GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHPARAMETERIVNVPROC) (GLuint name, GLenum param, GLint* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
+typedef void (GLAPIENTRY * PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint* value);
+typedef void (GLAPIENTRY * PFNGLINTERPOLATEPATHSNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight);
+typedef GLboolean (GLAPIENTRY * PFNGLISPATHNVPROC) (GLuint path);
+typedef GLboolean (GLAPIENTRY * PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
+typedef GLboolean (GLAPIENTRY * PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
+typedef void (GLAPIENTRY * PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat* coeffs);
+typedef void (GLAPIENTRY * PFNGLPATHCOMMANDSNVPROC) (GLuint path, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const GLvoid*coords);
+typedef void (GLAPIENTRY * PFNGLPATHCOORDSNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const void* coords);
+typedef void (GLAPIENTRY * PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum zfunc);
+typedef void (GLAPIENTRY * PFNGLPATHDASHARRAYNVPROC) (GLuint path, GLsizei dashCount, const GLfloat* dashArray);
+typedef void (GLAPIENTRY * PFNGLPATHFOGGENNVPROC) (GLenum genMode);
+typedef void (GLAPIENTRY * PFNGLPATHGLYPHRANGENVPROC) (GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
+typedef void (GLAPIENTRY * PFNGLPATHGLYPHSNVPROC) (GLuint firstPathName, GLenum fontTarget, const void* fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid*charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
+typedef void (GLAPIENTRY * PFNGLPATHPARAMETERFNVPROC) (GLuint path, GLenum pname, GLfloat value);
+typedef void (GLAPIENTRY * PFNGLPATHPARAMETERFVNVPROC) (GLuint path, GLenum pname, const GLfloat* value);
+typedef void (GLAPIENTRY * PFNGLPATHPARAMETERINVPROC) (GLuint path, GLenum pname, GLint value);
+typedef void (GLAPIENTRY * PFNGLPATHPARAMETERIVNVPROC) (GLuint path, GLenum pname, const GLint* value);
+typedef void (GLAPIENTRY * PFNGLPATHSTENCILDEPTHOFFSETNVPROC) (GLfloat factor, GLint units);
+typedef void (GLAPIENTRY * PFNGLPATHSTENCILFUNCNVPROC) (GLenum func, GLint ref, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLPATHSTRINGNVPROC) (GLuint path, GLenum format, GLsizei length, const void* pathString);
+typedef void (GLAPIENTRY * PFNGLPATHSUBCOMMANDSNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte* commands, GLsizei numCoords, GLenum coordType, const GLvoid*coords);
+typedef void (GLAPIENTRY * PFNGLPATHSUBCOORDSNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const void* coords);
+typedef void (GLAPIENTRY * PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat* coeffs);
+typedef GLboolean (GLAPIENTRY * PFNGLPOINTALONGPATHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat* x, GLfloat *y, GLfloat *tangentX, GLfloat *tangentY);
+typedef void (GLAPIENTRY * PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLSTENCILFILLPATHNVPROC) (GLuint path, GLenum fillMode, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void* paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
+typedef void (GLAPIENTRY * PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint reference, GLuint mask);
+typedef void (GLAPIENTRY * PFNGLTRANSFORMPATHNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat* transformValues);
+typedef void (GLAPIENTRY * PFNGLWEIGHTPATHSNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint paths[], const GLfloat weights[]);
+
+#define glCopyPathNV GLEW_GET_FUN(__glewCopyPathNV)
+#define glCoverFillPathInstancedNV GLEW_GET_FUN(__glewCoverFillPathInstancedNV)
+#define glCoverFillPathNV GLEW_GET_FUN(__glewCoverFillPathNV)
+#define glCoverStrokePathInstancedNV GLEW_GET_FUN(__glewCoverStrokePathInstancedNV)
+#define glCoverStrokePathNV GLEW_GET_FUN(__glewCoverStrokePathNV)
+#define glDeletePathsNV GLEW_GET_FUN(__glewDeletePathsNV)
+#define glGenPathsNV GLEW_GET_FUN(__glewGenPathsNV)
+#define glGetPathColorGenfvNV GLEW_GET_FUN(__glewGetPathColorGenfvNV)
+#define glGetPathColorGenivNV GLEW_GET_FUN(__glewGetPathColorGenivNV)
+#define glGetPathCommandsNV GLEW_GET_FUN(__glewGetPathCommandsNV)
+#define glGetPathCoordsNV GLEW_GET_FUN(__glewGetPathCoordsNV)
+#define glGetPathDashArrayNV GLEW_GET_FUN(__glewGetPathDashArrayNV)
+#define glGetPathLengthNV GLEW_GET_FUN(__glewGetPathLengthNV)
+#define glGetPathMetricRangeNV GLEW_GET_FUN(__glewGetPathMetricRangeNV)
+#define glGetPathMetricsNV GLEW_GET_FUN(__glewGetPathMetricsNV)
+#define glGetPathParameterfvNV GLEW_GET_FUN(__glewGetPathParameterfvNV)
+#define glGetPathParameterivNV GLEW_GET_FUN(__glewGetPathParameterivNV)
+#define glGetPathSpacingNV GLEW_GET_FUN(__glewGetPathSpacingNV)
+#define glGetPathTexGenfvNV GLEW_GET_FUN(__glewGetPathTexGenfvNV)
+#define glGetPathTexGenivNV GLEW_GET_FUN(__glewGetPathTexGenivNV)
+#define glInterpolatePathsNV GLEW_GET_FUN(__glewInterpolatePathsNV)
+#define glIsPathNV GLEW_GET_FUN(__glewIsPathNV)
+#define glIsPointInFillPathNV GLEW_GET_FUN(__glewIsPointInFillPathNV)
+#define glIsPointInStrokePathNV GLEW_GET_FUN(__glewIsPointInStrokePathNV)
+#define glPathColorGenNV GLEW_GET_FUN(__glewPathColorGenNV)
+#define glPathCommandsNV GLEW_GET_FUN(__glewPathCommandsNV)
+#define glPathCoordsNV GLEW_GET_FUN(__glewPathCoordsNV)
+#define glPathCoverDepthFuncNV GLEW_GET_FUN(__glewPathCoverDepthFuncNV)
+#define glPathDashArrayNV GLEW_GET_FUN(__glewPathDashArrayNV)
+#define glPathFogGenNV GLEW_GET_FUN(__glewPathFogGenNV)
+#define glPathGlyphRangeNV GLEW_GET_FUN(__glewPathGlyphRangeNV)
+#define glPathGlyphsNV GLEW_GET_FUN(__glewPathGlyphsNV)
+#define glPathParameterfNV GLEW_GET_FUN(__glewPathParameterfNV)
+#define glPathParameterfvNV GLEW_GET_FUN(__glewPathParameterfvNV)
+#define glPathParameteriNV GLEW_GET_FUN(__glewPathParameteriNV)
+#define glPathParameterivNV GLEW_GET_FUN(__glewPathParameterivNV)
+#define glPathStencilDepthOffsetNV GLEW_GET_FUN(__glewPathStencilDepthOffsetNV)
+#define glPathStencilFuncNV GLEW_GET_FUN(__glewPathStencilFuncNV)
+#define glPathStringNV GLEW_GET_FUN(__glewPathStringNV)
+#define glPathSubCommandsNV GLEW_GET_FUN(__glewPathSubCommandsNV)
+#define glPathSubCoordsNV GLEW_GET_FUN(__glewPathSubCoordsNV)
+#define glPathTexGenNV GLEW_GET_FUN(__glewPathTexGenNV)
+#define glPointAlongPathNV GLEW_GET_FUN(__glewPointAlongPathNV)
+#define glStencilFillPathInstancedNV GLEW_GET_FUN(__glewStencilFillPathInstancedNV)
+#define glStencilFillPathNV GLEW_GET_FUN(__glewStencilFillPathNV)
+#define glStencilStrokePathInstancedNV GLEW_GET_FUN(__glewStencilStrokePathInstancedNV)
+#define glStencilStrokePathNV GLEW_GET_FUN(__glewStencilStrokePathNV)
+#define glTransformPathNV GLEW_GET_FUN(__glewTransformPathNV)
+#define glWeightPathsNV GLEW_GET_FUN(__glewWeightPathsNV)
+
+#define GLEW_NV_path_rendering GLEW_GET_VAR(__GLEW_NV_path_rendering)
+
+#endif /* GL_NV_path_rendering */
+
/* ------------------------- GL_NV_pixel_data_range ------------------------ */
#ifndef GL_NV_pixel_data_range
@@ -13171,6 +13700,9 @@ GLEW_FUN_EXPORT PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC __glewBlendEquationSepa
GLEW_FUN_EXPORT PFNGLBLENDFUNCINDEXEDAMDPROC __glewBlendFuncIndexedAMD;
GLEW_FUN_EXPORT PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC __glewBlendFuncSeparateIndexedAMD;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC __glewMultiDrawArraysIndirectAMD;
+GLEW_FUN_EXPORT PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC __glewMultiDrawElementsIndirectAMD;
+
GLEW_FUN_EXPORT PFNGLDELETENAMESAMDPROC __glewDeleteNamesAMD;
GLEW_FUN_EXPORT PFNGLGENNAMESAMDPROC __glewGenNamesAMD;
GLEW_FUN_EXPORT PFNGLISNAMEAMDPROC __glewIsNameAMD;
@@ -13240,6 +13772,10 @@ GLEW_FUN_EXPORT PFNGLGETSHADERPRECISIONFORMATPROC __glewGetShaderPrecisionFormat
GLEW_FUN_EXPORT PFNGLRELEASESHADERCOMPILERPROC __glewReleaseShaderCompiler;
GLEW_FUN_EXPORT PFNGLSHADERBINARYPROC __glewShaderBinary;
+GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC __glewDrawArraysInstancedBaseInstance;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC __glewDrawElementsInstancedBaseInstance;
+GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC __glewDrawElementsInstancedBaseVertexBaseInstance;
+
GLEW_FUN_EXPORT PFNGLBINDFRAGDATALOCATIONINDEXEDPROC __glewBindFragDataLocationIndexed;
GLEW_FUN_EXPORT PFNGLGETFRAGDATAINDEXPROC __glewGetFragDataIndex;
@@ -13372,6 +13908,8 @@ GLEW_FUN_EXPORT PFNGLDRAWARRAYSINSTANCEDARBPROC __glewDrawArraysInstancedARB;
GLEW_FUN_EXPORT PFNGLDRAWELEMENTSINSTANCEDARBPROC __glewDrawElementsInstancedARB;
GLEW_FUN_EXPORT PFNGLVERTEXATTRIBDIVISORARBPROC __glewVertexAttribDivisorARB;
+GLEW_FUN_EXPORT PFNGLGETINTERNALFORMATIVPROC __glewGetInternalformativ;
+
GLEW_FUN_EXPORT PFNGLFLUSHMAPPEDBUFFERRANGEPROC __glewFlushMappedBufferRange;
GLEW_FUN_EXPORT PFNGLMAPBUFFERRANGEPROC __glewMapBufferRange;
@@ -13432,6 +13970,7 @@ GLEW_FUN_EXPORT PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB;
GLEW_FUN_EXPORT PFNGLPROVOKINGVERTEXPROC __glewProvokingVertex;
+GLEW_FUN_EXPORT PFNGLGETGRAPHICSRESETSTATUSARBPROC __glewGetGraphicsResetStatusARB;
GLEW_FUN_EXPORT PFNGLGETNCOLORTABLEARBPROC __glewGetnColorTableARB;
GLEW_FUN_EXPORT PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC __glewGetnCompressedTexImageARB;
GLEW_FUN_EXPORT PFNGLGETNCONVOLUTIONFILTERARBPROC __glewGetnConvolutionFilterARB;
@@ -13530,6 +14069,11 @@ GLEW_FUN_EXPORT PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC __glewProgramUniformMatrix4x3
GLEW_FUN_EXPORT PFNGLUSEPROGRAMSTAGESPROC __glewUseProgramStages;
GLEW_FUN_EXPORT PFNGLVALIDATEPROGRAMPIPELINEPROC __glewValidateProgramPipeline;
+GLEW_FUN_EXPORT PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC __glewGetActiveAtomicCounterBufferiv;
+
+GLEW_FUN_EXPORT PFNGLBINDIMAGETEXTUREPROC __glewBindImageTexture;
+GLEW_FUN_EXPORT PFNGLMEMORYBARRIERPROC __glewMemoryBarrier;
+
GLEW_FUN_EXPORT PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB;
GLEW_FUN_EXPORT PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB;
GLEW_FUN_EXPORT PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB;
@@ -13612,6 +14156,13 @@ GLEW_FUN_EXPORT PFNGLSAMPLEMASKIPROC __glewSampleMaski;
GLEW_FUN_EXPORT PFNGLTEXIMAGE2DMULTISAMPLEPROC __glewTexImage2DMultisample;
GLEW_FUN_EXPORT PFNGLTEXIMAGE3DMULTISAMPLEPROC __glewTexImage3DMultisample;
+GLEW_FUN_EXPORT PFNGLTEXSTORAGE1DPROC __glewTexStorage1D;
+GLEW_FUN_EXPORT PFNGLTEXSTORAGE2DPROC __glewTexStorage2D;
+GLEW_FUN_EXPORT PFNGLTEXSTORAGE3DPROC __glewTexStorage3D;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE1DEXTPROC __glewTextureStorage1DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE2DEXTPROC __glewTextureStorage2DEXT;
+GLEW_FUN_EXPORT PFNGLTEXTURESTORAGE3DEXTPROC __glewTextureStorage3DEXT;
+
GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTI64VPROC __glewGetQueryObjecti64v;
GLEW_FUN_EXPORT PFNGLGETQUERYOBJECTUI64VPROC __glewGetQueryObjectui64v;
GLEW_FUN_EXPORT PFNGLQUERYCOUNTERPROC __glewQueryCounter;
@@ -13629,6 +14180,9 @@ GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC __glewDrawTransformFeedback
GLEW_FUN_EXPORT PFNGLENDQUERYINDEXEDPROC __glewEndQueryIndexed;
GLEW_FUN_EXPORT PFNGLGETQUERYINDEXEDIVPROC __glewGetQueryIndexediv;
+GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC __glewDrawTransformFeedbackInstanced;
+GLEW_FUN_EXPORT PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC __glewDrawTransformFeedbackStreamInstanced;
+
GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXDARBPROC __glewLoadTransposeMatrixdARB;
GLEW_FUN_EXPORT PFNGLLOADTRANSPOSEMATRIXFARBPROC __glewLoadTransposeMatrixfARB;
GLEW_FUN_EXPORT PFNGLMULTTRANSPOSEMATRIXDARBPROC __glewMultTransposeMatrixdARB;
@@ -14481,11 +15035,11 @@ GLEW_FUN_EXPORT PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL;
GLEW_FUN_EXPORT PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL;
GLEW_FUN_EXPORT PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL;
-GLEW_FUN_EXPORT PFNGLBUFFERREGIONENABLEDEXTPROC __glewBufferRegionEnabledEXT;
-GLEW_FUN_EXPORT PFNGLDELETEBUFFERREGIONEXTPROC __glewDeleteBufferRegionEXT;
-GLEW_FUN_EXPORT PFNGLDRAWBUFFERREGIONEXTPROC __glewDrawBufferRegionEXT;
-GLEW_FUN_EXPORT PFNGLNEWBUFFERREGIONEXTPROC __glewNewBufferRegionEXT;
-GLEW_FUN_EXPORT PFNGLREADBUFFERREGIONEXTPROC __glewReadBufferRegionEXT;
+GLEW_FUN_EXPORT PFNGLBUFFERREGIONENABLEDPROC __glewBufferRegionEnabled;
+GLEW_FUN_EXPORT PFNGLDELETEBUFFERREGIONPROC __glewDeleteBufferRegion;
+GLEW_FUN_EXPORT PFNGLDRAWBUFFERREGIONPROC __glewDrawBufferRegion;
+GLEW_FUN_EXPORT PFNGLNEWBUFFERREGIONPROC __glewNewBufferRegion;
+GLEW_FUN_EXPORT PFNGLREADBUFFERREGIONPROC __glewReadBufferRegion;
GLEW_FUN_EXPORT PFNGLRESIZEBUFFERSMESAPROC __glewResizeBuffersMESA;
@@ -14663,6 +15217,56 @@ GLEW_FUN_EXPORT PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC __glewProgramBufferParamet
GLEW_FUN_EXPORT PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC __glewProgramBufferParametersIuivNV;
GLEW_FUN_EXPORT PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC __glewProgramBufferParametersfvNV;
+GLEW_FUN_EXPORT PFNGLCOPYPATHNVPROC __glewCopyPathNV;
+GLEW_FUN_EXPORT PFNGLCOVERFILLPATHINSTANCEDNVPROC __glewCoverFillPathInstancedNV;
+GLEW_FUN_EXPORT PFNGLCOVERFILLPATHNVPROC __glewCoverFillPathNV;
+GLEW_FUN_EXPORT PFNGLCOVERSTROKEPATHINSTANCEDNVPROC __glewCoverStrokePathInstancedNV;
+GLEW_FUN_EXPORT PFNGLCOVERSTROKEPATHNVPROC __glewCoverStrokePathNV;
+GLEW_FUN_EXPORT PFNGLDELETEPATHSNVPROC __glewDeletePathsNV;
+GLEW_FUN_EXPORT PFNGLGENPATHSNVPROC __glewGenPathsNV;
+GLEW_FUN_EXPORT PFNGLGETPATHCOLORGENFVNVPROC __glewGetPathColorGenfvNV;
+GLEW_FUN_EXPORT PFNGLGETPATHCOLORGENIVNVPROC __glewGetPathColorGenivNV;
+GLEW_FUN_EXPORT PFNGLGETPATHCOMMANDSNVPROC __glewGetPathCommandsNV;
+GLEW_FUN_EXPORT PFNGLGETPATHCOORDSNVPROC __glewGetPathCoordsNV;
+GLEW_FUN_EXPORT PFNGLGETPATHDASHARRAYNVPROC __glewGetPathDashArrayNV;
+GLEW_FUN_EXPORT PFNGLGETPATHLENGTHNVPROC __glewGetPathLengthNV;
+GLEW_FUN_EXPORT PFNGLGETPATHMETRICRANGENVPROC __glewGetPathMetricRangeNV;
+GLEW_FUN_EXPORT PFNGLGETPATHMETRICSNVPROC __glewGetPathMetricsNV;
+GLEW_FUN_EXPORT PFNGLGETPATHPARAMETERFVNVPROC __glewGetPathParameterfvNV;
+GLEW_FUN_EXPORT PFNGLGETPATHPARAMETERIVNVPROC __glewGetPathParameterivNV;
+GLEW_FUN_EXPORT PFNGLGETPATHSPACINGNVPROC __glewGetPathSpacingNV;
+GLEW_FUN_EXPORT PFNGLGETPATHTEXGENFVNVPROC __glewGetPathTexGenfvNV;
+GLEW_FUN_EXPORT PFNGLGETPATHTEXGENIVNVPROC __glewGetPathTexGenivNV;
+GLEW_FUN_EXPORT PFNGLINTERPOLATEPATHSNVPROC __glewInterpolatePathsNV;
+GLEW_FUN_EXPORT PFNGLISPATHNVPROC __glewIsPathNV;
+GLEW_FUN_EXPORT PFNGLISPOINTINFILLPATHNVPROC __glewIsPointInFillPathNV;
+GLEW_FUN_EXPORT PFNGLISPOINTINSTROKEPATHNVPROC __glewIsPointInStrokePathNV;
+GLEW_FUN_EXPORT PFNGLPATHCOLORGENNVPROC __glewPathColorGenNV;
+GLEW_FUN_EXPORT PFNGLPATHCOMMANDSNVPROC __glewPathCommandsNV;
+GLEW_FUN_EXPORT PFNGLPATHCOORDSNVPROC __glewPathCoordsNV;
+GLEW_FUN_EXPORT PFNGLPATHCOVERDEPTHFUNCNVPROC __glewPathCoverDepthFuncNV;
+GLEW_FUN_EXPORT PFNGLPATHDASHARRAYNVPROC __glewPathDashArrayNV;
+GLEW_FUN_EXPORT PFNGLPATHFOGGENNVPROC __glewPathFogGenNV;
+GLEW_FUN_EXPORT PFNGLPATHGLYPHRANGENVPROC __glewPathGlyphRangeNV;
+GLEW_FUN_EXPORT PFNGLPATHGLYPHSNVPROC __glewPathGlyphsNV;
+GLEW_FUN_EXPORT PFNGLPATHPARAMETERFNVPROC __glewPathParameterfNV;
+GLEW_FUN_EXPORT PFNGLPATHPARAMETERFVNVPROC __glewPathParameterfvNV;
+GLEW_FUN_EXPORT PFNGLPATHPARAMETERINVPROC __glewPathParameteriNV;
+GLEW_FUN_EXPORT PFNGLPATHPARAMETERIVNVPROC __glewPathParameterivNV;
+GLEW_FUN_EXPORT PFNGLPATHSTENCILDEPTHOFFSETNVPROC __glewPathStencilDepthOffsetNV;
+GLEW_FUN_EXPORT PFNGLPATHSTENCILFUNCNVPROC __glewPathStencilFuncNV;
+GLEW_FUN_EXPORT PFNGLPATHSTRINGNVPROC __glewPathStringNV;
+GLEW_FUN_EXPORT PFNGLPATHSUBCOMMANDSNVPROC __glewPathSubCommandsNV;
+GLEW_FUN_EXPORT PFNGLPATHSUBCOORDSNVPROC __glewPathSubCoordsNV;
+GLEW_FUN_EXPORT PFNGLPATHTEXGENNVPROC __glewPathTexGenNV;
+GLEW_FUN_EXPORT PFNGLPOINTALONGPATHNVPROC __glewPointAlongPathNV;
+GLEW_FUN_EXPORT PFNGLSTENCILFILLPATHINSTANCEDNVPROC __glewStencilFillPathInstancedNV;
+GLEW_FUN_EXPORT PFNGLSTENCILFILLPATHNVPROC __glewStencilFillPathNV;
+GLEW_FUN_EXPORT PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC __glewStencilStrokePathInstancedNV;
+GLEW_FUN_EXPORT PFNGLSTENCILSTROKEPATHNVPROC __glewStencilStrokePathNV;
+GLEW_FUN_EXPORT PFNGLTRANSFORMPATHNVPROC __glewTransformPathNV;
+GLEW_FUN_EXPORT PFNGLWEIGHTPATHSNVPROC __glewWeightPathsNV;
+
GLEW_FUN_EXPORT PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV;
GLEW_FUN_EXPORT PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV;
@@ -15022,6 +15626,7 @@ GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_3_2;
GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_3_3;
GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_0;
GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_1;
+GLEW_VAR_EXPORT GLboolean __GLEW_VERSION_4_2;
GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_multisample;
GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_tbuffer;
GLEW_VAR_EXPORT GLboolean __GLEW_3DFX_texture_compression_FXT1;
@@ -15030,6 +15635,7 @@ GLEW_VAR_EXPORT GLboolean __GLEW_AMD_conservative_depth;
GLEW_VAR_EXPORT GLboolean __GLEW_AMD_debug_output;
GLEW_VAR_EXPORT GLboolean __GLEW_AMD_depth_clamp_separate;
GLEW_VAR_EXPORT GLboolean __GLEW_AMD_draw_buffers_blend;
+GLEW_VAR_EXPORT GLboolean __GLEW_AMD_multi_draw_indirect;
GLEW_VAR_EXPORT GLboolean __GLEW_AMD_name_gen_delete;
GLEW_VAR_EXPORT GLboolean __GLEW_AMD_performance_monitor;
GLEW_VAR_EXPORT GLboolean __GLEW_AMD_sample_positions;
@@ -15056,10 +15662,13 @@ GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_vertex_array_range;
GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_vertex_program_evaluators;
GLEW_VAR_EXPORT GLboolean __GLEW_APPLE_ycbcr_422;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_ES2_compatibility;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_base_instance;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_blend_func_extended;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_cl_event;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_color_buffer_float;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_compatibility;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_compressed_texture_pixel_storage;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_conservative_depth;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_copy_buffer;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_debug_output;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_depth_buffer_float;
@@ -15085,6 +15694,8 @@ GLEW_VAR_EXPORT GLboolean __GLEW_ARB_half_float_pixel;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_half_float_vertex;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_imaging;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_instanced_arrays;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_internalformat_query;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_map_buffer_alignment;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_map_buffer_range;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_matrix_palette;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_multisample;
@@ -15100,14 +15711,18 @@ GLEW_VAR_EXPORT GLboolean __GLEW_ARB_sample_shading;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_sampler_objects;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_seamless_cube_map;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_separate_shader_objects;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_atomic_counters;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_bit_encoding;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_image_load_store;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_objects;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_precision;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_stencil_export;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_subroutine;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shader_texture_lod;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_100;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_420pack;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_include;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shading_language_packing;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shadow;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_shadow_ambient;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_sync;
@@ -15133,10 +15748,12 @@ GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_query_lod;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_rectangle;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_rg;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_rgb10_a2ui;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_storage;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_texture_swizzle;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_timer_query;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transform_feedback2;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transform_feedback3;
+GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transform_feedback_instanced;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_transpose_matrix;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_uniform_buffer_object;
GLEW_VAR_EXPORT GLboolean __GLEW_ARB_vertex_array_bgra;
@@ -15198,6 +15815,7 @@ GLEW_VAR_EXPORT GLboolean __GLEW_EXT_fog_coord;
GLEW_VAR_EXPORT GLboolean __GLEW_EXT_fragment_lighting;
GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_blit;
GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_multisample;
+GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_multisample_blit_scaled;
GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_object;
GLEW_VAR_EXPORT GLboolean __GLEW_EXT_framebuffer_sRGB;
GLEW_VAR_EXPORT GLboolean __GLEW_EXT_geometry_shader4;
@@ -15322,6 +15940,7 @@ GLEW_VAR_EXPORT GLboolean __GLEW_NV_occlusion_query;
GLEW_VAR_EXPORT GLboolean __GLEW_NV_packed_depth_stencil;
GLEW_VAR_EXPORT GLboolean __GLEW_NV_parameter_buffer_object;
GLEW_VAR_EXPORT GLboolean __GLEW_NV_parameter_buffer_object2;
+GLEW_VAR_EXPORT GLboolean __GLEW_NV_path_rendering;
GLEW_VAR_EXPORT GLboolean __GLEW_NV_pixel_data_range;
GLEW_VAR_EXPORT GLboolean __GLEW_NV_point_sprite;
GLEW_VAR_EXPORT GLboolean __GLEW_NV_present_video;
diff --git a/extern/glew/include/GL/glxew.h b/extern/glew/include/GL/glxew.h
index 2995318f691..6d249f73eaa 100644
--- a/extern/glew/include/GL/glxew.h
+++ b/extern/glew/include/GL/glxew.h
@@ -785,6 +785,21 @@ typedef GLboolean ( * PFNGLXSET3DFXMODEMESAPROC) (GLint mode);
#endif /* GLX_MESA_set_3dfx_mode */
+/* ------------------------- GLX_MESA_swap_control ------------------------- */
+
+#ifndef GLX_MESA_swap_control
+#define GLX_MESA_swap_control 1
+
+typedef int ( * PFNGLXGETSWAPINTERVALMESAPROC) (void);
+typedef int ( * PFNGLXSWAPINTERVALMESAPROC) (unsigned int interval);
+
+#define glXGetSwapIntervalMESA GLXEW_GET_FUN(__glewXGetSwapIntervalMESA)
+#define glXSwapIntervalMESA GLXEW_GET_FUN(__glewXSwapIntervalMESA)
+
+#define GLXEW_MESA_swap_control GLXEW_GET_VAR(__GLXEW_MESA_swap_control)
+
+#endif /* GLX_MESA_swap_control */
+
/* --------------------------- GLX_NV_copy_image --------------------------- */
#ifndef GLX_NV_copy_image
@@ -1385,6 +1400,9 @@ extern PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA;
extern PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA;
+extern PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA;
+extern PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA;
+
extern PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV;
extern PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV;
@@ -1504,6 +1522,7 @@ GLXEW_EXPORT GLboolean __GLXEW_MESA_copy_sub_buffer;
GLXEW_EXPORT GLboolean __GLXEW_MESA_pixmap_colormap;
GLXEW_EXPORT GLboolean __GLXEW_MESA_release_buffers;
GLXEW_EXPORT GLboolean __GLXEW_MESA_set_3dfx_mode;
+GLXEW_EXPORT GLboolean __GLXEW_MESA_swap_control;
GLXEW_EXPORT GLboolean __GLXEW_NV_copy_image;
GLXEW_EXPORT GLboolean __GLXEW_NV_float_buffer;
GLXEW_EXPORT GLboolean __GLXEW_NV_multisample_coverage;
diff --git a/extern/glew/include/GL/wglew.h b/extern/glew/include/GL/wglew.h
index deb64682811..05f054fc855 100644
--- a/extern/glew/include/GL/wglew.h
+++ b/extern/glew/include/GL/wglew.h
@@ -193,6 +193,8 @@ typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, in
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_FLAGS_ARB 0x2094
+#define ERROR_INVALID_VERSION_ARB 0x2095
+#define ERROR_INVALID_PROFILE_ARB 0x2096
typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int* attribList);
diff --git a/extern/glew/src/glew.c b/extern/glew/src/glew.c
index b2244a03237..5d886ce7807 100644
--- a/extern/glew/src/glew.c
+++ b/extern/glew/src/glew.c
@@ -577,6 +577,9 @@ PFNGLBLENDEQUATIONSEPARATEINDEXEDAMDPROC __glewBlendEquationSeparateIndexedAMD =
PFNGLBLENDFUNCINDEXEDAMDPROC __glewBlendFuncIndexedAMD = NULL;
PFNGLBLENDFUNCSEPARATEINDEXEDAMDPROC __glewBlendFuncSeparateIndexedAMD = NULL;
+PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC __glewMultiDrawArraysIndirectAMD = NULL;
+PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC __glewMultiDrawElementsIndirectAMD = NULL;
+
PFNGLDELETENAMESAMDPROC __glewDeleteNamesAMD = NULL;
PFNGLGENNAMESAMDPROC __glewGenNamesAMD = NULL;
PFNGLISNAMEAMDPROC __glewIsNameAMD = NULL;
@@ -646,6 +649,10 @@ PFNGLGETSHADERPRECISIONFORMATPROC __glewGetShaderPrecisionFormat = NULL;
PFNGLRELEASESHADERCOMPILERPROC __glewReleaseShaderCompiler = NULL;
PFNGLSHADERBINARYPROC __glewShaderBinary = NULL;
+PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC __glewDrawArraysInstancedBaseInstance = NULL;
+PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC __glewDrawElementsInstancedBaseInstance = NULL;
+PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC __glewDrawElementsInstancedBaseVertexBaseInstance = NULL;
+
PFNGLBINDFRAGDATALOCATIONINDEXEDPROC __glewBindFragDataLocationIndexed = NULL;
PFNGLGETFRAGDATAINDEXPROC __glewGetFragDataIndex = NULL;
@@ -778,6 +785,8 @@ PFNGLDRAWARRAYSINSTANCEDARBPROC __glewDrawArraysInstancedARB = NULL;
PFNGLDRAWELEMENTSINSTANCEDARBPROC __glewDrawElementsInstancedARB = NULL;
PFNGLVERTEXATTRIBDIVISORARBPROC __glewVertexAttribDivisorARB = NULL;
+PFNGLGETINTERNALFORMATIVPROC __glewGetInternalformativ = NULL;
+
PFNGLFLUSHMAPPEDBUFFERRANGEPROC __glewFlushMappedBufferRange = NULL;
PFNGLMAPBUFFERRANGEPROC __glewMapBufferRange = NULL;
@@ -838,6 +847,7 @@ PFNGLPOINTPARAMETERFVARBPROC __glewPointParameterfvARB = NULL;
PFNGLPROVOKINGVERTEXPROC __glewProvokingVertex = NULL;
+PFNGLGETGRAPHICSRESETSTATUSARBPROC __glewGetGraphicsResetStatusARB = NULL;
PFNGLGETNCOLORTABLEARBPROC __glewGetnColorTableARB = NULL;
PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC __glewGetnCompressedTexImageARB = NULL;
PFNGLGETNCONVOLUTIONFILTERARBPROC __glewGetnConvolutionFilterARB = NULL;
@@ -936,6 +946,11 @@ PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC __glewProgramUniformMatrix4x3fv = NULL;
PFNGLUSEPROGRAMSTAGESPROC __glewUseProgramStages = NULL;
PFNGLVALIDATEPROGRAMPIPELINEPROC __glewValidateProgramPipeline = NULL;
+PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC __glewGetActiveAtomicCounterBufferiv = NULL;
+
+PFNGLBINDIMAGETEXTUREPROC __glewBindImageTexture = NULL;
+PFNGLMEMORYBARRIERPROC __glewMemoryBarrier = NULL;
+
PFNGLATTACHOBJECTARBPROC __glewAttachObjectARB = NULL;
PFNGLCOMPILESHADERARBPROC __glewCompileShaderARB = NULL;
PFNGLCREATEPROGRAMOBJECTARBPROC __glewCreateProgramObjectARB = NULL;
@@ -1018,6 +1033,13 @@ PFNGLSAMPLEMASKIPROC __glewSampleMaski = NULL;
PFNGLTEXIMAGE2DMULTISAMPLEPROC __glewTexImage2DMultisample = NULL;
PFNGLTEXIMAGE3DMULTISAMPLEPROC __glewTexImage3DMultisample = NULL;
+PFNGLTEXSTORAGE1DPROC __glewTexStorage1D = NULL;
+PFNGLTEXSTORAGE2DPROC __glewTexStorage2D = NULL;
+PFNGLTEXSTORAGE3DPROC __glewTexStorage3D = NULL;
+PFNGLTEXTURESTORAGE1DEXTPROC __glewTextureStorage1DEXT = NULL;
+PFNGLTEXTURESTORAGE2DEXTPROC __glewTextureStorage2DEXT = NULL;
+PFNGLTEXTURESTORAGE3DEXTPROC __glewTextureStorage3DEXT = NULL;
+
PFNGLGETQUERYOBJECTI64VPROC __glewGetQueryObjecti64v = NULL;
PFNGLGETQUERYOBJECTUI64VPROC __glewGetQueryObjectui64v = NULL;
PFNGLQUERYCOUNTERPROC __glewQueryCounter = NULL;
@@ -1035,6 +1057,9 @@ PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC __glewDrawTransformFeedbackStream = NULL;
PFNGLENDQUERYINDEXEDPROC __glewEndQueryIndexed = NULL;
PFNGLGETQUERYINDEXEDIVPROC __glewGetQueryIndexediv = NULL;
+PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC __glewDrawTransformFeedbackInstanced = NULL;
+PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC __glewDrawTransformFeedbackStreamInstanced = NULL;
+
PFNGLLOADTRANSPOSEMATRIXDARBPROC __glewLoadTransposeMatrixdARB = NULL;
PFNGLLOADTRANSPOSEMATRIXFARBPROC __glewLoadTransposeMatrixfARB = NULL;
PFNGLMULTTRANSPOSEMATRIXDARBPROC __glewMultTransposeMatrixdARB = NULL;
@@ -1887,11 +1912,11 @@ PFNGLVERTEXPOINTERVINTELPROC __glewVertexPointervINTEL = NULL;
PFNGLTEXSCISSORFUNCINTELPROC __glewTexScissorFuncINTEL = NULL;
PFNGLTEXSCISSORINTELPROC __glewTexScissorINTEL = NULL;
-PFNGLBUFFERREGIONENABLEDEXTPROC __glewBufferRegionEnabledEXT = NULL;
-PFNGLDELETEBUFFERREGIONEXTPROC __glewDeleteBufferRegionEXT = NULL;
-PFNGLDRAWBUFFERREGIONEXTPROC __glewDrawBufferRegionEXT = NULL;
-PFNGLNEWBUFFERREGIONEXTPROC __glewNewBufferRegionEXT = NULL;
-PFNGLREADBUFFERREGIONEXTPROC __glewReadBufferRegionEXT = NULL;
+PFNGLBUFFERREGIONENABLEDPROC __glewBufferRegionEnabled = NULL;
+PFNGLDELETEBUFFERREGIONPROC __glewDeleteBufferRegion = NULL;
+PFNGLDRAWBUFFERREGIONPROC __glewDrawBufferRegion = NULL;
+PFNGLNEWBUFFERREGIONPROC __glewNewBufferRegion = NULL;
+PFNGLREADBUFFERREGIONPROC __glewReadBufferRegion = NULL;
PFNGLRESIZEBUFFERSMESAPROC __glewResizeBuffersMESA = NULL;
@@ -2069,6 +2094,56 @@ PFNGLPROGRAMBUFFERPARAMETERSIIVNVPROC __glewProgramBufferParametersIivNV = NULL;
PFNGLPROGRAMBUFFERPARAMETERSIUIVNVPROC __glewProgramBufferParametersIuivNV = NULL;
PFNGLPROGRAMBUFFERPARAMETERSFVNVPROC __glewProgramBufferParametersfvNV = NULL;
+PFNGLCOPYPATHNVPROC __glewCopyPathNV = NULL;
+PFNGLCOVERFILLPATHINSTANCEDNVPROC __glewCoverFillPathInstancedNV = NULL;
+PFNGLCOVERFILLPATHNVPROC __glewCoverFillPathNV = NULL;
+PFNGLCOVERSTROKEPATHINSTANCEDNVPROC __glewCoverStrokePathInstancedNV = NULL;
+PFNGLCOVERSTROKEPATHNVPROC __glewCoverStrokePathNV = NULL;
+PFNGLDELETEPATHSNVPROC __glewDeletePathsNV = NULL;
+PFNGLGENPATHSNVPROC __glewGenPathsNV = NULL;
+PFNGLGETPATHCOLORGENFVNVPROC __glewGetPathColorGenfvNV = NULL;
+PFNGLGETPATHCOLORGENIVNVPROC __glewGetPathColorGenivNV = NULL;
+PFNGLGETPATHCOMMANDSNVPROC __glewGetPathCommandsNV = NULL;
+PFNGLGETPATHCOORDSNVPROC __glewGetPathCoordsNV = NULL;
+PFNGLGETPATHDASHARRAYNVPROC __glewGetPathDashArrayNV = NULL;
+PFNGLGETPATHLENGTHNVPROC __glewGetPathLengthNV = NULL;
+PFNGLGETPATHMETRICRANGENVPROC __glewGetPathMetricRangeNV = NULL;
+PFNGLGETPATHMETRICSNVPROC __glewGetPathMetricsNV = NULL;
+PFNGLGETPATHPARAMETERFVNVPROC __glewGetPathParameterfvNV = NULL;
+PFNGLGETPATHPARAMETERIVNVPROC __glewGetPathParameterivNV = NULL;
+PFNGLGETPATHSPACINGNVPROC __glewGetPathSpacingNV = NULL;
+PFNGLGETPATHTEXGENFVNVPROC __glewGetPathTexGenfvNV = NULL;
+PFNGLGETPATHTEXGENIVNVPROC __glewGetPathTexGenivNV = NULL;
+PFNGLINTERPOLATEPATHSNVPROC __glewInterpolatePathsNV = NULL;
+PFNGLISPATHNVPROC __glewIsPathNV = NULL;
+PFNGLISPOINTINFILLPATHNVPROC __glewIsPointInFillPathNV = NULL;
+PFNGLISPOINTINSTROKEPATHNVPROC __glewIsPointInStrokePathNV = NULL;
+PFNGLPATHCOLORGENNVPROC __glewPathColorGenNV = NULL;
+PFNGLPATHCOMMANDSNVPROC __glewPathCommandsNV = NULL;
+PFNGLPATHCOORDSNVPROC __glewPathCoordsNV = NULL;
+PFNGLPATHCOVERDEPTHFUNCNVPROC __glewPathCoverDepthFuncNV = NULL;
+PFNGLPATHDASHARRAYNVPROC __glewPathDashArrayNV = NULL;
+PFNGLPATHFOGGENNVPROC __glewPathFogGenNV = NULL;
+PFNGLPATHGLYPHRANGENVPROC __glewPathGlyphRangeNV = NULL;
+PFNGLPATHGLYPHSNVPROC __glewPathGlyphsNV = NULL;
+PFNGLPATHPARAMETERFNVPROC __glewPathParameterfNV = NULL;
+PFNGLPATHPARAMETERFVNVPROC __glewPathParameterfvNV = NULL;
+PFNGLPATHPARAMETERINVPROC __glewPathParameteriNV = NULL;
+PFNGLPATHPARAMETERIVNVPROC __glewPathParameterivNV = NULL;
+PFNGLPATHSTENCILDEPTHOFFSETNVPROC __glewPathStencilDepthOffsetNV = NULL;
+PFNGLPATHSTENCILFUNCNVPROC __glewPathStencilFuncNV = NULL;
+PFNGLPATHSTRINGNVPROC __glewPathStringNV = NULL;
+PFNGLPATHSUBCOMMANDSNVPROC __glewPathSubCommandsNV = NULL;
+PFNGLPATHSUBCOORDSNVPROC __glewPathSubCoordsNV = NULL;
+PFNGLPATHTEXGENNVPROC __glewPathTexGenNV = NULL;
+PFNGLPOINTALONGPATHNVPROC __glewPointAlongPathNV = NULL;
+PFNGLSTENCILFILLPATHINSTANCEDNVPROC __glewStencilFillPathInstancedNV = NULL;
+PFNGLSTENCILFILLPATHNVPROC __glewStencilFillPathNV = NULL;
+PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC __glewStencilStrokePathInstancedNV = NULL;
+PFNGLSTENCILSTROKEPATHNVPROC __glewStencilStrokePathNV = NULL;
+PFNGLTRANSFORMPATHNVPROC __glewTransformPathNV = NULL;
+PFNGLWEIGHTPATHSNVPROC __glewWeightPathsNV = NULL;
+
PFNGLFLUSHPIXELDATARANGENVPROC __glewFlushPixelDataRangeNV = NULL;
PFNGLPIXELDATARANGENVPROC __glewPixelDataRangeNV = NULL;
@@ -2427,6 +2502,7 @@ GLboolean __GLEW_VERSION_3_2 = GL_FALSE;
GLboolean __GLEW_VERSION_3_3 = GL_FALSE;
GLboolean __GLEW_VERSION_4_0 = GL_FALSE;
GLboolean __GLEW_VERSION_4_1 = GL_FALSE;
+GLboolean __GLEW_VERSION_4_2 = GL_FALSE;
GLboolean __GLEW_3DFX_multisample = GL_FALSE;
GLboolean __GLEW_3DFX_tbuffer = GL_FALSE;
GLboolean __GLEW_3DFX_texture_compression_FXT1 = GL_FALSE;
@@ -2435,6 +2511,7 @@ GLboolean __GLEW_AMD_conservative_depth = GL_FALSE;
GLboolean __GLEW_AMD_debug_output = GL_FALSE;
GLboolean __GLEW_AMD_depth_clamp_separate = GL_FALSE;
GLboolean __GLEW_AMD_draw_buffers_blend = GL_FALSE;
+GLboolean __GLEW_AMD_multi_draw_indirect = GL_FALSE;
GLboolean __GLEW_AMD_name_gen_delete = GL_FALSE;
GLboolean __GLEW_AMD_performance_monitor = GL_FALSE;
GLboolean __GLEW_AMD_sample_positions = GL_FALSE;
@@ -2461,10 +2538,13 @@ GLboolean __GLEW_APPLE_vertex_array_range = GL_FALSE;
GLboolean __GLEW_APPLE_vertex_program_evaluators = GL_FALSE;
GLboolean __GLEW_APPLE_ycbcr_422 = GL_FALSE;
GLboolean __GLEW_ARB_ES2_compatibility = GL_FALSE;
+GLboolean __GLEW_ARB_base_instance = GL_FALSE;
GLboolean __GLEW_ARB_blend_func_extended = GL_FALSE;
GLboolean __GLEW_ARB_cl_event = GL_FALSE;
GLboolean __GLEW_ARB_color_buffer_float = GL_FALSE;
GLboolean __GLEW_ARB_compatibility = GL_FALSE;
+GLboolean __GLEW_ARB_compressed_texture_pixel_storage = GL_FALSE;
+GLboolean __GLEW_ARB_conservative_depth = GL_FALSE;
GLboolean __GLEW_ARB_copy_buffer = GL_FALSE;
GLboolean __GLEW_ARB_debug_output = GL_FALSE;
GLboolean __GLEW_ARB_depth_buffer_float = GL_FALSE;
@@ -2490,6 +2570,8 @@ GLboolean __GLEW_ARB_half_float_pixel = GL_FALSE;
GLboolean __GLEW_ARB_half_float_vertex = GL_FALSE;
GLboolean __GLEW_ARB_imaging = GL_FALSE;
GLboolean __GLEW_ARB_instanced_arrays = GL_FALSE;
+GLboolean __GLEW_ARB_internalformat_query = GL_FALSE;
+GLboolean __GLEW_ARB_map_buffer_alignment = GL_FALSE;
GLboolean __GLEW_ARB_map_buffer_range = GL_FALSE;
GLboolean __GLEW_ARB_matrix_palette = GL_FALSE;
GLboolean __GLEW_ARB_multisample = GL_FALSE;
@@ -2505,14 +2587,18 @@ GLboolean __GLEW_ARB_sample_shading = GL_FALSE;
GLboolean __GLEW_ARB_sampler_objects = GL_FALSE;
GLboolean __GLEW_ARB_seamless_cube_map = GL_FALSE;
GLboolean __GLEW_ARB_separate_shader_objects = GL_FALSE;
+GLboolean __GLEW_ARB_shader_atomic_counters = GL_FALSE;
GLboolean __GLEW_ARB_shader_bit_encoding = GL_FALSE;
+GLboolean __GLEW_ARB_shader_image_load_store = GL_FALSE;
GLboolean __GLEW_ARB_shader_objects = GL_FALSE;
GLboolean __GLEW_ARB_shader_precision = GL_FALSE;
GLboolean __GLEW_ARB_shader_stencil_export = GL_FALSE;
GLboolean __GLEW_ARB_shader_subroutine = GL_FALSE;
GLboolean __GLEW_ARB_shader_texture_lod = GL_FALSE;
GLboolean __GLEW_ARB_shading_language_100 = GL_FALSE;
+GLboolean __GLEW_ARB_shading_language_420pack = GL_FALSE;
GLboolean __GLEW_ARB_shading_language_include = GL_FALSE;
+GLboolean __GLEW_ARB_shading_language_packing = GL_FALSE;
GLboolean __GLEW_ARB_shadow = GL_FALSE;
GLboolean __GLEW_ARB_shadow_ambient = GL_FALSE;
GLboolean __GLEW_ARB_sync = GL_FALSE;
@@ -2538,10 +2624,12 @@ GLboolean __GLEW_ARB_texture_query_lod = GL_FALSE;
GLboolean __GLEW_ARB_texture_rectangle = GL_FALSE;
GLboolean __GLEW_ARB_texture_rg = GL_FALSE;
GLboolean __GLEW_ARB_texture_rgb10_a2ui = GL_FALSE;
+GLboolean __GLEW_ARB_texture_storage = GL_FALSE;
GLboolean __GLEW_ARB_texture_swizzle = GL_FALSE;
GLboolean __GLEW_ARB_timer_query = GL_FALSE;
GLboolean __GLEW_ARB_transform_feedback2 = GL_FALSE;
GLboolean __GLEW_ARB_transform_feedback3 = GL_FALSE;
+GLboolean __GLEW_ARB_transform_feedback_instanced = GL_FALSE;
GLboolean __GLEW_ARB_transpose_matrix = GL_FALSE;
GLboolean __GLEW_ARB_uniform_buffer_object = GL_FALSE;
GLboolean __GLEW_ARB_vertex_array_bgra = GL_FALSE;
@@ -2603,6 +2691,7 @@ GLboolean __GLEW_EXT_fog_coord = GL_FALSE;
GLboolean __GLEW_EXT_fragment_lighting = GL_FALSE;
GLboolean __GLEW_EXT_framebuffer_blit = GL_FALSE;
GLboolean __GLEW_EXT_framebuffer_multisample = GL_FALSE;
+GLboolean __GLEW_EXT_framebuffer_multisample_blit_scaled = GL_FALSE;
GLboolean __GLEW_EXT_framebuffer_object = GL_FALSE;
GLboolean __GLEW_EXT_framebuffer_sRGB = GL_FALSE;
GLboolean __GLEW_EXT_geometry_shader4 = GL_FALSE;
@@ -2727,6 +2816,7 @@ GLboolean __GLEW_NV_occlusion_query = GL_FALSE;
GLboolean __GLEW_NV_packed_depth_stencil = GL_FALSE;
GLboolean __GLEW_NV_parameter_buffer_object = GL_FALSE;
GLboolean __GLEW_NV_parameter_buffer_object2 = GL_FALSE;
+GLboolean __GLEW_NV_path_rendering = GL_FALSE;
GLboolean __GLEW_NV_pixel_data_range = GL_FALSE;
GLboolean __GLEW_NV_point_sprite = GL_FALSE;
GLboolean __GLEW_NV_present_video = GL_FALSE;
@@ -3257,6 +3347,10 @@ static GLboolean _glewInit_GL_VERSION_4_0 (GLEW_CONTEXT_ARG_DEF_INIT)
#endif /* GL_VERSION_4_1 */
+#ifdef GL_VERSION_4_2
+
+#endif /* GL_VERSION_4_2 */
+
#ifdef GL_3DFX_multisample
#endif /* GL_3DFX_multisample */
@@ -3322,6 +3416,20 @@ static GLboolean _glewInit_GL_AMD_draw_buffers_blend (GLEW_CONTEXT_ARG_DEF_INIT)
#endif /* GL_AMD_draw_buffers_blend */
+#ifdef GL_AMD_multi_draw_indirect
+
+static GLboolean _glewInit_GL_AMD_multi_draw_indirect (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glMultiDrawArraysIndirectAMD = (PFNGLMULTIDRAWARRAYSINDIRECTAMDPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawArraysIndirectAMD")) == NULL) || r;
+ r = ((glMultiDrawElementsIndirectAMD = (PFNGLMULTIDRAWELEMENTSINDIRECTAMDPROC)glewGetProcAddress((const GLubyte*)"glMultiDrawElementsIndirectAMD")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GL_AMD_multi_draw_indirect */
+
#ifdef GL_AMD_name_gen_delete
static GLboolean _glewInit_GL_AMD_name_gen_delete (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -3586,6 +3694,21 @@ static GLboolean _glewInit_GL_ARB_ES2_compatibility (GLEW_CONTEXT_ARG_DEF_INIT)
#endif /* GL_ARB_ES2_compatibility */
+#ifdef GL_ARB_base_instance
+
+static GLboolean _glewInit_GL_ARB_base_instance (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glDrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC)glewGetProcAddress((const GLubyte*)"glDrawArraysInstancedBaseInstance")) == NULL) || r;
+ r = ((glDrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC)glewGetProcAddress((const GLubyte*)"glDrawElementsInstancedBaseInstance")) == NULL) || r;
+ r = ((glDrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC)glewGetProcAddress((const GLubyte*)"glDrawElementsInstancedBaseVertexBaseInstance")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GL_ARB_base_instance */
+
#ifdef GL_ARB_blend_func_extended
static GLboolean _glewInit_GL_ARB_blend_func_extended (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -3630,6 +3753,14 @@ static GLboolean _glewInit_GL_ARB_color_buffer_float (GLEW_CONTEXT_ARG_DEF_INIT)
#endif /* GL_ARB_compatibility */
+#ifdef GL_ARB_compressed_texture_pixel_storage
+
+#endif /* GL_ARB_compressed_texture_pixel_storage */
+
+#ifdef GL_ARB_conservative_depth
+
+#endif /* GL_ARB_conservative_depth */
+
#ifdef GL_ARB_copy_buffer
static GLboolean _glewInit_GL_ARB_copy_buffer (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -3940,6 +4071,23 @@ static GLboolean _glewInit_GL_ARB_instanced_arrays (GLEW_CONTEXT_ARG_DEF_INIT)
#endif /* GL_ARB_instanced_arrays */
+#ifdef GL_ARB_internalformat_query
+
+static GLboolean _glewInit_GL_ARB_internalformat_query (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC)glewGetProcAddress((const GLubyte*)"glGetInternalformativ")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GL_ARB_internalformat_query */
+
+#ifdef GL_ARB_map_buffer_alignment
+
+#endif /* GL_ARB_map_buffer_alignment */
+
#ifdef GL_ARB_map_buffer_range
static GLboolean _glewInit_GL_ARB_map_buffer_range (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -4095,6 +4243,7 @@ static GLboolean _glewInit_GL_ARB_robustness (GLEW_CONTEXT_ARG_DEF_INIT)
{
GLboolean r = GL_FALSE;
+ r = ((glGetGraphicsResetStatusARB = (PFNGLGETGRAPHICSRESETSTATUSARBPROC)glewGetProcAddress((const GLubyte*)"glGetGraphicsResetStatusARB")) == NULL) || r;
r = ((glGetnColorTableARB = (PFNGLGETNCOLORTABLEARBPROC)glewGetProcAddress((const GLubyte*)"glGetnColorTableARB")) == NULL) || r;
r = ((glGetnCompressedTexImageARB = (PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC)glewGetProcAddress((const GLubyte*)"glGetnCompressedTexImageARB")) == NULL) || r;
r = ((glGetnConvolutionFilterARB = (PFNGLGETNCONVOLUTIONFILTERARBPROC)glewGetProcAddress((const GLubyte*)"glGetnConvolutionFilterARB")) == NULL) || r;
@@ -4235,10 +4384,37 @@ static GLboolean _glewInit_GL_ARB_separate_shader_objects (GLEW_CONTEXT_ARG_DEF_
#endif /* GL_ARB_separate_shader_objects */
+#ifdef GL_ARB_shader_atomic_counters
+
+static GLboolean _glewInit_GL_ARB_shader_atomic_counters (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glGetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC)glewGetProcAddress((const GLubyte*)"glGetActiveAtomicCounterBufferiv")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GL_ARB_shader_atomic_counters */
+
#ifdef GL_ARB_shader_bit_encoding
#endif /* GL_ARB_shader_bit_encoding */
+#ifdef GL_ARB_shader_image_load_store
+
+static GLboolean _glewInit_GL_ARB_shader_image_load_store (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC)glewGetProcAddress((const GLubyte*)"glBindImageTexture")) == NULL) || r;
+ r = ((glMemoryBarrier = (PFNGLMEMORYBARRIERPROC)glewGetProcAddress((const GLubyte*)"glMemoryBarrier")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GL_ARB_shader_image_load_store */
+
#ifdef GL_ARB_shader_objects
static GLboolean _glewInit_GL_ARB_shader_objects (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -4326,6 +4502,10 @@ static GLboolean _glewInit_GL_ARB_shader_subroutine (GLEW_CONTEXT_ARG_DEF_INIT)
#endif /* GL_ARB_shading_language_100 */
+#ifdef GL_ARB_shading_language_420pack
+
+#endif /* GL_ARB_shading_language_420pack */
+
#ifdef GL_ARB_shading_language_include
static GLboolean _glewInit_GL_ARB_shading_language_include (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -4344,6 +4524,10 @@ static GLboolean _glewInit_GL_ARB_shading_language_include (GLEW_CONTEXT_ARG_DEF
#endif /* GL_ARB_shading_language_include */
+#ifdef GL_ARB_shading_language_packing
+
+#endif /* GL_ARB_shading_language_packing */
+
#ifdef GL_ARB_shadow
#endif /* GL_ARB_shadow */
@@ -4505,6 +4689,24 @@ static GLboolean _glewInit_GL_ARB_texture_multisample (GLEW_CONTEXT_ARG_DEF_INIT
#endif /* GL_ARB_texture_rgb10_a2ui */
+#ifdef GL_ARB_texture_storage
+
+static GLboolean _glewInit_GL_ARB_texture_storage (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glTexStorage1D = (PFNGLTEXSTORAGE1DPROC)glewGetProcAddress((const GLubyte*)"glTexStorage1D")) == NULL) || r;
+ r = ((glTexStorage2D = (PFNGLTEXSTORAGE2DPROC)glewGetProcAddress((const GLubyte*)"glTexStorage2D")) == NULL) || r;
+ r = ((glTexStorage3D = (PFNGLTEXSTORAGE3DPROC)glewGetProcAddress((const GLubyte*)"glTexStorage3D")) == NULL) || r;
+ r = ((glTextureStorage1DEXT = (PFNGLTEXTURESTORAGE1DEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureStorage1DEXT")) == NULL) || r;
+ r = ((glTextureStorage2DEXT = (PFNGLTEXTURESTORAGE2DEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureStorage2DEXT")) == NULL) || r;
+ r = ((glTextureStorage3DEXT = (PFNGLTEXTURESTORAGE3DEXTPROC)glewGetProcAddress((const GLubyte*)"glTextureStorage3DEXT")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GL_ARB_texture_storage */
+
#ifdef GL_ARB_texture_swizzle
#endif /* GL_ARB_texture_swizzle */
@@ -4559,6 +4761,20 @@ static GLboolean _glewInit_GL_ARB_transform_feedback3 (GLEW_CONTEXT_ARG_DEF_INIT
#endif /* GL_ARB_transform_feedback3 */
+#ifdef GL_ARB_transform_feedback_instanced
+
+static GLboolean _glewInit_GL_ARB_transform_feedback_instanced (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glDrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC)glewGetProcAddress((const GLubyte*)"glDrawTransformFeedbackInstanced")) == NULL) || r;
+ r = ((glDrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC)glewGetProcAddress((const GLubyte*)"glDrawTransformFeedbackStreamInstanced")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GL_ARB_transform_feedback_instanced */
+
#ifdef GL_ARB_transpose_matrix
static GLboolean _glewInit_GL_ARB_transpose_matrix (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -5670,6 +5886,10 @@ static GLboolean _glewInit_GL_EXT_framebuffer_multisample (GLEW_CONTEXT_ARG_DEF_
#endif /* GL_EXT_framebuffer_multisample */
+#ifdef GL_EXT_framebuffer_multisample_blit_scaled
+
+#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
+
#ifdef GL_EXT_framebuffer_object
static GLboolean _glewInit_GL_EXT_framebuffer_object (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -6579,11 +6799,11 @@ static GLboolean _glewInit_GL_KTX_buffer_region (GLEW_CONTEXT_ARG_DEF_INIT)
{
GLboolean r = GL_FALSE;
- r = ((glBufferRegionEnabledEXT = (PFNGLBUFFERREGIONENABLEDEXTPROC)glewGetProcAddress((const GLubyte*)"glBufferRegionEnabledEXT")) == NULL) || r;
- r = ((glDeleteBufferRegionEXT = (PFNGLDELETEBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glDeleteBufferRegionEXT")) == NULL) || r;
- r = ((glDrawBufferRegionEXT = (PFNGLDRAWBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glDrawBufferRegionEXT")) == NULL) || r;
- r = ((glNewBufferRegionEXT = (PFNGLNEWBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glNewBufferRegionEXT")) == NULL) || r;
- r = ((glReadBufferRegionEXT = (PFNGLREADBUFFERREGIONEXTPROC)glewGetProcAddress((const GLubyte*)"glReadBufferRegionEXT")) == NULL) || r;
+ r = ((glBufferRegionEnabled = (PFNGLBUFFERREGIONENABLEDPROC)glewGetProcAddress((const GLubyte*)"glBufferRegionEnabled")) == NULL) || r;
+ r = ((glDeleteBufferRegion = (PFNGLDELETEBUFFERREGIONPROC)glewGetProcAddress((const GLubyte*)"glDeleteBufferRegion")) == NULL) || r;
+ r = ((glDrawBufferRegion = (PFNGLDRAWBUFFERREGIONPROC)glewGetProcAddress((const GLubyte*)"glDrawBufferRegion")) == NULL) || r;
+ r = ((glNewBufferRegion = (PFNGLNEWBUFFERREGIONPROC)glewGetProcAddress((const GLubyte*)"glNewBufferRegion")) == NULL) || r;
+ r = ((glReadBufferRegion = (PFNGLREADBUFFERREGIONPROC)glewGetProcAddress((const GLubyte*)"glReadBufferRegion")) == NULL) || r;
return r;
}
@@ -7026,6 +7246,67 @@ static GLboolean _glewInit_GL_NV_parameter_buffer_object (GLEW_CONTEXT_ARG_DEF_I
#endif /* GL_NV_parameter_buffer_object2 */
+#ifdef GL_NV_path_rendering
+
+static GLboolean _glewInit_GL_NV_path_rendering (GLEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glCopyPathNV = (PFNGLCOPYPATHNVPROC)glewGetProcAddress((const GLubyte*)"glCopyPathNV")) == NULL) || r;
+ r = ((glCoverFillPathInstancedNV = (PFNGLCOVERFILLPATHINSTANCEDNVPROC)glewGetProcAddress((const GLubyte*)"glCoverFillPathInstancedNV")) == NULL) || r;
+ r = ((glCoverFillPathNV = (PFNGLCOVERFILLPATHNVPROC)glewGetProcAddress((const GLubyte*)"glCoverFillPathNV")) == NULL) || r;
+ r = ((glCoverStrokePathInstancedNV = (PFNGLCOVERSTROKEPATHINSTANCEDNVPROC)glewGetProcAddress((const GLubyte*)"glCoverStrokePathInstancedNV")) == NULL) || r;
+ r = ((glCoverStrokePathNV = (PFNGLCOVERSTROKEPATHNVPROC)glewGetProcAddress((const GLubyte*)"glCoverStrokePathNV")) == NULL) || r;
+ r = ((glDeletePathsNV = (PFNGLDELETEPATHSNVPROC)glewGetProcAddress((const GLubyte*)"glDeletePathsNV")) == NULL) || r;
+ r = ((glGenPathsNV = (PFNGLGENPATHSNVPROC)glewGetProcAddress((const GLubyte*)"glGenPathsNV")) == NULL) || r;
+ r = ((glGetPathColorGenfvNV = (PFNGLGETPATHCOLORGENFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathColorGenfvNV")) == NULL) || r;
+ r = ((glGetPathColorGenivNV = (PFNGLGETPATHCOLORGENIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathColorGenivNV")) == NULL) || r;
+ r = ((glGetPathCommandsNV = (PFNGLGETPATHCOMMANDSNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathCommandsNV")) == NULL) || r;
+ r = ((glGetPathCoordsNV = (PFNGLGETPATHCOORDSNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathCoordsNV")) == NULL) || r;
+ r = ((glGetPathDashArrayNV = (PFNGLGETPATHDASHARRAYNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathDashArrayNV")) == NULL) || r;
+ r = ((glGetPathLengthNV = (PFNGLGETPATHLENGTHNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathLengthNV")) == NULL) || r;
+ r = ((glGetPathMetricRangeNV = (PFNGLGETPATHMETRICRANGENVPROC)glewGetProcAddress((const GLubyte*)"glGetPathMetricRangeNV")) == NULL) || r;
+ r = ((glGetPathMetricsNV = (PFNGLGETPATHMETRICSNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathMetricsNV")) == NULL) || r;
+ r = ((glGetPathParameterfvNV = (PFNGLGETPATHPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathParameterfvNV")) == NULL) || r;
+ r = ((glGetPathParameterivNV = (PFNGLGETPATHPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathParameterivNV")) == NULL) || r;
+ r = ((glGetPathSpacingNV = (PFNGLGETPATHSPACINGNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathSpacingNV")) == NULL) || r;
+ r = ((glGetPathTexGenfvNV = (PFNGLGETPATHTEXGENFVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathTexGenfvNV")) == NULL) || r;
+ r = ((glGetPathTexGenivNV = (PFNGLGETPATHTEXGENIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetPathTexGenivNV")) == NULL) || r;
+ r = ((glInterpolatePathsNV = (PFNGLINTERPOLATEPATHSNVPROC)glewGetProcAddress((const GLubyte*)"glInterpolatePathsNV")) == NULL) || r;
+ r = ((glIsPathNV = (PFNGLISPATHNVPROC)glewGetProcAddress((const GLubyte*)"glIsPathNV")) == NULL) || r;
+ r = ((glIsPointInFillPathNV = (PFNGLISPOINTINFILLPATHNVPROC)glewGetProcAddress((const GLubyte*)"glIsPointInFillPathNV")) == NULL) || r;
+ r = ((glIsPointInStrokePathNV = (PFNGLISPOINTINSTROKEPATHNVPROC)glewGetProcAddress((const GLubyte*)"glIsPointInStrokePathNV")) == NULL) || r;
+ r = ((glPathColorGenNV = (PFNGLPATHCOLORGENNVPROC)glewGetProcAddress((const GLubyte*)"glPathColorGenNV")) == NULL) || r;
+ r = ((glPathCommandsNV = (PFNGLPATHCOMMANDSNVPROC)glewGetProcAddress((const GLubyte*)"glPathCommandsNV")) == NULL) || r;
+ r = ((glPathCoordsNV = (PFNGLPATHCOORDSNVPROC)glewGetProcAddress((const GLubyte*)"glPathCoordsNV")) == NULL) || r;
+ r = ((glPathCoverDepthFuncNV = (PFNGLPATHCOVERDEPTHFUNCNVPROC)glewGetProcAddress((const GLubyte*)"glPathCoverDepthFuncNV")) == NULL) || r;
+ r = ((glPathDashArrayNV = (PFNGLPATHDASHARRAYNVPROC)glewGetProcAddress((const GLubyte*)"glPathDashArrayNV")) == NULL) || r;
+ r = ((glPathFogGenNV = (PFNGLPATHFOGGENNVPROC)glewGetProcAddress((const GLubyte*)"glPathFogGenNV")) == NULL) || r;
+ r = ((glPathGlyphRangeNV = (PFNGLPATHGLYPHRANGENVPROC)glewGetProcAddress((const GLubyte*)"glPathGlyphRangeNV")) == NULL) || r;
+ r = ((glPathGlyphsNV = (PFNGLPATHGLYPHSNVPROC)glewGetProcAddress((const GLubyte*)"glPathGlyphsNV")) == NULL) || r;
+ r = ((glPathParameterfNV = (PFNGLPATHPARAMETERFNVPROC)glewGetProcAddress((const GLubyte*)"glPathParameterfNV")) == NULL) || r;
+ r = ((glPathParameterfvNV = (PFNGLPATHPARAMETERFVNVPROC)glewGetProcAddress((const GLubyte*)"glPathParameterfvNV")) == NULL) || r;
+ r = ((glPathParameteriNV = (PFNGLPATHPARAMETERINVPROC)glewGetProcAddress((const GLubyte*)"glPathParameteriNV")) == NULL) || r;
+ r = ((glPathParameterivNV = (PFNGLPATHPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glPathParameterivNV")) == NULL) || r;
+ r = ((glPathStencilDepthOffsetNV = (PFNGLPATHSTENCILDEPTHOFFSETNVPROC)glewGetProcAddress((const GLubyte*)"glPathStencilDepthOffsetNV")) == NULL) || r;
+ r = ((glPathStencilFuncNV = (PFNGLPATHSTENCILFUNCNVPROC)glewGetProcAddress((const GLubyte*)"glPathStencilFuncNV")) == NULL) || r;
+ r = ((glPathStringNV = (PFNGLPATHSTRINGNVPROC)glewGetProcAddress((const GLubyte*)"glPathStringNV")) == NULL) || r;
+ r = ((glPathSubCommandsNV = (PFNGLPATHSUBCOMMANDSNVPROC)glewGetProcAddress((const GLubyte*)"glPathSubCommandsNV")) == NULL) || r;
+ r = ((glPathSubCoordsNV = (PFNGLPATHSUBCOORDSNVPROC)glewGetProcAddress((const GLubyte*)"glPathSubCoordsNV")) == NULL) || r;
+ r = ((glPathTexGenNV = (PFNGLPATHTEXGENNVPROC)glewGetProcAddress((const GLubyte*)"glPathTexGenNV")) == NULL) || r;
+ r = ((glPointAlongPathNV = (PFNGLPOINTALONGPATHNVPROC)glewGetProcAddress((const GLubyte*)"glPointAlongPathNV")) == NULL) || r;
+ r = ((glStencilFillPathInstancedNV = (PFNGLSTENCILFILLPATHINSTANCEDNVPROC)glewGetProcAddress((const GLubyte*)"glStencilFillPathInstancedNV")) == NULL) || r;
+ r = ((glStencilFillPathNV = (PFNGLSTENCILFILLPATHNVPROC)glewGetProcAddress((const GLubyte*)"glStencilFillPathNV")) == NULL) || r;
+ r = ((glStencilStrokePathInstancedNV = (PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC)glewGetProcAddress((const GLubyte*)"glStencilStrokePathInstancedNV")) == NULL) || r;
+ r = ((glStencilStrokePathNV = (PFNGLSTENCILSTROKEPATHNVPROC)glewGetProcAddress((const GLubyte*)"glStencilStrokePathNV")) == NULL) || r;
+ r = ((glTransformPathNV = (PFNGLTRANSFORMPATHNVPROC)glewGetProcAddress((const GLubyte*)"glTransformPathNV")) == NULL) || r;
+ r = ((glWeightPathsNV = (PFNGLWEIGHTPATHSNVPROC)glewGetProcAddress((const GLubyte*)"glWeightPathsNV")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GL_NV_path_rendering */
+
#ifdef GL_NV_pixel_data_range
static GLboolean _glewInit_GL_NV_pixel_data_range (GLEW_CONTEXT_ARG_DEF_INIT)
@@ -8108,7 +8389,8 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
}
else
{
- CONST_CAST(GLEW_VERSION_4_1) = ( major > 4 ) || ( major == 4 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
+ CONST_CAST(GLEW_VERSION_4_2) = ( major > 4 ) || ( major == 4 && minor >= 2 ) ? GL_TRUE : GL_FALSE;
+ CONST_CAST(GLEW_VERSION_4_1) = GLEW_VERSION_4_2 == GL_TRUE || ( major == 4 && minor >= 1 ) ? GL_TRUE : GL_FALSE;
CONST_CAST(GLEW_VERSION_4_0) = GLEW_VERSION_4_1 == GL_TRUE || ( major == 4 ) ? GL_TRUE : GL_FALSE;
CONST_CAST(GLEW_VERSION_3_3) = GLEW_VERSION_4_0 == GL_TRUE || ( major == 3 && minor >= 3 ) ? GL_TRUE : GL_FALSE;
CONST_CAST(GLEW_VERSION_3_2) = GLEW_VERSION_3_3 == GL_TRUE || ( major == 3 && minor >= 2 ) ? GL_TRUE : GL_FALSE;
@@ -8168,6 +8450,8 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
#endif /* GL_VERSION_4_0 */
#ifdef GL_VERSION_4_1
#endif /* GL_VERSION_4_1 */
+#ifdef GL_VERSION_4_2
+#endif /* GL_VERSION_4_2 */
#ifdef GL_3DFX_multisample
CONST_CAST(GLEW_3DFX_multisample) = _glewSearchExtension("GL_3DFX_multisample", extStart, extEnd);
#endif /* GL_3DFX_multisample */
@@ -8195,6 +8479,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
CONST_CAST(GLEW_AMD_draw_buffers_blend) = _glewSearchExtension("GL_AMD_draw_buffers_blend", extStart, extEnd);
if (glewExperimental || GLEW_AMD_draw_buffers_blend) CONST_CAST(GLEW_AMD_draw_buffers_blend) = !_glewInit_GL_AMD_draw_buffers_blend(GLEW_CONTEXT_ARG_VAR_INIT);
#endif /* GL_AMD_draw_buffers_blend */
+#ifdef GL_AMD_multi_draw_indirect
+ CONST_CAST(GLEW_AMD_multi_draw_indirect) = _glewSearchExtension("GL_AMD_multi_draw_indirect", extStart, extEnd);
+ if (glewExperimental || GLEW_AMD_multi_draw_indirect) CONST_CAST(GLEW_AMD_multi_draw_indirect) = !_glewInit_GL_AMD_multi_draw_indirect(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_AMD_multi_draw_indirect */
#ifdef GL_AMD_name_gen_delete
CONST_CAST(GLEW_AMD_name_gen_delete) = _glewSearchExtension("GL_AMD_name_gen_delete", extStart, extEnd);
if (glewExperimental || GLEW_AMD_name_gen_delete) CONST_CAST(GLEW_AMD_name_gen_delete) = !_glewInit_GL_AMD_name_gen_delete(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8286,6 +8574,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
CONST_CAST(GLEW_ARB_ES2_compatibility) = _glewSearchExtension("GL_ARB_ES2_compatibility", extStart, extEnd);
if (glewExperimental || GLEW_ARB_ES2_compatibility) CONST_CAST(GLEW_ARB_ES2_compatibility) = !_glewInit_GL_ARB_ES2_compatibility(GLEW_CONTEXT_ARG_VAR_INIT);
#endif /* GL_ARB_ES2_compatibility */
+#ifdef GL_ARB_base_instance
+ CONST_CAST(GLEW_ARB_base_instance) = _glewSearchExtension("GL_ARB_base_instance", extStart, extEnd);
+ if (glewExperimental || GLEW_ARB_base_instance) CONST_CAST(GLEW_ARB_base_instance) = !_glewInit_GL_ARB_base_instance(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_base_instance */
#ifdef GL_ARB_blend_func_extended
CONST_CAST(GLEW_ARB_blend_func_extended) = _glewSearchExtension("GL_ARB_blend_func_extended", extStart, extEnd);
if (glewExperimental || GLEW_ARB_blend_func_extended) CONST_CAST(GLEW_ARB_blend_func_extended) = !_glewInit_GL_ARB_blend_func_extended(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8301,6 +8593,12 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
#ifdef GL_ARB_compatibility
CONST_CAST(GLEW_ARB_compatibility) = _glewSearchExtension("GL_ARB_compatibility", extStart, extEnd);
#endif /* GL_ARB_compatibility */
+#ifdef GL_ARB_compressed_texture_pixel_storage
+ CONST_CAST(GLEW_ARB_compressed_texture_pixel_storage) = _glewSearchExtension("GL_ARB_compressed_texture_pixel_storage", extStart, extEnd);
+#endif /* GL_ARB_compressed_texture_pixel_storage */
+#ifdef GL_ARB_conservative_depth
+ CONST_CAST(GLEW_ARB_conservative_depth) = _glewSearchExtension("GL_ARB_conservative_depth", extStart, extEnd);
+#endif /* GL_ARB_conservative_depth */
#ifdef GL_ARB_copy_buffer
CONST_CAST(GLEW_ARB_copy_buffer) = _glewSearchExtension("GL_ARB_copy_buffer", extStart, extEnd);
if (glewExperimental || GLEW_ARB_copy_buffer) CONST_CAST(GLEW_ARB_copy_buffer) = !_glewInit_GL_ARB_copy_buffer(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8388,6 +8686,13 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
CONST_CAST(GLEW_ARB_instanced_arrays) = _glewSearchExtension("GL_ARB_instanced_arrays", extStart, extEnd);
if (glewExperimental || GLEW_ARB_instanced_arrays) CONST_CAST(GLEW_ARB_instanced_arrays) = !_glewInit_GL_ARB_instanced_arrays(GLEW_CONTEXT_ARG_VAR_INIT);
#endif /* GL_ARB_instanced_arrays */
+#ifdef GL_ARB_internalformat_query
+ CONST_CAST(GLEW_ARB_internalformat_query) = _glewSearchExtension("GL_ARB_internalformat_query", extStart, extEnd);
+ if (glewExperimental || GLEW_ARB_internalformat_query) CONST_CAST(GLEW_ARB_internalformat_query) = !_glewInit_GL_ARB_internalformat_query(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_internalformat_query */
+#ifdef GL_ARB_map_buffer_alignment
+ CONST_CAST(GLEW_ARB_map_buffer_alignment) = _glewSearchExtension("GL_ARB_map_buffer_alignment", extStart, extEnd);
+#endif /* GL_ARB_map_buffer_alignment */
#ifdef GL_ARB_map_buffer_range
CONST_CAST(GLEW_ARB_map_buffer_range) = _glewSearchExtension("GL_ARB_map_buffer_range", extStart, extEnd);
if (glewExperimental || GLEW_ARB_map_buffer_range) CONST_CAST(GLEW_ARB_map_buffer_range) = !_glewInit_GL_ARB_map_buffer_range(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8444,9 +8749,17 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
CONST_CAST(GLEW_ARB_separate_shader_objects) = _glewSearchExtension("GL_ARB_separate_shader_objects", extStart, extEnd);
if (glewExperimental || GLEW_ARB_separate_shader_objects) CONST_CAST(GLEW_ARB_separate_shader_objects) = !_glewInit_GL_ARB_separate_shader_objects(GLEW_CONTEXT_ARG_VAR_INIT);
#endif /* GL_ARB_separate_shader_objects */
+#ifdef GL_ARB_shader_atomic_counters
+ CONST_CAST(GLEW_ARB_shader_atomic_counters) = _glewSearchExtension("GL_ARB_shader_atomic_counters", extStart, extEnd);
+ if (glewExperimental || GLEW_ARB_shader_atomic_counters) CONST_CAST(GLEW_ARB_shader_atomic_counters) = !_glewInit_GL_ARB_shader_atomic_counters(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_shader_atomic_counters */
#ifdef GL_ARB_shader_bit_encoding
CONST_CAST(GLEW_ARB_shader_bit_encoding) = _glewSearchExtension("GL_ARB_shader_bit_encoding", extStart, extEnd);
#endif /* GL_ARB_shader_bit_encoding */
+#ifdef GL_ARB_shader_image_load_store
+ CONST_CAST(GLEW_ARB_shader_image_load_store) = _glewSearchExtension("GL_ARB_shader_image_load_store", extStart, extEnd);
+ if (glewExperimental || GLEW_ARB_shader_image_load_store) CONST_CAST(GLEW_ARB_shader_image_load_store) = !_glewInit_GL_ARB_shader_image_load_store(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_shader_image_load_store */
#ifdef GL_ARB_shader_objects
CONST_CAST(GLEW_ARB_shader_objects) = _glewSearchExtension("GL_ARB_shader_objects", extStart, extEnd);
if (glewExperimental || GLEW_ARB_shader_objects) CONST_CAST(GLEW_ARB_shader_objects) = !_glewInit_GL_ARB_shader_objects(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8467,10 +8780,16 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
#ifdef GL_ARB_shading_language_100
CONST_CAST(GLEW_ARB_shading_language_100) = _glewSearchExtension("GL_ARB_shading_language_100", extStart, extEnd);
#endif /* GL_ARB_shading_language_100 */
+#ifdef GL_ARB_shading_language_420pack
+ CONST_CAST(GLEW_ARB_shading_language_420pack) = _glewSearchExtension("GL_ARB_shading_language_420pack", extStart, extEnd);
+#endif /* GL_ARB_shading_language_420pack */
#ifdef GL_ARB_shading_language_include
CONST_CAST(GLEW_ARB_shading_language_include) = _glewSearchExtension("GL_ARB_shading_language_include", extStart, extEnd);
if (glewExperimental || GLEW_ARB_shading_language_include) CONST_CAST(GLEW_ARB_shading_language_include) = !_glewInit_GL_ARB_shading_language_include(GLEW_CONTEXT_ARG_VAR_INIT);
#endif /* GL_ARB_shading_language_include */
+#ifdef GL_ARB_shading_language_packing
+ CONST_CAST(GLEW_ARB_shading_language_packing) = _glewSearchExtension("GL_ARB_shading_language_packing", extStart, extEnd);
+#endif /* GL_ARB_shading_language_packing */
#ifdef GL_ARB_shadow
CONST_CAST(GLEW_ARB_shadow) = _glewSearchExtension("GL_ARB_shadow", extStart, extEnd);
#endif /* GL_ARB_shadow */
@@ -8551,6 +8870,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
#ifdef GL_ARB_texture_rgb10_a2ui
CONST_CAST(GLEW_ARB_texture_rgb10_a2ui) = _glewSearchExtension("GL_ARB_texture_rgb10_a2ui", extStart, extEnd);
#endif /* GL_ARB_texture_rgb10_a2ui */
+#ifdef GL_ARB_texture_storage
+ CONST_CAST(GLEW_ARB_texture_storage) = _glewSearchExtension("GL_ARB_texture_storage", extStart, extEnd);
+ if (glewExperimental || GLEW_ARB_texture_storage) CONST_CAST(GLEW_ARB_texture_storage) = !_glewInit_GL_ARB_texture_storage(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_texture_storage */
#ifdef GL_ARB_texture_swizzle
CONST_CAST(GLEW_ARB_texture_swizzle) = _glewSearchExtension("GL_ARB_texture_swizzle", extStart, extEnd);
#endif /* GL_ARB_texture_swizzle */
@@ -8566,6 +8889,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
CONST_CAST(GLEW_ARB_transform_feedback3) = _glewSearchExtension("GL_ARB_transform_feedback3", extStart, extEnd);
if (glewExperimental || GLEW_ARB_transform_feedback3) CONST_CAST(GLEW_ARB_transform_feedback3) = !_glewInit_GL_ARB_transform_feedback3(GLEW_CONTEXT_ARG_VAR_INIT);
#endif /* GL_ARB_transform_feedback3 */
+#ifdef GL_ARB_transform_feedback_instanced
+ CONST_CAST(GLEW_ARB_transform_feedback_instanced) = _glewSearchExtension("GL_ARB_transform_feedback_instanced", extStart, extEnd);
+ if (glewExperimental || GLEW_ARB_transform_feedback_instanced) CONST_CAST(GLEW_ARB_transform_feedback_instanced) = !_glewInit_GL_ARB_transform_feedback_instanced(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_ARB_transform_feedback_instanced */
#ifdef GL_ARB_transpose_matrix
CONST_CAST(GLEW_ARB_transpose_matrix) = _glewSearchExtension("GL_ARB_transpose_matrix", extStart, extEnd);
if (glewExperimental || GLEW_ARB_transpose_matrix) CONST_CAST(GLEW_ARB_transpose_matrix) = !_glewInit_GL_ARB_transpose_matrix(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -8790,6 +9117,9 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
CONST_CAST(GLEW_EXT_framebuffer_multisample) = _glewSearchExtension("GL_EXT_framebuffer_multisample", extStart, extEnd);
if (glewExperimental || GLEW_EXT_framebuffer_multisample) CONST_CAST(GLEW_EXT_framebuffer_multisample) = !_glewInit_GL_EXT_framebuffer_multisample(GLEW_CONTEXT_ARG_VAR_INIT);
#endif /* GL_EXT_framebuffer_multisample */
+#ifdef GL_EXT_framebuffer_multisample_blit_scaled
+ CONST_CAST(GLEW_EXT_framebuffer_multisample_blit_scaled) = _glewSearchExtension("GL_EXT_framebuffer_multisample_blit_scaled", extStart, extEnd);
+#endif /* GL_EXT_framebuffer_multisample_blit_scaled */
#ifdef GL_EXT_framebuffer_object
CONST_CAST(GLEW_EXT_framebuffer_object) = _glewSearchExtension("GL_EXT_framebuffer_object", extStart, extEnd);
if (glewExperimental || GLEW_EXT_framebuffer_object) CONST_CAST(GLEW_EXT_framebuffer_object) = !_glewInit_GL_EXT_framebuffer_object(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -9220,6 +9550,10 @@ GLenum glewContextInit (GLEW_CONTEXT_ARG_DEF_LIST)
#ifdef GL_NV_parameter_buffer_object2
CONST_CAST(GLEW_NV_parameter_buffer_object2) = _glewSearchExtension("GL_NV_parameter_buffer_object2", extStart, extEnd);
#endif /* GL_NV_parameter_buffer_object2 */
+#ifdef GL_NV_path_rendering
+ CONST_CAST(GLEW_NV_path_rendering) = _glewSearchExtension("GL_NV_path_rendering", extStart, extEnd);
+ if (glewExperimental || GLEW_NV_path_rendering) CONST_CAST(GLEW_NV_path_rendering) = !_glewInit_GL_NV_path_rendering(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GL_NV_path_rendering */
#ifdef GL_NV_pixel_data_range
CONST_CAST(GLEW_NV_pixel_data_range) = _glewSearchExtension("GL_NV_pixel_data_range", extStart, extEnd);
if (glewExperimental || GLEW_NV_pixel_data_range) CONST_CAST(GLEW_NV_pixel_data_range) = !_glewInit_GL_NV_pixel_data_range(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -10588,6 +10922,9 @@ PFNGLXRELEASEBUFFERSMESAPROC __glewXReleaseBuffersMESA = NULL;
PFNGLXSET3DFXMODEMESAPROC __glewXSet3DfxModeMESA = NULL;
+PFNGLXGETSWAPINTERVALMESAPROC __glewXGetSwapIntervalMESA = NULL;
+PFNGLXSWAPINTERVALMESAPROC __glewXSwapIntervalMESA = NULL;
+
PFNGLXCOPYIMAGESUBDATANVPROC __glewXCopyImageSubDataNV = NULL;
PFNGLXBINDVIDEODEVICENVPROC __glewXBindVideoDeviceNV = NULL;
@@ -10704,6 +11041,7 @@ GLboolean __GLXEW_MESA_copy_sub_buffer = GL_FALSE;
GLboolean __GLXEW_MESA_pixmap_colormap = GL_FALSE;
GLboolean __GLXEW_MESA_release_buffers = GL_FALSE;
GLboolean __GLXEW_MESA_set_3dfx_mode = GL_FALSE;
+GLboolean __GLXEW_MESA_swap_control = GL_FALSE;
GLboolean __GLXEW_NV_copy_image = GL_FALSE;
GLboolean __GLXEW_NV_float_buffer = GL_FALSE;
GLboolean __GLXEW_NV_multisample_coverage = GL_FALSE;
@@ -10984,6 +11322,20 @@ static GLboolean _glewInit_GLX_MESA_set_3dfx_mode (GLXEW_CONTEXT_ARG_DEF_INIT)
#endif /* GLX_MESA_set_3dfx_mode */
+#ifdef GLX_MESA_swap_control
+
+static GLboolean _glewInit_GLX_MESA_swap_control (GLXEW_CONTEXT_ARG_DEF_INIT)
+{
+ GLboolean r = GL_FALSE;
+
+ r = ((glXGetSwapIntervalMESA = (PFNGLXGETSWAPINTERVALMESAPROC)glewGetProcAddress((const GLubyte*)"glXGetSwapIntervalMESA")) == NULL) || r;
+ r = ((glXSwapIntervalMESA = (PFNGLXSWAPINTERVALMESAPROC)glewGetProcAddress((const GLubyte*)"glXSwapIntervalMESA")) == NULL) || r;
+
+ return r;
+}
+
+#endif /* GLX_MESA_swap_control */
+
#ifdef GLX_NV_copy_image
static GLboolean _glewInit_GLX_NV_copy_image (GLXEW_CONTEXT_ARG_DEF_INIT)
@@ -11454,6 +11806,10 @@ GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
CONST_CAST(GLXEW_MESA_set_3dfx_mode) = _glewSearchExtension("GLX_MESA_set_3dfx_mode", extStart, extEnd);
if (glewExperimental || GLXEW_MESA_set_3dfx_mode) CONST_CAST(GLXEW_MESA_set_3dfx_mode) = !_glewInit_GLX_MESA_set_3dfx_mode(GLEW_CONTEXT_ARG_VAR_INIT);
#endif /* GLX_MESA_set_3dfx_mode */
+#ifdef GLX_MESA_swap_control
+ CONST_CAST(GLXEW_MESA_swap_control) = _glewSearchExtension("GLX_MESA_swap_control", extStart, extEnd);
+ if (glewExperimental || GLXEW_MESA_swap_control) CONST_CAST(GLXEW_MESA_swap_control) = !_glewInit_GLX_MESA_swap_control(GLEW_CONTEXT_ARG_VAR_INIT);
+#endif /* GLX_MESA_swap_control */
#ifdef GLX_NV_copy_image
CONST_CAST(GLXEW_NV_copy_image) = _glewSearchExtension("GLX_NV_copy_image", extStart, extEnd);
if (glewExperimental || GLXEW_NV_copy_image) CONST_CAST(GLXEW_NV_copy_image) = !_glewInit_GLX_NV_copy_image(GLEW_CONTEXT_ARG_VAR_INIT);
@@ -11581,9 +11937,9 @@ const GLubyte* glewGetString (GLenum name)
static const GLubyte* _glewString[] =
{
(const GLubyte*)NULL,
- (const GLubyte*)"1.6.0",
+ (const GLubyte*)"1.7.0",
(const GLubyte*)"1",
- (const GLubyte*)"6",
+ (const GLubyte*)"7",
(const GLubyte*)"0"
};
const int max_string = sizeof(_glewString)/sizeof(*_glewString) - 1;
@@ -11722,6 +12078,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_VERSION_4_2
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"4_2", 3))
+ {
+ ret = GLEW_VERSION_4_2;
+ continue;
+ }
+#endif
}
if (_glewStrSame2(&pos, &len, (const GLubyte*)"3DFX_", 5))
{
@@ -11784,6 +12147,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_AMD_multi_draw_indirect
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"multi_draw_indirect", 19))
+ {
+ ret = GLEW_AMD_multi_draw_indirect;
+ continue;
+ }
+#endif
#ifdef GL_AMD_name_gen_delete
if (_glewStrSame3(&pos, &len, (const GLubyte*)"name_gen_delete", 15))
{
@@ -11972,6 +12342,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_base_instance
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"base_instance", 13))
+ {
+ ret = GLEW_ARB_base_instance;
+ continue;
+ }
+#endif
#ifdef GL_ARB_blend_func_extended
if (_glewStrSame3(&pos, &len, (const GLubyte*)"blend_func_extended", 19))
{
@@ -12000,6 +12377,20 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_compressed_texture_pixel_storage
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"compressed_texture_pixel_storage", 32))
+ {
+ ret = GLEW_ARB_compressed_texture_pixel_storage;
+ continue;
+ }
+#endif
+#ifdef GL_ARB_conservative_depth
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"conservative_depth", 18))
+ {
+ ret = GLEW_ARB_conservative_depth;
+ continue;
+ }
+#endif
#ifdef GL_ARB_copy_buffer
if (_glewStrSame3(&pos, &len, (const GLubyte*)"copy_buffer", 11))
{
@@ -12175,6 +12566,20 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_internalformat_query
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"internalformat_query", 20))
+ {
+ ret = GLEW_ARB_internalformat_query;
+ continue;
+ }
+#endif
+#ifdef GL_ARB_map_buffer_alignment
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"map_buffer_alignment", 20))
+ {
+ ret = GLEW_ARB_map_buffer_alignment;
+ continue;
+ }
+#endif
#ifdef GL_ARB_map_buffer_range
if (_glewStrSame3(&pos, &len, (const GLubyte*)"map_buffer_range", 16))
{
@@ -12280,6 +12685,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_shader_atomic_counters
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_atomic_counters", 22))
+ {
+ ret = GLEW_ARB_shader_atomic_counters;
+ continue;
+ }
+#endif
#ifdef GL_ARB_shader_bit_encoding
if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_bit_encoding", 19))
{
@@ -12287,6 +12699,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_shader_image_load_store
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_image_load_store", 23))
+ {
+ ret = GLEW_ARB_shader_image_load_store;
+ continue;
+ }
+#endif
#ifdef GL_ARB_shader_objects
if (_glewStrSame3(&pos, &len, (const GLubyte*)"shader_objects", 14))
{
@@ -12329,6 +12748,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_shading_language_420pack
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"shading_language_420pack", 24))
+ {
+ ret = GLEW_ARB_shading_language_420pack;
+ continue;
+ }
+#endif
#ifdef GL_ARB_shading_language_include
if (_glewStrSame3(&pos, &len, (const GLubyte*)"shading_language_include", 24))
{
@@ -12336,6 +12762,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_shading_language_packing
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"shading_language_packing", 24))
+ {
+ ret = GLEW_ARB_shading_language_packing;
+ continue;
+ }
+#endif
#ifdef GL_ARB_shadow
if (_glewStrSame3(&pos, &len, (const GLubyte*)"shadow", 6))
{
@@ -12511,6 +12944,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_texture_storage
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_storage", 15))
+ {
+ ret = GLEW_ARB_texture_storage;
+ continue;
+ }
+#endif
#ifdef GL_ARB_texture_swizzle
if (_glewStrSame3(&pos, &len, (const GLubyte*)"texture_swizzle", 15))
{
@@ -12539,6 +12979,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_ARB_transform_feedback_instanced
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"transform_feedback_instanced", 28))
+ {
+ ret = GLEW_ARB_transform_feedback_instanced;
+ continue;
+ }
+#endif
#ifdef GL_ARB_transpose_matrix
if (_glewStrSame3(&pos, &len, (const GLubyte*)"transpose_matrix", 16))
{
@@ -12975,6 +13422,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_EXT_framebuffer_multisample_blit_scaled
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"framebuffer_multisample_blit_scaled", 35))
+ {
+ ret = GLEW_EXT_framebuffer_multisample_blit_scaled;
+ continue;
+ }
+#endif
#ifdef GL_EXT_framebuffer_object
if (_glewStrSame3(&pos, &len, (const GLubyte*)"framebuffer_object", 18))
{
@@ -13873,6 +14327,13 @@ GLboolean glewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GL_NV_path_rendering
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"path_rendering", 14))
+ {
+ ret = GLEW_NV_path_rendering;
+ continue;
+ }
+#endif
#ifdef GL_NV_pixel_data_range
if (_glewStrSame3(&pos, &len, (const GLubyte*)"pixel_data_range", 16))
{
@@ -15266,6 +15727,13 @@ GLboolean glxewIsSupported (const char* name)
continue;
}
#endif
+#ifdef GLX_MESA_swap_control
+ if (_glewStrSame3(&pos, &len, (const GLubyte*)"swap_control", 12))
+ {
+ ret = GLXEW_MESA_swap_control;
+ continue;
+ }
+#endif
}
if (_glewStrSame2(&pos, &len, (const GLubyte*)"NV_", 3))
{
diff --git a/extern/recastnavigation/CMakeLists.txt b/extern/recastnavigation/CMakeLists.txt
new file mode 100644
index 00000000000..660b881dd07
--- /dev/null
+++ b/extern/recastnavigation/CMakeLists.txt
@@ -0,0 +1,70 @@
+# $Id$
+# ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# The Original Code is Copyright (C) 2006, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Daniel Genrich
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+ Recast/Include
+ Detour/Include
+)
+
+set(INC_SYS
+
+)
+
+set(SRC
+ recast-capi.cpp
+ recast-capi.h
+
+
+ Detour/Source/DetourCommon.cpp
+ Detour/Source/DetourNode.cpp
+ Detour/Source/DetourStatNavMesh.cpp
+ Detour/Source/DetourStatNavMeshBuilder.cpp
+ Detour/Source/DetourTileNavMesh.cpp
+ Detour/Source/DetourTileNavMeshBuilder.cpp
+
+ Detour/Include/DetourCommon.h
+ Detour/Include/DetourNode.h
+ Detour/Include/DetourStatNavMesh.h
+ Detour/Include/DetourStatNavMeshBuilder.h
+ Detour/Include/DetourTileNavMesh.h
+ Detour/Include/DetourTileNavMeshBuilder.h
+
+ Recast/Source/Recast.cpp
+ Recast/Source/RecastContour.cpp
+ Recast/Source/RecastFilter.cpp
+ Recast/Source/RecastLog.cpp
+ Recast/Source/RecastMesh.cpp
+ Recast/Source/RecastMeshDetail.cpp
+ Recast/Source/RecastRasterization.cpp
+ Recast/Source/RecastRegion.cpp
+ Recast/Source/RecastTimer.cpp
+
+ Recast/Include/Recast.h
+ Recast/Include/RecastLog.h
+ Recast/Include/RecastTimer.h
+)
+
+blender_add_lib(extern_recastnavigation "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/extern/recastnavigation/Detour/Include/DetourCommon.h b/extern/recastnavigation/Detour/Include/DetourCommon.h
new file mode 100644
index 00000000000..d824efc06e4
--- /dev/null
+++ b/extern/recastnavigation/Detour/Include/DetourCommon.h
@@ -0,0 +1,167 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef DETOURCOMMON_H
+#define DETOURCOMMON_H
+
+//////////////////////////////////////////////////////////////////////////////////////////
+
+template<class T> inline void swap(T& a, T& b) { T t = a; a = b; b = t; }
+template<class T> inline T min(T a, T b) { return a < b ? a : b; }
+template<class T> inline T max(T a, T b) { return a > b ? a : b; }
+template<class T> inline T abs(T a) { return a < 0 ? -a : a; }
+template<class T> inline T sqr(T a) { return a*a; }
+template<class T> inline T clamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); }
+
+inline void vcross(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[1]*v2[2] - v1[2]*v2[1];
+ dest[1] = v1[2]*v2[0] - v1[0]*v2[2];
+ dest[2] = v1[0]*v2[1] - v1[1]*v2[0];
+}
+
+inline float vdot(const float* v1, const float* v2)
+{
+ return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
+}
+
+inline void vmad(float* dest, const float* v1, const float* v2, const float s)
+{
+ dest[0] = v1[0]+v2[0]*s;
+ dest[1] = v1[1]+v2[1]*s;
+ dest[2] = v1[2]+v2[2]*s;
+}
+
+inline void vadd(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[0]+v2[0];
+ dest[1] = v1[1]+v2[1];
+ dest[2] = v1[2]+v2[2];
+}
+
+inline void vsub(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[0]-v2[0];
+ dest[1] = v1[1]-v2[1];
+ dest[2] = v1[2]-v2[2];
+}
+
+inline void vmin(float* mn, const float* v)
+{
+ mn[0] = min(mn[0], v[0]);
+ mn[1] = min(mn[1], v[1]);
+ mn[2] = min(mn[2], v[2]);
+}
+
+inline void vmax(float* mx, const float* v)
+{
+ mx[0] = max(mx[0], v[0]);
+ mx[1] = max(mx[1], v[1]);
+ mx[2] = max(mx[2], v[2]);
+}
+
+inline void vcopy(float* dest, const float* a)
+{
+ dest[0] = a[0];
+ dest[1] = a[1];
+ dest[2] = a[2];
+}
+
+inline float vdist(const float* v1, const float* v2)
+{
+ float dx = v2[0] - v1[0];
+ float dy = v2[1] - v1[1];
+ float dz = v2[2] - v1[2];
+ return sqrtf(dx*dx + dy*dy + dz*dz);
+}
+
+inline float vdistSqr(const float* v1, const float* v2)
+{
+ float dx = v2[0] - v1[0];
+ float dy = v2[1] - v1[1];
+ float dz = v2[2] - v1[2];
+ return dx*dx + dy*dy + dz*dz;
+}
+
+inline void vnormalize(float* v)
+{
+ float d = 1.0f / sqrtf(sqr(v[0]) + sqr(v[1]) + sqr(v[2]));
+ v[0] *= d;
+ v[1] *= d;
+ v[2] *= d;
+}
+
+inline bool vequal(const float* p0, const float* p1)
+{
+ static const float thr = sqr(1.0f/16384.0f);
+ const float d = vdistSqr(p0, p1);
+ return d < thr;
+}
+
+inline int nextPow2(int v)
+{
+ v--;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ v++;
+ return v;
+}
+
+inline float vdot2D(const float* u, const float* v)
+{
+ return u[0]*v[0] + u[2]*v[2];
+}
+
+inline float vperp2D(const float* u, const float* v)
+{
+ return u[2]*v[0] - u[0]*v[2];
+}
+
+inline float triArea2D(const float* a, const float* b, const float* c)
+{
+ return ((b[0]*a[2] - a[0]*b[2]) + (c[0]*b[2] - b[0]*c[2]) + (a[0]*c[2] - c[0]*a[2])) * 0.5f;
+}
+
+inline bool checkOverlapBox(const unsigned short amin[3], const unsigned short amax[3],
+ const unsigned short bmin[3], const unsigned short bmax[3])
+{
+ bool overlap = true;
+ overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap;
+ overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap;
+ overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap;
+ return overlap;
+}
+
+void closestPtPointTriangle(float* closest, const float* p,
+ const float* a, const float* b, const float* c);
+
+bool closestHeightPointTriangle(const float* p, const float* a, const float* b, const float* c, float& h);
+
+bool intersectSegmentPoly2D(const float* p0, const float* p1,
+ const float* verts, int nverts,
+ float& tmin, float& tmax,
+ int& segMin, int& segMax);
+
+float distancePtSegSqr2D(const float* pt, const float* p, const float* q, float& t);
+
+void calcPolyCenter(float* tc, const unsigned short* idx, int nidx, const float* verts);
+
+#endif // DETOURCOMMON_H \ No newline at end of file
diff --git a/extern/recastnavigation/Detour/Include/DetourNode.h b/extern/recastnavigation/Detour/Include/DetourNode.h
new file mode 100644
index 00000000000..316d5bf4cf6
--- /dev/null
+++ b/extern/recastnavigation/Detour/Include/DetourNode.h
@@ -0,0 +1,149 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef DETOURNODE_H
+#define DETOURNODE_H
+
+enum dtNodeFlags
+{
+ DT_NODE_OPEN = 0x01,
+ DT_NODE_CLOSED = 0x02,
+};
+
+struct dtNode
+{
+ float cost;
+ float total;
+ unsigned int id;
+ unsigned int pidx : 30;
+ unsigned int flags : 2;
+};
+
+class dtNodePool
+{
+public:
+ dtNodePool(int maxNodes, int hashSize);
+ ~dtNodePool();
+ inline void operator=(const dtNodePool&) {}
+ void clear();
+ dtNode* getNode(unsigned int id);
+ const dtNode* findNode(unsigned int id) const;
+
+ inline unsigned int getNodeIdx(const dtNode* node) const
+ {
+ if (!node) return 0;
+ return (unsigned int)(node - m_nodes)+1;
+ }
+
+ inline dtNode* getNodeAtIdx(unsigned int idx)
+ {
+ if (!idx) return 0;
+ return &m_nodes[idx-1];
+ }
+
+ inline int getMemUsed() const
+ {
+ return sizeof(*this) +
+ sizeof(dtNode)*m_maxNodes +
+ sizeof(unsigned short)*m_maxNodes +
+ sizeof(unsigned short)*m_hashSize;
+ }
+
+private:
+ inline unsigned int hashint(unsigned int a) const
+ {
+ a += ~(a<<15);
+ a ^= (a>>10);
+ a += (a<<3);
+ a ^= (a>>6);
+ a += ~(a<<11);
+ a ^= (a>>16);
+ return a;
+ }
+
+ dtNode* m_nodes;
+ unsigned short* m_first;
+ unsigned short* m_next;
+ const int m_maxNodes;
+ const int m_hashSize;
+ int m_nodeCount;
+};
+
+class dtNodeQueue
+{
+public:
+ dtNodeQueue(int n);
+ ~dtNodeQueue();
+ inline void operator=(dtNodeQueue&) {}
+
+ inline void clear()
+ {
+ m_size = 0;
+ }
+
+ inline dtNode* top()
+ {
+ return m_heap[0];
+ }
+
+ inline dtNode* pop()
+ {
+ dtNode* result = m_heap[0];
+ m_size--;
+ trickleDown(0, m_heap[m_size]);
+ return result;
+ }
+
+ inline void push(dtNode* node)
+ {
+ m_size++;
+ bubbleUp(m_size-1, node);
+ }
+
+ inline void modify(dtNode* node)
+ {
+ for (int i = 0; i < m_size; ++i)
+ {
+ if (m_heap[i] == node)
+ {
+ bubbleUp(i, node);
+ return;
+ }
+ }
+ }
+
+ inline bool empty() const { return m_size == 0; }
+
+ inline int getMemUsed() const
+ {
+ return sizeof(*this) +
+ sizeof(dtNode*)*(m_capacity+1);
+ }
+
+
+private:
+ void bubbleUp(int i, dtNode* node);
+ void trickleDown(int i, dtNode* node);
+
+ dtNode** m_heap;
+ const int m_capacity;
+ int m_size;
+};
+
+
+#endif // DETOURNODE_H \ No newline at end of file
diff --git a/extern/recastnavigation/Detour/Include/DetourStatNavMesh.h b/extern/recastnavigation/Detour/Include/DetourStatNavMesh.h
new file mode 100644
index 00000000000..5a3e04a2074
--- /dev/null
+++ b/extern/recastnavigation/Detour/Include/DetourStatNavMesh.h
@@ -0,0 +1,234 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef DETOURSTATNAVMESH_H
+#define DETOURSTATNAVMESH_H
+
+// Reference to navigation polygon.
+typedef unsigned short dtStatPolyRef;
+
+// Maximum number of vertices per navigation polygon.
+static const int DT_STAT_VERTS_PER_POLYGON = 6;
+
+// Structure holding the navigation polygon data.
+struct dtStatPoly
+{
+ unsigned short v[DT_STAT_VERTS_PER_POLYGON]; // Indices to vertices of the poly.
+ dtStatPolyRef n[DT_STAT_VERTS_PER_POLYGON]; // Refs to neighbours of the poly.
+ unsigned char nv; // Number of vertices.
+ unsigned char flags; // Flags (not used).
+};
+
+struct dtStatPolyDetail
+{
+ unsigned short vbase; // Offset to detail vertex array.
+ unsigned short nverts; // Number of vertices in the detail mesh.
+ unsigned short tbase; // Offset to detail triangle array.
+ unsigned short ntris; // Number of triangles.
+};
+
+const int DT_STAT_NAVMESH_MAGIC = (('N'<<24) | ('A'<<16) | ('V'<<8) | 'M');
+const int DT_STAT_NAVMESH_VERSION = 3;
+
+struct dtStatBVNode
+{
+ unsigned short bmin[3], bmax[3];
+ int i;
+};
+
+struct dtStatNavMeshHeader
+{
+ int magic;
+ int version;
+ int npolys;
+ int nverts;
+ int nnodes;
+ int ndmeshes;
+ int ndverts;
+ int ndtris;
+ float cs;
+ float bmin[3], bmax[3];
+ dtStatPoly* polys;
+ float* verts;
+ dtStatBVNode* bvtree;
+ dtStatPolyDetail* dmeshes;
+ float* dverts;
+ unsigned char* dtris;
+};
+
+class dtStatNavMesh
+{
+public:
+
+ dtStatNavMesh();
+ ~dtStatNavMesh();
+
+ // Initializes the navmesh with data.
+ // Params:
+ // data - (in) Pointer to navmesh data.
+ // dataSize - (in) size of the navmesh data.
+ // ownsData - (in) Flag indicating if the navmesh should own and delete the data.
+ bool init(unsigned char* data, int dataSize, bool ownsData);
+
+ // Finds the nearest navigation polygon around the center location.
+ // Params:
+ // center - (in) The center of the search box.
+ // extents - (in) The extents of the search box.
+ // Returns: Reference identifier for the polygon, or 0 if no polygons found.
+ dtStatPolyRef findNearestPoly(const float* center, const float* extents);
+
+ // Returns polygons which touch the query box.
+ // Params:
+ // center - (in) the center of the search box.
+ // extents - (in) the extents of the search box.
+ // polys - (out) array holding the search result.
+ // maxPolys - (in) The max number of polygons the polys array can hold.
+ // Returns: Number of polygons in search result array.
+ int queryPolygons(const float* center, const float* extents,
+ dtStatPolyRef* polys, const int maxPolys);
+
+ // Finds path from start polygon to end polygon.
+ // If target polygon canno be reached through the navigation graph,
+ // the last node on the array is nearest node to the end polygon.
+ // Params:
+ // startRef - (in) ref to path start polygon.
+ // endRef - (in) ref to path end polygon.
+ // path - (out) array holding the search result.
+ // maxPathSize - (in) The max number of polygons the path array can hold.
+ // Returns: Number of polygons in search result array.
+ int findPath(dtStatPolyRef startRef, dtStatPolyRef endRef,
+ const float* startPos, const float* endPos,
+ dtStatPolyRef* path, const int maxPathSize);
+
+ // Finds a straight path from start to end locations within the corridor
+ // described by the path polygons.
+ // Start and end locations will be clamped on the corridor.
+ // Params:
+ // startPos - (in) Path start location.
+ // endPos - (in) Path end location.
+ // path - (in) Array of connected polygons describing the corridor.
+ // pathSize - (in) Number of polygons in path array.
+ // straightPath - (out) Points describing the straight path.
+ // maxStraightPathSize - (in) The max number of points the straight path array can hold.
+ // Returns: Number of points in the path.
+ int findStraightPath(const float* startPos, const float* endPos,
+ const dtStatPolyRef* path, const int pathSize,
+ float* straightPath, const int maxStraightPathSize);
+
+ // Finds intersection againts walls starting from start pos.
+ // Params:
+ // startRef - (in) ref to the polygon where the start lies.
+ // startPos - (in) start position of the query.
+ // endPos - (in) end position of the query.
+ // t - (out) hit parameter along the segment, 0 if no hit.
+ // endRef - (out) ref to the last polygon which was processed.
+ // Returns: Number of polygons in path or 0 if failed.
+ int raycast(dtStatPolyRef startRef, const float* startPos, const float* endPos,
+ float& t, dtStatPolyRef* path, const int pathSize);
+
+ // Returns distance to nearest wall from the specified location.
+ // Params:
+ // centerRef - (in) ref to the polygon where the center lies.
+ // centerPos - (in) center if the query circle.
+ // maxRadius - (in) max search radius.
+ // hitPos - (out) location of the nearest hit.
+ // hitNormal - (out) normal of the nearest hit.
+ // Returns: Distance to nearest wall from the test location.
+ float findDistanceToWall(dtStatPolyRef centerRef, const float* centerPos, float maxRadius,
+ float* hitPos, float* hitNormal);
+
+ // Finds polygons found along the navigation graph which touch the specified circle.
+ // Params:
+ // centerRef - (in) ref to the polygon where the center lies.
+ // centerPos - (in) center if the query circle
+ // radius - (in) radius of the query circle
+ // resultRef - (out, opt) refs to the polygons touched by the circle.
+ // resultParent - (out, opt) parent of each result polygon.
+ // resultCost - (out, opt) search cost at each result polygon.
+ // maxResult - (int) maximum capacity of search results.
+ // Returns: Number of results.
+ int findPolysAround(dtStatPolyRef centerRef, const float* centerPos, float radius,
+ dtStatPolyRef* resultRef, dtStatPolyRef* resultParent, float* resultCost,
+ const int maxResult);
+
+ // Returns closest point on navigation polygon.
+ // Params:
+ // ref - (in) ref to the polygon.
+ // pos - (in) the point to check.
+ // closest - (out) closest point.
+ // Returns: true if closest point found.
+ bool closestPointToPoly(dtStatPolyRef ref, const float* pos, float* closest) const;
+
+ // Returns height of the polygon at specified location.
+ // Params:
+ // ref - (in) ref to the polygon.
+ // pos - (in) the point where to locate the height.
+ // height - (out) height at the location.
+ // Returns: true if oer polygon.
+ bool getPolyHeight(dtStatPolyRef ref, const float* pos, float* height) const;
+
+ // Returns pointer to a polygon based on ref.
+ const dtStatPoly* getPolyByRef(dtStatPolyRef ref) const;
+ // Returns polygon index based on ref, or -1 if failed.
+ int getPolyIndexByRef(dtStatPolyRef ref) const;
+ // Returns number of navigation polygons.
+ inline int getPolyCount() const { return m_header ? m_header->npolys : 0; }
+ // Rerturns pointer to specified navigation polygon.
+ inline const dtStatPoly* getPoly(int i) const { return &m_header->polys[i]; }
+ // Returns number of vertices.
+ inline int getVertexCount() const { return m_header ? m_header->nverts : 0; }
+ // Returns pointer to specified vertex.
+ inline const float* getVertex(int i) const { return &m_header->verts[i*3]; }
+ // Returns number of navigation polygons details.
+ inline int getPolyDetailCount() const { return m_header ? m_header->ndmeshes : 0; }
+ // Rerturns pointer to specified navigation polygon detail.
+ const dtStatPolyDetail* getPolyDetail(int i) const { return &m_header->dmeshes[i]; }
+ // Returns pointer to specified vertex.
+ inline const float* getDetailVertex(int i) const { return &m_header->dverts[i*3]; }
+ // Returns pointer to specified vertex.
+ inline const unsigned char* getDetailTri(int i) const { return &m_header->dtris[i*4]; }
+
+ bool isInClosedList(dtStatPolyRef ref) const;
+
+ int getMemUsed() const;
+
+ inline unsigned char* getData() const { return m_data; }
+ inline int getDataSize() const { return m_dataSize; }
+ inline const dtStatNavMeshHeader* getHeader() const { return m_header; }
+ inline const dtStatBVNode* getBvTreeNodes() const { return m_header ? m_header->bvtree : 0; }
+ inline int getBvTreeNodeCount() const { return m_header ? m_header->nnodes : 0; }
+
+private:
+
+ // Copies the locations of vertices of a polygon to an array.
+ int getPolyVerts(dtStatPolyRef ref, float* verts) const;
+ // Returns portal points between two polygons.
+ bool getPortalPoints(dtStatPolyRef from, dtStatPolyRef to, float* left, float* right) const;
+ // Returns edge mid point between two polygons.
+ bool getEdgeMidPoint(dtStatPolyRef from, dtStatPolyRef to, float* mid) const;
+
+ unsigned char* m_data;
+ int m_dataSize;
+
+ dtStatNavMeshHeader* m_header;
+
+ class dtNodePool* m_nodePool;
+ class dtNodeQueue* m_openList;
+};
+
+#endif // DETOURSTATNAVMESH_H
diff --git a/extern/recastnavigation/Detour/Include/DetourStatNavMeshBuilder.h b/extern/recastnavigation/Detour/Include/DetourStatNavMeshBuilder.h
new file mode 100644
index 00000000000..03c79c429e7
--- /dev/null
+++ b/extern/recastnavigation/Detour/Include/DetourStatNavMeshBuilder.h
@@ -0,0 +1,33 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef DETOURSTATNAVMESHBUILDER_H
+#define DETOURSTATNAVMESHBUILDER_H
+
+bool dtCreateNavMeshData(const unsigned short* verts, const int nverts,
+ const unsigned short* polys, const int npolys, const int nvp,
+ const float* bmin, const float* bmax, float cs, float ch,
+ const unsigned short* dmeshes, const float* dverts, const int ndverts,
+ const unsigned char* dtris, const int ndtris,
+ unsigned char** outData, int* outDataSize);
+
+int createBVTree(const unsigned short* verts, const int nverts,
+ const unsigned short* polys, const int npolys, const int nvp,
+ float cs, float ch, int nnodes, dtStatBVNode* nodes);
+
+#endif // DETOURSTATNAVMESHBUILDER_H \ No newline at end of file
diff --git a/extern/recastnavigation/Detour/Include/DetourTileNavMesh.h b/extern/recastnavigation/Detour/Include/DetourTileNavMesh.h
new file mode 100644
index 00000000000..50ccdd118e8
--- /dev/null
+++ b/extern/recastnavigation/Detour/Include/DetourTileNavMesh.h
@@ -0,0 +1,315 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef DETOURTILENAVMESH_H
+#define DETOURTILENAVMESH_H
+
+// Reference to navigation polygon.
+typedef unsigned int dtTilePolyRef;
+
+// The bits used in the poly ref.
+static const int DT_TILE_REF_SALT_BITS = 12;
+static const int DT_TILE_REF_TILE_BITS = 12;
+static const int DT_TILE_REF_POLY_BITS = 8;
+static const int DT_TILE_REF_SALT_MASK = (1<<DT_TILE_REF_SALT_BITS)-1;
+static const int DT_TILE_REF_TILE_MASK = (1<<DT_TILE_REF_TILE_BITS)-1;
+static const int DT_TILE_REF_POLY_MASK = (1<<DT_TILE_REF_POLY_BITS)-1;
+
+// Maximum number of vertices per navigation polygon.
+static const int DT_TILE_VERTS_PER_POLYGON = 6;
+
+static const int DT_MAX_TILES = 1 << DT_TILE_REF_TILE_BITS;
+static const int DT_MAX_POLYGONS = 1 << DT_TILE_REF_POLY_BITS;
+
+static const int DT_TILE_NAVMESH_MAGIC = (('N'<<24) | ('A'<<16) | ('V'<<8) | 'T');
+static const int DT_TILE_NAVMESH_VERSION = 2;
+
+// Structure holding the navigation polygon data.
+struct dtTilePoly
+{
+ unsigned short v[DT_TILE_VERTS_PER_POLYGON]; // Indices to vertices of the poly.
+ unsigned short n[DT_TILE_VERTS_PER_POLYGON]; // Refs to neighbours of the poly.
+ unsigned short links; // Base index to header 'links' array.
+ unsigned char nlinks; // Number of links for
+ unsigned char nv; // Number of vertices.
+ unsigned char flags; // Flags (not used).
+};
+
+struct dtTilePolyDetail
+{
+ unsigned short vbase; // Offset to detail vertex array.
+ unsigned short nverts; // Number of vertices in the detail mesh.
+ unsigned short tbase; // Offset to detail triangle array.
+ unsigned short ntris; // Number of triangles.
+};
+
+// Stucture holding a link to another polygon.
+struct dtTileLink
+{
+ dtTilePolyRef ref; // Neighbour reference.
+ unsigned short p; // Index to polygon which owns this link.
+ unsigned char e; // Index to polygon edge which owns this link.
+ unsigned char side; // If boundary link, defines on which side the link is.
+ unsigned char bmin, bmax; // If boundary link, defines the sub edge area.
+};
+
+struct dtTileHeader
+{
+ int magic; // Magic number, used to identify the data.
+ int version; // Data version number.
+ int npolys; // Number of polygons in the tile.
+ int nverts; // Number of vertices in the tile.
+ int nlinks; // Number of links in the tile (will be updated when tile is added).
+ int maxlinks; // Number of allocated links.
+ int ndmeshes;
+ int ndverts;
+ int ndtris;
+ float bmin[3], bmax[3]; // Bounding box of the tile.
+ dtTilePoly* polys; // Pointer to the polygons (will be updated when tile is added).
+ float* verts; // Pointer to the vertices (will be updated when tile added).
+ dtTileLink* links; // Pointer to the links (will be updated when tile added).
+ dtTilePolyDetail* dmeshes;
+ float* dverts;
+ unsigned char* dtris;
+};
+
+struct dtTile
+{
+ int salt; // Counter describing modifications to the tile.
+ int x,y; // Grid location of the tile.
+ dtTileHeader* header; // Pointer to tile header.
+ unsigned char* data; // Pointer to tile data.
+ int dataSize; // Size of the tile data.
+ bool ownsData; // Flag indicating of the navmesh should release the data.
+ dtTile* next; // Next free tile or, next tile in spatial grid.
+};
+
+// Encodes a tile id.
+inline dtTilePolyRef dtEncodeTileId(unsigned int salt, unsigned int it, unsigned int ip)
+{
+ return (salt << (DT_TILE_REF_POLY_BITS+DT_TILE_REF_TILE_BITS)) | ((it+1) << DT_TILE_REF_POLY_BITS) | ip;
+}
+
+// Decodes a tile id.
+inline void dtDecodeTileId(dtTilePolyRef ref, unsigned int& salt, unsigned int& it, unsigned int& ip)
+{
+ salt = (ref >> (DT_TILE_REF_POLY_BITS+DT_TILE_REF_TILE_BITS)) & DT_TILE_REF_SALT_MASK;
+ it = ((ref >> DT_TILE_REF_POLY_BITS) & DT_TILE_REF_TILE_MASK) - 1;
+ ip = ref & DT_TILE_REF_POLY_MASK;
+}
+
+static const int DT_TILE_LOOKUP_SIZE = DT_MAX_TILES/4;
+
+class dtTiledNavMesh
+{
+public:
+ dtTiledNavMesh();
+ ~dtTiledNavMesh();
+
+ // Initializes the nav mesh.
+ // Params:
+ // orig - (in) origin of the nav mesh tile space.
+ // tileSiz - (in) size of a tile.
+ // portalheight - (in) height of the portal region between tiles.
+ // Returns: True if succeed, else false.
+ bool init(const float* orig, float tileSize, float portalHeight);
+
+ // Adds new tile into the navmesh.
+ // The add will fail if the data is in wrong format,
+ // there is not enough tiles left, or if there is a tile already at the location.
+ // Params:
+ // x,y - (in) Location of the new tile.
+ // data - (in) Data of the new tile mesh.
+ // dataSize - (in) Data size of the new tile mesh.
+ // ownsData - (in) Flag indicating if the navmesh should own and delete the data.
+ // Returns: True if tile was added, else false.
+ bool addTileAt(int x, int y, unsigned char* data, int dataSize, bool ownsData);
+
+ // Removes tile at specified location.
+ // Params:
+ // x,y - (in) Location of the tile to remove.
+ // data - (out) Data associated with deleted tile.
+ // dataSize - (out) Size of the data associated with deleted tile.
+ // Returns: True if remove suceed, else false.
+ bool removeTileAt(int x, int y, unsigned char** data, int* dataSize);
+
+ // Returns pointer to tile at specified location.
+ // Params:
+ // x,y - (in) Location of the tile to get.
+ // Returns: pointer to tile if tile exists or 0 tile does not exists.
+ dtTile* getTileAt(int x, int y);
+
+ // Returns pointer to tile in the tile array.
+ // Params:
+ // i - (in) Index to the tile to retrieve, must be in range [0,DT_MAX_TILES[
+ // Returns: Pointer to specified tile.
+ dtTile* getTile(int i);
+ const dtTile* getTile(int i) const;
+
+ // Finds the nearest navigation polygon around the center location.
+ // Params:
+ // center - (in) The center of the search box.
+ // extents - (in) The extents of the search box.
+ // Returns: Reference identifier for the polygon, or 0 if no polygons found.
+ dtTilePolyRef findNearestPoly(const float* center, const float* extents);
+
+ // Returns polygons which touch the query box.
+ // Params:
+ // center - (in) the center of the search box.
+ // extents - (in) the extents of the search box.
+ // polys - (out) array holding the search result.
+ // maxPolys - (in) The max number of polygons the polys array can hold.
+ // Returns: Number of polygons in search result array.
+ int queryPolygons(const float* center, const float* extents,
+ dtTilePolyRef* polys, const int maxPolys);
+
+ // Finds path from start polygon to end polygon.
+ // If target polygon canno be reached through the navigation graph,
+ // the last node on the array is nearest node to the end polygon.
+ // Params:
+ // startRef - (in) ref to path start polygon.
+ // endRef - (in) ref to path end polygon.
+ // path - (out) array holding the search result.
+ // maxPathSize - (in) The max number of polygons the path array can hold.
+ // Returns: Number of polygons in search result array.
+ int findPath(dtTilePolyRef startRef, dtTilePolyRef endRef,
+ const float* startPos, const float* endPos,
+ dtTilePolyRef* path, const int maxPathSize);
+
+ // Finds a straight path from start to end locations within the corridor
+ // described by the path polygons.
+ // Start and end locations will be clamped on the corridor.
+ // Params:
+ // startPos - (in) Path start location.
+ // endPos - (in) Path end location.
+ // path - (in) Array of connected polygons describing the corridor.
+ // pathSize - (in) Number of polygons in path array.
+ // straightPath - (out) Points describing the straight path.
+ // maxStraightPathSize - (in) The max number of points the straight path array can hold.
+ // Returns: Number of points in the path.
+ int findStraightPath(const float* startPos, const float* endPos,
+ const dtTilePolyRef* path, const int pathSize,
+ float* straightPath, const int maxStraightPathSize);
+
+ // Finds intersection againts walls starting from start pos.
+ // Params:
+ // startRef - (in) ref to the polygon where the start lies.
+ // startPos - (in) start position of the query.
+ // endPos - (in) end position of the query.
+ // t - (out) hit parameter along the segment, 0 if no hit.
+ // endRef - (out) ref to the last polygon which was processed.
+ // Returns: Number of polygons in path or 0 if failed.
+ int raycast(dtTilePolyRef startRef, const float* startPos, const float* endPos,
+ float& t, dtTilePolyRef* path, const int pathSize);
+
+ // Returns distance to nearest wall from the specified location.
+ // Params:
+ // centerRef - (in) ref to the polygon where the center lies.
+ // centerPos - (in) center if the query circle.
+ // maxRadius - (in) max search radius.
+ // hitPos - (out) location of the nearest hit.
+ // hitNormal - (out) normal of the nearest hit.
+ // Returns: Distance to nearest wall from the test location.
+ float findDistanceToWall(dtTilePolyRef centerRef, const float* centerPos, float maxRadius,
+ float* hitPos, float* hitNormal);
+
+ // Finds polygons found along the navigation graph which touch the specified circle.
+ // Params:
+ // centerRef - (in) ref to the polygon where the center lies.
+ // centerPos - (in) center if the query circle
+ // radius - (in) radius of the query circle
+ // resultRef - (out, opt) refs to the polygons touched by the circle.
+ // resultParent - (out, opt) parent of each result polygon.
+ // resultCost - (out, opt) search cost at each result polygon.
+ // maxResult - (int) maximum capacity of search results.
+ // Returns: Number of results.
+ int findPolysAround(dtTilePolyRef centerRef, const float* centerPos, float radius,
+ dtTilePolyRef* resultRef, dtTilePolyRef* resultParent, float* resultCost,
+ const int maxResult);
+
+ // Returns closest point on navigation polygon.
+ // Params:
+ // ref - (in) ref to the polygon.
+ // pos - (in) the point to check.
+ // closest - (out) closest point.
+ // Returns: true if closest point found.
+ bool closestPointToPoly(dtTilePolyRef ref, const float* pos, float* closest) const;
+
+ // Returns height of the polygon at specified location.
+ // Params:
+ // ref - (in) ref to the polygon.
+ // pos - (in) the point where to locate the height.
+ // height - (out) height at the location.
+ // Returns: true if over polygon.
+ bool getPolyHeight(dtTilePolyRef ref, const float* pos, float* height) const;
+
+ // Returns pointer to a polygon based on ref.
+ const dtTilePoly* getPolyByRef(dtTilePolyRef ref) const;
+
+ // Returns pointer to a polygon vertices based on ref.
+ const float* getPolyVertsByRef(dtTilePolyRef ref) const;
+
+ // Returns pointer to a polygon link based on ref.
+ const dtTileLink* getPolyLinksByRef(dtTilePolyRef ref) const;
+
+private:
+
+ // Returns base id for the tile.
+ dtTilePolyRef getTileId(dtTile* tile);
+ // Returns neighbour tile based on side.
+ dtTile* getNeighbourTileAt(int x, int y, int side);
+ // Returns all polygons in neighbour tile based on portal defined by the segment.
+ int findConnectingPolys(const float* va, const float* vb,
+ dtTile* tile, int side,
+ dtTilePolyRef* con, float* conarea, int maxcon);
+ // Builds internal polygons links for a tile.
+ void buildIntLinks(dtTile* tile);
+ // Builds external polygon links for a tile.
+ void buildExtLinks(dtTile* tile, dtTile* target, int side);
+ // Removes external links at specified side.
+ void removeExtLinks(dtTile* tile, int side);
+ // Queries polygons within a tile.
+ int queryTilePolygons(dtTile* tile, const float* qmin, const float* qmax,
+ dtTilePolyRef* polys, const int maxPolys);
+
+ float getCost(dtTilePolyRef prev, dtTilePolyRef from, dtTilePolyRef to) const;
+ float getFirstCost(const float* pos, dtTilePolyRef from, dtTilePolyRef to) const;
+ float getLastCost(dtTilePolyRef from, dtTilePolyRef to, const float* pos) const;
+ float getHeuristic(const float* from, const float* to) const;
+
+ // Returns portal points between two polygons.
+ bool getPortalPoints(dtTilePolyRef from, dtTilePolyRef to, float* left, float* right) const;
+ // Returns edge mid point between two polygons.
+ bool getEdgeMidPoint(dtTilePolyRef from, dtTilePolyRef to, float* mid) const;
+
+ float m_orig[3];
+ float m_tileSize;
+ float m_portalHeight;
+
+ dtTile* m_posLookup[DT_TILE_LOOKUP_SIZE];
+ dtTile* m_nextFree;
+ dtTile m_tiles[DT_MAX_TILES];
+
+ dtTileLink* m_tmpLinks;
+ int m_ntmpLinks;
+
+ class dtNodePool* m_nodePool;
+ class dtNodeQueue* m_openList;
+};
+
+#endif // DETOURTILENAVMESH_H
diff --git a/extern/recastnavigation/Detour/Include/DetourTileNavMeshBuilder.h b/extern/recastnavigation/Detour/Include/DetourTileNavMeshBuilder.h
new file mode 100644
index 00000000000..643dec1edb1
--- /dev/null
+++ b/extern/recastnavigation/Detour/Include/DetourTileNavMeshBuilder.h
@@ -0,0 +1,29 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef DETOURTILEDNAVMESHBUILDER_H
+#define DETOURTILEDNAVMESHBUILDER_H
+
+bool dtCreateNavMeshTileData(const unsigned short* verts, const int nverts,
+ const unsigned short* polys, const int npolys, const int nvp,
+ const unsigned short* dmeshes, const float* dverts, const int ndverts,
+ const unsigned char* dtris, const int ndtris,
+ const float* bmin, const float* bmax, float cs, float ch, int tileSize, int walkableClimb,
+ unsigned char** outData, int* outDataSize);
+
+#endif // DETOURTILEDNAVMESHBUILDER_H \ No newline at end of file
diff --git a/extern/recastnavigation/Detour/Source/DetourCommon.cpp b/extern/recastnavigation/Detour/Source/DetourCommon.cpp
new file mode 100644
index 00000000000..e55ce5e6351
--- /dev/null
+++ b/extern/recastnavigation/Detour/Source/DetourCommon.cpp
@@ -0,0 +1,244 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <math.h>
+#include "DetourCommon.h"
+
+void closestPtPointTriangle(float* closest, const float* p,
+ const float* a, const float* b, const float* c)
+{
+ // Check if P in vertex region outside A
+ float ab[3], ac[3], ap[3];
+ vsub(ab, b, a);
+ vsub(ac, c, a);
+ vsub(ap, p, a);
+ float d1 = vdot(ab, ap);
+ float d2 = vdot(ac, ap);
+ if (d1 <= 0.0f && d2 <= 0.0f)
+ {
+ // barycentric coordinates (1,0,0)
+ vcopy(closest, a);
+ return;
+ }
+
+ // Check if P in vertex region outside B
+ float bp[3];
+ vsub(bp, p, b);
+ float d3 = vdot(ab, bp);
+ float d4 = vdot(ac, bp);
+ if (d3 >= 0.0f && d4 <= d3)
+ {
+ // barycentric coordinates (0,1,0)
+ vcopy(closest, b);
+ return;
+ }
+
+ // Check if P in edge region of AB, if so return projection of P onto AB
+ float vc = d1*d4 - d3*d2;
+ if (vc <= 0.0f && d1 >= 0.0f && d3 <= 0.0f)
+ {
+ // barycentric coordinates (1-v,v,0)
+ float v = d1 / (d1 - d3);
+ closest[0] = a[0] + v * ab[0];
+ closest[1] = a[1] + v * ab[1];
+ closest[2] = a[2] + v * ab[2];
+ return;
+ }
+
+ // Check if P in vertex region outside C
+ float cp[3];
+ vsub(cp, p, c);
+ float d5 = vdot(ab, cp);
+ float d6 = vdot(ac, cp);
+ if (d6 >= 0.0f && d5 <= d6)
+ {
+ // barycentric coordinates (0,0,1)
+ vcopy(closest, c);
+ return;
+ }
+
+ // Check if P in edge region of AC, if so return projection of P onto AC
+ float vb = d5*d2 - d1*d6;
+ if (vb <= 0.0f && d2 >= 0.0f && d6 <= 0.0f)
+ {
+ // barycentric coordinates (1-w,0,w)
+ float w = d2 / (d2 - d6);
+ closest[0] = a[0] + w * ac[0];
+ closest[1] = a[1] + w * ac[1];
+ closest[2] = a[2] + w * ac[2];
+ return;
+ }
+
+ // Check if P in edge region of BC, if so return projection of P onto BC
+ float va = d3*d6 - d5*d4;
+ if (va <= 0.0f && (d4 - d3) >= 0.0f && (d5 - d6) >= 0.0f)
+ {
+ // barycentric coordinates (0,1-w,w)
+ float w = (d4 - d3) / ((d4 - d3) + (d5 - d6));
+ closest[0] = b[0] + w * (c[0] - b[0]);
+ closest[1] = b[1] + w * (c[1] - b[1]);
+ closest[2] = b[2] + w * (c[2] - b[2]);
+ return;
+ }
+
+ // P inside face region. Compute Q through its barycentric coordinates (u,v,w)
+ float denom = 1.0f / (va + vb + vc);
+ float v = vb * denom;
+ float w = vc * denom;
+ closest[0] = a[0] + ab[0] * v + ac[0] * w;
+ closest[1] = a[1] + ab[1] * v + ac[1] * w;
+ closest[2] = a[2] + ab[2] * v + ac[2] * w;
+}
+
+bool intersectSegmentPoly2D(const float* p0, const float* p1,
+ const float* verts, int nverts,
+ float& tmin, float& tmax,
+ int& segMin, int& segMax)
+{
+ static const float EPS = 0.00000001f;
+
+ tmin = 0;
+ tmax = 1;
+ segMin = -1;
+ segMax = -1;
+
+ float dir[3];
+ vsub(dir, p1, p0);
+
+ for (int i = 0, j = nverts-1; i < nverts; j=i++)
+ {
+ float edge[3], diff[3];
+ vsub(edge, &verts[i*3], &verts[j*3]);
+ vsub(diff, p0, &verts[j*3]);
+ float n = vperp2D(edge, diff);
+ float d = -vperp2D(edge, dir);
+ if (fabs(d) < EPS)
+ {
+ // S is nearly parallel to this edge
+ if (n < 0)
+ return false;
+ else
+ continue;
+ }
+ float t = n / d;
+ if (d < 0)
+ {
+ // segment S is entering across this edge
+ if (t > tmin)
+ {
+ tmin = t;
+ segMin = j;
+ // S enters after leaving polygon
+ if (tmin > tmax)
+ return false;
+ }
+ }
+ else
+ {
+ // segment S is leaving across this edge
+ if (t < tmax)
+ {
+ tmax = t;
+ segMax = j;
+ // S leaves before entering polygon
+ if (tmax < tmin)
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+float distancePtSegSqr2D(const float* pt, const float* p, const float* q, float& t)
+{
+ float pqx = q[0] - p[0];
+ float pqz = q[2] - p[2];
+ float dx = pt[0] - p[0];
+ float dz = pt[2] - p[2];
+ float d = pqx*pqx + pqz*pqz;
+ t = pqx*dx + pqz*dz;
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+
+ dx = p[0] + t*pqx - pt[0];
+ dz = p[2] + t*pqz - pt[2];
+
+ return dx*dx + dz*dz;
+}
+
+void calcPolyCenter(float* tc, const unsigned short* idx, int nidx, const float* verts)
+{
+ tc[0] = 0.0f;
+ tc[1] = 0.0f;
+ tc[2] = 0.0f;
+ for (int j = 0; j < nidx; ++j)
+ {
+ const float* v = &verts[idx[j]*3];
+ tc[0] += v[0];
+ tc[1] += v[1];
+ tc[2] += v[2];
+ }
+ const float s = 1.0f / nidx;
+ tc[0] *= s;
+ tc[1] *= s;
+ tc[2] *= s;
+}
+
+inline float vdot2(const float* a, const float* b)
+{
+ return a[0]*b[0] + a[2]*b[2];
+}
+
+#include <stdio.h>
+
+bool closestHeightPointTriangle(const float* p, const float* a, const float* b, const float* c, float& h)
+{
+ float v0[3], v1[3], v2[3];
+ vsub(v0, c,a);
+ vsub(v1, b,a);
+ vsub(v2, p,a);
+
+ const float dot00 = vdot2(v0, v0);
+ const float dot01 = vdot2(v0, v1);
+ const float dot02 = vdot2(v0, v2);
+ const float dot11 = vdot2(v1, v1);
+ const float dot12 = vdot2(v1, v2);
+
+ // Compute barycentric coordinates
+ float invDenom = 1.0f / (dot00 * dot11 - dot01 * dot01);
+ float u = (dot11 * dot02 - dot01 * dot12) * invDenom;
+ float v = (dot00 * dot12 - dot01 * dot02) * invDenom;
+
+ // The (sloppy) epsilon is needed to allow to get height of points which
+ // are interpolated along the edges of the triangles.
+ static const float EPS = 1e-4f;
+
+ // If point lies inside the triangle, return interpolated ycoord.
+ if (u >= -EPS && v >= -EPS && (u+v) <= 1+EPS)
+ {
+ h = a[1] + v0[1]*u + v1[1]*v;
+ return true;
+ }
+
+ return false;
+}
diff --git a/extern/recastnavigation/Detour/Source/DetourNode.cpp b/extern/recastnavigation/Detour/Source/DetourNode.cpp
new file mode 100644
index 00000000000..1a2305fcede
--- /dev/null
+++ b/extern/recastnavigation/Detour/Source/DetourNode.cpp
@@ -0,0 +1,140 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include "DetourNode.h"
+#include <string.h>
+
+//////////////////////////////////////////////////////////////////////////////////////////
+dtNodePool::dtNodePool(int maxNodes, int hashSize) :
+
+ m_nodes(0),
+ m_first(0),
+ m_next(0),
+ m_maxNodes(maxNodes),
+ m_hashSize(hashSize),
+ m_nodeCount(0)
+{
+ m_nodes = new dtNode[m_maxNodes];
+ m_next = new unsigned short[m_maxNodes];
+ m_first = new unsigned short[hashSize];
+ memset(m_first, 0xff, sizeof(unsigned short)*m_hashSize);
+ memset(m_next, 0xff, sizeof(unsigned short)*m_maxNodes);
+}
+
+dtNodePool::~dtNodePool()
+{
+ delete [] m_nodes;
+ delete [] m_next;
+ delete [] m_first;
+}
+
+void dtNodePool::clear()
+{
+ memset(m_first, 0xff, sizeof(unsigned short)*m_hashSize);
+ m_nodeCount = 0;
+}
+
+const dtNode* dtNodePool::findNode(unsigned int id) const
+{
+ unsigned int bucket = hashint(id) & (m_hashSize-1);
+ unsigned short i = m_first[bucket];
+ while (i != 0xffff)
+ {
+ if (m_nodes[i].id == id)
+ return &m_nodes[i];
+ i = m_next[i];
+ }
+ return 0;
+}
+
+dtNode* dtNodePool::getNode(unsigned int id)
+{
+ unsigned int bucket = hashint(id) & (m_hashSize-1);
+ unsigned short i = m_first[bucket];
+ dtNode* node = 0;
+ while (i != 0xffff)
+ {
+ if (m_nodes[i].id == id)
+ return &m_nodes[i];
+ i = m_next[i];
+ }
+
+ if (m_nodeCount >= m_maxNodes)
+ return 0;
+
+ i = (unsigned short)m_nodeCount;
+ m_nodeCount++;
+
+ // Init node
+ node = &m_nodes[i];
+ node->pidx = 0;
+ node->cost = 0;
+ node->total = 0;
+ node->id = id;
+ node->flags = 0;
+
+ m_next[i] = m_first[bucket];
+ m_first[bucket] = i;
+
+ return node;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+dtNodeQueue::dtNodeQueue(int n) :
+ m_heap(0),
+ m_capacity(n),
+ m_size(0)
+{
+ m_heap = new dtNode*[m_capacity+1];
+}
+
+dtNodeQueue::~dtNodeQueue()
+{
+ delete [] m_heap;
+}
+
+void dtNodeQueue::bubbleUp(int i, dtNode* node)
+{
+ int parent = (i-1)/2;
+ // note: (index > 0) means there is a parent
+ while ((i > 0) && (m_heap[parent]->total > node->total))
+ {
+ m_heap[i] = m_heap[parent];
+ i = parent;
+ parent = (i-1)/2;
+ }
+ m_heap[i] = node;
+}
+
+void dtNodeQueue::trickleDown(int i, dtNode* node)
+{
+ int child = (i*2)+1;
+ while (child < m_size)
+ {
+ if (((child+1) < m_size) &&
+ (m_heap[child]->total > m_heap[child+1]->total))
+ {
+ child++;
+ }
+ m_heap[i] = m_heap[child];
+ i = child;
+ child = (i*2)+1;
+ }
+ bubbleUp(i, node);
+}
diff --git a/extern/recastnavigation/Detour/Source/DetourStatNavMesh.cpp b/extern/recastnavigation/Detour/Source/DetourStatNavMesh.cpp
new file mode 100644
index 00000000000..bf59cd89dda
--- /dev/null
+++ b/extern/recastnavigation/Detour/Source/DetourStatNavMesh.cpp
@@ -0,0 +1,876 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <math.h>
+#include <float.h>
+#include <string.h>
+#include <stdio.h>
+#include "DetourStatNavMesh.h"
+#include "DetourNode.h"
+#include "DetourCommon.h"
+
+
+//////////////////////////////////////////////////////////////////////////////////////////
+dtStatNavMesh::dtStatNavMesh() :
+ m_data(0),
+ m_dataSize(0),
+ m_header(0),
+ m_nodePool(0),
+ m_openList(0)
+{
+}
+
+dtStatNavMesh::~dtStatNavMesh()
+{
+ delete m_nodePool;
+ delete m_openList;
+ if (m_data)
+ delete [] m_data;
+}
+
+bool dtStatNavMesh::init(unsigned char* data, int dataSize, bool ownsData)
+{
+ dtStatNavMeshHeader* header = (dtStatNavMeshHeader*)data;
+
+ if (header->magic != DT_STAT_NAVMESH_MAGIC)
+ return false;
+ if (header->version != DT_STAT_NAVMESH_VERSION)
+ return false;
+
+ const int headerSize = sizeof(dtStatNavMeshHeader);
+ const int vertsSize = sizeof(float)*3*header->nverts;
+ const int polysSize = sizeof(dtStatPoly)*header->npolys;
+ const int nodesSize = sizeof(dtStatBVNode)*header->npolys*2;
+ const int detailMeshesSize = sizeof(dtStatPolyDetail)*header->ndmeshes;
+ const int detailVertsSize = sizeof(float)*3*header->ndverts;
+ const int detailTrisSize = sizeof(unsigned char)*4*header->ndtris;
+
+
+ unsigned char* d = data + headerSize;
+ header->verts = (float*)d; d += vertsSize;
+ header->polys = (dtStatPoly*)d; d += polysSize;
+ header->bvtree = (dtStatBVNode*)d; d += nodesSize;
+ header->dmeshes = (dtStatPolyDetail*)d; d += detailMeshesSize;
+ header->dverts = (float*)d; d += detailVertsSize;
+ header->dtris = (unsigned char*)d; d += detailTrisSize;
+
+ m_nodePool = new dtNodePool(2048, 256);
+ if (!m_nodePool)
+ return false;
+
+ m_openList = new dtNodeQueue(2048);
+ if (!m_openList)
+ return false;
+
+ if (ownsData)
+ {
+ m_data = data;
+ m_dataSize = dataSize;
+ }
+
+ m_header = header;
+
+ return true;
+}
+
+const dtStatPoly* dtStatNavMesh::getPolyByRef(dtStatPolyRef ref) const
+{
+ if (!m_header || ref == 0 || (int)ref > m_header->npolys) return 0;
+ return &m_header->polys[ref-1];
+}
+
+int dtStatNavMesh::getPolyIndexByRef(dtStatPolyRef ref) const
+{
+ if (!m_header || ref == 0 || (int)ref > m_header->npolys) return -1;
+ return (int)ref-1;
+}
+
+int dtStatNavMesh::findPath(dtStatPolyRef startRef, dtStatPolyRef endRef,
+ const float* startPos, const float* endPos,
+ dtStatPolyRef* path, const int maxPathSize)
+{
+ if (!m_header) return 0;
+
+ if (!startRef || !endRef)
+ return 0;
+
+ if (!maxPathSize)
+ return 0;
+
+ if (startRef == endRef)
+ {
+ path[0] = startRef;
+ return 1;
+ }
+
+ m_nodePool->clear();
+ m_openList->clear();
+
+ static const float H_SCALE = 1.1f; // Heuristic scale.
+
+ dtNode* startNode = m_nodePool->getNode(startRef);
+ startNode->pidx = 0;
+ startNode->cost = 0;
+ startNode->total = vdist(startPos, endPos) * H_SCALE;
+ startNode->id = startRef;
+ startNode->flags = DT_NODE_OPEN;
+ m_openList->push(startNode);
+
+ dtNode* lastBestNode = startNode;
+ float lastBestNodeCost = startNode->total;
+ while (!m_openList->empty())
+ {
+ dtNode* bestNode = m_openList->pop();
+
+ if (bestNode->id == endRef)
+ {
+ lastBestNode = bestNode;
+ break;
+ }
+
+ const dtStatPoly* poly = getPoly(bestNode->id-1);
+ for (int i = 0; i < (int)poly->nv; ++i)
+ {
+ dtStatPolyRef neighbour = poly->n[i];
+ if (neighbour)
+ {
+ // Skip parent node.
+ if (bestNode->pidx && m_nodePool->getNodeAtIdx(bestNode->pidx)->id == neighbour)
+ continue;
+
+ dtNode* parent = bestNode;
+ dtNode newNode;
+ newNode.pidx = m_nodePool->getNodeIdx(parent);
+ newNode.id = neighbour;
+
+ // Calculate cost.
+ float p0[3], p1[3];
+ if (!parent->pidx)
+ vcopy(p0, startPos);
+ else
+ getEdgeMidPoint(m_nodePool->getNodeAtIdx(parent->pidx)->id, parent->id, p0);
+ getEdgeMidPoint(parent->id, newNode.id, p1);
+ newNode.cost = parent->cost + vdist(p0,p1);
+ // Special case for last node.
+ if (newNode.id == endRef)
+ newNode.cost += vdist(p1, endPos);
+
+ // Heuristic
+ const float h = vdist(p1,endPos)*H_SCALE;
+ newNode.total = newNode.cost + h;
+
+ dtNode* actualNode = m_nodePool->getNode(newNode.id);
+ if (!actualNode)
+ continue;
+
+ if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) &&
+ !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total))
+ {
+ actualNode->flags &= ~DT_NODE_CLOSED;
+ actualNode->pidx = newNode.pidx;
+ actualNode->cost = newNode.cost;
+ actualNode->total = newNode.total;
+
+ if (h < lastBestNodeCost)
+ {
+ lastBestNodeCost = h;
+ lastBestNode = actualNode;
+ }
+
+ if (actualNode->flags & DT_NODE_OPEN)
+ {
+ m_openList->modify(actualNode);
+ }
+ else
+ {
+ actualNode->flags |= DT_NODE_OPEN;
+ m_openList->push(actualNode);
+ }
+ }
+ }
+ }
+ bestNode->flags |= DT_NODE_CLOSED;
+ }
+
+ // Reverse the path.
+ dtNode* prev = 0;
+ dtNode* node = lastBestNode;
+ do
+ {
+ dtNode* next = m_nodePool->getNodeAtIdx(node->pidx);
+ node->pidx = m_nodePool->getNodeIdx(prev);
+ prev = node;
+ node = next;
+ }
+ while (node);
+
+ // Store path
+ node = prev;
+ int n = 0;
+ do
+ {
+ path[n++] = node->id;
+ node = m_nodePool->getNodeAtIdx(node->pidx);
+ }
+ while (node && n < maxPathSize);
+
+ return n;
+}
+
+bool dtStatNavMesh::closestPointToPoly(dtStatPolyRef ref, const float* pos, float* closest) const
+{
+ int idx = getPolyIndexByRef(ref);
+ if (idx == -1)
+ return false;
+
+ float closestDistSqr = FLT_MAX;
+ const dtStatPoly* p = getPoly(idx);
+ const dtStatPolyDetail* pd = getPolyDetail(idx);
+
+ for (int j = 0; j < pd->ntris; ++j)
+ {
+ const unsigned char* t = getDetailTri(pd->tbase+j);
+ const float* v[3];
+ for (int k = 0; k < 3; ++k)
+ {
+ if (t[k] < p->nv)
+ v[k] = getVertex(p->v[t[k]]);
+ else
+ v[k] = getDetailVertex(pd->vbase+(t[k]-p->nv));
+ }
+ float pt[3];
+ closestPtPointTriangle(pt, pos, v[0], v[1], v[2]);
+ float d = vdistSqr(pos, pt);
+ if (d < closestDistSqr)
+ {
+ vcopy(closest, pt);
+ closestDistSqr = d;
+ }
+ }
+
+ return true;
+}
+
+bool dtStatNavMesh::getPolyHeight(dtStatPolyRef ref, const float* pos, float* height) const
+{
+ int idx = getPolyIndexByRef(ref);
+ if (idx == -1)
+ return false;
+
+ const dtStatPoly* p = getPoly(idx);
+ const dtStatPolyDetail* pd = getPolyDetail(idx);
+
+ for (int i = 0; i < pd->ntris; ++i)
+ {
+ const unsigned char* t = getDetailTri(pd->tbase+i);
+ const float* v[3];
+ for (int j = 0; j < 3; ++j)
+ {
+ if (t[j] < p->nv)
+ v[j] = getVertex(p->v[t[j]]);
+ else
+ v[j] = getDetailVertex(pd->vbase+(t[j]-p->nv));
+ }
+ float h;
+ if (closestHeightPointTriangle(pos, v[0], v[1], v[2], h))
+ {
+ if (height)
+ *height = h;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+int dtStatNavMesh::findStraightPath(const float* startPos, const float* endPos,
+ const dtStatPolyRef* path, const int pathSize,
+ float* straightPath, const int maxStraightPathSize)
+{
+ if (!m_header) return 0;
+
+ if (!maxStraightPathSize)
+ return 0;
+
+ if (!path[0])
+ return 0;
+
+ int straightPathSize = 0;
+
+ float closestStartPos[3];
+ if (!closestPointToPoly(path[0], startPos, closestStartPos))
+ return 0;
+
+ // Add start point.
+ vcopy(&straightPath[straightPathSize*3], closestStartPos);
+ straightPathSize++;
+ if (straightPathSize >= maxStraightPathSize)
+ return straightPathSize;
+
+ float closestEndPos[3];
+ if (!closestPointToPoly(path[pathSize-1], endPos, closestEndPos))
+ return 0;
+
+ float portalApex[3], portalLeft[3], portalRight[3];
+
+ if (pathSize > 1)
+ {
+ vcopy(portalApex, closestStartPos);
+ vcopy(portalLeft, portalApex);
+ vcopy(portalRight, portalApex);
+ int apexIndex = 0;
+ int leftIndex = 0;
+ int rightIndex = 0;
+
+ for (int i = 0; i < pathSize; ++i)
+ {
+ float left[3], right[3];
+ if (i < pathSize-1)
+ {
+ // Next portal.
+ getPortalPoints(path[i], path[i+1], left, right);
+ }
+ else
+ {
+ // End of the path.
+ vcopy(left, closestEndPos);
+ vcopy(right, closestEndPos);
+ }
+
+ // Right vertex.
+ if (vequal(portalApex, portalRight))
+ {
+ vcopy(portalRight, right);
+ rightIndex = i;
+ }
+ else
+ {
+ if (triArea2D(portalApex, portalRight, right) <= 0.0f)
+ {
+ if (triArea2D(portalApex, portalLeft, right) > 0.0f)
+ {
+ vcopy(portalRight, right);
+ rightIndex = i;
+ }
+ else
+ {
+ vcopy(portalApex, portalLeft);
+ apexIndex = leftIndex;
+
+ if (!vequal(&straightPath[(straightPathSize-1)*3], portalApex))
+ {
+ vcopy(&straightPath[straightPathSize*3], portalApex);
+ straightPathSize++;
+ if (straightPathSize >= maxStraightPathSize)
+ return straightPathSize;
+ }
+
+ vcopy(portalLeft, portalApex);
+ vcopy(portalRight, portalApex);
+ leftIndex = apexIndex;
+ rightIndex = apexIndex;
+
+ // Restart
+ i = apexIndex;
+
+ continue;
+ }
+ }
+ }
+
+ // Left vertex.
+ if (vequal(portalApex, portalLeft))
+ {
+ vcopy(portalLeft, left);
+ leftIndex = i;
+ }
+ else
+ {
+ if (triArea2D(portalApex, portalLeft, left) >= 0.0f)
+ {
+ if (triArea2D(portalApex, portalRight, left) < 0.0f)
+ {
+ vcopy(portalLeft, left);
+ leftIndex = i;
+ }
+ else
+ {
+ vcopy(portalApex, portalRight);
+ apexIndex = rightIndex;
+
+ if (!vequal(&straightPath[(straightPathSize-1)*3], portalApex))
+ {
+ vcopy(&straightPath[straightPathSize*3], portalApex);
+ straightPathSize++;
+ if (straightPathSize >= maxStraightPathSize)
+ return straightPathSize;
+ }
+
+ vcopy(portalLeft, portalApex);
+ vcopy(portalRight, portalApex);
+ leftIndex = apexIndex;
+ rightIndex = apexIndex;
+
+ // Restart
+ i = apexIndex;
+
+ continue;
+ }
+ }
+ }
+ }
+ }
+
+ // Add end point.
+ vcopy(&straightPath[straightPathSize*3], closestEndPos);
+ straightPathSize++;
+
+ return straightPathSize;
+}
+
+int dtStatNavMesh::getPolyVerts(dtStatPolyRef ref, float* verts) const
+{
+ if (!m_header) return 0;
+ const dtStatPoly* poly = getPolyByRef(ref);
+ if (!poly) return 0;
+ float* v = verts;
+ for (int i = 0; i < (int)poly->nv; ++i)
+ {
+ const float* cv = &m_header->verts[poly->v[i]*3];
+ *v++ = cv[0];
+ *v++ = cv[1];
+ *v++ = cv[2];
+ }
+ return (int)poly->nv;
+}
+
+int dtStatNavMesh::raycast(dtStatPolyRef centerRef, const float* startPos, const float* endPos,
+ float& t, dtStatPolyRef* path, const int pathSize)
+{
+ if (!m_header) return 0;
+ if (!centerRef) return 0;
+
+ dtStatPolyRef prevRef = centerRef;
+ dtStatPolyRef curRef = centerRef;
+ t = 0;
+
+ float verts[DT_STAT_VERTS_PER_POLYGON*3];
+ int n = 0;
+
+ while (curRef)
+ {
+ // Cast ray against current polygon.
+ int nv = getPolyVerts(curRef, verts);
+ if (nv < 3)
+ {
+ // Hit bad polygon, report hit.
+ return n;
+ }
+
+ float tmin, tmax;
+ int segMin, segMax;
+ if (!intersectSegmentPoly2D(startPos, endPos, verts, nv, tmin, tmax, segMin, segMax))
+ {
+ // Could not a polygon, keep the old t and report hit.
+ return n;
+ }
+ // Keep track of furthest t so far.
+ if (tmax > t)
+ t = tmax;
+
+ if (n < pathSize)
+ path[n++] = curRef;
+
+ // Check the neighbour of this polygon.
+ const dtStatPoly* poly = getPolyByRef(curRef);
+ dtStatPolyRef nextRef = poly->n[segMax];
+ if (!nextRef)
+ {
+ // No neighbour, we hit a wall.
+ return n;
+ }
+
+ // No hit, advance to neighbour polygon.
+ prevRef = curRef;
+ curRef = nextRef;
+ }
+
+ return n;
+}
+
+
+float dtStatNavMesh::findDistanceToWall(dtStatPolyRef centerRef, const float* centerPos, float maxRadius,
+ float* hitPos, float* hitNormal)
+{
+ if (!m_header) return 0;
+ if (!centerRef) return 0;
+
+ m_nodePool->clear();
+ m_openList->clear();
+
+ dtNode* startNode = m_nodePool->getNode(centerRef);
+ startNode->pidx = 0;
+ startNode->cost = 0;
+ startNode->total = 0;
+ startNode->id = centerRef;
+ startNode->flags = DT_NODE_OPEN;
+ m_openList->push(startNode);
+
+ float radiusSqr = sqr(maxRadius);
+
+ hitNormal[0] = 1;
+ hitNormal[1] = 0;
+ hitNormal[2] = 0;
+
+ while (!m_openList->empty())
+ {
+ dtNode* bestNode = m_openList->pop();
+ const dtStatPoly* poly = getPoly(bestNode->id-1);
+
+ // Hit test walls.
+ for (int i = 0, j = (int)poly->nv-1; i < (int)poly->nv; j = i++)
+ {
+ // Skip non-solid edges.
+ if (poly->n[j]) continue;
+
+ // Calc distance to the edge.
+ const float* vj = getVertex(poly->v[j]);
+ const float* vi = getVertex(poly->v[i]);
+ float tseg;
+ float distSqr = distancePtSegSqr2D(centerPos, vj, vi, tseg);
+
+ // Edge is too far, skip.
+ if (distSqr > radiusSqr)
+ continue;
+
+ // Hit wall, update radius.
+ radiusSqr = distSqr;
+ // Calculate hit pos.
+ hitPos[0] = vj[0] + (vi[0] - vj[0])*tseg;
+ hitPos[1] = vj[1] + (vi[1] - vj[1])*tseg;
+ hitPos[2] = vj[2] + (vi[2] - vj[2])*tseg;
+ }
+
+ // Check to see if teh circle expands to one of the neighbours and expand.
+ for (int i = 0, j = (int)poly->nv-1; i < (int)poly->nv; j = i++)
+ {
+ // Skip solid edges.
+ if (!poly->n[j]) continue;
+
+ // Expand to neighbour if not visited yet.
+ dtStatPolyRef neighbour = poly->n[j];
+
+ // Skip parent node.
+ if (bestNode->pidx && m_nodePool->getNodeAtIdx(bestNode->pidx)->id == neighbour)
+ continue;
+
+ // Calc distance to the edge.
+ const float* vj = getVertex(poly->v[j]);
+ const float* vi = getVertex(poly->v[i]);
+ float tseg;
+ float distSqr = distancePtSegSqr2D(centerPos, vj, vi, tseg);
+
+ // Edge is too far, skip.
+ if (distSqr > radiusSqr)
+ continue;
+
+ dtNode* parent = bestNode;
+ dtNode newNode;
+ newNode.pidx = m_nodePool->getNodeIdx(parent);
+ newNode.id = neighbour;
+
+ // Cost
+ float p0[3], p1[3];
+ if (!parent->pidx)
+ vcopy(p0, centerPos);
+ else
+ getEdgeMidPoint(m_nodePool->getNodeAtIdx(parent->pidx)->id, parent->id, p0);
+ getEdgeMidPoint(parent->id, newNode.id, p1);
+ newNode.total = parent->total + vdist(p0,p1);
+
+ dtNode* actualNode = m_nodePool->getNode(newNode.id);
+ if (!actualNode)
+ continue;
+
+ if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) &&
+ !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total))
+ {
+ actualNode->flags &= ~DT_NODE_CLOSED;
+ actualNode->pidx = newNode.pidx;
+ actualNode->total = newNode.total;
+
+ if (actualNode->flags & DT_NODE_OPEN)
+ {
+ m_openList->modify(actualNode);
+ }
+ else
+ {
+ actualNode->flags |= DT_NODE_OPEN;
+ m_openList->push(actualNode);
+ }
+ }
+ }
+ bestNode->flags |= DT_NODE_CLOSED;
+ }
+
+ // Calc hit normal.
+ vsub(hitNormal, centerPos, hitPos);
+ vnormalize(hitNormal);
+
+ return sqrtf(radiusSqr);
+}
+
+int dtStatNavMesh::findPolysAround(dtStatPolyRef centerRef, const float* centerPos, float radius,
+ dtStatPolyRef* resultRef, dtStatPolyRef* resultParent, float* resultCost,
+ const int maxResult)
+{
+ if (!m_header) return 0;
+ if (!centerRef) return 0;
+
+ m_nodePool->clear();
+ m_openList->clear();
+
+ dtNode* startNode = m_nodePool->getNode(centerRef);
+ startNode->pidx = 0;
+ startNode->cost = 0;
+ startNode->total = 0;
+ startNode->id = centerRef;
+ startNode->flags = DT_NODE_OPEN;
+ m_openList->push(startNode);
+
+ int n = 0;
+ if (n < maxResult)
+ {
+ if (resultRef)
+ resultRef[n] = startNode->id;
+ if (resultParent)
+ resultParent[n] = 0;
+ if (resultCost)
+ resultCost[n] = 0;
+ ++n;
+ }
+
+ const float radiusSqr = sqr(radius);
+
+ while (!m_openList->empty())
+ {
+ dtNode* bestNode = m_openList->pop();
+ const dtStatPoly* poly = getPoly(bestNode->id-1);
+ for (unsigned i = 0, j = (int)poly->nv-1; i < (int)poly->nv; j=i++)
+ {
+ dtStatPolyRef neighbour = poly->n[j];
+
+ if (neighbour)
+ {
+ // Skip parent node.
+ if (bestNode->pidx && m_nodePool->getNodeAtIdx(bestNode->pidx)->id == neighbour)
+ continue;
+
+ // Calc distance to the edge.
+ const float* vj = getVertex(poly->v[j]);
+ const float* vi = getVertex(poly->v[i]);
+ float tseg;
+ float distSqr = distancePtSegSqr2D(centerPos, vj, vi, tseg);
+
+ // If the circle is not touching the next polygon, skip it.
+ if (distSqr > radiusSqr)
+ continue;
+
+ dtNode* parent = bestNode;
+ dtNode newNode;
+ newNode.pidx = m_nodePool->getNodeIdx(parent);
+ newNode.id = neighbour;
+
+ // Cost
+ float p0[3], p1[3];
+ if (!parent->pidx)
+ vcopy(p0, centerPos);
+ else
+ getEdgeMidPoint(m_nodePool->getNodeAtIdx(parent->pidx)->id, parent->id, p0);
+ getEdgeMidPoint(parent->id, newNode.id, p1);
+ newNode.total = parent->total + vdist(p0,p1);
+
+ dtNode* actualNode = m_nodePool->getNode(newNode.id);
+ if (!actualNode)
+ continue;
+
+ if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) &&
+ !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total))
+ {
+ actualNode->flags &= ~DT_NODE_CLOSED;
+ actualNode->pidx = newNode.pidx;
+ actualNode->total = newNode.total;
+
+ if (actualNode->flags & DT_NODE_OPEN)
+ {
+ m_openList->modify(actualNode);
+ }
+ else
+ {
+ if (n < maxResult)
+ {
+ if (resultRef)
+ resultRef[n] = actualNode->id;
+ if (resultParent)
+ resultParent[n] = m_nodePool->getNodeAtIdx(actualNode->pidx)->id;
+ if (resultCost)
+ resultCost[n] = actualNode->total;
+ ++n;
+ }
+ actualNode->flags |= DT_NODE_OPEN;
+ m_openList->push(actualNode);
+ }
+ }
+ }
+ }
+ bestNode->flags |= DT_NODE_CLOSED;
+
+ }
+
+ return n;
+}
+
+// Returns polygons which are withing certain radius from the query location.
+int dtStatNavMesh::queryPolygons(const float* center, const float* extents,
+ dtStatPolyRef* polys, const int maxIds)
+{
+ if (!m_header) return 0;
+
+ const dtStatBVNode* node = &m_header->bvtree[0];
+ const dtStatBVNode* end = &m_header->bvtree[m_header->nnodes];
+
+ // Calculate quantized box
+ const float ics = 1.0f / m_header->cs;
+ unsigned short bmin[3], bmax[3];
+ // Clamp query box to world box.
+ float minx = clamp(center[0] - extents[0], m_header->bmin[0], m_header->bmax[0]) - m_header->bmin[0];
+ float miny = clamp(center[1] - extents[1], m_header->bmin[1], m_header->bmax[1]) - m_header->bmin[1];
+ float minz = clamp(center[2] - extents[2], m_header->bmin[2], m_header->bmax[2]) - m_header->bmin[2];
+ float maxx = clamp(center[0] + extents[0], m_header->bmin[0], m_header->bmax[0]) - m_header->bmin[0];
+ float maxy = clamp(center[1] + extents[1], m_header->bmin[1], m_header->bmax[1]) - m_header->bmin[1];
+ float maxz = clamp(center[2] + extents[2], m_header->bmin[2], m_header->bmax[2]) - m_header->bmin[2];
+ // Quantize
+ bmin[0] = (unsigned short)(ics * minx) & 0xfffe;
+ bmin[1] = (unsigned short)(ics * miny) & 0xfffe;
+ bmin[2] = (unsigned short)(ics * minz) & 0xfffe;
+ bmax[0] = (unsigned short)(ics * maxx + 1) | 1;
+ bmax[1] = (unsigned short)(ics * maxy + 1) | 1;
+ bmax[2] = (unsigned short)(ics * maxz + 1) | 1;
+
+ // Traverse tree
+ int n = 0;
+ while (node < end)
+ {
+ bool overlap = checkOverlapBox(bmin, bmax, node->bmin, node->bmax);
+ bool isLeafNode = node->i >= 0;
+
+ if (isLeafNode && overlap)
+ {
+ if (n < maxIds)
+ {
+ polys[n] = (dtStatPolyRef)node->i;
+ n++;
+ }
+ }
+
+ if (overlap || isLeafNode)
+ node++;
+ else
+ {
+ const int escapeIndex = -node->i;
+ node += escapeIndex;
+ }
+ }
+
+ return n;
+}
+
+dtStatPolyRef dtStatNavMesh::findNearestPoly(const float* center, const float* extents)
+{
+ if (!m_header) return 0;
+
+ // Get nearby polygons from proximity grid.
+ dtStatPolyRef polys[128];
+ int npolys = queryPolygons(center, extents, polys, 128);
+
+ // Find nearest polygon amongst the nearby polygons.
+ dtStatPolyRef nearest = 0;
+ float nearestDistanceSqr = FLT_MAX;
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtStatPolyRef ref = polys[i];
+ float closest[3];
+ if (!closestPointToPoly(ref, center, closest))
+ continue;
+ float d = vdistSqr(center, closest);
+ if (d < nearestDistanceSqr)
+ {
+ nearestDistanceSqr = d;
+ nearest = ref;
+ }
+ }
+
+ return nearest;
+}
+
+bool dtStatNavMesh::getPortalPoints(dtStatPolyRef from, dtStatPolyRef to, float* left, float* right) const
+{
+ const dtStatPoly* fromPoly = getPolyByRef(from);
+ if (!fromPoly)
+ return false;
+
+ // Find common edge between the polygons and returns the segment end points.
+ for (unsigned i = 0, j = (int)fromPoly->nv - 1; i < (int)fromPoly->nv; j = i++)
+ {
+ unsigned short neighbour = fromPoly->n[j];
+ if (neighbour == to)
+ {
+ vcopy(left, getVertex(fromPoly->v[j]));
+ vcopy(right, getVertex(fromPoly->v[i]));
+ return true;
+ }
+ }
+
+ return false;
+}
+
+bool dtStatNavMesh::getEdgeMidPoint(dtStatPolyRef from, dtStatPolyRef to, float* mid) const
+{
+ float left[3], right[3];
+ if (!getPortalPoints(from, to, left,right)) return false;
+ mid[0] = (left[0]+right[0])*0.5f;
+ mid[1] = (left[1]+right[1])*0.5f;
+ mid[2] = (left[2]+right[2])*0.5f;
+ return true;
+}
+
+bool dtStatNavMesh::isInClosedList(dtStatPolyRef ref) const
+{
+ if (!m_nodePool) return false;
+ const dtNode* node = m_nodePool->findNode(ref);
+ return node && node->flags & DT_NODE_CLOSED;
+}
+
+int dtStatNavMesh::getMemUsed() const
+{
+ if (!m_nodePool || ! m_openList)
+ return 0;
+ return sizeof(*this) + m_dataSize +
+ m_nodePool->getMemUsed() +
+ m_openList->getMemUsed();
+}
diff --git a/extern/recastnavigation/Detour/Source/DetourStatNavMeshBuilder.cpp b/extern/recastnavigation/Detour/Source/DetourStatNavMeshBuilder.cpp
new file mode 100644
index 00000000000..2ca455fb53d
--- /dev/null
+++ b/extern/recastnavigation/Detour/Source/DetourStatNavMeshBuilder.cpp
@@ -0,0 +1,346 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <math.h>
+#include <stdlib.h>
+#include <string.h>
+#include "DetourStatNavMesh.h"
+
+struct BVItem
+{
+ unsigned short bmin[3];
+ unsigned short bmax[3];
+ int i;
+};
+
+static int compareItemX(const void* va, const void* vb)
+{
+ const BVItem* a = (const BVItem*)va;
+ const BVItem* b = (const BVItem*)vb;
+ if (a->bmin[0] < b->bmin[0])
+ return -1;
+ if (a->bmin[0] > b->bmin[0])
+ return 1;
+ return 0;
+}
+
+static int compareItemY(const void* va, const void* vb)
+{
+ const BVItem* a = (const BVItem*)va;
+ const BVItem* b = (const BVItem*)vb;
+ if (a->bmin[1] < b->bmin[1])
+ return -1;
+ if (a->bmin[1] > b->bmin[1])
+ return 1;
+ return 0;
+}
+
+static int compareItemZ(const void* va, const void* vb)
+{
+ const BVItem* a = (const BVItem*)va;
+ const BVItem* b = (const BVItem*)vb;
+ if (a->bmin[2] < b->bmin[2])
+ return -1;
+ if (a->bmin[2] > b->bmin[2])
+ return 1;
+ return 0;
+}
+
+static void calcExtends(BVItem* items, int nitems, int imin, int imax,
+ unsigned short* bmin, unsigned short* bmax)
+{
+ bmin[0] = items[imin].bmin[0];
+ bmin[1] = items[imin].bmin[1];
+ bmin[2] = items[imin].bmin[2];
+
+ bmax[0] = items[imin].bmax[0];
+ bmax[1] = items[imin].bmax[1];
+ bmax[2] = items[imin].bmax[2];
+
+ for (int i = imin+1; i < imax; ++i)
+ {
+ const BVItem& it = items[i];
+ if (it.bmin[0] < bmin[0]) bmin[0] = it.bmin[0];
+ if (it.bmin[1] < bmin[1]) bmin[1] = it.bmin[1];
+ if (it.bmin[2] < bmin[2]) bmin[2] = it.bmin[2];
+
+ if (it.bmax[0] > bmax[0]) bmax[0] = it.bmax[0];
+ if (it.bmax[1] > bmax[1]) bmax[1] = it.bmax[1];
+ if (it.bmax[2] > bmax[2]) bmax[2] = it.bmax[2];
+ }
+}
+
+inline int longestAxis(unsigned short x, unsigned short y, unsigned short z)
+{
+ int axis = 0;
+ unsigned short maxVal = x;
+ if (y > maxVal)
+ {
+ axis = 1;
+ maxVal = y;
+ }
+ if (z > maxVal)
+ {
+ axis = 2;
+ maxVal = z;
+ }
+ return axis;
+}
+
+static void subdivide(BVItem* items, int nitems, int imin, int imax, int& curNode, dtStatBVNode* nodes)
+{
+ int inum = imax - imin;
+ int icur = curNode;
+
+ dtStatBVNode& node = nodes[curNode++];
+
+ if (inum == 1)
+ {
+ // Leaf
+ node.bmin[0] = items[imin].bmin[0];
+ node.bmin[1] = items[imin].bmin[1];
+ node.bmin[2] = items[imin].bmin[2];
+
+ node.bmax[0] = items[imin].bmax[0];
+ node.bmax[1] = items[imin].bmax[1];
+ node.bmax[2] = items[imin].bmax[2];
+
+ node.i = items[imin].i;
+ }
+ else
+ {
+ // Split
+ calcExtends(items, nitems, imin, imax, node.bmin, node.bmax);
+
+ int axis = longestAxis(node.bmax[0] - node.bmin[0],
+ node.bmax[1] - node.bmin[1],
+ node.bmax[2] - node.bmin[2]);
+
+ if (axis == 0)
+ {
+ // Sort along x-axis
+ qsort(items+imin, inum, sizeof(BVItem), compareItemX);
+ }
+ else if (axis == 1)
+ {
+ // Sort along y-axis
+ qsort(items+imin, inum, sizeof(BVItem), compareItemY);
+ }
+ else
+ {
+ // Sort along z-axis
+ qsort(items+imin, inum, sizeof(BVItem), compareItemZ);
+ }
+
+ int isplit = imin+inum/2;
+
+ // Left
+ subdivide(items, nitems, imin, isplit, curNode, nodes);
+ // Right
+ subdivide(items, nitems, isplit, imax, curNode, nodes);
+
+ int iescape = curNode - icur;
+ // Negative index means escape.
+ node.i = -iescape;
+ }
+}
+
+/*static*/ int createBVTree(const unsigned short* verts, const int nverts,
+ const unsigned short* polys, const int npolys, const int nvp,
+ float cs, float ch,
+ int nnodes, dtStatBVNode* nodes)
+{
+ // Build tree
+ BVItem* items = new BVItem[npolys];
+ for (int i = 0; i < npolys; i++)
+ {
+ BVItem& it = items[i];
+ it.i = i+1;
+ // Calc polygon bounds.
+ const unsigned short* p = &polys[i*nvp*2];
+ it.bmin[0] = it.bmax[0] = verts[p[0]*3+0];
+ it.bmin[1] = it.bmax[1] = verts[p[0]*3+1];
+ it.bmin[2] = it.bmax[2] = verts[p[0]*3+2];
+
+ for (int j = 1; j < nvp; ++j)
+ {
+ if (p[j] == 0xffff) break;
+ unsigned short x = verts[p[j]*3+0];
+ unsigned short y = verts[p[j]*3+1];
+ unsigned short z = verts[p[j]*3+2];
+
+ if (x < it.bmin[0]) it.bmin[0] = x;
+ if (y < it.bmin[1]) it.bmin[1] = y;
+ if (z < it.bmin[2]) it.bmin[2] = z;
+
+ if (x > it.bmax[0]) it.bmax[0] = x;
+ if (y > it.bmax[1]) it.bmax[1] = y;
+ if (z > it.bmax[2]) it.bmax[2] = z;
+ }
+ // Remap y
+ it.bmin[1] = (unsigned short)floorf((float)it.bmin[1]*ch/cs);
+ it.bmax[1] = (unsigned short)ceilf((float)it.bmax[1]*ch/cs);
+ }
+
+ int curNode = 0;
+ subdivide(items, npolys, 0, npolys, curNode, nodes);
+
+ delete [] items;
+
+ return curNode;
+}
+
+
+bool dtCreateNavMeshData(const unsigned short* verts, const int nverts,
+ const unsigned short* polys, const int npolys, const int nvp,
+ const float* bmin, const float* bmax, float cs, float ch,
+ const unsigned short* dmeshes, const float* dverts, const int ndverts,
+ const unsigned char* dtris, const int ndtris,
+ unsigned char** outData, int* outDataSize)
+{
+ if (nvp > DT_STAT_VERTS_PER_POLYGON)
+ return false;
+ if (nverts >= 0xffff)
+ return false;
+
+ if (!nverts)
+ return false;
+ if (!npolys)
+ return false;
+ if (!dmeshes || !dverts || ! dtris)
+ return false;
+
+ // Find unique detail vertices.
+ int uniqueDetailVerts = 0;
+ if (dmeshes)
+ {
+ for (int i = 0; i < npolys; ++i)
+ {
+ const unsigned short* p = &polys[i*nvp*2];
+ int ndv = dmeshes[i*4+1];
+ int nv = 0;
+ for (int j = 0; j < nvp; ++j)
+ {
+ if (p[j] == 0xffff) break;
+ nv++;
+ }
+ ndv -= nv;
+ uniqueDetailVerts += ndv;
+ }
+ }
+
+ // Calculate data size
+ const int headerSize = sizeof(dtStatNavMeshHeader);
+ const int vertsSize = sizeof(float)*3*nverts;
+ const int polysSize = sizeof(dtStatPoly)*npolys;
+ const int nodesSize = sizeof(dtStatBVNode)*npolys*2;
+ const int detailMeshesSize = sizeof(dtStatPolyDetail)*npolys;
+ const int detailVertsSize = sizeof(float)*3*uniqueDetailVerts;
+ const int detailTrisSize = sizeof(unsigned char)*4*ndtris;
+
+ const int dataSize = headerSize + vertsSize + polysSize + nodesSize +
+ detailMeshesSize + detailVertsSize + detailTrisSize;
+ unsigned char* data = new unsigned char[dataSize];
+ if (!data)
+ return false;
+ memset(data, 0, dataSize);
+
+ unsigned char* d = data;
+ dtStatNavMeshHeader* header = (dtStatNavMeshHeader*)d; d += headerSize;
+ float* navVerts = (float*)d; d += vertsSize;
+ dtStatPoly* navPolys = (dtStatPoly*)d; d += polysSize;
+ dtStatBVNode* navNodes = (dtStatBVNode*)d; d += nodesSize;
+ dtStatPolyDetail* navDMeshes = (dtStatPolyDetail*)d; d += detailMeshesSize;
+ float* navDVerts = (float*)d; d += detailVertsSize;
+ unsigned char* navDTris = (unsigned char*)d; d += detailTrisSize;
+
+ // Store header
+ header->magic = DT_STAT_NAVMESH_MAGIC;
+ header->version = DT_STAT_NAVMESH_VERSION;
+ header->npolys = npolys;
+ header->nverts = nverts;
+ header->cs = cs;
+ header->bmin[0] = bmin[0];
+ header->bmin[1] = bmin[1];
+ header->bmin[2] = bmin[2];
+ header->bmax[0] = bmax[0];
+ header->bmax[1] = bmax[1];
+ header->bmax[2] = bmax[2];
+ header->ndmeshes = dmeshes ? npolys : 0;
+ header->ndverts = dmeshes ? uniqueDetailVerts : 0;
+ header->ndtris = dmeshes ? ndtris : 0;
+
+ // Store vertices
+ for (int i = 0; i < nverts; ++i)
+ {
+ const unsigned short* iv = &verts[i*3];
+ float* v = &navVerts[i*3];
+ v[0] = bmin[0] + iv[0] * cs;
+ v[1] = bmin[1] + iv[1] * ch;
+ v[2] = bmin[2] + iv[2] * cs;
+ }
+
+ // Store polygons
+ const unsigned short* src = polys;
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtStatPoly* p = &navPolys[i];
+ p->nv = 0;
+ for (int j = 0; j < nvp; ++j)
+ {
+ if (src[j] == 0xffff) break;
+ p->v[j] = src[j];
+ p->n[j] = src[nvp+j]+1;
+ p->nv++;
+ }
+ src += nvp*2;
+ }
+
+ header->nnodes = createBVTree(verts, nverts, polys, npolys, nvp,
+ cs, ch, npolys*2, navNodes);
+
+
+ // Store detail meshes and vertices.
+ // The nav polygon vertices are stored as the first vertices on each mesh.
+ // We compress the mesh data by skipping them and using the navmesh coordinates.
+ unsigned short vbase = 0;
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtStatPolyDetail& dtl = navDMeshes[i];
+ const int vb = dmeshes[i*4+0];
+ const int ndv = dmeshes[i*4+1];
+ const int nv = navPolys[i].nv;
+ dtl.vbase = vbase;
+ dtl.nverts = ndv-nv;
+ dtl.tbase = dmeshes[i*4+2];
+ dtl.ntris = dmeshes[i*4+3];
+ // Copy vertices except the first 'nv' verts which are equal to nav poly verts.
+ if (ndv-nv)
+ {
+ memcpy(&navDVerts[vbase*3], &dverts[(vb+nv)*3], sizeof(float)*3*(ndv-nv));
+ vbase += ndv-nv;
+ }
+ }
+ // Store triangles.
+ memcpy(navDTris, dtris, sizeof(unsigned char)*4*ndtris);
+
+ *outData = data;
+ *outDataSize = dataSize;
+
+ return true;
+}
diff --git a/extern/recastnavigation/Detour/Source/DetourTileNavMesh.cpp b/extern/recastnavigation/Detour/Source/DetourTileNavMesh.cpp
new file mode 100644
index 00000000000..0813c7755cc
--- /dev/null
+++ b/extern/recastnavigation/Detour/Source/DetourTileNavMesh.cpp
@@ -0,0 +1,1428 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <math.h>
+#include <float.h>
+#include <string.h>
+#include <stdio.h>
+#include "DetourTileNavMesh.h"
+#include "DetourNode.h"
+#include "DetourCommon.h"
+
+
+inline int opposite(int side) { return (side+2) & 0x3; }
+
+inline bool overlapBoxes(const float* amin, const float* amax,
+ const float* bmin, const float* bmax)
+{
+ bool overlap = true;
+ overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap;
+ overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap;
+ overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap;
+ return overlap;
+}
+
+inline bool overlapRects(const float* amin, const float* amax,
+ const float* bmin, const float* bmax)
+{
+ bool overlap = true;
+ overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap;
+ overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap;
+ return overlap;
+}
+
+static void calcRect(const float* va, const float* vb,
+ float* bmin, float* bmax,
+ int side, float padx, float pady)
+{
+ if ((side&1) == 0)
+ {
+ bmin[0] = min(va[2],vb[2]) + padx;
+ bmin[1] = min(va[1],vb[1]) - pady;
+ bmax[0] = max(va[2],vb[2]) - padx;
+ bmax[1] = max(va[1],vb[1]) + pady;
+ }
+ else
+ {
+ bmin[0] = min(va[0],vb[0]) + padx;
+ bmin[1] = min(va[1],vb[1]) - pady;
+ bmax[0] = max(va[0],vb[0]) - padx;
+ bmax[1] = max(va[1],vb[1]) + pady;
+ }
+}
+
+inline int computeTileHash(int x, int y)
+{
+ const unsigned int h1 = 0x8da6b343; // Large multiplicative constants;
+ const unsigned int h2 = 0xd8163841; // here arbitrarily chosen primes
+ unsigned int n = h1 * x + h2 * y;
+ return (int)(n & (DT_TILE_LOOKUP_SIZE-1));
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+dtTiledNavMesh::dtTiledNavMesh() :
+ m_tileSize(0),
+ m_portalHeight(0),
+ m_nextFree(0),
+ m_tmpLinks(0),
+ m_ntmpLinks(0),
+ m_nodePool(0),
+ m_openList(0)
+{
+}
+
+dtTiledNavMesh::~dtTiledNavMesh()
+{
+ for (int i = 0; i < DT_MAX_TILES; ++i)
+ {
+ if (m_tiles[i].data && m_tiles[i].dataSize < 0)
+ {
+ delete [] m_tiles[i].data;
+ m_tiles[i].data = 0;
+ m_tiles[i].dataSize = 0;
+ }
+ }
+ delete [] m_tmpLinks;
+ delete m_nodePool;
+ delete m_openList;
+}
+
+bool dtTiledNavMesh::init(const float* orig, float tileSize, float portalHeight)
+{
+ vcopy(m_orig, orig);
+ m_tileSize = tileSize;
+ m_portalHeight = portalHeight;
+
+ // Init tiles
+ memset(m_tiles, 0, sizeof(dtTile)*DT_MAX_TILES);
+ memset(m_posLookup, 0, sizeof(dtTile*)*DT_TILE_LOOKUP_SIZE);
+ m_nextFree = 0;
+ for (int i = DT_MAX_TILES-1; i >= 0; --i)
+ {
+ m_tiles[i].next = m_nextFree;
+ m_nextFree = &m_tiles[i];
+ }
+
+ if (!m_nodePool)
+ {
+ m_nodePool = new dtNodePool(2048, 256);
+ if (!m_nodePool)
+ return false;
+ }
+
+ if (!m_openList)
+ {
+ m_openList = new dtNodeQueue(2048);
+ if (!m_openList)
+ return false;
+ }
+
+ return true;
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
+int dtTiledNavMesh::findConnectingPolys(const float* va, const float* vb,
+ dtTile* tile, int side,
+ dtTilePolyRef* con, float* conarea, int maxcon)
+{
+ if (!tile) return 0;
+ dtTileHeader* h = tile->header;
+
+ float amin[2], amax[2];
+ calcRect(va,vb, amin,amax, side, 0.01f, m_portalHeight);
+
+ // Remove links pointing to 'side' and compact the links array.
+ float bmin[2], bmax[2];
+ unsigned short m = 0x8000 | (unsigned short)side;
+ int n = 0;
+
+ dtTilePolyRef base = getTileId(tile);
+
+ for (int i = 0; i < h->npolys; ++i)
+ {
+ dtTilePoly* poly = &h->polys[i];
+ for (int j = 0; j < poly->nv; ++j)
+ {
+ // Skip edges which do not point to the right side.
+ if (poly->n[j] != m) continue;
+ // Check if the segments touch.
+ const float* vc = &h->verts[poly->v[j]*3];
+ const float* vd = &h->verts[poly->v[(j+1) % (int)poly->nv]*3];
+ calcRect(vc,vd, bmin,bmax, side, 0.01f, m_portalHeight);
+ if (!overlapRects(amin,amax, bmin,bmax)) continue;
+ // Add return value.
+ if (n < maxcon)
+ {
+ conarea[n*2+0] = max(amin[0], bmin[0]);
+ conarea[n*2+1] = min(amax[0], bmax[0]);
+ con[n] = base | (unsigned int)i;
+ n++;
+ }
+ break;
+ }
+ }
+ return n;
+}
+
+void dtTiledNavMesh::removeExtLinks(dtTile* tile, int side)
+{
+ if (!tile) return;
+ dtTileHeader* h = tile->header;
+
+ // Remove links pointing to 'side' and compact the links array.
+ dtTileLink* pool = m_tmpLinks;
+ int nlinks = 0;
+ for (int i = 0; i < h->npolys; ++i)
+ {
+ dtTilePoly* poly = &h->polys[i];
+ int plinks = nlinks;
+ int nplinks = 0;
+ for (int j = 0; j < poly->nlinks; ++j)
+ {
+ dtTileLink* link = &h->links[poly->links+j];
+ if ((int)link->side != side)
+ {
+ if (nlinks < h->maxlinks)
+ {
+ dtTileLink* dst = &pool[nlinks++];
+ memcpy(dst, link, sizeof(dtTileLink));
+ nplinks++;
+ }
+ }
+ }
+ poly->links = plinks;
+ poly->nlinks = nplinks;
+ }
+ h->nlinks = nlinks;
+ if (h->nlinks)
+ memcpy(h->links, m_tmpLinks, sizeof(dtTileLink)*nlinks);
+}
+
+void dtTiledNavMesh::buildExtLinks(dtTile* tile, dtTile* target, int side)
+{
+ if (!tile) return;
+ dtTileHeader* h = tile->header;
+
+ // Remove links pointing to 'side' and compact the links array.
+ dtTileLink* pool = m_tmpLinks;
+ int nlinks = 0;
+ for (int i = 0; i < h->npolys; ++i)
+ {
+ dtTilePoly* poly = &h->polys[i];
+ int plinks = nlinks;
+ int nplinks = 0;
+ // Copy internal and other external links.
+ for (int j = 0; j < poly->nlinks; ++j)
+ {
+ dtTileLink* link = &h->links[poly->links+j];
+ if ((int)link->side != side)
+ {
+ if (nlinks < h->maxlinks)
+ {
+ dtTileLink* dst = &pool[nlinks++];
+ memcpy(dst, link, sizeof(dtTileLink));
+ nplinks++;
+ }
+ }
+ }
+ // Create new links.
+ unsigned short m = 0x8000 | (unsigned short)side;
+ for (int j = 0; j < poly->nv; ++j)
+ {
+ // Skip edges which do not point to the right side.
+ if (poly->n[j] != m) continue;
+
+ // Create new links
+ const float* va = &h->verts[poly->v[j]*3];
+ const float* vb = &h->verts[poly->v[(j+1)%(int)poly->nv]*3];
+ dtTilePolyRef nei[4];
+ float neia[4*2];
+ int nnei = findConnectingPolys(va,vb, target, opposite(side), nei,neia,4);
+ for (int k = 0; k < nnei; ++k)
+ {
+ if (nlinks < h->maxlinks)
+ {
+ dtTileLink* link = &pool[nlinks++];
+ link->ref = nei[k];
+ link->p = (unsigned short)i;
+ link->e = (unsigned char)j;
+ link->side = (unsigned char)side;
+
+ // Compress portal limits to a byte value.
+ if (side == 0 || side == 2)
+ {
+ const float lmin = min(va[2], vb[2]);
+ const float lmax = max(va[2], vb[2]);
+ link->bmin = (unsigned char)(clamp((neia[k*2+0]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f);
+ link->bmax = (unsigned char)(clamp((neia[k*2+1]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f);
+ }
+ else
+ {
+ const float lmin = min(va[0], vb[0]);
+ const float lmax = max(va[0], vb[0]);
+ link->bmin = (unsigned char)(clamp((neia[k*2+0]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f);
+ link->bmax = (unsigned char)(clamp((neia[k*2+1]-lmin)/(lmax-lmin), 0.0f, 1.0f)*255.0f);
+ }
+ nplinks++;
+ }
+ }
+ }
+
+ poly->links = plinks;
+ poly->nlinks = nplinks;
+ }
+ h->nlinks = nlinks;
+ if (h->nlinks)
+ memcpy(h->links, m_tmpLinks, sizeof(dtTileLink)*nlinks);
+}
+
+void dtTiledNavMesh::buildIntLinks(dtTile* tile)
+{
+ if (!tile) return;
+ dtTileHeader* h = tile->header;
+
+ dtTilePolyRef base = getTileId(tile);
+ dtTileLink* pool = h->links;
+ int nlinks = 0;
+ for (int i = 0; i < h->npolys; ++i)
+ {
+ dtTilePoly* poly = &h->polys[i];
+ poly->links = nlinks;
+ poly->nlinks = 0;
+ for (int j = 0; j < poly->nv; ++j)
+ {
+ // Skip hard and non-internal edges.
+ if (poly->n[j] == 0 || (poly->n[j] & 0x8000)) continue;
+
+ if (nlinks < h->maxlinks)
+ {
+ dtTileLink* link = &pool[nlinks++];
+ link->ref = base | (unsigned int)(poly->n[j]-1);
+ link->p = (unsigned short)i;
+ link->e = (unsigned char)j;
+ link->side = 0xff;
+ link->bmin = link->bmax = 0;
+ poly->nlinks++;
+ }
+ }
+ }
+ h->nlinks = nlinks;
+}
+
+bool dtTiledNavMesh::addTileAt(int x, int y, unsigned char* data, int dataSize, bool ownsData)
+{
+ if (getTileAt(x,y))
+ return false;
+ // Make sure there is enough space for new tile.
+ if (!m_nextFree)
+ return false;
+ // Make sure the data is in right format.
+ dtTileHeader* header = (dtTileHeader*)data;
+ if (header->magic != DT_TILE_NAVMESH_MAGIC)
+ return false;
+ if (header->version != DT_TILE_NAVMESH_VERSION)
+ return false;
+
+ // Make sure the tmp link array is large enough.
+ if (header->maxlinks > m_ntmpLinks)
+ {
+ m_ntmpLinks = header->maxlinks;
+ delete [] m_tmpLinks;
+ m_tmpLinks = 0;
+ m_tmpLinks = new dtTileLink[m_ntmpLinks];
+ }
+ if (!m_tmpLinks)
+ return false;
+
+ // Allocate a tile.
+ dtTile* tile = m_nextFree;
+ m_nextFree = tile->next;
+ tile->next = 0;
+
+ // Insert tile into the position lut.
+ int h = computeTileHash(x,y);
+ tile->next = m_posLookup[h];
+ m_posLookup[h] = tile;
+
+ // Patch header pointers.
+ const int headerSize = sizeof(dtTileHeader);
+ const int vertsSize = sizeof(float)*3*header->nverts;
+ const int polysSize = sizeof(dtTilePoly)*header->npolys;
+ const int linksSize = sizeof(dtTileLink)*(header->maxlinks);
+ const int detailMeshesSize = sizeof(dtTilePolyDetail)*header->ndmeshes;
+ const int detailVertsSize = sizeof(float)*3*header->ndverts;
+ const int detailTrisSize = sizeof(unsigned char)*4*header->ndtris;
+
+ unsigned char* d = data + headerSize;
+ header->verts = (float*)d; d += vertsSize;
+ header->polys = (dtTilePoly*)d; d += polysSize;
+ header->links = (dtTileLink*)d; d += linksSize;
+ header->dmeshes = (dtTilePolyDetail*)d; d += detailMeshesSize;
+ header->dverts = (float*)d; d += detailVertsSize;
+ header->dtris = (unsigned char*)d; d += detailTrisSize;
+
+ // Init tile.
+ tile->header = header;
+ tile->x = x;
+ tile->y = y;
+ tile->data = data;
+ tile->dataSize = dataSize;
+ tile->ownsData = ownsData;
+
+ buildIntLinks(tile);
+
+ // Create connections connections.
+ for (int i = 0; i < 4; ++i)
+ {
+ dtTile* nei = getNeighbourTileAt(x,y,i);
+ if (nei)
+ {
+ buildExtLinks(tile, nei, i);
+ buildExtLinks(nei, tile, opposite(i));
+ }
+ }
+
+ return true;
+}
+
+dtTile* dtTiledNavMesh::getTileAt(int x, int y)
+{
+ // Find tile based on hash.
+ int h = computeTileHash(x,y);
+ dtTile* tile = m_posLookup[h];
+ while (tile)
+ {
+ if (tile->x == x && tile->y == y)
+ return tile;
+ tile = tile->next;
+ }
+ return 0;
+}
+
+dtTile* dtTiledNavMesh::getTile(int i)
+{
+ return &m_tiles[i];
+}
+
+const dtTile* dtTiledNavMesh::getTile(int i) const
+{
+ return &m_tiles[i];
+}
+
+dtTile* dtTiledNavMesh::getNeighbourTileAt(int x, int y, int side)
+{
+ switch (side)
+ {
+ case 0: x++; break;
+ case 1: y++; break;
+ case 2: x--; break;
+ case 3: y--; break;
+ };
+ return getTileAt(x,y);
+}
+
+bool dtTiledNavMesh::removeTileAt(int x, int y, unsigned char** data, int* dataSize)
+{
+ // Remove tile from hash lookup.
+ int h = computeTileHash(x,y);
+ dtTile* prev = 0;
+ dtTile* tile = m_posLookup[h];
+ while (tile)
+ {
+ if (tile->x == x && tile->y == y)
+ {
+ if (prev)
+ prev->next = tile->next;
+ else
+ m_posLookup[h] = tile->next;
+ break;
+ }
+ prev = tile;
+ tile = tile->next;
+ }
+ if (!tile)
+ return false;
+
+ // Remove connections to neighbour tiles.
+ for (int i = 0; i < 4; ++i)
+ {
+ dtTile* nei = getNeighbourTileAt(x,y,i);
+ if (!nei) continue;
+ removeExtLinks(nei, opposite(i));
+ }
+
+
+ // Reset tile.
+ if (tile->ownsData)
+ {
+ // Owns data
+ delete [] tile->data;
+ tile->data = 0;
+ tile->dataSize = 0;
+ if (data) *data = 0;
+ if (dataSize) *dataSize = 0;
+ }
+ else
+ {
+ if (data) *data = tile->data;
+ if (dataSize) *dataSize = tile->dataSize;
+ }
+ tile->header = 0;
+ tile->x = tile->y = 0;
+ tile->salt++;
+
+ // Add to free list.
+ tile->next = m_nextFree;
+ m_nextFree = tile;
+
+ return true;
+}
+
+
+
+bool dtTiledNavMesh::closestPointToPoly(dtTilePolyRef ref, const float* pos, float* closest) const
+{
+ unsigned int salt, it, ip;
+ dtDecodeTileId(ref, salt, it, ip);
+ if (it >= DT_MAX_TILES) return false;
+ if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return false;
+ const dtTileHeader* header = m_tiles[it].header;
+
+ if (ip >= (unsigned int)header->npolys) return false;
+ const dtTilePoly* poly = &header->polys[ip];
+
+ float closestDistSqr = FLT_MAX;
+ const dtTilePolyDetail* pd = &header->dmeshes[ip];
+
+ for (int j = 0; j < pd->ntris; ++j)
+ {
+ const unsigned char* t = &header->dtris[(pd->tbase+j)*4];
+ const float* v[3];
+ for (int k = 0; k < 3; ++k)
+ {
+ if (t[k] < poly->nv)
+ v[k] = &header->verts[poly->v[t[k]]*3];
+ else
+ v[k] = &header->dverts[(pd->vbase+(t[k]-poly->nv))*3];
+ }
+ float pt[3];
+ closestPtPointTriangle(pt, pos, v[0], v[1], v[2]);
+ float d = vdistSqr(pos, pt);
+ if (d < closestDistSqr)
+ {
+ vcopy(closest, pt);
+ closestDistSqr = d;
+ }
+ }
+
+ return true;
+}
+
+bool dtTiledNavMesh::getPolyHeight(dtTilePolyRef ref, const float* pos, float* height) const
+{
+ unsigned int salt, it, ip;
+ dtDecodeTileId(ref, salt, it, ip);
+ if (it >= DT_MAX_TILES) return false;
+ if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return false;
+ const dtTileHeader* header = m_tiles[it].header;
+
+ if (ip >= (unsigned int)header->npolys) return false;
+ const dtTilePoly* poly = &header->polys[ip];
+
+ const dtTilePolyDetail* pd = &header->dmeshes[ip];
+ for (int j = 0; j < pd->ntris; ++j)
+ {
+ const unsigned char* t = &header->dtris[(pd->tbase+j)*4];
+ const float* v[3];
+ for (int k = 0; k < 3; ++k)
+ {
+ if (t[k] < poly->nv)
+ v[k] = &header->verts[poly->v[t[k]]*3];
+ else
+ v[k] = &header->dverts[(pd->vbase+(t[k]-poly->nv))*3];
+ }
+ float h;
+ if (closestHeightPointTriangle(pos, v[0], v[1], v[2], h))
+ {
+ if (height)
+ *height = h;
+ return true;
+ }
+ }
+
+ return false;
+}
+
+
+dtTilePolyRef dtTiledNavMesh::findNearestPoly(const float* center, const float* extents)
+{
+ // Get nearby polygons from proximity grid.
+ dtTilePolyRef polys[128];
+ int npolys = queryPolygons(center, extents, polys, 128);
+
+ // Find nearest polygon amongst the nearby polygons.
+ dtTilePolyRef nearest = 0;
+ float nearestDistanceSqr = FLT_MAX;
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtTilePolyRef ref = polys[i];
+ float closest[3];
+ if (!closestPointToPoly(ref, center, closest))
+ continue;
+ float d = vdistSqr(center, closest);
+ if (d < nearestDistanceSqr)
+ {
+ nearestDistanceSqr = d;
+ nearest = ref;
+ }
+ }
+
+ return nearest;
+}
+
+dtTilePolyRef dtTiledNavMesh::getTileId(dtTile* tile)
+{
+ if (!tile) return 0;
+ const unsigned int it = tile - m_tiles;
+ return dtEncodeTileId(tile->salt, it, 0);
+}
+
+int dtTiledNavMesh::queryTilePolygons(dtTile* tile,
+ const float* qmin, const float* qmax,
+ dtTilePolyRef* polys, const int maxPolys)
+{
+ float bmin[3], bmax[3];
+ const dtTileHeader* header = tile->header;
+ int n = 0;
+ dtTilePolyRef base = getTileId(tile);
+ for (int i = 0; i < header->npolys; ++i)
+ {
+ // Calc polygon bounds.
+ dtTilePoly* p = &header->polys[i];
+ const float* v = &header->verts[p->v[0]*3];
+ vcopy(bmin, v);
+ vcopy(bmax, v);
+ for (int j = 1; j < p->nv; ++j)
+ {
+ v = &header->verts[p->v[j]*3];
+ vmin(bmin, v);
+ vmax(bmax, v);
+ }
+ if (overlapBoxes(qmin,qmax, bmin,bmax))
+ {
+ if (n < maxPolys)
+ polys[n++] = base | (dtTilePolyRef)i;
+ }
+ }
+ return n;
+}
+
+int dtTiledNavMesh::queryPolygons(const float* center, const float* extents,
+ dtTilePolyRef* polys, const int maxPolys)
+{
+ float bmin[3], bmax[3];
+ bmin[0] = center[0] - extents[0];
+ bmin[1] = center[1] - extents[1];
+ bmin[2] = center[2] - extents[2];
+
+ bmax[0] = center[0] + extents[0];
+ bmax[1] = center[1] + extents[1];
+ bmax[2] = center[2] + extents[2];
+
+ // Find tiles the query touches.
+ const int minx = (int)floorf((bmin[0]-m_orig[0]) / m_tileSize);
+ const int maxx = (int)ceilf((bmax[0]-m_orig[0]) / m_tileSize);
+
+ const int miny = (int)floorf((bmin[2]-m_orig[2]) / m_tileSize);
+ const int maxy = (int)ceilf((bmax[2]-m_orig[2]) / m_tileSize);
+
+ int n = 0;
+ for (int y = miny; y < maxy; ++y)
+ {
+ for (int x = minx; x < maxx; ++x)
+ {
+ dtTile* tile = getTileAt(x,y);
+ if (!tile) continue;
+ n += queryTilePolygons(tile, bmin, bmax, polys+n, maxPolys-n);
+ if (n >= maxPolys) return n;
+ }
+ }
+
+ return n;
+}
+
+int dtTiledNavMesh::findPath(dtTilePolyRef startRef, dtTilePolyRef endRef,
+ const float* startPos, const float* endPos,
+ dtTilePolyRef* path, const int maxPathSize)
+{
+ if (!startRef || !endRef)
+ return 0;
+
+ if (!maxPathSize)
+ return 0;
+
+ if (!getPolyByRef(startRef) || !getPolyByRef(endRef))
+ return 0;
+
+ if (startRef == endRef)
+ {
+ path[0] = startRef;
+ return 1;
+ }
+
+ if (!m_nodePool || !m_openList)
+ return 0;
+
+ m_nodePool->clear();
+ m_openList->clear();
+
+ static const float H_SCALE = 1.1f; // Heuristic scale.
+
+ dtNode* startNode = m_nodePool->getNode(startRef);
+ startNode->pidx = 0;
+ startNode->cost = 0;
+ startNode->total = vdist(startPos, endPos) * H_SCALE;
+ startNode->id = startRef;
+ startNode->flags = DT_NODE_OPEN;
+ m_openList->push(startNode);
+
+ dtNode* lastBestNode = startNode;
+ float lastBestNodeCost = startNode->total;
+ while (!m_openList->empty())
+ {
+ dtNode* bestNode = m_openList->pop();
+
+ if (bestNode->id == endRef)
+ {
+ lastBestNode = bestNode;
+ break;
+ }
+
+ // Get poly and tile.
+ unsigned int salt, it, ip;
+ dtDecodeTileId(bestNode->id, salt, it, ip);
+ // The API input has been cheked already, skip checking internal data.
+ const dtTileHeader* header = m_tiles[it].header;
+ const dtTilePoly* poly = &header->polys[ip];
+
+ for (int i = 0; i < poly->nlinks; ++i)
+ {
+ dtTilePolyRef neighbour = header->links[poly->links+i].ref;
+ if (neighbour)
+ {
+ // Skip parent node.
+ if (bestNode->pidx && m_nodePool->getNodeAtIdx(bestNode->pidx)->id == neighbour)
+ continue;
+
+ dtNode* parent = bestNode;
+ dtNode newNode;
+ newNode.pidx = m_nodePool->getNodeIdx(parent);
+ newNode.id = neighbour;
+
+ // Calculate cost.
+ float p0[3], p1[3];
+ if (!parent->pidx)
+ vcopy(p0, startPos);
+ else
+ getEdgeMidPoint(m_nodePool->getNodeAtIdx(parent->pidx)->id, parent->id, p0);
+ getEdgeMidPoint(parent->id, newNode.id, p1);
+ newNode.cost = parent->cost + vdist(p0,p1);
+ // Special case for last node.
+ if (newNode.id == endRef)
+ newNode.cost += vdist(p1, endPos);
+
+ // Heuristic
+ const float h = vdist(p1,endPos)*H_SCALE;
+ newNode.total = newNode.cost + h;
+
+ dtNode* actualNode = m_nodePool->getNode(newNode.id);
+ if (!actualNode)
+ continue;
+
+ if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) &&
+ !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total))
+ {
+ actualNode->flags &= DT_NODE_CLOSED;
+ actualNode->pidx = newNode.pidx;
+ actualNode->cost = newNode.cost;
+ actualNode->total = newNode.total;
+
+ if (h < lastBestNodeCost)
+ {
+ lastBestNodeCost = h;
+ lastBestNode = actualNode;
+ }
+
+ if (actualNode->flags & DT_NODE_OPEN)
+ {
+ m_openList->modify(actualNode);
+ }
+ else
+ {
+ actualNode->flags |= DT_NODE_OPEN;
+ m_openList->push(actualNode);
+ }
+ }
+ }
+ }
+ bestNode->flags |= DT_NODE_CLOSED;
+ }
+
+ // Reverse the path.
+ dtNode* prev = 0;
+ dtNode* node = lastBestNode;
+ do
+ {
+ dtNode* next = m_nodePool->getNodeAtIdx(node->pidx);
+ node->pidx = m_nodePool->getNodeIdx(prev);
+ prev = node;
+ node = next;
+ }
+ while (node);
+
+ // Store path
+ node = prev;
+ int n = 0;
+ do
+ {
+ path[n++] = node->id;
+ node = m_nodePool->getNodeAtIdx(node->pidx);
+ }
+ while (node && n < maxPathSize);
+
+ return n;
+}
+
+int dtTiledNavMesh::findStraightPath(const float* startPos, const float* endPos,
+ const dtTilePolyRef* path, const int pathSize,
+ float* straightPath, const int maxStraightPathSize)
+{
+ if (!maxStraightPathSize)
+ return 0;
+
+ if (!path[0])
+ return 0;
+
+ int straightPathSize = 0;
+
+ float closestStartPos[3];
+ if (!closestPointToPoly(path[0], startPos, closestStartPos))
+ return 0;
+
+ // Add start point.
+ vcopy(&straightPath[straightPathSize*3], closestStartPos);
+ straightPathSize++;
+ if (straightPathSize >= maxStraightPathSize)
+ return straightPathSize;
+
+ float closestEndPos[3];
+ if (!closestPointToPoly(path[pathSize-1], endPos, closestEndPos))
+ return 0;
+
+ float portalApex[3], portalLeft[3], portalRight[3];
+
+ if (pathSize > 1)
+ {
+ vcopy(portalApex, closestStartPos);
+ vcopy(portalLeft, portalApex);
+ vcopy(portalRight, portalApex);
+ int apexIndex = 0;
+ int leftIndex = 0;
+ int rightIndex = 0;
+
+ for (int i = 0; i < pathSize; ++i)
+ {
+ float left[3], right[3];
+ if (i < pathSize-1)
+ {
+ // Next portal.
+ if (!getPortalPoints(path[i], path[i+1], left, right))
+ {
+ if (!closestPointToPoly(path[i], endPos, closestEndPos))
+ return 0;
+ vcopy(&straightPath[straightPathSize*3], closestEndPos);
+ straightPathSize++;
+ return straightPathSize;
+ }
+ }
+ else
+ {
+ // End of the path.
+ vcopy(left, closestEndPos);
+ vcopy(right, closestEndPos);
+ }
+
+ // Right vertex.
+ if (vequal(portalApex, portalRight))
+ {
+ vcopy(portalRight, right);
+ rightIndex = i;
+ }
+ else
+ {
+ if (triArea2D(portalApex, portalRight, right) <= 0.0f)
+ {
+ if (triArea2D(portalApex, portalLeft, right) > 0.0f)
+ {
+ vcopy(portalRight, right);
+ rightIndex = i;
+ }
+ else
+ {
+ vcopy(portalApex, portalLeft);
+ apexIndex = leftIndex;
+
+ if (!vequal(&straightPath[(straightPathSize-1)*3], portalApex))
+ {
+ vcopy(&straightPath[straightPathSize*3], portalApex);
+ straightPathSize++;
+ if (straightPathSize >= maxStraightPathSize)
+ return straightPathSize;
+ }
+
+ vcopy(portalLeft, portalApex);
+ vcopy(portalRight, portalApex);
+ leftIndex = apexIndex;
+ rightIndex = apexIndex;
+
+ // Restart
+ i = apexIndex;
+
+ continue;
+ }
+ }
+ }
+
+ // Left vertex.
+ if (vequal(portalApex, portalLeft))
+ {
+ vcopy(portalLeft, left);
+ leftIndex = i;
+ }
+ else
+ {
+ if (triArea2D(portalApex, portalLeft, left) >= 0.0f)
+ {
+ if (triArea2D(portalApex, portalRight, left) < 0.0f)
+ {
+ vcopy(portalLeft, left);
+ leftIndex = i;
+ }
+ else
+ {
+ vcopy(portalApex, portalRight);
+ apexIndex = rightIndex;
+
+ if (!vequal(&straightPath[(straightPathSize-1)*3], portalApex))
+ {
+ vcopy(&straightPath[straightPathSize*3], portalApex);
+ straightPathSize++;
+ if (straightPathSize >= maxStraightPathSize)
+ return straightPathSize;
+ }
+
+ vcopy(portalLeft, portalApex);
+ vcopy(portalRight, portalApex);
+ leftIndex = apexIndex;
+ rightIndex = apexIndex;
+
+ // Restart
+ i = apexIndex;
+
+ continue;
+ }
+ }
+ }
+ }
+ }
+
+ // Add end point.
+ vcopy(&straightPath[straightPathSize*3], closestEndPos);
+ straightPathSize++;
+
+ return straightPathSize;
+}
+
+// Returns portal points between two polygons.
+bool dtTiledNavMesh::getPortalPoints(dtTilePolyRef from, dtTilePolyRef to, float* left, float* right) const
+{
+ unsigned int salt, it, ip;
+ dtDecodeTileId(from, salt, it, ip);
+ if (it >= DT_MAX_TILES) return false;
+ if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return false;
+ if (ip >= (unsigned int)m_tiles[it].header->npolys) return false;
+ const dtTileHeader* fromHeader = m_tiles[it].header;
+ const dtTilePoly* fromPoly = &fromHeader->polys[ip];
+
+ for (int i = 0; i < fromPoly->nlinks; ++i)
+ {
+ const dtTileLink* link = &fromHeader->links[fromPoly->links+i];
+ if (link->ref == to)
+ {
+ // Find portal vertices.
+ const int v0 = fromPoly->v[link->e];
+ const int v1 = fromPoly->v[(link->e+1) % fromPoly->nv];
+ vcopy(left, &fromHeader->verts[v0*3]);
+ vcopy(right, &fromHeader->verts[v1*3]);
+ // If the link is at tile boundary, clamp the vertices to
+ // the link width.
+ if (link->side == 0 || link->side == 2)
+ {
+ // Unpack portal limits.
+ const float smin = min(left[2],right[2]);
+ const float smax = max(left[2],right[2]);
+ const float s = (smax-smin) / 255.0f;
+ const float lmin = smin + link->bmin*s;
+ const float lmax = smin + link->bmax*s;
+ left[2] = max(left[2],lmin);
+ left[2] = min(left[2],lmax);
+ right[2] = max(right[2],lmin);
+ right[2] = min(right[2],lmax);
+ }
+ else if (link->side == 1 || link->side == 3)
+ {
+ // Unpack portal limits.
+ const float smin = min(left[0],right[0]);
+ const float smax = max(left[0],right[0]);
+ const float s = (smax-smin) / 255.0f;
+ const float lmin = smin + link->bmin*s;
+ const float lmax = smin + link->bmax*s;
+ left[0] = max(left[0],lmin);
+ left[0] = min(left[0],lmax);
+ right[0] = max(right[0],lmin);
+ right[0] = min(right[0],lmax);
+ }
+ return true;
+ }
+ }
+ return false;
+}
+
+// Returns edge mid point between two polygons.
+bool dtTiledNavMesh::getEdgeMidPoint(dtTilePolyRef from, dtTilePolyRef to, float* mid) const
+{
+ float left[3], right[3];
+ if (!getPortalPoints(from, to, left,right)) return false;
+ mid[0] = (left[0]+right[0])*0.5f;
+ mid[1] = (left[1]+right[1])*0.5f;
+ mid[2] = (left[2]+right[2])*0.5f;
+ return true;
+}
+
+int dtTiledNavMesh::raycast(dtTilePolyRef centerRef, const float* startPos, const float* endPos,
+ float& t, dtTilePolyRef* path, const int pathSize)
+{
+ t = 0;
+
+ if (!centerRef || !getPolyByRef(centerRef))
+ return 0;
+
+ dtTilePolyRef curRef = centerRef;
+ float verts[DT_TILE_VERTS_PER_POLYGON*3];
+ int n = 0;
+
+ while (curRef)
+ {
+ // Cast ray against current polygon.
+
+ // The API input has been cheked already, skip checking internal data.
+ unsigned int salt, it, ip;
+ dtDecodeTileId(curRef, salt, it, ip);
+ const dtTileHeader* header = m_tiles[it].header;
+ const dtTilePoly* poly = &header->polys[ip];
+
+ // Collect vertices.
+ int nv = 0;
+ for (int i = 0; i < (int)poly->nv; ++i)
+ {
+ vcopy(&verts[nv*3], &header->verts[poly->v[i]*3]);
+ nv++;
+ }
+ if (nv < 3)
+ {
+ // Hit bad polygon, report hit.
+ return n;
+ }
+
+ float tmin, tmax;
+ int segMin, segMax;
+ if (!intersectSegmentPoly2D(startPos, endPos, verts, nv, tmin, tmax, segMin, segMax))
+ {
+ // Could not hit the polygon, keep the old t and report hit.
+ return n;
+ }
+ // Keep track of furthest t so far.
+ if (tmax > t)
+ t = tmax;
+
+ if (n < pathSize)
+ path[n++] = curRef;
+
+ // Follow neighbours.
+ dtTilePolyRef nextRef = 0;
+ for (int i = 0; i < poly->nlinks; ++i)
+ {
+ const dtTileLink* link = &header->links[poly->links+i];
+ if ((int)link->e == segMax)
+ {
+ // If the link is internal, just return the ref.
+ if (link->side == 0xff)
+ {
+ nextRef = link->ref;
+ break;
+ }
+
+ // If the link is at tile boundary,
+ const int v0 = poly->v[link->e];
+ const int v1 = poly->v[(link->e+1) % poly->nv];
+ const float* left = &header->verts[v0*3];
+ const float* right = &header->verts[v1*3];
+
+ // Check that the intersection lies inside the link portal.
+ if (link->side == 0 || link->side == 2)
+ {
+ // Calculate link size.
+ const float smin = min(left[2],right[2]);
+ const float smax = max(left[2],right[2]);
+ const float s = (smax-smin) / 255.0f;
+ const float lmin = smin + link->bmin*s;
+ const float lmax = smin + link->bmax*s;
+ // Find Z intersection.
+ float z = startPos[2] + (endPos[2]-startPos[2])*tmax;
+ if (z >= lmin && z <= lmax)
+ {
+ nextRef = link->ref;
+ break;
+ }
+ }
+ else if (link->side == 1 || link->side == 3)
+ {
+ // Calculate link size.
+ const float smin = min(left[0],right[0]);
+ const float smax = max(left[0],right[0]);
+ const float s = (smax-smin) / 255.0f;
+ const float lmin = smin + link->bmin*s;
+ const float lmax = smin + link->bmax*s;
+ // Find X intersection.
+ float x = startPos[0] + (endPos[0]-startPos[0])*tmax;
+ if (x >= lmin && x <= lmax)
+ {
+ nextRef = link->ref;
+ break;
+ }
+ }
+ }
+ }
+
+ if (!nextRef)
+ {
+ // No neighbour, we hit a wall.
+ return n;
+ }
+
+ // No hit, advance to neighbour polygon.
+ curRef = nextRef;
+ }
+
+ return n;
+}
+
+int dtTiledNavMesh::findPolysAround(dtTilePolyRef centerRef, const float* centerPos, float radius,
+ dtTilePolyRef* resultRef, dtTilePolyRef* resultParent, float* resultCost,
+ const int maxResult)
+{
+ if (!centerRef) return 0;
+ if (!getPolyByRef(centerRef)) return 0;
+ if (!m_nodePool || !m_openList) return 0;
+
+ m_nodePool->clear();
+ m_openList->clear();
+
+ dtNode* startNode = m_nodePool->getNode(centerRef);
+ startNode->pidx = 0;
+ startNode->cost = 0;
+ startNode->total = 0;
+ startNode->id = centerRef;
+ startNode->flags = DT_NODE_OPEN;
+ m_openList->push(startNode);
+
+ int n = 0;
+ if (n < maxResult)
+ {
+ if (resultRef)
+ resultRef[n] = startNode->id;
+ if (resultParent)
+ resultParent[n] = 0;
+ if (resultCost)
+ resultCost[n] = 0;
+ ++n;
+ }
+
+ const float radiusSqr = sqr(radius);
+
+ while (!m_openList->empty())
+ {
+ dtNode* bestNode = m_openList->pop();
+
+ // Get poly and tile.
+ unsigned int salt, it, ip;
+ dtDecodeTileId(bestNode->id, salt, it, ip);
+ // The API input has been cheked already, skip checking internal data.
+ const dtTileHeader* header = m_tiles[it].header;
+ const dtTilePoly* poly = &header->polys[ip];
+
+ for (int i = 0; i < poly->nlinks; ++i)
+ {
+ const dtTileLink* link = &header->links[poly->links+i];
+ dtTilePolyRef neighbour = link->ref;
+ if (neighbour)
+ {
+ // Skip parent node.
+ if (bestNode->pidx && m_nodePool->getNodeAtIdx(bestNode->pidx)->id == neighbour)
+ continue;
+
+ // Calc distance to the edge.
+ const float* va = &header->verts[poly->v[link->e]*3];
+ const float* vb = &header->verts[poly->v[(link->e+1)%poly->nv]*3];
+ float tseg;
+ float distSqr = distancePtSegSqr2D(centerPos, va, vb, tseg);
+
+ // If the circle is not touching the next polygon, skip it.
+ if (distSqr > radiusSqr)
+ continue;
+
+ dtNode* parent = bestNode;
+ dtNode newNode;
+ newNode.pidx = m_nodePool->getNodeIdx(parent);
+ newNode.id = neighbour;
+
+ // Cost
+ float p0[3], p1[3];
+ if (!parent->pidx)
+ vcopy(p0, centerPos);
+ else
+ getEdgeMidPoint(m_nodePool->getNodeAtIdx(parent->pidx)->id, parent->id, p0);
+ getEdgeMidPoint(parent->id, newNode.id, p1);
+ newNode.total = parent->total + vdist(p0,p1);
+
+ dtNode* actualNode = m_nodePool->getNode(newNode.id);
+ if (!actualNode)
+ continue;
+
+ if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) &&
+ !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total))
+ {
+ actualNode->flags &= ~DT_NODE_CLOSED;
+ actualNode->pidx = newNode.pidx;
+ actualNode->total = newNode.total;
+
+ if (actualNode->flags & DT_NODE_OPEN)
+ {
+ m_openList->modify(actualNode);
+ }
+ else
+ {
+ if (n < maxResult)
+ {
+ if (resultRef)
+ resultRef[n] = actualNode->id;
+ if (resultParent)
+ resultParent[n] = m_nodePool->getNodeAtIdx(actualNode->pidx)->id;
+ if (resultCost)
+ resultCost[n] = actualNode->total;
+ ++n;
+ }
+ actualNode->flags = DT_NODE_OPEN;
+ m_openList->push(actualNode);
+ }
+ }
+ }
+ }
+ }
+
+ return n;
+}
+
+float dtTiledNavMesh::findDistanceToWall(dtTilePolyRef centerRef, const float* centerPos, float maxRadius,
+ float* hitPos, float* hitNormal)
+{
+ if (!centerRef) return 0;
+ if (!getPolyByRef(centerRef)) return 0;
+ if (!m_nodePool || !m_openList) return 0;
+
+ m_nodePool->clear();
+ m_openList->clear();
+
+ dtNode* startNode = m_nodePool->getNode(centerRef);
+ startNode->pidx = 0;
+ startNode->cost = 0;
+ startNode->total = 0;
+ startNode->id = centerRef;
+ startNode->flags = DT_NODE_OPEN;
+ m_openList->push(startNode);
+
+ float radiusSqr = sqr(maxRadius);
+
+ while (!m_openList->empty())
+ {
+ dtNode* bestNode = m_openList->pop();
+
+ // Get poly and tile.
+ unsigned int salt, it, ip;
+ dtDecodeTileId(bestNode->id, salt, it, ip);
+ // The API input has been cheked already, skip checking internal data.
+ const dtTileHeader* header = m_tiles[it].header;
+ const dtTilePoly* poly = &header->polys[ip];
+
+ // Hit test walls.
+ for (int i = 0, j = (int)poly->nv-1; i < (int)poly->nv; j = i++)
+ {
+ // Skip non-solid edges.
+ if (poly->n[j] & 0x8000)
+ {
+ // Tile border.
+ bool solid = true;
+ for (int i = 0; i < poly->nlinks; ++i)
+ {
+ const dtTileLink* link = &header->links[poly->links+i];
+ if (link->e == j && link->ref != 0)
+ {
+ solid = false;
+ break;
+ }
+ }
+ if (!solid) continue;
+ }
+ else if (poly->n[j])
+ {
+ // Internal edge
+ continue;
+ }
+
+ // Calc distance to the edge.
+ const float* vj = &header->verts[poly->v[j]*3];
+ const float* vi = &header->verts[poly->v[i]*3];
+ float tseg;
+ float distSqr = distancePtSegSqr2D(centerPos, vj, vi, tseg);
+
+ // Edge is too far, skip.
+ if (distSqr > radiusSqr)
+ continue;
+
+ // Hit wall, update radius.
+ radiusSqr = distSqr;
+ // Calculate hit pos.
+ hitPos[0] = vj[0] + (vi[0] - vj[0])*tseg;
+ hitPos[1] = vj[1] + (vi[1] - vj[1])*tseg;
+ hitPos[2] = vj[2] + (vi[2] - vj[2])*tseg;
+ }
+
+ for (int i = 0; i < poly->nlinks; ++i)
+ {
+ const dtTileLink* link = &header->links[poly->links+i];
+ dtTilePolyRef neighbour = link->ref;
+ if (neighbour)
+ {
+ // Skip parent node.
+ if (bestNode->pidx && m_nodePool->getNodeAtIdx(bestNode->pidx)->id == neighbour)
+ continue;
+
+ // Calc distance to the edge.
+ const float* va = &header->verts[poly->v[link->e]*3];
+ const float* vb = &header->verts[poly->v[(link->e+1)%poly->nv]*3];
+ float tseg;
+ float distSqr = distancePtSegSqr2D(centerPos, va, vb, tseg);
+
+ // If the circle is not touching the next polygon, skip it.
+ if (distSqr > radiusSqr)
+ continue;
+
+ dtNode* parent = bestNode;
+ dtNode newNode;
+ newNode.pidx = m_nodePool->getNodeIdx(parent);
+ newNode.id = neighbour;
+
+ float p0[3], p1[3];
+ if (!parent->pidx)
+ vcopy(p0, centerPos);
+ else
+ getEdgeMidPoint(m_nodePool->getNodeAtIdx(parent->pidx)->id, parent->id, p0);
+ getEdgeMidPoint(parent->id, newNode.id, p1);
+ newNode.total = parent->total + vdist(p0,p1);
+
+ dtNode* actualNode = m_nodePool->getNode(newNode.id);
+ if (!actualNode)
+ continue;
+
+ if (!((actualNode->flags & DT_NODE_OPEN) && newNode.total > actualNode->total) &&
+ !((actualNode->flags & DT_NODE_CLOSED) && newNode.total > actualNode->total))
+ {
+ actualNode->flags &= ~DT_NODE_CLOSED;
+ actualNode->pidx = newNode.pidx;
+ actualNode->total = newNode.total;
+
+ if (actualNode->flags & DT_NODE_OPEN)
+ {
+ m_openList->modify(actualNode);
+ }
+ else
+ {
+ actualNode->flags = DT_NODE_OPEN;
+ m_openList->push(actualNode);
+ }
+ }
+ }
+ }
+ }
+
+ // Calc hit normal.
+ vsub(hitNormal, centerPos, hitPos);
+ vnormalize(hitNormal);
+
+ return sqrtf(radiusSqr);
+}
+
+const dtTilePoly* dtTiledNavMesh::getPolyByRef(dtTilePolyRef ref) const
+{
+ unsigned int salt, it, ip;
+ dtDecodeTileId(ref, salt, it, ip);
+ if (it >= DT_MAX_TILES) return 0;
+ if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return 0;
+ if (ip >= (unsigned int)m_tiles[it].header->npolys) return 0;
+ return &m_tiles[it].header->polys[ip];
+}
+
+const float* dtTiledNavMesh::getPolyVertsByRef(dtTilePolyRef ref) const
+{
+ unsigned int salt, it, ip;
+ dtDecodeTileId(ref, salt, it, ip);
+ if (it >= DT_MAX_TILES) return 0;
+ if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return 0;
+ if (ip >= (unsigned int)m_tiles[it].header->npolys) return 0;
+ return m_tiles[it].header->verts;
+}
+
+const dtTileLink* dtTiledNavMesh::getPolyLinksByRef(dtTilePolyRef ref) const
+{
+ unsigned int salt, it, ip;
+ dtDecodeTileId(ref, salt, it, ip);
+ if (it >= DT_MAX_TILES) return 0;
+ if (m_tiles[it].salt != salt || m_tiles[it].header == 0) return 0;
+ if (ip >= (unsigned int)m_tiles[it].header->npolys) return 0;
+ return m_tiles[it].header->links;
+}
diff --git a/extern/recastnavigation/Detour/Source/DetourTileNavMeshBuilder.cpp b/extern/recastnavigation/Detour/Source/DetourTileNavMeshBuilder.cpp
new file mode 100644
index 00000000000..95dd34b04f6
--- /dev/null
+++ b/extern/recastnavigation/Detour/Source/DetourTileNavMeshBuilder.cpp
@@ -0,0 +1,213 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "DetourTileNavMesh.h"
+#include "DetourCommon.h"
+
+bool dtCreateNavMeshTileData(const unsigned short* verts, const int nverts,
+ const unsigned short* polys, const int npolys, const int nvp,
+ const unsigned short* dmeshes, const float* dverts, const int ndverts,
+ const unsigned char* dtris, const int ndtris,
+ const float* bmin, const float* bmax, float cs, float ch, int tileSize, int walkableClimb,
+ unsigned char** outData, int* outDataSize)
+{
+ if (nvp != DT_TILE_VERTS_PER_POLYGON)
+ return false;
+ if (nverts >= 0xffff)
+ return false;
+
+ if (!nverts)
+ return false;
+ if (!npolys)
+ return false;
+ if (!dmeshes || !dverts || ! dtris)
+ return false;
+
+ // Find portal edges which are at tile borders.
+ int nedges = 0;
+ int nportals = 0;
+ for (int i = 0; i < npolys; ++i)
+ {
+ const unsigned short* p = &polys[i*2*nvp];
+ for (int j = 0; j < nvp; ++j)
+ {
+ if (p[j] == 0xffff) break;
+ int nj = j+1;
+ if (nj >= nvp || p[nj] == 0xffff) nj = 0;
+ const unsigned short* va = &verts[p[j]*3];
+ const unsigned short* vb = &verts[p[nj]*3];
+
+ nedges++;
+
+ if (va[0] == tileSize && vb[0] == tileSize)
+ nportals++; // x+
+ else if (va[2] == tileSize && vb[2] == tileSize)
+ nportals++; // z+
+ else if (va[0] == 0 && vb[0] == 0)
+ nportals++; // x-
+ else if (va[2] == 0 && vb[2] == 0)
+ nportals++; // z-
+ }
+ }
+
+ const int maxLinks = nedges + nportals*2;
+
+
+ // Find unique detail vertices.
+ int uniqueDetailVerts = 0;
+ if (dmeshes)
+ {
+ for (int i = 0; i < npolys; ++i)
+ {
+ const unsigned short* p = &polys[i*nvp*2];
+ int ndv = dmeshes[i*4+1];
+ int nv = 0;
+ for (int j = 0; j < nvp; ++j)
+ {
+ if (p[j] == 0xffff) break;
+ nv++;
+ }
+ ndv -= nv;
+ uniqueDetailVerts += ndv;
+ }
+ }
+
+ // Calculate data size
+ const int headerSize = sizeof(dtTileHeader);
+ const int vertsSize = sizeof(float)*3*nverts;
+ const int polysSize = sizeof(dtTilePoly)*npolys;
+ const int linksSize = sizeof(dtTileLink)*maxLinks;
+ const int detailMeshesSize = sizeof(dtTilePolyDetail)*npolys;
+ const int detailVertsSize = sizeof(float)*3*uniqueDetailVerts;
+ const int detailTrisSize = sizeof(unsigned char)*4*ndtris;
+
+ const int dataSize = headerSize + vertsSize + polysSize + linksSize +
+ detailMeshesSize + detailVertsSize + detailTrisSize;
+ unsigned char* data = new unsigned char[dataSize];
+ if (!data)
+ return false;
+ memset(data, 0, dataSize);
+
+ unsigned char* d = data;
+ dtTileHeader* header = (dtTileHeader*)d; d += headerSize;
+ float* navVerts = (float*)d; d += vertsSize;
+ dtTilePoly* navPolys = (dtTilePoly*)d; d += polysSize;
+ d += linksSize;
+ dtTilePolyDetail* navDMeshes = (dtTilePolyDetail*)d; d += detailMeshesSize;
+ float* navDVerts = (float*)d; d += detailVertsSize;
+ unsigned char* navDTris = (unsigned char*)d; d += detailTrisSize;
+
+
+ // Store header
+ header->magic = DT_TILE_NAVMESH_MAGIC;
+ header->version = DT_TILE_NAVMESH_VERSION;
+ header->npolys = npolys;
+ header->nverts = nverts;
+ header->maxlinks = maxLinks;
+ header->bmin[0] = bmin[0];
+ header->bmin[1] = bmin[1];
+ header->bmin[2] = bmin[2];
+ header->bmax[0] = bmax[0];
+ header->bmax[1] = bmax[1];
+ header->bmax[2] = bmax[2];
+ header->ndmeshes = npolys;
+ header->ndverts = uniqueDetailVerts;
+ header->ndtris = ndtris;
+
+ // Store vertices
+ for (int i = 0; i < nverts; ++i)
+ {
+ const unsigned short* iv = &verts[i*3];
+ float* v = &navVerts[i*3];
+ v[0] = bmin[0] + iv[0] * cs;
+ v[1] = bmin[1] + iv[1] * ch;
+ v[2] = bmin[2] + iv[2] * cs;
+ }
+
+ // Store polygons
+ const unsigned short* src = polys;
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtTilePoly* p = &navPolys[i];
+ p->nv = 0;
+ for (int j = 0; j < nvp; ++j)
+ {
+ if (src[j] == 0xffff) break;
+ p->v[j] = src[j];
+ p->n[j] = (src[nvp+j]+1) & 0xffff;
+ p->nv++;
+ }
+ src += nvp*2;
+ }
+
+ // Store portal edges.
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtTilePoly* poly = &navPolys[i];
+ for (int j = 0; j < poly->nv; ++j)
+ {
+ int nj = j+1;
+ if (nj >= poly->nv) nj = 0;
+
+ const unsigned short* va = &verts[poly->v[j]*3];
+ const unsigned short* vb = &verts[poly->v[nj]*3];
+
+ if (va[0] == tileSize && vb[0] == tileSize) // x+
+ poly->n[j] = 0x8000 | 0;
+ else if (va[2] == tileSize && vb[2] == tileSize) // z+
+ poly->n[j] = 0x8000 | 1;
+ else if (va[0] == 0 && vb[0] == 0) // x-
+ poly->n[j] = 0x8000 | 2;
+ else if (va[2] == 0 && vb[2] == 0) // z-
+ poly->n[j] = 0x8000 | 3;
+ }
+ }
+
+ // Store detail meshes and vertices.
+ // The nav polygon vertices are stored as the first vertices on each mesh.
+ // We compress the mesh data by skipping them and using the navmesh coordinates.
+ unsigned short vbase = 0;
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtTilePolyDetail& dtl = navDMeshes[i];
+ const int vb = dmeshes[i*4+0];
+ const int ndv = dmeshes[i*4+1];
+ const int nv = navPolys[i].nv;
+ dtl.vbase = vbase;
+ dtl.nverts = ndv-nv;
+ dtl.tbase = dmeshes[i*4+2];
+ dtl.ntris = dmeshes[i*4+3];
+ // Copy vertices except the first 'nv' verts which are equal to nav poly verts.
+ if (ndv-nv)
+ {
+ memcpy(&navDVerts[vbase*3], &dverts[(vb+nv)*3], sizeof(float)*3*(ndv-nv));
+ vbase += ndv-nv;
+ }
+ }
+ // Store triangles.
+ memcpy(navDTris, dtris, sizeof(unsigned char)*4*ndtris);
+
+ *outData = data;
+ *outDataSize = dataSize;
+
+ return true;
+}
diff --git a/extern/recastnavigation/License.txt b/extern/recastnavigation/License.txt
new file mode 100644
index 00000000000..95f4bfc9654
--- /dev/null
+++ b/extern/recastnavigation/License.txt
@@ -0,0 +1,18 @@
+Copyright (c) 2009 Mikko Mononen memon@inside.org
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+
diff --git a/extern/recastnavigation/Readme.txt b/extern/recastnavigation/Readme.txt
new file mode 100644
index 00000000000..0c2f7b1675f
--- /dev/null
+++ b/extern/recastnavigation/Readme.txt
@@ -0,0 +1,120 @@
+
+Recast & Detour Version 1.4
+
+
+Recast
+
+Recast is state of the art navigation mesh construction toolset for games.
+
+ * It is automatic, which means that you can throw any level geometry
+ at it and you will get robust mesh out
+ * It is fast which means swift turnaround times for level designers
+ * It is open source so it comes with full source and you can
+ customize it to your hearts content.
+
+The Recast process starts with constructing a voxel mold from a level geometry
+and then casting a navigation mesh over it. The process consists of three steps,
+building the voxel mold, partitioning the mold into simple regions, peeling off
+the regions as simple polygons.
+
+ 1. The voxel mold is build from the input triangle mesh by rasterizing
+ the triangles into a multi-layer heightfield. Some simple filters are
+ then applied to the mold to prune out locations where the character
+ would not be able to move.
+ 2. The walkable areas described by the mold are divided into simple
+ overlayed 2D regions. The resulting regions have only one non-overlapping
+ contour, which simplifies the final step of the process tremendously.
+ 3. The navigation polygons are peeled off from the regions by first tracing
+ the boundaries and then simplifying them. The resulting polygons are
+ finally converted to convex polygons which makes them perfect for
+ pathfinding and spatial reasoning about the level.
+
+The toolset code is located in the Recast folder and demo application using the Recast
+toolset is located in the RecastDemo folder.
+
+The project files with this distribution can be compiled with Microsoft Visual C++ 2008
+(you can download it for free) and XCode 3.1.
+
+
+Detour
+
+Recast is accompanied with Detour, path-finding and spatial reasoning toolkit. You can use any navigation mesh with Detour, but of course the data generated with Recast fits perfectly.
+
+Detour offers simple static navigation mesh which is suitable for many simple cases, as well as tiled navigation mesh which allows you to plug in and out pieces of the mesh. The tiled mesh allows to create systems where you stream new navigation data in and out as the player progresses the level, or you may regenerate tiles as the world changes.
+
+
+Latest code available at http://code.google.com/p/recastnavigation/
+
+
+--
+
+Release Notes
+
+----------------
+* Recast 1.4
+ Released August 24th, 2009
+
+- Added detail height mesh generation (RecastDetailMesh.cpp) for single,
+ tiled statmeshes as well as tilemesh.
+- Added feature to contour tracing which detects extra vertices along
+ tile edges which should be removed later.
+- Changed the tiled stat mesh preprocess, so that it first generated
+ polymeshes per tile and finally combines them.
+- Fixed bug in the GUI code where invisible buttons could be pressed.
+
+----------------
+* Recast 1.31
+ Released July 24th, 2009
+
+- Better cost and heuristic functions.
+- Fixed tile navmesh raycast on tile borders.
+
+----------------
+* Recast 1.3
+ Released July 14th, 2009
+
+- Added dtTileNavMesh which allows to dynamically add and remove navmesh pieces at runtime.
+- Renamed stat navmesh types to dtStat* (i.e. dtPoly is now dtStatPoly).
+- Moved common code used by tile and stat navmesh to DetourNode.h/cpp and DetourCommon.h/cpp.
+- Refactores the demo code.
+
+----------------
+* Recast 1.2
+ Released June 17th, 2009
+
+- Added tiled mesh generation. The tiled generation allows to generate navigation for
+ much larger worlds, it removes some of the artifacts that comes from distance fields
+ in open areas, and allows later streaming and dynamic runtime generation
+- Improved and added some debug draw modes
+- API change: The helper function rcBuildNavMesh does not exists anymore,
+ had to change few internal things to cope with the tiled processing,
+ similar API functionality will be added later once the tiled process matures
+- The demo is getting way too complicated, need to split demos
+- Fixed several filtering functions so that the mesh is tighter to the geometry,
+ sometimes there could be up error up to tow voxel units close to walls,
+ now it should be just one.
+
+----------------
+* Recast 1.1
+ Released April 11th, 2009
+
+This is the first release of Detour.
+
+----------------
+* Recast 1.0
+ Released March 29th, 2009
+
+This is the first release of Recast.
+
+The process is not always as robust as I would wish. The watershed phase sometimes swallows tiny islands
+which are close to edges. These droppings are handled in rcBuildContours, but the code is not
+particularly robust either.
+
+Another non-robust case is when portal contours (contours shared between two regions) are always
+assumed to be straight. That can lead to overlapping contours specially when the level has
+large open areas.
+
+
+
+Mikko Mononen
+memon@inside.org
diff --git a/extern/recastnavigation/Recast/Include/Recast.h b/extern/recastnavigation/Recast/Include/Recast.h
new file mode 100644
index 00000000000..f25ab47f8fa
--- /dev/null
+++ b/extern/recastnavigation/Recast/Include/Recast.h
@@ -0,0 +1,501 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef RECAST_H
+#define RECAST_H
+
+// The units of the parameters are specified in parenthesis as follows:
+// (vx) voxels, (wu) world units
+struct rcConfig
+{
+ int width, height; // Dimensions of the rasterized heighfield (vx)
+ int tileSize; // Width and Height of a tile (vx)
+ int borderSize; // Non-navigable Border around the heightfield (vx)
+ float cs, ch; // Grid cell size and height (wu)
+ float bmin[3], bmax[3]; // Grid bounds (wu)
+ float walkableSlopeAngle; // Maximum walkble slope angle in degrees.
+ int walkableHeight; // Minimum height where the agent can still walk (vx)
+ int walkableClimb; // Maximum height between grid cells the agent can climb (vx)
+ int walkableRadius; // Radius of the agent in cells (vx)
+ int maxEdgeLen; // Maximum contour edge length (vx)
+ float maxSimplificationError; // Maximum distance error from contour to cells (vx)
+ int minRegionSize; // Minimum regions size. Smaller regions will be deleted (vx)
+ int mergeRegionSize; // Minimum regions size. Smaller regions will be merged (vx)
+ int maxVertsPerPoly; // Max number of vertices per polygon
+ float detailSampleDist; // Detail mesh sample spacing.
+ float detailSampleMaxError; // Detail mesh simplification max sample error.
+};
+
+// Heightfield span.
+struct rcSpan
+{
+ unsigned int smin : 15; // Span min height.
+ unsigned int smax : 15; // Span max height.
+ unsigned int flags : 2; // Span flags.
+ rcSpan* next; // Next span in column.
+};
+
+static const int RC_SPANS_PER_POOL = 2048;
+
+// Memory pool used for quick span allocation.
+struct rcSpanPool
+{
+ rcSpanPool* next; // Pointer to next pool.
+ rcSpan items[1]; // Array of spans (size RC_SPANS_PER_POOL).
+};
+
+// Dynamic span-heightfield.
+struct rcHeightfield
+{
+ inline rcHeightfield() : width(0), height(0), spans(0), pools(0), freelist(0) {}
+ inline ~rcHeightfield()
+ {
+ // Delete span array.
+ delete [] spans;
+ // Delete span pools.
+ while (pools)
+ {
+ rcSpanPool* next = pools->next;
+ delete [] reinterpret_cast<unsigned char*>(pools);
+ pools = next;
+ }
+ }
+ int width, height; // Dimension of the heightfield.
+ float bmin[3], bmax[3]; // Bounding box of the heightfield
+ float cs, ch; // Cell size and height.
+ rcSpan** spans; // Heightfield of spans (width*height).
+ rcSpanPool* pools; // Linked list of span pools.
+ rcSpan* freelist; // Pointer to next free span.
+};
+
+struct rcCompactCell
+{
+ unsigned int index : 24; // Index to first span in column.
+ unsigned int count : 8; // Number of spans in this column.
+};
+
+struct rcCompactSpan
+{
+ unsigned short y; // Bottom coordinate of the span.
+ unsigned short reg; // Region ID
+ unsigned short dist; // Distance to border
+ unsigned short con; // Connections to neighbour cells.
+ unsigned char h; // Height of the span.
+ unsigned char flags; // Flags.
+};
+
+// Compact static heightfield.
+struct rcCompactHeightfield
+{
+ inline rcCompactHeightfield() : maxDistance(0), maxRegions(0), cells(0), spans(0) {}
+ inline ~rcCompactHeightfield() { delete [] cells; delete [] spans; }
+ int width, height; // Width and height of the heighfield.
+ int spanCount; // Number of spans in the heightfield.
+ int walkableHeight, walkableClimb; // Agent properties.
+ unsigned short maxDistance; // Maximum distance value stored in heightfield.
+ unsigned short maxRegions; // Maximum Region Id stored in heightfield.
+ float bmin[3], bmax[3]; // Bounding box of the heightfield.
+ float cs, ch; // Cell size and height.
+ rcCompactCell* cells; // Pointer to width*height cells.
+ rcCompactSpan* spans; // Pointer to spans.
+};
+
+struct rcContour
+{
+ inline rcContour() : verts(0), nverts(0), rverts(0), nrverts(0) { }
+ inline ~rcContour() { delete [] verts; delete [] rverts; }
+ int* verts; // Vertex coordinates, each vertex contains 4 components.
+ int nverts; // Number of vertices.
+ int* rverts; // Raw vertex coordinates, each vertex contains 4 components.
+ int nrverts; // Number of raw vertices.
+ unsigned short reg; // Region ID of the contour.
+};
+
+struct rcContourSet
+{
+ inline rcContourSet() : conts(0), nconts(0) {}
+ inline ~rcContourSet() { delete [] conts; }
+ rcContour* conts; // Pointer to all contours.
+ int nconts; // Number of contours.
+ float bmin[3], bmax[3]; // Bounding box of the heightfield.
+ float cs, ch; // Cell size and height.
+};
+
+// Polymesh store a connected mesh of polygons.
+// The polygons are store in an array where each polygons takes
+// 'nvp*2' elements. The first 'nvp' elements are indices to vertices
+// and the second 'nvp' elements are indices to neighbour polygons.
+// If a polygona has less than 'bvp' vertices, the remaining indices
+// are set os 0xffff. If an polygon edge does not have a neighbour
+// the neighbour index is set to 0xffff.
+// Vertices can be transformed into world space as follows:
+// x = bmin[0] + verts[i*3+0]*cs;
+// y = bmin[1] + verts[i*3+1]*ch;
+// z = bmin[2] + verts[i*3+2]*cs;
+struct rcPolyMesh
+{
+ inline rcPolyMesh() : verts(0), polys(0), regs(0), nverts(0), npolys(0), nvp(3) {}
+ inline ~rcPolyMesh() { delete [] verts; delete [] polys; delete [] regs; }
+ unsigned short* verts; // Vertices of the mesh, 3 elements per vertex.
+ unsigned short* polys; // Polygons of the mesh, nvp*2 elements per polygon.
+ unsigned short* regs; // Regions of the polygons.
+ int nverts; // Number of vertices.
+ int npolys; // Number of polygons.
+ int nvp; // Max number of vertices per polygon.
+ float bmin[3], bmax[3]; // Bounding box of the mesh.
+ float cs, ch; // Cell size and height.
+};
+
+// Detail mesh generated from a rcPolyMesh.
+// Each submesh represents a polygon in the polymesh and they are stored in
+// excatly same order. Each submesh is described as 4 values:
+// base vertex, vertex count, base triangle, triangle count. That is,
+// const unsigned char* t = &dtl.tris[(tbase+i)*3]; and
+// const float* v = &dtl.verts[(vbase+t[j])*3];
+// If the input polygon has 'n' vertices, those vertices are first in the
+// submesh vertex list. This allows to compres the mesh by not storing the
+// first vertices and using the polymesh vertices instead.
+
+struct rcPolyMeshDetail
+{
+ inline rcPolyMeshDetail() :
+ meshes(0), verts(0), tris(0),
+ nmeshes(0), nverts(0), ntris(0) {}
+ inline ~rcPolyMeshDetail()
+ {
+ delete [] meshes; delete [] verts; delete [] tris;
+ }
+
+ unsigned short* meshes; // Pointer to all mesh data.
+ float* verts; // Pointer to all vertex data.
+ unsigned char* tris; // Pointer to all triangle data.
+ int nmeshes; // Number of meshes.
+ int nverts; // Number of total vertices.
+ int ntris; // Number of triangles.
+};
+
+
+// Simple dynamic array ints.
+class rcIntArray
+{
+ int* m_data;
+ int m_size, m_cap;
+public:
+ inline rcIntArray() : m_data(0), m_size(0), m_cap(0) {}
+ inline rcIntArray(int n) : m_data(0), m_size(0), m_cap(n) { m_data = new int[n]; }
+ inline ~rcIntArray() { delete [] m_data; }
+ void resize(int n);
+ inline void push(int item) { resize(m_size+1); m_data[m_size-1] = item; }
+ inline int pop() { if (m_size > 0) m_size--; return m_data[m_size]; }
+ inline const int& operator[](int i) const { return m_data[i]; }
+ inline int& operator[](int i) { return m_data[i]; }
+ inline int size() const { return m_size; }
+};
+
+enum rcSpanFlags
+{
+ RC_WALKABLE = 0x01,
+ RC_REACHABLE = 0x02,
+};
+
+// If heightfield region ID has the following bit set, the region is on border area
+// and excluded from many calculations.
+static const unsigned short RC_BORDER_REG = 0x8000;
+
+// If contour region ID has the following bit set, the vertex will be later
+// removed in order to match the segments and vertices at tile boundaries.
+static const int RC_BORDER_VERTEX = 0x10000;
+
+// Compact span neighbour helpers.
+inline int rcGetCon(const rcCompactSpan& s, int dir)
+{
+ return (s.con >> (dir*4)) & 0xf;
+}
+
+inline int rcGetDirOffsetX(int dir)
+{
+ const int offset[4] = { -1, 0, 1, 0, };
+ return offset[dir&0x03];
+}
+
+inline int rcGetDirOffsetY(int dir)
+{
+ const int offset[4] = { 0, 1, 0, -1 };
+ return offset[dir&0x03];
+}
+
+// Common helper functions
+template<class T> inline void rcSwap(T& a, T& b) { T t = a; a = b; b = t; }
+template<class T> inline T rcMin(T a, T b) { return a < b ? a : b; }
+template<class T> inline T rcMax(T a, T b) { return a > b ? a : b; }
+template<class T> inline T rcAbs(T a) { return a < 0 ? -a : a; }
+template<class T> inline T rcSqr(T a) { return a*a; }
+template<class T> inline T rcClamp(T v, T mn, T mx) { return v < mn ? mn : (v > mx ? mx : v); }
+
+// Common vector helper functions.
+inline void vcross(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[1]*v2[2] - v1[2]*v2[1];
+ dest[1] = v1[2]*v2[0] - v1[0]*v2[2];
+ dest[2] = v1[0]*v2[1] - v1[1]*v2[0];
+}
+
+inline float vdot(const float* v1, const float* v2)
+{
+ return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
+}
+
+inline void vmad(float* dest, const float* v1, const float* v2, const float s)
+{
+ dest[0] = v1[0]+v2[0]*s;
+ dest[1] = v1[1]+v2[1]*s;
+ dest[2] = v1[2]+v2[2]*s;
+}
+
+inline void vadd(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[0]+v2[0];
+ dest[1] = v1[1]+v2[1];
+ dest[2] = v1[2]+v2[2];
+}
+
+inline void vsub(float* dest, const float* v1, const float* v2)
+{
+ dest[0] = v1[0]-v2[0];
+ dest[1] = v1[1]-v2[1];
+ dest[2] = v1[2]-v2[2];
+}
+
+inline void vmin(float* mn, const float* v)
+{
+ mn[0] = rcMin(mn[0], v[0]);
+ mn[1] = rcMin(mn[1], v[1]);
+ mn[2] = rcMin(mn[2], v[2]);
+}
+
+inline void vmax(float* mx, const float* v)
+{
+ mx[0] = rcMax(mx[0], v[0]);
+ mx[1] = rcMax(mx[1], v[1]);
+ mx[2] = rcMax(mx[2], v[2]);
+}
+
+inline void vcopy(float* dest, const float* v)
+{
+ dest[0] = v[0];
+ dest[1] = v[1];
+ dest[2] = v[2];
+}
+
+inline float vdist(const float* v1, const float* v2)
+{
+ float dx = v2[0] - v1[0];
+ float dy = v2[1] - v1[1];
+ float dz = v2[2] - v1[2];
+ return sqrtf(dx*dx + dy*dy + dz*dz);
+}
+
+inline float vdistSqr(const float* v1, const float* v2)
+{
+ float dx = v2[0] - v1[0];
+ float dy = v2[1] - v1[1];
+ float dz = v2[2] - v1[2];
+ return dx*dx + dy*dy + dz*dz;
+}
+
+inline void vnormalize(float* v)
+{
+ float d = 1.0f / sqrtf(rcSqr(v[0]) + rcSqr(v[1]) + rcSqr(v[2]));
+ v[0] *= d;
+ v[1] *= d;
+ v[2] *= d;
+}
+
+inline bool vequal(const float* p0, const float* p1)
+{
+ static const float thr = rcSqr(1.0f/16384.0f);
+ const float d = vdistSqr(p0, p1);
+ return d < thr;
+}
+
+
+// Calculated bounding box of array of vertices.
+// Params:
+// verts - (in) array of vertices
+// nv - (in) vertex count
+// bmin, bmax - (out) bounding box
+void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax);
+
+// Calculates grid size based on bounding box and grid cell size.
+// Params:
+// bmin, bmax - (in) bounding box
+// cs - (in) grid cell size
+// w - (out) grid width
+// h - (out) grid height
+void rcCalcGridSize(const float* bmin, const float* bmax, float cs, int* w, int* h);
+
+// Creates and initializes new heightfield.
+// Params:
+// hf - (in/out) heightfield to initialize.
+// width - (in) width of the heightfield.
+// height - (in) height of the heightfield.
+// bmin, bmax - (in) bounding box of the heightfield
+// cs - (in) grid cell size
+// ch - (in) grid cell height
+bool rcCreateHeightfield(rcHeightfield& hf, int width, int height,
+ const float* bmin, const float* bmax,
+ float cs, float ch);
+
+// Sets the WALKABLE flag for every triangle whose slope is below
+// the maximun walkable slope angle.
+// Params:
+// walkableSlopeAngle - (in) maximun slope angle in degrees.
+// verts - (in) array of vertices
+// nv - (in) vertex count
+// tris - (in) array of triangle vertex indices
+// nt - (in) triangle count
+// flags - (out) array of triangle flags
+void rcMarkWalkableTriangles(const float walkableSlopeAngle,
+ const float* verts, int nv,
+ const int* tris, int nt,
+ unsigned char* flags);
+
+// Rasterizes a triangle into heightfield spans.
+// Params:
+// v0,v1,v2 - (in) the vertices of the triangle.
+// flags - (in) triangle flags (uses WALKABLE)
+// solid - (in) heighfield where the triangle is rasterized
+void rcRasterizeTriangle(const float* v0, const float* v1, const float* v2,
+ unsigned char flags, rcHeightfield& solid);
+
+// Rasterizes the triangles into heightfield spans.
+// Params:
+// verts - (in) array of vertices
+// nv - (in) vertex count
+// tris - (in) array of triangle vertex indices
+// norms - (in) array of triangle normals
+// flags - (in) array of triangle flags (uses WALKABLE)
+// nt - (in) triangle count
+// solid - (in) heighfield where the triangles are rasterized
+void rcRasterizeTriangles(const float* verts, int nv,
+ const int* tris, const unsigned char* flags, int nt,
+ rcHeightfield& solid);
+
+// Removes WALKABLE flag from all spans that are at ledges. This filtering
+// removes possible overestimation of the conservative voxelization so that
+// the resulting mesh will not have regions hanging in air over ledges.
+// Params:
+// walkableHeight - (in) minimum height where the agent can still walk
+// walkableClimb - (in) maximum height between grid cells the agent can climb
+// solid - (in/out) heightfield describing the solid space
+void rcFilterLedgeSpans(const int walkableHeight,
+ const int walkableClimb,
+ rcHeightfield& solid);
+
+// Removes WALKABLE flag from all spans which have smaller than
+// 'walkableHeight' clearane above them.
+// Params:
+// walkableHeight - (in) minimum height where the agent can still walk
+// solid - (in/out) heightfield describing the solid space
+void rcFilterWalkableLowHeightSpans(int walkableHeight,
+ rcHeightfield& solid);
+
+// Marks spans which are reachable from any of the topmost spans.
+// Params:
+// walkableHeight - (in) minimum height where the agent can still walk
+// walkableClimb - (in) maximum height between grid cells the agent can climb
+// solid - (in/out) heightfield describing the solid space
+// Returns false if operation ran out of memory.
+bool rcMarkReachableSpans(const int walkableHeight,
+ const int walkableClimb,
+ rcHeightfield& solid);
+
+// Builds compact representation of the heightfield.
+// Params:
+// walkableHeight - (in) minimum height where the agent can still walk
+// walkableClimb - (in) maximum height between grid cells the agent can climb
+// hf - (in) heightfield to be compacted
+// chf - (out) compact heightfield representing the open space.
+// Returns false if operation ran out of memory.
+bool rcBuildCompactHeightfield(const int walkableHeight, const int walkableClimb,
+ unsigned char flags,
+ rcHeightfield& hf,
+ rcCompactHeightfield& chf);
+
+// Builds distance field and stores it into the combat heightfield.
+// Params:
+// chf - (in/out) compact heightfield representing the open space.
+// Returns false if operation ran out of memory.
+bool rcBuildDistanceField(rcCompactHeightfield& chf);
+
+// Divides the walkable heighfied into simple regions.
+// Each region has only one contour and no overlaps.
+// The regions are stored in the compact heightfield 'reg' field.
+// The regions will be shrinked by the radius of the agent.
+// The process sometimes creates small regions. The parameter
+// 'minRegionSize' specifies the smallest allowed regions size.
+// If the area of a regions is smaller than allowed, the regions is
+// removed or merged to neighbour region.
+// Params:
+// chf - (in/out) compact heightfield representing the open space.
+// walkableRadius - (in) the radius of the agent.
+// minRegionSize - (in) the smallest allowed regions size.
+// maxMergeRegionSize - (in) the largest allowed regions size which can be merged.
+// Returns false if operation ran out of memory.
+bool rcBuildRegions(rcCompactHeightfield& chf,
+ int walkableRadius, int borderSize,
+ int minRegionSize, int mergeRegionSize);
+
+// Builds simplified contours from the regions outlines.
+// Params:
+// chf - (in) compact heightfield which has regions set.
+// maxError - (in) maximum allowed distance between simplified countour and cells.
+// maxEdgeLen - (in) maximum allowed contour edge length in cells.
+// cset - (out) Resulting contour set.
+// Returns false if operation ran out of memory.
+bool rcBuildContours(rcCompactHeightfield& chf,
+ const float maxError, const int maxEdgeLen,
+ rcContourSet& cset);
+
+// Builds connected convex polygon mesh from contour polygons.
+// Params:
+// cset - (in) contour set.
+// nvp - (in) maximum number of vertices per polygon.
+// mesh - (out) poly mesh.
+// Returns false if operation ran out of memory.
+bool rcBuildPolyMesh(rcContourSet& cset, int nvp, rcPolyMesh& mesh);
+
+bool rcMergePolyMeshes(rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh);
+
+// Builds detail triangle mesh for each polygon in the poly mesh.
+// Params:
+// mesh - (in) poly mesh to detail.
+// chf - (in) compacy height field, used to query height for new vertices.
+// sampleDist - (in) spacing between height samples used to generate more detail into mesh.
+// sampleMaxError - (in) maximum allowed distance between simplified detail mesh and height sample.
+// pmdtl - (out) detail mesh.
+// Returns false if operation ran out of memory.
+bool rcBuildPolyMeshDetail(const rcPolyMesh& mesh, const rcCompactHeightfield& chf,
+ const float sampleDist, const float sampleMaxError,
+ rcPolyMeshDetail& dmesh);
+
+bool rcMergePolyMeshDetails(rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh);
+
+bool buildMeshAdjacency(unsigned short* polys, const int npolys, const int nverts, const int vertsPerPoly);
+
+#endif // RECAST_H
diff --git a/extern/recastnavigation/Recast/Include/RecastLog.h b/extern/recastnavigation/Recast/Include/RecastLog.h
new file mode 100644
index 00000000000..026ef73a3aa
--- /dev/null
+++ b/extern/recastnavigation/Recast/Include/RecastLog.h
@@ -0,0 +1,80 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#ifndef RECAST_LOG_H
+#define RECAST_LOG_H
+
+enum rcLogCategory
+{
+ RC_LOG_PROGRESS = 1,
+ RC_LOG_WARNING,
+ RC_LOG_ERROR,
+};
+
+class rcLog
+{
+public:
+ rcLog();
+ ~rcLog();
+
+ void log(rcLogCategory category, const char* format, ...);
+ inline void clear() { m_messageCount = 0; m_textPoolSize = 0; }
+ inline int getMessageCount() const { return m_messageCount; }
+ inline char getMessageType(int i) const { return *m_messages[i]; }
+ inline const char* getMessageText(int i) const { return m_messages[i]+1; }
+
+private:
+ static const int MAX_MESSAGES = 1000;
+ const char* m_messages[MAX_MESSAGES];
+ int m_messageCount;
+ static const int TEXT_POOL_SIZE = 8000;
+ char m_textPool[TEXT_POOL_SIZE];
+ int m_textPoolSize;
+};
+
+struct rcBuildTimes
+{
+ int rasterizeTriangles;
+ int buildCompact;
+ int buildContours;
+ int buildContoursTrace;
+ int buildContoursSimplify;
+ int filterBorder;
+ int filterWalkable;
+ int filterMarkReachable;
+ int buildPolymesh;
+ int buildDistanceField;
+ int buildDistanceFieldDist;
+ int buildDistanceFieldBlur;
+ int buildRegions;
+ int buildRegionsReg;
+ int buildRegionsExp;
+ int buildRegionsFlood;
+ int buildRegionsFilter;
+ int buildDetailMesh;
+ int mergePolyMesh;
+ int mergePolyMeshDetail;
+};
+
+void rcSetLog(rcLog* log);
+rcLog* rcGetLog();
+
+void rcSetBuildTimes(rcBuildTimes* btimes);
+rcBuildTimes* rcGetBuildTimes();
+
+#endif // RECAST_LOG_H
diff --git a/extern/recastnavigation/Recast/Include/RecastTimer.h b/extern/recastnavigation/Recast/Include/RecastTimer.h
new file mode 100644
index 00000000000..d4f21e58776
--- /dev/null
+++ b/extern/recastnavigation/Recast/Include/RecastTimer.h
@@ -0,0 +1,31 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+#ifndef RECAST_TIMER_H
+#define RECAST_TIMER_H
+
+#ifdef __GNUC__
+#include <stdint.h>
+typedef int64_t rcTimeVal;
+#else
+typedef __int64 rcTimeVal;
+#endif
+
+rcTimeVal rcGetPerformanceTimer();
+int rcGetDeltaTimeUsec(rcTimeVal start, rcTimeVal end);
+
+#endif // RECAST_TIMER_H
diff --git a/extern/recastnavigation/Recast/Source/Recast.cpp b/extern/recastnavigation/Recast/Source/Recast.cpp
new file mode 100644
index 00000000000..0db26c2c1cd
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/Recast.cpp
@@ -0,0 +1,272 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <float.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastLog.h"
+#include "RecastTimer.h"
+
+
+void rcIntArray::resize(int n)
+{
+ if (n > m_cap)
+ {
+ if (!m_cap) m_cap = 8;
+ while (m_cap < n) m_cap *= 2;
+ int* newData = new int[m_cap];
+ if (m_size && newData) memcpy(newData, m_data, m_size*sizeof(int));
+ delete [] m_data;
+ m_data = newData;
+ }
+ m_size = n;
+}
+
+void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax)
+{
+ // Calculate bounding box.
+ vcopy(bmin, verts);
+ vcopy(bmax, verts);
+ for (int i = 1; i < nv; ++i)
+ {
+ const float* v = &verts[i*3];
+ vmin(bmin, v);
+ vmax(bmax, v);
+ }
+}
+
+void rcCalcGridSize(const float* bmin, const float* bmax, float cs, int* w, int* h)
+{
+ *w = (int)((bmax[0] - bmin[0])/cs+0.5f);
+ *h = (int)((bmax[2] - bmin[2])/cs+0.5f);
+}
+
+bool rcCreateHeightfield(rcHeightfield& hf, int width, int height,
+ const float* bmin, const float* bmax,
+ float cs, float ch)
+{
+ hf.width = width;
+ hf.height = height;
+ hf.spans = new rcSpan*[hf.width*hf.height];
+ vcopy(hf.bmin, bmin);
+ vcopy(hf.bmax, bmax);
+ hf.cs = cs;
+ hf.ch = ch;
+ if (!hf.spans)
+ return false;
+ memset(hf.spans, 0, sizeof(rcSpan*)*hf.width*hf.height);
+ return true;
+}
+
+static void calcTriNormal(const float* v0, const float* v1, const float* v2, float* norm)
+{
+ float e0[3], e1[3];
+ vsub(e0, v1, v0);
+ vsub(e1, v2, v0);
+ vcross(norm, e0, e1);
+ vnormalize(norm);
+}
+
+void rcMarkWalkableTriangles(const float walkableSlopeAngle,
+ const float* verts, int nv,
+ const int* tris, int nt,
+ unsigned char* flags)
+{
+ const float walkableThr = cosf(walkableSlopeAngle/180.0f*(float)M_PI);
+
+ float norm[3];
+
+ for (int i = 0; i < nt; ++i)
+ {
+ const int* tri = &tris[i*3];
+ calcTriNormal(&verts[tri[0]*3], &verts[tri[1]*3], &verts[tri[2]*3], norm);
+ // Check if the face is walkable.
+ if (norm[1] > walkableThr)
+ flags[i] |= RC_WALKABLE;
+ }
+}
+
+static int getSpanCount(unsigned char flags, rcHeightfield& hf)
+{
+ const int w = hf.width;
+ const int h = hf.height;
+ int spanCount = 0;
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ for (rcSpan* s = hf.spans[x + y*w]; s; s = s->next)
+ {
+ if (s->flags == flags)
+ spanCount++;
+ }
+ }
+ }
+ return spanCount;
+}
+
+inline void setCon(rcCompactSpan& s, int dir, int i)
+{
+ s.con &= ~(0xf << (dir*4));
+ s.con |= (i&0xf) << (dir*4);
+}
+
+bool rcBuildCompactHeightfield(const int walkableHeight, const int walkableClimb,
+ unsigned char flags, rcHeightfield& hf,
+ rcCompactHeightfield& chf)
+{
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ const int w = hf.width;
+ const int h = hf.height;
+ const int spanCount = getSpanCount(flags, hf);
+
+ // Fill in header.
+ chf.width = w;
+ chf.height = h;
+ chf.spanCount = spanCount;
+ chf.walkableHeight = walkableHeight;
+ chf.walkableClimb = walkableClimb;
+ chf.maxRegions = 0;
+ vcopy(chf.bmin, hf.bmin);
+ vcopy(chf.bmax, hf.bmax);
+ chf.bmax[1] += walkableHeight*hf.ch;
+ chf.cs = hf.cs;
+ chf.ch = hf.ch;
+ chf.cells = new rcCompactCell[w*h];
+ if (!chf.cells)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Out of memory 'chf.cells' (%d)", w*h);
+ return false;
+ }
+ memset(chf.cells, 0, sizeof(rcCompactCell)*w*h);
+ chf.spans = new rcCompactSpan[spanCount];
+ if (!chf.spans)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildCompactHeightfield: Out of memory 'chf.spans' (%d)", spanCount);
+ return false;
+ }
+ memset(chf.spans, 0, sizeof(rcCompactSpan)*spanCount);
+
+ const int MAX_HEIGHT = 0xffff;
+
+ // Fill in cells and spans.
+ int idx = 0;
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcSpan* s = hf.spans[x + y*w];
+ // If there are no spans at this cell, just leave the data to index=0, count=0.
+ if (!s) continue;
+ rcCompactCell& c = chf.cells[x+y*w];
+ c.index = idx;
+ c.count = 0;
+ while (s)
+ {
+ if (s->flags == flags)
+ {
+ const int bot = (int)s->smax;
+ const int top = s->next ? (int)s->next->smin : MAX_HEIGHT;
+ chf.spans[idx].y = (unsigned short)rcClamp(bot, 0, 0xffff);
+ chf.spans[idx].h = (unsigned char)rcClamp(top - bot, 0, 0xff);
+ idx++;
+ c.count++;
+ }
+ s = s->next;
+ }
+ }
+ }
+
+ // Find neighbour connections.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ rcCompactSpan& s = chf.spans[i];
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ setCon(s, dir, 0xf);
+ const int nx = x + rcGetDirOffsetX(dir);
+ const int ny = y + rcGetDirOffsetY(dir);
+ // First check that the neighbour cell is in bounds.
+ if (nx < 0 || ny < 0 || nx >= w || ny >= h)
+ continue;
+ // Iterate over all neighbour spans and check if any of the is
+ // accessible from current cell.
+ const rcCompactCell& nc = chf.cells[nx+ny*w];
+ for (int k = (int)nc.index, nk = (int)(nc.index+nc.count); k < nk; ++k)
+ {
+ const rcCompactSpan& ns = chf.spans[k];
+ const int bot = rcMax(s.y, ns.y);
+ const int top = rcMin(s.y+s.h, ns.y+ns.h);
+
+ // Check that the gap between the spans is walkable,
+ // and that the climb height between the gaps is not too high.
+ if ((top - bot) >= walkableHeight && rcAbs((int)ns.y - (int)s.y) <= walkableClimb)
+ {
+ // Mark direction as walkable.
+ setCon(s, dir, k - (int)nc.index);
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->buildCompact += rcGetDeltaTimeUsec(startTime, endTime);
+
+ return true;
+}
+
+static int getHeightfieldMemoryUsage(const rcHeightfield& hf)
+{
+ int size = 0;
+ size += sizeof(hf);
+ size += hf.width * hf.height * sizeof(rcSpan*);
+
+ rcSpanPool* pool = hf.pools;
+ while (pool)
+ {
+ size += (sizeof(rcSpanPool) - sizeof(rcSpan)) + sizeof(rcSpan)*RC_SPANS_PER_POOL;
+ pool = pool->next;
+ }
+ return size;
+}
+
+static int getCompactHeightFieldMemoryusage(const rcCompactHeightfield& chf)
+{
+ int size = 0;
+ size += sizeof(rcCompactHeightfield);
+ size += sizeof(rcCompactSpan) * chf.spanCount;
+ size += sizeof(rcCompactCell) * chf.width * chf.height;
+ return size;
+}
diff --git a/extern/recastnavigation/Recast/Source/RecastContour.cpp b/extern/recastnavigation/Recast/Source/RecastContour.cpp
new file mode 100644
index 00000000000..96f763a18f3
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/RecastContour.cpp
@@ -0,0 +1,732 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastLog.h"
+#include "RecastTimer.h"
+
+
+static int getCornerHeight(int x, int y, int i, int dir,
+ const rcCompactHeightfield& chf,
+ bool& isBorderVertex)
+{
+ const rcCompactSpan& s = chf.spans[i];
+ int ch = (int)s.y;
+ int dirp = (dir+1) & 0x3;
+
+ unsigned short regs[4] = {0,0,0,0};
+
+ regs[0] = s.reg;
+
+ if (rcGetCon(s, dir) != 0xf)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir);
+ const rcCompactSpan& as = chf.spans[ai];
+ ch = rcMax(ch, (int)as.y);
+ regs[1] = as.reg;
+ if (rcGetCon(as, dirp) != 0xf)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dirp);
+ const int ay2 = ay + rcGetDirOffsetY(dirp);
+ const int ai2 = (int)chf.cells[ax2+ay2*chf.width].index + rcGetCon(as, dirp);
+ const rcCompactSpan& as2 = chf.spans[ai2];
+ ch = rcMax(ch, (int)as2.y);
+ regs[2] = as2.reg;
+ }
+ }
+ if (rcGetCon(s, dirp) != 0xf)
+ {
+ const int ax = x + rcGetDirOffsetX(dirp);
+ const int ay = y + rcGetDirOffsetY(dirp);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dirp);
+ const rcCompactSpan& as = chf.spans[ai];
+ ch = rcMax(ch, (int)as.y);
+ regs[3] = as.reg;
+ if (rcGetCon(as, dir) != 0xf)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dir);
+ const int ay2 = ay + rcGetDirOffsetY(dir);
+ const int ai2 = (int)chf.cells[ax2+ay2*chf.width].index + rcGetCon(as, dir);
+ const rcCompactSpan& as2 = chf.spans[ai2];
+ ch = rcMax(ch, (int)as2.y);
+ regs[2] = as2.reg;
+ }
+ }
+
+ // Check if the vertex is special edge vertex, these vertices will be removed later.
+ for (int j = 0; j < 4; ++j)
+ {
+ const int a = j;
+ const int b = (j+1) & 0x3;
+ const int c = (j+2) & 0x3;
+ const int d = (j+3) & 0x3;
+
+ // The vertex is a border vertex there are two same exterior cells in a row,
+ // followed by two interior cells and none of the regions are out of bounds.
+ const bool twoSameExts = (regs[a] & regs[b] & RC_BORDER_REG) != 0 && regs[a] == regs[b];
+ const bool twoInts = ((regs[c] | regs[d]) & RC_BORDER_REG) == 0;
+ const bool noZeros = regs[a] != 0 && regs[b] != 0 && regs[c] != 0 && regs[d] != 0;
+ if (twoSameExts && twoInts && noZeros)
+ {
+ isBorderVertex = true;
+ break;
+ }
+ }
+
+ return ch;
+}
+
+static void walkContour(int x, int y, int i,
+ rcCompactHeightfield& chf,
+ unsigned char* flags, rcIntArray& points)
+{
+ // Choose the first non-connected edge
+ unsigned char dir = 0;
+ while ((flags[i] & (1 << dir)) == 0)
+ dir++;
+
+ unsigned char startDir = dir;
+ int starti = i;
+
+ int iter = 0;
+ while (++iter < 40000)
+ {
+ if (flags[i] & (1 << dir))
+ {
+ // Choose the edge corner
+ bool isBorderVertex = false;
+ int px = x;
+ int py = getCornerHeight(x, y, i, dir, chf, isBorderVertex);
+ int pz = y;
+ switch(dir)
+ {
+ case 0: pz++; break;
+ case 1: px++; pz++; break;
+ case 2: px++; break;
+ }
+ int r = 0;
+ const rcCompactSpan& s = chf.spans[i];
+ if (rcGetCon(s, dir) != 0xf)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir);
+ const rcCompactSpan& as = chf.spans[ai];
+ r = (int)as.reg;
+ }
+ if (isBorderVertex)
+ r |= RC_BORDER_VERTEX;
+ points.push(px);
+ points.push(py);
+ points.push(pz);
+ points.push(r);
+
+ flags[i] &= ~(1 << dir); // Remove visited edges
+ dir = (dir+1) & 0x3; // Rotate CW
+ }
+ else
+ {
+ int ni = -1;
+ const int nx = x + rcGetDirOffsetX(dir);
+ const int ny = y + rcGetDirOffsetY(dir);
+ const rcCompactSpan& s = chf.spans[i];
+ if (rcGetCon(s, dir) != 0xf)
+ {
+ const rcCompactCell& nc = chf.cells[nx+ny*chf.width];
+ ni = (int)nc.index + rcGetCon(s, dir);
+ }
+ if (ni == -1)
+ {
+ // Should not happen.
+ return;
+ }
+ x = nx;
+ y = ny;
+ i = ni;
+ dir = (dir+3) & 0x3; // Rotate CCW
+ }
+
+ if (starti == i && startDir == dir)
+ {
+ break;
+ }
+ }
+}
+
+static float distancePtSeg(int x, int y, int z,
+ int px, int py, int pz,
+ int qx, int qy, int qz)
+{
+/* float pqx = (float)(qx - px);
+ float pqy = (float)(qy - py);
+ float pqz = (float)(qz - pz);
+ float dx = (float)(x - px);
+ float dy = (float)(y - py);
+ float dz = (float)(z - pz);
+ float d = pqx*pqx + pqy*pqy + pqz*pqz;
+ float t = pqx*dx + pqy*dy + pqz*dz;
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+
+ dx = px + t*pqx - x;
+ dy = py + t*pqy - y;
+ dz = pz + t*pqz - z;
+
+ return dx*dx + dy*dy + dz*dz;*/
+
+ float pqx = (float)(qx - px);
+ float pqz = (float)(qz - pz);
+ float dx = (float)(x - px);
+ float dz = (float)(z - pz);
+ float d = pqx*pqx + pqz*pqz;
+ float t = pqx*dx + pqz*dz;
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+
+ dx = px + t*pqx - x;
+ dz = pz + t*pqz - z;
+
+ return dx*dx + dz*dz;
+}
+
+static void simplifyContour(rcIntArray& points, rcIntArray& simplified, float maxError, int maxEdgeLen)
+{
+ // Add initial points.
+ bool noConnections = true;
+ for (int i = 0; i < points.size(); i += 4)
+ {
+ if ((points[i+3] & 0xffff) != 0)
+ {
+ noConnections = false;
+ break;
+ }
+ }
+
+ if (noConnections)
+ {
+ // If there is no connections at all,
+ // create some initial points for the simplification process.
+ // Find lower-left and upper-right vertices of the contour.
+ int llx = points[0];
+ int lly = points[1];
+ int llz = points[2];
+ int lli = 0;
+ int urx = points[0];
+ int ury = points[1];
+ int urz = points[2];
+ int uri = 0;
+ for (int i = 0; i < points.size(); i += 4)
+ {
+ int x = points[i+0];
+ int y = points[i+1];
+ int z = points[i+2];
+ if (x < llx || (x == llx && z < llz))
+ {
+ llx = x;
+ lly = y;
+ llz = z;
+ lli = i/4;
+ }
+ if (x >= urx || (x == urx && z > urz))
+ {
+ urx = x;
+ ury = y;
+ urz = z;
+ uri = i/4;
+ }
+ }
+ simplified.push(llx);
+ simplified.push(lly);
+ simplified.push(llz);
+ simplified.push(lli);
+
+ simplified.push(urx);
+ simplified.push(ury);
+ simplified.push(urz);
+ simplified.push(uri);
+ }
+ else
+ {
+ // The contour has some portals to other regions.
+ // Add a new point to every location where the region changes.
+ for (int i = 0, ni = points.size()/4; i < ni; ++i)
+ {
+ int ii = (i+1) % ni;
+ if ((points[i*4+3] & 0xffff) != (points[ii*4+3] & 0xffff))
+ {
+ simplified.push(points[i*4+0]);
+ simplified.push(points[i*4+1]);
+ simplified.push(points[i*4+2]);
+ simplified.push(i);
+ }
+ }
+ }
+
+ // Add points until all raw points are within
+ // error tolerance to the simplified shape.
+ const int pn = points.size()/4;
+ for (int i = 0; i < simplified.size()/4; )
+ {
+ int ii = (i+1) % (simplified.size()/4);
+
+ int ax = simplified[i*4+0];
+ int ay = simplified[i*4+1];
+ int az = simplified[i*4+2];
+ int ai = simplified[i*4+3];
+
+ int bx = simplified[ii*4+0];
+ int by = simplified[ii*4+1];
+ int bz = simplified[ii*4+2];
+ int bi = simplified[ii*4+3];
+
+ // Find maximum deviation from the segment.
+ float maxd = 0;
+ int maxi = -1;
+ int ci = (ai+1) % pn;
+
+ // Tesselate only outer edges.
+ if ((points[ci*4+3] & 0xffff) == 0)
+ {
+ while (ci != bi)
+ {
+ float d = distancePtSeg(points[ci*4+0], points[ci*4+1]/4, points[ci*4+2],
+ ax, ay/4, az, bx, by/4, bz);
+ if (d > maxd)
+ {
+ maxd = d;
+ maxi = ci;
+ }
+ ci = (ci+1) % pn;
+ }
+ }
+
+
+ // If the max deviation is larger than accepted error,
+ // add new point, else continue to next segment.
+ if (maxi != -1 && maxd > (maxError*maxError))
+ {
+ // Add space for the new point.
+ simplified.resize(simplified.size()+4);
+ int n = simplified.size()/4;
+ for (int j = n-1; j > i; --j)
+ {
+ simplified[j*4+0] = simplified[(j-1)*4+0];
+ simplified[j*4+1] = simplified[(j-1)*4+1];
+ simplified[j*4+2] = simplified[(j-1)*4+2];
+ simplified[j*4+3] = simplified[(j-1)*4+3];
+ }
+ // Add the point.
+ simplified[(i+1)*4+0] = points[maxi*4+0];
+ simplified[(i+1)*4+1] = points[maxi*4+1];
+ simplified[(i+1)*4+2] = points[maxi*4+2];
+ simplified[(i+1)*4+3] = maxi;
+ }
+ else
+ {
+ ++i;
+ }
+ }
+
+ // Split too long edges.
+ if (maxEdgeLen > 0)
+ {
+ for (int i = 0; i < simplified.size()/4; )
+ {
+ int ii = (i+1) % (simplified.size()/4);
+
+ int ax = simplified[i*4+0];
+ int az = simplified[i*4+2];
+ int ai = simplified[i*4+3];
+
+ int bx = simplified[ii*4+0];
+ int bz = simplified[ii*4+2];
+ int bi = simplified[ii*4+3];
+
+ // Find maximum deviation from the segment.
+ int maxi = -1;
+ int ci = (ai+1) % pn;
+
+ // Tesselate only outer edges.
+ if ((points[ci*4+3] & 0xffff) == 0)
+ {
+ int dx = bx - ax;
+ int dz = bz - az;
+ if (dx*dx + dz*dz > maxEdgeLen*maxEdgeLen)
+ {
+ int n = bi < ai ? (bi+pn - ai) : (bi - ai);
+ maxi = (ai + n/2) % pn;
+ }
+ }
+
+ // If the max deviation is larger than accepted error,
+ // add new point, else continue to next segment.
+ if (maxi != -1)
+ {
+ // Add space for the new point.
+ simplified.resize(simplified.size()+4);
+ int n = simplified.size()/4;
+ for (int j = n-1; j > i; --j)
+ {
+ simplified[j*4+0] = simplified[(j-1)*4+0];
+ simplified[j*4+1] = simplified[(j-1)*4+1];
+ simplified[j*4+2] = simplified[(j-1)*4+2];
+ simplified[j*4+3] = simplified[(j-1)*4+3];
+ }
+ // Add the point.
+ simplified[(i+1)*4+0] = points[maxi*4+0];
+ simplified[(i+1)*4+1] = points[maxi*4+1];
+ simplified[(i+1)*4+2] = points[maxi*4+2];
+ simplified[(i+1)*4+3] = maxi;
+ }
+ else
+ {
+ ++i;
+ }
+ }
+ }
+
+ for (int i = 0; i < simplified.size()/4; ++i)
+ {
+ // The edge vertex flag is take from the current raw point,
+ // and the neighbour region is take from the next raw point.
+ const int ai = (simplified[i*4+3]+1) % pn;
+ const int bi = simplified[i*4+3];
+ simplified[i*4+3] = (points[ai*4+3] & 0xffff) | (points[bi*4+3] & RC_BORDER_VERTEX);
+ }
+
+}
+
+static void removeDegenerateSegments(rcIntArray& simplified)
+{
+ // Remove adjacent vertices which are equal on xz-plane,
+ // or else the triangulator will get confused.
+ for (int i = 0; i < simplified.size()/4; ++i)
+ {
+ int ni = i+1;
+ if (ni >= (simplified.size()/4))
+ ni = 0;
+
+ if (simplified[i*4+0] == simplified[ni*4+0] &&
+ simplified[i*4+2] == simplified[ni*4+2])
+ {
+ // Degenerate segment, remove.
+ for (int j = i; j < simplified.size()/4-1; ++j)
+ {
+ simplified[j*4+0] = simplified[(j+1)*4+0];
+ simplified[j*4+1] = simplified[(j+1)*4+1];
+ simplified[j*4+2] = simplified[(j+1)*4+2];
+ simplified[j*4+3] = simplified[(j+1)*4+3];
+ }
+ simplified.pop();
+ }
+ }
+}
+
+static int calcAreaOfPolygon2D(const int* verts, const int nverts)
+{
+ int area = 0;
+ for (int i = 0, j = nverts-1; i < nverts; j=i++)
+ {
+ const int* vi = &verts[i*4];
+ const int* vj = &verts[j*4];
+ area += vi[0] * vj[2] - vj[0] * vi[2];
+ }
+ return (area+1) / 2;
+}
+
+static void getClosestIndices(const int* vertsa, const int nvertsa,
+ const int* vertsb, const int nvertsb,
+ int& ia, int& ib)
+{
+ int closestDist = 0xfffffff;
+ for (int i = 0; i < nvertsa; ++i)
+ {
+ const int* va = &vertsa[i*4];
+ for (int j = 0; j < nvertsb; ++j)
+ {
+ const int* vb = &vertsb[j*4];
+ const int dx = vb[0] - va[0];
+ const int dz = vb[2] - va[2];
+ const int d = dx*dx + dz*dz;
+ if (d < closestDist)
+ {
+ ia = i;
+ ib = j;
+ closestDist = d;
+ }
+ }
+ }
+}
+
+static bool mergeContours(rcContour& ca, rcContour& cb, int ia, int ib)
+{
+ const int maxVerts = ca.nverts + cb.nverts + 2;
+ int* verts = new int[maxVerts*4];
+ if (!verts)
+ return false;
+
+ int nv = 0;
+
+ // Copy contour A.
+ for (int i = 0; i <= ca.nverts; ++i)
+ {
+ int* dst = &verts[nv*4];
+ const int* src = &ca.verts[((ia+i)%ca.nverts)*4];
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ dst[3] = src[3];
+ nv++;
+ }
+
+ // Copy contour B
+ for (int i = 0; i <= cb.nverts; ++i)
+ {
+ int* dst = &verts[nv*4];
+ const int* src = &cb.verts[((ib+i)%cb.nverts)*4];
+ dst[0] = src[0];
+ dst[1] = src[1];
+ dst[2] = src[2];
+ dst[3] = src[3];
+ nv++;
+ }
+
+ delete [] ca.verts;
+ ca.verts = verts;
+ ca.nverts = nv;
+
+ delete [] cb.verts;
+ cb.verts = 0;
+ cb.nverts = 0;
+
+ return true;
+}
+
+bool rcBuildContours(rcCompactHeightfield& chf,
+ const float maxError, const int maxEdgeLen,
+ rcContourSet& cset)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ vcopy(cset.bmin, chf.bmin);
+ vcopy(cset.bmax, chf.bmax);
+ cset.cs = chf.cs;
+ cset.ch = chf.ch;
+
+ const int maxContours = chf.maxRegions*2;
+ cset.conts = new rcContour[maxContours];
+ if (!cset.conts)
+ return false;
+ cset.nconts = 0;
+
+ unsigned char* flags = new unsigned char[chf.spanCount];
+ if (!flags)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildContours: Out of memory 'flags'.");
+ return false;
+ }
+
+ rcTimeVal traceStartTime = rcGetPerformanceTimer();
+
+
+ // Mark boundaries.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ unsigned char res = 0;
+ const rcCompactSpan& s = chf.spans[i];
+ if (!s.reg || (s.reg & RC_BORDER_REG))
+ {
+ flags[i] = 0;
+ continue;
+ }
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ unsigned short r = 0;
+ if (rcGetCon(s, dir) != 0xf)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ const rcCompactSpan& as = chf.spans[ai];
+ r = as.reg;
+ }
+ if (r == s.reg)
+ res |= (1 << dir);
+ }
+ flags[i] = res ^ 0xf; // Inverse, mark non connected edges.
+ }
+ }
+ }
+
+ rcTimeVal traceEndTime = rcGetPerformanceTimer();
+
+ rcTimeVal simplifyStartTime = rcGetPerformanceTimer();
+
+ rcIntArray verts(256);
+ rcIntArray simplified(64);
+
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (flags[i] == 0 || flags[i] == 0xf)
+ {
+ flags[i] = 0;
+ continue;
+ }
+ unsigned short reg = chf.spans[i].reg;
+ if (!reg || (reg & RC_BORDER_REG))
+ continue;
+
+ verts.resize(0);
+ simplified.resize(0);
+ walkContour(x, y, i, chf, flags, verts);
+ simplifyContour(verts, simplified, maxError, maxEdgeLen);
+ removeDegenerateSegments(simplified);
+
+ // Store region->contour remap info.
+ // Create contour.
+ if (simplified.size()/4 >= 3)
+ {
+ if (cset.nconts >= maxContours)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildContours: Too many contours %d, max %d.", cset.nconts, maxContours);
+ return false;
+ }
+
+ rcContour* cont = &cset.conts[cset.nconts++];
+
+ cont->nverts = simplified.size()/4;
+ cont->verts = new int[cont->nverts*4];
+ memcpy(cont->verts, &simplified[0], sizeof(int)*cont->nverts*4);
+
+ cont->nrverts = verts.size()/4;
+ cont->rverts = new int[cont->nrverts*4];
+ memcpy(cont->rverts, &verts[0], sizeof(int)*cont->nrverts*4);
+
+/* cont->cx = cont->cy = cont->cz = 0;
+ for (int i = 0; i < cont->nverts; ++i)
+ {
+ cont->cx += cont->verts[i*4+0];
+ cont->cy += cont->verts[i*4+1];
+ cont->cz += cont->verts[i*4+2];
+ }
+ cont->cx /= cont->nverts;
+ cont->cy /= cont->nverts;
+ cont->cz /= cont->nverts;*/
+
+ cont->reg = reg;
+ }
+ }
+ }
+ }
+
+ // Check and merge droppings.
+ // Sometimes the previous algorithms can fail and create several countours
+ // per area. This pass will try to merge the holes into the main region.
+ for (int i = 0; i < cset.nconts; ++i)
+ {
+ rcContour& cont = cset.conts[i];
+ // Check if the contour is would backwards.
+ if (calcAreaOfPolygon2D(cont.verts, cont.nverts) < 0)
+ {
+ // Find another contour which has the same region ID.
+ int mergeIdx = -1;
+ for (int j = 0; j < cset.nconts; ++j)
+ {
+ if (i == j) continue;
+ if (cset.conts[j].nverts && cset.conts[j].reg == cont.reg)
+ {
+ // Make sure the polygon is correctly oriented.
+ if (calcAreaOfPolygon2D(cset.conts[j].verts, cset.conts[j].nverts))
+ {
+ mergeIdx = j;
+ break;
+ }
+ }
+ }
+ if (mergeIdx == -1)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "rcBuildContours: Could not find merge target for bad contour %d.", i);
+ }
+ else
+ {
+ rcContour& mcont = cset.conts[mergeIdx];
+ // Merge by closest points.
+ int ia, ib;
+ getClosestIndices(mcont.verts, mcont.nverts, cont.verts, cont.nverts, ia, ib);
+ if (!mergeContours(mcont, cont, ia, ib))
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "rcBuildContours: Failed to merge contours %d and %d.", i, mergeIdx);
+ }
+ }
+ }
+ }
+
+
+ delete [] flags;
+
+ rcTimeVal simplifyEndTime = rcGetPerformanceTimer();
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+// if (rcGetLog())
+// {
+// rcGetLog()->log(RC_LOG_PROGRESS, "Create contours: %.3f ms", rcGetDeltaTimeUsec(startTime, endTime)/1000.0f);
+// rcGetLog()->log(RC_LOG_PROGRESS, " - boundary: %.3f ms", rcGetDeltaTimeUsec(boundaryStartTime, boundaryEndTime)/1000.0f);
+// rcGetLog()->log(RC_LOG_PROGRESS, " - contour: %.3f ms", rcGetDeltaTimeUsec(contourStartTime, contourEndTime)/1000.0f);
+// }
+
+ if (rcGetBuildTimes())
+ {
+ rcGetBuildTimes()->buildContours += rcGetDeltaTimeUsec(startTime, endTime);
+ rcGetBuildTimes()->buildContoursTrace += rcGetDeltaTimeUsec(traceStartTime, traceEndTime);
+ rcGetBuildTimes()->buildContoursSimplify += rcGetDeltaTimeUsec(simplifyStartTime, simplifyEndTime);
+ }
+
+ return true;
+}
diff --git a/extern/recastnavigation/Recast/Source/RecastFilter.cpp b/extern/recastnavigation/Recast/Source/RecastFilter.cpp
new file mode 100644
index 00000000000..ebe60714a18
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/RecastFilter.cpp
@@ -0,0 +1,249 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastLog.h"
+#include "RecastTimer.h"
+
+
+void rcFilterLedgeSpans(const int walkableHeight,
+ const int walkableClimb,
+ rcHeightfield& solid)
+{
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ const int w = solid.width;
+ const int h = solid.height;
+ const int MAX_HEIGHT = 0xffff;
+
+ // Mark border spans.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ for (rcSpan* s = solid.spans[x + y*w]; s; s = s->next)
+ {
+ // Skip non walkable spans.
+ if ((s->flags & RC_WALKABLE) == 0)
+ continue;
+
+ const int bot = (int)s->smax;
+ const int top = s->next ? (int)s->next->smin : MAX_HEIGHT;
+
+ // Find neighbours minimum height.
+ int minh = MAX_HEIGHT;
+
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ int dx = x + rcGetDirOffsetX(dir);
+ int dy = y + rcGetDirOffsetY(dir);
+ // Skip neighbours which are out of bounds.
+ if (dx < 0 || dy < 0 || dx >= w || dy >= h)
+ {
+ minh = rcMin(minh, -walkableClimb - bot);
+ continue;
+ }
+
+ // From minus infinity to the first span.
+ rcSpan* ns = solid.spans[dx + dy*w];
+ int nbot = -walkableClimb;
+ int ntop = ns ? (int)ns->smin : MAX_HEIGHT;
+ // Skip neightbour if the gap between the spans is too small.
+ if (rcMin(top,ntop) - rcMax(bot,nbot) > walkableHeight)
+ minh = rcMin(minh, nbot - bot);
+
+ // Rest of the spans.
+ for (ns = solid.spans[dx + dy*w]; ns; ns = ns->next)
+ {
+ nbot = (int)ns->smax;
+ ntop = ns->next ? (int)ns->next->smin : MAX_HEIGHT;
+ // Skip neightbour if the gap between the spans is too small.
+ if (rcMin(top,ntop) - rcMax(bot,nbot) > walkableHeight)
+ minh = rcMin(minh, nbot - bot);
+ }
+ }
+
+ // The current span is close to a ledge if the drop to any
+ // neighbour span is less than the walkableClimb.
+ if (minh < -walkableClimb)
+ s->flags &= ~RC_WALKABLE;
+
+ }
+ }
+ }
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+// if (rcGetLog())
+// rcGetLog()->log(RC_LOG_PROGRESS, "Filter border: %.3f ms", rcGetDeltaTimeUsec(startTime, endTime)/1000.0f);
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->filterBorder += rcGetDeltaTimeUsec(startTime, endTime);
+}
+
+void rcFilterWalkableLowHeightSpans(int walkableHeight,
+ rcHeightfield& solid)
+{
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ const int w = solid.width;
+ const int h = solid.height;
+ const int MAX_HEIGHT = 0xffff;
+
+ // Remove walkable flag from spans which do not have enough
+ // space above them for the agent to stand there.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ for (rcSpan* s = solid.spans[x + y*w]; s; s = s->next)
+ {
+ const int bot = (int)s->smax;
+ const int top = s->next ? (int)s->next->smin : MAX_HEIGHT;
+ if ((top - bot) <= walkableHeight)
+ s->flags &= ~RC_WALKABLE;
+ }
+ }
+ }
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+// if (rcGetLog())
+// rcGetLog()->log(RC_LOG_PROGRESS, "Filter walkable: %.3f ms", rcGetDeltaTimeUsec(startTime, endTime)/1000.0f);
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->filterWalkable += rcGetDeltaTimeUsec(startTime, endTime);
+}
+
+
+struct rcReachableSeed
+{
+ inline void set(int ix, int iy, rcSpan* is)
+ {
+ x = (unsigned short)ix;
+ y = (unsigned short)iy;
+ s = is;
+ }
+ unsigned short x, y;
+ rcSpan* s;
+};
+
+bool rcMarkReachableSpans(const int walkableHeight,
+ const int walkableClimb,
+ rcHeightfield& solid)
+{
+ const int w = solid.width;
+ const int h = solid.height;
+ const int MAX_HEIGHT = 0xffff;
+
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ // Build navigable space.
+ const int MAX_SEEDS = w*h;
+ rcReachableSeed* stack = new rcReachableSeed[MAX_SEEDS];
+ if (!stack)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcMarkReachableSpans: Out of memory 'stack' (%d).", MAX_SEEDS);
+ return false;
+ }
+ int stackSize = 0;
+
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ rcSpan* topSpan = solid.spans[x + y*w];
+ if (!topSpan)
+ continue;
+ while (topSpan->next)
+ topSpan = topSpan->next;
+
+ // If the span is not walkable, skip it.
+ if ((topSpan->flags & RC_WALKABLE) == 0)
+ continue;
+ // If the span has been visited already, skip it.
+ if (topSpan->flags & RC_REACHABLE)
+ continue;
+
+ // Start flood fill.
+ topSpan->flags |= RC_REACHABLE;
+ stackSize = 0;
+ stack[stackSize].set(x, y, topSpan);
+ stackSize++;
+
+ while (stackSize)
+ {
+ // Pop a seed from the stack.
+ stackSize--;
+ rcReachableSeed cur = stack[stackSize];
+
+ const int bot = (int)cur.s->smax;
+ const int top = cur.s->next ? (int)cur.s->next->smin : MAX_HEIGHT;
+
+ // Visit neighbours in all 4 directions.
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ int dx = (int)cur.x + rcGetDirOffsetX(dir);
+ int dy = (int)cur.y + rcGetDirOffsetY(dir);
+ // Skip neighbour which are out of bounds.
+ if (dx < 0 || dy < 0 || dx >= w || dy >= h)
+ continue;
+ for (rcSpan* ns = solid.spans[dx + dy*w]; ns; ns = ns->next)
+ {
+ // Skip neighbour if it is not walkable.
+ if ((ns->flags & RC_WALKABLE) == 0)
+ continue;
+ // Skip the neighbour if it has been visited already.
+ if (ns->flags & RC_REACHABLE)
+ continue;
+
+ const int nbot = (int)ns->smax;
+ const int ntop = ns->next ? (int)ns->next->smin : MAX_HEIGHT;
+ // Skip neightbour if the gap between the spans is too small.
+ if (rcMin(top,ntop) - rcMax(bot,nbot) < walkableHeight)
+ continue;
+ // Skip neightbour if the climb height to the neighbour is too high.
+ if (rcAbs(nbot - bot) >= walkableClimb)
+ continue;
+
+ // This neighbour has not been visited yet.
+ // Mark it as reachable and add it to the seed stack.
+ ns->flags |= RC_REACHABLE;
+ if (stackSize < MAX_SEEDS)
+ {
+ stack[stackSize].set(dx, dy, ns);
+ stackSize++;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ delete [] stack;
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+// if (rcGetLog())
+// rcGetLog()->log(RC_LOG_PROGRESS, "Mark reachable: %.3f ms", rcGetDeltaTimeUsec(startTime, endTime)/1000.0f);
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->filterMarkReachable += rcGetDeltaTimeUsec(startTime, endTime);
+
+ return true;
+}
diff --git a/extern/recastnavigation/Recast/Source/RecastLog.cpp b/extern/recastnavigation/Recast/Source/RecastLog.cpp
new file mode 100644
index 00000000000..27868042a1c
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/RecastLog.cpp
@@ -0,0 +1,77 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include "RecastLog.h"
+#include <stdio.h>
+#include <stdarg.h>
+
+static rcLog* g_log = 0;
+static rcBuildTimes* g_btimes = 0;
+
+rcLog::rcLog() :
+ m_messageCount(0),
+ m_textPoolSize(0)
+{
+}
+
+rcLog::~rcLog()
+{
+ if (g_log == this)
+ g_log = 0;
+}
+
+void rcLog::log(rcLogCategory category, const char* format, ...)
+{
+ if (m_messageCount >= MAX_MESSAGES)
+ return;
+ char* dst = &m_textPool[m_textPoolSize];
+ int n = TEXT_POOL_SIZE - m_textPoolSize;
+ if (n < 2)
+ return;
+ // Store category
+ *dst = (char)category;
+ n--;
+ // Store message
+ va_list ap;
+ va_start(ap, format);
+ int ret = vsnprintf(dst+1, n-1, format, ap);
+ va_end(ap);
+ if (ret > 0)
+ m_textPoolSize += ret+2;
+ m_messages[m_messageCount++] = dst;
+}
+
+void rcSetLog(rcLog* log)
+{
+ g_log = log;
+}
+
+rcLog* rcGetLog()
+{
+ return g_log;
+}
+
+void rcSetBuildTimes(rcBuildTimes* btimes)
+{
+ g_btimes = btimes;
+}
+
+rcBuildTimes* rcGetBuildTimes()
+{
+ return g_btimes;
+}
diff --git a/extern/recastnavigation/Recast/Source/RecastMesh.cpp b/extern/recastnavigation/Recast/Source/RecastMesh.cpp
new file mode 100644
index 00000000000..38d62904213
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/RecastMesh.cpp
@@ -0,0 +1,1218 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastLog.h"
+#include "RecastTimer.h"
+
+
+struct rcEdge
+{
+ unsigned short vert[2];
+ unsigned short polyEdge[2];
+ unsigned short poly[2];
+};
+
+/*static */bool buildMeshAdjacency(unsigned short* polys, const int npolys,
+ const int nverts, const int vertsPerPoly)
+{
+ // Based on code by Eric Lengyel from:
+ // http://www.terathon.com/code/edges.php
+
+ int maxEdgeCount = npolys*vertsPerPoly;
+ unsigned short* firstEdge = new unsigned short[nverts + maxEdgeCount];
+ if (!firstEdge)
+ return false;
+ unsigned short* nextEdge = firstEdge + nverts;
+ int edgeCount = 0;
+
+ rcEdge* edges = new rcEdge[maxEdgeCount];
+ if (!edges)
+ return false;
+
+ for (int i = 0; i < nverts; i++)
+ firstEdge[i] = 0xffff;
+
+ // Invalida indices are marked as 0xffff, the following code
+ // handles them just fine.
+
+ for (int i = 0; i < npolys; ++i)
+ {
+ unsigned short* t = &polys[i*vertsPerPoly*2];
+ for (int j = 0; j < vertsPerPoly; ++j)
+ {
+ unsigned short v0 = t[j];
+ unsigned short v1 = (j+1 >= vertsPerPoly || t[j+1] == 0xffff) ? t[0] : t[j+1];
+ if (v0 < v1)
+ {
+ rcEdge& edge = edges[edgeCount];
+ edge.vert[0] = v0;
+ edge.vert[1] = v1;
+ edge.poly[0] = (unsigned short)i;
+ edge.polyEdge[0] = (unsigned short)j;
+ edge.poly[1] = (unsigned short)i;
+ edge.polyEdge[1] = 0;
+ // Insert edge
+ nextEdge[edgeCount] = firstEdge[v0];
+ firstEdge[v0] = edgeCount;
+ edgeCount++;
+ }
+ }
+ }
+
+ for (int i = 0; i < npolys; ++i)
+ {
+ unsigned short* t = &polys[i*vertsPerPoly*2];
+ for (int j = 0; j < vertsPerPoly; ++j)
+ {
+ unsigned short v0 = t[j];
+ unsigned short v1 = (j+1 >= vertsPerPoly || t[j+1] == 0xffff) ? t[0] : t[j+1];
+ if (v0 > v1)
+ {
+ for (unsigned short e = firstEdge[v1]; e != 0xffff; e = nextEdge[e])
+ {
+ rcEdge& edge = edges[e];
+ if (edge.vert[1] == v0 && edge.poly[0] == edge.poly[1])
+ {
+ edge.poly[1] = (unsigned short)i;
+ edge.polyEdge[1] = (unsigned short)j;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ // Store adjacency
+ for (int i = 0; i < edgeCount; ++i)
+ {
+ const rcEdge& e = edges[i];
+ if (e.poly[0] != e.poly[1])
+ {
+ unsigned short* p0 = &polys[e.poly[0]*vertsPerPoly*2];
+ unsigned short* p1 = &polys[e.poly[1]*vertsPerPoly*2];
+ p0[vertsPerPoly + e.polyEdge[0]] = e.poly[1];
+ p1[vertsPerPoly + e.polyEdge[1]] = e.poly[0];
+ }
+ }
+
+ delete [] firstEdge;
+ delete [] edges;
+
+ return true;
+}
+
+
+static const int VERTEX_BUCKET_COUNT = (1<<12);
+
+inline int computeVertexHash(int x, int y, int z)
+{
+ const unsigned int h1 = 0x8da6b343; // Large multiplicative constants;
+ const unsigned int h2 = 0xd8163841; // here arbitrarily chosen primes
+ const unsigned int h3 = 0xcb1ab31f;
+ unsigned int n = h1 * x + h2 * y + h3 * z;
+ return (int)(n & (VERTEX_BUCKET_COUNT-1));
+}
+
+static int addVertex(unsigned short x, unsigned short y, unsigned short z,
+ unsigned short* verts, int* firstVert, int* nextVert, int& nv)
+{
+ int bucket = computeVertexHash(x, 0, z);
+ int i = firstVert[bucket];
+
+ while (i != -1)
+ {
+ const unsigned short* v = &verts[i*3];
+ if (v[0] == x && (rcAbs(v[1] - y) <= 2) && v[2] == z)
+ return i;
+ i = nextVert[i]; // next
+ }
+
+ // Could not find, create new.
+ i = nv; nv++;
+ unsigned short* v = &verts[i*3];
+ v[0] = x;
+ v[1] = y;
+ v[2] = z;
+ nextVert[i] = firstVert[bucket];
+ firstVert[bucket] = i;
+
+ return i;
+}
+
+inline int prev(int i, int n) { return i-1 >= 0 ? i-1 : n-1; }
+inline int next(int i, int n) { return i+1 < n ? i+1 : 0; }
+
+inline int area2(const int* a, const int* b, const int* c)
+{
+ return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]);
+}
+
+// Exclusive or: true iff exactly one argument is true.
+// The arguments are negated to ensure that they are 0/1
+// values. Then the bitwise Xor operator may apply.
+// (This idea is due to Michael Baldwin.)
+inline bool xorb(bool x, bool y)
+{
+ return !x ^ !y;
+}
+
+// Returns true iff c is strictly to the left of the directed
+// line through a to b.
+inline bool left(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) < 0;
+}
+
+inline bool leftOn(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) <= 0;
+}
+
+inline bool collinear(const int* a, const int* b, const int* c)
+{
+ return area2(a, b, c) == 0;
+}
+
+// Returns true iff ab properly intersects cd: they share
+// a point interior to both segments. The properness of the
+// intersection is ensured by using strict leftness.
+bool intersectProp(const int* a, const int* b, const int* c, const int* d)
+{
+ // Eliminate improper cases.
+ if (collinear(a,b,c) || collinear(a,b,d) ||
+ collinear(c,d,a) || collinear(c,d,b))
+ return false;
+
+ return xorb(left(a,b,c), left(a,b,d)) && xorb(left(c,d,a), left(c,d,b));
+}
+
+// Returns T iff (a,b,c) are collinear and point c lies
+// on the closed segement ab.
+static bool between(const int* a, const int* b, const int* c)
+{
+ if (!collinear(a, b, c))
+ return false;
+ // If ab not vertical, check betweenness on x; else on y.
+ if (a[0] != b[0])
+ return ((a[0] <= c[0]) && (c[0] <= b[0])) || ((a[0] >= c[0]) && (c[0] >= b[0]));
+ else
+ return ((a[2] <= c[2]) && (c[2] <= b[2])) || ((a[2] >= c[2]) && (c[2] >= b[2]));
+}
+
+// Returns true iff segments ab and cd intersect, properly or improperly.
+static bool intersect(const int* a, const int* b, const int* c, const int* d)
+{
+ if (intersectProp(a, b, c, d))
+ return true;
+ else if (between(a, b, c) || between(a, b, d) ||
+ between(c, d, a) || between(c, d, b))
+ return true;
+ else
+ return false;
+}
+
+static bool vequal(const int* a, const int* b)
+{
+ return a[0] == b[0] && a[2] == b[2];
+}
+
+// Returns T iff (v_i, v_j) is a proper internal *or* external
+// diagonal of P, *ignoring edges incident to v_i and v_j*.
+static bool diagonalie(int i, int j, int n, const int* verts, int* indices)
+{
+ const int* d0 = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* d1 = &verts[(indices[j] & 0x0fffffff) * 4];
+
+ // For each edge (k,k+1) of P
+ for (int k = 0; k < n; k++)
+ {
+ int k1 = next(k, n);
+ // Skip edges incident to i or j
+ if (!((k == i) || (k1 == i) || (k == j) || (k1 == j)))
+ {
+ const int* p0 = &verts[(indices[k] & 0x0fffffff) * 4];
+ const int* p1 = &verts[(indices[k1] & 0x0fffffff) * 4];
+
+ if (vequal(d0, p0) || vequal(d1, p0) || vequal(d0, p1) || vequal(d1, p1))
+ continue;
+
+ if (intersect(d0, d1, p0, p1))
+ return false;
+ }
+ }
+ return true;
+}
+
+// Returns true iff the diagonal (i,j) is strictly internal to the
+// polygon P in the neighborhood of the i endpoint.
+static bool inCone(int i, int j, int n, const int* verts, int* indices)
+{
+ const int* pi = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* pj = &verts[(indices[j] & 0x0fffffff) * 4];
+ const int* pi1 = &verts[(indices[next(i, n)] & 0x0fffffff) * 4];
+ const int* pin1 = &verts[(indices[prev(i, n)] & 0x0fffffff) * 4];
+
+ // If P[i] is a convex vertex [ i+1 left or on (i-1,i) ].
+ if (leftOn(pin1, pi, pi1))
+ return left(pi, pj, pin1) && left(pj, pi, pi1);
+ // Assume (i-1,i,i+1) not collinear.
+ // else P[i] is reflex.
+ return !(leftOn(pi, pj, pi1) && leftOn(pj, pi, pin1));
+}
+
+// Returns T iff (v_i, v_j) is a proper internal
+// diagonal of P.
+static bool diagonal(int i, int j, int n, const int* verts, int* indices)
+{
+ return inCone(i, j, n, verts, indices) && diagonalie(i, j, n, verts, indices);
+}
+
+int triangulate(int n, const int* verts, int* indices, int* tris)
+{
+ int ntris = 0;
+ int* dst = tris;
+
+ // The last bit of the index is used to indicate if the vertex can be removed.
+ for (int i = 0; i < n; i++)
+ {
+ int i1 = next(i, n);
+ int i2 = next(i1, n);
+ if (diagonal(i, i2, n, verts, indices))
+ indices[i1] |= 0x80000000;
+ }
+
+ while (n > 3)
+ {
+ int minLen = -1;
+ int mini = -1;
+ for (int i = 0; i < n; i++)
+ {
+ int i1 = next(i, n);
+ if (indices[i1] & 0x80000000)
+ {
+ const int* p0 = &verts[(indices[i] & 0x0fffffff) * 4];
+ const int* p2 = &verts[(indices[next(i1, n)] & 0x0fffffff) * 4];
+
+ int dx = p2[0] - p0[0];
+ int dy = p2[2] - p0[2];
+ int len = dx*dx + dy*dy;
+
+ if (minLen < 0 || len < minLen)
+ {
+ minLen = len;
+ mini = i;
+ }
+ }
+ }
+
+ if (mini == -1)
+ {
+ // Should not happen.
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "triangulate: Failed to triangulate polygon.");
+/* printf("mini == -1 ntris=%d n=%d\n", ntris, n);
+ for (int i = 0; i < n; i++)
+ {
+ printf("%d ", indices[i] & 0x0fffffff);
+ }
+ printf("\n");*/
+ return -ntris;
+ }
+
+ int i = mini;
+ int i1 = next(i, n);
+ int i2 = next(i1, n);
+
+ *dst++ = indices[i] & 0x0fffffff;
+ *dst++ = indices[i1] & 0x0fffffff;
+ *dst++ = indices[i2] & 0x0fffffff;
+ ntris++;
+
+ // Removes P[i1] by copying P[i+1]...P[n-1] left one index.
+ n--;
+ for (int k = i1; k < n; k++)
+ indices[k] = indices[k+1];
+
+ if (i1 >= n) i1 = 0;
+ i = prev(i1,n);
+ // Update diagonal flags.
+ if (diagonal(prev(i, n), i1, n, verts, indices))
+ indices[i] |= 0x80000000;
+ else
+ indices[i] &= 0x0fffffff;
+
+ if (diagonal(i, next(i1, n), n, verts, indices))
+ indices[i1] |= 0x80000000;
+ else
+ indices[i1] &= 0x0fffffff;
+ }
+
+ // Append the remaining triangle.
+ *dst++ = indices[0] & 0x0fffffff;
+ *dst++ = indices[1] & 0x0fffffff;
+ *dst++ = indices[2] & 0x0fffffff;
+ ntris++;
+
+ return ntris;
+}
+
+static int countPolyVerts(const unsigned short* p, const int nvp)
+{
+ for (int i = 0; i < nvp; ++i)
+ if (p[i] == 0xffff)
+ return i;
+ return nvp;
+}
+
+inline bool uleft(const unsigned short* a, const unsigned short* b, const unsigned short* c)
+{
+ return ((int)b[0] - (int)a[0]) * ((int)c[2] - (int)a[2]) -
+ ((int)c[0] - (int)a[0]) * ((int)b[2] - (int)a[2]) < 0;
+}
+
+static int getPolyMergeValue(unsigned short* pa, unsigned short* pb,
+ const unsigned short* verts, int& ea, int& eb,
+ const int nvp)
+{
+ const int na = countPolyVerts(pa, nvp);
+ const int nb = countPolyVerts(pb, nvp);
+
+ // If the merged polygon would be too big, do not merge.
+ if (na+nb-2 > nvp)
+ return -1;
+
+ // Check if the polygons share an edge.
+ ea = -1;
+ eb = -1;
+
+ for (int i = 0; i < na; ++i)
+ {
+ unsigned short va0 = pa[i];
+ unsigned short va1 = pa[(i+1) % na];
+ if (va0 > va1)
+ rcSwap(va0, va1);
+ for (int j = 0; j < nb; ++j)
+ {
+ unsigned short vb0 = pb[j];
+ unsigned short vb1 = pb[(j+1) % nb];
+ if (vb0 > vb1)
+ rcSwap(vb0, vb1);
+ if (va0 == vb0 && va1 == vb1)
+ {
+ ea = i;
+ eb = j;
+ break;
+ }
+ }
+ }
+
+ // No common edge, cannot merge.
+ if (ea == -1 || eb == -1)
+ return -1;
+
+ // Check to see if the merged polygon would be convex.
+ unsigned short va, vb, vc;
+
+ va = pa[(ea+na-1) % na];
+ vb = pa[ea];
+ vc = pb[(eb+2) % nb];
+ if (!uleft(&verts[va*3], &verts[vb*3], &verts[vc*3]))
+ return -1;
+
+ va = pb[(eb+nb-1) % nb];
+ vb = pb[eb];
+ vc = pa[(ea+2) % na];
+ if (!uleft(&verts[va*3], &verts[vb*3], &verts[vc*3]))
+ return -1;
+
+ va = pa[ea];
+ vb = pa[(ea+1)%na];
+
+ int dx = (int)verts[va*3+0] - (int)verts[vb*3+0];
+ int dy = (int)verts[va*3+2] - (int)verts[vb*3+2];
+
+ return dx*dx + dy*dy;
+}
+
+static void mergePolys(unsigned short* pa, unsigned short* pb,
+ const unsigned short* verts, int ea, int eb,
+ unsigned short* tmp, const int nvp)
+{
+ const int na = countPolyVerts(pa, nvp);
+ const int nb = countPolyVerts(pb, nvp);
+
+ // Merge polygons.
+ memset(tmp, 0xff, sizeof(unsigned short)*nvp);
+ int n = 0;
+ // Add pa
+ for (int i = 0; i < na-1; ++i)
+ tmp[n++] = pa[(ea+1+i) % na];
+ // Add pb
+ for (int i = 0; i < nb-1; ++i)
+ tmp[n++] = pb[(eb+1+i) % nb];
+
+ memcpy(pa, tmp, sizeof(unsigned short)*nvp);
+}
+
+static void pushFront(int v, int* arr, int& an)
+{
+ an++;
+ for (int i = an-1; i > 0; --i) arr[i] = arr[i-1];
+ arr[0] = v;
+}
+
+static void pushBack(int v, int* arr, int& an)
+{
+ arr[an] = v;
+ an++;
+}
+
+static bool removeVertex(rcPolyMesh& mesh, const unsigned short rem, const int maxTris)
+{
+ unsigned short* tmpPoly;
+ int ntris;
+
+ static const int nvp = mesh.nvp;
+
+ int* edges = 0;
+ int nedges = 0;
+ int* hole = 0;
+ int nhole = 0;
+ int* hreg = 0;
+ int nhreg = 0;
+ int* tris = 0;
+ int* tverts = 0;
+ int* thole = 0;
+ unsigned short* polys = 0;
+ unsigned short* pregs = 0;
+ int npolys = 0;
+
+ // Count number of polygons to remove.
+ int nrem = 0;
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*nvp*2];
+ for (int j = 0; j < nvp; ++j)
+ if (p[j] == rem) { nrem++; break; }
+ }
+
+ edges = new int[nrem*nvp*3];
+ if (!edges)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "removeVertex: Out of memory 'edges' (%d).", nrem*nvp*3);
+ goto failure;
+ }
+
+ hole = new int[nrem*nvp];
+ if (!hole)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "removeVertex: Out of memory 'hole' (%d).", nrem*nvp);
+ goto failure;
+ }
+ hreg = new int[nrem*nvp];
+ if (!hreg)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "removeVertex: Out of memory 'hreg' (%d).", nrem*nvp);
+ goto failure;
+ }
+
+
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*nvp*2];
+ const int nv = countPolyVerts(p, nvp);
+ bool hasRem = false;
+ for (int j = 0; j < nv; ++j)
+ if (p[j] == rem) hasRem = true;
+ if (hasRem)
+ {
+ // Collect edges which does not touch the removed vertex.
+ for (int j = 0, k = nv-1; j < nv; k = j++)
+ {
+ if (p[j] != rem && p[k] != rem)
+ {
+ int* e = &edges[nedges*3];
+ e[0] = p[k];
+ e[1] = p[j];
+ e[2] = mesh.regs[i];
+ nedges++;
+ }
+ }
+ // Remove the polygon.
+ unsigned short* p2 = &mesh.polys[(mesh.npolys-1)*nvp*2];
+ memcpy(p,p2,sizeof(unsigned short)*nvp);
+ mesh.regs[i] = mesh.regs[mesh.npolys-1];
+ mesh.npolys--;
+ --i;
+ }
+ }
+
+ // Remove vertex.
+ for (int i = (int)rem; i < mesh.nverts; ++i)
+ {
+ mesh.verts[i*3+0] = mesh.verts[(i+1)*3+0];
+ mesh.verts[i*3+1] = mesh.verts[(i+1)*3+1];
+ mesh.verts[i*3+2] = mesh.verts[(i+1)*3+2];
+ }
+ mesh.nverts--;
+
+ // Adjust indices to match the removed vertex layout.
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ unsigned short* p = &mesh.polys[i*nvp*2];
+ const int nv = countPolyVerts(p, nvp);
+ for (int j = 0; j < nv; ++j)
+ if (p[j] > rem) p[j]--;
+ }
+ for (int i = 0; i < nedges; ++i)
+ {
+ if (edges[i*3+0] > rem) edges[i*3+0]--;
+ if (edges[i*3+1] > rem) edges[i*3+1]--;
+ }
+
+ if (nedges == 0)
+ return true;
+
+ hole[nhole] = edges[0];
+ hreg[nhole] = edges[2];
+ nhole++;
+
+ while (nedges)
+ {
+ bool match = false;
+
+ for (int i = 0; i < nedges; ++i)
+ {
+ const int ea = edges[i*3+0];
+ const int eb = edges[i*3+1];
+ const int r = edges[i*3+2];
+ bool add = false;
+ if (hole[0] == eb)
+ {
+ pushFront(ea, hole, nhole);
+ pushFront(r, hreg, nhreg);
+ add = true;
+ }
+ else if (hole[nhole-1] == ea)
+ {
+ pushBack(eb, hole, nhole);
+ pushBack(r, hreg, nhreg);
+ add = true;
+ }
+ if (add)
+ {
+ // Remove edge.
+ edges[i*3+0] = edges[(nedges-1)*3+0];
+ edges[i*3+1] = edges[(nedges-1)*3+1];
+ edges[i*3+2] = edges[(nedges-1)*3+2];
+ --nedges;
+ match = true;
+ --i;
+ }
+ }
+
+ if (!match)
+ break;
+ }
+
+ tris = new int[nhole*3];
+ if (!tris)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "removeVertex: Out of memory 'tris' (%d).", nhole*3);
+ goto failure;
+ }
+
+ tverts = new int[nhole*4];
+ if (!tverts)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "removeVertex: Out of memory 'tverts' (%d).", nhole*4);
+ goto failure;
+ }
+
+ thole = new int[nhole];
+ if (!tverts)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "removeVertex: Out of memory 'thole' (%d).", nhole);
+ goto failure;
+ }
+
+ // Generate temp vertex array for triangulation.
+ for (int i = 0; i < nhole; ++i)
+ {
+ const int pi = hole[i];
+ tverts[i*4+0] = mesh.verts[pi*3+0];
+ tverts[i*4+1] = mesh.verts[pi*3+1];
+ tverts[i*4+2] = mesh.verts[pi*3+2];
+ tverts[i*4+3] = 0;
+ thole[i] = i;
+ }
+
+ // Triangulate the hole.
+ ntris = triangulate(nhole, &tverts[0], &thole[0], tris);
+
+ // Merge the hole triangles back to polygons.
+ polys = new unsigned short[(ntris+1)*nvp];
+ if (!polys)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "removeVertex: Out of memory 'polys' (%d).", (ntris+1)*nvp);
+ goto failure;
+ }
+ pregs = new unsigned short[ntris];
+ if (!pregs)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_WARNING, "removeVertex: Out of memory 'pregs' (%d).", ntris);
+ goto failure;
+ }
+
+ tmpPoly = &polys[ntris*nvp];
+
+ // Build initial polygons.
+ memset(polys, 0xff, ntris*nvp*sizeof(unsigned short));
+ for (int j = 0; j < ntris; ++j)
+ {
+ int* t = &tris[j*3];
+ if (t[0] != t[1] && t[0] != t[2] && t[1] != t[2])
+ {
+ polys[npolys*nvp+0] = (unsigned short)hole[t[0]];
+ polys[npolys*nvp+1] = (unsigned short)hole[t[1]];
+ polys[npolys*nvp+2] = (unsigned short)hole[t[2]];
+ pregs[npolys] = hreg[t[0]];
+ npolys++;
+ }
+ }
+ if (!npolys)
+ return true;
+
+ // Merge polygons.
+ if (nvp > 3)
+ {
+ while (true)
+ {
+ // Find best polygons to merge.
+ int bestMergeVal = 0;
+ int bestPa, bestPb, bestEa, bestEb;
+
+ for (int j = 0; j < npolys-1; ++j)
+ {
+ unsigned short* pj = &polys[j*nvp];
+ for (int k = j+1; k < npolys; ++k)
+ {
+ unsigned short* pk = &polys[k*nvp];
+ int ea, eb;
+ int v = getPolyMergeValue(pj, pk, mesh.verts, ea, eb, nvp);
+ if (v > bestMergeVal)
+ {
+ bestMergeVal = v;
+ bestPa = j;
+ bestPb = k;
+ bestEa = ea;
+ bestEb = eb;
+ }
+ }
+ }
+
+ if (bestMergeVal > 0)
+ {
+ // Found best, merge.
+ unsigned short* pa = &polys[bestPa*nvp];
+ unsigned short* pb = &polys[bestPb*nvp];
+ mergePolys(pa, pb, mesh.verts, bestEa, bestEb, tmpPoly, nvp);
+ memcpy(pb, &polys[(npolys-1)*nvp], sizeof(unsigned short)*nvp);
+ pregs[bestPb] = pregs[npolys-1];
+ npolys--;
+ }
+ else
+ {
+ // Could not merge any polygons, stop.
+ break;
+ }
+ }
+ }
+
+ // Store polygons.
+ for (int i = 0; i < npolys; ++i)
+ {
+ if (mesh.npolys >= maxTris) break;
+ unsigned short* p = &mesh.polys[mesh.npolys*nvp*2];
+ memset(p,0xff,sizeof(unsigned short)*nvp*2);
+ for (int j = 0; j < nvp; ++j)
+ p[j] = polys[i*nvp+j];
+ mesh.regs[mesh.npolys] = pregs[i];
+ mesh.npolys++;
+ }
+
+ delete [] edges;
+ delete [] hole;
+ delete [] hreg;
+ delete [] tris;
+ delete [] thole;
+ delete [] tverts;
+ delete [] polys;
+ delete [] pregs;
+
+ return true;
+
+failure:
+ delete [] edges;
+ delete [] hole;
+ delete [] hreg;
+ delete [] tris;
+ delete [] thole;
+ delete [] tverts;
+ delete [] polys;
+ delete [] pregs;
+
+ return false;
+}
+
+
+bool rcBuildPolyMesh(rcContourSet& cset, int nvp, rcPolyMesh& mesh)
+{
+ unsigned short* tmpPoly;
+ rcTimeVal startTime = rcGetPerformanceTimer();
+ rcTimeVal endTime;
+
+ vcopy(mesh.bmin, cset.bmin);
+ vcopy(mesh.bmax, cset.bmax);
+ mesh.cs = cset.cs;
+ mesh.ch = cset.ch;
+
+ int maxVertices = 0;
+ int maxTris = 0;
+ int maxVertsPerCont = 0;
+ for (int i = 0; i < cset.nconts; ++i)
+ {
+ maxVertices += cset.conts[i].nverts;
+ maxTris += cset.conts[i].nverts - 2;
+ maxVertsPerCont = rcMax(maxVertsPerCont, cset.conts[i].nverts);
+ }
+
+ if (maxVertices >= 0xfffe)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Too many vertices %d.", maxVertices);
+ return false;
+ }
+
+ unsigned char* vflags = 0;
+ int* nextVert = 0;
+ int* firstVert = 0;
+ int* indices = 0;
+ int* tris = 0;
+ unsigned short* polys = 0;
+
+ vflags = new unsigned char[maxVertices];
+ if (!vflags)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.verts' (%d).", maxVertices);
+ goto failure;
+ }
+ memset(vflags, 0, maxVertices);
+
+ mesh.verts = new unsigned short[maxVertices*3];
+ if (!mesh.verts)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.verts' (%d).", maxVertices);
+ goto failure;
+ }
+ mesh.polys = new unsigned short[maxTris*nvp*2];
+ if (!mesh.polys)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.polys' (%d).", maxTris*nvp*2);
+ goto failure;
+ }
+ mesh.regs = new unsigned short[maxTris];
+ if (!mesh.regs)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'mesh.regs' (%d).", maxTris);
+ goto failure;
+ }
+ mesh.nverts = 0;
+ mesh.npolys = 0;
+ mesh.nvp = nvp;
+
+ memset(mesh.verts, 0, sizeof(unsigned short)*maxVertices*3);
+ memset(mesh.polys, 0xff, sizeof(unsigned short)*maxTris*nvp*2);
+ memset(mesh.regs, 0, sizeof(unsigned short)*maxTris);
+
+ nextVert = new int[maxVertices];
+ if (!nextVert)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'nextVert' (%d).", maxVertices);
+ goto failure;
+ }
+ memset(nextVert, 0, sizeof(int)*maxVertices);
+
+ firstVert = new int[VERTEX_BUCKET_COUNT];
+ if (!firstVert)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'firstVert' (%d).", VERTEX_BUCKET_COUNT);
+ goto failure;
+ }
+ for (int i = 0; i < VERTEX_BUCKET_COUNT; ++i)
+ firstVert[i] = -1;
+
+ indices = new int[maxVertsPerCont];
+ if (!indices)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'indices' (%d).", maxVertsPerCont);
+ goto failure;
+ }
+ tris = new int[maxVertsPerCont*3];
+ if (!tris)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'tris' (%d).", maxVertsPerCont*3);
+ goto failure;
+ }
+ polys = new unsigned short[(maxVertsPerCont+1)*nvp];
+ if (!polys)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Out of memory 'polys' (%d).", maxVertsPerCont*nvp);
+ goto failure;
+ }
+ tmpPoly = &polys[maxVertsPerCont*nvp];
+
+ for (int i = 0; i < cset.nconts; ++i)
+ {
+ rcContour& cont = cset.conts[i];
+
+ // Skip empty contours.
+ if (cont.nverts < 3)
+ continue;
+
+ // Triangulate contour
+ for (int j = 0; j < cont.nverts; ++j)
+ indices[j] = j;
+
+ int ntris = triangulate(cont.nverts, cont.verts, &indices[0], &tris[0]);
+ if (ntris <= 0)
+ {
+ // Bad triangulation, should not happen.
+/* for (int k = 0; k < cont.nverts; ++k)
+ {
+ const int* v = &cont.verts[k*4];
+ printf("\t\t%d,%d,%d,%d,\n", v[0], v[1], v[2], v[3]);
+ if (nBadPos < 100)
+ {
+ badPos[nBadPos*3+0] = v[0];
+ badPos[nBadPos*3+1] = v[1];
+ badPos[nBadPos*3+2] = v[2];
+ nBadPos++;
+ }
+ }*/
+ ntris = -ntris;
+ }
+ // Add and merge vertices.
+ for (int j = 0; j < cont.nverts; ++j)
+ {
+ const int* v = &cont.verts[j*4];
+ indices[j] = addVertex((unsigned short)v[0], (unsigned short)v[1], (unsigned short)v[2],
+ mesh.verts, firstVert, nextVert, mesh.nverts);
+ if (v[3] & RC_BORDER_VERTEX)
+ {
+ // This vertex should be removed.
+ vflags[indices[j]] = 1;
+ }
+ }
+
+ // Build initial polygons.
+ int npolys = 0;
+ memset(polys, 0xff, maxVertsPerCont*nvp*sizeof(unsigned short));
+ for (int j = 0; j < ntris; ++j)
+ {
+ int* t = &tris[j*3];
+ if (t[0] != t[1] && t[0] != t[2] && t[1] != t[2])
+ {
+ polys[npolys*nvp+0] = (unsigned short)indices[t[0]];
+ polys[npolys*nvp+1] = (unsigned short)indices[t[1]];
+ polys[npolys*nvp+2] = (unsigned short)indices[t[2]];
+ npolys++;
+ }
+ }
+ if (!npolys)
+ continue;
+
+ // Merge polygons.
+ if (nvp > 3)
+ {
+ while (true)
+ {
+ // Find best polygons to merge.
+ int bestMergeVal = 0;
+ int bestPa, bestPb, bestEa, bestEb;
+
+ for (int j = 0; j < npolys-1; ++j)
+ {
+ unsigned short* pj = &polys[j*nvp];
+ for (int k = j+1; k < npolys; ++k)
+ {
+ unsigned short* pk = &polys[k*nvp];
+ int ea, eb;
+ int v = getPolyMergeValue(pj, pk, mesh.verts, ea, eb, nvp);
+ if (v > bestMergeVal)
+ {
+ bestMergeVal = v;
+ bestPa = j;
+ bestPb = k;
+ bestEa = ea;
+ bestEb = eb;
+ }
+ }
+ }
+
+ if (bestMergeVal > 0)
+ {
+ // Found best, merge.
+ unsigned short* pa = &polys[bestPa*nvp];
+ unsigned short* pb = &polys[bestPb*nvp];
+ mergePolys(pa, pb, mesh.verts, bestEa, bestEb, tmpPoly, nvp);
+ memcpy(pb, &polys[(npolys-1)*nvp], sizeof(unsigned short)*nvp);
+ npolys--;
+ }
+ else
+ {
+ // Could not merge any polygons, stop.
+ break;
+ }
+ }
+ }
+
+
+ // Store polygons.
+ for (int j = 0; j < npolys; ++j)
+ {
+ unsigned short* p = &mesh.polys[mesh.npolys*nvp*2];
+ unsigned short* q = &polys[j*nvp];
+ for (int k = 0; k < nvp; ++k)
+ p[k] = q[k];
+ mesh.regs[mesh.npolys] = cont.reg;
+ mesh.npolys++;
+ }
+ }
+
+
+ // Remove edge vertices.
+ for (int i = 0; i < mesh.nverts; ++i)
+ {
+ if (vflags[i])
+ {
+ if (!removeVertex(mesh, i, maxTris))
+ goto failure;
+ for (int j = i; j < mesh.nverts-1; ++j)
+ vflags[j] = vflags[j+1];
+ --i;
+ }
+ }
+
+ delete [] vflags;
+ delete [] firstVert;
+ delete [] nextVert;
+ delete [] indices;
+ delete [] tris;
+
+ // Calculate adjacency.
+ if (!buildMeshAdjacency(mesh.polys, mesh.npolys, mesh.nverts, nvp))
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMesh: Adjacency failed.");
+ return false;
+ }
+
+ endTime = rcGetPerformanceTimer();
+
+// if (rcGetLog())
+// rcGetLog()->log(RC_LOG_PROGRESS, "Build polymesh: %.3f ms", rcGetDeltaTimeUsec(startTime, endTime)/1000.0f);
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->buildPolymesh += rcGetDeltaTimeUsec(startTime, endTime);
+
+ return true;
+
+failure:
+ delete [] vflags;
+ delete [] tmpPoly;
+ delete [] firstVert;
+ delete [] nextVert;
+ delete [] indices;
+ delete [] tris;
+
+ return false;
+}
+
+bool rcMergePolyMeshes(rcPolyMesh** meshes, const int nmeshes, rcPolyMesh& mesh)
+{
+ if (!nmeshes || !meshes)
+ return true;
+
+ rcTimeVal startTime = rcGetPerformanceTimer();
+ rcTimeVal endTime;
+
+ int* nextVert = 0;
+ int* firstVert = 0;
+ unsigned short* vremap = 0;
+
+ mesh.nvp = meshes[0]->nvp;
+ mesh.cs = meshes[0]->cs;
+ mesh.ch = meshes[0]->ch;
+ vcopy(mesh.bmin, meshes[0]->bmin);
+ vcopy(mesh.bmax, meshes[0]->bmax);
+
+ int maxVerts = 0;
+ int maxPolys = 0;
+ int maxVertsPerMesh = 0;
+ for (int i = 0; i < nmeshes; ++i)
+ {
+ vmin(mesh.bmin, meshes[i]->bmin);
+ vmax(mesh.bmax, meshes[i]->bmax);
+ maxVertsPerMesh = rcMax(maxVertsPerMesh, meshes[i]->nverts);
+ maxVerts += meshes[i]->nverts;
+ maxPolys += meshes[i]->npolys;
+ }
+
+ mesh.nverts = 0;
+ mesh.verts = new unsigned short[maxVerts*3];
+ if (!mesh.verts)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.verts' (%d).", maxVerts*3);
+ return false;
+ }
+
+ mesh.npolys = 0;
+ mesh.polys = new unsigned short[maxPolys*2*mesh.nvp];
+ if (!mesh.polys)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.polys' (%d).", maxPolys*2*mesh.nvp);
+ return false;
+ }
+ memset(mesh.polys, 0xff, sizeof(unsigned short)*maxPolys*2*mesh.nvp);
+
+ mesh.regs = new unsigned short[maxPolys];
+ if (!mesh.regs)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'mesh.regs' (%d).", maxPolys);
+ return false;
+ }
+ memset(mesh.regs, 0, sizeof(unsigned short)*maxPolys);
+
+ nextVert = new int[maxVerts];
+ if (!nextVert)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'nextVert' (%d).", maxVerts);
+ goto failure;
+ }
+ memset(nextVert, 0, sizeof(int)*maxVerts);
+
+ firstVert = new int[VERTEX_BUCKET_COUNT];
+ if (!firstVert)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'firstVert' (%d).", VERTEX_BUCKET_COUNT);
+ goto failure;
+ }
+ for (int i = 0; i < VERTEX_BUCKET_COUNT; ++i)
+ firstVert[i] = -1;
+
+ vremap = new unsigned short[maxVertsPerMesh];
+ if (!vremap)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcMergePolyMeshes: Out of memory 'vremap' (%d).", maxVertsPerMesh);
+ goto failure;
+ }
+ memset(nextVert, 0, sizeof(int)*maxVerts);
+
+ for (int i = 0; i < nmeshes; ++i)
+ {
+ const rcPolyMesh* pmesh = meshes[i];
+
+ const unsigned short ox = (unsigned short)floorf((pmesh->bmin[0]-mesh.bmin[0])/mesh.cs+0.5f);
+ const unsigned short oz = (unsigned short)floorf((pmesh->bmin[2]-mesh.bmin[2])/mesh.cs+0.5f);
+
+ for (int j = 0; j < pmesh->nverts; ++j)
+ {
+ unsigned short* v = &pmesh->verts[j*3];
+ vremap[j] = addVertex(v[0]+ox, v[1], v[2]+oz,
+ mesh.verts, firstVert, nextVert, mesh.nverts);
+ }
+
+ for (int j = 0; j < pmesh->npolys; ++j)
+ {
+ unsigned short* tgt = &mesh.polys[mesh.npolys*2*mesh.nvp];
+ unsigned short* src = &pmesh->polys[j*2*mesh.nvp];
+ mesh.regs[mesh.npolys] = pmesh->regs[j];
+ mesh.npolys++;
+ for (int k = 0; k < mesh.nvp; ++k)
+ {
+ if (src[k] == 0xffff) break;
+ tgt[k] = vremap[src[k]];
+ }
+ }
+ }
+
+ // Calculate adjacency.
+ if (!buildMeshAdjacency(mesh.polys, mesh.npolys, mesh.nverts, mesh.nvp))
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcMergePolyMeshes: Adjacency failed.");
+ return false;
+ }
+
+
+ delete [] firstVert;
+ delete [] nextVert;
+ delete [] vremap;
+
+ endTime = rcGetPerformanceTimer();
+
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->mergePolyMesh += rcGetDeltaTimeUsec(startTime, endTime);
+
+ return true;
+
+failure:
+ delete [] firstVert;
+ delete [] nextVert;
+ delete [] vremap;
+
+ return false;
+}
diff --git a/extern/recastnavigation/Recast/Source/RecastMeshDetail.cpp b/extern/recastnavigation/Recast/Source/RecastMeshDetail.cpp
new file mode 100644
index 00000000000..55ba28ae7cf
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/RecastMeshDetail.cpp
@@ -0,0 +1,982 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <float.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastLog.h"
+#include "RecastTimer.h"
+
+
+struct rcHeightPatch
+{
+ inline rcHeightPatch() : data(0) {}
+ inline ~rcHeightPatch() { delete [] data; }
+ unsigned short* data;
+ int xmin, ymin, width, height;
+};
+
+
+static int circumCircle(const float xp, const float yp,
+ const float x1, const float y1,
+ const float x2, const float y2,
+ const float x3, const float y3,
+ float& xc, float& yc, float& rsqr)
+{
+ static const float EPSILON = 1e-6f;
+
+ const float fabsy1y2 = rcAbs(y1-y2);
+ const float fabsy2y3 = rcAbs(y2-y3);
+
+ /* Check for coincident points */
+ if (fabsy1y2 < EPSILON && fabsy2y3 < EPSILON)
+ return 0;
+
+ if (fabsy1y2 < EPSILON)
+ {
+ const float m2 = - (x3-x2) / (y3-y2);
+ const float mx2 = (x2 + x3) / 2.0f;
+ const float my2 = (y2 + y3) / 2.0f;
+ xc = (x2 + x1) / 2.0f;
+ yc = m2 * (xc - mx2) + my2;
+ }
+ else if (fabsy2y3 < EPSILON)
+ {
+ const float m1 = - (x2-x1) / (y2-y1);
+ const float mx1 = (x1 + x2) / 2.0f;
+ const float my1 = (y1 + y2) / 2.0f;
+ xc = (x3 + x2) / 2.0f;
+ yc = m1 * (xc - mx1) + my1;
+ }
+ else
+ {
+ const float m1 = - (x2-x1) / (y2-y1);
+ const float m2 = - (x3-x2) / (y3-y2);
+ const float mx1 = (x1 + x2) / 2.0f;
+ const float mx2 = (x2 + x3) / 2.0f;
+ const float my1 = (y1 + y2) / 2.0f;
+ const float my2 = (y2 + y3) / 2.0f;
+ xc = (m1 * mx1 - m2 * mx2 + my2 - my1) / (m1 - m2);
+ if (fabsy1y2 > fabsy2y3)
+ yc = m1 * (xc - mx1) + my1;
+ else
+ yc = m2 * (xc - mx2) + my2;
+ }
+
+ float dx,dy;
+
+ dx = x2 - xc;
+ dy = y2 - yc;
+ rsqr = dx*dx + dy*dy;
+
+ dx = xp - xc;
+ dy = yp - yc;
+ const float drsqr = dx*dx + dy*dy;
+
+ return (drsqr <= rsqr) ? 1 : 0;
+}
+
+static float *_qsort_verts;
+static int ptcmp(const void *v1, const void *v2)
+{
+ const float* p1 = &_qsort_verts[(*(const int*)v1)*3];
+ const float* p2 = &_qsort_verts[(*(const int*)v2)*3];
+ if (p1[0] < p2[0])
+ return -1;
+ else if (p1[0] > p2[0])
+ return 1;
+ else
+ return 0;
+}
+
+// Based on Paul Bourke's triangulate.c
+// http://astronomy.swin.edu.au/~pbourke/terrain/triangulate/triangulate.c
+static void delaunay(const int nv, float *verts, rcIntArray& idx, rcIntArray& tris, rcIntArray& edges)
+{
+ // Sort vertices
+ idx.resize(nv);
+ for (int i = 0; i < nv; ++i)
+ idx[i] = i;
+ _qsort_verts = verts;
+ qsort(&idx[0], idx.size(), sizeof(int), ptcmp);
+
+ // Find the maximum and minimum vertex bounds.
+ // This is to allow calculation of the bounding triangle
+ float xmin = verts[0];
+ float ymin = verts[2];
+ float xmax = xmin;
+ float ymax = ymin;
+ for (int i = 1; i < nv; ++i)
+ {
+ xmin = rcMin(xmin, verts[i*3+0]);
+ xmax = rcMax(xmax, verts[i*3+0]);
+ ymin = rcMin(ymin, verts[i*3+2]);
+ ymax = rcMax(ymax, verts[i*3+2]);
+ }
+ float dx = xmax - xmin;
+ float dy = ymax - ymin;
+ float dmax = (dx > dy) ? dx : dy;
+ float xmid = (xmax + xmin) / 2.0f;
+ float ymid = (ymax + ymin) / 2.0f;
+
+ // Set up the supertriangle
+ // This is a triangle which encompasses all the sample points.
+ // The supertriangle coordinates are added to the end of the
+ // vertex list. The supertriangle is the first triangle in
+ // the triangle list.
+ float sv[3*3];
+
+ sv[0] = xmid - 20 * dmax;
+ sv[1] = 0;
+ sv[2] = ymid - dmax;
+
+ sv[3] = xmid;
+ sv[4] = 0;
+ sv[5] = ymid + 20 * dmax;
+
+ sv[6] = xmid + 20 * dmax;
+ sv[7] = 0;
+ sv[8] = ymid - dmax;
+
+ tris.push(-3);
+ tris.push(-2);
+ tris.push(-1);
+ tris.push(0); // not completed
+
+ for (int i = 0; i < nv; ++i)
+ {
+ const float xp = verts[idx[i]*3+0];
+ const float yp = verts[idx[i]*3+2];
+
+ edges.resize(0);
+
+ // Set up the edge buffer.
+ // If the point (xp,yp) lies inside the circumcircle then the
+ // three edges of that triangle are added to the edge buffer
+ // and that triangle is removed.
+ for (int j = 0; j < tris.size()/4; ++j)
+ {
+ int* t = &tris[j*4];
+ if (t[3]) // completed?
+ continue;
+ const float* v1 = t[0] < 0 ? &sv[(t[0]+3)*3] : &verts[idx[t[0]]*3];
+ const float* v2 = t[1] < 0 ? &sv[(t[1]+3)*3] : &verts[idx[t[1]]*3];
+ const float* v3 = t[2] < 0 ? &sv[(t[2]+3)*3] : &verts[idx[t[2]]*3];
+ float xc,yc,rsqr;
+ int inside = circumCircle(xp,yp, v1[0],v1[2], v2[0],v2[2], v3[0],v3[2], xc,yc,rsqr);
+ if (xc < xp && rcSqr(xp-xc) > rsqr)
+ t[3] = 1;
+ if (inside)
+ {
+ // Collect triangle edges.
+ edges.push(t[0]);
+ edges.push(t[1]);
+ edges.push(t[1]);
+ edges.push(t[2]);
+ edges.push(t[2]);
+ edges.push(t[0]);
+ // Remove triangle j.
+ t[0] = tris[tris.size()-4];
+ t[1] = tris[tris.size()-3];
+ t[2] = tris[tris.size()-2];
+ t[3] = tris[tris.size()-1];
+ tris.resize(tris.size()-4);
+ j--;
+ }
+ }
+
+ // Remove duplicate edges.
+ const int ne = edges.size()/2;
+ for (int j = 0; j < ne-1; ++j)
+ {
+ for (int k = j+1; k < ne; ++k)
+ {
+ // Dupe?, make null.
+ if ((edges[j*2+0] == edges[k*2+1]) && (edges[j*2+1] == edges[k*2+0]))
+ {
+ edges[j*2+0] = 0;
+ edges[j*2+1] = 0;
+ edges[k*2+0] = 0;
+ edges[k*2+1] = 0;
+ }
+ }
+ }
+
+ // Form new triangles for the current point
+ // Skipping over any null.
+ // All edges are arranged in clockwise order.
+ for (int j = 0; j < ne; ++j)
+ {
+ if (edges[j*2+0] == edges[j*2+1]) continue;
+ tris.push(edges[j*2+0]);
+ tris.push(edges[j*2+1]);
+ tris.push(i);
+ tris.push(0); // not completed
+ }
+ }
+
+ // Remove triangles with supertriangle vertices
+ // These are triangles which have a vertex number greater than nv
+ for (int i = 0; i < tris.size()/4; ++i)
+ {
+ int* t = &tris[i*4];
+ if (t[0] < 0 || t[1] < 0 || t[2] < 0)
+ {
+ t[0] = tris[tris.size()-4];
+ t[1] = tris[tris.size()-3];
+ t[2] = tris[tris.size()-2];
+ t[3] = tris[tris.size()-1];
+ tris.resize(tris.size()-4);
+ i--;
+ }
+ }
+ // Triangle vertices are pointing to sorted vertices, remap indices.
+ for (int i = 0; i < tris.size(); ++i)
+ tris[i] = idx[tris[i]];
+}
+
+inline float vdot2(const float* a, const float* b)
+{
+ return a[0]*b[0] + a[2]*b[2];
+}
+
+static float distPtTri(const float* p, const float* a, const float* b, const float* c)
+{
+ float v0[3], v1[3], v2[3];
+ vsub(v0, c,a);
+ vsub(v1, b,a);
+ vsub(v2, p,a);
+
+ const float dot00 = vdot2(v0, v0);
+ const float dot01 = vdot2(v0, v1);
+ const float dot02 = vdot2(v0, v2);
+ const float dot11 = vdot2(v1, v1);
+ const float dot12 = vdot2(v1, v2);
+
+ // Compute barycentric coordinates
+ float invDenom = 1.0f / (dot00 * dot11 - dot01 * dot01);
+ float u = (dot11 * dot02 - dot01 * dot12) * invDenom;
+ float v = (dot00 * dot12 - dot01 * dot02) * invDenom;
+
+ // If point lies inside the triangle, return interpolated y-coord.
+ static const float EPS = 1e-4f;
+ if (u >= -EPS && v >= -EPS && (u+v) <= 1+EPS)
+ {
+ float y = a[1] + v0[1]*u + v1[1]*v;
+ return fabsf(y-p[1]);
+ }
+ return FLT_MAX;
+}
+
+static float distancePtSeg(const float* pt, const float* p, const float* q)
+{
+ float pqx = q[0] - p[0];
+ float pqy = q[1] - p[1];
+ float pqz = q[2] - p[2];
+ float dx = pt[0] - p[0];
+ float dy = pt[1] - p[1];
+ float dz = pt[2] - p[2];
+ float d = pqx*pqx + pqy*pqy + pqz*pqz;
+ float t = pqx*dx + pqy*dy + pqz*dz;
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+
+ dx = p[0] + t*pqx - pt[0];
+ dy = p[1] + t*pqy - pt[1];
+ dz = p[2] + t*pqz - pt[2];
+
+ return dx*dx + dy*dy + dz*dz;
+}
+
+static float distancePtSeg2d(const float* pt, const float* p, const float* q)
+{
+ float pqx = q[0] - p[0];
+ float pqz = q[2] - p[2];
+ float dx = pt[0] - p[0];
+ float dz = pt[2] - p[2];
+ float d = pqx*pqx + pqz*pqz;
+ float t = pqx*dx + pqz*dz;
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+
+ dx = p[0] + t*pqx - pt[0];
+ dz = p[2] + t*pqz - pt[2];
+
+ return dx*dx + dz*dz;
+}
+
+static float distToTriMesh(const float* p, const float* verts, int nverts, const int* tris, int ntris)
+{
+ float dmin = FLT_MAX;
+ for (int i = 0; i < ntris; ++i)
+ {
+ const float* va = &verts[tris[i*4+0]*3];
+ const float* vb = &verts[tris[i*4+1]*3];
+ const float* vc = &verts[tris[i*4+2]*3];
+ float d = distPtTri(p, va,vb,vc);
+ if (d < dmin)
+ dmin = d;
+ }
+ if (dmin == FLT_MAX) return -1;
+ return dmin;
+}
+
+static float distToPoly(int nvert, const float* verts, const float* p)
+{
+
+ float dmin = FLT_MAX;
+ int i, j, c = 0;
+ for (i = 0, j = nvert-1; i < nvert; j = i++)
+ {
+ const float* vi = &verts[i*3];
+ const float* vj = &verts[j*3];
+ if (((vi[2] > p[2]) != (vj[2] > p[2])) &&
+ (p[0] < (vj[0]-vi[0]) * (p[2]-vi[2]) / (vj[2]-vi[2]) + vi[0]) )
+ c = !c;
+ dmin = rcMin(dmin, distancePtSeg2d(p, vj, vi));
+ }
+ return c ? -dmin : dmin;
+}
+
+
+static unsigned short getHeight(const float* pos, const float* bmin, const float ics, const rcHeightPatch& hp)
+{
+ int ix = (int)floorf((pos[0]-bmin[0])*ics + 0.01f);
+ int iz = (int)floorf((pos[2]-bmin[2])*ics + 0.01f);
+ ix = rcClamp(ix-hp.xmin, 0, hp.width);
+ iz = rcClamp(iz-hp.ymin, 0, hp.height);
+ unsigned short h = hp.data[ix+iz*hp.width];
+ return h;
+}
+
+static bool buildPolyDetail(const float* in, const int nin, unsigned short reg,
+ const float sampleDist, const float sampleMaxError,
+ const rcCompactHeightfield& chf, const rcHeightPatch& hp,
+ float* verts, int& nverts, rcIntArray& tris,
+ rcIntArray& edges, rcIntArray& idx, rcIntArray& samples)
+{
+ static const int MAX_VERTS = 256;
+ static const int MAX_EDGE = 64;
+ float edge[(MAX_EDGE+1)*3];
+
+ nverts = 0;
+
+ for (int i = 0; i < nin; ++i)
+ vcopy(&verts[i*3], &in[i*3]);
+ nverts = nin;
+
+ const float ics = 1.0f/chf.cs;
+
+ // Tesselate outlines.
+ // This is done in separate pass in order to ensure
+ // seamless height values across the ply boundaries.
+ if (sampleDist > 0)
+ {
+ for (int i = 0, j = nin-1; i < nin; j=i++)
+ {
+ const float* vj = &in[j*3];
+ const float* vi = &in[i*3];
+ // Make sure the segments are always handled in same order
+ // using lexological sort or else there will be seams.
+ if (fabsf(vj[0]-vi[0]) < 1e-6f)
+ {
+ if (vj[2] > vi[2])
+ rcSwap(vj,vi);
+ }
+ else
+ {
+ if (vj[0] > vi[0])
+ rcSwap(vj,vi);
+ }
+ // Create samples along the edge.
+ float dx = vi[0] - vj[0];
+ float dy = vi[1] - vj[1];
+ float dz = vi[2] - vj[2];
+ float d = sqrtf(dx*dx + dz*dz);
+ int nn = 1 + (int)floorf(d/sampleDist);
+ if (nn > MAX_EDGE) nn = MAX_EDGE;
+ if (nverts+nn >= MAX_VERTS)
+ nn = MAX_VERTS-1-nverts;
+ for (int k = 0; k <= nn; ++k)
+ {
+ float u = (float)k/(float)nn;
+ float* pos = &edge[k*3];
+ pos[0] = vj[0] + dx*u;
+ pos[1] = vj[1] + dy*u;
+ pos[2] = vj[2] + dz*u;
+ pos[1] = chf.bmin[1] + getHeight(pos, chf.bmin, ics, hp)*chf.ch;
+ }
+ // Simplify samples.
+ int idx[MAX_EDGE] = {0,nn};
+ int nidx = 2;
+ for (int k = 0; k < nidx-1; )
+ {
+ const int a = idx[k];
+ const int b = idx[k+1];
+ const float* va = &edge[a*3];
+ const float* vb = &edge[b*3];
+ // Find maximum deviation along the segment.
+ float maxd = 0;
+ int maxi = -1;
+ for (int m = a+1; m < b; ++m)
+ {
+ float d = distancePtSeg(&edge[m*3],va,vb);
+ if (d > maxd)
+ {
+ maxd = d;
+ maxi = m;
+ }
+ }
+ // If the max deviation is larger than accepted error,
+ // add new point, else continue to next segment.
+ if (maxi != -1 && maxd > rcSqr(sampleMaxError))
+ {
+ for (int m = nidx; m > k; --m)
+ idx[m] = idx[m-1];
+ idx[k+1] = maxi;
+ nidx++;
+ }
+ else
+ {
+ ++k;
+ }
+ }
+ // Add new vertices.
+ for (int k = 1; k < nidx-1; ++k)
+ {
+ vcopy(&verts[nverts*3], &edge[idx[k]*3]);
+ nverts++;
+ }
+ }
+ }
+
+ // Tesselate the base mesh.
+ edges.resize(0);
+ tris.resize(0);
+ idx.resize(0);
+ delaunay(nverts, verts, idx, tris, edges);
+
+ if (sampleDist > 0)
+ {
+ // Create sample locations in a grid.
+ float bmin[3], bmax[3];
+ vcopy(bmin, in);
+ vcopy(bmax, in);
+ for (int i = 1; i < nin; ++i)
+ {
+ vmin(bmin, &in[i*3]);
+ vmax(bmax, &in[i*3]);
+ }
+ int x0 = (int)floorf(bmin[0]/sampleDist);
+ int x1 = (int)ceilf(bmax[0]/sampleDist);
+ int z0 = (int)floorf(bmin[2]/sampleDist);
+ int z1 = (int)ceilf(bmax[2]/sampleDist);
+ samples.resize(0);
+ for (int z = z0; z < z1; ++z)
+ {
+ for (int x = x0; x < x1; ++x)
+ {
+ float pt[3];
+ pt[0] = x*sampleDist;
+ pt[2] = z*sampleDist;
+ // Make sure the samples are not too close to the edges.
+ if (distToPoly(nin,in,pt) > -sampleDist/2) continue;
+ samples.push(x);
+ samples.push(getHeight(pt, chf.bmin, ics, hp));
+ samples.push(z);
+ }
+ }
+
+ // Add the samples starting from the one that has the most
+ // error. The procedure stops when all samples are added
+ // or when the max error is within treshold.
+ const int nsamples = samples.size()/3;
+ for (int iter = 0; iter < nsamples; ++iter)
+ {
+ // Find sample with most error.
+ float bestpt[3];
+ float bestd = 0;
+ for (int i = 0; i < nsamples; ++i)
+ {
+ float pt[3];
+ pt[0] = samples[i*3+0]*sampleDist;
+ pt[1] = chf.bmin[1] + samples[i*3+1]*chf.ch;
+ pt[2] = samples[i*3+2]*sampleDist;
+ float d = distToTriMesh(pt, verts, nverts, &tris[0], tris.size()/4);
+ if (d < 0) continue; // did not hit the mesh.
+ if (d > bestd)
+ {
+ bestd = d;
+ vcopy(bestpt,pt);
+ }
+ }
+ // If the max error is within accepted threshold, stop tesselating.
+ if (bestd <= sampleMaxError)
+ break;
+
+ // Add the new sample point.
+ vcopy(&verts[nverts*3],bestpt);
+ nverts++;
+
+ // Create new triangulation.
+ // TODO: Incremental add instead of full rebuild.
+ edges.resize(0);
+ tris.resize(0);
+ idx.resize(0);
+ delaunay(nverts, verts, idx, tris, edges);
+
+ if (nverts >= MAX_VERTS)
+ break;
+ }
+ }
+
+ return true;
+}
+
+static void getHeightData(const rcCompactHeightfield& chf,
+ const unsigned short* poly, const int npoly,
+ const unsigned short* verts,
+ rcHeightPatch& hp, rcIntArray& stack)
+{
+ // Floodfill the heightfield to get 2D height data,
+ // starting at vertex locations as seeds.
+
+ memset(hp.data, 0xff, sizeof(unsigned short)*hp.width*hp.height);
+
+ stack.resize(0);
+
+ // Use poly vertices as seed points for the flood fill.
+ for (int j = 0; j < npoly; ++j)
+ {
+ const int ax = (int)verts[poly[j]*3+0];
+ const int ay = (int)verts[poly[j]*3+1];
+ const int az = (int)verts[poly[j]*3+2];
+ if (ax < hp.xmin || ax >= hp.xmin+hp.width ||
+ az < hp.ymin || az >= hp.ymin+hp.height)
+ continue;
+
+ const rcCompactCell& c = chf.cells[ax+az*chf.width];
+ int dmin = 0xffff;
+ int ai = -1;
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ int d = rcAbs(ay - (int)s.y);
+ if (d < dmin)
+ {
+ ai = i;
+ dmin = d;
+ }
+ }
+ if (ai != -1)
+ {
+ stack.push(ax);
+ stack.push(az);
+ stack.push(ai);
+ }
+ }
+
+ while (stack.size() > 0)
+ {
+ int ci = stack.pop();
+ int cy = stack.pop();
+ int cx = stack.pop();
+
+ // Skip already visited locations.
+ int idx = cx-hp.xmin+(cy-hp.ymin)*hp.width;
+ if (hp.data[idx] != 0xffff)
+ continue;
+
+ const rcCompactSpan& cs = chf.spans[ci];
+ hp.data[idx] = cs.y;
+
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(cs, dir) == 0xf) continue;
+
+ const int ax = cx + rcGetDirOffsetX(dir);
+ const int ay = cy + rcGetDirOffsetY(dir);
+
+ if (ax < hp.xmin || ax >= (hp.xmin+hp.width) ||
+ ay < hp.ymin || ay >= (hp.ymin+hp.height))
+ continue;
+
+ if (hp.data[ax-hp.xmin+(ay-hp.ymin)*hp.width] != 0xffff)
+ continue;
+
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(cs, dir);
+
+ stack.push(ax);
+ stack.push(ay);
+ stack.push(ai);
+ }
+ }
+}
+
+static unsigned char getEdgeFlags(const float* va, const float* vb,
+ const float* vpoly, const int npoly)
+{
+ // Return true if edge (va,vb) is part of the polygon.
+ static const float thrSqr = rcSqr(0.001f);
+ for (int i = 0, j = npoly-1; i < npoly; j=i++)
+ {
+ if (distancePtSeg2d(va, &vpoly[j*3], &vpoly[i*3]) < thrSqr &&
+ distancePtSeg2d(vb, &vpoly[j*3], &vpoly[i*3]) < thrSqr)
+ return 1;
+ }
+ return 0;
+}
+
+static unsigned char getTriFlags(const float* va, const float* vb, const float* vc,
+ const float* vpoly, const int npoly)
+{
+ unsigned char flags = 0;
+ flags |= getEdgeFlags(va,vb,vpoly,npoly) << 0;
+ flags |= getEdgeFlags(vb,vc,vpoly,npoly) << 2;
+ flags |= getEdgeFlags(vc,va,vpoly,npoly) << 4;
+ return flags;
+}
+
+
+
+bool rcBuildPolyMeshDetail(const rcPolyMesh& mesh, const rcCompactHeightfield& chf,
+ const float sampleDist, const float sampleMaxError,
+ rcPolyMeshDetail& dmesh)
+{
+ if (mesh.nverts == 0 || mesh.npolys == 0)
+ return true;
+
+ rcTimeVal startTime = rcGetPerformanceTimer();
+ rcTimeVal endTime;
+
+ int vcap;
+ int tcap;
+
+ const int nvp = mesh.nvp;
+ const float cs = mesh.cs;
+ const float ch = mesh.ch;
+ const float* orig = mesh.bmin;
+
+ rcIntArray edges(64);
+ rcIntArray tris(512);
+ rcIntArray idx(512);
+ rcIntArray stack(512);
+ rcIntArray samples(512);
+ float verts[256*3];
+ float* poly = 0;
+ int* bounds = 0;
+ rcHeightPatch hp;
+ int nPolyVerts = 0;
+ int maxhw = 0, maxhh = 0;
+
+ bounds = new int[mesh.npolys*4];
+ if (!bounds)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'bounds' (%d).", mesh.npolys*4);
+ goto failure;
+ }
+ poly = new float[nvp*3];
+ if (!bounds)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'poly' (%d).", nvp*3);
+ goto failure;
+ }
+
+ // Find max size for a polygon area.
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ const unsigned short* p = &mesh.polys[i*nvp*2];
+ int& xmin = bounds[i*4+0];
+ int& xmax = bounds[i*4+1];
+ int& ymin = bounds[i*4+2];
+ int& ymax = bounds[i*4+3];
+ xmin = chf.width;
+ xmax = 0;
+ ymin = chf.height;
+ ymax = 0;
+ for (int j = 0; j < nvp; ++j)
+ {
+ if(p[j] == 0xffff) break;
+ const unsigned short* v = &mesh.verts[p[j]*3];
+ xmin = rcMin(xmin, (int)v[0]);
+ xmax = rcMax(xmax, (int)v[0]);
+ ymin = rcMin(ymin, (int)v[2]);
+ ymax = rcMax(ymax, (int)v[2]);
+ nPolyVerts++;
+ }
+ xmin = rcMax(0,xmin-1);
+ xmax = rcMin(chf.width,xmax+1);
+ ymin = rcMax(0,ymin-1);
+ ymax = rcMin(chf.height,ymax+1);
+ if (xmin >= xmax || ymin >= ymax) continue;
+ maxhw = rcMax(maxhw, xmax-xmin);
+ maxhh = rcMax(maxhh, ymax-ymin);
+ }
+
+ hp.data = new unsigned short[maxhw*maxhh];
+ if (!hp.data)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'hp.data' (%d).", maxhw*maxhh);
+ goto failure;
+ }
+
+ dmesh.nmeshes = mesh.npolys;
+ dmesh.nverts = 0;
+ dmesh.ntris = 0;
+ dmesh.meshes = new unsigned short[dmesh.nmeshes*4];
+ if (!dmesh.meshes)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.meshes' (%d).", dmesh.nmeshes*4);
+ goto failure;
+ }
+
+ vcap = nPolyVerts+nPolyVerts/2;
+ tcap = vcap*2;
+
+ dmesh.nverts = 0;
+ dmesh.verts = new float[vcap*3];
+ if (!dmesh.verts)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.verts' (%d).", vcap*3);
+ goto failure;
+ }
+ dmesh.ntris = 0;
+ dmesh.tris = new unsigned char[tcap*4];
+ if (!dmesh.tris)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.tris' (%d).", tcap*4);
+ goto failure;
+ }
+
+ for (int i = 0; i < mesh.npolys; ++i)
+ {
+ const unsigned short* p = &mesh.polys[i*nvp*2];
+
+ // Find polygon bounding box.
+ int npoly = 0;
+ for (int j = 0; j < nvp; ++j)
+ {
+ if(p[j] == 0xffff) break;
+ const unsigned short* v = &mesh.verts[p[j]*3];
+ poly[j*3+0] = orig[0] + v[0]*cs;
+ poly[j*3+1] = orig[1] + v[1]*ch;
+ poly[j*3+2] = orig[2] + v[2]*cs;
+ npoly++;
+ }
+
+ // Get the height data from the area of the polygon.
+ hp.xmin = bounds[i*4+0];
+ hp.ymin = bounds[i*4+2];
+ hp.width = bounds[i*4+1]-bounds[i*4+0];
+ hp.height = bounds[i*4+3]-bounds[i*4+2];
+ getHeightData(chf, p, npoly, mesh.verts, hp, stack);
+
+ // Build detail mesh.
+ int nverts = 0;
+ if (!buildPolyDetail(poly, npoly, mesh.regs[i],
+ sampleDist, sampleMaxError,
+ chf, hp, verts, nverts, tris,
+ edges, idx, samples))
+ {
+ goto failure;
+ }
+
+ // Offset detail vertices, unnecassary?
+ for (int j = 0; j < nverts; ++j)
+ verts[j*3+1] += chf.ch;
+
+ // Store detail submesh.
+ const int ntris = tris.size()/4;
+
+ dmesh.meshes[i*4+0] = dmesh.nverts;
+ dmesh.meshes[i*4+1] = (unsigned short)nverts;
+ dmesh.meshes[i*4+2] = dmesh.ntris;
+ dmesh.meshes[i*4+3] = (unsigned short)ntris;
+
+ // Store vertices, allocate more memory if necessary.
+ if (dmesh.nverts+nverts > vcap)
+ {
+ while (dmesh.nverts+nverts > vcap)
+ vcap += 256;
+
+ float* newv = new float[vcap*3];
+ if (!newv)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'newv' (%d).", vcap*3);
+ goto failure;
+ }
+ if (dmesh.nverts)
+ memcpy(newv, dmesh.verts, sizeof(float)*3*dmesh.nverts);
+ delete [] dmesh.verts;
+ dmesh.verts = newv;
+ }
+ for (int j = 0; j < nverts; ++j)
+ {
+ dmesh.verts[dmesh.nverts*3+0] = verts[j*3+0];
+ dmesh.verts[dmesh.nverts*3+1] = verts[j*3+1];
+ dmesh.verts[dmesh.nverts*3+2] = verts[j*3+2];
+ dmesh.nverts++;
+ }
+
+ // Store triangles, allocate more memory if necessary.
+ if (dmesh.ntris+ntris > tcap)
+ {
+ while (dmesh.ntris+ntris > tcap)
+ tcap += 256;
+ unsigned char* newt = new unsigned char[tcap*4];
+ if (!newt)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'newt' (%d).", tcap*4);
+ goto failure;
+ }
+ if (dmesh.ntris)
+ memcpy(newt, dmesh.tris, sizeof(unsigned char)*4*dmesh.ntris);
+ delete [] dmesh.tris;
+ dmesh.tris = newt;
+ }
+ for (int j = 0; j < ntris; ++j)
+ {
+ const int* t = &tris[j*4];
+ dmesh.tris[dmesh.ntris*4+0] = (unsigned char)t[0];
+ dmesh.tris[dmesh.ntris*4+1] = (unsigned char)t[1];
+ dmesh.tris[dmesh.ntris*4+2] = (unsigned char)t[2];
+ dmesh.tris[dmesh.ntris*4+3] = getTriFlags(&verts[t[0]*3], &verts[t[1]*3], &verts[t[2]*3], poly, npoly);
+ dmesh.ntris++;
+ }
+ }
+
+ delete [] bounds;
+ delete [] poly;
+
+ endTime = rcGetPerformanceTimer();
+
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->buildDetailMesh += rcGetDeltaTimeUsec(startTime, endTime);
+
+ return true;
+
+failure:
+
+ delete [] bounds;
+ delete [] poly;
+
+ return false;
+}
+
+bool rcMergePolyMeshDetails(rcPolyMeshDetail** meshes, const int nmeshes, rcPolyMeshDetail& mesh)
+{
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ int maxVerts = 0;
+ int maxTris = 0;
+ int maxMeshes = 0;
+
+ for (int i = 0; i < nmeshes; ++i)
+ {
+ if (!meshes[i]) continue;
+ maxVerts += meshes[i]->nverts;
+ maxTris += meshes[i]->ntris;
+ maxMeshes += meshes[i]->nmeshes;
+ }
+
+ mesh.nmeshes = 0;
+ mesh.meshes = new unsigned short[maxMeshes*4];
+ if (!mesh.meshes)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'pmdtl.meshes' (%d).", maxMeshes*4);
+ return false;
+ }
+
+ mesh.ntris = 0;
+ mesh.tris = new unsigned char[maxTris*4];
+ if (!mesh.tris)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.tris' (%d).", maxTris*4);
+ return false;
+ }
+
+ mesh.nverts = 0;
+ mesh.verts = new float[maxVerts*3];
+ if (!mesh.verts)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildPolyMeshDetail: Out of memory 'dmesh.verts' (%d).", maxVerts*3);
+ return false;
+ }
+
+ // Merge datas.
+ for (int i = 0; i < nmeshes; ++i)
+ {
+ rcPolyMeshDetail* dm = meshes[i];
+ if (!dm) continue;
+ for (int j = 0; j < dm->nmeshes; ++j)
+ {
+ unsigned short* dst = &mesh.meshes[mesh.nmeshes*4];
+ unsigned short* src = &dm->meshes[j*4];
+ dst[0] = mesh.nverts+src[0];
+ dst[1] = src[1];
+ dst[2] = mesh.ntris+src[2];
+ dst[3] = src[3];
+ mesh.nmeshes++;
+ }
+
+ for (int k = 0; k < dm->nverts; ++k)
+ {
+ vcopy(&mesh.verts[mesh.nverts*3], &dm->verts[k*3]);
+ mesh.nverts++;
+ }
+ for (int k = 0; k < dm->ntris; ++k)
+ {
+ mesh.tris[mesh.ntris*4+0] = dm->tris[k*4+0];
+ mesh.tris[mesh.ntris*4+1] = dm->tris[k*4+1];
+ mesh.tris[mesh.ntris*4+2] = dm->tris[k*4+2];
+ mesh.tris[mesh.ntris*4+3] = dm->tris[k*4+3];
+ mesh.ntris++;
+ }
+ }
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->mergePolyMeshDetail += rcGetDeltaTimeUsec(startTime, endTime);
+
+ return true;
+}
+
diff --git a/extern/recastnavigation/Recast/Source/RecastRasterization.cpp b/extern/recastnavigation/Recast/Source/RecastRasterization.cpp
new file mode 100644
index 00000000000..658b0e1fb51
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/RecastRasterization.cpp
@@ -0,0 +1,308 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastTimer.h"
+#include "RecastLog.h"
+
+inline bool overlapBounds(const float* amin, const float* amax, const float* bmin, const float* bmax)
+{
+ bool overlap = true;
+ overlap = (amin[0] > bmax[0] || amax[0] < bmin[0]) ? false : overlap;
+ overlap = (amin[1] > bmax[1] || amax[1] < bmin[1]) ? false : overlap;
+ overlap = (amin[2] > bmax[2] || amax[2] < bmin[2]) ? false : overlap;
+ return overlap;
+}
+
+inline bool overlapInterval(unsigned short amin, unsigned short amax,
+ unsigned short bmin, unsigned short bmax)
+{
+ if (amax < bmin) return false;
+ if (amin > bmax) return false;
+ return true;
+}
+
+
+static rcSpan* allocSpan(rcHeightfield& hf)
+{
+ // If running out of memory, allocate new page and update the freelist.
+ if (!hf.freelist || !hf.freelist->next)
+ {
+ // Create new page.
+ // Allocate memory for the new pool.
+ const int size = (sizeof(rcSpanPool)-sizeof(rcSpan)) + sizeof(rcSpan)*RC_SPANS_PER_POOL;
+ rcSpanPool* pool = reinterpret_cast<rcSpanPool*>(new unsigned char[size]);
+ if (!pool) return 0;
+ pool->next = 0;
+ // Add the pool into the list of pools.
+ pool->next = hf.pools;
+ hf.pools = pool;
+ // Add new items to the free list.
+ rcSpan* freelist = hf.freelist;
+ rcSpan* head = &pool->items[0];
+ rcSpan* it = &pool->items[RC_SPANS_PER_POOL];
+ do
+ {
+ --it;
+ it->next = freelist;
+ freelist = it;
+ }
+ while (it != head);
+ hf.freelist = it;
+ }
+
+ // Pop item from in front of the free list.
+ rcSpan* it = hf.freelist;
+ hf.freelist = hf.freelist->next;
+ return it;
+}
+
+static void freeSpan(rcHeightfield& hf, rcSpan* ptr)
+{
+ if (!ptr) return;
+ // Add the node in front of the free list.
+ ptr->next = hf.freelist;
+ hf.freelist = ptr;
+}
+
+static void addSpan(rcHeightfield& hf, int x, int y,
+ unsigned short smin, unsigned short smax,
+ unsigned short flags)
+{
+ int idx = x + y*hf.width;
+
+ rcSpan* s = allocSpan(hf);
+ s->smin = smin;
+ s->smax = smax;
+ s->flags = flags;
+ s->next = 0;
+
+ // Empty cell, add he first span.
+ if (!hf.spans[idx])
+ {
+ hf.spans[idx] = s;
+ return;
+ }
+ rcSpan* prev = 0;
+ rcSpan* cur = hf.spans[idx];
+
+ // Insert and merge spans.
+ while (cur)
+ {
+ if (cur->smin > s->smax)
+ {
+ // Current span is further than the new span, break.
+ break;
+ }
+ else if (cur->smax < s->smin)
+ {
+ // Current span is before the new span advance.
+ prev = cur;
+ cur = cur->next;
+ }
+ else
+ {
+ // Merge spans.
+ if (cur->smin < s->smin)
+ s->smin = cur->smin;
+ if (cur->smax > s->smax)
+ s->smax = cur->smax;
+
+ // Merge flags.
+// if (s->smax == cur->smax)
+ if (rcAbs((int)s->smax - (int)cur->smax) <= 1)
+ s->flags |= cur->flags;
+
+ // Remove current span.
+ rcSpan* next = cur->next;
+ freeSpan(hf, cur);
+ if (prev)
+ prev->next = next;
+ else
+ hf.spans[idx] = next;
+ cur = next;
+ }
+ }
+
+ // Insert new span.
+ if (prev)
+ {
+ s->next = prev->next;
+ prev->next = s;
+ }
+ else
+ {
+ s->next = hf.spans[idx];
+ hf.spans[idx] = s;
+ }
+}
+
+static int clipPoly(const float* in, int n, float* out, float pnx, float pnz, float pd)
+{
+ float d[12];
+ for (int i = 0; i < n; ++i)
+ d[i] = pnx*in[i*3+0] + pnz*in[i*3+2] + pd;
+
+ int m = 0;
+ for (int i = 0, j = n-1; i < n; j=i, ++i)
+ {
+ bool ina = d[j] >= 0;
+ bool inb = d[i] >= 0;
+ if (ina != inb)
+ {
+ float s = d[j] / (d[j] - d[i]);
+ out[m*3+0] = in[j*3+0] + (in[i*3+0] - in[j*3+0])*s;
+ out[m*3+1] = in[j*3+1] + (in[i*3+1] - in[j*3+1])*s;
+ out[m*3+2] = in[j*3+2] + (in[i*3+2] - in[j*3+2])*s;
+ m++;
+ }
+ if (inb)
+ {
+ out[m*3+0] = in[i*3+0];
+ out[m*3+1] = in[i*3+1];
+ out[m*3+2] = in[i*3+2];
+ m++;
+ }
+ }
+ return m;
+}
+
+static void rasterizeTri(const float* v0, const float* v1, const float* v2,
+ unsigned char flags, rcHeightfield& hf,
+ const float* bmin, const float* bmax,
+ const float cs, const float ics, const float ich)
+{
+ const int w = hf.width;
+ const int h = hf.height;
+ float tmin[3], tmax[3];
+ const float by = bmax[1] - bmin[1];
+
+ // Calculate the bounding box of the triangle.
+ vcopy(tmin, v0);
+ vcopy(tmax, v0);
+ vmin(tmin, v1);
+ vmin(tmin, v2);
+ vmax(tmax, v1);
+ vmax(tmax, v2);
+
+ // If the triangle does not touch the bbox of the heightfield, skip the triagle.
+ if (!overlapBounds(bmin, bmax, tmin, tmax))
+ return;
+
+ // Calculate the footpring of the triangle on the grid.
+ int x0 = (int)((tmin[0] - bmin[0])*ics);
+ int y0 = (int)((tmin[2] - bmin[2])*ics);
+ int x1 = (int)((tmax[0] - bmin[0])*ics);
+ int y1 = (int)((tmax[2] - bmin[2])*ics);
+ x0 = rcClamp(x0, 0, w-1);
+ y0 = rcClamp(y0, 0, h-1);
+ x1 = rcClamp(x1, 0, w-1);
+ y1 = rcClamp(y1, 0, h-1);
+
+ // Clip the triangle into all grid cells it touches.
+ float in[7*3], out[7*3], inrow[7*3];
+
+ for (int y = y0; y <= y1; ++y)
+ {
+ // Clip polygon to row.
+ vcopy(&in[0], v0);
+ vcopy(&in[1*3], v1);
+ vcopy(&in[2*3], v2);
+ int nvrow = 3;
+ const float cz = bmin[2] + y*cs;
+ nvrow = clipPoly(in, nvrow, out, 0, 1, -cz);
+ if (nvrow < 3) continue;
+ nvrow = clipPoly(out, nvrow, inrow, 0, -1, cz+cs);
+ if (nvrow < 3) continue;
+
+ for (int x = x0; x <= x1; ++x)
+ {
+ // Clip polygon to column.
+ int nv = nvrow;
+ const float cx = bmin[0] + x*cs;
+ nv = clipPoly(inrow, nv, out, 1, 0, -cx);
+ if (nv < 3) continue;
+ nv = clipPoly(out, nv, in, -1, 0, cx+cs);
+ if (nv < 3) continue;
+
+ // Calculate min and max of the span.
+ float smin = in[1], smax = in[1];
+ for (int i = 1; i < nv; ++i)
+ {
+ smin = rcMin(smin, in[i*3+1]);
+ smax = rcMax(smax, in[i*3+1]);
+ }
+ smin -= bmin[1];
+ smax -= bmin[1];
+ // Skip the span if it is outside the heightfield bbox
+ if (smax < 0.0f) continue;
+ if (smin > by) continue;
+ // Clamp the span to the heightfield bbox.
+ if (smin < 0.0f) smin = bmin[1];
+ if (smax > by) smax = bmax[1];
+
+ // Snap the span to the heightfield height grid.
+ unsigned short ismin = (unsigned short)rcClamp((int)floorf(smin * ich), 0, 0x7fff);
+ unsigned short ismax = (unsigned short)rcClamp((int)ceilf(smax * ich), 0, 0x7fff);
+
+ addSpan(hf, x, y, ismin, ismax, flags);
+ }
+ }
+}
+
+void rcRasterizeTriangle(const float* v0, const float* v1, const float* v2,
+ unsigned char flags, rcHeightfield& solid)
+{
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ const float ics = 1.0f/solid.cs;
+ const float ich = 1.0f/solid.ch;
+ rasterizeTri(v0, v1, v2, flags, solid, solid.bmin, solid.bmax, solid.cs, ics, ich);
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->rasterizeTriangles += rcGetDeltaTimeUsec(startTime, endTime);
+}
+
+void rcRasterizeTriangles(const float* verts, int nv,
+ const int* tris, const unsigned char* flags, int nt,
+ rcHeightfield& solid)
+{
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ const float ics = 1.0f/solid.cs;
+ const float ich = 1.0f/solid.ch;
+ // Rasterize triangles.
+ for (int i = 0; i < nt; ++i)
+ {
+ const float* v0 = &verts[tris[i*3+0]*3];
+ const float* v1 = &verts[tris[i*3+1]*3];
+ const float* v2 = &verts[tris[i*3+2]*3];
+ // Rasterize.
+ rasterizeTri(v0, v1, v2, flags[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich);
+ }
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+ if (rcGetBuildTimes())
+ rcGetBuildTimes()->rasterizeTriangles += rcGetDeltaTimeUsec(startTime, endTime);
+}
diff --git a/extern/recastnavigation/Recast/Source/RecastRegion.cpp b/extern/recastnavigation/Recast/Source/RecastRegion.cpp
new file mode 100644
index 00000000000..5c557cf0681
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/RecastRegion.cpp
@@ -0,0 +1,1081 @@
+//
+// Copyright (c) 2009 Mikko Mononen memon@inside.org
+//
+// This software is provided 'as-is', without any express or implied
+// warranty. In no event will the authors be held liable for any damages
+// arising from the use of this software.
+// Permission is granted to anyone to use this software for any purpose,
+// including commercial applications, and to alter it and redistribute it
+// freely, subject to the following restrictions:
+// 1. The origin of this software must not be misrepresented; you must not
+// claim that you wrote the original software. If you use this software
+// in a product, an acknowledgment in the product documentation would be
+// appreciated but is not required.
+// 2. Altered source versions must be plainly marked as such, and must not be
+// misrepresented as being the original software.
+// 3. This notice may not be removed or altered from any source distribution.
+//
+
+#include <float.h>
+#define _USE_MATH_DEFINES
+#include <math.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include "Recast.h"
+#include "RecastLog.h"
+#include "RecastTimer.h"
+
+
+static unsigned short* calculateDistanceField(rcCompactHeightfield& chf,
+ unsigned short* src, unsigned short* dst,
+ unsigned short& maxDist)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ // Init distance and points.
+ for (int i = 0; i < chf.spanCount; ++i)
+ src[i] = 0xffff;
+
+ // Mark boundary cells.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ int nc = 0;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != 0xf)
+ nc++;
+ }
+ if (nc != 4)
+ src[i] = 0;
+ }
+ }
+ }
+
+ // Pass 1
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+
+ if (rcGetCon(s, 0) != 0xf)
+ {
+ // (-1,0)
+ const int ax = x + rcGetDirOffsetX(0);
+ const int ay = y + rcGetDirOffsetY(0);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 0);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (src[ai]+2 < src[i])
+ src[i] = src[ai]+2;
+
+ // (-1,-1)
+ if (rcGetCon(as, 3) != 0xf)
+ {
+ const int aax = ax + rcGetDirOffsetX(3);
+ const int aay = ay + rcGetDirOffsetY(3);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 3);
+ if (src[aai]+3 < src[i])
+ src[i] = src[aai]+3;
+ }
+ }
+ if (rcGetCon(s, 3) != 0xf)
+ {
+ // (0,-1)
+ const int ax = x + rcGetDirOffsetX(3);
+ const int ay = y + rcGetDirOffsetY(3);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 3);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (src[ai]+2 < src[i])
+ src[i] = src[ai]+2;
+
+ // (1,-1)
+ if (rcGetCon(as, 2) != 0xf)
+ {
+ const int aax = ax + rcGetDirOffsetX(2);
+ const int aay = ay + rcGetDirOffsetY(2);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 2);
+ if (src[aai]+3 < src[i])
+ src[i] = src[aai]+3;
+ }
+ }
+ }
+ }
+ }
+
+ // Pass 2
+ for (int y = h-1; y >= 0; --y)
+ {
+ for (int x = w-1; x >= 0; --x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+
+ if (rcGetCon(s, 2) != 0xf)
+ {
+ // (1,0)
+ const int ax = x + rcGetDirOffsetX(2);
+ const int ay = y + rcGetDirOffsetY(2);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 2);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (src[ai]+2 < src[i])
+ src[i] = src[ai]+2;
+
+ // (1,1)
+ if (rcGetCon(as, 1) != 0xf)
+ {
+ const int aax = ax + rcGetDirOffsetX(1);
+ const int aay = ay + rcGetDirOffsetY(1);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 1);
+ if (src[aai]+3 < src[i])
+ src[i] = src[aai]+3;
+ }
+ }
+ if (rcGetCon(s, 1) != 0xf)
+ {
+ // (0,1)
+ const int ax = x + rcGetDirOffsetX(1);
+ const int ay = y + rcGetDirOffsetY(1);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, 1);
+ const rcCompactSpan& as = chf.spans[ai];
+ if (src[ai]+2 < src[i])
+ src[i] = src[ai]+2;
+
+ // (-1,1)
+ if (rcGetCon(as, 0) != 0xf)
+ {
+ const int aax = ax + rcGetDirOffsetX(0);
+ const int aay = ay + rcGetDirOffsetY(0);
+ const int aai = (int)chf.cells[aax+aay*w].index + rcGetCon(as, 0);
+ if (src[aai]+3 < src[i])
+ src[i] = src[aai]+3;
+ }
+ }
+ }
+ }
+ }
+
+ maxDist = 0;
+ for (int i = 0; i < chf.spanCount; ++i)
+ maxDist = rcMax(src[i], maxDist);
+
+ return src;
+
+}
+
+static unsigned short* boxBlur(rcCompactHeightfield& chf, int thr,
+ unsigned short* src, unsigned short* dst)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ thr *= 2;
+
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+ int cd = (int)src[i];
+ if (cd <= thr)
+ {
+ dst[i] = cd;
+ continue;
+ }
+
+ int d = cd;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) != 0xf)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ d += (int)src[ai];
+
+ const rcCompactSpan& as = chf.spans[ai];
+ const int dir2 = (dir+1) & 0x3;
+ if (rcGetCon(as, dir2) != 0xf)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dir2);
+ const int ay2 = ay + rcGetDirOffsetY(dir2);
+ const int ai2 = (int)chf.cells[ax2+ay2*w].index + rcGetCon(as, dir2);
+ d += (int)src[ai2];
+ }
+ else
+ {
+ d += cd;
+ }
+ }
+ else
+ {
+ d += cd*2;
+ }
+ }
+ dst[i] = (unsigned short)((d+5)/9);
+ }
+ }
+ }
+ return dst;
+}
+
+
+static bool floodRegion(int x, int y, int i,
+ unsigned short level, unsigned short minLevel, unsigned short r,
+ rcCompactHeightfield& chf,
+ unsigned short* src,
+ rcIntArray& stack)
+{
+ const int w = chf.width;
+
+ // Flood fill mark region.
+ stack.resize(0);
+ stack.push((int)x);
+ stack.push((int)y);
+ stack.push((int)i);
+ src[i*2] = r;
+ src[i*2+1] = 0;
+
+ unsigned short lev = level >= minLevel+2 ? level-2 : minLevel;
+ int count = 0;
+
+ while (stack.size() > 0)
+ {
+ int ci = stack.pop();
+ int cy = stack.pop();
+ int cx = stack.pop();
+
+ const rcCompactSpan& cs = chf.spans[ci];
+
+ // Check if any of the neighbours already have a valid region set.
+ unsigned short ar = 0;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ // 8 connected
+ if (rcGetCon(cs, dir) != 0xf)
+ {
+ const int ax = cx + rcGetDirOffsetX(dir);
+ const int ay = cy + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(cs, dir);
+ unsigned short nr = src[ai*2];
+ if (nr != 0 && nr != r)
+ ar = nr;
+
+ const rcCompactSpan& as = chf.spans[ai];
+
+ const int dir2 = (dir+1) & 0x3;
+ if (rcGetCon(as, dir2) != 0xf)
+ {
+ const int ax2 = ax + rcGetDirOffsetX(dir2);
+ const int ay2 = ay + rcGetDirOffsetY(dir2);
+ const int ai2 = (int)chf.cells[ax2+ay2*w].index + rcGetCon(as, dir2);
+
+ unsigned short nr = src[ai2*2];
+ if (nr != 0 && nr != r)
+ ar = nr;
+ }
+ }
+ }
+ if (ar != 0)
+ {
+ src[ci*2] = 0;
+ continue;
+ }
+ count++;
+
+ // Expand neighbours.
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(cs, dir) != 0xf)
+ {
+ const int ax = cx + rcGetDirOffsetX(dir);
+ const int ay = cy + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(cs, dir);
+ if (chf.spans[ai].dist >= lev)
+ {
+ if (src[ai*2] == 0)
+ {
+ src[ai*2] = r;
+ src[ai*2+1] = 0;
+ stack.push(ax);
+ stack.push(ay);
+ stack.push(ai);
+ }
+ }
+ }
+ }
+ }
+
+ return count > 0;
+}
+
+static unsigned short* expandRegions(int maxIter, unsigned short level,
+ rcCompactHeightfield& chf,
+ unsigned short* src,
+ unsigned short* dst,
+ rcIntArray& stack)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ // Find cells revealed by the raised level.
+ stack.resize(0);
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (chf.spans[i].dist >= level && src[i*2] == 0)
+ {
+ stack.push(x);
+ stack.push(y);
+ stack.push(i);
+ }
+ }
+ }
+ }
+
+ int iter = 0;
+ while (stack.size() > 0)
+ {
+ int failed = 0;
+
+ memcpy(dst, src, sizeof(unsigned short)*chf.spanCount*2);
+
+ for (int j = 0; j < stack.size(); j += 3)
+ {
+ int x = stack[j+0];
+ int y = stack[j+1];
+ int i = stack[j+2];
+ if (i < 0)
+ {
+ failed++;
+ continue;
+ }
+
+ unsigned short r = src[i*2];
+ unsigned short d2 = 0xffff;
+ const rcCompactSpan& s = chf.spans[i];
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (rcGetCon(s, dir) == 0xf) continue;
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*w].index + rcGetCon(s, dir);
+ if (src[ai*2] > 0 && (src[ai*2] & RC_BORDER_REG) == 0)
+ {
+ if ((int)src[ai*2+1]+2 < (int)d2)
+ {
+ r = src[ai*2];
+ d2 = src[ai*2+1]+2;
+ }
+ }
+ }
+ if (r)
+ {
+ stack[j+2] = -1; // mark as used
+ dst[i*2] = r;
+ dst[i*2+1] = d2;
+ }
+ else
+ {
+ failed++;
+ }
+ }
+
+ // rcSwap source and dest.
+ rcSwap(src, dst);
+
+ if (failed*3 == stack.size())
+ break;
+
+ if (level > 0)
+ {
+ ++iter;
+ if (iter >= maxIter)
+ break;
+ }
+ }
+
+ return src;
+}
+
+
+struct rcRegion
+{
+ inline rcRegion() : count(0), id(0), remap(false) {}
+
+ int count;
+ unsigned short id;
+ bool remap;
+ rcIntArray connections;
+ rcIntArray floors;
+};
+
+static void removeAdjacentNeighbours(rcRegion& reg)
+{
+ // Remove adjacent duplicates.
+ for (int i = 0; i < reg.connections.size() && reg.connections.size() > 1; )
+ {
+ int ni = (i+1) % reg.connections.size();
+ if (reg.connections[i] == reg.connections[ni])
+ {
+ // Remove duplicate
+ for (int j = i; j < reg.connections.size()-1; ++j)
+ reg.connections[j] = reg.connections[j+1];
+ reg.connections.pop();
+ }
+ else
+ ++i;
+ }
+}
+
+static void replaceNeighbour(rcRegion& reg, unsigned short oldId, unsigned short newId)
+{
+ bool neiChanged = false;
+ for (int i = 0; i < reg.connections.size(); ++i)
+ {
+ if (reg.connections[i] == oldId)
+ {
+ reg.connections[i] = newId;
+ neiChanged = true;
+ }
+ }
+ for (int i = 0; i < reg.floors.size(); ++i)
+ {
+ if (reg.floors[i] == oldId)
+ reg.floors[i] = newId;
+ }
+ if (neiChanged)
+ removeAdjacentNeighbours(reg);
+}
+
+static bool canMergeWithRegion(rcRegion& reg, unsigned short id)
+{
+ int n = 0;
+ for (int i = 0; i < reg.connections.size(); ++i)
+ {
+ if (reg.connections[i] == id)
+ n++;
+ }
+ if (n > 1)
+ return false;
+ for (int i = 0; i < reg.floors.size(); ++i)
+ {
+ if (reg.floors[i] == id)
+ return false;
+ }
+ return true;
+}
+
+static void addUniqueFloorRegion(rcRegion& reg, unsigned short n)
+{
+ for (int i = 0; i < reg.floors.size(); ++i)
+ if (reg.floors[i] == n)
+ return;
+ reg.floors.push(n);
+}
+
+static bool mergeRegions(rcRegion& rega, rcRegion& regb)
+{
+ unsigned short aid = rega.id;
+ unsigned short bid = regb.id;
+
+ // Duplicate current neighbourhood.
+ rcIntArray acon;
+ acon.resize(rega.connections.size());
+ for (int i = 0; i < rega.connections.size(); ++i)
+ acon[i] = rega.connections[i];
+ rcIntArray& bcon = regb.connections;
+
+ // Find insertion point on A.
+ int insa = -1;
+ for (int i = 0; i < acon.size(); ++i)
+ {
+ if (acon[i] == bid)
+ {
+ insa = i;
+ break;
+ }
+ }
+ if (insa == -1)
+ return false;
+
+ // Find insertion point on B.
+ int insb = -1;
+ for (int i = 0; i < bcon.size(); ++i)
+ {
+ if (bcon[i] == aid)
+ {
+ insb = i;
+ break;
+ }
+ }
+ if (insb == -1)
+ return false;
+
+ // Merge neighbours.
+ rega.connections.resize(0);
+ for (int i = 0, ni = acon.size(); i < ni-1; ++i)
+ rega.connections.push(acon[(insa+1+i) % ni]);
+
+ for (int i = 0, ni = bcon.size(); i < ni-1; ++i)
+ rega.connections.push(bcon[(insb+1+i) % ni]);
+
+ removeAdjacentNeighbours(rega);
+
+ for (int j = 0; j < regb.floors.size(); ++j)
+ addUniqueFloorRegion(rega, regb.floors[j]);
+ rega.count += regb.count;
+ regb.count = 0;
+ regb.connections.resize(0);
+
+ return true;
+}
+
+static bool isRegionConnectedToBorder(const rcRegion& reg)
+{
+ // Region is connected to border if
+ // one of the neighbours is null id.
+ for (int i = 0; i < reg.connections.size(); ++i)
+ {
+ if (reg.connections[i] == 0)
+ return true;
+ }
+ return false;
+}
+
+static bool isSolidEdge(rcCompactHeightfield& chf, unsigned short* src,
+ int x, int y, int i, int dir)
+{
+ const rcCompactSpan& s = chf.spans[i];
+ unsigned short r = 0;
+ if (rcGetCon(s, dir) != 0xf)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir);
+ r = src[ai*2];
+ }
+ if (r == src[i*2])
+ return false;
+ return true;
+}
+
+static void walkContour(int x, int y, int i, int dir,
+ rcCompactHeightfield& chf,
+ unsigned short* src,
+ rcIntArray& cont)
+{
+ int startDir = dir;
+ int starti = i;
+
+ const rcCompactSpan& ss = chf.spans[i];
+ unsigned short curReg = 0;
+ if (rcGetCon(ss, dir) != 0xf)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(ss, dir);
+ curReg = src[ai*2];
+ }
+ cont.push(curReg);
+
+ int iter = 0;
+ while (++iter < 40000)
+ {
+ const rcCompactSpan& s = chf.spans[i];
+
+ if (isSolidEdge(chf, src, x, y, i, dir))
+ {
+ // Choose the edge corner
+ unsigned short r = 0;
+ if (rcGetCon(s, dir) != 0xf)
+ {
+ const int ax = x + rcGetDirOffsetX(dir);
+ const int ay = y + rcGetDirOffsetY(dir);
+ const int ai = (int)chf.cells[ax+ay*chf.width].index + rcGetCon(s, dir);
+ r = src[ai*2];
+ }
+ if (r != curReg)
+ {
+ curReg = r;
+ cont.push(curReg);
+ }
+
+ dir = (dir+1) & 0x3; // Rotate CW
+ }
+ else
+ {
+ int ni = -1;
+ const int nx = x + rcGetDirOffsetX(dir);
+ const int ny = y + rcGetDirOffsetY(dir);
+ if (rcGetCon(s, dir) != 0xf)
+ {
+ const rcCompactCell& nc = chf.cells[nx+ny*chf.width];
+ ni = (int)nc.index + rcGetCon(s, dir);
+ }
+ if (ni == -1)
+ {
+ // Should not happen.
+ return;
+ }
+ x = nx;
+ y = ny;
+ i = ni;
+ dir = (dir+3) & 0x3; // Rotate CCW
+ }
+
+ if (starti == i && startDir == dir)
+ {
+ break;
+ }
+ }
+
+ // Remove adjacent duplicates.
+ if (cont.size() > 1)
+ {
+ for (int i = 0; i < cont.size(); )
+ {
+ int ni = (i+1) % cont.size();
+ if (cont[i] == cont[ni])
+ {
+ for (int j = i; j < cont.size()-1; ++j)
+ cont[j] = cont[j+1];
+ cont.pop();
+ }
+ else
+ ++i;
+ }
+ }
+}
+
+static bool filterSmallRegions(int minRegionSize, int mergeRegionSize,
+ unsigned short& maxRegionId,
+ rcCompactHeightfield& chf,
+ unsigned short* src)
+{
+ const int w = chf.width;
+ const int h = chf.height;
+
+ int nreg = maxRegionId+1;
+ rcRegion* regions = new rcRegion[nreg];
+ if (!regions)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "filterSmallRegions: Out of memory 'regions' (%d).", nreg);
+ return false;
+ }
+
+ for (int i = 0; i < nreg; ++i)
+ regions[i].id = (unsigned short)i;
+
+ // Find edge of a region and find connections around the contour.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ unsigned short r = src[i*2];
+ if (r == 0 || r >= nreg)
+ continue;
+
+ rcRegion& reg = regions[r];
+ reg.count++;
+
+
+ // Update floors.
+ for (int j = (int)c.index; j < ni; ++j)
+ {
+ if (i == j) continue;
+ unsigned short floorId = src[j*2];
+ if (floorId == 0 || floorId >= nreg)
+ continue;
+ addUniqueFloorRegion(reg, floorId);
+ }
+
+ // Have found contour
+ if (reg.connections.size() > 0)
+ continue;
+
+ // Check if this cell is next to a border.
+ int ndir = -1;
+ for (int dir = 0; dir < 4; ++dir)
+ {
+ if (isSolidEdge(chf, src, x, y, i, dir))
+ {
+ ndir = dir;
+ break;
+ }
+ }
+
+ if (ndir != -1)
+ {
+ // The cell is at border.
+ // Walk around the contour to find all the neighbours.
+ walkContour(x, y, i, ndir, chf, src, reg.connections);
+ }
+ }
+ }
+ }
+
+ // Remove too small unconnected regions.
+ for (int i = 0; i < nreg; ++i)
+ {
+ rcRegion& reg = regions[i];
+ if (reg.id == 0 || (reg.id & RC_BORDER_REG))
+ continue;
+ if (reg.count == 0)
+ continue;
+
+ if (reg.connections.size() == 1 && reg.connections[0] == 0)
+ {
+ if (reg.count < minRegionSize)
+ {
+ // Non-connected small region, remove.
+ reg.count = 0;
+ reg.id = 0;
+ }
+ }
+ }
+
+
+ // Merge too small regions to neighbour regions.
+ int mergeCount = 0 ;
+ do
+ {
+ mergeCount = 0;
+ for (int i = 0; i < nreg; ++i)
+ {
+ rcRegion& reg = regions[i];
+ if (reg.id == 0 || (reg.id & RC_BORDER_REG))
+ continue;
+ if (reg.count == 0)
+ continue;
+
+ // Check to see if the region should be merged.
+ if (reg.count > mergeRegionSize && isRegionConnectedToBorder(reg))
+ continue;
+
+ // Small region with more than 1 connection.
+ // Or region which is not connected to a border at all.
+ // Find smallest neighbour region that connects to this one.
+ int smallest = 0xfffffff;
+ unsigned short mergeId = reg.id;
+ for (int j = 0; j < reg.connections.size(); ++j)
+ {
+ if (reg.connections[j] & RC_BORDER_REG) continue;
+ rcRegion& mreg = regions[reg.connections[j]];
+ if (mreg.id == 0 || (mreg.id & RC_BORDER_REG)) continue;
+ if (mreg.count < smallest &&
+ canMergeWithRegion(reg, mreg.id) &&
+ canMergeWithRegion(mreg, reg.id))
+ {
+ smallest = mreg.count;
+ mergeId = mreg.id;
+ }
+ }
+ // Found new id.
+ if (mergeId != reg.id)
+ {
+ unsigned short oldId = reg.id;
+ rcRegion& target = regions[mergeId];
+
+ // Merge neighbours.
+ if (mergeRegions(target, reg))
+ {
+ // Fixup regions pointing to current region.
+ for (int j = 0; j < nreg; ++j)
+ {
+ if (regions[j].id == 0 || (regions[j].id & RC_BORDER_REG)) continue;
+ // If another region was already merged into current region
+ // change the nid of the previous region too.
+ if (regions[j].id == oldId)
+ regions[j].id = mergeId;
+ // Replace the current region with the new one if the
+ // current regions is neighbour.
+ replaceNeighbour(regions[j], oldId, mergeId);
+ }
+ mergeCount++;
+ }
+ }
+ }
+ }
+ while (mergeCount > 0);
+
+ // Compress region Ids.
+ for (int i = 0; i < nreg; ++i)
+ {
+ regions[i].remap = false;
+ if (regions[i].id == 0) continue; // Skip nil regions.
+ if (regions[i].id & RC_BORDER_REG) continue; // Skip external regions.
+ regions[i].remap = true;
+ }
+
+ unsigned short regIdGen = 0;
+ for (int i = 0; i < nreg; ++i)
+ {
+ if (!regions[i].remap)
+ continue;
+ unsigned short oldId = regions[i].id;
+ unsigned short newId = ++regIdGen;
+ for (int j = i; j < nreg; ++j)
+ {
+ if (regions[j].id == oldId)
+ {
+ regions[j].id = newId;
+ regions[j].remap = false;
+ }
+ }
+ }
+ maxRegionId = regIdGen;
+
+ // Remap regions.
+ for (int i = 0; i < chf.spanCount; ++i)
+ {
+ if ((src[i*2] & RC_BORDER_REG) == 0)
+ src[i*2] = regions[src[i*2]].id;
+ }
+
+ delete [] regions;
+
+ return true;
+}
+
+bool rcBuildDistanceField(rcCompactHeightfield& chf)
+{
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ unsigned short* dist0 = new unsigned short[chf.spanCount];
+ if (!dist0)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildDistanceField: Out of memory 'dist0' (%d).", chf.spanCount);
+ return false;
+ }
+ unsigned short* dist1 = new unsigned short[chf.spanCount];
+ if (!dist1)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildDistanceField: Out of memory 'dist1' (%d).", chf.spanCount);
+ delete [] dist0;
+ return false;
+ }
+
+ unsigned short* src = dist0;
+ unsigned short* dst = dist1;
+
+ unsigned short maxDist = 0;
+
+ rcTimeVal distStartTime = rcGetPerformanceTimer();
+
+ if (calculateDistanceField(chf, src, dst, maxDist) != src)
+ rcSwap(src, dst);
+
+ chf.maxDistance = maxDist;
+
+ rcTimeVal distEndTime = rcGetPerformanceTimer();
+
+ rcTimeVal blurStartTime = rcGetPerformanceTimer();
+
+ // Blur
+ if (boxBlur(chf, 1, src, dst) != src)
+ rcSwap(src, dst);
+
+ // Store distance.
+ for (int i = 0; i < chf.spanCount; ++i)
+ chf.spans[i].dist = src[i];
+
+ rcTimeVal blurEndTime = rcGetPerformanceTimer();
+
+ delete [] dist0;
+ delete [] dist1;
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+/* if (rcGetLog())
+ {
+ rcGetLog()->log(RC_LOG_PROGRESS, "Build distance field: %.3f ms", rcGetDeltaTimeUsec(startTime, endTime)/1000.0f);
+ rcGetLog()->log(RC_LOG_PROGRESS, " - dist: %.3f ms", rcGetDeltaTimeUsec(distStartTime, distEndTime)/1000.0f);
+ rcGetLog()->log(RC_LOG_PROGRESS, " - blur: %.3f ms", rcGetDeltaTimeUsec(blurStartTime, blurEndTime)/1000.0f);
+ }*/
+ if (rcGetBuildTimes())
+ {
+ rcGetBuildTimes()->buildDistanceField += rcGetDeltaTimeUsec(startTime, endTime);
+ rcGetBuildTimes()->buildDistanceFieldDist += rcGetDeltaTimeUsec(distStartTime, distEndTime);
+ rcGetBuildTimes()->buildDistanceFieldBlur += rcGetDeltaTimeUsec(blurStartTime, blurEndTime);
+ }
+
+ return true;
+}
+
+static void paintRectRegion(int minx, int maxx, int miny, int maxy,
+ unsigned short regId, unsigned short minLevel,
+ rcCompactHeightfield& chf, unsigned short* src)
+{
+ const int w = chf.width;
+ for (int y = miny; y < maxy; ++y)
+ {
+ for (int x = minx; x < maxx; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (chf.spans[i].dist >= minLevel)
+ src[i*2] = regId;
+ }
+ }
+ }
+}
+
+bool rcBuildRegions(rcCompactHeightfield& chf,
+ int walkableRadius, int borderSize,
+ int minRegionSize, int mergeRegionSize)
+{
+ rcTimeVal startTime = rcGetPerformanceTimer();
+
+ const int w = chf.width;
+ const int h = chf.height;
+
+ unsigned short* tmp1 = new unsigned short[chf.spanCount*2];
+ if (!tmp1)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildDistanceField: Out of memory 'tmp1' (%d).", chf.spanCount*2);
+ return false;
+ }
+ unsigned short* tmp2 = new unsigned short[chf.spanCount*2];
+ if (!tmp2)
+ {
+ if (rcGetLog())
+ rcGetLog()->log(RC_LOG_ERROR, "rcBuildDistanceField: Out of memory 'tmp2' (%d).", chf.spanCount*2);
+ delete [] tmp1;
+ return false;
+ }
+
+ rcTimeVal regStartTime = rcGetPerformanceTimer();
+
+ rcIntArray stack(1024);
+ rcIntArray visited(1024);
+
+ unsigned short* src = tmp1;
+ unsigned short* dst = tmp2;
+
+ memset(src, 0, sizeof(unsigned short) * chf.spanCount*2);
+
+ unsigned short regionId = 1;
+ unsigned short level = (chf.maxDistance+1) & ~1;
+
+ unsigned short minLevel = (unsigned short)(walkableRadius*2);
+
+ const int expandIters = 4 + walkableRadius * 2;
+
+ // Mark border regions.
+ paintRectRegion(0, borderSize, 0, h, regionId|RC_BORDER_REG, minLevel, chf, src); regionId++;
+ paintRectRegion(w-borderSize, w, 0, h, regionId|RC_BORDER_REG, minLevel, chf, src); regionId++;
+ paintRectRegion(0, w, 0, borderSize, regionId|RC_BORDER_REG, minLevel, chf, src); regionId++;
+ paintRectRegion(0, w, h-borderSize, h, regionId|RC_BORDER_REG, minLevel, chf, src); regionId++;
+
+ rcTimeVal expTime = 0;
+ rcTimeVal floodTime = 0;
+
+ while (level > minLevel)
+ {
+ level = level >= 2 ? level-2 : 0;
+
+ rcTimeVal expStartTime = rcGetPerformanceTimer();
+
+ // Expand current regions until no empty connected cells found.
+ if (expandRegions(expandIters, level, chf, src, dst, stack) != src)
+ rcSwap(src, dst);
+
+ expTime += rcGetPerformanceTimer() - expStartTime;
+
+ rcTimeVal floodStartTime = rcGetPerformanceTimer();
+
+ // Mark new regions with IDs.
+ for (int y = 0; y < h; ++y)
+ {
+ for (int x = 0; x < w; ++x)
+ {
+ const rcCompactCell& c = chf.cells[x+y*w];
+ for (int i = (int)c.index, ni = (int)(c.index+c.count); i < ni; ++i)
+ {
+ if (chf.spans[i].dist < level || src[i*2] != 0)
+ continue;
+
+ if (floodRegion(x, y, i, minLevel, level, regionId, chf, src, stack))
+ regionId++;
+ }
+ }
+ }
+
+ floodTime += rcGetPerformanceTimer() - floodStartTime;
+
+ }
+
+ // Expand current regions until no empty connected cells found.
+ if (expandRegions(expandIters*8, minLevel, chf, src, dst, stack) != src)
+ rcSwap(src, dst);
+
+ rcTimeVal regEndTime = rcGetPerformanceTimer();
+
+ rcTimeVal filterStartTime = rcGetPerformanceTimer();
+
+ // Filter out small regions.
+ chf.maxRegions = regionId;
+ if (!filterSmallRegions(minRegionSize, mergeRegionSize, chf.maxRegions, chf, src))
+ return false;
+
+ rcTimeVal filterEndTime = rcGetPerformanceTimer();
+
+ // Write the result out.
+ for (int i = 0; i < chf.spanCount; ++i)
+ chf.spans[i].reg = src[i*2];
+
+ delete [] tmp1;
+ delete [] tmp2;
+
+ rcTimeVal endTime = rcGetPerformanceTimer();
+
+/* if (rcGetLog())
+ {
+ rcGetLog()->log(RC_LOG_PROGRESS, "Build regions: %.3f ms", rcGetDeltaTimeUsec(startTime, endTime)/1000.0f);
+ rcGetLog()->log(RC_LOG_PROGRESS, " - reg: %.3f ms", rcGetDeltaTimeUsec(regStartTime, regEndTime)/1000.0f);
+ rcGetLog()->log(RC_LOG_PROGRESS, " - exp: %.3f ms", rcGetDeltaTimeUsec(0, expTime)/1000.0f);
+ rcGetLog()->log(RC_LOG_PROGRESS, " - flood: %.3f ms", rcGetDeltaTimeUsec(0, floodTime)/1000.0f);
+ rcGetLog()->log(RC_LOG_PROGRESS, " - filter: %.3f ms", rcGetDeltaTimeUsec(filterStartTime, filterEndTime)/1000.0f);
+ }
+*/
+ if (rcGetBuildTimes())
+ {
+ rcGetBuildTimes()->buildRegions += rcGetDeltaTimeUsec(startTime, endTime);
+ rcGetBuildTimes()->buildRegionsReg += rcGetDeltaTimeUsec(regStartTime, regEndTime);
+ rcGetBuildTimes()->buildRegionsExp += rcGetDeltaTimeUsec(0, expTime);
+ rcGetBuildTimes()->buildRegionsFlood += rcGetDeltaTimeUsec(0, floodTime);
+ rcGetBuildTimes()->buildRegionsFilter += rcGetDeltaTimeUsec(filterStartTime, filterEndTime);
+ }
+
+ return true;
+}
+
+
diff --git a/extern/recastnavigation/Recast/Source/RecastTimer.cpp b/extern/recastnavigation/Recast/Source/RecastTimer.cpp
new file mode 100644
index 00000000000..51ffb7d3160
--- /dev/null
+++ b/extern/recastnavigation/Recast/Source/RecastTimer.cpp
@@ -0,0 +1,58 @@
+#include "RecastTimer.h"
+
+#if defined(WIN32)
+
+// Win32
+#include <windows.h>
+
+rcTimeVal rcGetPerformanceTimer()
+{
+ __int64 count;
+ QueryPerformanceCounter((LARGE_INTEGER*)&count);
+ return count;
+}
+
+int rcGetDeltaTimeUsec(rcTimeVal start, rcTimeVal end)
+{
+ static __int64 freq = 0;
+ if (freq == 0)
+ QueryPerformanceFrequency((LARGE_INTEGER*)&freq);
+ __int64 elapsed = end - start;
+ return (int)(elapsed*1000000 / freq);
+}
+
+#elif defined(__MACH__)
+
+// OSX
+#include <mach/mach_time.h>
+
+rcTimeVal rcGetPerformanceTimer()
+{
+ return mach_absolute_time();
+}
+
+int rcGetDeltaTimeUsec(rcTimeVal start, rcTimeVal end)
+{
+ static mach_timebase_info_data_t timebaseInfo;
+ if (timebaseInfo.denom == 0)
+ mach_timebase_info(&timebaseInfo);
+ uint64_t elapsed = end - start;
+ uint64_t nanosec = elapsed * timebaseInfo.numer / timebaseInfo.denom;
+ return (int)(nanosec / 1000);
+}
+
+#else
+
+// TODO: Linux, etc
+
+rcTimeVal rcGetPerformanceTimer()
+{
+ return 0;
+}
+
+int rcGetDeltaTimeUsec(rcTimeVal start, rcTimeVal end)
+{
+ return 0;
+}
+
+#endif \ No newline at end of file
diff --git a/extern/recastnavigation/SConscript b/extern/recastnavigation/SConscript
new file mode 100644
index 00000000000..2c15e518eb1
--- /dev/null
+++ b/extern/recastnavigation/SConscript
@@ -0,0 +1,12 @@
+#!/usr/bin/python
+
+Import('env')
+
+sources = env.Glob('Recast/Source/*.cpp') + env.Glob('Detour/Source/*.cpp')
+sources += ['recast-capi.cpp']
+
+incs = 'Recast/Include Detour/Include'
+
+env.BlenderLib ( 'extern_recastnavigation', sources, Split(incs), [],
+ libtype=['extern','player'],
+ priority=[10,185])
diff --git a/extern/recastnavigation/recast-capi.cpp b/extern/recastnavigation/recast-capi.cpp
new file mode 100644
index 00000000000..52c4cdc90ed
--- /dev/null
+++ b/extern/recastnavigation/recast-capi.cpp
@@ -0,0 +1,37 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "recast-capi.h"
+
+#include <math.h>
+#include "Recast.h"
+
+int recast_buildMeshAdjacency(unsigned short* polys, const int npolys,
+ const int nverts, const int vertsPerPoly)
+{
+ return (int) buildMeshAdjacency(polys, npolys, nverts, vertsPerPoly);
+}
diff --git a/source/blender/blenkernel/BKE_endian.h b/extern/recastnavigation/recast-capi.h
index 5647645e990..0d20fdf9981 100644
--- a/source/blender/blenkernel/BKE_endian.h
+++ b/extern/recastnavigation/recast-capi.h
@@ -17,34 +17,26 @@
* 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.
+ * The Original Code is Copyright (C) 2011 Blender Foundation.
* All rights reserved.
*
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
+ * Contributor(s): Sergey Sharybin
*
* ***** END GPL LICENSE BLOCK *****
- * Are we little or big endian? From Harbison&Steele.
*/
-#ifndef BKE_ENDIAN_H
-#define BKE_ENDIAN_H
-/** \file BKE_endian.h
- * \ingroup bke
- */
+#ifndef RECAST_C_API_H
+#define RECAST_C_API_H
-/**
- * BKE_ENDIANNESS(a) returns 1 if big endian and returns 0 if little endian
- */
-#define BKE_ENDIANNESS(a) { \
- union { \
- intptr_t l; \
- char c[sizeof (intptr_t)]; \
- } u; \
- u.l = 1; \
- a = (u.c[sizeof (intptr_t) - 1] == 1) ? 1 : 0; \
-}
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int recast_buildMeshAdjacency(unsigned short* polys, const int npolys,
+ const int nverts, const int vertsPerPoly);
+#ifdef __cplusplus
+}
#endif
+#endif // RECAST_C_API_H
diff --git a/intern/audaspace/intern/AUD_ConverterReader.cpp b/intern/audaspace/intern/AUD_ConverterReader.cpp
index b3d669379f8..7665f276c0a 100644
--- a/intern/audaspace/intern/AUD_ConverterReader.cpp
+++ b/intern/audaspace/intern/AUD_ConverterReader.cpp
@@ -36,9 +36,6 @@ AUD_ConverterReader::AUD_ConverterReader(AUD_Reference<AUD_IReader> reader,
AUD_EffectReader(reader),
m_format(specs.format)
{
- int bigendian = 1;
- bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian
-
switch(m_format)
{
case AUD_FORMAT_U8:
@@ -48,10 +45,11 @@ AUD_ConverterReader::AUD_ConverterReader(AUD_Reference<AUD_IReader> reader,
m_convert = AUD_convert_float_s16;
break;
case AUD_FORMAT_S24:
- if(bigendian)
- m_convert = AUD_convert_float_s24_be;
- else
- m_convert = AUD_convert_float_s24_le;
+#ifdef __BIG_ENDIAN__
+ m_convert = AUD_convert_float_s24_be;
+#else
+ m_convert = AUD_convert_float_s24_le;
+#endif
break;
case AUD_FORMAT_S32:
m_convert = AUD_convert_float_s32;
diff --git a/intern/audaspace/intern/AUD_JOSResampleReader.cpp b/intern/audaspace/intern/AUD_JOSResampleReader.cpp
index 8da3d55acae..82b784a43bf 100644
--- a/intern/audaspace/intern/AUD_JOSResampleReader.cpp
+++ b/intern/audaspace/intern/AUD_JOSResampleReader.cpp
@@ -118,7 +118,8 @@ void AUD_JOSResampleReader::updateBuffer(int size, double factor, int samplesize
{\
sample_t* buf = m_buffer.getBuffer();\
\
- int P, l, end, channel, i;\
+ unsigned int P, l;\
+ int end, channel, i;\
double eta, v, f_increment, factor;\
\
m_sums.assureSize(m_channels * sizeof(double));\
@@ -222,7 +223,7 @@ void AUD_JOSResampleReader::updateBuffer(int size, double factor, int samplesize
\
for(channel = 0; channel < m_channels; channel++)\
{\
- *buffer = f_increment / m_L * sums[channel];\
+ *buffer = factor * sums[channel];\
buffer++;\
}\
}\
@@ -230,7 +231,7 @@ void AUD_JOSResampleReader::updateBuffer(int size, double factor, int samplesize
m_P += fmod(1.0 / factor, 1.0);\
m_n += floor(1.0 / factor);\
\
- if(m_P >= 1.0)\
+ while(m_P >= 1.0)\
{\
m_P -= 1.0;\
m_n++;\
@@ -364,9 +365,9 @@ void AUD_JOSResampleReader::read(int& length, bool& eos, sample_t* buffer)
double factor = AUD_MIN(target_factor, m_last_factor);
if(factor >= 1)
- len = (m_n - m_cache_valid) + int(ceil(length / factor)) + ceil(num_samples);
+ len = (int(m_n) - m_cache_valid) + int(ceil(length / factor)) + ceil(num_samples);
else
- len = (m_n - m_cache_valid) + int(ceil(length / factor) + ceil(num_samples / factor));
+ len = (int(m_n) - m_cache_valid) + int(ceil(length / factor) + ceil(num_samples / factor));
if(len > 0)
{
diff --git a/intern/audaspace/intern/AUD_Mixer.cpp b/intern/audaspace/intern/AUD_Mixer.cpp
index 74ff180627a..caeeac8d43c 100644
--- a/intern/audaspace/intern/AUD_Mixer.cpp
+++ b/intern/audaspace/intern/AUD_Mixer.cpp
@@ -37,9 +37,6 @@
AUD_Mixer::AUD_Mixer(AUD_DeviceSpecs specs) :
m_specs(specs)
{
- int bigendian = 1;
- bigendian = (((char*)&bigendian)[0]) ? 0: 1; // 1 if Big Endian
-
switch(m_specs.format)
{
case AUD_FORMAT_U8:
@@ -49,10 +46,12 @@ AUD_Mixer::AUD_Mixer(AUD_DeviceSpecs specs) :
m_convert = AUD_convert_float_s16;
break;
case AUD_FORMAT_S24:
- if(bigendian)
- m_convert = AUD_convert_float_s24_be;
- else
- m_convert = AUD_convert_float_s24_le;
+
+#ifdef __BIG_ENDIAN__
+ m_convert = AUD_convert_float_s24_be;
+#else
+ m_convert = AUD_convert_float_s24_le;
+#endif
break;
case AUD_FORMAT_S32:
m_convert = AUD_convert_float_s32;
diff --git a/intern/audaspace/intern/AUD_SequencerHandle.cpp b/intern/audaspace/intern/AUD_SequencerHandle.cpp
index c9cf46ccdc3..87f5eb29d70 100644
--- a/intern/audaspace/intern/AUD_SequencerHandle.cpp
+++ b/intern/audaspace/intern/AUD_SequencerHandle.cpp
@@ -66,7 +66,7 @@ void AUD_SequencerHandle::stop()
m_handle->stop();
}
-void AUD_SequencerHandle::update(float position, float frame)
+void AUD_SequencerHandle::update(float position, float frame, float fps)
{
if(!m_handle.isNull())
{
@@ -132,7 +132,7 @@ void AUD_SequencerHandle::update(float position, float frame)
m_3dhandle->setSourceLocation(v);
m_entry->m_location.read(frame + 1, v2.get());
v2 -= v;
- m_3dhandle->setSourceVelocity(v2);
+ m_3dhandle->setSourceVelocity(v2 * fps);
if(m_entry->m_muted)
m_handle->setVolume(0);
diff --git a/intern/audaspace/intern/AUD_SequencerHandle.h b/intern/audaspace/intern/AUD_SequencerHandle.h
index 9703d2b0059..ab86bf49b0f 100644
--- a/intern/audaspace/intern/AUD_SequencerHandle.h
+++ b/intern/audaspace/intern/AUD_SequencerHandle.h
@@ -94,8 +94,9 @@ public:
* Updates the handle for playback.
* \param position The current time during playback.
* \param frame The current frame during playback.
+ * \param fps The animation frames per second.
*/
- void update(float position, float frame);
+ void update(float position, float frame, float fps);
/**
* Seeks the handle to a specific time position.
diff --git a/intern/audaspace/intern/AUD_SequencerReader.cpp b/intern/audaspace/intern/AUD_SequencerReader.cpp
index 0b8a400a97b..c468de19580 100644
--- a/intern/audaspace/intern/AUD_SequencerReader.cpp
+++ b/intern/audaspace/intern/AUD_SequencerReader.cpp
@@ -162,7 +162,7 @@ void AUD_SequencerReader::read(int& length, bool& eos, sample_t* buffer)
for(AUD_HandleIterator it = m_handles.begin(); it != m_handles.end(); it++)
{
- (*it)->update(time, frame);
+ (*it)->update(time, frame, m_factory->m_fps);
}
m_factory->m_volume.read(frame, &volume);
@@ -174,7 +174,7 @@ void AUD_SequencerReader::read(int& length, bool& eos, sample_t* buffer)
m_device.setListenerLocation(v);
m_factory->m_location.read(frame + 1, v2.get());
v2 -= v;
- m_device.setListenerVelocity(v2);
+ m_device.setListenerVelocity(v2 * m_factory->m_fps);
m_device.read(reinterpret_cast<data_t*>(buffer + specs.channels * pos), len);
diff --git a/intern/elbeem/CMakeLists.txt b/intern/elbeem/CMakeLists.txt
index 7a842a29b98..718c6ddd161 100644
--- a/intern/elbeem/CMakeLists.txt
+++ b/intern/elbeem/CMakeLists.txt
@@ -89,13 +89,28 @@ set(SRC
intern/utilities.h
)
-add_definitions(-DNOGUI -DELBEEM_BLENDER=1)
+add_definitions(
+ -DNOGUI
+ -DELBEEM_BLENDER=1
+)
+
+# not essential but quiet gcc's -Wundef
+add_definitions(
+ -DLBM_PRECISION=1
+ -DLBM_INCLUDE_TESTSOLVERS=0
+ -DFSGR_STRICT_DEBUG=0
+ -DELBEEM_MPI=0
+ -DNEWDIRVELMOTEST=0
+)
+
if(WINDOWS)
add_definitions(-DUSE_MSVC6FIXES)
endif()
if(WITH_OPENMP)
add_definitions(-DPARALLEL=1)
+else()
+ add_definitions(-DPARALLEL=0)
endif()
blender_add_lib_nolist(bf_intern_elbeem "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp
index a24ccc3ff6c..c2e6f278c6b 100644
--- a/intern/ghost/intern/GHOST_NDOFManager.cpp
+++ b/intern/ghost/intern/GHOST_NDOFManager.cpp
@@ -366,11 +366,11 @@ void GHOST_NDOFManager::setDeadZone(float dz)
}
else if (dz > 0.5f) {
// warn the rogue user/programmer, but allow it
- printf("ndof: dead zone of %.2f is rather high...\n", dz);
+ GHOST_PRINTF("ndof: dead zone of %.2f is rather high...\n", dz);
}
m_deadZone = dz;
- printf("ndof: dead zone set to %.2f\n", dz);
+ GHOST_PRINTF("ndof: dead zone set to %.2f\n", dz);
}
static bool atHomePosition(GHOST_TEventNDOFMotionData* ndof)
diff --git a/intern/guardedalloc/MEM_sys_types.h b/intern/guardedalloc/MEM_sys_types.h
index 48230db23a3..4debb32b5c4 100644
--- a/intern/guardedalloc/MEM_sys_types.h
+++ b/intern/guardedalloc/MEM_sys_types.h
@@ -98,7 +98,8 @@ typedef unsigned long uintptr_t;
#include <inttypes.h>
#elif defined(FREE_WINDOWS)
-
+/* define htoln here, there must be a syntax error in winsock2.h in MinGW */
+unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
#include <stdint.h>
#else
@@ -109,12 +110,14 @@ typedef unsigned long uintptr_t;
#endif /* ifdef platform for types */
#ifdef _WIN32
+#ifndef FREE_WINDOWS
#ifndef htonl
#define htonl(x) correctByteOrder(x)
#endif
#ifndef ntohl
#define ntohl(x) correctByteOrder(x)
#endif
+#endif
#elif defined (__FreeBSD__) || defined (__OpenBSD__)
#include <sys/param.h>
#elif defined (__APPLE__)
diff --git a/intern/guardedalloc/intern/mallocn.c b/intern/guardedalloc/intern/mallocn.c
index 2421c25398a..c3ff851f3bc 100644
--- a/intern/guardedalloc/intern/mallocn.c
+++ b/intern/guardedalloc/intern/mallocn.c
@@ -124,10 +124,10 @@ static const char *check_memlist(MemHead *memh);
/* locally used defines */
/* --------------------------------------------------------------------- */
-#if defined( __sgi) || defined (__sun) || defined (__sun__) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || (defined (__APPLE__) && !defined(__LITTLE_ENDIAN__))
-#define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
+#ifdef __BIG_ENDIAN__
+# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
#else
-#define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
+# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
#endif
#define MEMTAG1 MAKE_ID('M', 'E', 'M', 'O')
diff --git a/intern/itasc/kdl/frames.hpp b/intern/itasc/kdl/frames.hpp
index 01213f91d5a..2a1ed3296f9 100644
--- a/intern/itasc/kdl/frames.hpp
+++ b/intern/itasc/kdl/frames.hpp
@@ -299,7 +299,7 @@ public:
double data[9];
inline Rotation() {
- *this = Rotation::Identity();
+ *this = Identity();
}
inline Rotation(double Xx,double Yx,double Zx,
double Xy,double Yy,double Zy,
diff --git a/intern/opennl/CMakeLists.txt b/intern/opennl/CMakeLists.txt
index 55b0bc5855f..7d6a579819e 100644
--- a/intern/opennl/CMakeLists.txt
+++ b/intern/opennl/CMakeLists.txt
@@ -31,6 +31,13 @@ remove_strict_flags()
# and debug gives a lot of prints on UV unwrapping. developers can enable if they need to.
remove_flag("-DDEBUG")
+
+# quiet compiler warnings about undefined defines
+add_definitions(
+ -DDEBUGlevel=0
+ -DPRNTlevel=0
+)
+
set(INC
extern
superlu
diff --git a/intern/smoke/CMakeLists.txt b/intern/smoke/CMakeLists.txt
index 094d398a83c..6e1d3eb0ab4 100644
--- a/intern/smoke/CMakeLists.txt
+++ b/intern/smoke/CMakeLists.txt
@@ -83,12 +83,17 @@ set(SRC
intern/tnt/tnt_version.h
)
+# quiet -Wundef
+add_definitions(-DDDF_DEBUG=0)
+
if(WITH_OPENMP)
add_definitions(-DPARALLEL=1)
+else()
+ add_definitions(-DPARALLEL=0)
endif()
if(WITH_FFTW3)
- add_definitions(-DFFTW3=1)
+ add_definitions(-DWITH_FFTW3)
list(APPEND INC
${FFTW3_INCLUDE_DIRS}
)
diff --git a/intern/smoke/SConscript b/intern/smoke/SConscript
index fa32c5f36c3..0511257d319 100644
--- a/intern/smoke/SConscript
+++ b/intern/smoke/SConscript
@@ -16,7 +16,7 @@ incs += ' ' + env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC']
incs += ' intern ../../extern/bullet2/src ../memutil ../guardealloc '
if env['WITH_BF_FFTW3']:
- defs += ' FFTW3=1'
+ defs += ' WITH_FFTW3'
incs += env['BF_FFTW3_INC']
env.BlenderLib ('bf_intern_smoke', sources, Split(incs), Split(defs), libtype=['intern'], priority=[40] )
diff --git a/intern/smoke/intern/FFT_NOISE.h b/intern/smoke/intern/FFT_NOISE.h
index b0597d7b20c..a087b4e1391 100644
--- a/intern/smoke/intern/FFT_NOISE.h
+++ b/intern/smoke/intern/FFT_NOISE.h
@@ -25,7 +25,7 @@
#ifndef FFT_NOISE_H_
#define FFT_NOISE_H_
-#if FFTW3==1
+#ifdef WITH_FFTW3
#include <iostream>
#include <fftw3.h>
#include <MERSENNETWISTER.h>
diff --git a/intern/smoke/intern/WTURBULENCE.cpp b/intern/smoke/intern/WTURBULENCE.cpp
index 9934e3017cf..cd18cf7b344 100644
--- a/intern/smoke/intern/WTURBULENCE.cpp
+++ b/intern/smoke/intern/WTURBULENCE.cpp
@@ -155,7 +155,7 @@ void WTURBULENCE::setNoise(int type)
if(type == (1<<1)) // FFT
{
// needs fft
- #if FFTW3==1
+ #ifdef WITH_FFTW3
std::string noiseTileFilename = std::string("noise.fft");
generatTile_FFT(_noiseTile, noiseTileFilename);
#endif
diff --git a/intern/string/intern/STR_String.cpp b/intern/string/intern/STR_String.cpp
index 071f34e0ef9..ba097ba6046 100644
--- a/intern/string/intern/STR_String.cpp
+++ b/intern/string/intern/STR_String.cpp
@@ -45,7 +45,7 @@
#include <ctype.h>
#include <string.h>
#if defined(__sun__) || defined( __sun ) || defined (__sparc) || defined (__sparc__) || defined (_AIX)
-#include <strings.h>
+# include <strings.h>
#endif
#include "STR_String.h"
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 00000000000..4c791dd9369
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,222 @@
+release/scripts/modules/rna_prop_ui.py
+
+release/scripts/startup/bl_operators/animsys_update.py
+release/scripts/startup/bl_operators/object.py
+release/scripts/startup/bl_operators/object_align.py
+release/scripts/startup/bl_operators/object_quick_effects.py
+release/scripts/startup/bl_operators/object_randomize_transform.py
+release/scripts/startup/bl_operators/presets.py
+release/scripts/startup/bl_operators/screen_play_rendered_anim.py
+release/scripts/startup/bl_operators/sequencer.py
+release/scripts/startup/bl_operators/wm.py
+
+release/scripts/startup/bl_ui/properties_animviz.py
+release/scripts/startup/bl_ui/properties_data_armature.py
+release/scripts/startup/bl_ui/properties_data_bone.py
+release/scripts/startup/bl_ui/properties_data_camera.py
+release/scripts/startup/bl_ui/properties_data_curve.py
+release/scripts/startup/bl_ui/properties_data_empty.py
+release/scripts/startup/bl_ui/properties_data_lamp.py
+release/scripts/startup/bl_ui/properties_data_lattice.py
+release/scripts/startup/bl_ui/properties_data_mesh.py
+release/scripts/startup/bl_ui/properties_data_metaball.py
+release/scripts/startup/bl_ui/properties_data_modifier.py
+release/scripts/startup/bl_ui/properties_game.py
+release/scripts/startup/bl_ui/properties_material.py
+release/scripts/startup/bl_ui/properties_object_constraint.py
+release/scripts/startup/bl_ui/properties_object.py
+release/scripts/startup/bl_ui/properties_particle.py
+release/scripts/startup/bl_ui/properties_physics_cloth.py
+release/scripts/startup/bl_ui/properties_physics_common.py
+release/scripts/startup/bl_ui/properties_physics_field.py
+release/scripts/startup/bl_ui/properties_physics_fluid.py
+release/scripts/startup/bl_ui/properties_physics_smoke.py
+release/scripts/startup/bl_ui/properties_physics_softbody.py
+release/scripts/startup/bl_ui/properties_render.py
+release/scripts/startup/bl_ui/properties_scene.py
+release/scripts/startup/bl_ui/properties_texture.py
+release/scripts/startup/bl_ui/properties_world.py
+
+release/scripts/startup/bl_ui/space_console.py
+release/scripts/startup/bl_ui/space_dopesheet.py
+release/scripts/startup/bl_ui/space_graph.py
+release/scripts/startup/bl_ui/space_image.py
+release/scripts/startup/bl_ui/space_info.py
+release/scripts/startup/bl_ui/space_logic.py
+release/scripts/startup/bl_ui/space_nla.py
+release/scripts/startup/bl_ui/space_node.py
+release/scripts/startup/bl_ui/space_outliner.py
+release/scripts/startup/bl_ui/space_sequencer.py
+release/scripts/startup/bl_ui/space_text.py
+release/scripts/startup/bl_ui/space_time.py
+release/scripts/startup/bl_ui/space_userpref.py
+release/scripts/startup/bl_ui/space_userpref_keymap.py
+release/scripts/startup/bl_ui/space_view3d.py
+release/scripts/startup/bl_ui/space_view3d_toolbar.py
+
+source/blender/editors/animation/anim_channels_edit.c
+source/blender/editors/animation/anim_markers.c
+source/blender/editors/animation/anim_ops.c
+source/blender/editors/animation/drivers.c
+source/blender/editors/animation/keyframing.c
+source/blender/editors/animation/keyingsets.c
+
+source/blender/editors/armature/armature_ops.c
+source/blender/editors/armature/editarmature.c
+source/blender/editors/armature/editarmature_sketch.c
+source/blender/editors/armature/poselib.c
+source/blender/editors/armature/poseobject.c
+source/blender/editors/armature/poseSlide.c
+
+source/blender/editors/curve/editcurve.c
+source/blender/editors/curve/editfont.c
+
+source/blender/editors/gpencil/gpencil_paint.c
+
+source/blender/editors/interface/interface_layout.c
+source/blender/editors/interface/interface_ops.c
+source/blender/editors/interface/interface_regions.c
+source/blender/editors/interface/interface_templates.c
+source/blender/editors/interface/interface_utils.c
+source/blender/editors/interface/view2d_ops.c
+
+source/blender/editors/mesh/editmesh.c
+source/blender/editors/mesh/editmesh_add.c
+source/blender/editors/mesh/editmesh_loop.c
+source/blender/editors/mesh/editmesh_mods.c
+source/blender/editors/mesh/editmesh_tools.c
+source/blender/editors/mesh/loopcut.c
+source/blender/editors/mesh/mesh_data.c
+source/blender/editors/mesh/mesh_ops.c
+
+source/blender/editors/metaball/mball_edit.c
+
+source/blender/editors/object/object_add.c
+source/blender/editors/object/object_constraint.c
+source/blender/editors/object/object_edit.c
+source/blender/editors/object/object_group.c
+source/blender/editors/object/object_lattice.c
+source/blender/editors/object/object_modifier.c
+source/blender/editors/object/object_ops.c
+source/blender/editors/object/object_relations.c
+source/blender/editors/object/object_select.c
+source/blender/editors/object/object_shapekey.c
+source/blender/editors/object/object_transform.c
+source/blender/editors/object/object_vgroup.c
+
+source/blender/editors/physics/particle_edit.c
+source/blender/editors/physics/particle_object.c
+source/blender/editors/physics/physics_pointcache.c
+
+source/blender/editors/render/render_internal.c
+source/blender/editors/render/render_opengl.c
+source/blender/editors/render/render_shading.c
+source/blender/editors/render/render_view.c
+
+source/blender/editors/screen/area.c
+source/blender/editors/screen/screendump.c
+source/blender/editors/screen/screen_ops.c
+
+source/blender/editors/sculpt_paint/paint_ops.c
+source/blender/editors/sculpt_paint/paint_image.c
+source/blender/editors/sculpt_paint/paint_utils.c
+source/blender/editors/sculpt_paint/paint_vertex.c
+source/blender/editors/sculpt_paint/sculpt.c
+
+source/blender/editors/sound/sound_ops.c
+
+source/blender/editors/space_action/action_edit.c
+source/blender/editors/space_action/action_ops.c
+source/blender/editors/space_action/action_select.c
+
+source/blender/editors/space_buttons/buttons_header.c
+source/blender/editors/space_buttons/buttons_ops.c
+
+source/blender/editors/space_console/console_ops.c
+
+source/blender/editors/space_file/file_draw.c
+source/blender/editors/space_file/file_ops.c
+source/blender/editors/space_file/file_panels.c
+
+source/blender/editors/space_graph/graph_buttons.c
+source/blender/editors/space_graph/graph_edit.c
+source/blender/editors/space_graph/graph_ops.c
+source/blender/editors/space_graph/graph_select.c
+
+source/blender/editors/space_image/image_buttons.c
+source/blender/editors/space_image/image_ops.c
+
+source/blender/editors/space_info/info_ops.c
+source/blender/editors/space_info/info_report.c
+source/blender/editors/space_info/space_info.c
+
+source/blender/editors/space_logic/logic_buttons.c
+
+source/blender/editors/space_nla/nla_buttons.c
+source/blender/editors/space_nla/nla_channels.c
+source/blender/editors/space_nla/nla_edit.c
+source/blender/editors/space_nla/nla_select.c
+
+source/blender/editors/space_node/node_buttons.c
+source/blender/editors/space_node/node_edit.c
+source/blender/editors/space_node/node_header.c
+source/blender/editors/space_node/node_ops.c
+source/blender/editors/space_node/node_select.c
+source/blender/editors/space_node/node_state.c
+
+source/blender/editors/space_script/script_edit.c
+
+source/blender/editors/space_sequencer/sequencer_add.c
+source/blender/editors/space_sequencer/sequencer_buttons.c
+source/blender/editors/space_sequencer/sequencer_edit.c
+source/blender/editors/space_sequencer/sequencer_select.c
+
+source/blender/editors/space_text/text_header.c
+source/blender/editors/space_text/text_ops.c
+source/blender/editors/space_time/time_ops.c
+
+source/blender/editors/space_view3d/view3d_buttons.c
+source/blender/editors/space_view3d/view3d_draw.c
+source/blender/editors/space_view3d/view3d_edit.c
+source/blender/editors/space_view3d/view3d_fly.c
+source/blender/editors/space_view3d/view3d_header.c
+source/blender/editors/space_view3d/view3d_select.c
+source/blender/editors/space_view3d/view3d_view.c
+source/blender/editors/space_view3d/view3d_toolbar.c
+
+source/blender/editors/transform/transform.c
+source/blender/editors/transform/transform_ops.c
+source/blender/editors/transform/transform_orientations.c
+
+source/blender/editors/util/undo.c
+
+source/blender/editors/uvedit/uvedit_ops.c
+source/blender/editors/uvedit/uvedit_unwrap_ops.c
+
+source/blender/makesrna/intern/rna_ID.c
+source/blender/makesrna/intern/rna_action.c
+source/blender/makesrna/intern/rna_color.c
+source/blender/makesrna/intern/rna_constraint.c
+source/blender/makesrna/intern/rna_curve.c
+source/blender/makesrna/intern/rna_fcurve.c
+source/blender/makesrna/intern/rna_material.c
+source/blender/makesrna/intern/rna_mesh.c
+source/blender/makesrna/intern/rna_modifier.c
+source/blender/makesrna/intern/rna_object.c
+source/blender/makesrna/intern/rna_object_force.c
+source/blender/makesrna/intern/rna_particle.c
+source/blender/makesrna/intern/rna_render.c
+source/blender/makesrna/intern/rna_scene.c
+source/blender/makesrna/intern/rna_space.c
+source/blender/makesrna/intern/rna_texture.c
+source/blender/makesrna/intern/rna_ui_api.c
+source/blender/makesrna/intern/rna_userdef.c
+source/blender/makesrna/intern/rna_wm.c
+source/blender/makesrna/intern/rna_wm_api.c
+source/blender/makesrna/intern/rna_world.c
+
+source/blender/windowmanager/intern/wm_files.c
+source/blender/windowmanager/intern/wm_operators.c
+source/blender/windowmanager/intern/wm_window.c
+
+
diff --git a/po/messages.txt b/po/messages.txt
new file mode 100644
index 00000000000..b491061cdc4
--- /dev/null
+++ b/po/messages.txt
@@ -0,0 +1,5433 @@
+The edited object
+Bezier curve point with two handles defining a Keyframe on an F-Curve
+Max Climb
+Media Stop
+System & OpenGL
+Strips Selected
+Active Keying Set
+Action Blending
+Bone is able to be selected
+Defines where the color of the environment light comes from
+Display files as short list
+Build 75% proxy resolution
+Right Mouse
+Cubic Catmull-Rom
+Particle system can be edited in particle mode
+UV editor data for the image editor space
+Editing hair
+Zoom using opposite direction
+Graph Editor space data
+Create obstacle
+Tiles
+Align newly added objects to the world coordinates
+Index of custom color set
+Sample point for F-Curve
+AVI Raw
+Linear Drag
+Color to display the marker with
+Channels Region
+Lower bound of envelope at this control-point
+Fluid
+Regions this area is subdivided in
+Double Click
+Disable simulation of linear motion along the X axis
+Sequencer OpenGL
+Child particles generated by the particle system
+Point in a shape key for curves
+Lock to Bone
+Sun Size
+Set modifier expanded in the user interface
+Multiple Scattering
+ID Name
+Steering
+Animation Visualisation
+Keyed States
+Fixed size vertex indices array
+Normal Size
+Track To
+Time since last access of a GL texture in seconds after which it is freed. (Set to 0 to keep textures allocated.)
+Collection of keymaps
+Texture datablocks
+Number of vertical pixels in the screen
+Fluid Simulation
+Zooms in and out like scaling the view, mouse movements relative to center
+Lattice Edit
+Snap onto its self (editmode)
+Only render what's in front of the solid z values
+True when multiple enums
+Backdrop Zoom
+Causes mesh data to be duplicated with the object
+Automatic
+Small Caps
+UV Project
+UV Sync Selection
+Cloth dynamics for hair
+File Browser Main
+Sensitivity
+Amount of rotation around side vector
+Specify how many frames the Map Old will last
+Start Still
+Unique datablock ID name
+Active pose marker for this Action
+Draw Channels
+Smoothens emitted smoke to avoid blockiness
+Tool Settings
+Text Line
+Bone Constraints
+Toggle whether the material is linked to object data or the object block
+Falloff power for transmissivity filter effect (1.0 is linear)
+Only use case sensitive matches of search string
+Screw
+Region Text
+Representation of alpha information in the RGBA pixels
+Edges receive a drag force from surrounding media
+Sequence Transform
+Over Drop
+Domain Settings
+New F-Curve Colors - XYZ to RGB
+Space that owner is evaluated in
+Frame Step
+Enumeration
+Value of the item
+Parent of this pose bone
+B-Bone Z size
+Up Arrow
+For reactor systems, the object that has the target particle system (empty if same object)
+Shift key pressed
+Auto Refresh
+Bone Color Sets
+Positive values make strands rounder, negative makes strands spiky
+Collection of images
+Show actuators of active object
+interpolate a global timestamp using the record date and time written by recording device
+Main Lattices
+Variable from some source/target for driver relationship
+Z Location
+Auto-Clamped handle selected color
+Fixed Alternate
+Game engine sensor to detect events
+Include the frame number in image metadata
+Bone does not deform any geometry
+UV Textures
+Game
+Minimal Spring length * Ball Size
+16384
+Line in which the marker is located
+Offset X
+Rasterized cell height
+Edge Threshold
+-Z
+Set audio channels to mono
+Jump Speed
+HuffYUV
+Active Bone
+View3D Fly Modal
+Sets the audio channel count
+Rotation Damping
+Max Air Acceleration
+Snap center onto target
+Spring Damping
+Compact with Milliseconds
+Maintain speed, flight level or wander
+Interpolation type
+Type Info
+SIMD QBVH
+active
+Armature
+Match case
+16 Bit
+XZY Rotation Order. Prone to Gimbal Lock
+Auto handle selected color
+Theme File Browser
+Bake the normals in object space
+Enable color range used for weight visualization in weight painting mode
+Vorticity
+Open window
+Shows sensors for this object in the user interface
+Radius of head of bone (for Envelope deform only)
+Plain diffuse energy (white.)
+Elasticity
+Cache Step
+View Sliders
+Hair
+Filter Movies
+Material datablock used by this material slot
+Smooth Emitter
+Catalan (Català)
+RVO (cells)
+Home
+Action Mouse
+Show Debug Info
+Loads a saved environment map image from disk
+is_baking
+Scene datablocks
+Wire
+Group
+On Land
+Group Objects
+Time Step
+Keep UI
+Bone inherits rotation or scale from parent bone
+Show Selected Object
+Theme settings for the Outliner
+Time of key over the simulation
+Header Text
+Health
+Similar to SMPTE (Compact), except that instead of frames, milliseconds are shown instead
+Blender Original
+Deliver texture UV pass
+Index number of the vertex
+Stepped Interpolation
+Adds diagonal springs on 4-gons
+Shear
+Tent
+Strength of force field
+Space that target is evaluated in
+F11
+Star
+Library datablocks
+Line Input
+Lighten
+In Range
+Use Blender units for widths instead of pixels
+F17
+Node Socket
+Quad-Buffer
+Sets scaling for the texture's X, Y and Z sizes
+F14
+Motion Path settings for animation visualisation
+Make hairs longer
+Set audio sample format to 32 bit float
+Amount of anti-aliasing samples per pixel
+type
+Use optimized Bullet DBVT tree for view frustum and occlusion culling
+Make this surface a closed loop in the V direction
+Alpha Over
+Media player for video & png/jpeg/sgi image sequences
+Second input for the effect strip
+Space Logic Editor
+Snap during transform
+Edit Methods
+Left Handle
+B-Bone Ease Out
+Cyclic Offset
+Subtype
+Object Base
+Vertex Group Clump
+Letterbox
+Set audio channels to 7.1 surround sound
+V
+Quaternion (WXYZ)
+Image File
+Preset configs for external animation players
+Maximum Value
+Make this nurbs curve or surface act like a Bezier spline in the U direction (Order U must be 3 or 4, Cyclic U must be disabled)
+uk_UA
+3x3 bone matrix
+Vertex Weight
+Display Material
+Use a custom transform orientation
+GLSL Shaders
+Text
+Deliver shadow pass
+From node
+Keyframes
+Main Brushes
+Deliver diffuse pass
+Header
+Level detector, trigger controllers of new states(only applicable upon logic state transition)
+Collision Compound
+Increment
+Trackball
+Active Strip
+Initial Rest Length
+User defined layer of string text values
+Edge Tag Mode
+Invert tilt Axis
+Deliver emission pass
+Face Selected
+Xor
+Voronoi Crackle
+Align the transformation axes to the window
+Line sample
+Default Goal (vertex target position) value, when no Vertex Group used
+Type of raytrace accelerator structure
+Area Spaces
+Project individual elements on the surface of other objects
+Use the angle between two bones
+Aero
+Zmask
+Set audio sample format to 32 bit signed integer
+Scene render size
+Multiplier to convert blender units to physical distance
+Free Image Textures
+Metaball datablocks
+DPI
+Fill in Z values for solid faces in invisible layers, for masking
+Active Action for this datablock
+Use turntable style rotation in the viewport
+Format
+Use a Catmull-Rom filter for anti-aliasing
+Link material to object or the object's data
+Type of participation in the fluid simulation
+face normal
+Enable
+Final 4x4 matrix after constraints and drivers are applied (object space)
+Diameter of widget, in 10 pixel units
+ID Property
+Radius of tail of bone (for Envelope deform only)
+Custom Shape Transform
+Action FCurves
+Envelope Deform Weight
+A
+Renders star shaped lines over halo
+Fade-out Color
+Syntax Built-in
+Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC)
+Camera datablocks
+Bounding Box Center
+Middle Mouse
+Framerate base
+Touch
+Vortex
+Manipulator Size
+F-Curve Colors - XYZ to RGB
+Invert Output
+Calculate heights against unsubdivided low resolution mesh
+Shrinkwrap
+Window Deactivate
+Y position of the sequence strip
+The frame on which this sketch appears
+Snap to increments of grid
+Rest Length
+All
+Serbian (áрÿÑÂúþü јÃµÃ·Ã¸ÃºÑƒ)
+Sample Method
+Text Anti-aliasing
+Only allows given density value in emitter area
+Sequencer Preview Shading
+Lower field first
+File Name
+Show timing in seconds not frames
+Display the object as wire edges
+Billboard with Z-axis constraint
+Curves
+Displays clock frequency of fullscreen display
+X Rotation
+Sphere
+Select UVs that share mesh vertex, irrespective if they are in the same location
+8 bit RAW
+0.5 means no distance at all, 1.0 is maximum distance
+Sequencer
+Max Ghost Range
+An object instance in a scene
+User Interface
+Alt
+Vertex group name
+PNG
+Animated Selected
+Blue
+Damping of the spring force, when inside the physics distance area
+Plugin Strip
+Hide
+Pose Matrix
+Guide-free time from particle life's end
+Frame is being edited (painted on)
+Large Cursors
+Limit Rotation
+Draw only faces with the currently displayed image assigned
+Record Run
+Pixel width over which the reconstruction filter combines samples
+Global Scene
+Defines the structure of the header in the UI
+Source List Text Highlight
+User-editable keyframes
+Scaling factor for action
+Inner
+Active Constraint
+Side-by-side
+Right Arrow
+Causes the 1 to 0 keys to act as the numpad (useful for laptops)
+A collection of pose channels, including settings for animating bones
+Lennard-Jones
+Use a maximum radial distance for the field to work
+Location of tail end of the bone relative to armature
+Edit All
+estimate matrix .. split to COM , ROT ,SCALE
+Use Coordinates
+Theme User Preferences
+Show line numbers next to the text
+Minimum speed in air (relative to maximum speed)
+Display keymap datablocks
+,
+Display Summary
+Channel Driver (only set for Driver F-Curves)
+Item
+In/Out Node
+Frame that modifier's influence ends (if Restrict Frame Range is in use)
+Premultiplied
+Number of frames cached
+Description of the Struct's purpose
+Tilt in 3D View
+Show Debug
+Offsets image horizontally from the world origin
+region_data
+Protect layer from further editing and/or frame changes
+File Format
+Retarget roll mode
+IK rot control
+Upper bound of envelope at this control-point
+Interaction Radius
+Syntax String
+Vertex group to control density
+Show Overexposed
+Vertices
+Kerning Style
+IK X Minimum
+Sets the factor by which the flare is larger than the halo
+Absolute ball size or factor if not manual adjusted
+Blend Opacity
+Steps
+Texture
+Settings for the visualisation of motion
+Group of vertices, used for armature deform and other purposes
+Limit Distance
+Minus
+No interpolation, fast but blocky and low quality
+Control
+Full SMPTE timecode. Format is HH:MM:SS:FF
+Open On Mouse Over
+Show sensors of active object
+Frame Server Port
+Noise patterns will remain unchanged, faster and suitable for stills
+Start
+RLE (lossless)
+True when the property is not saved in presets
+Images are rendered in new Window
+Theme Timeline
+If this is set, the header gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is "OBJECT_HT_hello", and bl_idname is not set by the script, then bl_idname = "OBJECT_HT_hello"
+The color that rays with no intersection within the Max Distance take (material color can be best for indoor scenes, sky color for outdoor)
+Show Cursor
+Goal Default
+Shape Key Point
+Object Origin Size
+Orthographic
+Invert y axis
+Unit Scale
+Collection of points for Bezier curves only
+Mouse
+Pivot Point
+UV Layer to control billboard splitting
+Only insert keyframes where they're needed in the relevant F-Curves
+IK Z Minimum
+Distance
+Key rotation quaternion
+Backscattered light
+Texture effector weight
+Volume rendering settings for a Material datablock
+Which output node to use, for node-based textures
+Handle 1 selection status
+Always render a still frame from the voxel data sequence
+Factor
++Z
+Numpad 4
+Type
+Action Groups
+Styles
+rv
+Recast data for a Game datablock
+Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method)
+Description of the property for tooltips
+Area in a subdivided screen, containing an editor
+IK Z Maximum
+Effect fader position
+Particle System to render as points
+Vertex Group Size Negate
+Simplify Subdivision
+Warp
+3D View center is locked to this bone's position
+Enable cluster collision between soft and rigid body
+04 - Theme Color Set
+Lamps
+Color Picker Type
+Location of the hair key in its internal coordinate system, relative to the emitting face
+Properties Space
+The view mode to use for displaying sequencer output
+Hold
+Prefetch Frames
+Pose Tail Position
+Amount of pixels to extend the baked result with, as post process filter
+Dummy
+Deliver full combined RGBA buffer
+Long Key Selected
+Extension
+Complete Matches Only
+Lines
+The external source data file to use
+The time (in minutes) to wait between automatic temporary saves
+Undo Memory Size
+Type of event mapping
+Animation Data
+Unique node identifier
+Draw white edges
+Show Menus
+W
+Inverse Kinematics
+Number of times a map will be rendered recursively (mirror effects.)
+Face Mask
+Density is calculated as a factor of default density (depends on particle size)
+Soft
+Use a maximum distance for the field to work
+Has IK
+Power of Fresnel for transparency (Ray or ZTransp)
+Name of PoseBone to use as target
+Display files as thumbnails
+Transparency blending mode
+Multiple Engines
+Bits
+Active Boid Rule Index
+Child Of
+Metric
+Proxy size 100%
+Module name
+Visible
+NLA Strip references some Action
+Average screen dimension of stars
+Converter Node
+Mirror
+Method of calculating aerodynamic interaction
+Curl
+Main Objects
+Only include channels relating to selected objects and data
+Set audio mixing buffer size to 256 samples
+Bake normals
+Uses direction of strands as normal for tangent-shading
+Textbox Width
+Pose
+Plasticity
+Object scale factor
+Boid effector weight
+Mass Vertex Group
+Fight
+Adjust the offset to the beginning/end
+Bone Solid
+NLA Strip representing a sound event for speakers
+Maximum contour edge length
+Build free run time code index using Record Date/Time
+End frame displayed in the sequence editor after offsets are applied
+NLA Strip acts as a container for adjacent strips
+Offsets image vertically from the world origin
+Block anything else from using the cursor
+Inverse Lift
+Maximum for slider
+Mode of automatic keyframe insertion for Objects and Bones (default setting used for new Scenes)
+Render Solid faces in this Layer
+Vertex Weight Edit
+Rotation style in the viewport
+Active Vertex Color Index
+Show the active object's smoke cache
+Action Extrapolation
+Resolution X
+Mesh
+Progress Bar Widget Colors
+Lock editing of rotation in the interface
+Draw faces over the image
+Press
+Weight Color Range
+Collection of vertex colors
+Thickness of strokes (in pixels)
+Resolution V
+Particle Target
+Object duplicate transformation matrix
+Luma
+Blend Out
+B
+B-Bone X size
+Anti-Aliasing Level
+Handle Vertex Size
+IK Lin Weight
+Negative
+End Still
+Y Offset
+Edge
+Amount of stickness to surface collision
+Bone Matrix
+Randomizes ring dimension and line location
+Velocity
+Respect the frame rate rather than rendering as many frames as possible
+Distance to the view location
+High res
+Object to take point data from
+Falloff type for proportional editing mode
+Region width
+Border Minimum Y
+Flash Video
+Active Section
+Channel defining pose data for a bone in a Pose
+Smoothed high quality interpolation, but slower
+Sets the audio sample rate
+Deliver raytraced refraction pass
+Land Personal Space
+Curve Splines
+Operating system key pressed
+14 - Theme Color Set
+Grease pencil data for this space
+Child particle interpolated from simulated or edited particles
+Editor header containing UI elements
+Select Head
+Catmull-Rom
+GLSL Nodes
+Make edges 'sail'
+Scattering
+Wire Select
+Unit
+Bezier Points
+Frame on which the simulation starts
+Animation Player
+Sequence Crop
+Autoname
+Dying
+Floor
+True when the property is hidden
+Cache Compression
+Keep Root
+Render Output Directory
+Multiple Caches
+External Shadows
+Points V
+Show Debug Properties
+White Level
+Framing Color
+Line Feed
+Logarithmic dissolve
+Circle
+Show movie files
+Maximum distance for the field to work
+Vertex Group Kink
+Enable anisotropic friction
+Use color management for GLSL rendering
+Exec Screen
+Render Layer
+Validity
+Show sensors of all selected objects
+Tessellation
+-
+F-Curve Modifier's effects will be tempered by a default factor
+Paths Type
+Cine-Scope 24fps 2048x858
+Use Mist
+Object Duplicate Matrix
+Repulsion force to apply on cloth when close to colliding
+Marker is temporary
+Collection of screens
+Lock X Axis
+Octree Resolution
+Control how much mist density decreases with height
+Custom Color Set
+Texture Context
+Active Vertex Group
+Disallow movement around the Y axis
+Edge Color
+Datablocks
+Channels of the image to draw
+2D Cursor
+Constant QMC
+Shape Key Curve Point
+Command output
+turbulence_strength
+Color used for active bones
+3D View center is locked to this object's position
+Vertex groups of the object
+Weights for the vertex groups this vertex is member of
+Invert Axes
+Euler Rotation
+Material to override all other materials in this render layer
+Tag Sharp
+Is part of an IK chain
+Output image in JPEG format
+Main Groups
+Slider Min
+Side
+Bone
+Square (HV + S)
+Transforms include effects of parenting/restpose and constraints
+Name of operator to call on input event
+Particle Speed
+Motion Blur
+Nurb V-lines
+Font size to use for displaying the text
+Tools
+Float
+Dynamic
+Scene
+Color curve mapping to use for displaying the image
+Set audio channels to 4 channels
+Free handle color
+16-bit Signed
+Active object for this scene
+Previous Angular Velocity
+Material Link To
+Solid Light
+Property Value
+Worldspace distance over which to blend in the surface normal
+NLA Strip is active
+Mini Axis Size
+Multiply direct lighting with ambient occlusion, darkening the result
+Moving things with a mouse drag confirms when releasing the button
+Show Render
+Camera this timeline sets to active
+Update Automatically
+Inwards component of the vortex force
+Edit texture nodes from Brush
+Current perspective matrix of the 3D region
+Opaque
+Goal (vertex target position) friction
+All rules are averaged
+Grease Pencil Stroke
+Display Object Info
+The maximum distance from which a boid can attack
+Curve interpolation at this point: Bezier or vector
+Both Z
+Textbox Y Offset
+Node group datablocks
+Ogg Theora
+Logic And
+Identifier of operator to call on input event
+Spaces contained in this area, the first being the active space. NOTE: Useful for example to restore a previously used 3d view space in a certain area to get the old view orientation
+Set audio channels to stereo
+Order V
+View & Controls
+Rec Run
+Upward spring force, when inside the physics distance area
+Mesh Texture Face Layer
+Transformation orientation
+Gives a radial field toward the center of object
+layout
+Extend
+Collision margin for soft body. Small value makes the algorithm unstable
+box radius
+Cache Index
+Free
+Inbetween Move
+Packed File
+Capsule
+UV projector used by the UV project modifier
+F-Curve Modifier has invalid settings and will not be evaluated
+Dopesheet
+Only Selected
+Replace Text
+Freq
+Sets maximum Y value for the render border
+Compositing nodes
+Waveform Opacity
+Layers that contain something
+Skip Save
+Same Types
+Include Missing NLA
+Level
+Free Unused Nodes
+Maximum distance to apply repulsion force, must be greater then minimum distance
+Display tooltips
+Hold RMB Open Toolbox Delay
+Random variation of friction
+Proportional Editing Falloff
+Object Modifiers
+Logic Xnor
+Move to center of neighbors and match their velocity
+Stretch or squeeze the viewport to fill the display window
+X
+Show frame numbers of Keyframes on Motion Paths
+Shaded
+Enhance the resolution of smoke by this factor using noise
+Backdrop
+Selected
+Refraction Exclude
+Enable bitmap text on face
+Button4 Mouse
+The direction that the OpenGL light is shining
+Images are rendered without forcing UI changes, optionally showing result
+A circular Hue/Saturation color wheel, with Value slider
+Input 3
+Input 2
+Input 1
+Engine to use for rendering
+Active UV Texture Index
+Include the render time in the stamp image
+Disabled
+Sets the amount mirror reflection for raytrace
+Game Object Settings
+Clear
+Max Physics Steps
+Find All
+3D View far clipping distance
+Activate or deactivate item
+Blobby element in a MetaBall datablock
+Only Render
+Radius of the agent
+Show Navigation Guide
+Default Colors
+Sets the dimension of the sub-flares, dots and circles
+Dynamic Friction
+fi_FI
+Viewpoint Object
+Display the object solid, lit with default OpenGL lights
+Use Global Coordinates
+Use the initial length as spring rest length instead of 2 * particle size
+Priority
+Render polygon transparent, depending on alpha channel of the texture
+Active File
+Manually determine the number of threads
+User Defined
+Vertex group to control clump
+Enable/Disable Constraint
+Object is detected by the Near and Radar sensor
+VBOs
+When false, this (sub)layout is greyed out
+Select Mouse
+The Drivers/Expressions for this datablock
+Individual Centers
+Enables automatic saving of preview images in the .blend file (Windows only)
+Shape key in a shape keys datablock
+Use left Mouse Button for selection
+Pivot around the 3D cursor
+Auto
+Registered
+Flares Sub
+Short List
+Sounds Directory
+Interpolate
+Game engine properties
+Allow drawing multiple strokes at a time with Grease Pencil
+Output image in (old!) SGI IRIS format
+Left Alt
+Sub Level Menu Open Delay
+Number of frames at start of strip to fade in influence
+Keyframe Points
+Noise algorithm - Voronoi F3: Returns distance to the 3rd closest feature point
+Display error text
+Vertex group for fine control over structural stiffness
+RNA Path (from ID-block) to property used
+Info
+User preferences space data
+C
+Emit Exclude
+Thumbnails
+Collision Sensor, detects static and dynamic objects but not the other collision sensor objects
+Lamp Sky Settings
+3D View center is locked to the cursor's position
+Manoeuvre to avoid collisions with other boids and deflector objects in near future
+Global gravity weight
+Curve or Surface subdivisions per segment
+The nominal number of game frames per second. Physics fixed timestep = 1/fps, independently of actual frame rate
+Back scattering (-1.0) to Forward scattering (1.0) and the range in between
+Library Path
+Calculate shadows while rendering
+Defines the strength of environment light
+Mux packet size (byte)
+Croatian (Hrvatski)
+Separate Colors
+Collider Friction
+Goal minimum, vertex group weights are scaled to match this range
+Gamma Cross
+Driver for the value of a setting based on an external value
+Unit System
+Highlight Line
+Constraint is the one being edited
+Draw F-Curves using Anti-Aliasing and other fancy effects. Disable for better performance
+Keying Set
+UV Local View
+Changing edges seam re-calculates UV unwrap
+View3D Move Modal
+Any Type
+Image Paint
+Set audio mixing buffer size to 16384 samples
+Creates turbulence with a noise field
+Active EditBone
+Brush
+Show only sensors connected to active states
+Disable simulation of angular motion along the Z axis
+3D View Generic
+Shape used as a relative key
+World Stars
+Use Environment Lighting
+X Location
+Auto Save Temporary Files
+Surface subdivisions per segment
+Output image in OpenEXR format
+Center
+Air has normally some thickness which slows falling things down
+Defines if the panel has to be open or collapsed at the time of its creation
+Parameters for the function
+Keep root keys unmodified
+Interpolate new particles from the existing ones
+Include visualization of Node related Animation data
+25%
+Sets the number of simulation substep per physic timestep, higher value give better physics precision
+Space in which transforms are used
+16x
+Sets the number of images of a movie to use
+Callback function defines for built-in Keying Sets
+20 - Theme Color Set
+How much heat effects smoke motion, higher value results in faster rising smoke
+Display when not linked to a visible states controller
+Collection of scenes
+256
+Smooth View
+Choose shading information to bake into the image
+Sets the number of star shaped lines rendered over the halo
+Textures
+Active spline
+Maximum bending stiffness value
+Eye Separation
+Window event timer
+Armature EditBones
+Game engine actuators to act on events
+End frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method)
+Quad Split
+Auto handles clamped to not overshoot
+How much the spring has to be stretched/compressed in order to change it's rest length
+Show Brush On Surface
+.
+Defines the structure of the panel in the UI
+Handle 2 selected
+Use lights for GLSL rendering
+Groups
+Textured
+Camera rotation in horizontal axis
+Blender RNA
+Type of ID-block that can be used
+Column number to show right margin at
+Game Soft Body Settings
+Activity Culling
+Local Space
+Sets the layer as active for rendering
+Rotate From Normal
+IK Y Lock
+Amount of influence constraint will have on the final solution
+The window relative horizontal location of the mouse
+Set audio mixing buffer size to 2048 samples
+Lighting Mode
+Object to use as projector transform
+Numpad -
+Location to store the proxy files
+Add directed noise to the density at render-time
+Physics Sub Steps
+Mesh Faces
+Apply on spline
+Armature Sketch
+Render Halos in this Layer (on top of Solid)
+Nla Strips
+Weight used by the Bevel modifier
+Color range used for weight visualization in weight painting mode
+Boid Rules
+Delay between repeated pulses(in logic tics, 0=no delay)
+Billboard Time Index UV
+Game Data
+IK X Limit
+Theora
+Hook
+Collection of materials
+Lifetime mapped as 0.0 - 1.0 intensity
+Property Editor
+Vorbis
+Allow Land
+Tip select mode
+Navigation Mesh
+Limit the texture size to save graphics memory
+Game engine user defined object property
+Sticky vertex selection disabled
+Display an isolated sub-set of objects, apart from the scene visibility
+Straight Alpha
+Wheel Out
+Sequence Proxy
+Text displayed and edited in this space
+Custom Object
+Numpad +
+Menu
+Active Point Cache Index
+Starting frame of the stored range
+Panel Style
+Emphasize position of keyframes on Motion Paths
+Libraries
+Restrict Frame Range
+Quadratic Drag
+Display X Axis
+Copy of the colors associated with the group's color set
+Use a Mitchell-Netravali filter for anti-aliasing
+ID of the item
+Marker selection state
+Good smoothness and speed
+Use Onion Skinning
+Draw type for drawing UV edges
+id
+Result strip replaces the accumulated results by amount specified by influence
+Transform Space
+Speed factor
+Collection of group sockets
+Highlight Keyframes
+Hide files/datablocks that start with a dot(.*)
+Use 3D transform manipulator
+Value of shape key at the current frame
+Python
+Save tiles for all RenderLayers and SceneNodes to files in the temp directory (saves memory, required for Full Sample)
+Perspective Matrix
+Meta strip stack, last is currently edited meta strip
+Noise algorithm - Voronoi F2: Returns distance to the 2nd closest feature point
+Auto Keyframe Insert Keying Set
+2D Cursor Location
+Vertex Weight Mix
+Group Index
+Add hairs
+Bake textures
+Crop to Border
+Initial boid health when born
+When rendering animations, save JPG preview images in same directory
+The number of grid lines to display in perspective view
+Worlds
+The distance between 3D View grid lines
+Vector font datablocks
+Tag Bevel
+Negate the effect of the kink vertex group
+Use viscoelastic springs instead of Hooke's springs
+Frameserver Port for Frameserver Rendering
+Shows actuators for this object in the user interface
+Show Info
+Grease Pencil Euclidean Distance
+Pixels moved by mouse per axis when drawing stroke
+Color balance parameters for a sequence strip
+Collision Quality
+Triple Buffer
+Face is used for shadow
+Include visualization of World related Animation data
+Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory
+Regular Widget Colors
+Y
+Bezier Curve Point
+To node
+Puff Mode
+Root
+Deliver Z values pass
+Coordinates of the control point
+Transforms don't include parenting/restpose or constraints
+Keying Set Path
+Friction force if a collision happened. (higher = less movement)
+Theme settings defining draw style and colors in the user interface
+MPEG-4(divx)
+Display reference images behind objects in the 3D View
+Collection of Node Links
+Follow Leader
+Hide objects on these layers when generating the Environment Map
+Line Number
+Fields per Frame
+Harmonic Damping
+Weight hair particles
+Use the Blender internal rendering engine for rendering
+Rotation/Scaling Pivot
+Minimum radial distance for the field's fall-off
+Duration
+Causes curve data to be duplicated with the object
+Absolute
+pt_BR
+Active Layer
+YCbCr (ITU 601)
+Average distance between any two stars
+Multitexture materials
+GLSL
+Current Scene
+How many keys to make new particles with
+Hide element
+Main Meshes
+Text character formatting settings
+Main Material
+Collection of object modifiers
+Maximal resolution used in the fluid domain
+Amount of light that gets emitted by the volume
+Grid
+Use For Growing Hair
+Parent edit bone (in same Armature)
+Use a column layout for toolbox
+Sort by time
+When transforming strips, changes to the animation data are flushed to other views
+Theme settings for widget color sets
+Inner Thickness
+Keying Set defines specific paths/settings to be keyframed (i.e. is not reliant on context info)
+Constant Jittered
+Weight to assign in vertex groups
+Bone Armature-Relative Matrix
+Rest length of the harmonic force
+user_preferences
+Gimbal
+Alpha Under
+RNA property definition
+YXZ Euler
+Use shadows for GLSL rendering
+IOR
+Gives the flare extra strength
+Editor menu containing buttons
+Right handle selection status
+Minimum Value
+Action referenced by this strip
+Display and edit the grease pencil freehand annotations overlay
+Path edit mode
+Smooth falloff
+Preferences related to viewing data
+Max Edge Error
+A square showing Hue/Value, with Saturation slider
+D
+Material slot in an object
+Set audio sample format to 8 bit unsigned integer
+User defined integer number value in an integer properties layer
+Output image to a frameserver
+Single Layer
+Radius of boids personal space in air (% of particle size)
+YCbCr (Jpeg)
+Length
+Specular
+Proportional Editing using connected geometry only
+Convex Hull
+Mid-range quality and speed
+Scale of the added turbulent noise
+Only use complete matches of search string
+Show Splash
+Wind
+Repulsion Force
+Method used to convert stroke to bones
+Show Pose Markers
+Frame on which the simulation stops
+Warp Data
+Key angular velocity
+select_start
+Show Linked to Controller
+Struct in which this struct is always nested, and to which it logically belongs
+Include a custom note in image metadata
+Log conversion gamma
+Transform Orientation
+Number of CPU threads to use simultaneously while rendering (for multi-core/CPU systems)
+Which style to use for font kerning
+Fall-Off
+Render voxels from a Blender smoke simulation
+Draw the points which make up the strokes (for debugging purposes)
+Frames
+Original image height
+Use face for collision and ray-sensor detection
+Around Frame
+Image Strip
+Bounding Box
+Device up/down directly controls your Z position
+The Runge-Kutta ODE solver error limit, low value gives more precision, high values speed
+Original image width
+Show Margin
+Transform Modal Map
+Stiff Quads
+System
+Spherical Panoramic
+Onion Skinning settings for animation visualisation
+KeyMap Items
+Valid
+MP2
+Handle 2 Type
+Italic
+Material Raytrace Mirror
+Object Grouped Active
+Use Frame Rate
+sv_SE
+Samples
+Name
+Material mode to use for rendering
+Cube
+Result color of the volume, after other light has been scattered/absorbed
+Use Min
+Display the center and axis during rotation
+Multiplier for intensity values
+Render Edge-enhance in this Layer (only works for Solid faces)
+Material datablocks
+/
+Arabic (العربية)
+Most compact representation. Uses '+' as separator for sub-second frame numbers, with left and right truncation of the timecode as necessary
+Filter 2D
+Lift
+Lighting for a World datablock
+External
+Collection of metaballs
+Sets the hardness of the halo
+General rotation damping
+Constraint name
+Hardness
+Syntax highlight for scripting
+Parameters and Settings for the Filebrowser
+Edit Path
+Rot Matrix
+Global Time
+Grease Pencil Manhattan Distance
+Grouping Method
+Lock view rotation in side views
+Effector Group
+Collection of armature edit bones
+Flare
+Control Point selected
+Freehand curves defining the sketch on this frame
+Make this nurbs surface act like a Bezier spline in the V direction (Order V must be 3 or 4, Cyclic V must be disabled)
+Operator
+Near
+Use the pinned context
+Display files as a detailed list
+On Selected Bones Only
+Has Reports
+Property
+Collection of related sketches
+Control point mass values
+Chance that the particle will pass through the mesh
+Sticky Selection Mode
+Font
+Key Modifier
+Clip
+Edit texture nodes from Object
+resolution_y
+Storage of an operator being executed, or registered after execution
+Image
+Density Scale
+Active Render Layer
+Space DopeSheet Editor
+Maximal
+Indirect Factor
+Pixel Filter
+Upper field first
+Static
+AVI
+Internal Friction
+Global Hair
+Level height
+Bake Specular colors
+DopeSheet space data
+Registered Optionally
+Causes actions to be duplicated with the object
+Enable collisions with other objects
+Theme settings for the Properties
+Region ID
+Strength
+Use nodes for GLSL rendering
+General Mass value
+Damping Factor
+Show Paint
+Weight of a particle dupliobject in a group
+Shows controllers for this object in the user interface
+Allow the use of colors indicating constraints/keyed status
+Target Object
+Texture Paint
+Defines how AO mixes with material shading
+Driver Variable
+Wrap words if there is not enough horizontal space
+Point in a shape key for Bezier curves
+Directory/name to save animations, # characters defines the position and length of frame numbers
+Follow Path
+Use a cubic filter for anti-aliasing
+Media First
+Use so the operator grabs the mouse focus, enables wrapping when continuous grab is enabled
+Draw Frames
+Length of rays, defines how far away other faces give occlusion effect
+Lock Scale
+Method of attenuating density by distance from the point
+8-bit Unsigned
+File Paths
+Point Source
+cs_CZ
+Pose Space
+Sort the file list alphabetically
+Provides an alternative access to loc/scale/rotation relative to the parent and own rest bone
+Collision Type
+Collection of node trees
+Occlusion Resolution
+Apply sun effect on sky
+Stamp Note Text
+Traditional Chinese (ç¹Â體中文)
+Scene layers included in this render layer
+Weight used by the Bevel modifier 'Only Vertices' option
+IK Y Stiffness
+The default directory to search for texture plugins
+Vertex Group Velocity Negate
+Modifiers
+Invoke Region Window
+Auto Perspective
+Module
+The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions
+Display Camera
+Subdivisions
+Blendfile Data
+Location of custom proxy file
+Solidify
+Do a full redraw each time, slow, only use for reference or when all else fails
+Horizon Spread
+06 - Theme Color Set
+Show a visualization of physics bounds and interactions
+Z
+Quick Cache
+Show Error
+Left
+Property that stores arbitrary, user defined properties
+UV 4
+Resolution %
+Scattering color
+UV 1
+UV 3
+UV 2
+Handle 2
+Display datablocks in visible layers
+Handle 1
+Left handle selection status
+Active Keying Set Index
+SMPTE (Full)
+Use textures to affect material properties
+Draw Modified Edges
+Maximum caused damage on attack per second
+Shape Key
+Enable file compression when saving .blend files
+Script datablocks (DEPRECATED)
+Frame rate for the screencast to be played back
+MPEG-1
+Use Sketching Sessions
+MP3
+Use ObColor instead of vertex colors
+Lock X Rotation Axis
+Envelope Tail Radius
+Causes armature data to be duplicated with the object
+The menu label
+Allow Flight
+Keyed timing
+Free Run (rec date)
+Use a 3D manipulator widget for controlling transforms
+Insert Keyframes - Only Needed
+Show handles of Bezier control points
+Bone is not visible when it is not in Edit Mode (i.e. in Object or Pose Modes)
+Inverse Quadratic
+ru_RU
+Use the value from some RNA property (Default)
+Calculate point velocities automatically
+Actions
+Modifiers affecting all the F-Curves in the referenced Action
+Enables automatic saving of preview images in the .blend file
+Animation Player Preset
+16 - Theme Color Set
+Vector handle color
+Proxy render size
+Clip Max X
+Clip Max Y
+Open in thumbnail view for images and movies
+Physics Engine
+Description
+Sort files by size
+Particle Cache
+Action Influence
+Envelope
+View Perspective
+IK X Maximum
+Boid States
+Display datablocks of selected objects
+Full Sample
+Animation data for datablock
+Channel
+Interpolation mode used for first keyframe on newly added F-Curves. Subsequent keyframes take interpolation from preceeding keyframe
+Order U
+Timecode
+Distance moved by mouse when drawing stroke (in pixels) to include
+Calculate radiosity in a pre-process before rendering
+Selected to Active
+For RGB curves, the color that black is mapped to
+Mesh Texture Face
+E
+For Pose-Mode drawing, only draw ghosts for selected bones
+Landing Smoothness
+Grease Pencil Frame
+Shift
+Mouse Move
+Button 3
+Auto-detect
+Space Timeline Editor
+Only Selected Keyframes Handles
+Use smoke density as texture data
+Operator has a set of reports (warnings and errors) from last execution
+Layered
+Object Vertices
+Set audio mixing buffer size to 512 samples
+Duplicate Metaball
+Saves this datablock even if it has no users
+Cine-Scope 48fps 2048x858
+Ad-hoc correction for over-occlusion due to the approximation
+Line Info
+Filtering Group
+Choose the method used to split a quad into 2 triangles for baking
+Menu Item Colors
+Blending factor for Fresnel
+Constant
+Mitchell-Netravali
+Color
+Button 8
+IK solver for which these parameters are defined, 0 for Legacy, 1 for iTaSC
+Include visualization of Camera related Animation data
+Free Run
+Opacity of the points
+Button 9
+Collection of speakers
+Adaptive QMC
+Layers the object base is on
+NLA Generic
+Sort by size
+Friend
+Velocity Min
+The brightness of the icon
+Show the active object's cloth point cache
+Invoke Default
+Amplification
+Display warnings
+Realtime
+Size of the font used when rendering stamp text
+Refraction
+Third input for the effect strip
+Snap to vertices
+Global child particles percentage
+Faces collide too, can be very slow
+Disable collision for this object
+Disable the time difference between fields
+The default directory to search for loading fonts
+Automatic keyframe insertion in available curves
+Bake the normals in camera space
+Show Header
+layers
+Color for all strokes in this layer
+Top Level Menu Open Delay
+Exec Area
+Auto Render
+Type of periodic offset on the curve
+Key location
+Use scaled and grid-fitted kerning distances
+Stars setting for a World data-block
+Burn
+Set audio sample format to 24 bit signed integer
+Standard
+0
+Tag Crease
+Image Sequence
+Function is registered as callback as part of type registration
+UV Layer to control billboard normals
+Auto-Keying Mode
+Bitrate
+Back scattering weight
+Select where rendered images will be displayed
+The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent
+Gamma Corrected Color
+AutoMerge Keyframes
+Hold the first frame if no previous strips in track, and always hold last frame
+Active PoseChannel constraint
+Scene Bases
+Vertex Colors
+Collection of mesh faces
+string
+Live search filtering string
+Sequencers active strip
+Number of scene samples to take with motion blur
+Vertex Group for pinning of vertices
+Display libraries
+The number of fields per rendered frame (2 fields is 1 image)
+Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source)
+Frame of referenced Action to evaluate
+Line Error
+Plus
+Coordinates
+Roll CW
+Envelope Control Point
+Invert roll Axis
+Source List Text
+The file extension used for saving renders
+Last selected element
+Radial falloff power (real gravitational falloff = 2)
+Face Normal
+Fluid Simulation Settings
+Disable or enable the render layer
+Tap
+Active Bone Group
+Show render related properties
+Number of vertical pixels in the rendered image
+Child of this pose bone
+Location of Center of mass
+Show background image in back view
+Max Land Acceleration
+3D View
+Snap to actual frames/seconds (nla-action time)
+Two-side
+Tag
+Enables Anti-aliasing
+Smoke domain settings
+Tab
+Default Closed
+SPH Fluid Settings
+Dome physical configurations
+Theme settings for the User Preferences
+Front-Truncated
+Has the current session been saved to disk as a .blend file
+12 - Theme Color Set
+Box
+Constraint modifying the transformation of objects and bones
+Curve datablocks
+Adjustment Layer
+Velocity Scale
+Field of View of the Dome - it only works in mode Fisheye and Truncated
+Jitter
+Audio Window
+Use Grease Pencil
+Filter Blender
+Start frame displayed in the sequence editor after offsets are applied, setting this is equivalent to moving the handle, not the actual start frame
+Create springs for this number of frames since particles birth (0 is always)
+Label
+Object this base links to
+Apply channel rotation as IK constraint
+PCM
+Percentage
+Render Sky in this Layer
+Red
+pl_PL
+Datablock whose nodes are being edited
+Draw user interface text anti-aliased
+Head
+Subdivide stroke in bones of specific length
+Use the depth under the mouse to improve view pan/rotate/zoom functionality
+Texture to use as force
+RNA type definition
+PIZ (lossless)
+Bit depth per channel
+Billboard Split UV
+Pxr24 (lossy)
+Region height
+Heat
+Particle select and display mode
+Normalized
+Mux Packet Size
+Diameter in Pixels for Object/Lamp origin display
+Distance between subsequent volume depth samples
+Swap the Mouse Wheel zoom direction
+Sequence editor space data
+The context in which the panel belongs to. (TODO: explain the possible combinations bl_context/bl_region_type/bl_space_type)
+Bake from Multires
+Start size of strands in pixels or Blender units
+Shape Key datablocks
+Targa
+Particle Instance
+Bezier V
+Multiplier to bring particle speed within an acceptable range
+Collision Group
+Limit effectors to this Group
+Display datablocks of all objects of same type as selected object
+The constraint is applied relative to the local coordinate system of the object, with the parent transformation added
+Deliver normal pass
+Location of tail end of the bone
+The transformation of the target is evaluated relative to the world coordinate system
+File Path
+O
+FLAC
+UV Layer to control billboard time index (X-Y)
+Blender Units
+Vertex Group Tangent Negate
+Set color of selected color stop
+Pivot center for rotation/scaling
+Set audio sample format to 16 bit signed integer
+Zooms in and out based on horizontal mouse movement
+Invert Zoom
+Alpha Mode
+bl_use_postprocess
+Land Stick Force
+Create empty placeholder files while rendering frames (similar to Unix 'touch')
+Face Collision
+Automatic keyframe insertion for Objects and Bones
+Damp
+Disable simulation of angular motion along the X axis
+RNA Array Index
+Unsigned Number
+Output video in MPEG format
+Dead
+Text Widget Colors
+Auto Save Time
+Freehand curve defining part of a sketch
+Header Text Highlight
+Seed
+True when the Ctrl key is held
+Raytrace Acceleration Structure
+Which direction is used to calculate the effector force
+Addon Key Configuration
+Data point for freehand stroke curve
+Number of cone samples averaged for blurry reflections
+F8
+Filter Sound
+Mass of cloth material
+Matrix
+Action Group that this F-Curve belongs to
+Subdivide stroke adaptively, with more subdivision in curvier parts
+How many steps to draw the path with
+Space Text Editor
+Handle Vertex
+Render face two-sided
+Mist uses inverse quadratic progression
+DV
+Has Maximum
+Skip Quad to Triangles
+Number of times to repeat the action range
+Maximum Distance
+is_baked
+Amount of damping during collision
+F9
+8192
+X Offset
+Image Pin
+Accuracy of attack
+Continuously unwrap the selected UV island while transforming pinned vertices
+Collection of grease pencils
+Gesture Border
+Exclude raytraced reflection pass from combined
+Choose normal space for baking
+Boid state for boid physics
+Occluder for optimizing scene rendering
+Axis Angle
+Field settings for an object in physics simulation
+Rotation Mode
+Active Spline
+Buoyancy
+Element of a curve, either Nurbs, Bezier or Polyline or a character with text objects
+Start player with a visible mouse cursor
+Bars
+Armatures active edit bone
+Breakdown
+Color Mode
+Diffuse
+01 - Theme Color Set
+Start position of the marker in the line
+Consider objects as whole when finding volume center
+Iris
+Save Buffers
+Time Scale
+Split quads predictably (1,2,3) (1,3,0)
+Constraint
+Display Hidden
+Receive shadows from sources outside the volume (temporary)
+Required
+Domain
+Display Speaker
+GLSL Ramps
+Point data to use as renderable point density
+Keyframe insertion only when keyframe needed
+Audio Sample Rate
+Area width
+Time
+Texture datablock used by this texture slot
+Draw Waveform
+DPX
+Expression
+Voxel data settings
+Constraints
+State Colors
+Influence setting is controlled by an F-Curve rather than automatically determined
+Number of frames between paths shown (not for 'On Keyframes' Onion-skinning method)
+Set audio sampling rate to 48000 samples per second
+Order of video fields. Select which lines get rendered first, to create smooth motion for TV output
+Surface Diffuse
+Magnetic
+Stamp Background
+Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled
+Show Warn
+When bone has a parent, bone's head is struck to the parent's tail
+Timer 0
+Timer 1
+Timer 2
+Display Y Axis
+Frame player from IRIDAS
+Children
+Zoom To Mouse Position
+Shadows
+Use High Quality Drawing
+Exclude emission pass from combined
+Invert rotation axis
+Plane
+Drivers
+Particle system in an object
+Shader Nodes
+Z-Buffer
+Soft to Soft Body
+Expanded in the user interface
+After Current
+Mix
+Object Color
+Fresnel
+Main Cameras
+Atmosphere Extinction
+Use Indirect Lighting
+Elastic Limit
+Material Slot
+Resolution of raytrace accelerator. Use higher resolutions for larger scenes
+Falloff Power
+Mesh Deform
+Show influence curves on strips
+Tweak timing for physics to control frequency and speed
+IK X Stiffness
+Theme settings for the File Browser
+Images are saved with RGB (color) data
+1
+Textured Fonts
+Data type of the property
+Gain
+Scale X
+Is Perspective
+Metaball
+IK Z Stiffness
+B-Bone Display X Width
+Space Console
+Handle type for handles of new keyframes
+Left Mouse
+Macro
+Average
+Curve
+Sketches for this layer on different frames
+User interface layout in a panel or header
+Error Tolerance
+Axis of mouse movement to zoom in or out on
+Disable auto (de)activation in physics simulation
+Softness
+Inherit Scale
+Graph Editor
+Method of shading, attenuating, and scattering light through the volume
+View
+Position Iterations
+H.264
+Romanian (Român)
+Still Frame Number
+Extension Filter
+Vertex Group Roughness End Negate
+Specular Colors
+Minimal Info
+Face selection mode
+Reflection Color
+Node Editor
+Proportional distance over which the light is diffused
+Use Local Coords
+Zmask Negate
+Property that gives the name of the struct
+Rotation in quaternions (keep normalized)
+On Keyframes
+Pulse False Level
+Animated
+Main Grease Pencils
+Alpha Sort
+Factor for ambient occlusion blending
+Active vertex color index
+Generator
+Author
+Restrict Animation Updates
+Lock editing of four component rotations by components (instead of as Eulers)
+NLA Track is evaluated itself (i.e. active Action and all other NLA Tracks in the same AnimData block are disabled)
+The diffuse color of the OpenGL light
+Do not calculate lighting and shadows
+Max Sample Error
+Cut
+Starting distance of the mist, measured from the camera
+Damping
+Push an undo event (needed for operator redo)
+White
+Sets the strength of the add effect
+Collection of lamps
+Animation
+Parent bone (in same Armature)
+Environment Maps
+Inputs
+Direction
+Max difference in heights of obstacles to enable their interaction
+group
+75%
+Hide this curve in editmode
+Deformed Location
+Include visualization of Lattice related Animation data
+Weighted result of strip is multiplied with the accumulated results
+Cloth Settings
+Sharp edge for the EdgeSplit modifier
+Collection of groups
+window
+Preset
+Theme Outliner
+Fast Navigate
+Draw Smooth Edges
+Collection of curves
+Star Tips
+NLA Evaluation Enabled
+3D Cursor Location
+Spline Bezier Points
+Stereo
+Page Up
+Negate the effect of the field vertex group
+Collide All
+Items Expanded
+Marker for noting points in the timeline
+Z Direction
+Causes lamp data to be duplicated with the object
+Scene Strip
+Boid state name
+Simulation value to be used as a texture
+64-bit Float
+Domain Object
+Right
+Shape of clumping
+XZY Euler
+Group Sockets
+Individual pose bones for the armature
+Min Step
+Manipulator Scale
+Main Armatures
+Die Time
+Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method)
+Placeholders
+name
+Unfitted
+Minimum regions size. Smaller regions will be merged
+Mesh Selection Mode
+Method to draw in the sequencer view
+Mute
+Down Arrow
+Render Strands in this Layer
+Child Particles
+Duplicate Action
+IK Param
+Main Images
+Weight for cloth simulation
+Index number of the vertex group
+Collection of NLA Tracks
+Sequence strip data for a single frame
+Sculpt/Paint Use Unified Strength
+Audio Mixing Buffer
+ID-block that the specific property used can be found from (id_type property must be set first)
+Linear physics
+Use Collision Bounds
+Passes
+Noise algorithm - Original Perlin: Smooth interpolated noise
+Additive
+Handle 2 selection status
+Trigger controllers only for an instant, even while the sensor remains true
+Loose edge
+Edit animation/keyframes displayed as 2D curves
+Sculpt/Paint Use Unified Radius
+Index to the specific property affected by F-Curve if applicable
+Main Window Managers
+Unit to use for displaying/editing rotation values
+Editmode bone in an Armature datablock
+Bending Stiffness Maximum
+Selection state of the curve point
+Enable pinning of cloth vertices to other objects/positions
+Shared
+Zoom = Up/Down
+NLA Strips
+Text to search for with the find tool
+Use a DCI Standard preset for saving jpeg2000
+Blend Mode
+Space Sequence Editor
+Textures Directory
+Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes
+Include the name of the active scene in image metadata
+F-Curve Name Filter
+Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox
+pin_id
+Fluid interaction radius
+NLA Strip 'transitions' between adjacent strips
+Editable
+Emission
+Template armature that will be retargeted to the stroke
+Selection status
+Texture slot defining the mapping and influence of a texture
+Connected
+Key
+Align the transformation axes to world space
+Transform parameters for a sequence strip
+Layer Opacity
+Use the Bullet physics engine
+Method for generating shadow samples (for Raytrace)
+Effect particles' dynamic rotation
+Show options for whether channels related to certain types of data are included
+G
+Collection of group objects
+Make hairs shorter
+Show properties marked for debugging while the game runs
+Invert x axis
+Greek (Ελληνικά)
+Smooth
+Sync view position between side views
+Used Layers
+Active File Text
+F18
+F19
+Force effector weight
+The distance over which the mist effect fades in
+Edge Select
+F12
+F13
+F10
+Display Meshes
+F16
+Options
+Grease Pencil datablocks
+F15
+Output video in AVI JPEG format
+Sky Color
+blend_data
+Temporary Directory
+Current rendering engine is a game engine
+100%
+Vertex Group Roughness 2
+IK Rot Weight
+Handle Type
+Bevel Weight
+F-Curve Modifier Type
+int
+No Sleeping
+Save TIFF with 16 bits per channel
+ID Property Group
+Island selection mode
+Collection of texts
+Edges collide too
+512
+Sets minimum Y value for the render border
+Mouse X Position
+Active screen showing in the window
+Stamp Note
+Number of horizontal tiles to use while rendering
+Tilt
+Child Particle
+Action Start Frame
+Media Last
+Pass in multilayer image
+Back Space
+Outflow
+Active Boid State Index
+Enable cluster collision between soft and soft body
+Instance support leads to effective memory reduction when using duplicates
+Xvid
+Realtime display of a modifier
+Sets the layer as active for display and editing
+Wireframe
+Grease Pencil Eraser Radius
+Accurate, but slow when noise-free results are required
+Syntax Special
+Repeat
+Global undo works by keeping a full copy of the file itself in memory, so takes extra memory
+Strength of noise
+Vertical
+Separate
+Self Friction
+Snap median onto target
+Area
+Falloff
+REC709
+Smooth the normals of the surface or beveled curve
+2D View Minimum Grid Spacing
+Font Style
+Image datablocks
+3D region in this space, in case of quad view the camera region
+Sound datablocks
+Auto Velocity
+Data
+Bake the normals in world space
+Lock Camera and Layers
+Vertex group to control rotation
+Global
+Sun Brightness
+Optional custom node label
+Align to Normal
+Directory displayed in the file browser
+Deliver speed vector pass
+Enabled
+Frame player from Tweak Software
+Weighted result of strip is removed from the accumulated results
+A animation layer containing Actions referenced as NLA strips
+Key configuration that can be extended by addons, and is added to the active configuration when handling events
+Dominant
+Line Output
+Seam edge for UV unwrapping
+Options for this panel type
+Menu Widget Colors
+Main Worlds
+Shadowed
+11
+Atmosphere
+Create representation for obstacle simulation
+Estimated rotation matrix
+16
+Pose
+Sun size
+NodeTree
+RGB
+2048
+Anaglyph
+Active Object
+Collection of curve splines
+Marker highlighting a portion of text in a Text datablock
+DopeSheet
+Magnetic effector weight
+Render face transparent and add color of face
+Previous Rotation
+Display Shapekeys
+Aggression
+en_US
+Color space to use for internal XYZ->RGB color conversion
+Numpad 7
+Sets the maximum number of physics step per game frame if graphics slows down the game, higher value allows physics to keep up with realtime
+Keying Sets All
+Boid
+Numpad 6
+Snap Element
+it_IT
+Include the name of the foreground sequence strip in image metadata
+Metaballs
+Active particle system being displayed
+Toggle between moving the viewpoint or moving the scene being viewed
+Use a Gaussian filter for anti-aliasing
+ChannelDriver Variables
+MetaBall
+Combined
+FFmpeg video codec #1
+Use Default Fade
+Numpad 3
+ZXY Rotation Order. Prone to Gimbal Lock
+Index to the specific setting if applicable
+Bake Mirror values
+Use vBVH
+Apply channel size as IK constraint if stretching is enabled
+Invert Zoom Direction
+Numpad 1
+Edge Sharp
+Unit Settings
+Stamp Frame
+Brush datablocks
+use global timestamp written by recording device
+Mapping
+Snap active onto target
+Rigid Body Joint
+Rate control: buffer size (kb)
+Scale factor along the Y for items in this (sub)layout
+RGBA
+Half
+Sets the number of rings rendered over the halo
+Turbulence
+Graph Editor instance has some ghost curves stored
+Halo
+No display
+Stiffness Scaling
+Use a custom falloff curve
+Contents Follow Opening Direction
+Off
+Seam
+Sculpt
+Sequences
+Stiff viscosity is a factor of normal viscosity
+Curve Guide
+Proportional Editing disabled
+Rotate Around Selection
+Key Maps
+Minimum
+Align newly added objects facing the active 3D View direction
+Tool Properties
+Amount of noise for the force strength
+Amount of ray samples. Higher values give smoother results and longer rendering times
+Numpad 8
+]
+Exclude specular pass from combined
+Stamp Scene
+Collection of grease pencil layers
+Choose Collision Type
+Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption)
+Particle system has been edited in particle mode
+Stroke conversion method
+Properties acting as inputs for this driver
+Point Cache
+Window Manager Event
+Collection of brushes
+Don't use a physics engine
+Material Override
+Temperature difference to ambient temperature
+State determining which controllers are displayed
+All Object Origins
+Uses extreme alpha
+Node Tree
+Before Current
+Array
+Collision settings for object in physics simulation
+Stretch To
+F-Curves for controlling the strip's influence and timing
+Field Order
+Hide Dot Files/Datablocks
+Loose
+Use Game Engine
+Onion Skinning (ghosting) settings for visualisation
+Draw dashed black-white edges
+Align handle selected color
+Minimum number of pixels between each gridline in 2D Viewports
+Sky
+Spring Frames
+Location of head end of the bone
+Active key configuration (preset)
+Width
+Action Group is selected
+Collection of Texture Nodes
+Collection of add-ons
+States which are being used by controllers
+Gravity or external force vector
+NLA Track is active
+Ogg
+Roll
+Grless
+Wheel Down
+Amount of friction during particle collision
+Search in all text datablocks, instead of only the active one
+View pivot location
+Draw image with RGB colors and alpha transparency
+Resolution
+Use the scene's active camera and layers in this view, rather than local layers
+Every point is effected by multiple springs
+Vertex
+Include the filename of the .blend file in image metadata
+Maximum distance error from contour to cells
+Output video in H.264 format
+Action displayed and edited in this space
+History
+Local View
+Stamp Text Color
+Translation
+IK Y Maximum
+File Select Parameters
+Shared Vertex
+Safe Margin
+Tip Size
+Edge color
+Negate the effect of the size vertex group
+Game engine controllers to process events, connecting sensor to actuators
+Triangle Mesh
+NLA Strip is played back in reverse order (only when timing is automatically determined)
+Scale Y
+H
+Main Lamps
+Approximate
+Controllers
+Deliver specular pass
+The number of old versions to maintain in the current directory, when manually saving
+Theme settings for the NLA Editor
+Nearest Marker
+Randomize star colors
+Theme settings for the Sequence Editor
+Index of refraction (higher values are denser)
+Local Location
+Default Key Configuration
+Show background image while looking to the right
+The space where the header is going to be used in
+Max number of vertices per polygon
+Quality of JPEG images, AVI Jpeg and SGI movies, Compression for PNG's
+Averaged Value
+Use a box filter for anti-aliasing
+Spin CCW
+Color to use for stamp text
+Wheel Invert Zoom
+Lock Camera to View
+New Interpolation Type
+Main data structure representing a .blend file and all its datablocks
+Calculate bone paths from heads
+Layer of vertex colors in a Mesh datablock
+Is this keymap item user defined (doesn't just replace a builtin item)
+Main Textures
+Enable soft body shape matching goal
+How many self collision iterations should be done. (higher is better quality but slower)
+Collection of scene bases
+Show right margin
+Ambient Occlusion
+Frame this control-point occurs on
+Snap to edges
+Turbulence effector weight
+Build record run time code index
+float
+Use Edges as springs
+Rings
+Color Ramp Elements
+Charge
+Thickness
+Zmask Layers
+The panel label, shows up in the panel header at the right of the triangle used to collapse the panel
+Spread
+Cluster Iterations
+Location
+Weight Paint
+15 - Theme Color Set
+space_data
+Vertex group to control kink
+If this is set, the menu gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is "OBJECT_MT_hello", and bl_idname is not set by the script, then bl_idname = "OBJECT_MT_hello"
+Path is being edited
+ShapeKey Editor
+AC3
+Set audio channels to 5.1 surround sound
+Minimum Size
+Path to a custom animation/frame sequence player
+Smoke inherits it's velocity from the emitter particle
+Display Lists
+Maximum number of frames on either side of the active frame to show (0 = show the 'first' available sketch on either side)
+Compress File
+Bezier U
+Displace
+Velocity Max
+Use Right Mouse Button for selection
+Box Backdrop Colors
+Exec Default
+3
+Path point is selected for editing
+Bone Group
+When calculating Bone Paths, use Head or Tips
+Project Individual Elements
+Parameters for IK solver
+Show the object origin center dot for all (selected and unselected) objects
+BLI BVH
+Realtime Updates
+Shutter
+How strongly the fluid tries to keep from clustering (factor of stiffness)
+Target
+Scrollbar
+Show controllers of all selected objects
+Instead of per brush radius, the radius is shared across brushes
+screen
+Use large mouse cursors when available
+Keymap is defined by the user
+Grease Pencil Stroke Point
+48 kHz
+Use the manipulator for rotation transformations
+Bullet
+Armature Bones
+Directory
+TimeCode Style
+Identifier
+Does full Sky texture render for diffuse energy
+Items in the keymap, linking an operator to an input event
+AvMinMax
+Multiply the current speed of the sequence with this number or remap current frame to this frame
+Apply force only in 2d
+MPEG
+Is this keymap item modified by the user
+Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center
+How smoothly the boids land
+region
+Swedish (Svenska)
+Region in a subdivided screen area
+Add indirect light bouncing of surrounding objects
+Factor Radius
+Obstacle
+Color used for selected bones
+Line Numbers
+Draw edges after modifiers are applied
+Space Info
+Multicam Selector
+Reflection Exclude
+Weight of scale constraint for IK
+Node editor space data
+Link between nodes in a node tree
+Show the entire viewport in the display window, viewing more horizontally or vertically
+Pixel distance around the handles to accept mouse clicks
+Initial State
+Sum Values
+Channel Group
+Tools can use this to tag data, (initial state is undefined)
+The default directory to search for textures
+Lin error
+F-Curve is selected for editing
+Keying Sets
+Release confirms
+64
+Title for the file browser
+Sets the audio sample format
+Invert y Axis
+Include the name of the last marker in image metadata
+Collection of keyframe points
+3D View space data
+Vortex effector weight
+Object adds fluid to the simulation
+Use smoke velocity as texture data
+Maximum Radial Distance
+The axis to display the image on
+Keying set options
+Horizon Brightness
+Render Engine
+Display Particle
+Exclude AO pass from combined
+Lights user to display objects in solid draw mode
+Textbox Height
+Point coordinates
+Axis Angle (W+XYZ). Defines a rotation around some axis defined by 3D-Vector
+Text Editor
+Use display lists to speed up rendering by keeping geometry on the GPU
+Actuators
+Make this nurbs curve or surface meet the endpoints in the U direction (Cyclic U must be disabled)
+es_ES
+Auto Run Python Scripts
+Subtract
+Screen Editing
+Properties in the struct
+Set audio sampling rate to 96000 samples per second
+Scale to use when converting between blender units and dimensions
+Mouse/Trackpad Zoom
+X Ray
+Maximum distance of reflected rays (reflections further than this range fade to sky color or material color)
+True when this property is an output value from an RNA function
+False when F-Curve could not be evaluated in past, so should be skipped when evaluating
+Fresnel Factor
+Minimum for slider
+Use Goal
+Sets how the texture is extrapolated past its original bounds
+Minimum size of strands in pixels
+Points
+Motion Path
+Emission Color
+Global maximum shadow samples
+Path
+Action
+Sets the number of sub-flares
+Used State
+Update other affected window spaces automatically to reflect changes during interactive operations such as transform
+Filter Script
+Method to interpolate/smooth values between voxel cells
+Gives halo a texture
+Show markers belonging to the active action instead of Scene markers (Action and Shape Key Editors only)
+Divide
+Proportional Editing mode, allows transforms with distance fall-off
+Angular distortion between UV and 3D angles
+Random variation of damping
+Channels Selected
+plugin
+Spline IK
+The frame on which the timeline marker appears
+Snap to 1.0 frame/second intervals
+Handle 1 selected
+Free all image texture from memory after render, to save memory before compositing
+Method used for combining Active Action's result with result of NLA stack
+If enabled, stiffness can be scaled along a weight painted vertex group
+Invert z Axis
+Minimum regions size. Smaller regions will be deleted
+Display Mode
+Text bounding box for layout
+Onion Skinning
+Open
+User Add-Ons
+Output file format
+Size
+Backdrop X offset
+Active Pose Marker Index
+Text Marker
+Number of preprocessing passes to reduce overocclusion
+Modifiers affecting the shape of the F-Curve
+Wheel In
+Mesh Face
+Rotation Angle
+Path to a setting for use in a Keying Set
+Sync Markers with keyframe edits
+Whether to use minimum clipping value
+Main Actions
+Editing context being displayed
+Raytraced refraction settings for a Material datablock
+Enable image painting mode
+Hidden
+When adding objects from a 3D View menu, either align them to that view's direction or the world coordinates
+Only show and edit handles of selected keyframes
+Cinema 48fps 2048x1080
+Max Rate
+Envelope Head Radius
+Use old Octree structure
+Global maximum subdivision level
+Use this object's coordinate system instead of global coordinate system
+Viscosity
+Theme Properties
+Boolean Property
+UV Selection Mode
+Force the curve view to fit a defined boundary
+Objects
+Default (Default)
+Shade Down
+Grease Pencil Layers
+Current Keying Set index
+Shadow Exclude
+Root Size
+Rest Shade Key
+Framerate, expressed in frames per second
+Scrollback
+Overlay Lock
+Duplicate Text
+Russian (ÃʄĄÂÑÂúøù)
+10 - Theme Color Set
+Collection of texture slots
+ID Materials
+I
+The distance from which particles are affected fully
+Action Pose Markers
+Clamp velocity to this maximum speed
+English (English)
+JPEG
+L
+Display only files with extensions in the image select window
+Theme Sequence Editor
+ID From
+All Scenes
+Make hairs longer or shorter
+Handle Vertex Select
+With displacement normalize to the distance, with ambient occlusion normalize without using material settings
+Physics
+ID
+Mesh Vertex Color Layer
+Use curve weights to influence the particle influence along the curve
+Cached location on path
+Motion
+Node tree being displayed and edited
+Tangent Shading
+Mesh Vertex Color
+B-Spline
+Based on distance/falloff it adds a portion of the entire path
+Theme settings for the Audio Window
+Displacement
+Coordinates of the second handle
+Rendering settings for a Scene datablock
+Radius of boids personal space on land (% of particle size)
+Live Edit
+The length of the contents of this strip before the handles are applied
+Display Armature
+Length Mode
+Display datablocks of active object
+SDL
+Collection of Nla Strips
+Amount the Active Action contributes to the result of the NLA stack
+Show only actuators connected to active states
+Vertex group for fine control over bending stiffness
+4 Channels
+Bake displacement
+Acceleration
+Angular Velocity
+Boid Rule
+Action Group
+Split quads predictably (0,1,2) (0,2,3)
+Struct definition this is derived from
+Include the current date in image metadata
+Action Group is expanded
+Draw title safe margins in preview
+Output image in DPX format
+Include visualization of Object-level Animation data (mostly Transforms)
+Proxy size 25%
+16 bit color channels
+The default directory to search for sounds
+Log
+Redraw all overlapping regions, minimal memory usage but more redraws
+International Fonts
+5.1 Surround
+Linear
+Settings that should be keyframed together
+Factor Repulsion
+Overlap Flip
+The active face for this mesh
+Turn on SB diagnose console prints
+Dome
+Brazilian Portuguese (Português do Brasil)
+Make hairs stand up
+Uses the vertex normal to specify the dimension of the halo
+Key maps configured as part of this configuration
+Active Space
+4
+Theme Text Editor
+Method to display/shade objects in the 3D View
+Make this nurbs surface meet the endpoints in the V direction (Cyclic V must be disabled)
+Normalized Coordinates
+Glow
+Diffusion
+Enemy
+Co-ordinate system to cache vertices in
+Show state panel
+Show ghosts on keyframes
+Anti-Aliasing
+Zoom Axis
+Reactor Target Particle System
+First input for the effect strip
+Radians
+Free Nodes that are not used while compositing, to save memory
+Transform
+Free handle selected color
+Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled)
+Button 10
+Amplitude
+Show Active States
+Space Nla Editor
+Vertex group to control length
+In text window, paste with middle mouse button instead of panning
+Collection of object constraints
+Transparent RGB pixels are multiplied by the alpha channel
+Calculates environment map at each rendering
+Deform
+Choose BW for saving greyscale images, RGB for saving red, green and blue channels, AND RGBA for saving red, green, blue + alpha channels
+Tweak Right
+44.1 kHz
+Include visualization of Texture related Animation data
+Set layer Visibility
+Deliver mist factor pass (0.0-1.0)
+Sort files by modification time
+Minimal # solver steps/frame
+Have recent edits been saved to disk
+Keying Set Paths to define settings that get keyframed together
+Pressure of tablet at point when drawing it
+Show background image while looking to the left
+Sharp
+Only include F-Curves with names containing search text
+Number of spaces to display tabs with
+Puff Volume
+Video bitrate(kb/s)
+Linear Stiffness
+Vertex Group Tangent
+Amount of dithering noise added to the rendered image to break up banding
+Absorption
+Find Wrap
+Enable hair dynamics using cloth simulation
+The type of the Sequencer view (sequencer, preview or both)
+Number Widget Colors
+File Extensions
+Theme Node Editor
+Object Duplicate
+Goal Maximum
+Size of element, use of components depends on element type
+Word Wrap
+Any
+More than one rendering engine is available
+Cached positions per frame
+Control key pressed
+Collection of armatures
+Gloss Anisotropy
+Tracking by taking the shortest path
+Spherical falloff
+Objects further than this are not visible to map
+Driver could not be evaluated in past, so should be skipped
+Insert Keyframes - Visual
+Rule Evaluation
+Negate the effect of the velocity vertex group
+The frame number to always use
+ca_AD
+Visibility
+Bone associated with this PoseBone
+Envelope Deform Distance
+Invoke Area
+Theme Info
+Current Keying Set index (negative for 'builtin' and positive for 'absolute')
+Black
+Lock editing of location in the interface
+Interface
+Auto Keying Enable
+Save luminance-chrominance-chrominance channels instead of RGB colors
+Left Ctrl
+Multiplier to adjust velocity passed to smoke
+Font size and resolution for display
+Extreme
+Show Controllers
+Render engine
+Render image to two fields per frame, for interlaced TV output
+To socket
+Activate TRUE level triggering (pulse mode)
+Temp. Diff.
+Expanded
+Target particle system
+Which part to snap onto the target
+local space unit length normal vector for this face
+Keying Set Name
+Python Console
+Show Hidden
+The region relative horizontal location of the mouse
+Nurb active V-lines
+Set position of selected color stop
+Fixed size UV coordinates array
+Reactor Target Object
+Node tree type to display and edit
+Display datablocks in current scene
+Color and Alpha
+Causes texture data to be duplicated with the object
+Item in a Key Map
+3D View region data
+Display face-assigned textures in solid view
+Disable simulation of linear motion along the Z axis
+Point of a curve used for a curve mapping
+Include visualization of Metaball related Animation data
+Structural Stiffness Maximum
+Factor Density
+Simple Deform
+The default color for textures that don't return RGB or when RGB to intensity is enabled
+Name of UV unwrapping layer
+Outputs
+Images
+Message
+Ray
+Theme Bone Color Set
+Redraw all overlapping regions, minimal memory usage but more redraws (for graphics drivers that do flipping)
+IK stiffness around the Y axis
+Edge spring stiffness when shorter than rest length
+Menu Backdrop Colors
+50%
+Heads
+Stereo Mode
+Soft body simulation settings for an object in the game engine
+Show Framerate and Profile
+Right Shift
+Direct conversion of frame numbers to seconds
+Log conversion reference whitepoint
+Radius
+Linear stiffness of the soft body links
+View3D Rotate Modal
+SMPTE
+Add
+Show framerate and profiling information while the game runs
+Degrees
+Gather Method
+Output
+Set audio sampling rate to 192000 samples per second
+End
+Include visualization of Material related Animation data
+Sets the layer as active for cloning
+Save for every anti-aliasing sample the entire RenderLayer results. This solves anti-aliasing issues with compositing
+When bone doesn't have a parent, it receives cyclic offset effects
+Enable self collisions
+Property is registered as part of type registration
+Syntax Comment
+Draw Particles
+area
+Basis Matrix
+Active vertex color layer
+Image and UV editor space data
+Set metaball as negative one
+Collection
+JPEG Quality of proxies to build
+Zbuf
+Show the Z axis line in perspective view
+Tails
+Show Active Object
+Defines size of derivative offset used for calculating gradient and curl
+Color Set
+Integer
+Output image in bitmap format
+OpenAL
+Particle Systems
+Display the user preference datablocks
+Size of packed file in bytes
+Ukrainian (ãúрðїýÑÂьúøù)
+Mono
+No proxy, full render
+Fullscreen
+Allow scaling of the bone for IK
+Creates viscosity for expanding fluid)
+J
+Blend mode for combining sun sky with world sky
+Global Undo
+Quicktime
+Draw frames rather than seconds
+Bake shading on the surface of selected objects to the active object
+Frame currently being displayed for this layer
+Never None
+alignment
+Bulgarian (ÑъûóðрÑÂúø)
+Light
+Maximal Spring length * Ball Size
+Emulates Middle Mouse with Alt+Left Mouse (doesn't work with Left Mouse Select option)
+Text datablocks
+Welding
+Heavy
+Quick Sketching
+Method used to determine color of F-Curve in Graph Editor
+Show UV Editor
+Cut hairs
+Expand
+Effect particles' location
+View Matrix
+Allow boids to climb goal objects
+Sequence
+Bone Name
+Seed of the noise
+Motion Path Cache Point
+Use modifier while in the edit mode
+Meshes
+For reactor systems, index of particle system on the target object
+Billboard
+Automatically set based on graphics card and driver
+Macro Operator
+DopeSheet Channel
+Render and combine multiple samples per pixel to prevent jagged edges
+Render Z-Transparent faces in this Layer (On top of Solid and Halos)
+Output image in uncompressed Targa format
+Paths
+Left Arrow
+Collection of spline bezirt points
+Layout
+Show Physics Visualization
+Number of bones in the subdivided stroke
+Vertex Group Clump Negate
+Negate the effect of the tangent vertex group
+Base type for IK solver parameters
+Active camera used in this view (when unlocked from the scene's active camera)
+Re-render and composite changed layer on 3D edits
+ISO 2
+Active Layer Index
+Esc
+Show Frame Number Indicator
+End Offset
+Use active Viewer Node output as backdrop for compositing nodes
+Blender command line animation playback - path to Blender 2.4
+Frequency
+Pivot around the median point of selected objects
+Blend vertex colors across face when vertices are shared
+Game engine logic brick to detect events
+Causes the image to repeat horizontally and vertically
+Bone location is set in local space
+User Preferences
+Show Operator
+Max Logic Steps
+Damping of the harmonic force
+Vertex of a simulated fluid mesh
+Graph Editor Generic
+18 - Theme Color Set
+Average Speed
+Console
+Total number points for the surface on the V direction
+Use the manipulator for scale transformations
+Disable
+5
+13 - Theme Color Set
+Vertex group to control field
+12
+Shared Location
+Transparent pixels are filled with sky color
+Atmosphere Turbidity
+Widget Style
+RNA function definition
+NLA Strip is not evaluated
+Recast Data
+4096
+Right Handle Selected
+Cyclic
+Color Ramp
+Self Collision Quality
+Index of active pose marker
+Vertex Group Density Negate
+Dome Mode
+Image and settings for display in the 3d View background
+Process the render (and composited) result through the video sequence editor pipeline, if sequencer strips exist
+FPS
+Normals
+SIMD SVBVH
+Minimum distance between collision objects before collision response takes in
+Color balance gamma (midtones)
+Minimum distance for the field's fall-off
+Limit fluid objects to this group
+Load UI
+Factor Stiff Viscosity
+Draw preview using full resolution or different proxy resolutions
+Paint Lock
+Sets the number of samples used by the audio mixing buffer
+Source List
+Around Current Frame
+Scroll Handle
+Add light coming from the environment
+Color of the F-Curve in the Graph Editor
+Exclude indirect pass from combined
+Selection of IK solver for IK chain, current choice is 0 for Legacy, 1 for iTaSC
+Bias
+Text Input
+Pitch
+2D
+Braid
+Modifier name
+Use extra textures like normal or specular maps for GLSL rendering
+Stamp Marker
+ZXY Euler
+Function does not pass its self as an argument (becomes a class method in python)
+Sun Intensity
+Fit
+AO Exclude
+Integer Property
+Tube
+ZYX Rotation Order. Prone to Gimbal Lock
+Default paths for external files
+Solid
+Lock the same rotation/scaling pivot in all 3D Views
+Groups of F-Curves
+Display the object solid, with face-assigned textures
+Quadratic
+ID-Block that keyframes for Keying Set should be added to (for Absolute Keying Sets only)
+Inaccurate, but faster and without noise
+Unique ID for this region
+Lock Y Axis
+Logic Nor
+Gaussian
+Euler
+Settings for filtering the channels shown in Animation Editors
+Invoke Region Channels
+Crop the rendered frame to the defined border size
+Limit Location
+Radius of the brush in pixels
+Automatically select also UVs sharing the same vertex as the ones being selected
+Title
+Histogram
+Display raw datablocks
+Bone deformation distance (for Envelope deform only)
+Forcefield based on the Lennard-Jones potential
+Action Group is locked
+XYZ Euler
+Outline Width
+Upper First
+Subdivide stroke in fixed number of bones
+Action Clip
+Use 16 bit floats instead of 32 bit floats per channel
+Stamp Camera
+Texture Nodes
+Falloff power (real gravitational falloff = 2)
+3D View near clipping distance
+Color Randomization
+Snap Peel Object
+Determine the amount of render threads used
+Amount
+F-Curve
+Zmask scene layers for solid faces
+Bone Group this pose channel belongs to (0=no group)
+Constraint's panel is expanded in UI
+Collection of Color Ramp Elements
+Grease Pencil
+Show controllers of active object
+Instead of per brush strength, the strength is shared across brushes
+Allow boids to move on land
+Negate the effect of the clump vertex group
+`
+Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis
+Highlight the current line
+Simplify Child Particles
+Lattice
+Timeline Markers
+Draw actual particles
+XYZ
+Collection of spaces
+Bake Mode
+Sub
+Enable Stereo environment
+F-Curve defining values of a period of time
+Rules are gone through top to bottom. Only the first rule that effect above fuzziness threshold is evaluated
+Constraint to stay within the image bounds while editing
+Only Selected Curve Keyframes
+Scroll Bar
+Theme settings for Font
+Allow Climbing
+Syntax Highlight
+ASCII
+Properties space data
+Lamp datablocks
+Pivot around bounding box center of selected object(s)
+Max Res
+Mouse Previous X Position
+Simplify the final stroke
+Frame is selected for editing in the DopeSheet
+OS Key
+Function is optionally registered as callback part of type registration
+Ease
+Renders halo as a star
+NLA Channels
+Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled (for Raytrace Adaptive QMC)
+nl_NL
+Alt key pressed
+Limit movement around the Y axis
+Z Scale
+Actuator
+Motion Path for this element
+Slider Widget Colors
+Name of Vertex color layer
+Xnor
+Bone Group this pose channel belongs to
+Quad View Region
+Edge Split
+Noise algorithm - Voronoi Crackle: Voronoi tessellation with sharp edges
+Max Air Angular Velocity
+Use Bone Sketching
+Automatic keyframe insertion using active Keying Set only
+Colors
+Starting frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method)
+Show script files
+Cloth simulation settings for self collision and collision with other objects
+Object to use as the environment map's viewpoint location
+The interpolation type for this curve element
+Vertically Open
+Show the expanded in the user interface
+Emit Object Location
+Toggle Widget Colors
+Rotation
+Current Transformation orientation
+Total number points for the curve or surface in the U direction
+Active Particle System Index
+Material Physics
+Pull
+List Item Colors
+Show a small rotating 3D axis in the bottom left corner of the 3D View
+Add-Ons
+Render face with texture
+Tilt Interpolation
+K
+Collection of particle systems
+Text editor space data
+Zoom
+Goal minimum, vertex weights are scaled to match this range
+When deforming bone, multiply effects of Vertex Group weights with Envelope influence
+F-Curve Sample
+Radius of eraser 'brush'
+Finnish (Suomi)
+Turbulent noise driven by the global current frame
+Raytraced reflection settings for a Material datablock
+Convert effector force into air flow velocity
+True when the Shift key is held
+Audio Sample Format
+Bold
+Vertex colors for a face in a Mesh
+Cursor
+Mouse/Trackpad Pan
+Display Paths of poses within specified range
+Info space data
+Duplicate Armature
+Settings for Bullet soft body simulation
+Name of the theme
+Collection of scene objects
+B-Bone Display Z Width
+Zoom using up/down on the device (otherwise forward/backward)
+Enter Edit Mode automatically after adding a new object
+Apply gravitation to point movement
+Info on current cache status
+Cone
+Lock Z Rotation Axis
+GLSL Extra Textures
+Starts player in a new fullscreen display
+Named Group
+Samplerate
+Children expanded in the user interface
+Border
+Armatures active bone
+Active Path Index
+Texture Type
+Amount of clumping
+Style
+Collection of render layers
+Show Restriction Columns
+Soft Body
+Drag effector weight
+Layers visible in this 3D View
+Top
+Quality of the simulation in steps per frame. (higher is better quality but slower)
+The constraint is applied in Pose Space, the object transformation is ignored
+View Rotation
+Gravitation
+Cardinal
+Dolly
+8 bit greyscale binary data
+Chroma Vectorscope
+Active bone group for this pose
+Repulsion Factor
+Object Constraints
+Filter Text
+Vertex group to control tangent
+Default builtin key configuration
+Show folders
+Page Down
+Elements
+View3D Zoom Modal
+Show Actuators
+Deletes smoke from simulation
+Filter File Extensions
+Control point selection status
+Left Handle Selected
+Draw Stretch
+Align rotation with the snapping target
+Cloth
+Show the name of the view's direction in each 3D View
+Display Filter
+Object does not restitute collisions, like a ghost
+Particle Velocity
+Relative time of key over hair length
+6
+Threshold for drawing outlines on geometry edges
+Lighting
+MPEG-4
+Delete
+MPEG-2
+Curve Edit
+Distance of the physics area
+Boid Settings
+Pixel resolution of the rendered environment map
+Goal maximum, vertex group weights are scaled to match this range
+Vertex Group Roughness 2 Negate
+Manipulator Rotate
+Limits
+Current Frame
+Project to Self
+Sticky texture coordinate location
+Transition
+Duplicate Texture
+Mask
+Description of the Function's purpose
+Generate voxels from a sequence of image slices
+Theme settings for the Node Editor
+Automatic time snapping settings for transformations
+Banking
+Texture Plugin Directory
+Mass
+Mist settings for a World data-block
+Show column
+Tool Widget Colors
+Clip Alpha
+Retarget
+Drag component proportional to velocity
+Blocking
+Mirror Colors
+Number of frames between ghosts shown (not for 'On Keyframes' Onion-skinning method)
+Bars Selected
+Use a minimum radial distance for the field's fall-off
+Edit Object
+Cineon
+Height
+Texture Factor
+Draw Wire
+Manipulate object centers only
+Custom color set to use
+Negate the effect of the density vertex group
+SL
+Enable Self Collision
+Correction
+Self Minimum Distance
+Keying set paths
+Invoke Region Preview
+Causes material data to be duplicated with the object
+Sample Distance
+Vertex Group Field
+Multiplier to make out-scattered light brighter or darker (non-physically correct)
+Object Selected
+Keyframe Selected
+Pose Bone
+Set sensor expanded in the user interface
+Theme Audio Window
+Strip Time
+Number of frames from start frame for influence to fade out
+Codec
+Speaker
+Image Generic
+3D Region
+Copy Scale
+Duplicate Surface
+Particle key for hair particle system
+Particle Edit
+Number of cone samples averaged for blurry refractions
+Keep from going through other boids
+Output image in DDS format
+Orig Height
+In Air
+Constraint was added in this proxy instance (i.e. did not belong to source Armature)
+OpenGL shading language shaders
+Render the stamp info text in the rendered image
+read only area of the face
+Exec Region Channels
+Smoke collides with every side
+Enable Collision
+The mouse button used for selection
+How strong a force must be to start effecting a boid on land
+Imperial
+Vertex Group Length
+SDL device - simple direct media layer, recommended for sequencer usage
+Pixel Aspect Y
+Shadow
+Show the active object's softbody point cache
+ZIP (lossless)
+Collection of Compositor Nodes
+Viewport Shading
+Mean red/green/blue scattering path length
+Ball inflating pressure
+Snap to nearest marker
+Vertical aspect ratio - for anamorphic or non-square pixel output
+Window Sliders
+Color ramp mapping a scalar value to a color
+Make hairs less puffy
+Active UV texture index
+Location of head end of the bone relative to its parent
+Display Texture
+Group Node
+Collection of meshes
+Continue
+Grease Pencil Smooth Stroke
+Set audio mixing buffer size to 4096 samples
+Transparent RGB and alpha pixels are unmodified
+Nearest Neighbor
+Gives a constant force along the force objects local Z axis
+Emit
+Bake the normals in tangent space
+Active Base
+Active UV texture
+Falloff Curve
+Sun intensity
+Collection of related sketches on a particular frame
+Vector Fonts
+Mesh Edit
+String Property
+Variables
+3D View Space
+Show the active object's particle point cache
+Cinema 24fps 2048x1080
+The default directory for rendering output, for new scenes
+Audio bitrate(kb/s)
+Font Size
+File
+Automatically converts all new tabs into spaces for new and loaded text files
+Search again from the start of the file when reaching the end
+Driver variable type
+Search term for filtering in the UI
+Show UV editing related properties
+Subdivision Surface
+Mipmaps
+Simplified Chinese (简体中文)
+Edge Length Text
+View2D
+Step Size
+All effector's weight
+GOP Size
+Bottom
+Color balance lift (shadows)
+True when this value can't be set to None
+The color of the lights specular highlight
+Free Run (Rec Date)
+How much the spring rest length can change after the elastic limit is crossed
+Nand
+Background Images
+Vertex Group Roughness 1 Negate
+Follow a boid or assigned object
+Collection of Shader Nodes
+Show Brush
+Save Preview Images
+Use Influence
+Add/Replace
+Enable direct editing of modifier control cage
+Overwrite characters when typing rather than inserting them
+Multitexture
+Full
+Modifier affecting the geometry data of an object
+Text to replace selected text with using the replace tool
+Particle Age
+Unique name used in the code and scripting
+Movie Strip
+Python Scripts Directory
+Global user preferences
+Proportional Size
+Location of the hair key in object space
+Window Manager
+Selectable
+Diffuse subsurface scattering settings for a Material datablock
+Air Personal Space
+Which axis to use for offset
+Sound
+Include Animation Data blocks with no NLA data. (NLA Editor only)
+Tree Type
+The index of particle system on the target object
+Noise algorithm - Voronoi F1-F2
+Autosplit Output
+Type of transition used to fade mist
+Logic Nand
+Enable this OpenGL light in solid draw mode
+Explode
+Tilt CW
+ID-Block
+Diffusion factor, the strength of the blurring effect
+Rate control: min rate(kb/s)
+Alter spring length to shrink/blow up (unit %) 0 to disable
+Object is made a particle system to display particles generated by a fluidsim domain object
+Alternate script path, matching the default layout with subdirs: startup, addons & modules (requires restart)
+channels
+Head Select
+Nearest Frame
+WPaint Auto-Normalize
+View3D Gesture Circle
+Active index in render layer array
+True when the Cmd key is held
+When an 'array/vector' type is chosen (Location, Rotation, Color, etc.), entire array is to be used
+Poly
+Name of the key map
+Roll bones to face the view
+Cycle the animated time within the action start & end
+Metaball Edit
+Use anti-aliasing for the 3D view (may impact redraw performance)
+Key Configuration
+NLA editor space data
+Sounds
+Noise formula used for turbulence
+Show Thumbnails
+Output video in AVI Raw format
+Shape Keys
+Cloth simulation settings for an object
+Transparency along the width of the strand
+Name of UV layer to override
+Custom animation player executable path
+Spring Vertex Group
+Luma Waveform
+Goal Damping
+French (Française)
+tool_settings
+3D Cursor
+Collection of lattices
+Display
+Center of mass
+The type of radius interpolation for Bezier curves
+Global approximate AA and SSS quality factor
+Type of data to take texture from
+Build
+Logic Xor
+Backdrop zoom factor
+Collection of worlds
+Python addons to be loaded automatically
+Proxy size 50%
+Intensity of the mist effect
+UV Editor
+Opacity
+JPEG 2000
+ID Type
+Wires
+Texture Face
+The default directory to search for sequence plugins
+Physics settings for a Material datablock
+Size of the turbulence
+Plastic
+Viscoelastic Springs
+Keyframe Insert Needed
+Threads Mode
+Exclude environment pass from combined
+Display an additional 'summary' line. (DopeSheet Editors only)
+Blend factor with sky
+BMP
+Obstacle simulation
+Relative friction coefficient in the in the X, Y and Z directions, when anisotropic friction is enabled
+7
+Enable naive vertex ball self collision
+Text Character Format
+Particle System
+Active section of the user preferences shown in the user interface
+Outliner
+Don't use any brush
+Pulldown Widget Colors
+Duplicate Lamp
+Spring rest length (factor of particle radius)
+Softens the edges of halos at intersections with other geometry
+None
+ko_KR
+Only Matching F-Curves
+Active Particle Target
+TIFF
+Keyboard
+Strand settings for a Material datablock
+"
+Material Index
+Targa Raw
+Name that will be used in exported files when format supports such feature
+F-Curve is not evaluated
+Texture Collection Rate
+Blend
+Stop ray marching early if transmission drops below this luminance - higher values give speedups in dense volumes at the expense of accuracy
+rect
+08 - Theme Color Set
+Sharp falloff
+Proxy Local
+Repulsion Distance
+Method used for combining strip's result with accumulated result
+Particle speed (absolute magnitude of velocity) mapped as 0.0-1.0 intensity
+Syntax Numbers
+Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)
+Global Space
+Save the z-depth per pixel (32 bit unsigned int z-buffer)
+Curving of the noodle
+View Type
+Children Expanded
+Shape
+Background Image
+Dash
+Pass
+Snap to Pixels
+Engine
+Vertex Select
+Specular Exclude
+Color 2
+Brush strength
+Control point weight values
+Maximum memory usage in megabytes (0 means unlimited)
+Pivot around each object's own origin
+Island
+Softbody goal weight
+Exclude shadow pass from combined
+Method for driving added turbulent noise
+Sampled colors along line
+Offsets the number of the frame to use in the animation
+Maximum angular velocity on land (relative to 180 degrees)
+Start Frame
+Middle Mouse Paste
+Edge Seam
+Display UV coordinates from 0.0 to 1.0 rather than in pixels
+Find Text
+Inverse Gamma
+Smooth hairs
+Graphics driver and operating system settings
+How much density effects smoke motion, higher value results in faster rising smoke
+passes
+Boid rule name
+Maximum number of recently opened files to remember
+Path to property setting
+Level of detail in the added turbulent noise
+Screen
+Billboard Normal UV
+Selects the type of physical representation
+Clip End
+Creates a force along a curve object
+Time delay in 1/10 seconds before automatically opening top level menus
+Autosplit output at 2GB boundary
+Resolution Y
+Artificial buoyancy force in negative gravity direction based on pressure differences inside the fluid
+Gamma
+Light Cache
+Offset
+Voronoi F2-F1
+Hair keys are in global coordinate space
+Structs
+Particle system name
+Don't adjust roll
+Bevel
+UI Layout
+Movie Format
+Fast but not so effective compression
+Use linear workflow - gamma corrected imaging pipeline
+Delta
+Gravity
+Mist uses linear progression
+BSpline
+Type of element to snap to
+Set audio mixing buffer size to 32768 samples
+Show the Y axis line in perspective view
+Action End Frame
+Settings for input devices
+Joystick
+Window manager datablocks
+Left Handle Type
+Points U
+bl_description
+Collection of mesh edges
+Clip objects based on what's visible in other side views
+Object Grouped
+Backscattered Light
+Active grease pencil layer
+Animated Influence
+Atmosphere Inscatter
+Color of emitted light
+Lock Location
+Active Vertex Color Layer
+Spaces
+Properties of particle editing mode
+Area height
+Material nodes
+Collection of armature bones
+Resolution U
+Click
+Filter Files
+Display general information
+Bone Groups
+Overlay
+Muted
+Movie
+Auto Clamped
+Individual Origins
+Overlap
+Custom
+Particles
+Use Max
+Window
+File browser space data
+AVI JPEG
+Friction Coefficients
+Object base selection state
+Bone Pose
+Sequence strip in the sequence editor
+Display Background Images
+Name to use in scripted expressions/functions. (No spaces or dots are allowed. Also, must not start with a symbol or digit)
+User defined layer of floating pointer number values
+96 kHz
+Occlude
+Images are rendered in Image Editor
+States
+Saturation
+Location of this character in the text data (only for text curves)
+Users
+Scene Objects
+Goal Stiffness
+Audio Codec
+Collection of objects
+Type of NLA Strip
+Minimum distance to the camera for stars
+Main Scenes
+Clips to image size and sets exterior pixels as transparent
+Interpolation method to use for segment of the curve from this Keyframe until the next Keyframe
+Radius from the shaded sample to look for points within
+Layer of texture faces in a Mesh datablock
+Tangent
+Stamp Time
+Comb hairs
+24-bit Signed
+Show Handles
+Alpha
+Difference
+The frequency of the offset (1/total length)
+Layer Membership
+Render layer
+ro_RO
+Vector Coordinates
+Spring force
+Flare Boost
+Scopes
+Description of the item's purpose
+Camera Parent Lock
+Invert the axis of mouse movement for zooming
+Socket name
+M
+Enable diffuse subsurface scatting effects in a material
+Color Factor
+Noise algorithm - Cell Noise: Square cell tessallation
+For PoseBone paths, use the bone head location when calculating this path
+Max Land Speed
+Show linked objects to sensor/actuator
+Edit drivers
+F-Curve Modifier is the one being edited
+Channel Matrix
+Has Ghost Curves
+Threshold for adaptive sampling (if a sample contributes less than this amount [as a percentage], sampling is stopped)
+Selects which domain border will be treated as collision object
+Object that defines custom draw type for this bone
+Still Frame Only
+Invert tilt axis
+The name of the active key configuration
+Apply sun effect on atmosphere
+Spacebar
+Limit effectors to this group
+Keep paths from intersecting the emitter
+Input or output socket of a node
+Transform Channel
+Storage of a macro operator being executed, or registered after execution
+Sets the number of points on the star shaped halo
+Display the object's local bounding boxes only
+Goal (vertex target position) spring stiffness
+Boolean
+Cyclic U
+Cinema 24fps 4096x2160
+Images are saved with RGB and Alpha data (if supported)
+Cyclic V
+Indirect
+Show Points
+Speed
+Copy Location
+GLSL Lights
+resolution_x
+All available keying sets
+Specular Color
+Convert to logarithmic color space
+Show keyframes for active Object and/or its selected bones only
+Use Visual keying automatically for constrained objects
+Game Property
+Merged Region Size
+Material Halo
+Flare Seed
+No Gimbal Lock (default)
+Bending Const
+Null device - there will be no audio output
+Main Fonts
+Sensor
+Output image in Cineon format
+Set audio sample format to 64 bit float
+Whether to use maximum clipping value
+Display units in pairs
+Form factor scales the inertia tensor
+Filter Images
+Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard
+Draw UV edges anti-aliased
+Search string is sensitive to uppercase and lowercase letters
+Region Text Titles
+Flow Settings
+Texture Slot
+Enable debug visualization for obstacle simulation
+Wrinkle coefficient. (higher = less smaller but more big wrinkles)
+Action to take for gaps past the Active Action's range (when evaluating with NLA)
+Spring rest length is a factor of 2 * particle size
+Mist uses quadratic progression
+Base
+Enter Edit Mode
+Widget Label Style
+For Zmask, only render what is behind solid z values instead of in front
+Face Angle Text
+8
+Face Dot Size
+Grow
+Strips
+Vertex group to control roughness end
+Texture Slots
+Snap UVs to pixel locations while editing
+Border Minimum X
+Value
+Button5 Mouse
+Roll CCW
+Deprecation Warnings
+Source List Title
+Collection of fonts
+Effector weights for physics simulation
+2
+Input line for the interactive console
+;
+Soft body
+Display Lamp
+Tail Select
+Rotation in Quaternions
+Main MetaBall
+Right Alt
+Waveform Mode
+Audio samplerate(samples/s)
+Random
+Harmonic
+hr_HR
+Themes
+Texture scatting blend factor
+Selected File
+Cache AO results in pixels and interpolate over neighbouring pixels for speedup
+double
+Negate
+Mute this shape key
+Fgon
+RVO (rays)
+External file packed into the .blend file
+Causes text data to be duplicated with the object
+Include visualization of Speaker related Animation data
+Zoom factor
+Tweak Select
+Shape Match
+Spherical forcefield based on the charge of particles, only influences other charge force fields
+Active Boid Rule
+Active index in bone groups array
+IK stiffness around the X axis
+Go to assigned object or loudest assigned signal source
+Wait Timer (ms)
+The region relative vertical location of the mouse
+Mouse/Trackpad Rotate
+02 - Theme Color Set
+Show Control Curves
+Time taken in frames between shutter open and close
+Textured Solid
+Tail
+Lift Force
+The type of event, only applies to some
+Targets
+Main Texts
+Draw Axes
+Space data type
+Subsurface Scattering
+Mesh Vertex
+Max Slope
+Specular Intensity
+Smoke collision settings
+Cubic
+Set all state bits
+Action to take for gaps past the strip extents
+Neutral
+UV mapping, texturing and game engine data for a face
+Minimum value for clipping
+zh_CN
+Wheel Scroll Lines
+Shadow color in grey value
+The constraint is applied relative to the world coordinate system
+Icon File
+Theme Console
+Step Calculation
+Amount the strip contributes to the current result
+Shape Key Bezier Point
+Smoke doesn't collide with top and bottom sides
+Fastest and gives the most noise
+Source of input values for driver variables
+Show Keyframe Numbers
+Image opacity to blend the image against the background color
+Outline
+window_manager
+DDS
+Show key map event and property details in the user interface
+Bake ambient occlusion
+Long List
+Manual
+Kink
+Display Metaball
+View Location
+Radio Widget Colors
+Weights
+Cache of the worldspace positions of an element over a frame range
+Theme settings for the Text Editor
+Number of frames for Blending In/Out is automatically determined from overlapping strips
+Collection of Driver F-Curves
+Use SIMD QBVH
+UV/Image Editor
+Use degrees for measuring rotation
+Resolution of the voxel grid
+Physics Gravity
+bl_idname
+Name of the key configuration
+Agent Radius
+Keyed particles target is valid
+Use force fields when growing hair
+Point in the lattice grid
+The amplitude of the offset
+End Frame
+Lets halo receive light and shadows from external objects
+Pivot
+Maximum walkable slope angle in degrees
+Permeability
+User defined floating point number value in a float properties layer
+Render Result
+Objects nearer than this are not visible to map
+Pivot around active object
+Operator Node
+Local With Parent
+Blender RNA structure definitions
+Radius of bounding sphere and material physics
+Bezier
+Blend Type
+Original Perlin
+Active UV Texture
+Active Object constraint
+Armature-Relative Head
+F-Curve's settings cannot be edited
+7.1 Surround
+Fluid Mesh Vertex
+Long Key
+Do not show any ghosts
+Frame for absolute keys
+Wav
+Preview
+[
+ObData
+Emulate Numpad
+Theme settings for the Timeline
+Cell Size
+Clamp velocity to this minimum speed (except when totally still)
+Specify old mapping value in frames
+Type of texture data to display and edit
+Show ghosts for the specified frame range
+Radius for bevelling
+Maximal # solver steps/frame
+Copy Rotation
+07 - Theme Color Set
+Use object/global coordinates for texture
+If set to True, the panel shows a header, which contains a clickable arrow to collapse the panel and the label (see bl_label)
+Sequence Element
+Use rule when boid is flying
+Simplify Shadow Samples
+Deliver indirect lighting pass
+Particle Key
+Time since last step in seconds
+Properties
+Y Scale
+Minimum Radial Distance
+Sampled Points
+Theme Logic Editor
+Use Stars
+Manipulator Translate
+Brush steps
+Active Pose Marker
+F-Modifier
+N
+True when the Alt/Option key is held
+Decimate
+Use multi-sampled 3D scene motion blur
+Type of active data to display and edit
+Permanent deform
+Onion Skinning Settings
+Mode of automatic keyframe insertion for Objects and Bones
+Theme settings for bone color sets
+Scopes for statistical view of an image
+Push
+Show Seconds
+Logic Or
+Buffer Resolution
+Create a toon outline around the edges of geometry
+Regions
+Damped Track
+Active Bone Group Index
+Automatically select acceleration structure
+Specify a collision bounds type other than the default
+Auto-Clamped handle color
+Vertex Group Roughness End
+Sets the maximum number of logic frame per game frame if graphics slows down the game, higher value allows better synchronization with physics
+Control Point
+Particle count
+Turntable
+Use Weight Color Range
+Octree
+Environment Exclude
+Fuzziness while on collision, high values make collision handling faster but less stable
+Tweak
+Marker
+Shadeless
+Align handle color
+Mist
+Scene Render Layer
+Sequence editing data for a Scene datablock
+Structural Stiffness Vertex Group
+Meta Stack
+Duplicate F-Curve
+Show sound files
+Render layer name
+Index of active particle system slot
+Roll bone to original joint plane offset
+Filter Fonts
+Material Subsurface Scattering
+Tip
+Invalid
+Show Cache
+Delay
+Blend factor for SSS colors
+Fluid Group
+Causes F-curve data to be duplicated with the object
+Stationary object
+el_GR
+Compression method to be used
+Speaker datablocks
+B-Bone Ease In
+Relative Paths
+Mesh Int Property Layer
+Enable smoke to disappear over time
+Double Click Timeout
+Cell Noise
+Particle system has multiple point caches
+Human readable name
+The object that has the target particle system (empty if same object)
+Maximum acceleration on land (relative to maximum speed)
+Legacy
+Clip alpha below this threshold in the 3D textured view
+Display a preset button with the operators settings
+Force gets absorbed by collision objects
+9
+Noise method which is used for creating the high resolution
+Manipulator
+Select UVs that are at the same location and share a mesh vertex
+Shadow offset in pixels
+Bake directly from multires object
+Insert
+Wind effector weight
+DopeSheet Editor
+Entire Array
+Use smoke heat as texture data. Values from -2.0 to 2.0 are used
+Sequence Color Balance
+Disallow movement around the X axis
+Scenes
+Active KeyConfig
+Distance between two bones or objects
+Rate control: max rate(kb/s)
+Active file in the file browser
+Limit collisions to this group
+Nurbs weight
+Outline Selected
+Extrapolate the curve or extend it horizontally
+Right Handle
+Collection of mesh vertices
+Smooth the final stroke
+Current Transform Orientation
+F-Curve live filtering string
+Softness of the 'soft' falloff option
+Selection Mode
+Proportional Editing
+Collection of keying set paths
+Build 25% proxy resolution
+DBVT culling
+Armature Edit
+Show Datablock Filters
+A valid edit mode exists
+World Mist
+Default Value
+Full Screen
+Text in the line
+Quality
+A container referencing an existing Action
+Layer name
+Auto Start
+Visualization
+Show text files
+Draw faces colored according to the difference in shape between UVs and their 3D coordinates (blue for low distortion, red for high distortion)
+Snap Align Rotation
+Angle of Rotation for Axis-Angle rotation representation
+192 kHz
+From socket
+Nurb active U-lines
+Constraints that act on this PoseChannel
+Cyclic Strip Time
+Space Outliner
+Constraint has valid settings and can be evaluated
+Debug
+Pose Bones
+Show image files
+Goal maximum, vertex weights are scaled to match this range
+Puff
+Right Handle Type
+Include the name of the active cameras lens in image metadata
+Sky Color Space
+Include visualization of Armature related Animation data
+Character Index
+Pin (vertex target position) spring stiffness
+Open source frame player: http://djv.sourceforge.net
+Grab Pointer
+Bone is not able to be transformed when in Edit Mode
+Show linked objects to the controller
+Blend Distance
+Edited
+The mode used to apply the texture
+Locked Track
+File Browser
+Vertex weight group, to blend with basis shape
+The type of keyframe (for visual purposes only
+Obstacle Radius
+Drawing method used by the window manager
+Active Particle Target Index
+Front
+Enable starfield generation
+Particle datablocks
+Show an outline highlight around selected objects in non-wireframe views
+Zooms in and out based on vertical mouse movement
+Calculate sub-surface scattering in materials rendering
+Parent this node is attached to
+ar_EG
+Include the render frame as HH:MM:SS.FF in image metadata
+Line of text in a Text datablock
+Detail mesh sample spacing
+Active Theme Area
+Theme Widget Color Set
+Boid height relative to particle size
+Using 1/x
+Scene keying sets
+Show Sliders
+All Z
+Environment Color
+Position
+Buffersize
+Adapt To Speed
+Or
+World datablocks
+Effect Strip
+Group of ID properties
+Proxy size 75%
+Vertex Paint
+Hair Dynamics
+Stroke Points
+NLA Track is locked
+Which mesh elements selection works on
+Weight of rotation constraint for IK
+Always refresh image on frame changes
+Use horizon and zenith color for diffuse energy
+Extra margin around object for collision detection, small amount required for stability
+Collection of vertex groups
+Coordinates of the first handle
+Sky Blend Mode
+Mesh Edge
+Adjust simulation speed
+Bounding box of this object represents the computational domain of the fluid simulation
+Color balance gain (highlights)
+Normal Space
+Layers
+Spin CW
+Mesh Float Property Layer
+Buffer Resolution - decrease it to increase speed
+12 bit color channels
+Space Graph Editor
+Directory Path
+False when this property is an optional argument in an RNA function
+Framing Types
+Display Paths of poses within a fixed number of frames around the current frame
+Last selected point
+Cropping parameters for a sequence strip
+Min Air Speed
+Wavelet
+Color used for the surface of bones
+Window Managers
+Occlude objects with the environment color as they are further away
+Attenuation falloff strength, the higher, the less influence distant objects have
+Driven Selected
+Surface Edit
+Causes metaball data to be duplicated with the object
+Main Curves
+Japanese (日本語)
+Vertex Group Field Negate
+Collection of uv textures
+Enable simplification of scene for quicker preview renders
+String
+Randomized
+Retarget template bone chain to stroke
+Use the manipulator for movement transformations
+Command line prompt language
+How the rules in the list are evaluated
+Color of texture overlay
+Text Box
+Modifier for values of F-Curve
+Specify the number of cluster iterations
+Mass of the object
+React to force field physics settings in materials
+The window relative vertical location of the mouse
+YCbCr (ITU 709)
+Linear viscosity
+8x
+Nothing
+IK Z Limit
+Sensors
+Child Seed
+Tweak Middle
+Object represents a volume of fluid in the simulation
+Property is editable through RNA
+Theme settings for the Console
+Datablock from which the edited datablock is linked
+Particle
+Solo
+Mark controller for execution before all non-marked controllers (good for startup scripts)
+FFMpeg audio codec to use
+ZTransp
+Location (Object Space)
+IK Z Lock
+Display size for normals in the 3D view
+Use a tent filter for anti-aliasing
+Original IK solver
+Use velocities for automagic step sizes
+Multiplier
+Constraint Target
+Draw Repeated
+For RGB curves, the color that white is mapped to
+Noise algorithm - Voronoi F1: Returns distance to the closest feature point
+IK Y Minimum
+Pin Stiffness
+Cache Info
+No Ghosts
+Duplicate Material
+Nurbs order in the V direction (For surfaces only), Higher values let points influence a greater area
+Spanish (Español)
+Sets the dimension of the halo
+Vertex in a Mesh datablock
+Line Numbers Background
+Shadow Size
+Depth
+Rest Density
+Frame Server
+alert
+Meta Element
+Show actuators of all selected objects
+Calculate environment maps while rendering
+Motion Path Settings
+Interlaced
+Space type
+Display the operator log
+Show background image in front view
+Simple
+Storage of a sub operator in a macro after it has been added
+Collision Bounds
+Maximum value for clipping
+Transparency
+Armature-Relative Tail
+Display in the info window and support the redo toolbar panel
+FFMpeg codec to use
+Show frame numbers on Motion Paths
+Maximum allowed number of light inter-refractions
+Use a third buffer for minimal redraws at the cost of more memory
+Game engine logic brick to process events, connecting sensors to actuators
+Layer in multilayer image
+Depth Cutoff
+Mesh Edges
+Max Edge Length
+The number of lines scrolled at a time with the mouse wheel
+Root Texture Coordinates
+Tag Seam
+Visibility status
+Birth Time
+Mini Axis Brightness
+Environment
+Accuracy
+Driven
+Air Damping
+Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering
+Normal
+Keys
+The axis icon's size
+Spring Force
+Brushes
+Drag
+Emulate 3 Button Mouse
+Sculpt/Paint Overlay Color
+Collection of keymap items
+Shadow Y Offset
+Fuzzy
+Comb
+Theme settings for the 3D View
+End frame of the stored range
+Grid Subdivisions
+Layers bone exists in
+Base type for datablocks, defining a unique name, linking from other libraries and garbage collection
+Numpad 5
+face area
+Clip Start
+Numpad 2
+Tweak Action
+Numpad 0
+Use this files path when library linked into another file
+GL Texture Limit
+Only keyframes of selected F-Curves are visible and editable
+Numpad 9
+Crease
+Filter
+Minimum angles for IK Limit
+Scatter contribution factor
+Bones which are children of this bone
+Main Particle Settings
+Collection of particle settings
+Use modifier during rendering
+Numpad /
+Numpad .
+05 - Theme Color Set
+Read Only
+Include visualization of Particle related Animation data
+Numpad *
+Bone is not visible when in Edit Mode
+Width Fade
+Amount of rotation around velocity vector on turns
+Czech (Český)
+Display datablocks in all scenes
+Turbulent noise driven by the particle's age between birth and death
+Aerodynamics Type
+Best quality
+Use effector/global coordinates for turbulence
+Target particle systems
+Min Rate
+Distance to keep particles away from the emitter
+Type of information to display
+Limit movement around the Z axis
+NLA stack is evaluated when evaluating this block
+Apply puff to unselected end-points, (helps maintain hair volume when puffing root)
+Fgon edge
+Perspective
+Bone rotation around head-tail axis
+Pan/Zoom
+Add a new NLA Track + Strip for every loop/pass made over the animation to allow non-destructive tweaking
+No Auto-Snap
+Active Texture Face
+Node Backdrop
+Count
+Amount of influence F-Curve Modifier will have when not fading in/out
+Collection of points that make up this poly or nurbs spline
+Enable All Codecs
+Auto Blend In/Out
+Show Python Tooltips
+Show menus in the header
+Action datablocks
+Edit texture nodes from World
+Cross
+Particle target name
+Frame Map Old
+Collection of channel driver Variables
+Lower First
+Stamp Render Time
+Groups of the bones
+Vertex Group Velocity
+Cine-Flat 48fps 1998x1080
+Snap
+Extreme Alpha
+2x
+Group datablocks
+Overall sensitivity of the 3D Mouse
+Images are rendered in full Screen
+Activity culling is enabled
+2D cursor location for this view
+Metaball types
+F
+Show Linked to Actuator
+Square (HS + V)
+Node Groups
+Name Property
+Dither Intensity
+Reconstruction filter used for combining anti-aliasing samples
+Minimal
+Active Face
+Scripts
+Scale factor along the X for items in this (sub)layout
+Image Axis
+Orig Width
+Pose Head Position
+Cursor Y-Value
+Property is optionally registered as part of type registration
+IK stiffness around the Z axis
+NLA Tracks
+Constrain to Image Bounds
+Arrangement of the panels
+Length of second Bezier Handle (for B-Bones only)
+Median
+Indirect Exclude
+AO
+Node in a node tree
+Cast
+Save cache files to disk (.blend file must be saved first)
+Simplify AO and SSS
+Use key times
+de_DE
+Property has been dynamically created at runtime
+Ball Size
+Display sequence datablocks
+Read-only matrix calculated from the roll (armature space)
+Noise algorithm - Improved Perlin: Smooth interpolated noise
+Automatically start game at load time
+Generate point density from a particle system
+How much of effector force gets lost during collision with this object (in percent)
+Deliver AO pass
+Group that included Object should be a member of
+Cell Height
+Shear Stiffness
+Material Volume
+Maximum number of lines to store for the console buffer
+Include visualization of Mesh related Animation data
+Object Non-modal
+Maximum acceleration in air (relative to maximum speed)
+Pin ID
+Radar
+Render color of textured face as color
+Parts Y
+Parts X
+Collection of F-Curve Modifiers
+Verts Per Poly
+Lock to Cursor
+Theme Image Editor
+Graph Editor 2D-Value cursor - Y-Value component
+Automatically merge vertices moved to the same location
+Stencil
+Lock strip so that it can't be transformed
+Vertex Group Rotation
+Djv
+Use a quadratic filter for anti-aliasing
+Calculates environment map only once
+Node Links
+The number of subdivisions between grid lines
+Filter Folder
+use images in the order as they are recorded
+Collection of libraries
+Use selection as the pivot point
+Auto Snap
+The original matrix of this object before it was duplicated
+The unit system to use for button display
+Limit selection to visible (clipped with depth buffer)
+Type of field
+float_array
+Root falloff
+The quality of the anisotropic filtering (values greater than 1.0 enable anisotropic filtering)
+Dodge
+Active Vertex Group Index
+Method used for determining what ghosts get drawn
+Proportional Editing Objects
+Parent
+Particle dupliobject name
+Theme Widget State Color
+Tilt CCW
+Mirror Intensity
+Object
+Include visualization of Lamp related Animation data
+Object Location
+select_end
+FrameCycler
+Joint
+Backdrop X
+Backdrop Y
+Use Instances
+Y Rotation
+Nor
+Addon
+Anti-Aliasing Samples
+frames_skipped
+Stamp Lens
+Make hairs more puffy
+Offsets image horizontally from the view center
+Negate the effect of the roughness 2 vertex group
+Invoke Screen
+A square showing Hue/Saturation, with Value slider
+NLA Track
+Outer Thickness
+Format of Time Codes displayed when not displaying timing in terms of frames
+Display Node
+Boid will fight this times stronger enemy
+Custom Color
+P
+Negate the effect of the rotation vertex group
+Select Tail
+Settings for boid physics
+Options for this operator type
+Mouse Y Position
+Input properties of an Operator
+Fixed
+Current windowmanager and data context
+Collection of actions
+Tab Width
+Theme 3D View
+Render
+Auto Keyframe Insert Available
+Grid Scale
+Number of undo steps available (smaller values conserve memory)
+Show background image in bottom view
+Theme Graph Editor
+Surface
+Flash
+Collision
+Grid Lines
+Pre Roll
+Strand
+The transformation of the target bone is evaluated relative its local coordinate system, with the parent transformation added
+Disables non-planer quads being triangulated
+Particle Brush
+Smoke doesn't collide with any border
+Ghost frames on either side of frame
+Frame
+Select
+ID-Block representing source data, currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil)
+Index
+Functions
+03 - Theme Color Set
+Built-In Function
+Display objects name and frame number in 3D view
+Custom text to appear in the stamp note
+Cameras
+Noise algorithm - Voronoi F4: Returns distance to the 4th closest feature point
+Estimated scale matrix
+Overall stiffness of structure
+State
+Camera
+Distance between key frames
+Image Painting
+Object is made a fluid control mesh, which influences the fluid
+Draw image with RGB colors
+Build 100% proxy resolution
+Space Type
+Transformation
+Method of calculating the steps through the volume
+Material slot name
+Number of frames between cached frames
+Repulsion is a factor of stiffness
+Edge spring friction
+Face Area Text
+Frame Map New
+Media Play/Pause
+Mux Rate
+Show background image in all views
+Slider Max
+Every Point
+Stub RNA type used for pointers to unknown or internal data
+Number of indirect diffuse light bounces
+Clip Min X
+Clip Min Y
+Link
+Record animation to fcurves
+Object removes fluid from the simulation
+The number of times this object is repeated with respect to other objects
+Line
+Method used to define which Group-name to use
+Use Material Force Field
+Multi constraint, stateful IK solver
+Texture nodes
+Locked
+Filebrowser Parameter
+Path to an image editor
+Weights for the vertex groups this point is member of
+Insert keyframes based on 'visual transforms'
+Armatures
+Nabla
+Mesh String Property
+Collection of action groups
+Keep path lengths constant
+The type of tilt interpolation for 3D, Bezier curves
+Creates a force that dampens motion
+Disable simulation of linear motion along the Y axis
+Green
+Layer is selected for editing in the DopeSheet
+Voronoi F2
+Voronoi F3
+Active F-Curve Modifier
+Cycles
+Margin
+Voronoi F4
+Theme settings for the Image Editor
+Face Dot Selected
+Damping of cloth velocity. (higher = more smooth, less jiggling)
+GLSL Color Management
+Prompt
+Length of first Bezier Handle (for B-Bones only)
+Theme settings for style sets
+Ctrl
+Show intermediate values for the driver calculations to allow debugging of drivers
+Apply this and all preceding deformation modifiers on splines' points rather than on filled curve/surface
+Vertex indices
+Lens angle (mm) in perspective view
+Back
+German (Deutsch)
+Color of light scattered out of the volume (does not affect transmission)
+Build free run time code index
+Extrapolation
+Theme settings for Info
+Collection of metaball elements
+Use face normal to rotate object, so that it points away from the surface
+Lens
+Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction
+Particle Dupliobject Weight
+Use textures for drawing international fonts
+Use light for face
+The edge flag to tag when selecting the shortest path
+Vinterlace
+Cycle the images in the movie
+Display Z Axis
+Reflectivity
+Window Draw Method
+Set audio sampling rate to 44100 samples per second
+Causes particle systems to be duplicated with the object
+Scripts Window
+The space where the panel is going to be used in
+SMPTE (Compact)
+Automatically merge nearby keyframes
+Fast in high-contrast areas
+YCC
+Deliver object index pass
+Bake shadows
+Continuous Grab
+Alive State
+Input
+Adaptive
+Single texture face materials
+Color Ramp Element
+Hue
+Error tolerance (low values are slower and higher quality)
+Transforms include effects of constraints but not parenting/restpose
+Collision Settings
+Collection of cameras
+Command line prompt
+Cache file path
+Object Space
+Driver
+End size of strands in pixels or Blender units
+Weighted result of strip is added to the accumulated results
+NLA Track is selected
+Quaternion
+DOC BROKEN
+19 - Theme Color Set
+Debug State
+Active Keying Set used to insert/delete keyframes
+Lock Rotations (4D)
+Sets the audio output device
+Channels to display when drawing the histogram
+Displays bit depth of full screen display
+Sky Blend
+Reflection
+Vertex group to control roughness 1
+Bake Emit values (glow)
+Language use for translation
+Atmosphere Distance Factor
+Emit Object Space
+Motion Path Points
+IK Solver
+F-Curves
+Semantic interpretation of the property
+Partial overlay on top of the sequencer
+Unborn
+Effect in full or only positive/negative Z direction
+Format of the source data set to render
+Space UV Editor
+Solid Lights
+F1
+F2
+F3
+F4
+F5
+F6
+F7
+Fonts Directory
+Single ASCII character for this event
+Invert x Axis
+Allow boids to move in air
+Zoom Style
+Library
+Sky related settings for a sun lamp
+Inherit Rotation
+Disable Stereo and Dome environments
+KeyConfigs
+IK Stretch
+Voronoi F1
+Rigid Body
+operator_context
+Rotation Units
+Defines the structure of the menu in the UI
+idp_array
+XYZ velocity mapped to RGB colors
+Editmode
+Particle Location
+Tabs as Spaces
+Region Background
+Render Layers
+Stiff viscosity
+Scale Matrix
+Pinned
+Sequence Editor
+Vertex Normal
+Display current image regardless of object selection
+Display Lattices
+Density
+Exclude raytraced refraction pass from combined
+Charge effector weight
+Limit colliders to this Group
+Square (SV + H)
+Space currently being displayed in this area
+Show frame number beside the current frame indicator line
+Face
+Normalized quaternion rotation
+Proportional Editing enabled
+Vector handle selected color
+Scope region background color
+Show font files
+Wave
+Stickness
+Vertex Groups
+The time to animate the view in milliseconds, zero to disable
+Number of times this datablock is referenced
+Source Path
+Forcefield based on a texture
+Lattices
+Object used as the smoke simulation domain
+Parameters defining which layer, pass and frame of the image is displayed
+Vertex Size
+Italian (Italiano)
+Physics Type
+Ghost
+Audio Device
+Display Scene
+Limit Scale
+Enable Dome environment
+Vertex Group Kink Negate
+Radial Falloff Power
+Value Sliders
+collection
+Meta Elements
+Q
+Display Transforms
+Texture Time Out
+Output image in TIFF format
+Key Map
+Navigation mesh
+Fade effect using the built-in default (usually make transition as long as effect strip)
+Include visualization of ShapeKey related Animation data
+Manual adjust
+Space User Preferences
+NLA Track is not evaluated
+Use rule when boid is on land
+Anisotropic Filter
+Red Green Blue
+Radiance HDR
+Active object base in the scene
+User defined layer of integer number values
+Object Mode
+Maximum height between grid cells the agent can climb
+Texts
+Sort the file list by extension
+Settings for filtering animation data
+Number of horizontal pixels in the screen
+Path to the .blend file
+Converts texture RGB values to intensity (gray) values
+Different styles of displaying the color picker widget
+Initial state when the game starts
+Nurbs order in the U direction (For splines and surfaces), Higher values let points influence a greater area
+Show sliders beside F-Curve channels
+Fisheye
+Show View Name
+Sequencer and Image Preview
+Fake User
+Video Sequence Editor
+Struct Definition
+The directory for storing temporary save files
+Record Animation
+F-Curve Modifier will not be evaluated
+Full Render
+Only one side is rendered, with Z axis pointing in direction of image
+Show ghosts from around the current frame
+Display Channel
+Automatically switch between orthographic and perspective when changing from top/front/side views
+Print debug information for this property
+Update simulation with cache steps
+Relationship Lines
+RNA Path to property affected by F-Curve
+Median Point
+Mesh datablocks
+Sets angular index of refraction for raytraced refraction
+Node Socket type
+Outliner space data
+Shadow X Offset
+Amount of residual error in Blender space unit for constraints that work on position
+Make diffuse shading more similar to shading the surface
+Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)
+Draw white edges with black outline
+UV selection and display mode
+No
+Show linked objects to the actuator
+Key Config
+Pressure
+Render Data
+Quaternion Rotation
+Multiply
+Control point for envelope F-Modifier
+Proportion of original image source pixel lines to sample
+Avoid Collision
+Snap to volume
+Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)
+Automatically determine the number of threads, based on CPUs
+Curve mapping to map color, vector and scalar values to other values using a user defined curve
+Run python while editing
+Selects the collision type
+Active Vert/Edge/Face
+Tessellation level - check the generated mesh in wireframe mode
+Register
+Transform Markers
+Include visualization of Scene related Animation data
+Index number of cache files
+Text Highlight
+Halo particle effect settings for a Material datablock
+MPlayer
+Previous Particle Location
+Recent Files
+Legacy tracking constraint prone to twisting artifacts
+Edges receive a lift force when passing through surrounding media
+Optional region type keymap is associated with
+Output image in JPEG 2000 format
+Self Collision
+Enable bending constraints
+Theme DopeSheet
+Layer
+Drag Threshold
+Factor Rest Length
+Which style to use for viewport scaling
+Data to derive color results from
+3D cursor location for this view (dependent on local view setting)
+Nested
+MultiLayer
+Display Curve
+Disk Cache
+Transform markers as well as strips
+mode
+Target object for multi-target constraints
+Multiplier for the material's density
+FPS Base
+Grease Pencil Simplify Stroke
+Edit all markers of the same group as one
+Harmonic effector weight
+Location of head end of the bone relative to armature
+Texture coordinates from root particle locations
+Stereo Options
+Disallow movement around the Z axis
+Number of vertical tiles to use while rendering
+Random Friction
+Specifies an offset in the flare seed table
+Horizon brightness
+Language
+Sound Clip
+Light used for OpenGL lighting in solid draw mode
+Screen datablocks
+NLA Editor
+Vertex group to control velocity
+input_count
+Only hold last frame
+Elasticity of collisions
+Sky Texture
+Use SIMD SVBVH
+Sort alphabetically
+New Handles Type
+Display only objects which will be rendered
+Noise
+The time (in ms) for a double click
+matrix
+channel_id
+Only render the active layer
+Material
+Standard Modal Map
+No TC in use
+Output image in multilayer OpenEXR format
+Empty
+Always
+Enable filtering of files
+Template
+When the camera is locked to the view and in fly mode, transform the parent rather than the camera
+Show Sensors
+Auto handle color
+Custom Warp Mesh data file
+Audio Channels
+Available as GameObject attributes in the game engine's python API
+Offset Y
+Min Region Size
+Pre-calculate the raytrace accelerator and render raytracing effects
+For multires, show low resolution while navigating the view
+Active curve spline
+Strength of sky shading exponential exposure correction
+Print Performance to Console
+Power of Fresnel for mirror reflection
+Default binary voxel file format
+Copy Transforms
+Draw alpha transparency channel
+4x4 bone matrix relative to armature
+Edge spring stiffness when longer than rest length
+When true the format is a movie
+Read cache from an external location
+Object Index
+Print warnings when using deprecated features in the python API
+Option Widget Colors
+Auto Depth
+Goal Minimum
+Display size for proportional editing circle
+Point
+NLA Strip
+Strokes
+Lock editing of scale in the interface
+Sensor name
+Point in a shape key
+Dutch (Nederlandse taal)
+Only Objects in Group
+The shininess of the reflection (values < 1.0 give diffuse, blurry reflections)
+Default relative path option for the file selector
+Proportional editing object mode
+Sampled animation data
+Output image in PNG format
+Owner Space
+Align the transformation axes to the selected objects' local space
+If this is set, the panel gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is "OBJECT_PT_hello", and bl_idname is not set by the script, then bl_idname = "OBJECT_PT_hello"
+Lock Rotation (4D Angle)
+Overdraw Sketching
+Pause
+Maximum speed in air
+Backdrop Y offset
+Ellipsoid
+Separate Units
+Object is a fixed obstacle
+scene
+Load user interface setup when loading .blend files
+'Viscosity' inside collision target
+Bake everything
+Lamp
+Negate the effect of the length vertex group
+Invert z axis
+Armature datablocks
+Shadow size in pixels (0, 3 and 5 supported)
+Rasterized cell size
+Collection of timeline markers
+Local
+Old style zoom, continues while moving mouse up or down
+Tooltips
+Edge Collision
+Fluid rest density
+Blender Voxel
+Bezier curve point with two handles
+Runtime
+Regular key pressed as a modifier
+UV Layer
+Initial Velocity
+Sources of input data for evaluating this variable
+Timeline
+Game engine related settings for the object
+Hide Recent Locations
+Include the name of the active camera in image metadata
+Colored Constraints
+Particle Hair Key
+Y Location
+Exec Region Window
+Stereographic techniques
+UV editor settings
+General movement damping
+Estimate matrix
+Global Pivot
+IK X Lock
+Keep UV and edit mode mesh selection in sync
+Vector Handle
+Number of frames from start frame for influence to take effect
+int_array
+Key velocity
+Negate the effect of the roughness 1 vertex group
+Output Path
+Image User
+AutoMerge Editing
+Flare Subsize
+Handle 2 Location
+Edge UV Face Select
+Clamp To
+NDOF
+The transformation of the target is only evaluated in the Pose Space, the target armature object transformation is ignored
+Particle systems emitted from the object
+Wheel Up
+Linear falloff
+Show the status of cached frames in the timeline
+R
+Keyframe
+Blender Render
+Noise Basis
+How the texture effect is calculated (RGB & Curl need a RGB texture else Gradient will be used instead)
+Display Grid Floor
+Transmission Color
+Parameters defining how an Image datablock is used by another datablock
+Spline point without handles
+8 bit color channels
+Collapse summary when shown, so all other channels get hidden. (DopeSheet Editors Only)
+Draw Z-buffer associated with image (mapped from camera clip start to end)
+Filter Size
+Density is constant within lookup radius
+Clear Images before baking
+Animation Channels
+Snap closest point onto target
+Cloth Collision Settings
+Sequence Plugin Directory
+Size of widget handles as percentage of widget radius
+Friction
+Main Speakers
+Offset in the random number table, to get a different randomized result
+Keep Lengths
+Vertex Group Element
+Snap to faces
+Case Sensitive Matches Only
+Time delay in 1/10 seconds before automatically opening sub level menus
+RNA structure definition
+F-Curve Modifier is only applied for the specified frame range to help mask off effects in order to chain them
+Collection of pose bone constraints
+Angle
+Gives a spiraling force that twists the force objects local Z axis
+AAC
+The constraint is applied relative to the local coordinate sytem of the object
+Separate color channels in preview
+Absolute Density
+Target Particle System
+When transforming keyframes, changes to the animation data are flushed to other views
+Markers
+Amount of pixels you have to drag before dragging UI items happens
+Manipulator Hotspot
+Nurb U-lines
+Output video in Ogg format
+double_array
+Shape matching threshold
+Drag component proportional to the square of velocity
+Inner Selected
+Show Playback FPS
+Interpolation
+Space File Browser
+Hold LMB Open Toolbox Delay
+Vertex Group Weight
+Timeline editor space data
+Main Screens
+Improved Perlin
+The value this event translates to in a modal keymap
+Theme settings for widget state colors
+Reversed
+Mesh Float Property
+Sky Exposure
+Align each axis to the Euler rotation axis as used for input
+Show Frame Numbers
+Action Editor
+17 - Theme Color Set
+Soft body simulation settings for an object
+Mesh Vertices
+32-bit Float
+Invisible
+Number of horizontal pixels in the rendered image
+=
+Handle types
+Stricky texture coordinate
+Max Land Angular Velocity
+Struct definition used for properties assigned to this item
+RGB to Intensity
+Mapping settings
+Name of Shape Key
+Shadow Alpha
+Radius Interpolation
+Pulse True Level
+Bounces
+Exec Region Preview
+Edge Draw Type
+Color Management
+Raytrace
+Forcefield depends on the speed of the particles
+Mode
+Stiffness
+Radial
+Noise Method
+Number of seconds between each run of the GL texture garbage collector
+Gravitational constant used for physics simulation in the game engine
+Logic Editor
+Text Selected
+Point Caches
+No compression
+Vertex coordinates are stored localy on each primitive. Increases memory usage, but may have impact on speed
+Edge Crease
+Invert rotation Axis
+Use Ambient Occlusion to add shadowing based on distance between objects
+Frame that modifier's influence starts (if Restrict Frame Range is in use)
+active_strip
+Lock
+Collection of window managers
+Cine-Flat 24fps 1998x1080
+Sort by extension
+All Views
+Enum Item Definition
+Button 4
+Button 5
+Button 6
+Button 7
+Button 1
+Button 2
+Maximum angles for IK Limit
+Render Pass
+Selected Text
+Whether to draw the sound's waveform
+Data Path
+Enum Flag
+Soft Light
+Define forces for vertices to stick to animated position
+Sample every pixel of the image
+Invert roll axis
+Goal
+Dissolve Speed
+Textbox X Offset
+Sky turbidity
+A random rule is selected for each boid
+OpenAL device - supports 3D audio, recommended for game engine usage
+Console Input
+Invert the level(output) of this sensor
+Memory Cache Limit
+Point Cache List
+Motion Path settings for visualisation
+Endpoint V
+The rotation step for numerical pad keys (2 4 6 8)
+Linear and angular physics
+NLA Strip is selected
+The channel number shown in the image preview. 0 is the result of all strips combined
+Shrink
+Limit movement around the X axis
+Draw Action
+Display debug reporting info
+Collection of action fcurves
+Bone inherits scaling from parent bone
+Lock current frame displayed by layer
+Type of stretch to draw
+Friction/damping with self contact
+Undo
+ZYX Euler
+Scaling factor for the background image
+vBVH
+Axis-Angle Rotation
+Bone deformation weight (for Envelope deform only)
+Interaction radius is a factor of 4 * particle size
+Shape key to use the rest spring lengths from
+Use this texture as a blending value on the next texture
+Deliver environment lighting pass
+Show Python references in tooltips
+Theme NLA Editor
+Above-Below
+Transition Strip
+NLA Strips on this NLA-track
+Draw black edges
+Removes the operator from search results
+Light Override
+Only include channels from Objects in the specified Group
+Compositing
+128
+Random Damping
+Effector Weights
+Location of tail of the channel's bone
+Frame Number
+Image displayed and edited in this space
+Vertex group to control roughness 2
+Show background image in camera view
+How incompressible the fluid is
+Point select mode
+Panel containing UI elements
+Stamp Date
+Inverts the values of the texture to reverse its effect
+Smoke flow settings
+Active Particle System
+Channels
+Type of this region
+Intensity
+Audio Strip
+Blending
+Enable this objects as a collider for physics systems
+Tracking along a single axis
+Weight used by the Subsurf modifier for creasing
+Duplicate Mesh
+Keying Set Info
+Map Type
+Use BLI K-Dop BVH.c
+Amount of turbulence/rotation in fluid
+Add light and shadow
+Random falloff
+Script
+Edge selection mode
+Auto Handle
+Collection of bone groups
+Vertex Group Roughness 1
+Sets minimum X value to for the render border
+Coordinates of the left handle (before the control point)
+Source
+Output Node
+Groups of Pose Channels (Bones)
+Hide recent locations in the file selector
+Particle editing brush
+Show the ground plane grid in perspective view
+Snap Target
+Scripted Expression
+Shadow Brightness
+Noise algorithm - Blender original: Smooth interpolated noise
+Rot error
+Amount of damping during particle collision
+Save Versions
+Anti-aliasing
+Endpoint U
+Sub-Target
+Settings
+Use international fonts
+Show Mini Axis
+Previous Particle Velocity
+Edge in a Mesh datablock
+Function Definition
+Physics engine used for physics simulation in the game engine
+Softbody
+Theme settings for the DopeSheet
+Vertex Group Size
+Add the file format extensions to the rendered file name (eg: filename + .jpg)
+Collection of KeyConfigs
+Active Element
+Wipe
+Deliver raytraced reflection pass
+Fade paths and keys further away from current frame
+Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped
+Control point spring strength values
+Extends by repeating edge pixels of the image
+File is Saved
+Region Type
+OpenEXR
+Auto Keying
+S
+Vector
+Texture Mapping
+Cache name
+Smoke
+Boid State
+Space Node Editor
+Multiresolution
+No Preset
+Maximum allowed number of light inter-reflections
+Final key configuration that combines keymaps from the active and addon configurations, and can be edited by the user
+Allow Negative Frames
+Bending
+Group to override all other lights in this render layer
+Position solver iterations
+Exists
+Lock editing of 'angle' component of four-component rotations in the interface
+Deliver shade-less color pass
+Rear-Truncated
+RNA
+Has Minimum
+Strip has no influence past its extents
+Lennard-Jones effector weight
+Screens
+Window Background
+current_character
+Meta
+Theme settings for the Logic Editor
+Floating-Point Property
+Structural Stiffness
+Particle system settings
+Codec settings for OpenEXR
+Axis
+Forces the current Scene to be displayed in all Screens
+Indicates that a keymap is used for translate modal events for an operator
+Environment map created by the renderer and cached for subsequent renders
+Rotational Difference
+Goal Vertex Group
+Use shaders for GLSL rendering
+Multiple Springs
+Emitter Distance
+Edit Bone
+Indicates that a keyconfig was defined by the user
+Include channels from objects/bone that aren't visible
+Align dynamic game objects along the surface normal, when inside the physics distance area
+Frames Per Second
+Set the distance between the eyes - the camera focal length/30 should be fine
+Draw Other Objects
+Mouse Previous Y Position
+Flare Size
+Align the transformation axes to average normal of selected elements (bone Y axis for pose mode)
+Maintain Volume
+Display mode for the file list
+Max Step
+Activate FALSE level triggering (pulse mode)
+Active Render
+Size Y
+Size X
+Display splash screen on startup
+Size Z
+Grease Pencil Layer
+X/Y coordinates of the curve point
+Use a minimum distance for the field's fall-off
+Show 2D cursor
+Frame Locked
+Active
+Horizontal
+Editing
+Factor for how much surrounding objects contribute to light
+Blend In
+Sets the global starting frame of the movie/sequence, assuming first picture has a #1
+bg_BG
+The size of the occlusion buffer in pixel, use higher value for better precision (slower)
+Horizontal aspect ratio - for anamorphic or non-square pixel output
+4x4 matrix, before constraints
+Minimum Distance
+End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)
+Particles generated by the particle system
+Region Text Highlight
+Align
+zh_TW
+Overwrite existing files while rendering
+Cylinder
+How many frames to fade
+Driver type
+World
+Theme settings for user interface elements
+Bending Stiffness
+Draw other selected objects that share the same image
+Show dashed lines indicating parent or constraint relationships
+And
+Bevel Radius
+Extrapolated
+Force
+Active Brush
+Distance will be used to attenuate shadows
+Method used to adjust the roll of bones when retargeting
+Form Factor
+Scopes to visualize image statistics
+Number
+Shade Top
+Number of frames to render ahead during playback
+High quality interpolation, but slower
+Current view matrix of the 3D region
+Handle 1 Location
+Vertex Group Density
+Active Frame
+IK Y Limit
+Blending to inelastic collision
+Enable high resolution (using amplification)
+Simulation starts on this frame
+Properties to set when the operator is called
+Result of rendering, including all layers and passes
+iTaSC
+Mesh String Property Layer
+Tweak Left
+True if this map is ready for use, False if it needs rendering
+X Scale
+Bone in an Armature datablock
+Output image in Targa format
+Stamp Sequence Strip
+F-Curve Modifier's panel is expanded in UI
+Build 50% proxy resolution
+An object duplicate
+Start Offset
+Items
+Fluid simulation settings for an object taking part in the simulation
+Set audio mixing buffer size to 8192 samples
+Material Strand
+Inflow
+Sort
+Relative Key
+Motion Paths
+Return
+Stiffness defines how much of the element to fill
+Detail mesh simplification max sample error
+Meta Strip
+Bake Alpha values (transparency)
+Memory cache limit in sequencer (megabytes)
+Input configuration, including keymaps
+Select the type of Framing you want
+Animation data for this datablock
+Raytracing
+Key Map Item
+Split quads to give the least distortion while baking
+Show overexposed areas with zebra stripes
+1024
+Bias towards faces further away from the object (in blender units)
+Strip time is controlled by an F-Curve rather than automatically determined
+Bake Location
+sr_RS
+Panel
+Main Libraries
+Edit Edit
+Get away from assigned object or loudest assigned signal source
+Darken
+Active index in vertex group array
+Average Separation
+F-Curve Modifiers
+RNA type used for pointers to any possible data
+Space Image Editor
+UV Selected
+Handle 1 Type
+Choke
+Use Simplify
+Maximum
+YZX Euler
+No Self
+Helicopter Mode
+Rotation in Eulers
+On Cage
+Bone that defines the display transform of this custom shape
+Main Node Trees
+Undo Steps
+Cube Map
+Point cache for physics simulations
+Interactive python console
+Use environment map with six cube sides
+Show .blend files
+Kill Particles
+Sets maximum X value for the render border
+Only Seconds
+NLA Tracks (i.e. Animation Layers)
+Timer Property
+Z Rotation
+Ensure all bone-deforming vertex groups add up to 1.0 while weight painting
+Rigid to Soft Body
+Lock to Object
+Threshold
+Enable sorting of faces for correct alpha drawing (slow, use Clip Alpha instead when possible)
+Occlude Geometry
+Causes surface data to be duplicated with the object
+Use the images alpha values clipped with no blending (binary alpha)
+Hold Forward
+Set Controller state index (1 to 30)
+Amount of light that gets scattered out by the volume - the more out-scattering, the shallower the light will penetrate
+Lock Horizon
+Ignore Layers
+Object Matrix
+Pixel Aspect X
+Filename
+Use Ambient Occlusion
+The transformation of the target is evaluated relative to its local coordinate system
+The region where the panel is going to be used in
+BW
+Bake Specular values
+Tool
+Margin Column
+Maximum distance from active object to other object (in blender units
+Final transformation value of object or bone
+Group Name
+Proxy parameters for a sequence strip
+fr_FR
+Kill collided particles
+Disable simulation of angular motion along the Y axis
+Collision Margin
+SMPTE timecode showing minutes, seconds, and frames only. Hours are also shown if necessary, but not by default
+bl_use_preview
+Draw Faces
+Vertex Group Rotation Negate
+\
+New Window
+Turbulent noise driven by particle velocity
+Lock Rotation
+Color Source
+Print state debug info in the game engine
+Location of head of the channel's bone
+Timer
+Output video in Xvid format
+Enable raytraced reflections
+Image Preview
+Optional space type keymap is associated with
+Use ramps for GLSL rendering
+Motion Samples
+Vectorscope Opacity
+Element defining a color at a position in the color ramp
+All Action Keyframes
+Automatic keyframe insertion for Objects and Bones (default setting used for new Scenes)
+Align Object To
+Welding threshold: distance between nearby vertices to be considered equal => set to 0.0 to disable welding test and speed up scene loading (ok if the mesh has no duplicates)
+Limit
+T
+Diffuse Color
+Release
+User defined string text value in a string properties layer
+Histogram for viewing image statistics
+Scroll Widget Colors
+General media friction for point movements
+Lock Y Rotation Axis
+Set audio mixing buffer size to 1024 samples
+Draw the image repeated outside of the main view
+Mesh Int Property
+Noodle curving
+Unknown Type
+Add & Replace
+Border Collisions
+Add children to form a compound collision object
+Influence
+Show high resolution (using amplification)
+Collection of sounds
+Use Bone Heads
+Actuator to apply actions in the game engine
+Mp3
+Go to closest enemy and attack when in range
+Type of range to show for Motion Paths
+Use trackball style rotation in the viewport
+32768
+Overwrite
+Duplicate Particle
+32-bit Signed
+Scale
+Expression to use for Scripted Expression
+Pre-calculate the shading information into a voxel grid, speeds up shading at slightly less accuracy
+Parameters
+Material Mode
+Avoid
+Cache is outdated
+File Browser Buttons
+Actor
+Bone Group Index
+Toolbox Column Layout
+Show the frames per second screen refresh rate, while animation is played back
+Image Editor
+Mesh Vertex Sticky Texture Coordinate
+Vertex Weight Proximity
+Average Spring length * Ball Size
+Renders rings over halo
+Offset in the random number table for child particles, to get a different randomized result
+Auto Keying Mode
+B-Bone Segments
+Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox
+Visible Layers
+File format to save the rendered images as
+Enable view navigation within the camera view
+Show background image in top view
+Sun brightness
+Closest
+Make this curve or surface a closed loop in the U direction
+Command history
+XYZ Rotation Order. Prone to Gimbal Lock
+Draw Stretch Type
+Percentage scale for render resolution
+F-Curve and its keyframes are hidden in the Graph Editor graphs
+F-Curve Editor
+Area distortion between UV and 3D faces
+YXZ Rotation Order. Prone to Gimbal Lock
+Effective but slow compression
+Fields
+For bone motion paths, search whole Action for keyframes instead of in group with matching name only (is slower)
+Process the render result through the compositing pipeline, if compositing nodes are enabled
+Co-ordinate system to cache particles in
+Error Limit
+Curve guide effector weight
+Default
+Black Level
+ISO 1
+Fine tunes texture mapping X, Y and Z locations
+Single Property
+Korean (한국 언어)
+DopeSheet Sub-Channel
+Max Air Speed
+Vertex Group Length Negate
+Key location for a particle over time
+Render a user-defined border region, within the frame size. Note, this disables save_buffers and full_sample
+Range
+Materials
+Show hidden dot files
+Numpad Enter
+Polish (Polski)
+Automatic saving of temporary files in temp directory, uses process ID
+Cubic B-Spline
+Logic editor space data
+Open menu buttons and pulldowns automatically when the mouse is hovering
+Use to check if an operator is a macro
+Display zoom level
+Stamp Filename
+Weight
+Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered)
+Auto XYZ to RGB
+UV
+Audio volume
+Restrict the number of animation updates to the animation FPS. This is better for performance, but can cause issues with smooth playback
+Replace
+Show paint related properties
+Target Space
+Gloss Samples
+UI
+Keep horizon level while flying with 3D Mouse
+Texture Mode
+Shaded + Multiple Scattering
+Lifetime
+Settings for particle fluids physics
+Type of units for this property
+Pointer
+Field Settings
+PoseBone Constraints
+Right Ctrl
+User Key Configuration
+Color 3
+Speakers
+Color 1
+Spline Points
+Color 4
+Gradient
+Rule Fuzziness
+YZX Rotation Order. Prone to Gimbal Lock
+Amount of residual error in radiant for constraints that work on orientation
+GLSL Shadows
+Radius of object representation in obstacle simulation
+Show the entire viewport in the display window, using bar horizontally or vertically
+Dissolve Smoke
+Internal
+Library file the datablock is linked from
+Outer face thickness
+Any modifier keys pressed
+Screen aligned billboard
+Allow moving the mouse outside the view on some manipulations (transform, ui control drag)
+NLA Strips that this strip acts as a container for (if it is of type Meta)
+Pixel Cache
+Texture slot name
+Render Stamp
+bl_label
+Settings for interacting with Blender data
+Ball
+Active Clone
+Editbone Matrix
+ja_JP
+Curve in a curve mapping
+Auto Rainbow
+Maximum angular velocity in air (relative to 180 degrees)
+Operator Properties
+Material Raytrace Transparency
+Child
+Modal Keymap
+Color to use behind stamp text
+Theme settings for the graph editor
+Aligned
+Border Maximum X
+Border Maximum Y
+Type of event
+Set color of the bars
+Collapse Summary
+How many collision iterations should be done. (higher is better quality but slower)
+Consant falloff
+Fields Still
+Main Sounds
+Definition of a choice in an RNA enum property
+Translate Tooltips
+Sync Markers
+Object being duplicated
+Face in a Mesh datablock
+Calculate bone paths from tails
+Display World
+UV Pinned
+No Collision
+Active Channel Group
+Make face invisible
+Number of subdivisions of bone (for B-Bones only)
+Renders halo as a lens flare
+Only Selected Channels
+Minimum height where the agent can still walk
+Stroke data points
+Multiply Vertex Group with Envelope
+Inner face thickness
+Set actuator expanded in the user interface
+Low values are slower and higher quality
+Vertices Cache
+Lattice datablocks
+Current frame number can be manually set to a negative value
+Set controller expanded in the user interface
+Simulation used for obstacle avoidance in the game engine
+Duplicate Curve
+List of background images
+Manipulator Handle Size
+Alive
+Lock Z Axis
+Tex
+A square showing Saturation/Value, with Hue slider
+Deliver material index pass
+XXX todo
+Collection of spline points
+Flock
+Linear Light
+Live Unwrap
+Radiosity
+Turbulence Influence
+Object datablocks
+Left Shift
+The source of this force field is the zero point of a harmonic oscillator
+Driver Target
+CIE
+Show High Resolution
+Pin Cloth
+Soft Body Settings
+Threads
+Negate the effect of the roughness end vertex group
+Gloss Threshold
+World Space
+Game data for a Scene datablock
+Blender 2.4
+Coordinates of the right handle (after the control point)
+View2D Buttons List
+F-Curves in this group
+Point cache list
+3D View Region
+Show the X axis line in perspective view
+Matroska
+Node Generic
+Extinction scattering contribution factor
+Callback function defines for builtin Keying Sets
+Generate point density from an object's vertices
+Coulomb friction coefficient, when inside the physics distance area
+Temporary
+Vertex group to control size
+Time in milliseconds between each frame recorded for screencast
+Low Resolution Mesh
+Maximum structural stiffness value
+Maximum radial distance for the field to work
+Collection of point caches
+Volume
+Asymmetry
+Mux rate (bits/s(!))
+Weight value of a vertex in a vertex group
+Log conversion reference blackpoint
+Point density settings
+Show Mouse
+Name of Action Group to assign setting(s) for this path to
+Rotate
+Multiplier for multiple scattered light energy
+09 - Theme Color Set
+(Min+Max)/2 * Ball Size
+Flow
+Output image in Radiance HDR format
+Show Expanded
+11 - Theme Color Set
+Front scattering weight
+Maximum speed for jumping
+Compositor Nodes
+Particle in a particle system
+Vertex Group
+U
+Bending Stiffness Vertex Group
+Context
+Vertex selection mode
+Use scaled but un-grid-fitted kerning distances
+Gloss Amount
+3D region that defines the quad view settings
+Display groups and their datablocks
+Include visualization of Curve related Animation data
+User Modified
+Statistical view of the levels of color in an image
+Anisotropic Friction
+4x
+Inverse Gain
+Fade Time
+Visual Keying
+Agent Height
+Underline
+Translate Interface
+Property Definition
+Bake Mirror colors
+Animated Strip Time
+Friction Factor
+Space data for a screen area
+Maximum speed on land
+Theme User Interface
+Deflect Emitter
+Use Edges
+The base density of the volume
diff --git a/po/update_mo.py b/po/update_mo.py
new file mode 100755
index 00000000000..e0317f74dd7
--- /dev/null
+++ b/po/update_mo.py
@@ -0,0 +1,53 @@
+#!/usr/bin/env python
+
+# $Id:
+# ***** 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.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+# <pep8 compliant>
+
+# update all mo files in the LANGS
+
+import subprocess
+import os
+
+CURRENT_DIR = os.path.dirname(__file__)
+SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(CURRENT_DIR, "..")))
+LOCALE_DIR = os.path.join(SOURCE_DIR, "release", "bin", ".blender", "locale")
+
+DOMAIN = "blender"
+
+
+def main():
+ for po in os.listdir(CURRENT_DIR):
+ if po.endswith(".po"):
+ lang = po[:-3]
+ # show stats
+ cmd = ("msgfmt",
+ "--statistics",
+ os.path.join(CURRENT_DIR, "%s.po" % lang),
+ "-o",
+ os.path.join(LOCALE_DIR, lang, "LC_MESSAGES", "%s.mo" % DOMAIN),
+ )
+
+ print(" ".join(cmd))
+ process = subprocess.Popen(cmd)
+ process.wait()
+
+if __name__ == "__main__":
+ main()
diff --git a/po/update_po.py b/po/update_po.py
new file mode 100755
index 00000000000..88547760f67
--- /dev/null
+++ b/po/update_po.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+
+# $Id:
+# ***** 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.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+# <pep8 compliant>
+
+# update all po files in the LANGS
+
+import subprocess
+import os
+
+CURRENT_DIR = os.path.dirname(__file__)
+DOMAIN = "blender"
+
+
+def main():
+ for po in os.listdir(CURRENT_DIR):
+ if po.endswith(".po"):
+ lang = po[:-3]
+
+ # update po file
+ cmd = ("msgmerge",
+ "--update",
+ "--lang=%s" % lang,
+ os.path.join(CURRENT_DIR, "%s.po" % lang),
+ os.path.join(CURRENT_DIR, "%s.pot" % DOMAIN),
+ )
+
+ print(" ".join(cmd))
+ process = subprocess.Popen(cmd)
+ process.wait()
+
+
+if __name__ == "__main__":
+ main()
diff --git a/po/update_pot.py b/po/update_pot.py
new file mode 100755
index 00000000000..b0d77a3be03
--- /dev/null
+++ b/po/update_pot.py
@@ -0,0 +1,95 @@
+#!/usr/bin/env python
+
+# $Id:
+# ***** 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.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+# <pep8 compliant>
+
+# update the pot file according the POTFILES.in
+
+import subprocess
+import os
+
+GETTEXT_XGETTEXT_EXECUTABLE = "xgettext"
+CURRENT_DIR = os.path.dirname(__file__)
+SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.join(CURRENT_DIR, "..")))
+DOMAIN = "blender"
+
+FILE_NAME_POT = os.path.join(CURRENT_DIR, "blender.pot")
+FILE_NAME_MESSAGES = os.path.join(CURRENT_DIR, "messages.txt")
+
+
+def main():
+ cmd = (GETTEXT_XGETTEXT_EXECUTABLE,
+ "--files-from=%s" % os.path.join(SOURCE_DIR, "po", "POTFILES.in"),
+ "--keyword=_",
+ "--keyword=N_",
+ "--directory=%s" % SOURCE_DIR,
+ "--output=%s" % os.path.join(SOURCE_DIR, "po", "%s.pot" % DOMAIN),
+ "--from-code=utf-8",
+ )
+
+ print(" ".join(cmd))
+ process = subprocess.Popen(cmd)
+ process.wait()
+
+ def stripeol(s):
+ return s.rstrip("\n\r")
+
+ pot_messages = {}
+ reading_message = False
+ message = ""
+ with open(FILE_NAME_POT, 'r') as handle:
+ while True:
+ line = handle.readline()
+
+ if not line:
+ break
+
+ line = stripeol(line)
+ if line.startswith("msgid"):
+ reading_message = True
+ message = line[7:-1]
+ elif line.startswith("msgstr"):
+ reading_message = False
+ pot_messages[message] = True
+ elif reading_message:
+ message += line[1:-1]
+
+ # add messages collected automatically from RNA
+ with open(FILE_NAME_POT, "a") as pot_handle:
+ with open(FILE_NAME_MESSAGES, 'r') as handle:
+ while True:
+ line = handle.readline()
+
+ if not line:
+ break
+
+ line = stripeol(line)
+ line = line.replace("\\", "\\\\")
+ line = line.replace("\"", "\\\"")
+
+ if not pot_messages.get(line):
+ pot_handle.write("\n#: Automatically collected from RNA\n")
+ pot_handle.write("msgid \"%s\"\n" % (line))
+ pot_handle.write("msgstr \"\"\n")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/release/bin/.blender/.Blanguages b/release/bin/.blender/.Blanguages
index 9f3b3ef80dc..1a83c46039a 100644
--- a/release/bin/.blender/.Blanguages
+++ b/release/bin/.blender/.Blanguages
@@ -11,13 +11,14 @@ Catalan:ca_ES
Czech:cs_CZ
Brazilian Portuguese:pt_BR
Simplified Chinese:zh_CN
+Traditional Chinese:zh_TW
Russian:ru_RU
Croatian:hr_HR
-Serbian:sr
+Serbian:sr_RS
Ukrainian:uk_UA
Polish:pl_PL
-Romanian:ro
-Arabic:ar
-Bulgarian:bg
-Greek:el
-Korean:ko
+Romanian:ro_RO
+Arabic:ar_SA
+Bulgarian:bg_BG
+Greek:el_GR
+Korean:ko_KR
diff --git a/release/bin/.blender/fonts/droidsans.ttf.gz b/release/bin/.blender/fonts/droidsans.ttf.gz
new file mode 100644
index 00000000000..e83aff4e899
--- /dev/null
+++ b/release/bin/.blender/fonts/droidsans.ttf.gz
Binary files differ
diff --git a/release/datafiles/blenderbuttons b/release/datafiles/blenderbuttons
index 86dea8f3570..c4fd5aaa93d 100644
--- a/release/datafiles/blenderbuttons
+++ b/release/datafiles/blenderbuttons
Binary files differ
diff --git a/release/scripts/modules/bpy/utils.py b/release/scripts/modules/bpy/utils.py
index a6304378cc4..fdd22f403a4 100644
--- a/release/scripts/modules/bpy/utils.py
+++ b/release/scripts/modules/bpy/utils.py
@@ -63,7 +63,7 @@ def _test_import(module_name, loaded_modules):
return None
if "." in module_name:
print("Ignoring '%s', can't import files containing "
- "multiple periods." % module_name)
+ "multiple periods" % module_name)
return None
if use_time:
@@ -159,7 +159,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
traceback.print_exc()
else:
print("\nWarning! '%s' has no register function, "
- "this is now a requirement for registerable scripts." %
+ "this is now a requirement for registerable scripts" %
mod.__file__)
def unregister_module_call(mod):
diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py
index 3f6a3682e7c..91546e02829 100644
--- a/release/scripts/modules/bpy_extras/io_utils.py
+++ b/release/scripts/modules/bpy_extras/io_utils.py
@@ -233,8 +233,8 @@ def axis_conversion(from_forward='Y', from_up='Z', to_forward='Y', to_up='Z'):
return Matrix().to_3x3()
if from_forward[-1] == from_up[-1] or to_forward[-1] == to_up[-1]:
- raise Exception("invalid axis arguments passed, "
- "can't use up/forward on the same axis.")
+ raise Exception("Invalid axis arguments passed, "
+ "can't use up/forward on the same axis")
value = reduce(int.__or__, (_axis_convert_num[a] << (i * 3)
for i, a in enumerate((from_forward,
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index 101416f4943..6b65f720a5c 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -206,7 +206,7 @@ class _GenericBone:
@property
def children_recursive(self):
- """a list of all children from this bone."""
+ """A list of all children from this bone."""
bones_children = []
for bone in self._other_bones:
index = bone.parent_index(self)
@@ -356,7 +356,7 @@ class Mesh(bpy_types.ID):
@property
def edge_keys(self):
- return [edge_key for face in self.faces for edge_key in face.edge_keys]
+ return [ed.key for ed in self.edges]
class MeshEdge(StructRNA):
@@ -376,17 +376,31 @@ class MeshFace(StructRNA):
face_verts = self.vertices[:]
mesh_verts = self.id_data.vertices
if len(face_verts) == 3:
- return (mesh_verts[face_verts[0]].co + mesh_verts[face_verts[1]].co + mesh_verts[face_verts[2]].co) / 3.0
+ return (mesh_verts[face_verts[0]].co +
+ mesh_verts[face_verts[1]].co +
+ mesh_verts[face_verts[2]].co
+ ) / 3.0
else:
- return (mesh_verts[face_verts[0]].co + mesh_verts[face_verts[1]].co + mesh_verts[face_verts[2]].co + mesh_verts[face_verts[3]].co) / 4.0
+ return (mesh_verts[face_verts[0]].co +
+ mesh_verts[face_verts[1]].co +
+ mesh_verts[face_verts[2]].co +
+ mesh_verts[face_verts[3]].co
+ ) / 4.0
@property
def edge_keys(self):
verts = self.vertices[:]
if len(verts) == 3:
- return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[0])
-
- return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[3]), ord_ind(verts[3], verts[0])
+ return (ord_ind(verts[0], verts[1]),
+ ord_ind(verts[1], verts[2]),
+ ord_ind(verts[2], verts[0]),
+ )
+ else:
+ return (ord_ind(verts[0], verts[1]),
+ ord_ind(verts[1], verts[2]),
+ ord_ind(verts[2], verts[3]),
+ ord_ind(verts[3], verts[0]),
+ )
class Text(bpy_types.ID):
diff --git a/release/scripts/modules/console_python.py b/release/scripts/modules/console_python.py
index 425ea210104..94d0c8c8614 100644
--- a/release/scripts/modules/console_python.py
+++ b/release/scripts/modules/console_python.py
@@ -299,7 +299,7 @@ def banner(context):
add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bpy.utils, bgl, blf, mathutils", 'OUTPUT')
add_scrollback("Convenience Imports: from mathutils import *; from math import *", 'OUTPUT')
add_scrollback("", 'OUTPUT')
- # add_scrollback(" WARNING!!! Blender 2.5 API is subject to change, see API reference for more info.", 'ERROR')
+ # add_scrollback(" WARNING!!! Blender 2.5 API is subject to change, see API reference for more info", 'ERROR')
# add_scrollback("", 'OUTPUT')
sc.prompt = PROMPT
diff --git a/release/scripts/modules/rna_info.py b/release/scripts/modules/rna_info.py
index 943f86adecb..d95c3920cf9 100644
--- a/release/scripts/modules/rna_info.py
+++ b/release/scripts/modules/rna_info.py
@@ -207,7 +207,7 @@ class InfoPropertyRNA:
self.fixed_type = None
if self.type == "enum":
- self.enum_items[:] = rna_prop.enum_items.keys()
+ self.enum_items[:] = [(item.identifier, item.name, item.description) for item in rna_prop.enum_items]
self.is_enum_flag = rna_prop.is_enum_flag
else:
self.is_enum_flag = False
@@ -264,9 +264,9 @@ class InfoPropertyRNA:
type_str += " in [%s, %s]" % (range_str(self.min), range_str(self.max))
elif self.type == "enum":
if self.is_enum_flag:
- type_str += " set in {%s}" % ", ".join(("'%s'" % s) for s in self.enum_items)
+ type_str += " set in {%s}" % ", ".join(("'%s'" % s[0]) for s in self.enum_items)
else:
- type_str += " in [%s]" % ", ".join(("'%s'" % s) for s in self.enum_items)
+ type_str += " in [%s]" % ", ".join(("'%s'" % s[0]) for s in self.enum_items)
if not (as_arg or as_ret):
# write default property, ignore function args for this
diff --git a/release/scripts/startup/bl_operators/animsys_update.py b/release/scripts/startup/bl_operators/animsys_update.py
index 3710c57ac16..23b9cf13f07 100644
--- a/release/scripts/startup/bl_operators/animsys_update.py
+++ b/release/scripts/startup/bl_operators/animsys_update.py
@@ -685,7 +685,6 @@ data_path_update = [
]
-import bpy
from bpy.types import Operator
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py
index 9226cbed51b..2b190e1aee1 100644
--- a/release/scripts/startup/bl_operators/image.py
+++ b/release/scripts/startup/bl_operators/image.py
@@ -74,7 +74,7 @@ class EditExternally(Operator):
if not os.path.exists(filepath):
self.report({'ERROR'},
"Image path %r not found, image may be packed or "
- "unsaved." % filepath)
+ "unsaved" % filepath)
return {'CANCELLED'}
cmd = self._editor_guess(context) + [filepath]
diff --git a/release/scripts/startup/bl_operators/nla.py b/release/scripts/startup/bl_operators/nla.py
index c764f7d62f1..feb0016b1c7 100644
--- a/release/scripts/startup/bl_operators/nla.py
+++ b/release/scripts/startup/bl_operators/nla.py
@@ -271,7 +271,8 @@ class BakeAction(Operator):
class ClearUselessActions(Operator):
- '''Mark actions with no F-Curves for deletion after save+reload of file preserving "action libraries"'''
+ '''Mark actions with no F-Curves for deletion after save+reload of ''' \
+ '''file preserving "action libraries"'''
bl_idname = "anim.clear_useless_actions"
bl_label = "Clear Useless Actions"
bl_options = {'REGISTER', 'UNDO'}
@@ -292,12 +293,14 @@ class ClearUselessActions(Operator):
if ((self.only_unused is False) or
(action.use_fake_user and action.users == 1)):
- # if it has F-Curves, then it's a "action library" (i.e. walk, wave, jump, etc.)
+ # if it has F-Curves, then it's a "action library"
+ # (i.e. walk, wave, jump, etc.)
# and should be left alone as that's what fake users are for!
if not action.fcurves:
# mark action for deletion
action.user_clear()
removed += 1
- self.report({'INFO'}, "Removed %d empty and/or fake-user only Actions" % (removed))
+ self.report({'INFO'}, "Removed %d empty and/or fake-user only Actions"
+ % removed)
return {'FINISHED'}
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index 6c9f27afaa5..d7c6cfc0565 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -283,11 +283,11 @@ class ShapeTransfer(Operator):
),
('RELATIVE_FACE',
"Relative Face",
- "Calculate relative position (using faces).",
+ "Calculate relative position (using faces)",
),
('RELATIVE_EDGE',
"Relative Edge",
- "Calculate relative position (using edges).",
+ "Calculate relative position (using edges)",
),
),
name="Transformation Mode",
@@ -297,7 +297,7 @@ class ShapeTransfer(Operator):
use_clamp = BoolProperty(
name="Clamp Offset",
description=("Clamp the transformation to the distance each "
- "vertex moves in the original shape."),
+ "vertex moves in the original shape"),
default=False,
)
@@ -503,7 +503,7 @@ class ShapeTransfer(Operator):
ob_act, objects = objects[0], [ob_act]
if ob_act.type != 'MESH':
- self.report({'ERROR'}, "Other object is not a mesh.")
+ self.report({'ERROR'}, "Other object is not a mesh")
return {'CANCELLED'}
if ob_act.active_shape_key is None:
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 48b547980d4..c13a04eb87a 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -77,7 +77,7 @@ class QuickFur(Operator):
if obj.type == 'MESH']
if not mesh_objects:
- self.report({'ERROR'}, "Select at least one mesh object.")
+ self.report({'ERROR'}, "Select at least one mesh object")
return {'CANCELLED'}
mat = bpy.data.materials.new("Fur Material")
@@ -157,7 +157,7 @@ class QuickExplode(Operator):
fade = BoolProperty(
name="Fade",
- description="Fade the pieces over time.",
+ description="Fade the pieces over time",
default=True,
)
@@ -307,7 +307,7 @@ class QuickSmoke(Operator):
show_flows = BoolProperty(
name="Render Smoke Objects",
- description="Keep the smoke objects visible during rendering.",
+ description="Keep the smoke objects visible during rendering",
default=False,
)
@@ -319,7 +319,7 @@ class QuickSmoke(Operator):
max_co = -min_co
if not mesh_objects:
- self.report({'ERROR'}, "Select at least one mesh object.")
+ self.report({'ERROR'}, "Select at least one mesh object")
return {'CANCELLED'}
for obj in mesh_objects:
@@ -428,7 +428,7 @@ class QuickFluid(Operator):
)
show_flows = BoolProperty(
name="Render Fluid Objects",
- description="Keep the fluid objects visible during rendering.",
+ description="Keep the fluid objects visible during rendering",
default=False,
)
start_baking = BoolProperty(
@@ -446,7 +446,7 @@ class QuickFluid(Operator):
max_co = Vector((-100000, -100000, -100000))
if not mesh_objects:
- self.report({'ERROR'}, "Select at least one mesh object.")
+ self.report({'ERROR'}, "Select at least one mesh object")
return {'CANCELLED'}
for obj in mesh_objects:
diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py
index 856e182279a..53654ffbc6f 100644
--- a/release/scripts/startup/bl_operators/sequencer.py
+++ b/release/scripts/startup/bl_operators/sequencer.py
@@ -51,7 +51,7 @@ class SequencerCrossfadeSounds(Operator):
seq2 = None
break
if seq2 is None:
- self.report({'ERROR'}, "Select 2 sound strips.")
+ self.report({'ERROR'}, "Select 2 sound strips")
return {'CANCELLED'}
if seq1.frame_final_start > seq2.frame_final_start:
s = seq1
@@ -71,7 +71,7 @@ class SequencerCrossfadeSounds(Operator):
context.scene.frame_current = tempcfra
return {'FINISHED'}
else:
- self.report({'ERROR'}, "The selected strips don't overlap.")
+ self.report({'ERROR'}, "The selected strips don't overlap")
return {'CANCELLED'}
diff --git a/release/scripts/startup/bl_operators/uvcalc_follow_active.py b/release/scripts/startup/bl_operators/uvcalc_follow_active.py
index 6c258d094e8..05656f5397d 100644
--- a/release/scripts/startup/bl_operators/uvcalc_follow_active.py
+++ b/release/scripts/startup/bl_operators/uvcalc_follow_active.py
@@ -140,7 +140,7 @@ def extend(obj, operator, EXTEND_MODE):
face_act = me.faces.active
if face_act == -1:
- operator.report({'ERROR'}, "No active face.")
+ operator.report({'ERROR'}, "No active face")
return
face_sel = [f for f in me.faces if len(f.vertices) == 4 and f.select]
@@ -152,7 +152,7 @@ def extend(obj, operator, EXTEND_MODE):
break
if face_act_local_index == -1:
- operator.report({'ERROR'}, "Active face not selected.")
+ operator.report({'ERROR'}, "Active face not selected")
return
# Modes
diff --git a/release/scripts/startup/bl_operators/uvcalc_lightmap.py b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
index 060fe400045..d9cdb1794c2 100644
--- a/release/scripts/startup/bl_operators/uvcalc_lightmap.py
+++ b/release/scripts/startup/bl_operators/uvcalc_lightmap.py
@@ -531,7 +531,7 @@ def unwrap(operator, context, **kwargs):
meshes = list({me for obj in context.selected_objects if obj.type == 'MESH' for me in (obj.data,) if me.faces and me.library is None})
if not meshes:
- operator.report({'ERROR'}, "No mesh object.")
+ operator.report({'ERROR'}, "No mesh object")
return {'CANCELLED'}
lightmap_uvpack(meshes, **kwargs)
diff --git a/release/scripts/startup/bl_operators/uvcalc_smart_project.py b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
index 23838588f43..c4466e6453f 100644
--- a/release/scripts/startup/bl_operators/uvcalc_smart_project.py
+++ b/release/scripts/startup/bl_operators/uvcalc_smart_project.py
@@ -1070,11 +1070,11 @@ def main(context,
# We want to pack all in 1 go, so pack now
if USER_SHARE_SPACE:
-#XXX Window.DrawProgressBar(0.9, "Box Packing for all objects...")
+#XXX Window.DrawProgressBar(0.9, "Box Packing for all objects...")
packIslands(collected_islandList)
print("Smart Projection time: %.2f" % (time.time() - time1))
- # Window.DrawProgressBar(0.9, "Smart Projections done, time: %.2f sec." % (time.time() - time1))
+ # Window.DrawProgressBar(0.9, "Smart Projections done, time: %.2f sec" % (time.time() - time1))
if is_editmode:
bpy.ops.object.mode_set(mode='EDIT')
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index aa09a088c4f..fae38eb1cef 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -218,7 +218,7 @@ class WM_OT_context_scale_int(Operator):
)
always_step = BoolProperty(
name="Always Step",
- description="Always adjust the value by a minimum of 1 when 'value' is not 1.0.",
+ description="Always adjust the value by a minimum of 1 when 'value' is not 1.0",
default=True,
)
@@ -567,7 +567,7 @@ doc_new = StringProperty(
)
data_path_iter = StringProperty(
- description="The data path relative to the context, must point to an iterable.")
+ description="The data path relative to the context, must point to an iterable")
data_path_item = StringProperty(
description="The data path from each iterable to the value (int or float)")
@@ -1144,6 +1144,67 @@ class WM_OT_sysinfo(Operator):
return {'FINISHED'}
+class WM_OT_get_messages(Operator):
+ bl_idname = "wm.get_messages"
+ bl_label = "Get Messages"
+
+ def _putMessage(self, messages, msg):
+ if len(msg):
+ messages[msg] = True
+
+ def _walkProperties(self, properties, messages):
+ for prop in properties:
+ self._putMessage(messages, prop.name)
+ self._putMessage(messages, prop.description)
+
+ if isinstance(prop, bpy.types.EnumProperty):
+ for item in prop.enum_items:
+ self._putMessage(messages, item.name)
+ self._putMessage(messages, item.description)
+
+ def _walkRNA(self, bl_rna, messages):
+ if bl_rna.name and bl_rna.name != bl_rna.identifier:
+ self._putMessage(messages, bl_rna.name)
+
+ if bl_rna.description:
+ self._putMessage(messages, bl_rna.description)
+
+ self._walkProperties(bl_rna.properties, messages)
+
+ def _walkClass(self, cls, messages):
+ self._walkRNA(cls.bl_rna, messages)
+
+ def _walk_keymap_hierarchy(self, hier, messages):
+ for lvl in hier:
+ self._putMessage(messages, lvl[0])
+
+ if lvl[3]:
+ self._walk_keymap_hierarchy(lvl[3], messages)
+
+ def execute(self, context):
+ messages = {}
+
+ for cls in type(bpy.context).__base__.__subclasses__():
+ self._walkClass(cls, messages)
+
+ for cls in bpy.types.Space.__subclasses__():
+ self._walkClass(cls, messages)
+
+ for cls in bpy.types.Operator.__subclasses__():
+ self._walkClass(cls, messages)
+
+ from bl_ui.space_userpref_keymap import KM_HIERARCHY
+
+ self._walk_keymap_hierarchy(KM_HIERARCHY, messages)
+
+ text = bpy.data.texts.new(name="messages.txt")
+ for message in messages:
+ text.write(message + "\n")
+ self._walkClass(bpy.types.SpaceDopeSheetEditor, messages)
+
+ return {'FINISHED'}
+
+
class WM_OT_copy_prev_settings(Operator):
'''Copy settings from previous version'''
bl_idname = "wm.copy_prev_settings"
@@ -1175,7 +1236,7 @@ class WM_OT_copy_prev_settings(Operator):
if bpy.data.is_saved is bpy.data.is_dirty is False:
bpy.ops.wm.read_homefile()
else:
- self.report({'INFO'}, "Reload Start-Up file to restore settings.")
+ self.report({'INFO'}, "Reload Start-Up file to restore settings")
return {'FINISHED'}
return {'CANCELLED'}
diff --git a/release/scripts/startup/bl_ui/properties_animviz.py b/release/scripts/startup/bl_ui/properties_animviz.py
index 3b33a7ccc61..499ea4c95d4 100644
--- a/release/scripts/startup/bl_ui/properties_animviz.py
+++ b/release/scripts/startup/bl_ui/properties_animviz.py
@@ -23,7 +23,7 @@
# NOTE:
# The specialised panel types are derived in their respective UI modules
# dont register these classes since they are only helpers.
-
+from blf import gettext as _
class MotionPathButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -43,23 +43,23 @@ class MotionPathButtonsPanel():
col = split.column()
sub = col.column(align=True)
if (mps.type == 'CURRENT_FRAME'):
- sub.prop(mps, "frame_before", text="Before")
- sub.prop(mps, "frame_after", text="After")
+ sub.prop(mps, "frame_before", text=_("Before"))
+ sub.prop(mps, "frame_after", text=_("After"))
elif (mps.type == 'RANGE'):
- sub.prop(mps, "frame_start", text="Start")
- sub.prop(mps, "frame_end", text="End")
+ sub.prop(mps, "frame_start", text=_("Start"))
+ sub.prop(mps, "frame_end", text=_("End"))
- sub.prop(mps, "frame_step", text="Step")
+ sub.prop(mps, "frame_step", text=_("Step"))
if bones:
col.row().prop(mps, "bake_location", expand=True)
col = split.column()
- col.label(text="Display:")
- col.prop(mps, "show_frame_numbers", text="Frame Numbers")
- col.prop(mps, "show_keyframe_highlight", text="Keyframes")
+ col.label(text=_("Display:"))
+ col.prop(mps, "show_frame_numbers", text=_("Frame Numbers"))
+ col.prop(mps, "show_keyframe_highlight", text=_("Keyframes"))
if bones:
- col.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes")
- col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers")
+ col.prop(mps, "show_keyframe_action_all", text=_("+ Non-Grouped Keyframes"))
+ col.prop(mps, "show_keyframe_numbers", text=_("Keyframe Numbers"))
# FIXME: this panel still needs to be ported so that it will work correctly with animviz
@@ -82,16 +82,16 @@ class OnionSkinButtonsPanel():
sub = col.column(align=True)
if arm.ghost_type == 'RANGE':
- sub.prop(arm, "ghost_frame_start", text="Start")
- sub.prop(arm, "ghost_frame_end", text="End")
- sub.prop(arm, "ghost_size", text="Step")
+ sub.prop(arm, "ghost_frame_start", text=_("Start"))
+ sub.prop(arm, "ghost_frame_end", text=_("End"))
+ sub.prop(arm, "ghost_size", text=_("Step"))
elif arm.ghost_type == 'CURRENT_FRAME':
- sub.prop(arm, "ghost_step", text="Range")
- sub.prop(arm, "ghost_size", text="Step")
+ sub.prop(arm, "ghost_step", text=_("Range"))
+ sub.prop(arm, "ghost_size", text=_("Step"))
col = split.column()
- col.label(text="Display:")
- col.prop(arm, "show_only_ghost_selected", text="Selected Only")
+ col.label(text=_("Display:"))
+ col.prop(arm, "show_only_ghost_selected", text=_("Selected Only"))
if __name__ == "__main__": # only for live edit.
import bpy
diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 463ba84470f..e5729a24b91 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel, Menu
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class ArmatureButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -60,20 +60,21 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, Panel):
layout.prop(arm, "pose_position", expand=True)
col = layout.column()
- col.label(text="Layers:")
+ col.label(text=_("Layers:"))
col.prop(arm, "layers", text="")
- col.label(text="Protected Layers:")
+ 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")
+ 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, "vert_deformer", expand=True)
+
class DATA_PT_display(ArmatureButtonsPanel, Panel):
bl_label = "Display"
@@ -88,15 +89,15 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(arm, "show_names", text="Names")
- col.prop(arm, "show_axes", text="Axes")
- col.prop(arm, "show_bone_custom_shapes", text="Shapes")
+ col.prop(arm, "show_names", text=_("Names"))
+ col.prop(arm, "show_axes", text=_("Axes"))
+ col.prop(arm, "show_bone_custom_shapes", text=_("Shapes"))
col = split.column()
- col.prop(arm, "show_group_colors", text="Colors")
+ col.prop(arm, "show_group_colors", text=_("Colors"))
if ob:
- col.prop(ob, "show_x_ray", text="X-Ray")
- col.prop(arm, "use_deform_delay", text="Delay Refresh")
+ col.prop(ob, "show_x_ray", text=_("X-Ray"))
+ col.prop(arm, "use_deform_delay", text=_("Delay Refresh"))
class DATA_PT_bone_group_specials(Menu):
@@ -160,12 +161,12 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
row.active = (ob.proxy is None)
sub = row.row(align=True)
- sub.operator("pose.group_assign", text="Assign")
- sub.operator("pose.group_unassign", text="Remove") # row.operator("pose.bone_group_remove_from", text="Remove")
+ sub.operator("pose.group_assign", text=_("Assign"))
+ sub.operator("pose.group_unassign", text=_("Remove")) # row.operator("pose.bone_group_remove_from", text=_("Remove"))
sub = row.row(align=True)
- sub.operator("pose.group_select", text="Select")
- sub.operator("pose.group_deselect", text="Deselect")
+ sub.operator("pose.group_select", text=_("Select"))
+ sub.operator("pose.group_deselect", text=_("Deselect"))
class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
@@ -185,11 +186,10 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
layout.template_ID(ob, "pose_library", new="poselib.new", unlink="poselib.unlink")
if poselib:
-
- # list of poses in pose library
+ # list of poses in pose library
row = layout.row()
row.template_list(poselib, "pose_markers", poselib.pose_markers, "active_index", rows=5)
-
+
# column of operators for active pose
# - goes beside list
col = row.column(align=True)
@@ -206,9 +206,9 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
if pose_marker_active is not None:
col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = pose_marker_active.name
col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index
-
- col.operator("poselib.action_sanitise", icon='HELP', text="") # XXX: put in menu?
-
+
+ col.operator("poselib.action_sanitise", icon='HELP', text="") # XXX: put in menu?
+
# properties for active marker
if pose_marker_active is not None:
layout.prop(pose_marker_active, "name")
@@ -230,16 +230,16 @@ class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
col = split.column(align=True)
if arm.ghost_type == 'RANGE':
- col.prop(arm, "ghost_frame_start", text="Start")
- col.prop(arm, "ghost_frame_end", text="End")
- col.prop(arm, "ghost_size", text="Step")
+ col.prop(arm, "ghost_frame_start", text=_("Start"))
+ col.prop(arm, "ghost_frame_end", text=_("End"))
+ col.prop(arm, "ghost_size", text=_("Step"))
elif arm.ghost_type == 'CURRENT_FRAME':
- col.prop(arm, "ghost_step", text="Range")
- col.prop(arm, "ghost_size", text="Step")
+ col.prop(arm, "ghost_step", text=_("Range"))
+ col.prop(arm, "ghost_size", text=_("Step"))
col = split.column()
- col.label(text="Display:")
- col.prop(arm, "show_only_ghost_selected", text="Selected Only")
+ col.label(text=_("Display:"))
+ col.prop(arm, "show_only_ghost_selected", text=_("Selected Only"))
class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
@@ -263,7 +263,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
layout.prop(itasc, "mode", expand=True)
simulation = (itasc.mode == 'SIMULATION')
if simulation:
- layout.label(text="Reiteration:")
+ layout.label(text=_("Reiteration:"))
layout.prop(itasc, "reiteration_method", expand=True)
row = layout.row()
@@ -275,8 +275,8 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
layout.prop(itasc, "use_auto_step")
row = layout.row()
if itasc.use_auto_step:
- row.prop(itasc, "step_min", text="Min")
- row.prop(itasc, "step_max", text="Max")
+ row.prop(itasc, "step_min", text=_("Min"))
+ row.prop(itasc, "step_max", text=_("Max"))
else:
row.prop(itasc, "step_count")
@@ -286,7 +286,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
layout.prop(itasc, "velocity_max")
if itasc.solver == 'DLS':
row = layout.row()
- row.prop(itasc, "damping_max", text="Damp", slider=True)
+ row.prop(itasc, "damping_max", text=_("Damp"), slider=True)
row.prop(itasc, "damping_epsilon", text="Eps", slider=True)
from bl_ui.properties_animviz import (
@@ -314,8 +314,8 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
layout.separator()
split = layout.split()
- split.operator("pose.paths_calculate", text="Calculate Paths")
- split.operator("pose.paths_clear", text="Clear Paths")
+ split.operator("pose.paths_calculate", text=_("Calculate Paths"))
+ split.operator("pose.paths_clear", text=_("Clear Paths"))
class DATA_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit from panel when ready
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py
index b3eaf88d5bf..2c9b31fd88d 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -21,7 +21,7 @@
import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class BoneButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -76,14 +76,14 @@ class BONE_PT_transform(BoneButtonsPanel, Panel):
col = row.column()
if pchan.rotation_mode == 'QUATERNION':
- col.prop(pchan, "rotation_quaternion", text="Rotation")
+ col.prop(pchan, "rotation_quaternion", text=_("Rotation"))
elif pchan.rotation_mode == 'AXIS_ANGLE':
- #col.label(text="Rotation")
- #col.prop(pchan, "rotation_angle", text="Angle")
- #col.prop(pchan, "rotation_axis", text="Axis")
- col.prop(pchan, "rotation_axis_angle", text="Rotation")
+ #col.label(text=_("Rotation"))
+ #col.prop(pchan, "rotation_angle", text=_("Angle"))
+ #col.prop(pchan, "rotation_axis", text=_("Axis"))
+ col.prop(pchan, "rotation_axis_angle", text=_("Rotation"))
else:
- col.prop(pchan, "rotation_euler", text="Rotation")
+ col.prop(pchan, "rotation_euler", text=_("Rotation"))
row.column().prop(pchan, "scale")
@@ -97,7 +97,7 @@ class BONE_PT_transform(BoneButtonsPanel, Panel):
col = row.column()
sub = col.column(align=True)
- sub.label(text="Roll:")
+ sub.label(text=_("Roll:"))
sub.prop(bone, "roll", text="")
sub.label()
sub.prop(bone, "lock")
@@ -126,12 +126,12 @@ class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
col = row.column()
if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
- col.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
+ col.prop(pchan, "lock_rotations_4d", text=_("Lock Rotation"))
if pchan.lock_rotations_4d:
col.prop(pchan, "lock_rotation_w", text="W")
col.prop(pchan, "lock_rotation", text="")
else:
- col.prop(pchan, "lock_rotation", text="Rotation")
+ col.prop(pchan, "lock_rotation", text=_("Rotation"))
row.column().prop(pchan, "lock_scale")
@@ -155,17 +155,17 @@ class BONE_PT_relations(BoneButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Layers:")
+ col.label(text=_("Layers:"))
col.prop(bone, "layers", text="")
col.separator()
if ob and pchan:
- col.label(text="Bone Group:")
+ col.label(text=_("Bone Group:"))
col.prop_search(pchan, "bone_group", ob.pose, "bone_groups", text="")
col = split.column()
- col.label(text="Parent:")
+ col.label(text=_("Parent:"))
if context.bone:
col.prop(bone, "parent", text="")
else:
@@ -174,11 +174,11 @@ class BONE_PT_relations(BoneButtonsPanel, Panel):
sub = col.column()
sub.active = (bone.parent is not None)
sub.prop(bone, "use_connect")
- sub.prop(bone, "use_inherit_rotation", text="Inherit Rotation")
- sub.prop(bone, "use_inherit_scale", text="Inherit Scale")
+ sub.prop(bone, "use_inherit_rotation", text=_("Inherit Rotation"))
+ sub.prop(bone, "use_inherit_scale", text=_("Inherit Scale"))
sub = col.column()
sub.active = (not bone.parent or not bone.use_connect)
- sub.prop(bone, "use_local_location", text="Local Location")
+ sub.prop(bone, "use_local_location", text=_("Local Location"))
class BONE_PT_display(BoneButtonsPanel, Panel):
@@ -206,16 +206,16 @@ class BONE_PT_display(BoneButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(bone, "show_wire", text="Wireframe")
- col.prop(bone, "hide", text="Hide")
+ col.prop(bone, "show_wire", text=_("Wireframe"))
+ col.prop(bone, "hide", text=_("Hide"))
if pchan:
col = split.column()
- col.label(text="Custom Shape:")
+ col.label(text=_("Custom Shape:"))
col.prop(pchan, "custom_shape", text="")
if pchan.custom_shape:
- col.prop_search(pchan, "custom_shape_transform", ob.pose, "bones", text="At")
+ col.prop_search(pchan, "custom_shape_transform", ob.pose, "bones", text=_("At"))
class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
@@ -241,13 +241,13 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
split.prop(pchan, "lock_ik_x", icon='LOCKED' if pchan.lock_ik_x else 'UNLOCKED', text="X")
split.active = pchan.is_in_ik_chain
row = split.row()
- row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
+ row.prop(pchan, "ik_stiffness_x", text=_("Stiffness"), slider=True)
row.active = pchan.lock_ik_x == False and pchan.is_in_ik_chain
split = layout.split(percentage=0.25)
sub = split.row()
- sub.prop(pchan, "use_ik_limit_x", text="Limit")
+ sub.prop(pchan, "use_ik_limit_x", text=_("Limit"))
sub.active = pchan.lock_ik_x == False and pchan.is_in_ik_chain
sub = split.row(align=True)
sub.prop(pchan, "ik_min_x", text="")
@@ -258,13 +258,13 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
split.prop(pchan, "lock_ik_y", icon='LOCKED' if pchan.lock_ik_y else 'UNLOCKED', text="Y")
split.active = pchan.is_in_ik_chain
row = split.row()
- row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
+ row.prop(pchan, "ik_stiffness_y", text=_("Stiffness"), slider=True)
row.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
split = layout.split(percentage=0.25)
sub = split.row()
- sub.prop(pchan, "use_ik_limit_y", text="Limit")
+ sub.prop(pchan, "use_ik_limit_y", text=_("Limit"))
sub.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
sub = split.row(align=True)
@@ -276,13 +276,13 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
split.prop(pchan, "lock_ik_z", icon='LOCKED' if pchan.lock_ik_z else 'UNLOCKED', text="Z")
split.active = pchan.is_in_ik_chain
sub = split.row()
- sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
+ sub.prop(pchan, "ik_stiffness_z", text=_("Stiffness"), slider=True)
sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
split = layout.split(percentage=0.25)
sub = split.row()
- sub.prop(pchan, "use_ik_limit_z", text="Limit")
+ sub.prop(pchan, "use_ik_limit_z", text=_("Limit"))
sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
sub = split.row(align=True)
sub.prop(pchan, "ik_min_z", text="")
@@ -290,7 +290,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
sub.active = pchan.lock_ik_z == False and pchan.use_ik_limit_z and pchan.is_in_ik_chain
split = layout.split(percentage=0.25)
- split.label(text="Stretch:")
+ split.label(text=_("Stretch:"))
sub = split.row()
sub.prop(pchan, "ik_stretch", text="", slider=True)
sub.active = pchan.is_in_ik_chain
@@ -298,15 +298,15 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
if ob.pose.ik_solver == 'ITASC':
split = layout.split()
col = split.column()
- col.prop(pchan, "use_ik_rotation_control", text="Control Rotation")
+ col.prop(pchan, "use_ik_rotation_control", text=_("Control Rotation"))
col.active = pchan.is_in_ik_chain
col = split.column()
- col.prop(pchan, "ik_rotation_weight", text="Weight", slider=True)
+ col.prop(pchan, "ik_rotation_weight", text=_("Weight"), slider=True)
col.active = pchan.is_in_ik_chain
# not supported yet
#row = layout.row()
- #row.prop(pchan, "use_ik_linear_control", text="Joint Size")
- #row.prop(pchan, "ik_linear_weight", text="Weight", slider=True)
+ #row.prop(pchan, "use_ik_linear_control", text=_("Joint Size"))
+ #row.prop(pchan, "ik_linear_weight", text=_("Weight"), slider=True)
class BONE_PT_deform(BoneButtonsPanel, Panel):
@@ -334,27 +334,27 @@ class BONE_PT_deform(BoneButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Envelope:")
+ col.label(text=_("Envelope:"))
sub = col.column(align=True)
- sub.prop(bone, "envelope_distance", text="Distance")
- sub.prop(bone, "envelope_weight", text="Weight")
- col.prop(bone, "use_envelope_multiply", text="Multiply")
+ sub.prop(bone, "envelope_distance", text=_("Distance"))
+ sub.prop(bone, "envelope_weight", text=_("Weight"))
+ col.prop(bone, "use_envelope_multiply", text=_("Multiply"))
sub = col.column(align=True)
- sub.label(text="Radius:")
- sub.prop(bone, "head_radius", text="Head")
- sub.prop(bone, "tail_radius", text="Tail")
+ sub.label(text=_("Radius:"))
+ sub.prop(bone, "head_radius", text=_("Head"))
+ sub.prop(bone, "tail_radius", text=_("Tail"))
col = split.column()
- col.label(text="Curved Bones:")
+ col.label(text=_("Curved Bones:"))
sub = col.column(align=True)
- sub.prop(bone, "bbone_segments", text="Segments")
- sub.prop(bone, "bbone_in", text="Ease In")
- sub.prop(bone, "bbone_out", text="Ease Out")
+ sub.prop(bone, "bbone_segments", text=_("Segments"))
+ sub.prop(bone, "bbone_in", text=_("Ease In"))
+ sub.prop(bone, "bbone_out", text=_("Ease Out"))
- col.label(text="Offset:")
+ col.label(text=_("Offset:"))
col.prop(bone, "use_cyclic_offset")
diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py
index 5255af40951..0d79ec99789 100644
--- a/release/scripts/startup/bl_ui/properties_data_camera.py
+++ b/release/scripts/startup/bl_ui/properties_data_camera.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class CameraButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -91,16 +91,16 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
split = layout.split()
col = split.column(align=True)
- col.label(text="Shift:")
+ col.label(text=_("Shift:"))
col.prop(cam, "shift_x", text="X")
col.prop(cam, "shift_y", text="Y")
col = split.column(align=True)
- col.label(text="Clipping:")
- col.prop(cam, "clip_start", text="Start")
- col.prop(cam, "clip_end", text="End")
+ col.label(text=_("Clipping:"))
+ col.prop(cam, "clip_start", text=_("Start"))
+ col.prop(cam, "clip_end", text=_("End"))
- layout.label(text="Depth of Field:")
+ layout.label(text=_("Depth of Field:"))
split = layout.split()
split.prop(cam, "dof_object", text="")
@@ -109,7 +109,7 @@ class DATA_PT_camera(CameraButtonsPanel, Panel):
if cam.dof_object is not None:
col.enabled = False
- col.prop(cam, "dof_distance", text="Distance")
+ col.prop(cam, "dof_distance", text=_("Distance"))
class DATA_PT_camera_display(CameraButtonsPanel, Panel):
@@ -124,19 +124,19 @@ class DATA_PT_camera_display(CameraButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(cam, "show_limits", text="Limits")
- col.prop(cam, "show_mist", text="Mist")
- col.prop(cam, "show_title_safe", text="Title Safe")
- col.prop(cam, "show_name", text="Name")
+ col.prop(cam, "show_limits", text=_("Limits"))
+ col.prop(cam, "show_mist", text=_("Mist"))
+ col.prop(cam, "show_title_safe", text=_("Title Safe"))
+ col.prop(cam, "show_name", text=_("Name"))
col.prop_menu_enum(cam, "show_guide")
col = split.column()
- col.prop(cam, "draw_size", text="Size")
+ col.prop(cam, "draw_size", text=_("Size"))
col.separator()
- col.prop(cam, "show_passepartout", text="Passepartout")
+ col.prop(cam, "show_passepartout", text=_("Passepartout"))
sub = col.column()
sub.active = cam.show_passepartout
- sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
+ sub.prop(cam, "passepartout_alpha", text=_("Alpha"), slider=True)
class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_data_curve.py b/release/scripts/startup/bl_ui/properties_data_curve.py
index 6448b9a5229..861359fbed4 100644
--- a/release/scripts/startup/bl_ui/properties_data_curve.py
+++ b/release/scripts/startup/bl_ui/properties_data_curve.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class CurveButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -67,7 +67,7 @@ class DATA_PT_context_curve(CurveButtonsPanel, Panel):
class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
- bl_label = "Shape"
+ bl_label = _("Shape")
def draw(self, context):
layout = self.layout
@@ -85,17 +85,17 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Resolution:")
+ col.label(text=_("Resolution:"))
sub = col.column(align=True)
- sub.prop(curve, "resolution_u", text="Preview U")
- sub.prop(curve, "render_resolution_u", text="Render U")
+ sub.prop(curve, "resolution_u", text=_("Preview U"))
+ sub.prop(curve, "render_resolution_u", text=_("Render U"))
if is_curve:
- col.label(text="Twisting:")
+ col.label(text=_("Twisting:"))
col.prop(curve, "twist_mode", text="")
- col.prop(curve, "twist_smooth", text="Smooth")
+ col.prop(curve, "twist_smooth", text=_("Smooth"))
if is_text:
- col.label(text="Display:")
- col.prop(curve, "use_fast_edit", text="Fast Editing")
+ col.label(text=_("Display:"))
+ col.prop(curve, "use_fast_edit", text=_("Fast Editing"))
col = split.column()
@@ -103,16 +103,15 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
sub = col.column()
sub.label(text="")
sub = col.column(align=True)
- sub.prop(curve, "resolution_v", text="Preview V")
- sub.prop(curve, "render_resolution_v", text="Render V")
+ sub.prop(curve, "resolution_v", text=_("Preview V"))
+ sub.prop(curve, "render_resolution_v", text=_("Render V"))
if (is_curve or is_text):
- col.label(text="Fill:")
+ col.label(text=_("Fill:"))
sub = col.column()
sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D'))
- sub.prop(curve, "use_fill_front")
- sub.prop(curve, "use_fill_back")
- col.prop(curve, "use_fill_deform", text="Fill Deformed")
+ sub.prop(curve, "fill_mode", text="")
+ col.prop(curve, "use_fill_deform", text=_("Fill Deformed"))
class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
@@ -130,8 +129,8 @@ class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
row.prop(curve, "use_uv_as_generated")
row = layout.row()
- row.column().prop(curve, "texspace_location", text="Location")
- row.column().prop(curve, "texspace_size", text="Size")
+ row.column().prop(curve, "texspace_location", text=_("Location"))
+ row.column().prop(curve, "texspace_size", text=_("Size"))
class DATA_PT_geometry_curve(CurveButtonsPanel, Panel):
@@ -153,17 +152,17 @@ class DATA_PT_geometry_curve(CurveButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Modification:")
+ col.label(text=_("Modification:"))
col.prop(curve, "offset")
col.prop(curve, "extrude")
- col.label(text="Taper Object:")
+ col.label(text=_("Taper Object:"))
col.prop(curve, "taper_object", text="")
col = split.column()
- col.label(text="Bevel:")
- col.prop(curve, "bevel_depth", text="Depth")
- col.prop(curve, "bevel_resolution", text="Resolution")
- col.label(text="Bevel Object:")
+ col.label(text=_("Bevel:"))
+ col.prop(curve, "bevel_depth", text=_("Depth"))
+ col.prop(curve, "bevel_resolution", text=_("Resolution"))
+ col.label(text=_("Bevel Object:"))
col.prop(curve, "bevel_object", text="")
@@ -183,7 +182,7 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
layout.active = curve.use_path
col = layout.column()
- layout.prop(curve, "path_duration", text="Frames")
+ layout.prop(curve, "path_duration", text=_("Frames"))
layout.prop(curve, "eval_time")
split = layout.split()
@@ -195,7 +194,7 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
col = split.column()
col.prop(curve, "use_radius")
- col.prop(curve, "use_time_offset", text="Offset Children")
+ col.prop(curve, "use_time_offset", text=_("Offset Children"))
class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
@@ -216,20 +215,20 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
# These settings are below but its easier to have
# poly's set aside since they use so few settings
col = split.column()
- col.label(text="Cyclic:")
+ col.label(text=_("Cyclic:"))
col.prop(act_spline, "use_smooth")
col = split.column()
col.prop(act_spline, "use_cyclic_u", text="U")
else:
col = split.column()
- col.label(text="Cyclic:")
+ col.label(text=_("Cyclic:"))
if act_spline.type == 'NURBS':
- col.label(text="Bezier:")
- col.label(text="Endpoint:")
- col.label(text="Order:")
+ col.label(text=_("Bezier:"))
+ col.label(text=_("Endpoint:"))
+ col.label(text=_("Order:"))
- col.label(text="Resolution:")
+ col.label(text=_("Resolution:"))
col = split.column()
col.prop(act_spline, "use_cyclic_u", text="U")
@@ -262,9 +261,9 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
col = split.column()
col.active = (curve.dimensions == '3D')
- col.label(text="Interpolation:")
- col.prop(act_spline, "tilt_interpolation", text="Tilt")
- col.prop(act_spline, "radius_interpolation", text="Radius")
+ col.label(text=_("Interpolation:"))
+ col.prop(act_spline, "tilt_interpolation", text=_("Tilt"))
+ col.prop(act_spline, "radius_interpolation", text=_("Radius"))
layout.prop(act_spline, "use_smooth")
@@ -283,16 +282,16 @@ class DATA_PT_font(CurveButtonsPanel, Panel):
char = context.curve.edit_format
row = layout.split(percentage=0.25)
- row.label(text="Regular")
+ row.label(text=_("Regular"))
row.template_ID(text, "font", open="font.open", unlink="font.unlink")
row = layout.split(percentage=0.25)
- row.label(text="Bold")
+ row.label(text=_("Bold"))
row.template_ID(text, "font_bold", open="font.open", unlink="font.unlink")
row = layout.split(percentage=0.25)
- row.label(text="Italic")
+ row.label(text=_("Italic"))
row.template_ID(text, "font_italic", open="font.open", unlink="font.unlink")
row = layout.split(percentage=0.25)
- row.label(text="Bold & Italic")
+ row.label(text=_("Bold & Italic"))
row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
#layout.prop(text, "font")
@@ -300,36 +299,36 @@ class DATA_PT_font(CurveButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(text, "size", text="Size")
+ col.prop(text, "size", text=_("Size"))
col = split.column()
col.prop(text, "shear")
split = layout.split()
col = split.column()
- col.label(text="Object Font:")
+ col.label(text=_("Object Font:"))
col.prop(text, "family", text="")
col = split.column()
- col.label(text="Text on Curve:")
+ col.label(text=_("Text on Curve:"))
col.prop(text, "follow_curve", text="")
split = layout.split()
col = split.column()
colsub = col.column(align=True)
- colsub.label(text="Underline:")
- colsub.prop(text, "underline_position", text="Position")
- colsub.prop(text, "underline_height", text="Thickness")
+ colsub.label(text=_("Underline:"))
+ colsub.prop(text, "underline_position", text=_("Position"))
+ colsub.prop(text, "underline_height", text=_("Thickness"))
col = split.column()
- col.label(text="Character:")
+ col.label(text=_("Character:"))
col.prop(char, "use_bold")
col.prop(char, "use_italic")
col.prop(char, "use_underline")
row = layout.row()
- row.prop(text, "small_caps_scale", text="Small Caps")
+ row.prop(text, "small_caps_scale", text=_("Small Caps"))
row.prop(char, "use_small_caps")
@@ -345,19 +344,19 @@ class DATA_PT_paragraph(CurveButtonsPanel, Panel):
text = context.curve
- layout.label(text="Align:")
+ layout.label(text=_("Align:"))
layout.prop(text, "align", expand=True)
split = layout.split()
col = split.column(align=True)
- col.label(text="Spacing:")
- col.prop(text, "space_character", text="Character")
- col.prop(text, "space_word", text="Word")
- col.prop(text, "space_line", text="Line")
+ col.label(text=_("Spacing:"))
+ col.prop(text, "space_character", text=_("Character"))
+ col.prop(text, "space_word", text=_("Word"))
+ col.prop(text, "space_line", text=_("Line"))
col = split.column(align=True)
- col.label(text="Offset:")
+ col.label(text=_("Offset:"))
col.prop(text, "offset_x", text="X")
col.prop(text, "offset_y", text="Y")
@@ -389,13 +388,13 @@ class DATA_PT_text_boxes(CurveButtonsPanel, Panel):
col = split.column(align=True)
- col.label(text="Dimensions:")
- col.prop(box, "width", text="Width")
- col.prop(box, "height", text="Height")
+ col.label(text=_("Dimensions:"))
+ col.prop(box, "width", text=_("Width"))
+ col.prop(box, "height", text=_("Height"))
col = split.column(align=True)
- col.label(text="Offset:")
+ col.label(text=_("Offset:"))
col.prop(box, "x", text="X")
col.prop(box, "y", text="Y")
diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py
index c781873e16c..b6fa6d8e839 100644
--- a/release/scripts/startup/bl_ui/properties_data_empty.py
+++ b/release/scripts/startup/bl_ui/properties_data_empty.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -39,17 +39,17 @@ class DATA_PT_empty(DataButtonsPanel, Panel):
ob = context.object
- layout.prop(ob, "empty_draw_type", text="Display")
+ layout.prop(ob, "empty_draw_type", text=_("Display"))
if ob.empty_draw_type == 'IMAGE':
layout.template_ID(ob, "data", open="image.open", unlink="image.unlink")
- layout.prop(ob, "color", text="Transparency", index=3, slider=True)
+ layout.prop(ob, "color", text=_("Transparency"), index=3, slider=True)
row = layout.row(align=True)
- row.prop(ob, "empty_image_offset", text="Offset X", index=0)
- row.prop(ob, "empty_image_offset", text="Offset Y", index=1)
+ row.prop(ob, "empty_image_offset", text=_("Offset X"), index=0)
+ row.prop(ob, "empty_image_offset", text=_("Offset Y"), index=1)
- layout.prop(ob, "empty_draw_size", text="Size")
+ layout.prop(ob, "empty_draw_size", text=_("Size"))
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_data_lamp.py b/release/scripts/startup/bl_ui/properties_data_lamp.py
index 4ff180f74fb..93ed8ca369b 100644
--- a/release/scripts/startup/bl_ui/properties_data_lamp.py
+++ b/release/scripts/startup/bl_ui/properties_data_lamp.py
@@ -20,10 +20,10 @@
import bpy
from bpy.types import Menu, Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class LAMP_MT_sunsky_presets(Menu):
- bl_label = "Sun & Sky Presets"
+ bl_label = _("Sun & Sky Presets")
preset_subdir = "sunsky"
preset_operator = "script.execute_preset"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -93,15 +93,15 @@ class DATA_PT_lamp(DataButtonsPanel, Panel):
sub.prop(lamp, "energy")
if lamp.type in {'POINT', 'SPOT'}:
- sub.label(text="Falloff:")
+ sub.label(text=_("Falloff:"))
sub.prop(lamp, "falloff_type", text="")
sub.prop(lamp, "distance")
if lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED':
- col.label(text="Attenuation Factors:")
+ col.label(text=_("Attenuation Factors:"))
sub = col.column(align=True)
- sub.prop(lamp, "linear_attenuation", slider=True, text="Linear")
- sub.prop(lamp, "quadratic_attenuation", slider=True, text="Quadratic")
+ sub.prop(lamp, "linear_attenuation", slider=True, text=_("Linear"))
+ sub.prop(lamp, "quadratic_attenuation", slider=True, text=_("Quadratic"))
col.prop(lamp, "use_sphere")
@@ -111,7 +111,7 @@ class DATA_PT_lamp(DataButtonsPanel, Panel):
col = split.column()
col.prop(lamp, "use_negative")
- col.prop(lamp, "use_own_layer", text="This Layer Only")
+ col.prop(lamp, "use_own_layer", text=_("This Layer Only"))
col.prop(lamp, "use_specular")
col.prop(lamp, "use_diffuse")
@@ -139,34 +139,34 @@ class DATA_PT_sunsky(DataButtonsPanel, Panel):
row = layout.row()
row.active = lamp.use_sky or lamp.use_atmosphere
- row.prop(lamp, "atmosphere_turbidity", text="Turbidity")
+ row.prop(lamp, "atmosphere_turbidity", text=_("Turbidity"))
split = layout.split()
col = split.column()
col.active = lamp.use_sky
- col.label(text="Blending:")
+ col.label(text=_("Blending:"))
sub = col.column()
sub.prop(lamp, "sky_blend_type", text="")
- sub.prop(lamp, "sky_blend", text="Factor")
+ sub.prop(lamp, "sky_blend", text=_("Factor"))
- col.label(text="Color Space:")
+ col.label(text=_("Color Space:"))
sub = col.column()
sub.row().prop(lamp, "sky_color_space", expand=True)
- sub.prop(lamp, "sky_exposure", text="Exposure")
+ sub.prop(lamp, "sky_exposure", text=_("Exposure"))
col = split.column()
col.active = lamp.use_sky
- col.label(text="Horizon:")
+ col.label(text=_("Horizon:"))
sub = col.column()
- sub.prop(lamp, "horizon_brightness", text="Brightness")
- sub.prop(lamp, "spread", text="Spread")
+ sub.prop(lamp, "horizon_brightness", text=_("Brightness"))
+ sub.prop(lamp, "spread", text=_("Spread"))
- col.label(text="Sun:")
+ col.label(text=_("Sun:"))
sub = col.column()
- sub.prop(lamp, "sun_brightness", text="Brightness")
- sub.prop(lamp, "sun_size", text="Size")
- sub.prop(lamp, "backscattered_light", slider=True, text="Back Light")
+ sub.prop(lamp, "sun_brightness", text=_("Brightness"))
+ sub.prop(lamp, "sun_size", text=_("Size"))
+ sub.prop(lamp, "backscattered_light", slider=True, text=_("Back Light"))
layout.separator()
@@ -176,16 +176,16 @@ class DATA_PT_sunsky(DataButtonsPanel, Panel):
col = split.column()
col.active = lamp.use_atmosphere
- col.label(text="Intensity:")
- col.prop(lamp, "sun_intensity", text="Sun")
- col.prop(lamp, "atmosphere_distance_factor", text="Distance")
+ col.label(text=_("Intensity:"))
+ col.prop(lamp, "sun_intensity", text=_("Sun"))
+ col.prop(lamp, "atmosphere_distance_factor", text=_("Distance"))
col = split.column()
col.active = lamp.use_atmosphere
- col.label(text="Scattering:")
+ col.label(text=_("Scattering:"))
sub = col.column(align=True)
- sub.prop(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
- sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
+ sub.prop(lamp, "atmosphere_inscattering", slider=True, text=_("Inscattering"))
+ sub.prop(lamp, "atmosphere_extinction", slider=True, text=_("Extinction"))
class DATA_PT_shadow(DataButtonsPanel, Panel):
@@ -209,15 +209,15 @@ class DATA_PT_shadow(DataButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Form factor sampling:")
+ col.label(text=_("Form factor sampling:"))
sub = col.row(align=True)
if lamp.shape == 'SQUARE':
- sub.prop(lamp, "shadow_ray_samples_x", text="Samples")
+ sub.prop(lamp, "shadow_ray_samples_x", text=_("Samples"))
elif lamp.shape == 'RECTANGLE':
- sub.prop(lamp, "shadow_ray_samples_x", text="Samples X")
- sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y")
+ sub.prop(lamp, "shadow_ray_samples_x", text=_("Samples X"))
+ sub.prop(lamp, "shadow_ray_samples_y", text=_("Samples Y"))
if lamp.shadow_method != 'NOSHADOW':
split = layout.split()
@@ -226,34 +226,34 @@ class DATA_PT_shadow(DataButtonsPanel, Panel):
col.prop(lamp, "shadow_color", text="")
col = split.column()
- col.prop(lamp, "use_shadow_layer", text="This Layer Only")
+ col.prop(lamp, "use_shadow_layer", text=_("This Layer Only"))
col.prop(lamp, "use_only_shadow")
if lamp.shadow_method == 'RAY_SHADOW':
split = layout.split()
col = split.column()
- col.label(text="Sampling:")
+ col.label(text=_("Sampling:"))
if lamp.type in {'POINT', 'SUN', 'SPOT'}:
sub = col.row()
- sub.prop(lamp, "shadow_ray_samples", text="Samples")
- sub.prop(lamp, "shadow_soft_size", text="Soft Size")
+ sub.prop(lamp, "shadow_ray_samples", text=_("Samples"))
+ sub.prop(lamp, "shadow_soft_size", text=_("Soft Size"))
elif lamp.type == 'AREA':
sub = col.row(align=True)
if lamp.shape == 'SQUARE':
- sub.prop(lamp, "shadow_ray_samples_x", text="Samples")
+ sub.prop(lamp, "shadow_ray_samples_x", text=_("Samples"))
elif lamp.shape == 'RECTANGLE':
- sub.prop(lamp, "shadow_ray_samples_x", text="Samples X")
- sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y")
+ sub.prop(lamp, "shadow_ray_samples_x", text=_("Samples X"))
+ sub.prop(lamp, "shadow_ray_samples_y", text=_("Samples Y"))
col.row().prop(lamp, "shadow_ray_sample_method", expand=True)
if lamp.shadow_ray_sample_method == 'ADAPTIVE_QMC':
- layout.prop(lamp, "shadow_adaptive_threshold", text="Threshold")
+ layout.prop(lamp, "shadow_adaptive_threshold", text=_("Threshold"))
if lamp.type == 'AREA' and lamp.shadow_ray_sample_method == 'CONSTANT_JITTERED':
row = layout.row()
@@ -263,44 +263,44 @@ class DATA_PT_shadow(DataButtonsPanel, Panel):
elif lamp.shadow_method == 'BUFFER_SHADOW':
col = layout.column()
- col.label(text="Buffer Type:")
+ col.label(text=_("Buffer Type:"))
col.row().prop(lamp, "shadow_buffer_type", expand=True)
if lamp.shadow_buffer_type in {'REGULAR', 'HALFWAY', 'DEEP'}:
split = layout.split()
col = split.column()
- col.label(text="Filter Type:")
+ col.label(text=_("Filter Type:"))
col.prop(lamp, "shadow_filter_type", text="")
sub = col.column(align=True)
- sub.prop(lamp, "shadow_buffer_soft", text="Soft")
- sub.prop(lamp, "shadow_buffer_bias", text="Bias")
+ sub.prop(lamp, "shadow_buffer_soft", text=_("Soft"))
+ sub.prop(lamp, "shadow_buffer_bias", text=_("Bias"))
col = split.column()
- col.label(text="Sample Buffers:")
+ col.label(text=_("Sample Buffers:"))
col.prop(lamp, "shadow_sample_buffers", text="")
sub = col.column(align=True)
- sub.prop(lamp, "shadow_buffer_size", text="Size")
- sub.prop(lamp, "shadow_buffer_samples", text="Samples")
+ sub.prop(lamp, "shadow_buffer_size", text=_("Size"))
+ sub.prop(lamp, "shadow_buffer_samples", text=_("Samples"))
if lamp.shadow_buffer_type == 'DEEP':
col.prop(lamp, "compression_threshold")
elif lamp.shadow_buffer_type == 'IRREGULAR':
- layout.prop(lamp, "shadow_buffer_bias", text="Bias")
+ layout.prop(lamp, "shadow_buffer_bias", text=_("Bias"))
split = layout.split()
col = split.column()
- col.prop(lamp, "use_auto_clip_start", text="Autoclip Start")
+ col.prop(lamp, "use_auto_clip_start", text=_("Autoclip Start"))
sub = col.column()
sub.active = not lamp.use_auto_clip_start
- sub.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
+ sub.prop(lamp, "shadow_buffer_clip_start", text=_("Clip Start"))
col = split.column()
- col.prop(lamp, "use_auto_clip_end", text="Autoclip End")
+ col.prop(lamp, "use_auto_clip_end", text=_("Autoclip End"))
sub = col.column()
sub.active = not lamp.use_auto_clip_end
- sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End")
+ sub.prop(lamp, "shadow_buffer_clip_end", text=_(" Clip End"))
class DATA_PT_area(DataButtonsPanel, Panel):
@@ -325,8 +325,8 @@ class DATA_PT_area(DataButtonsPanel, Panel):
if (lamp.shape == 'SQUARE'):
sub.prop(lamp, "size")
elif (lamp.shape == 'RECTANGLE'):
- sub.prop(lamp, "size", text="Size X")
- sub.prop(lamp, "size_y", text="Size Y")
+ sub.prop(lamp, "size", text=_("Size X"))
+ sub.prop(lamp, "size_y", text=_("Size Y"))
class DATA_PT_spot(DataButtonsPanel, Panel):
@@ -348,8 +348,8 @@ class DATA_PT_spot(DataButtonsPanel, Panel):
col = split.column()
sub = col.column()
- sub.prop(lamp, "spot_size", text="Size")
- sub.prop(lamp, "spot_blend", text="Blend", slider=True)
+ sub.prop(lamp, "spot_size", text=_("Size"))
+ sub.prop(lamp, "spot_blend", text=_("Blend"), slider=True)
col.prop(lamp, "use_square")
col.prop(lamp, "show_cone")
@@ -358,9 +358,9 @@ class DATA_PT_spot(DataButtonsPanel, Panel):
col.prop(lamp, "use_halo")
sub = col.column(align=True)
sub.active = lamp.use_halo
- sub.prop(lamp, "halo_intensity", text="Intensity")
+ sub.prop(lamp, "halo_intensity", text=_("Intensity"))
if lamp.shadow_method == 'BUFFER_SHADOW':
- sub.prop(lamp, "halo_step", text="Step")
+ sub.prop(lamp, "halo_step", text=_("Step"))
class DATA_PT_falloff_curve(DataButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index 75df7dad5f2..37c91370979 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -20,10 +20,10 @@
import bpy
from bpy.types import Menu, Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class MESH_MT_vertex_group_specials(Menu):
- bl_label = "Vertex Group Specials"
+ bl_label = _("Vertex Group Specials")
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
def draw(self, context):
@@ -34,7 +34,11 @@ class MESH_MT_vertex_group_specials(Menu):
layout.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA')
layout.operator("object.vertex_group_copy_to_selected", icon='LINK_AREA')
layout.operator("object.vertex_group_mirror", icon='ARROW_LEFTRIGHT')
- layout.operator("object.vertex_group_remove", icon='X', text="Delete All").all = True
+ layout.operator("object.vertex_group_remove", icon='X', text=_("Delete All")).all = True
+ layout.separator()
+ layout.operator("object.vertex_group_lock", icon='LOCK', text="Lock All").action = 'SELECT'
+ layout.operator("object.vertex_group_lock", icon='UNLOCK', text="UnLock All").action = 'DESELECT'
+ layout.operator("object.vertex_group_lock", icon='LOCK', text="Lock Invert All").action = 'INVERT'
class MESH_MT_shape_key_specials(Menu):
@@ -47,7 +51,7 @@ class MESH_MT_shape_key_specials(Menu):
layout.operator("object.shape_key_transfer", icon='COPY_ID') # icon is not ideal
layout.operator("object.join_shapes", icon='COPY_ID') # icon is not ideal
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
- op = layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix")
+ op = layout.operator("object.shape_key_add", icon='ZOOMIN', text=_("New Shape From Mix"))
op.from_mix = True
@@ -95,7 +99,7 @@ class DATA_PT_normals(MeshButtonsPanel, Panel):
col.prop(mesh, "use_auto_smooth")
sub = col.column()
sub.active = mesh.use_auto_smooth
- sub.prop(mesh, "auto_smooth_angle", text="Angle")
+ sub.prop(mesh, "auto_smooth_angle", text=_("Angle"))
split.prop(mesh, "show_double_sided")
@@ -116,8 +120,8 @@ class DATA_PT_texture_space(MeshButtonsPanel, Panel):
layout.prop(mesh, "use_auto_texspace")
row = layout.row()
- row.column().prop(mesh, "texspace_location", text="Location")
- row.column().prop(mesh, "texspace_size", text="Size")
+ row.column().prop(mesh, "texspace_location", text=_("Location"))
+ row.column().prop(mesh, "texspace_size", text=_("Size"))
class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
@@ -159,14 +163,14 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
row = layout.row()
sub = row.row(align=True)
- sub.operator("object.vertex_group_assign", text="Assign")
- sub.operator("object.vertex_group_remove_from", text="Remove")
+ sub.operator("object.vertex_group_assign", text=_("Assign"))
+ sub.operator("object.vertex_group_remove_from", text=_("Remove"))
sub = row.row(align=True)
- sub.operator("object.vertex_group_select", text="Select")
- sub.operator("object.vertex_group_deselect", text="Deselect")
+ sub.operator("object.vertex_group_select", text=_("Select"))
+ sub.operator("object.vertex_group_deselect", text=_("Deselect"))
- layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
+ layout.prop(context.tool_settings, "vertex_group_weight", text=_("Weight"))
class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
@@ -246,13 +250,13 @@ class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
col = split.column(align=True)
col.active = enable_edit_value
- col.label(text="Range:")
- col.prop(kb, "slider_min", text="Min")
- col.prop(kb, "slider_max", text="Max")
+ col.label(text=_("Range:"))
+ col.prop(kb, "slider_min", text=_("Min"))
+ col.prop(kb, "slider_max", text=_("Max"))
col = split.column(align=True)
col.active = enable_edit_value
- col.label(text="Blend:")
+ col.label(text=_("Blend:"))
col.prop_search(kb, "vertex_group", ob, "vertex_groups", text="")
col.prop_search(kb, "relative_key", key, "key_blocks", text="")
@@ -285,53 +289,6 @@ class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
layout.prop(lay, "name")
-class DATA_PT_texface(MeshButtonsPanel, Panel):
- bl_label = "Texture Face"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-
- @classmethod
- def poll(cls, context):
- obj = context.object
- return (context.mode == 'EDIT_MESH') and obj and obj.type == 'MESH'
-
- def draw(self, context):
- layout = self.layout
- col = layout.column()
-
- me = context.mesh
-
- tf = me.faces.active_tface
-
- if tf:
- if context.scene.render.engine != 'BLENDER_GAME':
- col.label(text="Options only supported in Game Engine")
-
- split = layout.split()
- col = split.column()
-
- col.prop(tf, "use_image")
- col.prop(tf, "use_light")
- col.prop(tf, "hide")
- col.prop(tf, "use_collision")
-
- col.prop(tf, "use_blend_shared")
- col.prop(tf, "use_twoside")
- col.prop(tf, "use_object_color")
-
- col = split.column()
-
- col.prop(tf, "use_halo")
- col.prop(tf, "use_billboard")
- col.prop(tf, "use_shadow_cast")
- col.prop(tf, "use_bitmap_text")
- col.prop(tf, "use_alpha_sort")
-
- col = layout.column()
- col.prop(tf, "blend_type")
- else:
- col.label(text="No UV Texture")
-
-
class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
bl_label = "Vertex Colors"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
diff --git a/release/scripts/startup/bl_ui/properties_data_metaball.py b/release/scripts/startup/bl_ui/properties_data_metaball.py
index cd894e60dbb..693cb697544 100644
--- a/release/scripts/startup/bl_ui/properties_data_metaball.py
+++ b/release/scripts/startup/bl_ui/properties_data_metaball.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class DataButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -60,16 +60,16 @@ class DATA_PT_metaball(DataButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Resolution:")
+ col.label(text=_("Resolution:"))
sub = col.column(align=True)
- sub.prop(mball, "resolution", text="View")
- sub.prop(mball, "render_resolution", text="Render")
+ sub.prop(mball, "resolution", text=_("View"))
+ sub.prop(mball, "render_resolution", text=_("Render"))
col = split.column()
- col.label(text="Settings:")
- col.prop(mball, "threshold", text="Threshold")
+ col.label(text=_("Settings:"))
+ col.prop(mball, "threshold", text=_("Threshold"))
- layout.label(text="Update:")
+ layout.label(text=_("Update:"))
layout.prop(mball, "update_method", expand=True)
@@ -86,8 +86,8 @@ class DATA_PT_mball_texture_space(DataButtonsPanel, Panel):
layout.prop(mball, "use_auto_texspace")
row = layout.row()
- row.column().prop(mball, "texspace_location", text="Location")
- row.column().prop(mball, "texspace_size", text="Size")
+ row.column().prop(mball, "texspace_location", text=_("Location"))
+ row.column().prop(mball, "texspace_size", text=_("Size"))
class DATA_PT_metaball_element(DataButtonsPanel, Panel):
@@ -107,25 +107,25 @@ class DATA_PT_metaball_element(DataButtonsPanel, Panel):
split = layout.split()
col = split.column(align=True)
- col.label(text="Settings:")
- col.prop(metaelem, "stiffness", text="Stiffness")
- col.prop(metaelem, "use_negative", text="Negative")
- col.prop(metaelem, "hide", text="Hide")
+ col.label(text=_("Settings:"))
+ col.prop(metaelem, "stiffness", text=_("Stiffness"))
+ col.prop(metaelem, "use_negative", text=_("Negative"))
+ col.prop(metaelem, "hide", text=_("Hide"))
col = split.column(align=True)
if metaelem.type in {'CUBE', 'ELLIPSOID'}:
- col.label(text="Size:")
+ col.label(text=_("Size:"))
col.prop(metaelem, "size_x", text="X")
col.prop(metaelem, "size_y", text="Y")
col.prop(metaelem, "size_z", text="Z")
elif metaelem.type == 'TUBE':
- col.label(text="Size:")
+ col.label(text=_("Size:"))
col.prop(metaelem, "size_x", text="X")
elif metaelem.type == 'PLANE':
- col.label(text="Size:")
+ col.label(text=_("Size:"))
col.prop(metaelem, "size_x", text="X")
col.prop(metaelem, "size_y", text="Y")
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 169cbd8c228..9669bd0e0dd 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
class ModifierButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -51,14 +51,14 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.prop(md, "object", text="")
col.prop(md, "use_deform_preserve_volume")
col = split.column()
- col.label(text="Bind To:")
- col.prop(md, "use_vertex_groups", text="Vertex Groups")
- col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
+ col.label(text=_("Bind To:"))
+ col.prop(md, "use_vertex_groups", text=_("Vertex Groups"))
+ col.prop(md, "use_bone_envelopes", text=_("Bone Envelopes"))
layout.separator()
@@ -92,11 +92,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.separator()
- col.prop(md, "use_merge_vertices", text="Merge")
+ col.prop(md, "use_merge_vertices", text=_("Merge"))
sub = col.column()
sub.active = md.use_merge_vertices
- sub.prop(md, "use_merge_vertices_cap", text="First Last")
- sub.prop(md, "merge_threshold", text="Distance")
+ sub.prop(md, "use_merge_vertices_cap", text=_("First Last"))
+ sub.prop(md, "merge_threshold", text=_("Distance"))
col = split.column()
col.prop(md, "use_relative_offset")
@@ -122,7 +122,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split.prop(md, "width")
split.prop(md, "use_only_vertices")
- layout.label(text="Limit Method:")
+ layout.label(text=_("Limit Method:"))
layout.row().prop(md, "limit_method", expand=True)
if md.limit_method == 'ANGLE':
layout.prop(md, "angle_limit")
@@ -133,11 +133,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Operation:")
+ col.label(text=_("Operation:"))
col.prop(md, "operation", text="")
col = split.column()
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.prop(md, "object", text="")
def BUILD(self, layout, ob, md):
@@ -156,7 +156,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
def CAST(self, layout, ob, md):
split = layout.split(percentage=0.25)
- split.label(text="Cast Type:")
+ split.label(text=_("Cast Type:"))
split.prop(md, "cast_type", text="")
split = layout.split(percentage=0.25)
@@ -175,52 +175,52 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
col = split.column()
- col.label(text="Control Object:")
+ col.label(text=_("Control Object:"))
col.prop(md, "object", text="")
if md.object:
col.prop(md, "use_transform")
def CLOTH(self, layout, ob, md):
- layout.label(text="Settings can be found inside the Physics context")
+ layout.label(text=_("Settings can be found inside the Physics context"))
def COLLISION(self, layout, ob, md):
- layout.label(text="Settings can be found inside the Physics context")
+ layout.label(text=_("Settings can be found inside the Physics context"))
def CURVE(self, layout, ob, md):
split = layout.split()
col = split.column()
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.prop(md, "object", text="")
col = split.column()
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
- layout.label(text="Deformation Axis:")
+ layout.label(text=_("Deformation Axis:"))
layout.row().prop(md, "deform_axis", expand=True)
def DECIMATE(self, layout, ob, md):
layout.prop(md, "ratio")
- layout.label(text="Face Count: %s" % str(md.face_count))
+ layout.label(text=_("Face Count")+": %s" % str(md.face_count))
def DISPLACE(self, layout, ob, md):
split = layout.split()
col = split.column()
- col.label(text="Texture:")
+ col.label(text=_("Texture:"))
col.template_ID(md, "texture", new="texture.new")
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
col = split.column()
- col.label(text="Direction:")
+ col.label(text=_("Direction:"))
col.prop(md, "direction", text="")
- col.label(text="Texture Coordinates:")
+ col.label(text=_("Texture Coordinates:"))
col.prop(md, "texture_coords", text="")
if md.texture_coords == 'OBJECT':
- layout.prop(md, "texture_coords_object", text="Object")
+ layout.prop(md, "texture_coords_object", text=_("Object"))
elif md.texture_coords == 'UV' and ob.type == 'MESH':
layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
@@ -237,23 +237,23 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(md, "use_edge_angle", text="Edge Angle")
+ col.prop(md, "use_edge_angle", text=_("Edge Angle"))
sub = col.column()
sub.active = md.use_edge_angle
sub.prop(md, "split_angle")
- split.prop(md, "use_edge_sharp", text="Sharp Edges")
+ split.prop(md, "use_edge_sharp", text=_("Sharp Edges"))
def EXPLODE(self, layout, ob, md):
split = layout.split()
col = split.column()
- col.label(text="Vertex group:")
+ col.label(text=_("Vertex group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
sub = col.column()
sub.active = bool(md.vertex_group)
sub.prop(md, "protect")
- col.label(text="Particle UV")
+ col.label(text=_("Particle UV"))
col.prop_search(md, "particle_uv", ob.data, "uv_textures", text="")
col = split.column()
@@ -263,22 +263,22 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "show_dead")
col.prop(md, "use_size")
- layout.operator("object.explode_refresh", text="Refresh")
+ layout.operator("object.explode_refresh", text=_("Refresh"))
def FLUID_SIMULATION(self, layout, ob, md):
- layout.label(text="Settings can be found inside the Physics context")
+ layout.label(text=_("Settings can be found inside the Physics context"))
def HOOK(self, layout, ob, md):
split = layout.split()
col = split.column()
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.prop(md, "object", text="")
if md.object and md.object.type == 'ARMATURE':
- col.label(text="Bone:")
+ col.label(text=_("Bone:"))
col.prop_search(md, "subtarget", md.object.data, "bones", text="")
col = split.column()
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
layout.separator()
@@ -290,38 +290,38 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "force", slider=True)
col = split.column()
- col.operator("object.hook_reset", text="Reset")
- col.operator("object.hook_recenter", text="Recenter")
+ col.operator("object.hook_reset", text=_("Reset"))
+ col.operator("object.hook_recenter", text=_("Recenter"))
if ob.mode == 'EDIT':
layout.separator()
row = layout.row()
- row.operator("object.hook_select", text="Select")
- row.operator("object.hook_assign", text="Assign")
+ row.operator("object.hook_select", text=_("Select"))
+ row.operator("object.hook_assign", text=_("Assign"))
def LATTICE(self, layout, ob, md):
split = layout.split()
col = split.column()
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.prop(md, "object", text="")
col = split.column()
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
def MASK(self, layout, ob, md):
split = layout.split()
col = split.column()
- col.label(text="Mode:")
+ col.label(text=_("Mode:"))
col.prop(md, "mode", text="")
col = split.column()
if md.mode == 'ARMATURE':
- col.label(text="Armature:")
+ col.label(text=_("Armature:"))
col.prop(md, "armature", text="")
elif md.mode == 'VERTEX_GROUP':
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
sub = col.column()
@@ -333,11 +333,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
sub = col.column()
- sub.label(text="Object:")
+ sub.label(text=_("Object:"))
sub.prop(md, "object", text="")
sub.active = not md.is_bound
col = split.column()
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
sub = col.column()
@@ -347,9 +347,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.separator()
if md.is_bound:
- layout.operator("object.meshdeform_bind", text="Unbind")
+ layout.operator("object.meshdeform_bind", text=_("Unbind"))
else:
- layout.operator("object.meshdeform_bind", text="Bind")
+ layout.operator("object.meshdeform_bind", text=_("Bind"))
row = layout.row()
row.prop(md, "precision")
@@ -359,19 +359,19 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split(percentage=0.25)
col = split.column()
- col.label(text="Axis:")
+ col.label(text=_("Axis:"))
col.prop(md, "use_x")
col.prop(md, "use_y")
col.prop(md, "use_z")
col = split.column()
- col.label(text="Options:")
- col.prop(md, "use_mirror_merge", text="Merge")
- col.prop(md, "use_clip", text="Clipping")
- col.prop(md, "use_mirror_vertex_groups", text="Vertex Groups")
+ col.label(text=_("Options:"))
+ col.prop(md, "use_mirror_merge", text=_("Merge"))
+ col.prop(md, "use_clip", text=_("Clipping"))
+ col.prop(md, "use_mirror_vertex_groups", text=_("Vertex Groups"))
col = split.column()
- col.label(text="Textures:")
+ col.label(text=_("Textures:"))
col.prop(md, "use_mirror_u", text="U")
col.prop(md, "use_mirror_v", text="V")
@@ -379,25 +379,29 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
if md.use_mirror_merge == True:
col.prop(md, "merge_threshold")
- col.label(text="Mirror Object:")
+ col.label(text=_("Mirror Object:"))
col.prop(md, "mirror_object", text="")
+ def NAVMESH(self, layout, ob, md):
+ layout.operator("object.assign_navpolygon")
+ layout.operator("object.assign_new_navpolygon")
+
def MULTIRES(self, layout, ob, md):
layout.row().prop(md, "subdivision_type", expand=True)
split = layout.split()
col = split.column()
- col.prop(md, "levels", text="Preview")
- col.prop(md, "sculpt_levels", text="Sculpt")
- col.prop(md, "render_levels", text="Render")
+ col.prop(md, "levels", text=_("Preview"))
+ col.prop(md, "sculpt_levels", text=_("Sculpt"))
+ col.prop(md, "render_levels", text=_("Render"))
col = split.column()
col.enabled = ob.mode != 'EDIT'
- col.operator("object.multires_subdivide", text="Subdivide")
- col.operator("object.multires_higher_levels_delete", text="Delete Higher")
- col.operator("object.multires_reshape", text="Reshape")
- col.operator("object.multires_base_apply", text="Apply Base")
+ col.operator("object.multires_subdivide", text=_("Subdivide"))
+ col.operator("object.multires_higher_levels_delete", text=_("Delete Higher"))
+ col.operator("object.multires_reshape", text=_("Reshape"))
+ col.operator("object.multires_base_apply", text=_("Apply Base"))
col.prop(md, "use_subsurf_uv")
col.prop(md, "show_only_control_edges")
@@ -406,34 +410,34 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = layout.column()
row = col.row()
if md.is_external:
- row.operator("object.multires_external_pack", text="Pack External")
+ row.operator("object.multires_external_pack", text=_("Pack External"))
row.label()
row = col.row()
row.prop(md, "filepath", text="")
else:
- row.operator("object.multires_external_save", text="Save External...")
+ row.operator("object.multires_external_save", text=_("Save External..."))
row.label()
def PARTICLE_INSTANCE(self, layout, ob, md):
layout.prop(md, "object")
- layout.prop(md, "particle_system_index", text="Particle System")
+ layout.prop(md, "particle_system_index", text=_("Particle System"))
split = layout.split()
col = split.column()
- col.label(text="Create From:")
+ col.label(text=_("Create From:"))
col.prop(md, "use_normal")
col.prop(md, "use_children")
col.prop(md, "use_size")
col = split.column()
- col.label(text="Show Particles When:")
+ col.label(text=_("Show Particles When:"))
col.prop(md, "show_alive")
col.prop(md, "show_unborn")
col.prop(md, "show_dead")
layout.separator()
- layout.prop(md, "use_path", text="Create Along Paths")
+ layout.prop(md, "use_path", text=_("Create Along Paths"))
split = layout.split()
split.active = md.use_path
@@ -443,17 +447,17 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.prop(md, "position", slider=True)
- col.prop(md, "random_position", text="Random", slider=True)
+ col.prop(md, "random_position", text=_("Random"), slider=True)
def PARTICLE_SYSTEM(self, layout, ob, md):
- layout.label(text="Settings can be found inside the Particle context")
+ layout.label(text=_("Settings can be found inside the Particle context"))
def SCREW(self, layout, ob, md):
split = layout.split()
col = split.column()
col.prop(md, "axis")
- col.prop(md, "object", text="AxisOb")
+ col.prop(md, "object", text=_("AxisOb"))
col.prop(md, "angle")
col.prop(md, "steps")
col.prop(md, "render_steps")
@@ -472,10 +476,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
def SHRINKWRAP(self, layout, ob, md):
split = layout.split()
col = split.column()
- col.label(text="Target:")
+ col.label(text=_("Target:"))
col.prop(md, "target", text="")
col = split.column()
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
split = layout.split()
@@ -485,28 +489,28 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "subsurf_levels")
col = split.column()
- col.label(text="Mode:")
+ col.label(text=_("Mode:"))
col.prop(md, "wrap_method", text="")
if md.wrap_method == 'PROJECT':
split = layout.split(percentage=0.25)
col = split.column()
- col.label(text="Axis:")
+ col.label(text=_("Axis:"))
col.prop(md, "use_project_x")
col.prop(md, "use_project_y")
col.prop(md, "use_project_z")
col = split.column()
- col.label(text="Direction:")
+ col.label(text=_("Direction:"))
col.prop(md, "use_negative_direction")
col.prop(md, "use_positive_direction")
col = split.column()
- col.label(text="Cull Faces:")
+ col.label(text=_("Cull Faces:"))
col.prop(md, "cull_face", expand=True)
- layout.label(text="Auxiliary Target:")
+ layout.label(text=_("Auxiliary Target:"))
layout.prop(md, "auxiliary_target", text="")
elif md.wrap_method == 'NEAREST_SURFACEPOINT':
@@ -516,24 +520,24 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Mode:")
+ col.label(text=_("Mode:"))
col.prop(md, "deform_method", text="")
col = split.column()
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
split = layout.split()
col = split.column()
- col.label(text="Origin:")
+ col.label(text=_("Origin:"))
col.prop(md, "origin", text="")
sub = col.column()
sub.active = (md.origin is not None)
sub.prop(md, "use_relative")
col = split.column()
- col.label(text="Deform:")
+ col.label(text=_("Deform:"))
col.prop(md, "factor")
col.prop(md, "limits", slider=True)
if md.deform_method in {'TAPER', 'STRETCH'}:
@@ -541,13 +545,13 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "lock_y")
def SMOKE(self, layout, ob, md):
- layout.label(text="Settings can be found inside the Physics context")
+ layout.label(text=_("Settings can be found inside the Physics context"))
def SMOOTH(self, layout, ob, md):
split = layout.split(percentage=0.25)
col = split.column()
- col.label(text="Axis:")
+ col.label(text=_("Axis:"))
col.prop(md, "use_x")
col.prop(md, "use_y")
col.prop(md, "use_z")
@@ -555,11 +559,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.prop(md, "factor")
col.prop(md, "iterations")
- col.label(text="Vertex Group:")
+ col.label(text=_("Vertex Group:"))
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
def SOFT_BODY(self, layout, ob, md):
- layout.label(text="Settings can be found inside the Physics context")
+ layout.label(text=_("Settings can be found inside the Physics context"))
def SOLIDIFY(self, layout, ob, md):
split = layout.split()
@@ -568,19 +572,19 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "thickness")
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
- col.label(text="Crease:")
- col.prop(md, "edge_crease_inner", text="Inner")
- col.prop(md, "edge_crease_outer", text="Outer")
- col.prop(md, "edge_crease_rim", text="Rim")
- col.label(text="Material Index Offset:")
+ col.label(text=_("Crease:"))
+ col.prop(md, "edge_crease_inner", text=_("Inner"))
+ col.prop(md, "edge_crease_outer", text=_("Outer"))
+ col.prop(md, "edge_crease_rim", text=_("Rim"))
+ col.label(text=_("Material Index Offset:"))
col = split.column()
col.prop(md, "offset")
sub = col.column()
sub.active = bool(md.vertex_group)
- sub.prop(md, "invert_vertex_group", text="Invert")
- sub.prop(md, "thickness_vertex_group", text="Factor")
+ sub.prop(md, "invert_vertex_group", text=_("Invert"))
+ sub.prop(md, "thickness_vertex_group", text=_("Factor"))
col.prop(md, "use_even_offset")
col.prop(md, "use_quality_normals")
@@ -591,65 +595,64 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "material_offset", text="")
row = row.row()
row.active = md.use_rim
- row.prop(md, "material_offset_rim", text="Rim")
+ row.prop(md, "material_offset_rim", text=_("Rim"))
def SUBSURF(self, layout, ob, md):
layout.row().prop(md, "subdivision_type", expand=True)
split = layout.split()
col = split.column()
- col.label(text="Subdivisions:")
- col.prop(md, "levels", text="View")
- col.prop(md, "render_levels", text="Render")
+ col.label(text=_("Subdivisions:"))
+ col.prop(md, "levels", text=_("View"))
+ col.prop(md, "render_levels", text=_("Render"))
col = split.column()
- col.label(text="Options:")
+ col.label(text=_("Options:"))
col.prop(md, "use_subsurf_uv")
col.prop(md, "show_only_control_edges")
def SURFACE(self, layout, ob, md):
- layout.label(text="Settings can be found inside the Physics context")
+ layout.label(text=_("Settings can be found inside the Physics context"))
def UV_PROJECT(self, layout, ob, md):
- if ob.type == 'MESH':
- split = layout.split()
+ split = layout.split()
- col = split.column()
- col.label(text="Image:")
- col.prop(md, "image", text="")
+ col = split.column()
+ col.label(text=_("Image:"))
+ col.prop(md, "image", text="")
- col = split.column()
- col.label(text="UV Layer:")
- col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
+ col = split.column()
+ col.label(text=_("UV Layer:"))
+ col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
- split = layout.split()
- col = split.column()
- col.prop(md, "use_image_override")
- col.prop(md, "projector_count", text="Projectors")
- for proj in md.projectors:
- col.prop(proj, "object", text="")
+ split = layout.split()
+ col = split.column()
+ col.prop(md, "use_image_override")
+ col.prop(md, "projector_count", text=_("Projectors"))
+ for proj in md.projectors:
+ col.prop(proj, "object", text="")
- col = split.column()
- sub = col.column(align=True)
- sub.prop(md, "aspect_x", text="Aspect X")
- sub.prop(md, "aspect_y", text="Aspect Y")
+ col = split.column()
+ sub = col.column(align=True)
+ sub.prop(md, "aspect_x", text=_("Aspect X"))
+ sub.prop(md, "aspect_y", text=_("Aspect Y"))
- sub = col.column(align=True)
- sub.prop(md, "scale_x", text="Scale X")
- sub.prop(md, "scale_y", text="Scale Y")
+ sub = col.column(align=True)
+ sub.prop(md, "scale_x", text=_("Scale X"))
+ sub.prop(md, "scale_y", text=_("Scale Y"))
def WARP(self, layout, ob, md):
use_falloff = (md.falloff_type != 'NONE')
split = layout.split()
col = split.column()
- col.label(text="From:")
+ col.label(text=_("From:"))
col.prop(md, "object_from", text="")
col.prop(md, "use_volume_preserve")
col = split.column()
- col.label(text="To:")
+ col.label(text=_("To:"))
col.prop(md, "object_to", text="")
col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
@@ -668,15 +671,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
# 2 new columns
split = layout.split()
col = split.column()
- col.label(text="Texture:")
+ col.label(text=_("Texture:"))
col.prop(md, "texture", text="")
col = split.column()
- col.label(text="Texture Coordinates:")
+ col.label(text=_("Texture Coordinates:"))
col.prop(md, "texture_coords", text="")
if md.texture_coords == 'OBJECT':
- layout.prop(md, "texture_coords_object", text="Object")
+ layout.prop(md, "texture_coords_object", text=_("Object"))
elif md.texture_coords == 'UV' and ob.type == 'MESH':
layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
@@ -684,7 +687,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Motion:")
+ col.label(text=_("Motion:"))
col.prop(md, "use_x")
col.prop(md, "use_y")
col.prop(md, "use_cyclic")
@@ -700,18 +703,18 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Time:")
+ col.label(text=_("Time:"))
sub = col.column(align=True)
- sub.prop(md, "time_offset", text="Offset")
- sub.prop(md, "lifetime", text="Life")
- col.prop(md, "damping_time", text="Damping")
+ sub.prop(md, "time_offset", text=_("Offset"))
+ sub.prop(md, "lifetime", text=_("Life"))
+ col.prop(md, "damping_time", text=_("Damping"))
col = split.column()
- col.label(text="Position:")
+ col.label(text=_("Position:"))
sub = col.column(align=True)
sub.prop(md, "start_position_x", text="X")
sub.prop(md, "start_position_y", text="Y")
- col.prop(md, "falloff_radius", text="Falloff")
+ col.prop(md, "falloff_radius", text=_("Falloff"))
layout.separator()
@@ -719,7 +722,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.prop_search(md, "vertex_group", ob, "vertex_groups")
split = layout.split(percentage=0.33)
col = split.column()
- col.label(text="Texture")
+ col.label(text=_("Texture"))
col = split.column()
col.template_ID(md, "texture", new="texture.new")
layout.prop(md, "texture_coords")
@@ -740,5 +743,119 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "width", slider=True)
col.prop(md, "narrowness", slider=True)
+ @staticmethod
+ def vertex_weight_mask(layout, ob, md):
+ layout.label(text="Influence/Mask Options:")
+
+ split = layout.split(percentage=0.4)
+ split.label(text="Global Influence:")
+ split.prop(md, "mask_constant", text="")
+
+ if not md.mask_texture:
+ split = layout.split(percentage=0.4)
+ split.label(text="Vertex Group Mask:")
+ split.prop_search(md, "mask_vertex_group", ob, "vertex_groups", text="")
+
+ if not md.mask_vertex_group:
+ split = layout.split(percentage=0.4)
+ split.label(text="Texture Mask:")
+ split.template_ID(md, "mask_texture", new="texture.new")
+ if md.mask_texture:
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Texture Coordinates:")
+ col.prop(md, "mask_tex_mapping", text="")
+
+ col = split.column()
+ col.label(text="Use Channel:")
+ col.prop(md, "mask_tex_use_channel", text="")
+
+ if md.mask_tex_mapping == 'OBJECT':
+ layout.prop(md, "mask_tex_map_object", text="Object")
+ elif md.mask_tex_mapping == 'UV' and ob.type == 'MESH':
+ layout.prop_search(md, "mask_tex_uv_layer", ob.data, "uv_textures")
+
+ def VERTEX_WEIGHT_EDIT(self, layout, ob, md):
+ split = layout.split()
+ col = split.column()
+ col.label(text="Vertex Group:")
+ col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+
+ col = split.column()
+ col.label(text="Default Weight:")
+ col.prop(md, "default_weight", text="")
+
+ layout.prop(md, "falloff_type")
+ if md.falloff_type == 'CURVE':
+ col = layout.column()
+ col.template_curve_mapping(md, "map_curve")
+
+ split = layout.split(percentage=0.4)
+ split.prop(md, "use_add")
+ row = split.row()
+ row.active = md.use_add
+ row.prop(md, "add_threshold")
+
+ split = layout.split(percentage=0.4)
+ split.prop(md, "use_remove")
+ row = split.row()
+ row.active = md.use_remove
+ row.prop(md, "remove_threshold")
+
+ # Common mask options
+ layout.separator()
+ self.vertex_weight_mask(layout, ob, md)
+
+ def VERTEX_WEIGHT_MIX(self, layout, ob, md):
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Vertex Group A:")
+ col.prop_search(md, "vertex_group_a", ob, "vertex_groups", text="")
+ col.label(text="Default Weight A:")
+ col.prop(md, "default_weight_a", text="")
+
+ col.label(text="Mix Mode:")
+ col.prop(md, "mix_mode", text="")
+
+ col = split.column()
+ col.label(text="Vertex Group B:")
+ col.prop_search(md, "vertex_group_b", ob, "vertex_groups", text="")
+ col.label(text="Default Weight B:")
+ col.prop(md, "default_weight_b", text="")
+
+ col.label(text="Mix Set:")
+ col.prop(md, "mix_set", text="")
+
+ # Common mask options
+ layout.separator()
+ self.vertex_weight_mask(layout, ob, md)
+
+ def VERTEX_WEIGHT_PROXIMITY(self, layout, ob, md):
+ split = layout.split()
+
+ col = split.column()
+ col.label(text="Vertex Group:")
+ col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+
+ col = split.column()
+ col.label(text="Target Object:")
+ col.prop(md, "target", text="")
+
+ layout.row().prop(md, "proximity_mode", expand=True)
+ if md.proximity_mode == 'GEOMETRY':
+ layout.row().prop(md, "proximity_geometry", expand=True)
+
+ row = layout.row()
+ row.prop(md, "min_dist")
+ row.prop(md, "max_dist")
+
+ layout.prop(md, "falloff_type")
+
+ # Common mask options
+ layout.separator()
+ self.vertex_weight_mask(layout, ob, md)
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_data_speaker.py b/release/scripts/startup/bl_ui/properties_data_speaker.py
index 657c0fe652a..a1b86b51f5f 100644
--- a/release/scripts/startup/bl_ui/properties_data_speaker.py
+++ b/release/scripts/startup/bl_ui/properties_data_speaker.py
@@ -81,7 +81,7 @@ class DATA_PT_distance(DataButtonsPanel, bpy.types.Panel):
speaker = context.speaker
split = layout.split()
-
+
col = split.column()
col.label("Volume:")
col.prop(speaker, "volume_min", text="Minimum")
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 161e4b10cff..95ae54c4597 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
class PhysicsButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -54,7 +54,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
col = split.column()
col.prop(game, "use_actor")
col.prop(game, "use_ghost")
- col.prop(ob, "hide_render", text="Invisible") # out of place but useful
+ col.prop(ob, "hide_render", text=_("Invisible")) # out of place but useful
col = split.column()
col.prop(game, "use_material_physics_fh")
@@ -66,7 +66,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Attributes:")
+ col.label(text=_("Attributes:"))
col.prop(game, "mass")
col.prop(game, "radius")
col.prop(game, "form_factor")
@@ -81,29 +81,29 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Velocity:")
+ col.label(text=_("Velocity:"))
sub = col.column(align=True)
- sub.prop(game, "velocity_min", text="Minimum")
- sub.prop(game, "velocity_max", text="Maximum")
+ sub.prop(game, "velocity_min", text=_("Minimum"))
+ sub.prop(game, "velocity_max", text=_("Maximum"))
col = split.column()
- col.label(text="Damping:")
+ col.label(text=_("Damping:"))
sub = col.column(align=True)
- sub.prop(game, "damping", text="Translation", slider=True)
- sub.prop(game, "rotation_damping", text="Rotation", slider=True)
+ sub.prop(game, "damping", text=_("Translation"), slider=True)
+ sub.prop(game, "rotation_damping", text=_("Rotation"), slider=True)
layout.separator()
split = layout.split()
col = split.column()
- col.label(text="Lock Translation:")
+ col.label(text=_("Lock Translation:"))
col.prop(game, "lock_location_x", text="X")
col.prop(game, "lock_location_y", text="Y")
col.prop(game, "lock_location_z", text="Z")
col = split.column()
- col.label(text="Lock Rotation:")
+ col.label(text=_("Lock Rotation:"))
col.prop(game, "lock_rotation_x", text="X")
col.prop(game, "lock_rotation_y", text="Y")
col.prop(game, "lock_rotation_z", text="Z")
@@ -112,21 +112,21 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
col = layout.column()
col.prop(game, "use_actor")
col.prop(game, "use_ghost")
- col.prop(ob, "hide_render", text="Invisible")
+ col.prop(ob, "hide_render", text=_("Invisible"))
layout.separator()
split = layout.split()
col = split.column()
- col.label(text="Attributes:")
+ col.label(text=_("Attributes:"))
col.prop(game, "mass")
col.prop(soft, "weld_threshold")
col.prop(soft, "location_iterations")
col.prop(soft, "linear_stiffness", slider=True)
col.prop(soft, "dynamic_friction", slider=True)
col.prop(soft, "collision_margin", slider=True)
- col.prop(soft, "use_bending_constraints", text="Bending Constraints")
+ col.prop(soft, "use_bending_constraints", text=_("Bending Constraints"))
col = split.column()
col.prop(soft, "use_shape_match")
@@ -136,25 +136,25 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
col.separator()
- col.label(text="Cluster Collision:")
+ col.label(text=_("Cluster Collision:"))
col.prop(soft, "use_cluster_rigid_to_softbody")
col.prop(soft, "use_cluster_soft_to_softbody")
sub = col.column()
sub.active = (soft.use_cluster_rigid_to_softbody or soft.use_cluster_soft_to_softbody)
- sub.prop(soft, "cluster_iterations", text="Iterations")
+ sub.prop(soft, "cluster_iterations", text=_("Iterations"))
elif game.physics_type == 'STATIC':
col = layout.column()
col.prop(game, "use_actor")
col.prop(game, "use_ghost")
- col.prop(ob, "hide_render", text="Invisible")
+ col.prop(ob, "hide_render", text=_("Invisible"))
layout.separator()
split = layout.split()
col = split.column()
- col.label(text="Attributes:")
+ col.label(text=_("Attributes:"))
col.prop(game, "radius")
col = split.column()
@@ -165,7 +165,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
subsub.prop(game, "friction_coefficients", text="", slider=True)
elif game.physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
- layout.prop(ob, "hide_render", text="Invisible")
+ layout.prop(ob, "hide_render", text=_("Invisible"))
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
@@ -189,11 +189,38 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
game = context.active_object.game
layout.active = game.use_collision_bounds
- layout.prop(game, "collision_bounds_type", text="Bounds")
+ layout.prop(game, "collision_bounds_type", text=_("Bounds"))
row = layout.row()
- row.prop(game, "collision_margin", text="Margin", slider=True)
- row.prop(game, "use_collision_compound", text="Compound")
+ row.prop(game, "collision_margin", text=_("Margin"), slider=True)
+ row.prop(game, "use_collision_compound", text=_("Compound"))
+
+
+class PHYSICS_PT_game_obstacles(PhysicsButtonsPanel, Panel):
+ bl_label = "Create Obstacle"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ game = context.object.game
+ rd = context.scene.render
+ return (game.physics_type in ('DYNAMIC', 'RIGID_BODY', 'SENSOR', 'SOFT_BODY', 'STATIC')) and (rd.engine in cls.COMPAT_ENGINES)
+
+ def draw_header(self, context):
+ game = context.active_object.game
+
+ self.layout.prop(game, "create_obstacle", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ game = context.active_object.game
+
+ layout.active = game.create_obstacle
+
+ row = layout.row()
+ row.prop(game, "obstacle_radius", text="Radius")
+ row.label()
class RenderButtonsPanel():
@@ -215,7 +242,7 @@ class RENDER_PT_game(RenderButtonsPanel, Panel):
layout = self.layout
row = layout.row()
- row.operator("view3d.game_start", text="Start")
+ row.operator("view3d.game_start", text=_("Start"))
row.label()
@@ -233,20 +260,20 @@ class RENDER_PT_game_player(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Resolution:")
+ col.label(text=_("Resolution:"))
sub = col.column(align=True)
sub.prop(gs, "resolution_x", slider=False, text="X")
sub.prop(gs, "resolution_y", slider=False, text="Y")
col = split.column()
- col.label(text="Quality:")
+ col.label(text=_("Quality:"))
sub = col.column(align=True)
- sub.prop(gs, "depth", text="Bit Depth", slider=False)
- sub.prop(gs, "frequency", text="FPS", slider=False)
+ sub.prop(gs, "depth", text=_("Bit Depth"), slider=False)
+ sub.prop(gs, "frequency", text=_("FPS"), slider=False)
# framing:
col = layout.column()
- col.label(text="Framing:")
+ col.label(text=_("Framing:"))
col.row().prop(gs, "frame_type", expand=True)
if gs.frame_type == 'LETTERBOX':
col.prop(gs, "frame_color", text="")
@@ -272,7 +299,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, Panel):
# dome:
elif stereo_mode == 'DOME':
- layout.prop(gs, "dome_mode", text="Dome Type")
+ layout.prop(gs, "dome_mode", text=_("Dome Type"))
dome_type = gs.dome_mode
@@ -283,23 +310,23 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, Panel):
dome_type == 'TRUNCATED_FRONT':
col = split.column()
- col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
+ col.prop(gs, "dome_buffer_resolution", text=_("Resolution"), slider=True)
col.prop(gs, "dome_angle", slider=True)
col = split.column()
- col.prop(gs, "dome_tesselation", text="Tesselation")
+ col.prop(gs, "dome_tesselation", text=_("Tesselation"))
col.prop(gs, "dome_tilt")
elif dome_type == 'PANORAM_SPH':
col = split.column()
- col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
+ col.prop(gs, "dome_buffer_resolution", text=_("Resolution"), slider=True)
col = split.column()
- col.prop(gs, "dome_tesselation", text="Tesselation")
+ col.prop(gs, "dome_tesselation", text=_("Tesselation"))
else: # cube map
col = split.column()
- col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
+ col.prop(gs, "dome_buffer_resolution", text=_("Resolution"), slider=True)
col = split.column()
@@ -321,15 +348,15 @@ class RENDER_PT_game_shading(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(gs, "use_glsl_lights", text="Lights")
- col.prop(gs, "use_glsl_shaders", text="Shaders")
- col.prop(gs, "use_glsl_shadows", text="Shadows")
- col.prop(gs, "use_glsl_color_management", text="Color Management")
+ col.prop(gs, "use_glsl_lights", text=_("Lights"))
+ col.prop(gs, "use_glsl_shaders", text=_("Shaders"))
+ col.prop(gs, "use_glsl_shadows", text=_("Shadows"))
+ col.prop(gs, "use_glsl_color_management", text=_("Color Management"))
col = split.column()
- col.prop(gs, "use_glsl_ramps", text="Ramps")
- col.prop(gs, "use_glsl_nodes", text="Nodes")
- col.prop(gs, "use_glsl_extra_textures", text="Extra Textures")
+ col.prop(gs, "use_glsl_ramps", text=_("Ramps"))
+ col.prop(gs, "use_glsl_nodes", text=_("Nodes"))
+ col.prop(gs, "use_glsl_extra_textures", text=_("Extra Textures"))
class RENDER_PT_game_performance(RenderButtonsPanel, Panel):
@@ -344,7 +371,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel, Panel):
row = col.row()
row.prop(gs, "use_frame_rate")
row.prop(gs, "use_display_lists")
-
+
col.prop(gs, "restrict_animation_updates")
@@ -357,11 +384,75 @@ class RENDER_PT_game_display(RenderButtonsPanel, Panel):
gs = context.scene.game_settings
flow = layout.column_flow()
- flow.prop(gs, "show_debug_properties", text="Debug Properties")
- flow.prop(gs, "show_framerate_profile", text="Framerate and Profile")
- flow.prop(gs, "show_physics_visualization", text="Physics Visualization")
+ flow.prop(gs, "show_debug_properties", text=_("Debug Properties"))
+ flow.prop(gs, "show_framerate_profile", text=_("Framerate and Profile"))
+ flow.prop(gs, "show_physics_visualization", text=_("Physics Visualization"))
flow.prop(gs, "use_deprecation_warnings")
- flow.prop(gs, "show_mouse", text="Mouse Cursor")
+ flow.prop(gs, "show_mouse", text=_("Mouse Cursor"))
+
+
+class SceneButtonsPanel():
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "scene"
+
+
+class SCENE_PT_game_navmesh(SceneButtonsPanel, bpy.types.Panel):
+ bl_label = "Navigation mesh"
+ bl_default_closed = True
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene and scene.render.engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+
+ rd = context.scene.game_settings.recast_data
+
+ layout.operator("object.create_navmesh", text='Build navigation mesh')
+
+ col = layout.column()
+ col.label(text="Rasterization:")
+ row = col.row()
+ row.prop(rd, "cell_size")
+ row.prop(rd, "cell_height")
+
+ col = layout.column()
+ col.label(text="Agent:")
+ split = col.split()
+
+ col = split.column()
+ col.prop(rd, "agent_height", text="Height")
+ col.prop(rd, "agent_radius", text="Radius")
+
+ col = split.column()
+ col.prop(rd, "max_slope")
+ col.prop(rd, "max_climb")
+
+ col = layout.column()
+ col.label(text="Region:")
+ row = col.row()
+ row.prop(rd, "region_min_size")
+ row.prop(rd, "region_merge_size")
+
+ col = layout.column()
+ col.label(text="Polygonization:")
+ split = col.split()
+
+ col = split.column()
+ col.prop(rd, "edge_max_len")
+ col.prop(rd, "edge_max_error")
+
+ split.prop(rd, "verts_per_poly")
+
+ col = layout.column()
+ col.label(text="Detail Mesh:")
+ row = col.row()
+ row.prop(rd, "sample_dist")
+ row.prop(rd, "sample_max_error")
class WorldButtonsPanel():
@@ -455,37 +546,57 @@ class WORLD_PT_game_physics(WorldButtonsPanel, Panel):
layout.prop(gs, "physics_engine")
if gs.physics_engine != 'NONE':
- layout.prop(gs, "physics_gravity", text="Gravity")
+ layout.prop(gs, "physics_gravity", text=_("Gravity"))
split = layout.split()
col = split.column()
- col.label(text="Physics Steps:")
+ col.label(text=_("Physics Steps:"))
sub = col.column(align=True)
- sub.prop(gs, "physics_step_max", text="Max")
- sub.prop(gs, "physics_step_sub", text="Substeps")
- col.prop(gs, "fps", text="FPS")
+ sub.prop(gs, "physics_step_max", text=_("Max"))
+ sub.prop(gs, "physics_step_sub", text=_("Substeps"))
+ col.prop(gs, "fps", text=_("FPS"))
col = split.column()
- col.label(text="Logic Steps:")
- col.prop(gs, "logic_step_max", text="Max")
+ col.label(text=_("Logic Steps:"))
+ col.prop(gs, "logic_step_max", text=_("Max"))
col = layout.column()
- col.prop(gs, "use_occlusion_culling", text="Occlusion Culling")
+ col.prop(gs, "use_occlusion_culling", text=_("Occlusion Culling"))
sub = col.column()
sub.active = gs.use_occlusion_culling
- sub.prop(gs, "occlusion_culling_resolution", text="Resolution")
+ sub.prop(gs, "occlusion_culling_resolution", text=_("Resolution"))
else:
split = layout.split()
col = split.column()
- col.label(text="Physics Steps:")
- col.prop(gs, "fps", text="FPS")
+ col.label(text=_("Physics Steps:"))
+ col.prop(gs, "fps", text=_("FPS"))
col = split.column()
- col.label(text="Logic Steps:")
- col.prop(gs, "logic_step_max", text="Max")
+ col.label(text=_("Logic Steps:"))
+ col.prop(gs, "logic_step_max", text=_("Max"))
+
+
+class WORLD_PT_game_physics_obstacles(WorldButtonsPanel, Panel):
+ bl_label = "Obstacle simulation"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ scene = context.scene
+ return (scene.world and scene.render.engine in cls.COMPAT_ENGINES)
+
+ def draw(self, context):
+ layout = self.layout
+
+ gs = context.scene.game_settings
+
+ layout.prop(gs, "obstacle_simulation", text="Type")
+ if gs.obstacle_simulation != 'NONE':
+ layout.prop(gs, "level_height")
+ layout.prop(gs, "show_obstacle_simulation")
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index 13ce92f084c..7b04c990c6a 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Menu, Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
def active_node_mat(mat):
# TODO, 2.4x has a pipeline section, for 2.5 we need to communicate
@@ -114,9 +114,9 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
if ob.mode == 'EDIT':
row = layout.row(align=True)
- row.operator("object.material_slot_assign", text="Assign")
- row.operator("object.material_slot_select", text="Select")
- row.operator("object.material_slot_deselect", text="Deselect")
+ row.operator("object.material_slot_assign", text=_("Assign"))
+ row.operator("object.material_slot_select", text=_("Select"))
+ row.operator("object.material_slot_deselect", text=_("Deselect"))
split = layout.split(percentage=0.65)
@@ -142,7 +142,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
if mat.active_node_material:
row.prop(mat.active_node_material, "name", text="")
else:
- row.label(text="No material node selected")
+ row.label(text=_("No material node selected"))
class MATERIAL_PT_preview(MaterialButtonsPanel, Panel):
@@ -197,8 +197,8 @@ class MATERIAL_PT_pipeline(MaterialButtonsPanel, Panel):
col = split.column()
col.active = mat_type
- col.prop(mat, "use_cast_shadows_only", text="Cast Only")
- col.prop(mat, "shadow_cast_alpha", text="Casting Alpha")
+ col.prop(mat, "use_cast_shadows_only", text=_("Cast Only"))
+ col.prop(mat, "shadow_cast_alpha", text=_("Casting Alpha"))
col.prop(mat, "use_cast_buffer_shadows")
col.prop(mat, "use_cast_approximate")
col.prop(mat, "pass_index")
@@ -225,12 +225,12 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel):
col.prop(mat, "diffuse_color", text="")
sub = col.column()
sub.active = (not mat.use_shadeless)
- sub.prop(mat, "diffuse_intensity", text="Intensity")
+ sub.prop(mat, "diffuse_intensity", text=_("Intensity"))
col = split.column()
col.active = (not mat.use_shadeless)
col.prop(mat, "diffuse_shader", text="")
- col.prop(mat, "use_diffuse_ramp", text="Ramp")
+ col.prop(mat, "use_diffuse_ramp", text=_("Ramp"))
col = layout.column()
col.active = (not mat.use_shadeless)
@@ -240,12 +240,12 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel):
col.prop(mat, "darkness")
elif mat.diffuse_shader == 'TOON':
row = col.row()
- row.prop(mat, "diffuse_toon_size", text="Size")
- row.prop(mat, "diffuse_toon_smooth", text="Smooth")
+ row.prop(mat, "diffuse_toon_size", text=_("Size"))
+ row.prop(mat, "diffuse_toon_smooth", text=_("Smooth"))
elif mat.diffuse_shader == 'FRESNEL':
row = col.row()
- row.prop(mat, "diffuse_fresnel", text="Fresnel")
- row.prop(mat, "diffuse_fresnel_factor", text="Factor")
+ row.prop(mat, "diffuse_fresnel", text=_("Fresnel"))
+ row.prop(mat, "diffuse_fresnel_factor", text=_("Factor"))
if mat.use_diffuse_ramp:
col = layout.column()
@@ -255,10 +255,10 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel):
col.separator()
row = col.row()
- row.prop(mat, "diffuse_ramp_input", text="Input")
- row.prop(mat, "diffuse_ramp_blend", text="Blend")
+ row.prop(mat, "diffuse_ramp_input", text=_("Input"))
+ row.prop(mat, "diffuse_ramp_blend", text=_("Blend"))
- col.prop(mat, "diffuse_ramp_factor", text="Factor")
+ col.prop(mat, "diffuse_ramp_factor", text=_("Factor"))
class MATERIAL_PT_specular(MaterialButtonsPanel, Panel):
@@ -282,25 +282,25 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, Panel):
col = split.column()
col.prop(mat, "specular_color", text="")
- col.prop(mat, "specular_intensity", text="Intensity")
+ col.prop(mat, "specular_intensity", text=_("Intensity"))
col = split.column()
col.prop(mat, "specular_shader", text="")
- col.prop(mat, "use_specular_ramp", text="Ramp")
+ col.prop(mat, "use_specular_ramp", text=_("Ramp"))
col = layout.column()
if mat.specular_shader in {'COOKTORR', 'PHONG'}:
- col.prop(mat, "specular_hardness", text="Hardness")
+ col.prop(mat, "specular_hardness", text=_("Hardness"))
elif mat.specular_shader == 'BLINN':
row = col.row()
- row.prop(mat, "specular_hardness", text="Hardness")
- row.prop(mat, "specular_ior", text="IOR")
+ row.prop(mat, "specular_hardness", text=_("Hardness"))
+ row.prop(mat, "specular_ior", text=_("IOR"))
elif mat.specular_shader == 'WARDISO':
- col.prop(mat, "specular_slope", text="Slope")
+ col.prop(mat, "specular_slope", text=_("Slope"))
elif mat.specular_shader == 'TOON':
row = col.row()
- row.prop(mat, "specular_toon_size", text="Size")
- row.prop(mat, "specular_toon_smooth", text="Smooth")
+ row.prop(mat, "specular_toon_size", text=_("Size"))
+ row.prop(mat, "specular_toon_smooth", text=_("Smooth"))
if mat.use_specular_ramp:
layout.separator()
@@ -308,10 +308,10 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, Panel):
layout.separator()
row = layout.row()
- row.prop(mat, "specular_ramp_input", text="Input")
- row.prop(mat, "specular_ramp_blend", text="Blend")
+ row.prop(mat, "specular_ramp_input", text=_("Input"))
+ row.prop(mat, "specular_ramp_blend", text=_("Blend"))
- layout.prop(mat, "specular_ramp_factor", text="Factor")
+ layout.prop(mat, "specular_ramp_factor", text=_("Factor"))
class MATERIAL_PT_shading(MaterialButtonsPanel, Panel):
@@ -384,14 +384,14 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, Panel):
col.prop(mat, "alpha")
row = col.row()
row.active = (base_mat.transparency_method != 'MASK') and (not mat.use_shadeless)
- row.prop(mat, "specular_alpha", text="Specular")
+ row.prop(mat, "specular_alpha", text=_("Specular"))
col = split.column()
col.active = (not mat.use_shadeless)
col.prop(rayt, "fresnel")
sub = col.column()
sub.active = rayt.fresnel > 0
- sub.prop(rayt, "fresnel_factor", text="Blend")
+ sub.prop(rayt, "fresnel_factor", text=_("Blend"))
if base_mat.transparency_method == 'RAYTRACE':
layout.separator()
@@ -406,12 +406,12 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, Panel):
col.prop(rayt, "depth")
col = split.column()
- col.label(text="Gloss:")
- col.prop(rayt, "gloss_factor", text="Amount")
+ col.label(text=_("Gloss:"))
+ col.prop(rayt, "gloss_factor", text=_("Amount"))
sub = col.column()
sub.active = rayt.gloss_factor < 1.0
- sub.prop(rayt, "gloss_threshold", text="Threshold")
- sub.prop(rayt, "gloss_samples", text="Samples")
+ sub.prop(rayt, "gloss_threshold", text=_("Threshold"))
+ sub.prop(rayt, "gloss_samples", text=_("Samples"))
class MATERIAL_PT_mirror(MaterialButtonsPanel, Panel):
@@ -448,28 +448,28 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel, Panel):
col.prop(raym, "fresnel")
sub = col.column()
sub.active = raym.fresnel > 0
- sub.prop(raym, "fresnel_factor", text="Blend")
+ sub.prop(raym, "fresnel_factor", text=_("Blend"))
split = layout.split()
col = split.column()
col.separator()
col.prop(raym, "depth")
- col.prop(raym, "distance", text="Max Dist")
+ col.prop(raym, "distance", text=_("Max Dist"))
col.separator()
sub = col.split(percentage=0.4)
sub.active = raym.distance > 0.0
- sub.label(text="Fade To:")
+ sub.label(text=_("Fade To:"))
sub.prop(raym, "fade_to", text="")
col = split.column()
- col.label(text="Gloss:")
- col.prop(raym, "gloss_factor", text="Amount")
+ col.label(text=_("Gloss:"))
+ col.prop(raym, "gloss_factor", text=_("Amount"))
sub = col.column()
sub.active = raym.gloss_factor < 1.0
- sub.prop(raym, "gloss_threshold", text="Threshold")
- sub.prop(raym, "gloss_samples", text="Samples")
- sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
+ sub.prop(raym, "gloss_threshold", text=_("Threshold"))
+ sub.prop(raym, "gloss_samples", text=_("Samples"))
+ sub.prop(raym, "gloss_anisotropic", text=_("Anisotropic"))
class MATERIAL_PT_sss(MaterialButtonsPanel, Panel):
@@ -510,18 +510,18 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, Panel):
col.prop(sss, "ior")
col.prop(sss, "scale")
col.prop(sss, "color", text="")
- col.prop(sss, "radius", text="RGB Radius", expand=True)
+ col.prop(sss, "radius", text=_("RGB Radius"), expand=True)
col = split.column()
sub = col.column(align=True)
- sub.label(text="Blend:")
- sub.prop(sss, "color_factor", text="Color")
- sub.prop(sss, "texture_factor", text="Texture")
- sub.label(text="Scattering Weight:")
+ sub.label(text=_("Blend:"))
+ sub.prop(sss, "color_factor", text=_("Color"))
+ sub.prop(sss, "texture_factor", text=_("Texture"))
+ sub.label(text=_("Scattering Weight:"))
sub.prop(sss, "front")
sub.prop(sss, "back")
col.separator()
- col.prop(sss, "error_threshold", text="Error")
+ col.prop(sss, "error_threshold", text=_("Error"))
class MATERIAL_PT_halo(MaterialButtonsPanel, Panel):
@@ -561,7 +561,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, Panel):
col.prop(halo, "hardness")
col.prop(halo, "add")
- layout.label(text="Options:")
+ layout.label(text=_("Options:"))
split = layout.split()
col = split.column()
@@ -603,18 +603,46 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(halo, "flare_size", text="Size")
- col.prop(halo, "flare_boost", text="Boost")
- col.prop(halo, "flare_seed", text="Seed")
+ col.prop(halo, "flare_size", text=_("Size"))
+ col.prop(halo, "flare_boost", text=_("Boost"))
+ col.prop(halo, "flare_seed", text=_("Seed"))
col = split.column()
- col.prop(halo, "flare_subflare_count", text="Subflares")
- col.prop(halo, "flare_subflare_size", text="Subsize")
+ col.prop(halo, "flare_subflare_count", text=_("Subflares"))
+ col.prop(halo, "flare_subflare_size", text=_("Subsize"))
+
+
+class MATERIAL_PT_game_settings(MaterialButtonsPanel, bpy.types.Panel):
+ bl_label = "Game Settings"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+ @classmethod
+ def poll(cls, context):
+ return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES)
-class MATERIAL_PT_physics(MaterialButtonsPanel, Panel):
+ def draw(self, context):
+ layout = self.layout
+ game = context.material.game_settings # dont use node material
+
+ row = layout.row()
+ row.prop(game, "back_culling")
+ row.prop(game, "invisible")
+ row.prop(game, "text")
+
+ row = layout.row()
+ row.label(text="Alpha Blend:")
+ row.label(text="Face Orientation:")
+ row = layout.row()
+ row.prop(game,"alpha_blend",text="")
+ row.prop(game,"face_orientation",text="")
+
+class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ def draw_header(self, context):
+ game = context.material.game_settings
+ self.layout.prop(game, "physics", text="")
@classmethod
def poll(cls, context):
@@ -622,6 +650,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, Panel):
def draw(self, context):
layout = self.layout
+ layout.active = context.material.game_settings.physics
phys = context.material.physics # dont use node material
@@ -631,7 +660,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, Panel):
row.prop(phys, "elasticity", slider=True)
row = layout.row()
- row.label(text="Force Field:")
+ row.label(text=_("Force Field:"))
row = layout.row()
row.prop(phys, "fh_force")
@@ -663,10 +692,10 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, Panel):
col = split.column()
sub = col.column(align=True)
- sub.label(text="Size:")
- sub.prop(tan, "root_size", text="Root")
- sub.prop(tan, "tip_size", text="Tip")
- sub.prop(tan, "size_min", text="Minimum")
+ sub.label(text=_("Size:"))
+ sub.prop(tan, "root_size", text=_("Root"))
+ sub.prop(tan, "tip_size", text=_("Tip"))
+ sub.prop(tan, "size_min", text=_("Minimum"))
sub.prop(tan, "use_blender_units")
sub = col.column()
sub.active = (not mat.use_shadeless)
@@ -674,7 +703,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, Panel):
col.prop(tan, "shape")
col = split.column()
- col.label(text="Shading:")
+ col.label(text=_("Shading:"))
col.prop(tan, "width_fade")
ob = context.object
if ob and ob.type == 'MESH':
@@ -684,9 +713,9 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, Panel):
col.separator()
sub = col.column()
sub.active = (not mat.use_shadeless)
- sub.label("Surface diffuse:")
+ sub.label(_("Surface diffuse:"))
sub = col.column()
- sub.prop(tan, "blend_distance", text="Distance")
+ sub.prop(tan, "blend_distance", text=_("Distance"))
class MATERIAL_PT_options(MaterialButtonsPanel, Panel):
@@ -719,11 +748,11 @@ class MATERIAL_PT_options(MaterialButtonsPanel, Panel):
sub.prop(mat, "offset_z")
sub.active = mat.use_transparency and mat.transparency_method == 'Z_TRANSPARENCY'
sub = col.column(align=True)
- sub.label(text="Light Group:")
+ sub.label(text=_("Light Group:"))
sub.prop(mat, "light_group", text="")
row = sub.row()
row.active = bool(mat.light_group)
- row.prop(mat, "use_light_group_exclusive", text="Exclusive")
+ row.prop(mat, "use_light_group_exclusive", text=_("Exclusive"))
col = split.column()
col.prop(mat, "use_face_texture")
@@ -758,12 +787,12 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(mat, "use_shadows", text="Receive")
- col.prop(mat, "use_transparent_shadows", text="Receive Transparent")
+ col.prop(mat, "use_shadows", text=_("Receive"))
+ col.prop(mat, "use_transparent_shadows", text=_("Receive Transparent"))
if simple_material(base_mat):
- col.prop(mat, "use_cast_shadows_only", text="Cast Only")
- col.prop(mat, "shadow_cast_alpha", text="Casting Alpha")
- col.prop(mat, "use_only_shadow", text="Shadows Only")
+ col.prop(mat, "use_cast_shadows_only", text=_("Cast Only"))
+ col.prop(mat, "shadow_cast_alpha", text=_("Casting Alpha"))
+ col.prop(mat, "use_only_shadow", text=_("Shadows Only"))
sub = col.column()
sub.active = mat.use_only_shadow
sub.prop(mat, "shadow_only_type", text="")
@@ -773,11 +802,11 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel):
col.prop(mat, "use_cast_buffer_shadows")
sub = col.column()
sub.active = mat.use_cast_buffer_shadows
- sub.prop(mat, "shadow_buffer_bias", text="Buffer Bias")
- col.prop(mat, "use_ray_shadow_bias", text="Auto Ray Bias")
+ sub.prop(mat, "shadow_buffer_bias", text=_("Buffer Bias"))
+ col.prop(mat, "use_ray_shadow_bias", text=_("Auto Ray Bias"))
sub = col.column()
sub.active = (not mat.use_ray_shadow_bias)
- sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
+ sub.prop(mat, "shadow_ray_bias", text=_("Ray Bias"))
if simple_material(base_mat):
col.prop(mat, "use_cast_approximate")
@@ -890,7 +919,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, Panel):
sub = col.column()
sub.enabled = True
sub.active = False
- sub.label("Light Cache Enabled")
+ sub.label(_("Light Cache Enabled"))
col.prop(vol, "cache_resolution")
sub = col.column(align=True)
@@ -929,7 +958,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Step Calculation:")
+ col.label(text=_("Step Calculation:"))
col.prop(vol, "step_method", text="")
col = col.column(align=True)
col.prop(vol, "step_size")
@@ -964,11 +993,11 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel, Panel):
col.prop(mat, "use_mist")
col = split.column()
- col.label(text="Light Group:")
+ col.label(text=_("Light Group:"))
col.prop(mat, "light_group", text="")
row = col.row()
row.active = bool(mat.light_group)
- row.prop(mat, "use_light_group_exclusive", text="Exclusive")
+ row.prop(mat, "use_light_group_exclusive", text=_("Exclusive"))
class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 0779debb102..a099189eed6 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class ObjectButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -55,14 +55,14 @@ class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
row.column().prop(ob, "location")
if ob.rotation_mode == 'QUATERNION':
- row.column().prop(ob, "rotation_quaternion", text="Rotation")
+ row.column().prop(ob, "rotation_quaternion", text=_("Rotation"))
elif ob.rotation_mode == 'AXIS_ANGLE':
- #row.column().label(text="Rotation")
- #row.column().prop(pchan, "rotation_angle", text="Angle")
- #row.column().prop(pchan, "rotation_axis", text="Axis")
- row.column().prop(ob, "rotation_axis_angle", text="Rotation")
+ #row.column().label(text=_("Rotation"))
+ #row.column().prop(pchan, "rotation_angle", text=_("Angle"))
+ #row.column().prop(pchan, "rotation_axis", text=_("Axis"))
+ row.column().prop(ob, "rotation_axis_angle", text=_("Rotation"))
else:
- row.column().prop(ob, "rotation_euler", text="Rotation")
+ row.column().prop(ob, "rotation_euler", text=_("Rotation"))
row.column().prop(ob, "scale")
@@ -82,15 +82,15 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
row.column().prop(ob, "delta_location")
if ob.rotation_mode == 'QUATERNION':
- row.column().prop(ob, "delta_rotation_quaternion", text="Rotation")
+ row.column().prop(ob, "delta_rotation_quaternion", text=_("Rotation"))
elif ob.rotation_mode == 'AXIS_ANGLE':
- #row.column().label(text="Rotation")
- #row.column().prop(pchan, "delta_rotation_angle", text="Angle")
- #row.column().prop(pchan, "delta_rotation_axis", text="Axis")
- #row.column().prop(ob, "delta_rotation_axis_angle", text="Rotation")
- row.column().label(text="Not for Axis-Angle")
+ #row.column().label(text=_("Rotation"))
+ #row.column().prop(pchan, "delta_rotation_angle", text=_("Angle"))
+ #row.column().prop(pchan, "delta_rotation_axis", text=_("Axis"))
+ #row.column().prop(ob, "delta_rotation_axis_angle", text=_("Rotation"))
+ row.column().label(text=_("Not for Axis-Angle"))
else:
- row.column().prop(ob, "delta_rotation_euler", text="Rotation")
+ row.column().prop(ob, "delta_rotation_euler", text=_("Rotation"))
row.column().prop(ob, "delta_scale")
@@ -107,18 +107,18 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
row = layout.row()
col = row.column()
- col.prop(ob, "lock_location", text="Location")
+ col.prop(ob, "lock_location", text=_("Location"))
col = row.column()
if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
- col.prop(ob, "lock_rotations_4d", text="Rotation")
+ col.prop(ob, "lock_rotations_4d", text=_("Rotation"))
if ob.lock_rotations_4d:
col.prop(ob, "lock_rotation_w", text="W")
col.prop(ob, "lock_rotation", text="")
else:
- col.prop(ob, "lock_rotation", text="Rotation")
+ col.prop(ob, "lock_rotation", text=_("Rotation"))
- row.column().prop(ob, "lock_scale", text="Scale")
+ row.column().prop(ob, "lock_scale", text=_("Scale"))
class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
@@ -137,7 +137,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
col.prop(ob, "pass_index")
col = split.column()
- col.label(text="Parent:")
+ col.label(text=_("Parent:"))
col.prop(ob, "parent", text="")
sub = col.column()
@@ -157,7 +157,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
ob = context.object
row = layout.row(align=True)
- row.operator("object.group_link", text="Add to Group")
+ row.operator("object.group_link", text=_("Add to Group"))
row.operator("object.group_add", text="", icon='ZOOMIN')
# XXX, this is bad practice, yes, I wrote it :( - campbell
@@ -176,12 +176,12 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
split = col.box().split()
col = split.column()
- col.prop(group, "layers", text="Dupli")
+ col.prop(group, "layers", text=_("Dupli"))
col = split.column()
col.prop(group, "dupli_offset", text="")
- prop = col.operator("wm.context_set_value", text="From Cursor")
+ prop = col.operator("wm.context_set_value", text=_("From Cursor"))
prop.data_path = "object.users_group[%d].dupli_offset" % index
prop.value = value
index += 1
@@ -197,11 +197,11 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(ob, "draw_type", text="Type")
+ col.prop(ob, "draw_type", text=_("Type"))
col = split.column()
row = col.row()
- row.prop(ob, "show_bounds", text="Bounds")
+ row.prop(ob, "show_bounds", text=_("Bounds"))
sub = row.row()
sub.active = ob.show_bounds
sub.prop(ob, "draw_bounds_type", text="")
@@ -209,16 +209,16 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(ob, "show_name", text="Name")
- col.prop(ob, "show_axis", text="Axis")
- col.prop(ob, "show_wire", text="Wire")
- col.prop(ob, "color", text="Object Color")
+ col.prop(ob, "show_name", text=_("Name"))
+ col.prop(ob, "show_axis", text=_("Axis"))
+ col.prop(ob, "show_wire", text=_("Wire"))
+ col.prop(ob, "color", text=_("Object Color"))
col = split.column()
- col.prop(ob, "show_texture_space", text="Texture Space")
- col.prop(ob, "show_x_ray", text="X-Ray")
+ col.prop(ob, "show_texture_space", text=_("Texture Space"))
+ col.prop(ob, "show_x_ray", text=_("X-Ray"))
if ob.type == 'MESH':
- col.prop(ob, "show_transparent", text="Transparency")
+ col.prop(ob, "show_transparent", text=_("Transparency"))
class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
@@ -235,26 +235,26 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
split = layout.split()
col = split.column(align=True)
- col.prop(ob, "dupli_frames_start", text="Start")
- col.prop(ob, "dupli_frames_end", text="End")
+ col.prop(ob, "dupli_frames_start", text=_("Start"))
+ col.prop(ob, "dupli_frames_end", text=_("End"))
col = split.column(align=True)
- col.prop(ob, "dupli_frames_on", text="On")
- col.prop(ob, "dupli_frames_off", text="Off")
+ col.prop(ob, "dupli_frames_on", text=_("On"))
+ col.prop(ob, "dupli_frames_off", text=_("Off"))
- layout.prop(ob, "use_dupli_frames_speed", text="Speed")
+ layout.prop(ob, "use_dupli_frames_speed", text=_("Speed"))
elif ob.dupli_type == 'VERTS':
- layout.prop(ob, "use_dupli_vertices_rotation", text="Rotation")
+ layout.prop(ob, "use_dupli_vertices_rotation", text=_("Rotation"))
elif ob.dupli_type == 'FACES':
row = layout.row()
- row.prop(ob, "use_dupli_faces_scale", text="Scale")
- row.prop(ob, "dupli_faces_scale", text="Inherit Scale")
+ row.prop(ob, "use_dupli_faces_scale", text=_("Scale"))
+ row.prop(ob, "dupli_faces_scale", text=_("Inherit Scale"))
elif ob.dupli_type == 'GROUP':
- layout.prop(ob, "dupli_group", text="Group")
+ layout.prop(ob, "dupli_group", text=_("Group"))
# XXX: the following options are all quite buggy, ancient hacks that should be dropped
@@ -271,21 +271,21 @@ class OBJECT_PT_animation(ObjectButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Time Offset:")
- col.prop(ob, "use_time_offset_edit", text="Edit")
+ col.label(text=_("Time Offset:"))
+ col.prop(ob, "use_time_offset_edit", text=_("Edit"))
row = col.row()
- row.prop(ob, "use_time_offset_parent", text="Parent")
+ row.prop(ob, "use_time_offset_parent", text=_("Parent"))
row.active = (ob.parent is not None)
row = col.row()
row.prop(ob, "use_slow_parent")
row.active = (ob.parent is not None)
- col.prop(ob, "time_offset", text="Offset")
+ col.prop(ob, "time_offset", text=_("Offset"))
# XXX: these are still used for a few curve-related tracking features
col = split.column()
- col.label(text="Tracking Axes:")
- col.prop(ob, "track_axis", text="Axis")
- col.prop(ob, "up_axis", text="Up Axis")
+ col.label(text=_("Tracking Axes:"))
+ col.prop(ob, "track_axis", text=_("Axis"))
+ col.prop(ob, "up_axis", text=_("Up Axis"))
from bl_ui.properties_animviz import (
@@ -312,8 +312,8 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
layout.separator()
row = layout.row()
- row.operator("object.paths_calculate", text="Calculate Paths")
- row.operator("object.paths_clear", text="Clear Paths")
+ row.operator("object.paths_calculate", text=_("Calculate Paths"))
+ row.operator("object.paths_clear", text=_("Clear Paths"))
class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): # , Panel): # inherit from panel when ready
diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py
index 05fac2026a0..e7385d3926b 100644
--- a/release/scripts/startup/bl_ui/properties_object_constraint.py
+++ b/release/scripts/startup/bl_ui/properties_object_constraint.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
class ConstraintButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -43,7 +43,7 @@ class ConstraintButtonsPanel():
split = layout.split(percentage=0.2)
- split.label(text="Space:")
+ split.label(text=_("Space:"))
row = split.row()
if target:
@@ -60,21 +60,21 @@ class ConstraintButtonsPanel():
if con.target and subtargets:
if con.target.type == 'ARMATURE':
- layout.prop_search(con, "subtarget", con.target.data, "bones", text="Bone")
+ layout.prop_search(con, "subtarget", con.target.data, "bones", text=_("Bone"))
if hasattr(con, "head_tail"):
row = layout.row()
- row.label(text="Head/Tail:")
+ row.label(text=_("Head/Tail:"))
row.prop(con, "head_tail", text="")
elif con.target.type in {'MESH', 'LATTICE'}:
- layout.prop_search(con, "subtarget", con.target, "vertex_groups", text="Vertex Group")
+ layout.prop_search(con, "subtarget", con.target, "vertex_groups", text=_("Vertex Group"))
def ik_template(self, layout, con):
# only used for iTaSC
layout.prop(con, "pole_target")
if con.pole_target and con.pole_target.type == 'ARMATURE':
- layout.prop_search(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone")
+ layout.prop_search(con, "pole_subtarget", con.pole_target.data, "bones", text=_("Bone"))
if con.pole_target:
row = layout.row()
@@ -96,19 +96,19 @@ class ConstraintButtonsPanel():
split = layout.split()
col = split.column()
- col.label(text="Location:")
+ col.label(text=_("Location:"))
col.prop(con, "use_location_x", text="X")
col.prop(con, "use_location_y", text="Y")
col.prop(con, "use_location_z", text="Z")
col = split.column()
- col.label(text="Rotation:")
+ col.label(text=_("Rotation:"))
col.prop(con, "use_rotation_x", text="X")
col.prop(con, "use_rotation_y", text="Y")
col.prop(con, "use_rotation_z", text="Z")
col = split.column()
- col.label(text="Scale:")
+ col.label(text=_("Scale:"))
col.prop(con, "use_scale_x", text="X")
col.prop(con, "use_scale_y", text="Y")
col.prop(con, "use_scale_z", text="Z")
@@ -121,11 +121,11 @@ class ConstraintButtonsPanel():
self.target_template(layout, con)
row = layout.row()
- row.label(text="To:")
+ row.label(text=_("To:"))
row.prop(con, "track_axis", expand=True)
row = layout.row()
- row.prop(con, "up_axis", text="Up")
+ row.prop(con, "up_axis", text=_("Up"))
row.prop(con, "use_target_z")
self.space_template(layout, con)
@@ -140,7 +140,7 @@ class ConstraintButtonsPanel():
layout.prop(con, "pole_target")
if con.pole_target and con.pole_target.type == 'ARMATURE':
- layout.prop_search(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone")
+ layout.prop_search(con, "pole_subtarget", con.pole_target.data, "bones", text=_("Bone"))
if con.pole_target:
row = layout.row()
@@ -152,11 +152,11 @@ class ConstraintButtonsPanel():
col.prop(con, "iterations")
col.prop(con, "chain_count")
- col.label(text="Weight:")
- col.prop(con, "weight", text="Position", slider=True)
+ col.label(text=_("Weight:"))
+ col.prop(con, "weight", text=_("Position"), slider=True)
sub = col.column()
sub.active = con.use_rotation
- sub.prop(con, "orient_weight", text="Rotation", slider=True)
+ sub.prop(con, "orient_weight", text=_("Rotation"), slider=True)
col = split.column()
col.prop(con, "use_tail")
@@ -170,16 +170,16 @@ class ConstraintButtonsPanel():
self.ik_template(layout, con)
row = layout.row()
- row.label(text="Axis Ref:")
+ row.label(text=_("Axis Ref:"))
row.prop(con, "reference_axis", expand=True)
split = layout.split(percentage=0.33)
split.row().prop(con, "use_location")
row = split.row()
- row.prop(con, "weight", text="Weight", slider=True)
+ row.prop(con, "weight", text=_("Weight"), slider=True)
row.active = con.use_location
split = layout.split(percentage=0.33)
row = split.row()
- row.label(text="Lock:")
+ row.label(text=_("Lock:"))
row = split.row()
row.prop(con, "lock_location_x", text="X")
row.prop(con, "lock_location_y", text="Y")
@@ -189,11 +189,11 @@ class ConstraintButtonsPanel():
split = layout.split(percentage=0.33)
split.row().prop(con, "use_rotation")
row = split.row()
- row.prop(con, "orient_weight", text="Weight", slider=True)
+ row.prop(con, "orient_weight", text=_("Weight"), slider=True)
row.active = con.use_rotation
split = layout.split(percentage=0.33)
row = split.row()
- row.label(text="Lock:")
+ row.label(text=_("Lock:"))
row = split.row()
row.prop(con, "lock_rotation_x", text="X")
row.prop(con, "lock_rotation_y", text="Y")
@@ -207,8 +207,8 @@ class ConstraintButtonsPanel():
layout.prop(con, "limit_mode")
row = layout.row()
- row.prop(con, "weight", text="Weight", slider=True)
- row.prop(con, "distance", text="Distance", slider=True)
+ row.prop(con, "weight", text=_("Weight"), slider=True)
+ row.prop(con, "distance", text=_("Distance"), slider=True)
def FOLLOW_PATH(self, context, layout, con):
self.target_template(layout, con)
@@ -222,16 +222,16 @@ class ConstraintButtonsPanel():
col = split.column()
col.prop(con, "use_fixed_location")
if con.use_fixed_location:
- col.prop(con, "offset_factor", text="Offset")
+ col.prop(con, "offset_factor", text=_("Offset"))
else:
col.prop(con, "offset")
row = layout.row()
- row.label(text="Forward:")
+ row.label(text=_("Forward:"))
row.prop(con, "forward_axis", expand=True)
row = layout.row()
- row.prop(con, "up_axis", text="Up")
+ row.prop(con, "up_axis", text=_("Up"))
row.label()
def LIMIT_ROTATION(self, context, layout, con):
@@ -241,27 +241,27 @@ class ConstraintButtonsPanel():
col.prop(con, "use_limit_x")
sub = col.column()
sub.active = con.use_limit_x
- sub.prop(con, "min_x", text="Min")
- sub.prop(con, "max_x", text="Max")
+ sub.prop(con, "min_x", text=_("Min"))
+ sub.prop(con, "max_x", text=_("Max"))
col = split.column(align=True)
col.prop(con, "use_limit_y")
sub = col.column()
sub.active = con.use_limit_y
- sub.prop(con, "min_y", text="Min")
- sub.prop(con, "max_y", text="Max")
+ sub.prop(con, "min_y", text=_("Min"))
+ sub.prop(con, "max_y", text=_("Max"))
col = split.column(align=True)
col.prop(con, "use_limit_z")
sub = col.column()
sub.active = con.use_limit_z
- sub.prop(con, "min_z", text="Min")
- sub.prop(con, "max_z", text="Max")
+ sub.prop(con, "min_z", text=_("Min"))
+ sub.prop(con, "max_z", text=_("Max"))
layout.prop(con, "use_transform_limit")
row = layout.row()
- row.label(text="Convert:")
+ row.label(text=_("Convert:"))
row.prop(con, "owner_space", text="")
def LIMIT_LOCATION(self, context, layout, con):
@@ -302,7 +302,7 @@ class ConstraintButtonsPanel():
row.label()
row = layout.row()
- row.label(text="Convert:")
+ row.label(text=_("Convert:"))
row.prop(con, "owner_space", text="")
def LIMIT_SCALE(self, context, layout, con):
@@ -343,7 +343,7 @@ class ConstraintButtonsPanel():
row.label()
row = layout.row()
- row.label(text="Convert:")
+ row.label(text=_("Convert:"))
row.prop(con, "owner_space", text="")
def COPY_ROTATION(self, context, layout, con):
@@ -355,19 +355,19 @@ class ConstraintButtonsPanel():
col.prop(con, "use_x", text="X")
sub = col.column()
sub.active = con.use_x
- sub.prop(con, "invert_x", text="Invert")
+ sub.prop(con, "invert_x", text=_("Invert"))
col = split.column()
col.prop(con, "use_y", text="Y")
sub = col.column()
sub.active = con.use_y
- sub.prop(con, "invert_y", text="Invert")
+ sub.prop(con, "invert_y", text=_("Invert"))
col = split.column()
col.prop(con, "use_z", text="Z")
sub = col.column()
sub.active = con.use_z
- sub.prop(con, "invert_z", text="Invert")
+ sub.prop(con, "invert_z", text=_("Invert"))
layout.prop(con, "use_offset")
@@ -382,19 +382,19 @@ class ConstraintButtonsPanel():
col.prop(con, "use_x", text="X")
sub = col.column()
sub.active = con.use_x
- sub.prop(con, "invert_x", text="Invert")
+ sub.prop(con, "invert_x", text=_("Invert"))
col = split.column()
col.prop(con, "use_y", text="Y")
sub = col.column()
sub.active = con.use_y
- sub.prop(con, "invert_y", text="Invert")
+ sub.prop(con, "invert_y", text=_("Invert"))
col = split.column()
col.prop(con, "use_z", text="Z")
sub = col.column()
sub.active = con.use_z
- sub.prop(con, "invert_z", text="Invert")
+ sub.prop(con, "invert_z", text=_("Invert"))
layout.prop(con, "use_offset")
@@ -415,7 +415,7 @@ class ConstraintButtonsPanel():
def MAINTAIN_VOLUME(self, context, layout, con):
row = layout.row()
- row.label(text="Free:")
+ row.label(text=_("Free:"))
row.prop(con, "free_axis", expand=True)
layout.prop(con, "volume")
@@ -439,28 +439,28 @@ class ConstraintButtonsPanel():
split = layout.split()
col = split.column(align=True)
- col.label(text="Action Length:")
- col.prop(con, "frame_start", text="Start")
- col.prop(con, "frame_end", text="End")
+ col.label(text=_("Action Length:"))
+ col.prop(con, "frame_start", text=_("Start"))
+ col.prop(con, "frame_end", text=_("End"))
col = split.column(align=True)
- col.label(text="Target Range:")
- col.prop(con, "min", text="Min")
- col.prop(con, "max", text="Max")
+ col.label(text=_("Target Range:"))
+ col.prop(con, "min", text=_("Min"))
+ col.prop(con, "max", text=_("Max"))
row = layout.row()
- row.label(text="Convert:")
+ row.label(text=_("Convert:"))
row.prop(con, "target_space", text="")
def LOCKED_TRACK(self, context, layout, con):
self.target_template(layout, con)
row = layout.row()
- row.label(text="To:")
+ row.label(text=_("To:"))
row.prop(con, "track_axis", expand=True)
row = layout.row()
- row.label(text="Lock:")
+ row.label(text=_("Lock:"))
row.prop(con, "lock_axis", expand=True)
def LIMIT_DISTANCE(self, context, layout, con):
@@ -471,7 +471,7 @@ class ConstraintButtonsPanel():
col.operator("constraint.limitdistance_reset")
row = layout.row()
- row.label(text="Clamp Region:")
+ row.label(text=_("Clamp Region:"))
row.prop(con, "limit_mode", text="")
row = layout.row()
@@ -482,16 +482,16 @@ class ConstraintButtonsPanel():
self.target_template(layout, con)
row = layout.row()
- row.prop(con, "rest_length", text="Rest Length")
- row.operator("constraint.stretchto_reset", text="Reset")
+ row.prop(con, "rest_length", text=_("Rest Length"))
+ row.operator("constraint.stretchto_reset", text=_("Reset"))
- layout.prop(con, "bulge", text="Volume Variation")
+ layout.prop(con, "bulge", text=_("Volume Variation"))
row = layout.row()
- row.label(text="Volume:")
+ row.label(text=_("Volume:"))
row.prop(con, "volume", expand=True)
- row.label(text="Plane:")
+ row.label(text=_("Plane:"))
row.prop(con, "keep_axis", expand=True)
def FLOOR(self, context, layout, con):
@@ -504,7 +504,7 @@ class ConstraintButtonsPanel():
layout.prop(con, "offset")
row = layout.row()
- row.label(text="Min/Max:")
+ row.label(text=_("Min/Max:"))
row.prop(con, "floor_location", expand=True)
self.space_template(layout, con)
@@ -516,113 +516,113 @@ class ConstraintButtonsPanel():
layout.prop(con, "child")
row = layout.row()
- row.prop(con, "use_linked_collision", text="Linked Collision")
- row.prop(con, "show_pivot", text="Display Pivot")
+ row.prop(con, "use_linked_collision", text=_("Linked Collision"))
+ row.prop(con, "show_pivot", text=_("Display Pivot"))
split = layout.split()
col = split.column(align=True)
- col.label(text="Pivot:")
+ col.label(text=_("Pivot:"))
col.prop(con, "pivot_x", text="X")
col.prop(con, "pivot_y", text="Y")
col.prop(con, "pivot_z", text="Z")
col = split.column(align=True)
- col.label(text="Axis:")
+ col.label(text=_("Axis:"))
col.prop(con, "axis_x", text="X")
col.prop(con, "axis_y", text="Y")
col.prop(con, "axis_z", text="Z")
if con.pivot_type == 'CONE_TWIST':
- layout.label(text="Limits:")
+ layout.label(text=_("Limits:"))
split = layout.split()
col = split.column()
- col.prop(con, "use_angular_limit_x", text="Angle X")
+ col.prop(con, "use_angular_limit_x", text=_("Angle X"))
sub = col.column()
sub.active = con.use_angular_limit_x
sub.prop(con, "limit_angle_max_x", text="")
col = split.column()
- col.prop(con, "use_angular_limit_y", text="Angle Y")
+ col.prop(con, "use_angular_limit_y", text=_("Angle Y"))
sub = col.column()
sub.active = con.use_angular_limit_y
sub.prop(con, "limit_angle_max_y", text="")
col = split.column()
- col.prop(con, "use_angular_limit_z", text="Angle Z")
+ col.prop(con, "use_angular_limit_z", text=_("Angle Z"))
sub = col.column()
sub.active = con.use_angular_limit_z
sub.prop(con, "limit_angle_max_z", text="")
elif con.pivot_type == 'GENERIC_6_DOF':
- layout.label(text="Limits:")
+ layout.label(text=_("Limits:"))
split = layout.split()
col = split.column(align=True)
col.prop(con, "use_limit_x", text="X")
sub = col.column()
sub.active = con.use_limit_x
- sub.prop(con, "limit_min_x", text="Min")
- sub.prop(con, "limit_max_x", text="Max")
+ sub.prop(con, "limit_min_x", text=_("Min"))
+ sub.prop(con, "limit_max_x", text=_("Max"))
col = split.column(align=True)
col.prop(con, "use_limit_y", text="Y")
sub = col.column()
sub.active = con.use_limit_y
- sub.prop(con, "limit_min_y", text="Min")
- sub.prop(con, "limit_max_y", text="Max")
+ sub.prop(con, "limit_min_y", text=_("Min"))
+ sub.prop(con, "limit_max_y", text=_("Max"))
col = split.column(align=True)
col.prop(con, "use_limit_z", text="Z")
sub = col.column()
sub.active = con.use_limit_z
- sub.prop(con, "limit_min_z", text="Min")
- sub.prop(con, "limit_max_z", text="Max")
+ sub.prop(con, "limit_min_z", text=_("Min"))
+ sub.prop(con, "limit_max_z", text=_("Max"))
split = layout.split()
col = split.column(align=True)
- col.prop(con, "use_angular_limit_x", text="Angle X")
+ col.prop(con, "use_angular_limit_x", text=_("Angle X"))
sub = col.column()
sub.active = con.use_angular_limit_x
- sub.prop(con, "limit_angle_min_x", text="Min")
- sub.prop(con, "limit_angle_max_x", text="Max")
+ sub.prop(con, "limit_angle_min_x", text=_("Min"))
+ sub.prop(con, "limit_angle_max_x", text=_("Max"))
col = split.column(align=True)
- col.prop(con, "use_angular_limit_y", text="Angle Y")
+ col.prop(con, "use_angular_limit_y", text=_("Angle Y"))
sub = col.column()
sub.active = con.use_angular_limit_y
- sub.prop(con, "limit_angle_min_y", text="Min")
- sub.prop(con, "limit_angle_max_y", text="Max")
+ sub.prop(con, "limit_angle_min_y", text=_("Min"))
+ sub.prop(con, "limit_angle_max_y", text=_("Max"))
col = split.column(align=True)
- col.prop(con, "use_angular_limit_z", text="Angle Z")
+ col.prop(con, "use_angular_limit_z", text=_("Angle Z"))
sub = col.column()
sub.active = con.use_angular_limit_z
- sub.prop(con, "limit_angle_min_z", text="Min")
- sub.prop(con, "limit_angle_max_z", text="Max")
+ sub.prop(con, "limit_angle_min_z", text=_("Min"))
+ sub.prop(con, "limit_angle_max_z", text=_("Max"))
elif con.pivot_type == 'HINGE':
- layout.label(text="Limits:")
+ layout.label(text=_("Limits:"))
split = layout.split()
row = split.row(align=True)
col = row.column()
- col.prop(con, "use_angular_limit_x", text="Angle X")
+ col.prop(con, "use_angular_limit_x", text=_("Angle X"))
col = row.column()
col.active = con.use_angular_limit_x
- col.prop(con, "limit_angle_min_x", text="Min")
+ col.prop(con, "limit_angle_min_x", text=_("Min"))
col = row.column()
col.active = con.use_angular_limit_x
- col.prop(con, "limit_angle_max_x", text="Max")
+ col.prop(con, "limit_angle_max_x", text=_("Max"))
def CLAMP_TO(self, context, layout, con):
self.target_template(layout, con)
row = layout.row()
- row.label(text="Main Axis:")
+ row.label(text=_("Main Axis:"))
row.prop(con, "main_axis", expand=True)
layout.prop(con, "use_cyclic")
@@ -630,32 +630,32 @@ class ConstraintButtonsPanel():
def TRANSFORM(self, context, layout, con):
self.target_template(layout, con)
- layout.prop(con, "use_motion_extrapolate", text="Extrapolate")
+ layout.prop(con, "use_motion_extrapolate", text=_("Extrapolate"))
col = layout.column()
- col.row().label(text="Source:")
+ col.row().label(text=_("Source:"))
col.row().prop(con, "map_from", expand=True)
split = layout.split()
sub = split.column(align=True)
sub.label(text="X:")
- sub.prop(con, "from_min_x", text="Min")
- sub.prop(con, "from_max_x", text="Max")
+ sub.prop(con, "from_min_x", text=_("Min"))
+ sub.prop(con, "from_max_x", text=_("Max"))
sub = split.column(align=True)
sub.label(text="Y:")
- sub.prop(con, "from_min_y", text="Min")
- sub.prop(con, "from_max_y", text="Max")
+ sub.prop(con, "from_min_y", text=_("Min"))
+ sub.prop(con, "from_max_y", text=_("Max"))
sub = split.column(align=True)
sub.label(text="Z:")
- sub.prop(con, "from_min_z", text="Min")
- sub.prop(con, "from_max_z", text="Max")
+ sub.prop(con, "from_min_z", text=_("Min"))
+ sub.prop(con, "from_max_z", text=_("Max"))
col = layout.column()
row = col.row()
- row.label(text="Source to Destination Mapping:")
+ row.label(text=_("Source to Destination Mapping:"))
# note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't
# open it. Thus we are using the hardcoded value instead.
@@ -674,7 +674,7 @@ class ConstraintButtonsPanel():
split = layout.split()
col = split.column()
- col.label(text="Destination:")
+ col.label(text=_("Destination:"))
col.row().prop(con, "map_to", expand=True)
split = layout.split()
@@ -683,22 +683,22 @@ class ConstraintButtonsPanel():
col.label(text="X:")
sub = col.column(align=True)
- sub.prop(con, "to_min_x", text="Min")
- sub.prop(con, "to_max_x", text="Max")
+ sub.prop(con, "to_min_x", text=_("Min"))
+ sub.prop(con, "to_max_x", text=_("Max"))
col = split.column()
col.label(text="Y:")
sub = col.column(align=True)
- sub.prop(con, "to_min_y", text="Min")
- sub.prop(con, "to_max_y", text="Max")
+ sub.prop(con, "to_min_y", text=_("Min"))
+ sub.prop(con, "to_max_y", text=_("Max"))
col = split.column()
col.label(text="Z:")
sub = col.column(align=True)
- sub.prop(con, "to_min_z", text="Min")
- sub.prop(con, "to_max_z", text="Max")
+ sub.prop(con, "to_min_z", text=_("Min"))
+ sub.prop(con, "to_max_z", text=_("Max"))
self.space_template(layout, con)
@@ -718,20 +718,20 @@ class ConstraintButtonsPanel():
self.target_template(layout, con)
row = layout.row()
- row.label(text="To:")
+ row.label(text=_("To:"))
row.prop(con, "track_axis", expand=True)
def SPLINE_IK(self, context, layout, con):
self.target_template(layout, con)
col = layout.column()
- col.label(text="Spline Fitting:")
+ col.label(text=_("Spline Fitting:"))
col.prop(con, "chain_count")
col.prop(con, "use_even_divisions")
col.prop(con, "use_chain_offset")
col = layout.column()
- col.label(text="Chain Scaling:")
+ col.label(text=_("Chain Scaling:"))
col.prop(con, "use_y_stretch")
col.prop(con, "xz_scale_mode")
col.prop(con, "use_curve_radius")
@@ -741,20 +741,20 @@ class ConstraintButtonsPanel():
if con.target:
col = layout.column()
- col.prop(con, "offset", text="Pivot Offset")
+ col.prop(con, "offset", text=_("Pivot Offset"))
else:
col = layout.column()
col.prop(con, "use_relative_location")
if con.use_relative_location:
- col.prop(con, "offset", text="Relative Pivot Point")
+ col.prop(con, "offset", text=_("Relative Pivot Point"))
else:
- col.prop(con, "offset", text="Absolute Pivot Point")
+ col.prop(con, "offset", text=_("Absolute Pivot Point"))
col = layout.column()
- col.prop(con, "rotation_range", text="Pivot When")
+ col.prop(con, "rotation_range", text=_("Pivot When"))
def SCRIPT(self, context, layout, con):
- layout.label("Blender 2.5 has no py-constraints")
+ layout.label( _("Blender 2.5 has no py-constraints") )
class OBJECT_PT_constraints(ConstraintButtonsPanel, Panel):
@@ -773,7 +773,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, Panel):
if ob.mode == 'POSE':
box = layout.box()
box.alert = True
- box.label(icon='INFO', text="See Bone Constraints tab to Add Constraints to active bone")
+ box.label(icon='INFO', text=_("See Bone Constraints tab to Add Constraints to active bone"))
else:
layout.operator_menu_enum("object.constraint_add", "type")
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py
index 6f58f060504..6424f6dca44 100644
--- a/release/scripts/startup/bl_ui/properties_particle.py
+++ b/release/scripts/startup/bl_ui/properties_particle.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
+from blf import gettext as _
from bl_ui.properties_physics_common import (
point_cache_ui,
@@ -108,17 +109,17 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
layout.template_ID(context.space_data, "pin_id")
if part.is_fluid:
- layout.label(text="Settings used for fluid.")
+ layout.label(text=_("Settings used for fluid"))
return
- layout.prop(part, "type", text="Type")
+ layout.prop(part, "type", text=_("Type"))
elif not psys.settings:
split = layout.split(percentage=0.32)
col = split.column()
- col.label(text="Name:")
- col.label(text="Settings:")
+ col.label(text=_("Name:"))
+ col.label(text=_("Settings:"))
col = split.column()
col.prop(psys, "name", text="")
@@ -128,10 +129,10 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
split = layout.split(percentage=0.32)
col = split.column()
- col.label(text="Name:")
+ col.label(text=_("Name:"))
if part.is_fluid == False:
- col.label(text="Settings:")
- col.label(text="Type:")
+ col.label(text=_("Settings:"))
+ col.label(text=_("Type:"))
col = split.column()
col.prop(psys, "name", text="")
@@ -141,11 +142,11 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
row.template_ID(psys, "settings", new="particle.new")
#row = layout.row()
- #row.label(text="Viewport")
- #row.label(text="Render")
+ #row.label(text=_("Viewport"))
+ #row.label(text=_("Render"))
if part.is_fluid:
- layout.label(text=str(part.count) + " fluid particles for this frame.")
+ layout.label(text=str(part.count) + " fluid particles for this frame")
return
row = col.row()
@@ -157,7 +158,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
split = layout.split(percentage=0.65)
if part.type == 'HAIR':
if psys is not None and psys.is_edited:
- split.operator("particle.edited_clear", text="Free Edit")
+ split.operator("particle.edited_clear", text=_("Free Edit"))
else:
row = split.row()
row.enabled = particle_panel_enabled(context, psys)
@@ -174,7 +175,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
elif psys is not None and part.type == 'REACTOR':
split.enabled = particle_panel_enabled(context, psys)
split.prop(psys, "reactor_target_object")
- split.prop(psys, "reactor_target_particle_system", text="Particle System")
+ split.prop(psys, "reactor_target_particle_system", text=_("Particle System"))
class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
@@ -221,7 +222,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
col.prop(part, "lifetime")
col.prop(part, "lifetime_random", slider=True)
- layout.label(text="Emit From:")
+ layout.label(text=_("Emit From:"))
layout.prop(part, "emit_from", expand=True)
row = layout.row()
@@ -239,11 +240,11 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
row = layout.row()
if part.distribution == 'JIT':
- row.prop(part, "userjit", text="Particles/Face")
- row.prop(part, "jitter_factor", text="Jittering Amount", slider=True)
+ row.prop(part, "userjit", text=_("Particles/Face"))
+ row.prop(part, "jitter_factor", text=_("Jittering Amount"), slider=True)
elif part.distribution == 'GRID':
row.prop(part, "grid_resolution")
- row.prop(part, "grid_random", text="Random", slider=True)
+ row.prop(part, "grid_random", text=_("Random"), slider=True)
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
@@ -284,22 +285,22 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Material:")
+ col.label(text=_("Material:"))
sub = col.column(align=True)
- sub.prop(cloth, "pin_stiffness", text="Stiffness")
+ sub.prop(cloth, "pin_stiffness", text=_("Stiffness"))
sub.prop(cloth, "mass")
- sub.prop(cloth, "bending_stiffness", text="Bending")
+ sub.prop(cloth, "bending_stiffness", text=_("Bending"))
sub.prop(cloth, "internal_friction", slider=True)
sub.prop(cloth, "collider_friction", slider=True)
col = split.column()
- col.label(text="Damping:")
+ col.label(text=_("Damping:"))
sub = col.column(align=True)
- sub.prop(cloth, "spring_damping", text="Spring")
- sub.prop(cloth, "air_damping", text="Air")
+ sub.prop(cloth, "spring_damping", text=_("Spring"))
+ sub.prop(cloth, "air_damping", text=_("Air"))
- col.label(text="Quality:")
- col.prop(cloth, "quality", text="Steps", slider=True)
+ col.label(text=_("Quality:"))
+ col.prop(cloth, "quality", text=_("Steps"), slider=True)
class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
@@ -355,17 +356,17 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Emitter Geometry:")
+ col.label(text=_("Emitter Geometry:"))
col.prop(part, "normal_factor")
sub = col.column(align=True)
sub.prop(part, "tangent_factor")
sub.prop(part, "tangent_phase", slider=True)
col = split.column()
- col.label(text="Emitter Object:")
+ col.label(text=_("Emitter Object:"))
col.prop(part, "object_align_factor", text="")
- layout.label(text="Other:")
+ layout.label(text=_("Other:"))
row = layout.row()
if part.emit_from == 'PARTICLE':
row.prop(part, "particle_factor")
@@ -406,21 +407,21 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
layout.enabled = particle_panel_enabled(context, psys)
row = layout.row()
- row.label(text="Initial Rotation:")
+ row.label(text=_("Initial Rotation:"))
row.prop(part, "use_dynamic_rotation")
split = layout.split()
col = split.column(align=True)
col.prop(part, "rotation_mode", text="")
- col.prop(part, "rotation_factor_random", slider=True, text="Random")
+ col.prop(part, "rotation_factor_random", slider=True, text=_("Random"))
col = split.column(align=True)
col.prop(part, "phase_factor", slider=True)
- col.prop(part, "phase_factor_random", text="Random", slider=True)
+ col.prop(part, "phase_factor_random", text=_("Random"), slider=True)
col = layout.column()
- col.label(text="Angular Velocity:")
+ col.label(text=_("Angular Velocity:"))
col.row().prop(part, "angular_velocity_mode", expand=True)
if part.angular_velocity_mode != 'NONE':
@@ -461,19 +462,19 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
if part.physics_type != 'NO':
col = row.column(align=True)
col.prop(part, "mass")
- col.prop(part, "use_multiply_size_mass", text="Multiply mass with size")
+ col.prop(part, "use_multiply_size_mass", text=_("Multiply mass with size"))
if part.physics_type in {'NEWTON', 'FLUID'}:
split = layout.split()
col = split.column()
- col.label(text="Forces:")
+ col.label(text=_("Forces:"))
col.prop(part, "brownian_factor")
col.prop(part, "drag_factor", slider=True)
col.prop(part, "damping", slider=True)
col = split.column()
- col.label(text="Integration:")
+ col.label(text=_("Integration:"))
col.prop(part, "integrator", text="")
col.prop(part, "timestep")
col.prop(part, "subframes")
@@ -488,13 +489,13 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Fluid properties:")
- col.prop(fluid, "stiffness", text="Stiffness")
- col.prop(fluid, "linear_viscosity", text="Viscosity")
- col.prop(fluid, "buoyancy", text="Buoancy", slider=True)
+ col.label(text=_("Fluid properties:"))
+ col.prop(fluid, "stiffness", text=_("Stiffness"))
+ col.prop(fluid, "linear_viscosity", text=_("Viscosity"))
+ col.prop(fluid, "buoyancy", text=_("Buoancy"), slider=True)
col = split.column()
- col.label(text="Advanced:")
+ col.label(text=_("Advanced:"))
sub = col.row()
sub.prop(fluid, "repulsion", slider=fluid.factor_repulsion)
@@ -515,8 +516,8 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Springs:")
- col.prop(fluid, "spring_force", text="Force")
+ col.label(text=_("Springs:"))
+ col.prop(fluid, "spring_force", text=_("Force"))
col.prop(fluid, "use_viscoelastic_springs")
sub = col.column(align=True)
sub.active = fluid.use_viscoelastic_springs
@@ -524,7 +525,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
sub.prop(fluid, "plasticity", slider=True)
col = split.column()
- col.label(text="Advanced:")
+ col.label(text=_("Advanced:"))
sub = col.row()
sub.prop(fluid, "rest_length", slider=fluid.factor_rest_length)
sub.prop(fluid, "factor_rest_length", text="")
@@ -532,7 +533,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
sub = col.column()
sub.active = fluid.use_viscoelastic_springs
sub.prop(fluid, "use_initial_rest_length")
- sub.prop(fluid, "spring_frames", text="Frames")
+ sub.prop(fluid, "spring_frames", text=_("Frames"))
elif part.physics_type == 'KEYED':
split = layout.split()
@@ -541,11 +542,11 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
row = layout.row()
col = row.column()
col.active = not psys.use_keyed_timing
- col.prop(part, "keyed_loops", text="Loops")
+ col.prop(part, "keyed_loops", text=_("Loops"))
if psys:
- row.prop(psys, "use_keyed_timing", text="Use Timing")
+ row.prop(psys, "use_keyed_timing", text=_("Use Timing"))
- layout.label(text="Keys:")
+ layout.label(text=_("Keys:"))
elif part.physics_type == 'BOIDS':
boids = part.boids
@@ -581,7 +582,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
row = layout.row()
col = row.column(align=True)
- col.label(text="Battle:")
+ col.label(text=_("Battle:"))
col.prop(boids, "health")
col.prop(boids, "strength")
col.prop(boids, "aggression")
@@ -589,16 +590,16 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
col.prop(boids, "range")
col = row.column()
- col.label(text="Misc:")
+ col.label(text=_("Misc:"))
col.prop(boids, "bank", slider=True)
col.prop(boids, "pitch", slider=True)
col.prop(boids, "height", slider=True)
if psys and part.physics_type in {'KEYED', 'BOIDS', 'FLUID'}:
if part.physics_type == 'BOIDS':
- layout.label(text="Relations:")
+ layout.label(text=_("Relations:"))
elif part.physics_type == 'FLUID':
- layout.label(text="Fluid interaction:")
+ layout.label(text=_("Fluid interaction:"))
row = layout.row()
row.template_list(psys, "targets", psys, "active_particle_target_index")
@@ -621,7 +622,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
#doesn't work yet
#col.alert = key.valid
col.prop(key, "object", text="")
- col.prop(key, "system", text="System")
+ col.prop(key, "system", text=_("System"))
col = row.column()
col.active = psys.use_keyed_timing
col.prop(key, "time")
@@ -631,7 +632,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
#doesn't work yet
#sub.alert = key.valid
sub.prop(key, "object", text="")
- sub.prop(key, "system", text="System")
+ sub.prop(key, "system", text=_("System"))
layout.prop(key, "alliance", expand=True)
elif part.physics_type == 'FLUID':
@@ -639,7 +640,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
#doesn't work yet
#sub.alert = key.valid
sub.prop(key, "object", text="")
- sub.prop(key, "system", text="System")
+ sub.prop(key, "system", text=_("System"))
class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
@@ -678,7 +679,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
state = boids.active_boid_state
- #layout.prop(state, "name", text="State name")
+ #layout.prop(state, "name", text=_("State name"))
row = layout.row()
row.prop(state, "ruleset_type")
@@ -721,7 +722,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
row.prop(rule, "use_predict")
row.prop(rule, "fear_factor")
elif rule.type == 'FOLLOW_PATH':
- row.label(text="Not yet functional.")
+ row.label(text=_("Not yet functional"))
elif rule.type == 'AVOID_COLLISION':
row.prop(rule, "use_avoid")
row.prop(rule, "use_avoid_collision")
@@ -800,14 +801,14 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
sub.active = (part.use_render_adaptive is True and part.use_strand_primitive is False)
sub.prop(part, "adaptive_pixel")
col.prop(part, "use_hair_bspline")
- col.prop(part, "render_step", text="Steps")
+ col.prop(part, "render_step", text=_("Steps"))
col = split.column()
- col.label(text="Timing:")
+ col.label(text=_("Timing:"))
col.prop(part, "use_absolute_path_time")
- col.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time)
- col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time)
- col.prop(part, "length_random", text="Random", slider=True)
+ col.prop(part, "path_start", text=_("Start"), slider=not part.use_absolute_path_time)
+ col.prop(part, "path_end", text=_("End"), slider=not part.use_absolute_path_time)
+ col.prop(part, "length_random", text=_("Random"), slider=True)
row = layout.row()
col = row.column()
@@ -864,30 +865,30 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
elif part.render_type == 'BILLBOARD':
ob = context.object
- col.label(text="Align:")
+ col.label(text=_("Align:"))
row = layout.row()
row.prop(part, "billboard_align", expand=True)
- row.prop(part, "lock_billboard", text="Lock")
+ row.prop(part, "lock_billboard", text=_("Lock"))
row = layout.row()
row.prop(part, "billboard_object")
row = layout.row()
col = row.column(align=True)
- col.label(text="Tilt:")
- col.prop(part, "billboard_tilt", text="Angle", slider=True)
- col.prop(part, "billboard_tilt_random", text="Random", slider=True)
+ col.label(text=_("Tilt:"))
+ col.prop(part, "billboard_tilt", text=_("Angle"), slider=True)
+ col.prop(part, "billboard_tilt_random", text=_("Random"), slider=True)
col = row.column()
col.prop(part, "billboard_offset")
row = layout.row()
col = row.column()
- col.prop(part, "billboard_size", text="Scale")
+ col.prop(part, "billboard_size", text=_("Scale"))
if part.billboard_align == 'VEL':
col = row.column(align=True)
- col.label("Velocity Scale:")
- col.prop(part, "billboard_velocity_head", text="Head")
- col.prop(part, "billboard_velocity_tail", text="Tail")
+ col.label(_("Velocity Scale:"))
+ col.prop(part, "billboard_velocity_head", text=_("Head"))
+ col.prop(part, "billboard_velocity_tail", text=_("Tail"))
if psys:
col = layout.column()
@@ -895,8 +896,8 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
col.prop_search(psys, "billboard_time_index_uv", ob.data, "uv_textures")
split = layout.split(percentage=0.33)
- split.label(text="Split uv's:")
- split.prop(part, "billboard_uv_split", text="Number of splits")
+ split.label(text=_("Split uv's:"))
+ split.prop(part, "billboard_uv_split", text=_("Number of splits"))
if psys:
col = layout.column()
@@ -904,9 +905,9 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
col.prop_search(psys, "billboard_split_uv", ob.data, "uv_textures")
row = col.row()
- row.label(text="Animate:")
+ row.label(text=_("Animate:"))
row.prop(part, "billboard_animation", text="")
- row.label(text="Offset:")
+ row.label(text=_("Offset:"))
row.prop(part, "billboard_offset_split", text="")
if part.render_type == 'HALO' or part.render_type == 'LINE' or part.render_type == 'BILLBOARD':
@@ -914,10 +915,10 @@ class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
col = row.column()
col.prop(part, "trail_count")
if part.trail_count > 1:
- col.prop(part, "use_absolute_path_time", text="Length in frames")
+ col.prop(part, "use_absolute_path_time", text=_("Length in frames"))
col = row.column()
- col.prop(part, "path_end", text="Length", slider=not part.use_absolute_path_time)
- col.prop(part, "length_random", text="Random", slider=True)
+ col.prop(part, "path_end", text=_("Length"), slider=not part.use_absolute_path_time)
+ col.prop(part, "length_random", text=_("Random"), slider=True)
else:
col = row.column()
col.label(text="")
@@ -965,11 +966,11 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
if part.draw_percentage != 100 and psys is not None:
if part.type == 'HAIR':
if psys.use_hair_dynamics and psys.point_cache.is_baked == False:
- layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
+ layout.row().label(text=_("Display percentage makes dynamics inaccurate without baking!"))
else:
phystype = part.physics_type
if phystype != 'NO' and phystype != 'KEYED' and psys.point_cache.is_baked == False:
- layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
+ layout.row().label(text=_("Display percentage makes dynamics inaccurate without baking!"))
row = layout.row()
col = row.column()
@@ -980,11 +981,11 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
col.prop(part, "show_health")
col = row.column(align=True)
- col.label(text="Color:")
+ col.label(text=_("Color:"))
col.prop(part, "draw_color", text="")
sub = col.row()
sub.active = part.draw_color in ('VELOCITY', 'ACCELERATION')
- sub.prop(part, "color_maximum", text="Max")
+ sub.prop(part, "color_maximum", text=_("Max"))
if (path):
col.prop(part, "draw_step")
@@ -1013,24 +1014,24 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
row = layout.row()
col = row.column(align=True)
- col.prop(part, "child_nbr", text="Display")
- col.prop(part, "rendered_child_count", text="Render")
+ col.prop(part, "child_nbr", text=_("Display"))
+ col.prop(part, "rendered_child_count", text=_("Render"))
if part.child_type == 'INTERPOLATED':
col = row.column()
if psys:
- col.prop(psys, "child_seed", text="Seed")
+ col.prop(psys, "child_seed", text=_("Seed"))
col.prop(part, "virtual_parents", slider=True)
col.prop(part, "create_long_hair_children")
else:
col = row.column(align=True)
- col.prop(part, "child_size", text="Size")
- col.prop(part, "child_size_random", text="Random")
+ col.prop(part, "child_size", text=_("Size"))
+ col.prop(part, "child_size_random", text=_("Random"))
split = layout.split()
col = split.column()
- col.label(text="Effects:")
+ col.label(text=_("Effects:"))
sub = col.column(align=True)
sub.prop(part, "clump_factor", slider=True)
@@ -1042,38 +1043,38 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
if part.child_type == 'SIMPLE':
sub = col.column(align=True)
- sub.prop(part, "child_radius", text="Radius")
- sub.prop(part, "child_roundness", text="Roundness", slider=True)
+ sub.prop(part, "child_radius", text=_("Radius"))
+ sub.prop(part, "child_roundness", text=_("Roundness"), slider=True)
if psys:
- sub.prop(psys, "child_seed", text="Seed")
+ sub.prop(psys, "child_seed", text=_("Seed"))
elif part.virtual_parents > 0.0:
sub = col.column(align=True)
- sub.label(text="Parting not")
- sub.label(text="available with")
- sub.label(text="virtual parents.")
+ sub.label(text=_("Parting not"))
+ sub.label(text=_("available with"))
+ sub.label(text=_("virtual parents"))
else:
sub = col.column(align=True)
- sub.prop(part, "child_parting_factor", text="Parting", slider=True)
- sub.prop(part, "child_parting_min", text="Min")
- sub.prop(part, "child_parting_max", text="Max")
+ sub.prop(part, "child_parting_factor", text=_("Parting"), slider=True)
+ sub.prop(part, "child_parting_min", text=_("Min"))
+ sub.prop(part, "child_parting_max", text=_("Max"))
col = split.column()
- col.label(text="Roughness:")
+ col.label(text=_("Roughness:"))
sub = col.column(align=True)
- sub.prop(part, "roughness_1", text="Uniform")
- sub.prop(part, "roughness_1_size", text="Size")
+ sub.prop(part, "roughness_1", text=_("Uniform"))
+ sub.prop(part, "roughness_1_size", text=_("Size"))
sub = col.column(align=True)
sub.prop(part, "roughness_endpoint", "Endpoint")
sub.prop(part, "roughness_end_shape")
sub = col.column(align=True)
- sub.prop(part, "roughness_2", text="Random")
- sub.prop(part, "roughness_2_size", text="Size")
+ sub.prop(part, "roughness_2", text=_("Random"))
+ sub.prop(part, "roughness_2_size", text=_("Size"))
sub.prop(part, "roughness_2_threshold", slider=True)
- layout.row().label(text="Kink:")
+ layout.row().label(text=_("Kink:"))
layout.row().prop(part, "kink", expand=True)
split = layout.split()
@@ -1082,7 +1083,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
col = split.column()
sub = col.column(align=True)
sub.prop(part, "kink_amplitude")
- sub.prop(part, "kink_amplitude_clump", text="Clump", slider=True)
+ sub.prop(part, "kink_amplitude_clump", text=_("Clump"), slider=True)
col.prop(part, "kink_flat", slider=True)
col = split.column()
sub = col.column(align=True)
@@ -1123,25 +1124,25 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel):
row = layout.row()
row.prop(part, "use_self_effect")
- row.prop(part, "effector_amount", text="Amount")
+ row.prop(part, "effector_amount", text=_("Amount"))
split = layout.split(percentage=0.2)
- split.label(text="Type 1:")
+ split.label(text=_("Type 1:"))
split.prop(part.force_field_1, "type", text="")
basic_force_field_settings_ui(self, context, part.force_field_1)
if part.force_field_1.type != 'NONE':
- layout.label(text="Falloff:")
+ layout.label(text=_("Falloff:"))
basic_force_field_falloff_ui(self, context, part.force_field_1)
if part.force_field_1.type != 'NONE':
layout.label(text="")
split = layout.split(percentage=0.2)
- split.label(text="Type 2:")
+ split.label(text=_("Type 2:"))
split.prop(part.force_field_2, "type", text="")
basic_force_field_settings_ui(self, context, part.force_field_2)
if part.force_field_2.type != 'NONE':
- layout.label(text="Falloff:")
+ layout.label(text=_("Falloff:"))
basic_force_field_falloff_ui(self, context, part.force_field_2)
@@ -1163,56 +1164,56 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
psys = context.particle_system
row = layout.row()
- row.label(text="Vertex Group")
- row.label(text="Negate")
+ row.label(text=_("Vertex Group"))
+ row.label(text=_("Negate"))
row = layout.row()
- row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
+ row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text=_("Density"))
row.prop(psys, "invert_vertex_group_density", text="")
# Commented out vertex groups don't work and are still waiting for better implementation
# row = layout.row()
- # row.prop_search(psys, "vertex_group_velocity", ob, "vertex_groups", text="Velocity")
+ # row.prop_search(psys, "vertex_group_velocity", ob, "vertex_groups", text=_("Velocity"))
# row.prop(psys, "invert_vertex_group_velocity", text="")
row = layout.row()
- row.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text="Length")
+ row.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text=_("Length"))
row.prop(psys, "invert_vertex_group_length", text="")
row = layout.row()
- row.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text="Clump")
+ row.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text=_("Clump"))
row.prop(psys, "invert_vertex_group_clump", text="")
row = layout.row()
- row.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text="Kink")
+ row.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text=_("Kink"))
row.prop(psys, "invert_vertex_group_kink", text="")
row = layout.row()
- row.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text="Roughness 1")
+ row.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text=_("Roughness 1"))
row.prop(psys, "invert_vertex_group_roughness_1", text="")
row = layout.row()
- row.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text="Roughness 2")
+ row.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text=_("Roughness 2"))
row.prop(psys, "invert_vertex_group_roughness_2", text="")
row = layout.row()
- row.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End")
+ row.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text=_("Roughness End"))
row.prop(psys, "invert_vertex_group_roughness_end", text="")
# row = layout.row()
- # row.prop_search(psys, "vertex_group_size", ob, "vertex_groups", text="Size")
+ # row.prop_search(psys, "vertex_group_size", ob, "vertex_groups", text=_("Size"))
# row.prop(psys, "invert_vertex_group_size", text="")
# row = layout.row()
- # row.prop_search(psys, "vertex_group_tangent", ob, "vertex_groups", text="Tangent")
+ # row.prop_search(psys, "vertex_group_tangent", ob, "vertex_groups", text=_("Tangent"))
# row.prop(psys, "invert_vertex_group_tangent", text="")
# row = layout.row()
- # row.prop_search(psys, "vertex_group_rotation", ob, "vertex_groups", text="Rotation")
+ # row.prop_search(psys, "vertex_group_rotation", ob, "vertex_groups", text=_("Rotation"))
# row.prop(psys, "invert_vertex_group_rotation", text="")
# row = layout.row()
- # row.prop_search(psys, "vertex_group_field", ob, "vertex_groups", text="Field")
+ # row.prop_search(psys, "vertex_group_field", ob, "vertex_groups", text=_("Field"))
# row.prop(psys, "invert_vertex_group_field", text="")
diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py
index d5427d8bae8..de74d1473c8 100644
--- a/release/scripts/startup/bl_ui/properties_physics_cloth.py
+++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel
-
+from blf import gettext as _
from bl_ui.properties_physics_common import (
point_cache_ui,
@@ -71,50 +71,50 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
col = split.column()
- col.label(text="Presets:")
+ col.label(text=_("Presets:"))
sub = col.row(align=True)
sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
sub.operator("cloth.preset_add", text="", icon="ZOOMIN")
sub.operator("cloth.preset_add", text="", icon="ZOOMOUT").remove_active = True
- col.label(text="Quality:")
- col.prop(cloth, "quality", text="Steps", slider=True)
+ col.label(text=_("Quality:"))
+ col.prop(cloth, "quality", text=_("Steps"), slider=True)
- col.label(text="Material:")
+ col.label(text=_("Material:"))
col.prop(cloth, "mass")
- col.prop(cloth, "structural_stiffness", text="Structural")
- col.prop(cloth, "bending_stiffness", text="Bending")
+ col.prop(cloth, "structural_stiffness", text=_("Structural"))
+ col.prop(cloth, "bending_stiffness", text=_("Bending"))
col = split.column()
- col.label(text="Damping:")
- col.prop(cloth, "spring_damping", text="Spring")
- col.prop(cloth, "air_damping", text="Air")
+ col.label(text=_("Damping:"))
+ col.prop(cloth, "spring_damping", text=_("Spring"))
+ col.prop(cloth, "air_damping", text=_("Air"))
- col.prop(cloth, "use_pin_cloth", text="Pinning")
+ col.prop(cloth, "use_pin_cloth", text=_("Pinning"))
sub = col.column()
sub.active = cloth.use_pin_cloth
sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="")
- sub.prop(cloth, "pin_stiffness", text="Stiffness")
+ sub.prop(cloth, "pin_stiffness", text=_("Stiffness"))
- col.label(text="Pre roll:")
- col.prop(cloth, "pre_roll", text="Frame")
+ col.label(text=_("Pre roll:"))
+ col.prop(cloth, "pre_roll", text=_("Frame"))
# Disabled for now
"""
if cloth.vertex_group_mass:
- layout.label(text="Goal:")
+ layout.label(text=_("Goal:"))
col = layout.column_flow()
- col.prop(cloth, "goal_default", text="Default")
- col.prop(cloth, "goal_spring", text="Stiffness")
- col.prop(cloth, "goal_friction", text="Friction")
+ col.prop(cloth, "goal_default", text=_("Default"))
+ col.prop(cloth, "goal_spring", text=_("Stiffness"))
+ col.prop(cloth, "goal_friction", text=_("Friction"))
"""
key = ob.data.shape_keys
if key:
- col.label(text="Rest Shape Key:")
+ col.label(text=_("Rest Shape Key:"))
col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
@@ -156,18 +156,18 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(cloth, "collision_quality", slider=True, text="Quality")
- col.prop(cloth, "distance_min", slider=True, text="Distance")
- col.prop(cloth, "repel_force", slider=True, text="Repel")
- col.prop(cloth, "distance_repel", slider=True, text="Repel Distance")
+ col.prop(cloth, "collision_quality", slider=True, text=_("Quality"))
+ col.prop(cloth, "distance_min", slider=True, text=_("Distance"))
+ col.prop(cloth, "repel_force", slider=True, text=_("Repel"))
+ col.prop(cloth, "distance_repel", slider=True, text=_("Repel Distance"))
col.prop(cloth, "friction")
col = split.column()
- col.prop(cloth, "use_self_collision", text="Self Collision")
+ col.prop(cloth, "use_self_collision", text=_("Self Collision"))
sub = col.column()
sub.active = cloth.use_self_collision
- sub.prop(cloth, "self_collision_quality", slider=True, text="Quality")
- sub.prop(cloth, "self_distance_min", slider=True, text="Distance")
+ sub.prop(cloth, "self_collision_quality", slider=True, text=_("Quality"))
+ sub.prop(cloth, "self_distance_min", slider=True, text=_("Distance"))
layout.prop(cloth, "group")
@@ -198,14 +198,14 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Structural Stiffness:")
+ col.label(text=_("Structural Stiffness:"))
col.prop_search(cloth, "vertex_group_structural_stiffness", ob, "vertex_groups", text="")
- col.prop(cloth, "structural_stiffness_max", text="Max")
+ col.prop(cloth, "structural_stiffness_max", text=_("Max"))
col = split.column()
- col.label(text="Bending Stiffness:")
+ col.label(text=_("Bending Stiffness:"))
col.prop_search(cloth, "vertex_group_bending", ob, "vertex_groups", text="")
- col.prop(cloth, "bending_stiffness_max", text="Max")
+ col.prop(cloth, "bending_stiffness_max", text=_("Max"))
class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py
index 59033813eb1..fb8c9989262 100644
--- a/release/scripts/startup/bl_ui/properties_physics_common.py
+++ b/release/scripts/startup/bl_ui/properties_physics_common.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -53,28 +53,28 @@ class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
ob = context.object
layout = self.layout
- layout.label("Enable physics for:")
+ layout.label(_("Enable physics for:"))
split = layout.split()
col = split.column()
if(context.object.field.type == 'NONE'):
- col.operator("object.forcefield_toggle", text="Force Field", icon='FORCE_FORCE')
+ col.operator("object.forcefield_toggle", text=_("Force Field"), icon='FORCE_FORCE')
else:
- col.operator("object.forcefield_toggle", text="Force Field", icon='X')
+ col.operator("object.forcefield_toggle", text=_("Force Field"), icon='X')
if(ob.type == 'MESH'):
- physics_add(self, col, context.collision, "Collision", 'COLLISION', 'MOD_PHYSICS', False)
- physics_add(self, col, context.cloth, "Cloth", 'CLOTH', 'MOD_CLOTH', True)
+ physics_add(self, col, context.collision, _("Collision"), 'COLLISION', 'MOD_PHYSICS', False)
+ physics_add(self, col, context.cloth, _("Cloth"), 'CLOTH', 'MOD_CLOTH', True)
physics_add(self, col, context.dynamic_paint, "Dynamic Paint", 'DYNAMIC_PAINT', 'MOD_DYNAMICPAINT', True)
col = split.column()
if(ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE'):
- physics_add(self, col, context.soft_body, "Soft Body", 'SOFT_BODY', 'MOD_SOFT', True)
+ physics_add(self, col, context.soft_body, _("Soft Body"), 'SOFT_BODY', 'MOD_SOFT', True)
if(ob.type == 'MESH'):
- physics_add(self, col, context.fluid, "Fluid", 'FLUID_SIMULATION', 'MOD_FLUIDSIM', True)
- physics_add(self, col, context.smoke, "Smoke", 'SMOKE', 'MOD_SMOKE', True)
+ physics_add(self, col, context.fluid, _("Fluid"), 'FLUID_SIMULATION', 'MOD_FLUIDSIM', True)
+ physics_add(self, col, context.smoke, _("Smoke"), 'SMOKE', 'MOD_SMOKE', True)
#cachetype can be 'PSYS' 'HAIR' 'SMOKE' etc
@@ -96,11 +96,11 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
if cache.use_external:
split = layout.split(percentage=0.80)
- split.prop(cache, "name", text="File Name")
+ split.prop(cache, "name", text=_("File Name"))
split.prop(cache, "index", text="")
row = layout.row()
- row.label(text="File Path:")
+ row.label(text=_("File Path:"))
row.prop(cache, "use_library_path", "Use Lib Path")
layout.prop(cache, "filepath", text="")
@@ -109,13 +109,13 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
else:
if cachetype in {'SMOKE', 'DYNAMIC_PAINT'}:
if not bpy.data.is_saved:
- layout.label(text="Cache is disabled until the file is saved")
+ layout.label(text=_("Cache is disabled until the file is saved"))
layout.enabled = False
if cache.use_disk_cache:
- layout.prop(cache, "name", text="File Name")
+ layout.prop(cache, "name", text=_("File Name"))
else:
- layout.prop(cache, "name", text="Cache Name")
+ layout.prop(cache, "name", text=_("Cache Name"))
row = layout.row(align=True)
@@ -143,7 +143,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
row = layout.row()
row.enabled = enabled and bpy.data.is_saved
row.active = cache.use_disk_cache
- row.label(text="Compression:")
+ row.label(text=_("Compression:"))
row.prop(cache, "compression", expand=True)
layout.separator()
@@ -153,22 +153,22 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
col = split.column()
if cache.is_baked == True:
- col.operator("ptcache.free_bake", text="Free Bake")
+ col.operator("ptcache.free_bake", text=_("Free Bake"))
else:
- col.operator("ptcache.bake", text="Bake").bake = True
+ col.operator("ptcache.bake", text=_("Bake")).bake = True
sub = col.row()
sub.enabled = (cache.frames_skipped or cache.is_outdated) and enabled
- sub.operator("ptcache.bake", text="Calculate To Frame").bake = False
+ sub.operator("ptcache.bake", text=_("Calculate To Frame")).bake = False
sub = col.column()
sub.enabled = enabled
- sub.operator("ptcache.bake_from_cache", text="Current Cache to Bake")
+ sub.operator("ptcache.bake_from_cache", text=_("Current Cache to Bake"))
col = split.column()
- col.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True
- col.operator("ptcache.free_bake_all", text="Free All Bakes")
- col.operator("ptcache.bake_all", text="Update All To Frame").bake = False
+ col.operator("ptcache.bake_all", text=_("Bake All Dynamics")).bake = True
+ col.operator("ptcache.free_bake_all", text=_("Free All Bakes"))
+ col.operator("ptcache.bake_all", text=_("Update All To Frame")).bake = False
def effector_weights_ui(self, context, weights):
@@ -216,7 +216,7 @@ def basic_force_field_settings_ui(self, context, field):
col = split.column()
if field.type == 'DRAG':
- col.prop(field, "linear_drag", text="Linear")
+ col.prop(field, "linear_drag", text=_("Linear"))
else:
col.prop(field, "strength")
@@ -224,12 +224,12 @@ def basic_force_field_settings_ui(self, context, field):
col.prop(field, "size")
col.prop(field, "flow")
elif field.type == 'HARMONIC':
- col.prop(field, "harmonic_damping", text="Damping")
+ col.prop(field, "harmonic_damping", text=_("Damping"))
col.prop(field, "rest_length")
elif field.type == 'VORTEX' and field.shape != 'POINT':
col.prop(field, "inflow")
elif field.type == 'DRAG':
- col.prop(field, "quadratic_drag", text="Quadratic")
+ col.prop(field, "quadratic_drag", text=_("Quadratic"))
else:
col.prop(field, "flow")
@@ -238,19 +238,19 @@ def basic_force_field_settings_ui(self, context, field):
sub.prop(field, "noise")
sub.prop(field, "seed")
if field.type == 'TURBULENCE':
- col.prop(field, "use_global_coords", text="Global")
+ col.prop(field, "use_global_coords", text=_("Global"))
elif field.type == 'HARMONIC':
col.prop(field, "use_multiple_springs")
split = layout.split()
col = split.column()
- col.label(text="Effect point:")
+ col.label(text=_("Effect point:"))
col.prop(field, "apply_to_location")
col.prop(field, "apply_to_rotation")
col = split.column()
- col.label(text="Collision:")
+ col.label(text=_("Collision:"))
col.prop(field, "use_absorption")
@@ -266,7 +266,7 @@ def basic_force_field_falloff_ui(self, context, field):
col.prop(field, "z_direction", text="")
col = split.column()
- col.prop(field, "falloff_power", text="Power")
+ col.prop(field, "falloff_power", text=_("Power"))
split = layout.split()
col = split.column()
@@ -274,14 +274,14 @@ def basic_force_field_falloff_ui(self, context, field):
row.prop(field, "use_min_distance", text="")
sub = row.row()
sub.active = field.use_min_distance
- sub.prop(field, "distance_min", text="Minimum")
+ sub.prop(field, "distance_min", text=_("Minimum"))
col = split.column()
row = col.row(align=True)
row.prop(field, "use_max_distance", text="")
sub = row.row()
sub.active = field.use_max_distance
- sub.prop(field, "distance_max", text="Maximum")
+ sub.prop(field, "distance_max", text=_("Maximum"))
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py
index e1dc4d04378..937df5c0ad9 100644
--- a/release/scripts/startup/bl_ui/properties_physics_field.py
+++ b/release/scripts/startup/bl_ui/properties_physics_field.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
from bl_ui.properties_physics_common import (
basic_force_field_settings_ui,
@@ -54,13 +54,13 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
field = ob.field
split = layout.split(percentage=0.2)
- split.label(text="Type:")
+ split.label(text=_("Type:"))
split.prop(field, "type", text="")
if field.type not in {'NONE', 'GUIDE', 'TEXTURE'}:
split = layout.split(percentage=0.2)
- split.label(text="Shape:")
+ split.label(text=_("Shape:"))
split.prop(field, "shape", text="")
split = layout.split()
@@ -76,7 +76,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
col.prop(field, "use_guide_path_weight")
col = split.column()
- col.label(text="Clumping:")
+ col.label(text=_("Clumping:"))
col.prop(field, "guide_clump_amount")
col.prop(field, "guide_clump_shape")
@@ -117,7 +117,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
if field.type not in {'NONE', 'GUIDE'}:
- layout.label(text="Falloff:")
+ layout.label(text=_("Falloff:"))
layout.prop(field, "falloff_type", expand=True)
basic_force_field_falloff_ui(self, context, field)
@@ -128,20 +128,20 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
split = layout.split(percentage=0.35)
col = split.column()
- col.label(text="Angular:")
- col.prop(field, "use_radial_min", text="Use Minimum")
- col.prop(field, "use_radial_max", text="Use Maximum")
+ col.label(text=_("Angular:"))
+ col.prop(field, "use_radial_min", text=_("Use Minimum"))
+ col.prop(field, "use_radial_max", text=_("Use Maximum"))
col = split.column()
- col.prop(field, "radial_falloff", text="Power")
+ col.prop(field, "radial_falloff", text=_("Power"))
sub = col.column()
sub.active = field.use_radial_min
- sub.prop(field, "radial_min", text="Angle")
+ sub.prop(field, "radial_min", text=_("Angle"))
sub = col.column()
sub.active = field.use_radial_max
- sub.prop(field, "radial_max", text="Angle")
+ sub.prop(field, "radial_max", text=_("Angle"))
elif field.falloff_type == 'TUBE':
layout.separator()
@@ -149,20 +149,20 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
split = layout.split(percentage=0.35)
col = split.column()
- col.label(text="Radial:")
- col.prop(field, "use_radial_min", text="Use Minimum")
- col.prop(field, "use_radial_max", text="Use Maximum")
+ col.label(text=_("Radial:"))
+ col.prop(field, "use_radial_min", text=_("Use Minimum"))
+ col.prop(field, "use_radial_max", text=_("Use Maximum"))
col = split.column()
- col.prop(field, "radial_falloff", text="Power")
+ col.prop(field, "radial_falloff", text=_("Power"))
sub = col.column()
sub.active = field.use_radial_min
- sub.prop(field, "radial_min", text="Distance")
+ sub.prop(field, "radial_min", text=_("Distance"))
sub = col.column()
sub.active = field.use_radial_max
- sub.prop(field, "radial_max", text="Distance")
+ sub.prop(field, "radial_max", text=_("Distance"))
class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
@@ -192,31 +192,31 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Particle:")
+ col.label(text=_("Particle:"))
col.prop(settings, "permeability", slider=True)
col.prop(settings, "stickness")
col.prop(settings, "use_particle_kill")
- col.label(text="Particle Damping:")
+ col.label(text=_("Particle Damping:"))
sub = col.column(align=True)
- sub.prop(settings, "damping_factor", text="Factor", slider=True)
- sub.prop(settings, "damping_random", text="Random", slider=True)
+ sub.prop(settings, "damping_factor", text=_("Factor"), slider=True)
+ sub.prop(settings, "damping_random", text=_("Random"), slider=True)
- col.label(text="Particle Friction:")
+ col.label(text=_("Particle Friction:"))
sub = col.column(align=True)
- sub.prop(settings, "friction_factor", text="Factor", slider=True)
- sub.prop(settings, "friction_random", text="Random", slider=True)
+ sub.prop(settings, "friction_factor", text=_("Factor"), slider=True)
+ sub.prop(settings, "friction_random", text=_("Random"), slider=True)
col = split.column()
- col.label(text="Soft Body and Cloth:")
+ col.label(text=_("Soft Body and Cloth:"))
sub = col.column(align=True)
- sub.prop(settings, "thickness_outer", text="Outer", slider=True)
- sub.prop(settings, "thickness_inner", text="Inner", slider=True)
+ sub.prop(settings, "thickness_outer", text=_("Outer"), slider=True)
+ sub.prop(settings, "thickness_inner", text=_("Inner"), slider=True)
- col.label(text="Soft Body Damping:")
- col.prop(settings, "damping", text="Factor", slider=True)
+ col.label(text=_("Soft Body Damping:"))
+ col.prop(settings, "damping", text=_("Factor"), slider=True)
- col.label(text="Force Fields:")
- col.prop(settings, "absorption", text="Absorption")
+ col.label(text=_("Force Fields:"))
+ col.prop(settings, "absorption", text=_("Absorption"))
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py
index 46893af3582..c89d7ec9755 100644
--- a/release/scripts/startup/bl_ui/properties_physics_fluid.py
+++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -46,7 +46,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
row = layout.row()
if fluid is None:
- row.label("built without fluids")
+ row.label(_("Built without fluids"))
return
row.prop(fluid, "type")
@@ -58,28 +58,28 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
layout.active = fluid.use
if fluid.type == 'DOMAIN':
- layout.operator("fluid.bake", text="Bake (Req. Memory: %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
+ layout.operator("fluid.bake", text=_("Bake (Req. Memory:")+" %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
split = layout.split()
col = split.column()
- col.label(text="Resolution:")
- col.prop(fluid, "resolution", text="Final")
- col.label(text="Render Display:")
+ col.label(text=_("Resolution:"))
+ col.prop(fluid, "resolution", text=_("Final"))
+ col.label(text=_("Render Display:"))
col.prop(fluid, "render_display_mode", text="")
col = split.column()
col.label()
- col.prop(fluid, "preview_resolution", text="Preview")
- col.label(text="Viewport Display:")
+ col.prop(fluid, "preview_resolution", text=_("Preview"))
+ col.label(text=_("Viewport Display:"))
col.prop(fluid, "viewport_display_mode", text="")
split = layout.split()
col = split.column()
- col.label(text="Time:")
+ col.label(text=_("Time:"))
sub = col.column(align=True)
- sub.prop(fluid, "start_time", text="Start")
- sub.prop(fluid, "end_time", text="End")
+ sub.prop(fluid, "start_time", text=_("Start"))
+ sub.prop(fluid, "end_time", text=_("End"))
col = split.column()
col.label()
@@ -92,36 +92,36 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Volume Initialization:")
+ col.label(text=_("Volume Initialization:"))
col.prop(fluid, "volume_initialization", text="")
col.prop(fluid, "use_animated_mesh")
col = split.column()
- col.label(text="Initial Velocity:")
+ col.label(text=_("Initial Velocity:"))
col.prop(fluid, "initial_velocity", text="")
elif fluid.type == 'OBSTACLE':
split = layout.split()
col = split.column()
- col.label(text="Volume Initialization:")
+ col.label(text=_("Volume Initialization:"))
col.prop(fluid, "volume_initialization", text="")
col.prop(fluid, "use_animated_mesh")
col = split.column()
- col.label(text="Slip Type:")
+ col.label(text=_("Slip Type:"))
col.prop(fluid, "slip_type", text="")
if fluid.slip_type == 'PARTIALSLIP':
- col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
+ col.prop(fluid, "partial_slip_factor", slider=True, text=_("Amount"))
- col.label(text="Impact:")
- col.prop(fluid, "impact_factor", text="Factor")
+ col.label(text=_("Impact:"))
+ col.prop(fluid, "impact_factor", text=_("Factor"))
elif fluid.type == 'INFLOW':
split = layout.split()
col = split.column()
- col.label(text="Volume Initialization:")
+ col.label(text=_("Volume Initialization:"))
col.prop(fluid, "volume_initialization", text="")
col.prop(fluid, "use_animated_mesh")
row = col.row()
@@ -129,14 +129,14 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
row.prop(fluid, "use_local_coords")
col = split.column()
- col.label(text="Inflow Velocity:")
+ col.label(text=_("Inflow Velocity:"))
col.prop(fluid, "inflow_velocity", text="")
elif fluid.type == 'OUTFLOW':
split = layout.split()
col = split.column()
- col.label(text="Volume Initialization:")
+ col.label(text=_("Volume Initialization:"))
col.prop(fluid, "volume_initialization", text="")
col.prop(fluid, "use_animated_mesh")
@@ -146,12 +146,12 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Influence:")
- col.prop(fluid, "particle_influence", text="Size")
- col.prop(fluid, "alpha_influence", text="Alpha")
+ col.label(text=_("Influence:"))
+ col.prop(fluid, "particle_influence", text=_("Size"))
+ col.prop(fluid, "alpha_influence", text=_("Alpha"))
col = split.column()
- col.label(text="Type:")
+ col.label(text=_("Type:"))
col.prop(fluid, "use_drops")
col.prop(fluid, "use_floats")
col.prop(fluid, "show_tracer")
@@ -167,24 +167,24 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
col.prop(fluid, "use_reverse_frames")
col = split.column()
- col.label(text="Time:")
+ col.label(text=_("Time:"))
sub = col.column(align=True)
- sub.prop(fluid, "start_time", text="Start")
- sub.prop(fluid, "end_time", text="End")
+ sub.prop(fluid, "start_time", text=_("Start"))
+ sub.prop(fluid, "end_time", text=_("End"))
split = layout.split()
col = split.column()
- col.label(text="Attraction Force:")
+ col.label(text=_("Attraction Force:"))
sub = col.column(align=True)
- sub.prop(fluid, "attraction_strength", text="Strength")
- sub.prop(fluid, "attraction_radius", text="Radius")
+ sub.prop(fluid, "attraction_strength", text=_("Strength"))
+ sub.prop(fluid, "attraction_radius", text=_("Radius"))
col = split.column()
- col.label(text="Velocity Force:")
+ col.label(text=_("Velocity Force:"))
sub = col.column(align=True)
- sub.prop(fluid, "velocity_strength", text="Strength")
- sub.prop(fluid, "velocity_radius", text="Radius")
+ sub.prop(fluid, "velocity_strength", text=_("Strength"))
+ sub.prop(fluid, "velocity_radius", text=_("Radius"))
class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
@@ -206,33 +206,33 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
col = split.column()
if scene.use_gravity:
- col.label(text="Using Scene Gravity", icon="SCENE_DATA")
+ col.label(text=_("Using Scene Gravity"), icon="SCENE_DATA")
sub = col.column()
sub.enabled = False
sub.prop(fluid, "gravity", text="")
else:
- col.label(text="Gravity:")
+ col.label(text=_("Gravity:"))
col.prop(fluid, "gravity", text="")
if scene.unit_settings.system != 'NONE':
- col.label(text="Using Scene Size Units", icon="SCENE_DATA")
+ col.label(text=_("Using Scene Size Units"), icon="SCENE_DATA")
sub = col.column()
sub.enabled = False
- sub.prop(fluid, "simulation_scale", text="Metres")
+ sub.prop(fluid, "simulation_scale", text=_("Metres"))
else:
- col.label(text="Real World Size:")
- col.prop(fluid, "simulation_scale", text="Metres")
+ col.label(text=_("Real World Size:"))
+ col.prop(fluid, "simulation_scale", text=_("Metres"))
col = split.column()
- col.label(text="Viscosity Presets:")
+ col.label(text=_("Viscosity Presets:"))
sub = col.column(align=True)
sub.prop(fluid, "viscosity_preset", text="")
if fluid.viscosity_preset == 'MANUAL':
- sub.prop(fluid, "viscosity_base", text="Base")
- sub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
+ sub.prop(fluid, "viscosity_base", text=_("Base"))
+ sub.prop(fluid, "viscosity_exponent", text=_("Exponent"), slider=True)
- col.label(text="Optimization:")
+ col.label(text=_("Optimization:"))
col.prop(fluid, "grid_levels", slider=True)
col.prop(fluid, "compressibility", slider=True)
@@ -254,16 +254,16 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Slip Type:")
+ col.label(text=_("Slip Type:"))
col.prop(fluid, "slip_type", text="")
if fluid.slip_type == 'PARTIALSLIP':
- col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
+ col.prop(fluid, "partial_slip_factor", slider=True, text=_("Amount"))
col.prop(fluid, "surface_noobs")
col = split.column()
- col.label(text="Surface:")
- col.prop(fluid, "surface_smooth", text="Smoothing")
- col.prop(fluid, "surface_subdivisions", text="Subdivisions")
+ col.label(text=_("Surface:"))
+ col.prop(fluid, "surface_smooth", text=_("Smoothing"))
+ col.prop(fluid, "surface_subdivisions", text=_("Subdivisions"))
class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py
index 771a778380d..61c477b6d49 100644
--- a/release/scripts/startup/bl_ui/properties_physics_smoke.py
+++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
from bl_ui.properties_physics_common import (
point_cache_ui,
@@ -59,23 +59,23 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
split.enabled = not domain.point_cache.is_baked
col = split.column()
- col.label(text="Resolution:")
- col.prop(domain, "resolution_max", text="Divisions")
- col.label(text="Time:")
- col.prop(domain, "time_scale", text="Scale")
- col.label(text="Border Collisions:")
+ col.label(text=_("Resolution:"))
+ col.prop(domain, "resolution_max", text=_("Divisions"))
+ col.label(text=_("Time:"))
+ col.prop(domain, "time_scale", text=_("Scale"))
+ col.label(text=_("Border Collisions:"))
col.prop(domain, "collision_extents", text="")
col = split.column()
- col.label(text="Behavior:")
+ col.label(text=_("Behavior:"))
col.prop(domain, "alpha")
- col.prop(domain, "beta", text="Temp. Diff.")
+ col.prop(domain, "beta", text=_("Temp. Diff."))
col.prop(domain, "vorticity")
- col.prop(domain, "use_dissolve_smoke", text="Dissolve")
+ col.prop(domain, "use_dissolve_smoke", text=_("Dissolve"))
sub = col.column()
sub.active = domain.use_dissolve_smoke
- sub.prop(domain, "dissolve_speed", text="Time")
- sub.prop(domain, "use_dissolve_smoke_log", text="Slow")
+ sub.prop(domain, "dissolve_speed", text=_("Time"))
+ sub.prop(domain, "use_dissolve_smoke_log", text_("Slow"))
elif md.smoke_type == 'FLOW':
@@ -85,20 +85,20 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
col = split.column()
col.prop(flow, "use_outflow")
- col.label(text="Particle System:")
+ col.label(text=_("Particle System:"))
col.prop_search(flow, "particle_system", ob, "particle_systems", text="")
sub = col.column()
sub.active = not md.flow_settings.use_outflow
- sub.prop(flow, "initial_velocity", text="Initial Velocity")
+ sub.prop(flow, "initial_velocity", text=_("Initial Velocity"))
sub = sub.column()
sub.active = flow.initial_velocity
- sub.prop(flow, "velocity_factor", text="Multiplier")
+ sub.prop(flow, "velocity_factor", text=_("Multiplier"))
sub = split.column()
sub.active = not md.flow_settings.use_outflow
- sub.label(text="Initial Values:")
+ sub.label(text=_("Initial Values:"))
sub.prop(flow, "use_absolute")
sub.prop(flow, "density")
sub.prop(flow, "temperature")
@@ -121,14 +121,14 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Flow Group:")
+ col.label(text=_("Flow Group:"))
col.prop(group, "fluid_group", text="")
- #col.label(text="Effector Group:")
+ #col.label(text=_("Effector Group:"))
#col.prop(group, "effector_group", text="")
col = split.column()
- col.label(text="Collision Group:")
+ col.label(text=_("Collision Group:"))
col.prop(group, "collision_group", text="")
@@ -157,12 +157,12 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
split.enabled = not md.point_cache.is_baked
col = split.column()
- col.label(text="Resolution:")
- col.prop(md, "amplify", text="Divisions")
+ col.label(text=_("Resolution:"))
+ col.prop(md, "amplify", text=_("Divisions"))
col.prop(md, "smooth_emitter")
col = split.column()
- col.label(text="Noise Method:")
+ col.label(text=_("Noise Method:"))
col.row().prop(md, "noise_type", text="")
col.prop(md, "strength")
@@ -184,7 +184,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
md = context.smoke.domain_settings
cache = md.point_cache
- layout.label(text="Compression:")
+ layout.label(text=_("Compression:"))
layout.prop(md, "point_cache_compress_type", expand=True)
point_cache_ui(self, context, cache, (cache.is_baked is False), 'SMOKE')
diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py
index 0b55ccf9516..5449e54c6e6 100644
--- a/release/scripts/startup/bl_ui/properties_physics_softbody.py
+++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Panel
-
+from blf import gettext as _
from bl_ui.properties_physics_common import (
point_cache_ui,
@@ -62,13 +62,13 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
split.enabled = softbody_panel_enabled(md)
col = split.column()
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.prop(softbody, "friction")
col.prop(softbody, "mass")
- col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Mass:")
+ col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text=_("Mass:"))
col = split.column()
- col.label(text="Simulation:")
+ col.label(text=_("Simulation:"))
col.prop(softbody, "speed")
@@ -114,18 +114,18 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Goal Strengths:")
- col.prop(softbody, "goal_default", text="Default")
+ col.label(text=_("Goal Strengths:"))
+ col.prop(softbody, "goal_default", text=_("Default"))
sub = col.column(align=True)
- sub.prop(softbody, "goal_min", text="Minimum")
- sub.prop(softbody, "goal_max", text="Maximum")
+ sub.prop(softbody, "goal_min", text=_("Minimum"))
+ sub.prop(softbody, "goal_max", text=_("Maximum"))
col = split.column()
- col.label(text="Goal Settings:")
- col.prop(softbody, "goal_spring", text="Stiffness")
- col.prop(softbody, "goal_friction", text="Damping")
+ col.label(text=_("Goal Settings:"))
+ col.prop(softbody, "goal_spring", text=_("Stiffness"))
+ col.prop(softbody, "goal_friction", text=_("Damping"))
- layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text="Vertex Group")
+ layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text=_("Vertex Group"))
class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
@@ -154,14 +154,14 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Springs:")
+ col.label(text=_("Springs:"))
col.prop(softbody, "pull")
col.prop(softbody, "push")
col.prop(softbody, "damping")
col.prop(softbody, "plastic")
col.prop(softbody, "bend")
- col.prop(softbody, "spring_length", text="Length")
- col.prop_search(softbody, "vertex_group_spring", ob, "vertex_groups", text="Springs:")
+ col.prop(softbody, "spring_length", text=_("Length"))
+ col.prop_search(softbody, "vertex_group_spring", ob, "vertex_groups", text=_("Springs:"))
col = split.column()
col.prop(softbody, "use_stiff_quads")
@@ -169,16 +169,16 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
sub.active = softbody.use_stiff_quads
sub.prop(softbody, "shear")
- col.label(text="Aerodynamics:")
+ col.label(text=_("Aerodynamics:"))
col.row().prop(softbody, "aerodynamics_type", expand=True)
- col.prop(softbody, "aero", text="Factor")
+ col.prop(softbody, "aero", text=_("Factor"))
#sub = col.column()
#sub.enabled = softbody.aero > 0
- col.label(text="Collision:")
- col.prop(softbody, "use_edge_collision", text="Edge")
- col.prop(softbody, "use_face_collision", text="Face")
+ col.label(text=_("Collision:"))
+ col.prop(softbody, "use_edge_collision", text=_("Edge"))
+ col.prop(softbody, "use_face_collision", text=_("Face"))
class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
@@ -203,14 +203,14 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
layout.active = softbody.use_self_collision and softbody_panel_enabled(md)
- layout.label(text="Collision Ball Size Calculation:")
+ layout.label(text=_("Collision Ball Size Calculation:"))
layout.prop(softbody, "collision_type", expand=True)
col = layout.column(align=True)
- col.label(text="Ball:")
- col.prop(softbody, "ball_size", text="Size")
- col.prop(softbody, "ball_stiff", text="Stiffness")
- col.prop(softbody, "ball_damp", text="Dampening")
+ col.label(text=_("Ball:"))
+ col.prop(softbody, "ball_size", text=_("Size"))
+ col.prop(softbody, "ball_stiff", text=_("Stiffness"))
+ col.prop(softbody, "ball_damp", text=_("Dampening"))
class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
@@ -233,18 +233,18 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
split = layout.split()
col = split.column(align=True)
- col.label(text="Step Size:")
+ col.label(text=_("Step Size:"))
col.prop(softbody, "step_min")
col.prop(softbody, "step_max")
- col.prop(softbody, "use_auto_step", text="Auto-Step")
+ col.prop(softbody, "use_auto_step", text=_("Auto-Step"))
col = split.column()
col.prop(softbody, "error_threshold")
- col.label(text="Helpers:")
+ col.label(text=_("Helpers:"))
col.prop(softbody, "choke")
col.prop(softbody, "fuzzy")
- layout.label(text="Diagnostics:")
+ layout.label(text=_("Diagnostics:"))
layout.prop(softbody, "use_diagnose")
layout.prop(softbody, "use_estimate_matrix")
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 395cfc6934e..1e9c15eedae 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel
+from blf import gettext as _
class RENDER_MT_presets(Menu):
@@ -64,10 +65,10 @@ class RENDER_PT_render(RenderButtonsPanel, Panel):
rd = context.scene.render
row = layout.row()
- row.operator("render.render", text="Image", icon='RENDER_STILL')
- row.operator("render.render", text="Animation", icon='RENDER_ANIMATION').animation = True
+ row.operator("render.render", text=_("Image"), icon='RENDER_STILL')
+ row.operator("render.render", text=_("Animation"), icon='RENDER_ANIMATION').animation = True
- layout.prop(rd, "display_mode", text="Display")
+ layout.prop(rd, "display_mode", text=_("Display"))
class RENDER_PT_layers(RenderButtonsPanel, Panel):
@@ -97,25 +98,25 @@ class RENDER_PT_layers(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(scene, "layers", text="Scene")
+ col.prop(scene, "layers", text=_("Scene"))
col.label(text="")
- col.prop(rl, "light_override", text="Light")
- col.prop(rl, "material_override", text="Material")
+ col.prop(rl, "light_override", text=_("Light"))
+ col.prop(rl, "material_override", text=_("Material"))
col = split.column()
- col.prop(rl, "layers", text="Layer")
- col.label(text="Mask Layers:")
+ col.prop(rl, "layers", text=_("Layer"))
+ col.label(text=_("Mask Layers:"))
col.prop(rl, "layers_zmask", text="")
layout.separator()
- layout.label(text="Include:")
+ layout.label(text=_("Include:"))
split = layout.split()
col = split.column()
col.prop(rl, "use_zmask")
row = col.row()
- row.prop(rl, "invert_zmask", text="Negate")
+ row.prop(rl, "invert_zmask", text=_("Negate"))
row.active = rl.use_zmask
col.prop(rl, "use_all_z")
@@ -134,7 +135,7 @@ class RENDER_PT_layers(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Passes:")
+ col.label(text=_("Passes:"))
col.prop(rl, "use_pass_combined")
col.prop(rl, "use_pass_z")
col.prop(rl, "use_pass_vector")
@@ -193,29 +194,29 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
col = split.column()
sub = col.column(align=True)
- sub.label(text="Resolution:")
+ sub.label(text=_("Resolution:"))
sub.prop(rd, "resolution_x", text="X")
sub.prop(rd, "resolution_y", text="Y")
sub.prop(rd, "resolution_percentage", text="")
- sub.label(text="Aspect Ratio:")
+ sub.label(text=_("Aspect Ratio:"))
sub.prop(rd, "pixel_aspect_x", text="X")
sub.prop(rd, "pixel_aspect_y", text="Y")
row = col.row()
- row.prop(rd, "use_border", text="Border")
+ row.prop(rd, "use_border", text=_("Border"))
sub = row.row()
sub.active = rd.use_border
- sub.prop(rd, "use_crop_to_border", text="Crop")
+ sub.prop(rd, "use_crop_to_border", text=_("Crop"))
col = split.column()
sub = col.column(align=True)
- sub.label(text="Frame Range:")
- sub.prop(scene, "frame_start", text="Start")
- sub.prop(scene, "frame_end", text="End")
- sub.prop(scene, "frame_step", text="Step")
+ sub.label(text=_("Frame Range:"))
+ sub.prop(scene, "frame_start")
+ sub.prop(scene, "frame_end")
+ sub.prop(scene, "frame_step")
- sub.label(text="Frame Rate:")
+ sub.label(text=_("Frame Rate:"))
if rd.fps_base == 1:
fps_rate = round(rd.fps / rd.fps_base)
else:
@@ -225,7 +226,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60})
if custom_framerate == True:
- fps_label_text = "Custom (" + str(fps_rate) + " fps)"
+ fps_label_text = _("Custom (") + str(fps_rate) + " fps)"
else:
fps_label_text = str(fps_rate) + " fps"
@@ -235,10 +236,10 @@ class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
sub.prop(rd, "fps")
sub.prop(rd, "fps_base", text="/")
subrow = sub.row(align=True)
- subrow.label(text="Time Remapping:")
+ subrow.label(text=_("Time Remapping:"))
subrow = sub.row(align=True)
- subrow.prop(rd, "frame_map_old", text="Old")
- subrow.prop(rd, "frame_map_new", text="New")
+ subrow.prop(rd, "frame_map_old", text=_("Old"))
+ subrow.prop(rd, "frame_map_new", text=_("New"))
class RENDER_PT_antialiasing(RenderButtonsPanel, Panel):
@@ -266,7 +267,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel, Panel):
col = split.column()
col.prop(rd, "pixel_filter_type", text="")
- col.prop(rd, "filter_size", text="Size")
+ col.prop(rd, "filter_size", text=_("Size"))
class RENDER_PT_motion_blur(RenderButtonsPanel, Panel):
@@ -308,15 +309,15 @@ class RENDER_PT_shading(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(rd, "use_textures", text="Textures")
- col.prop(rd, "use_shadows", text="Shadows")
- col.prop(rd, "use_sss", text="Subsurface Scattering")
- col.prop(rd, "use_envmaps", text="Environment Map")
+ col.prop(rd, "use_textures", text=_("Textures"))
+ col.prop(rd, "use_shadows", text=_("Shadows"))
+ col.prop(rd, "use_sss", text=_("Subsurface Scattering"))
+ col.prop(rd, "use_envmaps", text=_("Environment Map"))
col = split.column()
- col.prop(rd, "use_raytrace", text="Ray Tracing")
+ col.prop(rd, "use_raytrace", text=_("Ray Tracing"))
col.prop(rd, "use_color_management")
- col.prop(rd, "alpha_mode", text="Alpha")
+ col.prop(rd, "alpha_mode", text=_("Alpha"))
class RENDER_PT_performance(RenderButtonsPanel, Panel):
@@ -332,18 +333,18 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Threads:")
+ col.label(text=_("Threads:"))
col.row().prop(rd, "threads_mode", expand=True)
sub = col.column()
sub.enabled = rd.threads_mode == 'FIXED'
sub.prop(rd, "threads")
sub = col.column(align=True)
- sub.label(text="Tiles:")
+ sub.label(text=_("Tiles:"))
sub.prop(rd, "parts_x", text="X")
sub.prop(rd, "parts_y", text="Y")
col = split.column()
- col.label(text="Memory:")
+ col.label(text=_("Memory:"))
sub = col.column()
sub.enabled = not (rd.use_border or rd.use_full_sample)
sub.prop(rd, "use_save_buffers")
@@ -353,13 +354,13 @@ class RENDER_PT_performance(RenderButtonsPanel, Panel):
sub.prop(rd, "use_free_unused_nodes")
sub = col.column()
sub.active = rd.use_raytrace
- sub.label(text="Acceleration structure:")
+ sub.label(text=_("Acceleration structure:"))
sub.prop(rd, "raytrace_method", text="")
if rd.raytrace_method == 'OCTREE':
- sub.prop(rd, "octree_resolution", text="Resolution")
+ sub.prop(rd, "octree_resolution", text=_("Resolution"))
else:
- sub.prop(rd, "use_instances", text="Instances")
- sub.prop(rd, "use_local_coords", text="Local Coordinates")
+ sub.prop(rd, "use_instances", text=_("Instances"))
+ sub.prop(rd, "use_local_coords", text=_("Local Coordinates"))
class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
@@ -378,24 +379,24 @@ class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
col.prop(rd, "use_compositing")
col.prop(rd, "use_sequencer")
- split.prop(rd, "dither_intensity", text="Dither", slider=True)
+ split.prop(rd, "dither_intensity", text=_("Dither"), slider=True)
layout.separator()
split = layout.split()
col = split.column()
- col.prop(rd, "use_fields", text="Fields")
+ col.prop(rd, "use_fields", text=_("Fields"))
sub = col.column()
sub.active = rd.use_fields
sub.row().prop(rd, "field_order", expand=True)
- sub.prop(rd, "use_fields_still", text="Still")
+ sub.prop(rd, "use_fields_still", text=_("Still"))
col = split.column()
col.prop(rd, "use_edge_enhance")
sub = col.column()
sub.active = rd.use_edge_enhance
- sub.prop(rd, "edge_threshold", text="Threshold", slider=True)
+ sub.prop(rd, "edge_threshold", text=_("Threshold"), slider=True)
sub.prop(rd, "edge_color", text="")
@@ -419,26 +420,26 @@ class RENDER_PT_stamp(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(rd, "use_stamp_time", text="Time")
- col.prop(rd, "use_stamp_date", text="Date")
- col.prop(rd, "use_stamp_render_time", text="RenderTime")
- col.prop(rd, "use_stamp_frame", text="Frame")
- col.prop(rd, "use_stamp_scene", text="Scene")
- col.prop(rd, "use_stamp_camera", text="Camera")
- col.prop(rd, "use_stamp_lens", text="Lens")
- col.prop(rd, "use_stamp_filename", text="Filename")
- col.prop(rd, "use_stamp_marker", text="Marker")
- col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip")
+ col.prop(rd, "use_stamp_time", text=_("Time"))
+ col.prop(rd, "use_stamp_date", text=_("Date"))
+ col.prop(rd, "use_stamp_render_time", text=_("RenderTime"))
+ col.prop(rd, "use_stamp_frame", text=_("Frame"))
+ col.prop(rd, "use_stamp_scene", text=_("Scene"))
+ col.prop(rd, "use_stamp_camera", text=_("Camera"))
+ col.prop(rd, "use_stamp_lens", text=_("Lens"))
+ col.prop(rd, "use_stamp_filename", text=_("Filename"))
+ col.prop(rd, "use_stamp_marker", text=_("Marker"))
+ col.prop(rd, "use_stamp_sequencer_strip", text=_("Seq. Strip"))
col = split.column()
col.active = rd.use_stamp
col.prop(rd, "stamp_foreground", slider=True)
col.prop(rd, "stamp_background", slider=True)
col.separator()
- col.prop(rd, "stamp_font_size", text="Font Size")
+ col.prop(rd, "stamp_font_size", text=_("Font Size"))
row = layout.split(percentage=0.2)
- row.prop(rd, "use_stamp_note", text="Note")
+ row.prop(rd, "use_stamp_note", text=_("Note"))
sub = row.row()
sub.active = rd.use_stamp_note
sub.prop(rd, "stamp_note_text", text="")
@@ -460,7 +461,7 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
col = split.column()
col.prop(rd, "file_format", text="")
- col.row().prop(rd, "color_mode", text="Color", expand=True)
+ col.row().prop(rd, "color_mode", text=_("Color"), expand=True)
col = split.column()
col.prop(rd, "use_file_extension")
@@ -471,11 +472,11 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
layout.prop(rd, "file_quality", slider=True)
if file_format == 'PNG':
- layout.prop(rd, "file_quality", slider=True, text="Compression")
+ layout.prop(rd, "file_quality", slider=True, text=_("Compression"))
if file_format in {'OPEN_EXR', 'MULTILAYER'}:
row = layout.row()
- row.prop(rd, "exr_codec", text="Codec")
+ row.prop(rd, "exr_codec", text=_("Codec"))
if file_format == 'OPEN_EXR':
row = layout.row()
@@ -486,7 +487,7 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
elif file_format == 'JPEG2000':
split = layout.split()
col = split.column()
- col.label(text="Depth:")
+ col.label(text=_("Depth:"))
col.row().prop(rd, "jpeg2k_depth", expand=True)
col = split.column()
@@ -499,13 +500,13 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
split.label("FIXME: hard coded Non-Linear, Gamma:1.0")
'''
col = split.column()
- col.prop(rd, "use_cineon_log", text="Convert to Log")
+ col.prop(rd, "use_cineon_log", text=_("Convert to Log"))
col = split.column(align=True)
col.active = rd.use_cineon_log
- col.prop(rd, "cineon_black", text="Black")
- col.prop(rd, "cineon_white", text="White")
- col.prop(rd, "cineon_gamma", text="Gamma")
+ col.prop(rd, "cineon_black", text=_("Black"))
+ col.prop(rd, "cineon_white", text=_("White"))
+ col.prop(rd, "cineon_gamma", text=_("Gamma"))
'''
elif file_format == 'TIFF':
@@ -517,11 +518,11 @@ class RENDER_PT_output(RenderButtonsPanel, Panel):
elif file_format == 'QUICKTIME_QTKIT':
split = layout.split()
col = split.column()
- col.prop(rd, "quicktime_codec_type", text="Video Codec")
- col.prop(rd, "quicktime_codec_spatial_quality", text="Quality")
+ col.prop(rd, "quicktime_codec_type", text=_("Video Codec"))
+ col.prop(rd, "quicktime_codec_spatial_quality", text=_("Quality"))
# Audio
- col.prop(rd, "quicktime_audiocodec_type", text="Audio Codec")
+ col.prop(rd, "quicktime_audiocodec_type", text=_("Audio Codec"))
if rd.quicktime_audiocodec_type != 'No audio':
split = layout.split()
if rd.quicktime_audiocodec_type == 'LPCM':
@@ -559,7 +560,7 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
rd = context.scene.render
- layout.menu("RENDER_MT_ffmpeg_presets", text="Presets")
+ layout.menu("RENDER_MT_ffmpeg_presets", text=_("Presets"))
split = layout.split()
split.prop(rd, "ffmpeg_format")
@@ -575,22 +576,22 @@ class RENDER_PT_encoding(RenderButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Rate:")
- col.prop(rd, "ffmpeg_minrate", text="Minimum")
- col.prop(rd, "ffmpeg_maxrate", text="Maximum")
- col.prop(rd, "ffmpeg_buffersize", text="Buffer")
+ col.label(text=_("Rate:"))
+ col.prop(rd, "ffmpeg_minrate", text=_("Minimum"))
+ col.prop(rd, "ffmpeg_maxrate", text=_("Maximum"))
+ col.prop(rd, "ffmpeg_buffersize", text=_("Buffer"))
col = split.column()
col.prop(rd, "ffmpeg_autosplit")
- col.label(text="Mux:")
- col.prop(rd, "ffmpeg_muxrate", text="Rate")
- col.prop(rd, "ffmpeg_packetsize", text="Packet Size")
+ col.label(text=_("Mux:"))
+ col.prop(rd, "ffmpeg_muxrate", text=_("Rate"))
+ col.prop(rd, "ffmpeg_packetsize", text=_("Packet Size"))
layout.separator()
# Audio:
if rd.ffmpeg_format not in {'MP3'}:
- layout.prop(rd, "ffmpeg_audio_codec", text="Audio Codec")
+ layout.prop(rd, "ffmpeg_audio_codec", text=_("Audio Codec"))
row = layout.row()
row.prop(rd, "ffmpeg_audio_bitrate")
@@ -632,7 +633,7 @@ class RENDER_PT_bake(RenderButtonsPanel, Panel):
col = split.column()
col.prop(rd, "use_bake_clear")
col.prop(rd, "bake_margin")
- col.prop(rd, "bake_quad_split", text="Split")
+ col.prop(rd, "bake_quad_split", text=_("Split"))
col = split.column()
col.prop(rd, "use_bake_selected_to_active")
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py
index 66f967bb6e1..c82b4ac69dc 100644
--- a/release/scripts/startup/bl_ui/properties_scene.py
+++ b/release/scripts/startup/bl_ui/properties_scene.py
@@ -20,7 +20,7 @@
import bpy
from bpy.types import Operator, Panel
from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
class SceneButtonsPanel():
bl_space_type = 'PROPERTIES'
@@ -41,7 +41,7 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel):
scene = context.scene
layout.prop(scene, "camera")
- layout.prop(scene, "background_set", text="Background")
+ layout.prop(scene, "background_set", text=_("Background"))
class SCENE_PT_audio(SceneButtonsPanel, Panel):
@@ -59,15 +59,15 @@ class SCENE_PT_audio(SceneButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label("Listener:")
+ col.label(_("Listener:"))
col.prop(scene, "audio_distance_model", text="")
- col.prop(scene, "audio_doppler_speed", text="Speed")
- col.prop(scene, "audio_doppler_factor", text="Doppler")
+ col.prop(scene, "audio_doppler_speed", text=_("Speed"))
+ col.prop(scene, "audio_doppler_factor", text=_("Doppler"))
col = split.column()
- col.label("Format:")
+ col.label(_("Format:"))
col.prop(rd, "ffmpeg_audio_channels", text="")
- col.prop(rd, "ffmpeg_audio_mixrate", text="Rate")
+ col.prop(rd, "ffmpeg_audio_mixrate", text=_("Rate"))
layout.operator("sound.mixdown")
@@ -86,7 +86,7 @@ class SCENE_PT_unit(SceneButtonsPanel, Panel):
row = layout.row()
row.active = (unit.system != 'NONE')
- row.prop(unit, "scale_length", text="Scale")
+ row.prop(unit, "scale_length", text=_("Scale"))
row.prop(unit, "use_separate")
@@ -115,11 +115,11 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, Panel):
subcol = col.column()
subcol.operator_context = 'INVOKE_DEFAULT'
- op = subcol.operator("anim.keying_set_export", text="Export to File")
+ op = subcol.operator("anim.keying_set_export", text=_("Export to File"))
op.filepath = "keyingset.py"
col = row.column()
- col.label(text="Keyframing Settings:")
+ col.label(text=_("Keyframing Settings:"))
col.prop(ks, "bl_options")
@@ -138,7 +138,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
ks = scene.keying_sets.active
row = layout.row()
- row.label(text="Paths:")
+ row.label(text=_("Paths:"))
row = layout.row()
@@ -152,20 +152,20 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
ksp = ks.paths.active
if ksp:
col = layout.column()
- col.label(text="Target:")
+ col.label(text=_("Target:"))
col.template_any_ID(ksp, "id", "id_type")
col.template_path_builder(ksp, "data_path", ksp.id)
row = layout.row()
col = row.column()
- col.label(text="Array Target:")
+ col.label(text=_("Array Target:"))
col.prop(ksp, "use_entire_array")
if ksp.use_entire_array is False:
col.prop(ksp, "array_index")
col = row.column()
- col.label(text="F-Curve Grouping:")
+ col.label(text=_("F-Curve Grouping:"))
col.prop(ksp, "group_method")
if ksp.group_method == 'NAMED':
col.prop(ksp, "group")
@@ -209,14 +209,14 @@ class SCENE_PT_simplify(SceneButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(rd, "simplify_subdivision", text="Subdivision")
- col.prop(rd, "simplify_child_particles", text="Child Particles")
+ col.prop(rd, "simplify_subdivision", text=_("Subdivision"))
+ col.prop(rd, "simplify_child_particles", text=_("Child Particles"))
col.prop(rd, "use_simplify_triangulate")
col = split.column()
- col.prop(rd, "simplify_shadow_samples", text="Shadow Samples")
- col.prop(rd, "simplify_ao_sss", text="AO and SSS")
+ col.prop(rd, "simplify_shadow_samples", text=_("Shadow Samples"))
+ col.prop(rd, "simplify_ao_sss", text=_("AO and SSS"))
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
@@ -228,22 +228,22 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
class ANIM_OT_keying_set_export(Operator):
- "Export Keying Set to a python script."
+ "Export Keying Set to a python script"
bl_idname = "anim.keying_set_export"
bl_label = "Export Keying Set..."
- filepath = bpy.props.StringProperty(name="File Path", description="Filepath to write file to.")
+ filepath = bpy.props.StringProperty(name="File Path", description="Filepath to write file to")
filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
def execute(self, context):
if not self.filepath:
- raise Exception("Filepath not set.")
+ raise Exception("Filepath not set")
f = open(self.filepath, "w")
if not f:
- raise Exception("Could not open file.")
+ raise Exception("Could not open file")
scene = context.scene
ks = scene.keying_sets.active
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 34f5a948ee7..c5f8708040f 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Menu, Panel
from rna_prop_ui import PropertyPanel
+from blf import gettext as _
class TEXTURE_MT_specials(Menu):
@@ -143,11 +144,11 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
if tex.use_nodes:
if slot:
- split.label(text="Output:")
+ split.label(text=_("Output:"))
split.prop(slot, "output_node", text="")
else:
- split.label(text="Type:")
+ split.label(text=_("Type:"))
split.prop(tex, "type", text="")
@@ -178,21 +179,21 @@ class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
tex = context.texture
- layout.prop(tex, "use_color_ramp", text="Ramp")
+ layout.prop(tex, "use_color_ramp", text=_("Ramp"))
if tex.use_color_ramp:
layout.template_color_ramp(tex, "color_ramp", expand=True)
split = layout.split()
col = split.column()
- col.label(text="RGB Multiply:")
+ col.label(text=_("RGB Multiply:"))
sub = col.column(align=True)
sub.prop(tex, "factor_red", text="R")
sub.prop(tex, "factor_green", text="G")
sub.prop(tex, "factor_blue", text="B")
col = split.column()
- col.label(text="Adjust:")
+ col.label(text=_("Adjust:"))
col.prop(tex, "intensity")
col.prop(tex, "contrast")
col.prop(tex, "saturation")
@@ -235,17 +236,17 @@ class TEXTURE_PT_clouds(TextureTypePanel, Panel):
tex = context.texture
layout.prop(tex, "cloud_type", expand=True)
- layout.label(text="Noise:")
- layout.prop(tex, "noise_type", text="Type", expand=True)
- layout.prop(tex, "noise_basis", text="Basis")
+ layout.label(text=_("Noise:"))
+ layout.prop(tex, "noise_type", text=_("Type"), expand=True)
+ layout.prop(tex, "noise_basis", text=_("Basis"))
split = layout.split()
col = split.column()
- col.prop(tex, "noise_scale", text="Size")
- col.prop(tex, "noise_depth", text="Depth")
+ col.prop(tex, "noise_scale", text=_("Size"))
+ col.prop(tex, "noise_depth", text=_("Depth"))
- split.prop(tex, "nabla", text="Nabla")
+ split.prop(tex, "nabla", text=_("Nabla"))
class TEXTURE_PT_wood(TextureTypePanel, Panel):
@@ -263,15 +264,15 @@ class TEXTURE_PT_wood(TextureTypePanel, Panel):
col = layout.column()
col.active = tex.wood_type in {'RINGNOISE', 'BANDNOISE'}
- col.label(text="Noise:")
- col.row().prop(tex, "noise_type", text="Type", expand=True)
- layout.prop(tex, "noise_basis", text="Basis")
+ col.label(text=_("Noise:"))
+ col.row().prop(tex, "noise_type", text=_("Type"), expand=True)
+ layout.prop(tex, "noise_basis", text=_("Basis"))
split = layout.split()
split.active = tex.wood_type in {'RINGNOISE', 'BANDNOISE'}
col = split.column()
- col.prop(tex, "noise_scale", text="Size")
+ col.prop(tex, "noise_scale", text=_("Size"))
col.prop(tex, "turbulence")
split.prop(tex, "nabla")
@@ -289,15 +290,15 @@ class TEXTURE_PT_marble(TextureTypePanel, Panel):
layout.prop(tex, "marble_type", expand=True)
layout.prop(tex, "noise_basis_2", expand=True)
- layout.label(text="Noise:")
- layout.prop(tex, "noise_type", text="Type", expand=True)
- layout.prop(tex, "noise_basis", text="Basis")
+ layout.label(text=_("Noise:"))
+ layout.prop(tex, "noise_type", text=_("Type"), expand=True)
+ layout.prop(tex, "noise_basis", text=_("Basis"))
split = layout.split()
col = split.column()
- col.prop(tex, "noise_scale", text="Size")
- col.prop(tex, "noise_depth", text="Depth")
+ col.prop(tex, "noise_scale", text=_("Size"))
+ col.prop(tex, "noise_depth", text=_("Depth"))
col = split.column()
col.prop(tex, "turbulence")
@@ -315,7 +316,7 @@ class TEXTURE_PT_magic(TextureTypePanel, Panel):
tex = context.texture
row = layout.row()
- row.prop(tex, "noise_depth", text="Depth")
+ row.prop(tex, "noise_depth", text=_("Depth"))
row.prop(tex, "turbulence")
@@ -348,12 +349,12 @@ class TEXTURE_PT_stucci(TextureTypePanel, Panel):
tex = context.texture
layout.prop(tex, "stucci_type", expand=True)
- layout.label(text="Noise:")
- layout.prop(tex, "noise_type", text="Type", expand=True)
- layout.prop(tex, "noise_basis", text="Basis")
+ layout.label(text=_("Noise:"))
+ layout.prop(tex, "noise_type", text=_("Type"), expand=True)
+ layout.prop(tex, "noise_basis", text=_("Basis"))
row = layout.row()
- row.prop(tex, "noise_scale", text="Size")
+ row.prop(tex, "noise_scale", text=_("Size"))
row.prop(tex, "turbulence")
@@ -371,13 +372,13 @@ class TEXTURE_PT_image(TextureTypePanel, Panel):
def texture_filter_common(tex, layout):
- layout.label(text="Filter:")
+ layout.label(text=_("Filter:"))
layout.prop(tex, "filter_type", text="")
if tex.use_mipmap and tex.filter_type in {'AREA', 'EWA', 'FELINE'}:
if tex.filter_type == 'FELINE':
- layout.prop(tex, "filter_probes", text="Probes")
+ layout.prop(tex, "filter_probes", text=_("Probes"))
else:
- layout.prop(tex, "filter_eccentricity", text="Eccentricity")
+ layout.prop(tex, "filter_eccentricity", text=_("Eccentricity"))
layout.prop(tex, "filter_size")
layout.prop(tex, "use_filter_size_min")
@@ -399,12 +400,12 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Alpha:")
- col.prop(tex, "use_alpha", text="Use")
- col.prop(tex, "use_calculate_alpha", text="Calculate")
- col.prop(tex, "invert_alpha", text="Invert")
+ col.label(text=_("Alpha:"))
+ col.prop(tex, "use_alpha", text=_("Use"))
+ col.prop(tex, "use_calculate_alpha", text=_("Calculate"))
+ col.prop(tex, "invert_alpha", text=_("Invert"))
col.separator()
- col.prop(tex, "use_flip_axis", text="Flip X/Y Axis")
+ col.prop(tex, "use_flip_axis", text=_("Flip X/Y Axis"))
col = split.column()
@@ -445,12 +446,12 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
if tex.extension == 'REPEAT':
col = split.column(align=True)
- col.label(text="Repeat:")
+ col.label(text=_("Repeat:"))
col.prop(tex, "repeat_x", text="X")
col.prop(tex, "repeat_y", text="Y")
col = split.column(align=True)
- col.label(text="Mirror:")
+ col.label(text=_("Mirror:"))
row = col.row()
row.prop(tex, "use_mirror_x", text="X")
row.active = (tex.repeat_x > 1)
@@ -462,11 +463,11 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
elif tex.extension == 'CHECKER':
col = split.column(align=True)
row = col.row()
- row.prop(tex, "use_checker_even", text="Even")
- row.prop(tex, "use_checker_odd", text="Odd")
+ row.prop(tex, "use_checker_even", text=_("Even"))
+ row.prop(tex, "use_checker_odd", text=_("Odd"))
col = split.column()
- col.prop(tex, "checker_distance", text="Distance")
+ col.prop(tex, "checker_distance", text=_("Distance"))
layout.separator()
@@ -474,12 +475,12 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
col = split.column(align=True)
#col.prop(tex, "crop_rectangle")
- col.label(text="Crop Minimum:")
+ col.label(text=_("Crop Minimum:"))
col.prop(tex, "crop_min_x", text="X")
col.prop(tex, "crop_min_y", text="Y")
col = split.column(align=True)
- col.label(text="Crop Maximum:")
+ col.label(text=_("Crop Maximum:"))
col.prop(tex, "crop_max_x", text="X")
col.prop(tex, "crop_max_y", text="Y")
@@ -517,9 +518,9 @@ class TEXTURE_PT_envmap(TextureTypePanel, Panel):
col = split.column(align=True)
- col.label(text="Clipping:")
- col.prop(env, "clip_start", text="Start")
- col.prop(env, "clip_end", text="End")
+ col.label(text=_("Clipping:"))
+ col.prop(env, "clip_start", text=_("Start"))
+ col.prop(env, "clip_end", text=_("End"))
class TEXTURE_PT_envmap_sampling(TextureTypePanel, Panel):
@@ -551,7 +552,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
split = layout.split()
col = split.column()
- col.prop(tex, "dimension_max", text="Dimension")
+ col.prop(tex, "dimension_max", text=_("Dimension"))
col.prop(tex, "lacunarity")
col.prop(tex, "octaves")
@@ -560,16 +561,16 @@ class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
if musgrave_type in {'HETERO_TERRAIN', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL'}:
col.prop(tex, "offset")
if musgrave_type in {'MULTIFRACTAL', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL'}:
- col.prop(tex, "noise_intensity", text="Intensity")
+ col.prop(tex, "noise_intensity", text=_("Intensity"))
if musgrave_type in {'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL'}:
col.prop(tex, "gain")
- layout.label(text="Noise:")
+ layout.label(text=_("Noise:"))
- layout.prop(tex, "noise_basis", text="Basis")
+ layout.prop(tex, "noise_basis", text=_("Basis"))
row = layout.row()
- row.prop(tex, "noise_scale", text="Size")
+ row.prop(tex, "noise_scale", text=_("Size"))
row.prop(tex, "nabla")
@@ -586,26 +587,26 @@ class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Distance Metric:")
+ col.label(text=_("Distance Metric:"))
col.prop(tex, "distance_metric", text="")
sub = col.column()
sub.active = tex.distance_metric == 'MINKOVSKY'
- sub.prop(tex, "minkovsky_exponent", text="Exponent")
- col.label(text="Coloring:")
+ sub.prop(tex, "minkovsky_exponent", text=_("Exponent"))
+ col.label(text=_("Coloring:"))
col.prop(tex, "color_mode", text="")
- col.prop(tex, "noise_intensity", text="Intensity")
+ col.prop(tex, "noise_intensity", text=_("Intensity"))
col = split.column()
sub = col.column(align=True)
- sub.label(text="Feature Weights:")
+ sub.label(text=_("Feature Weights:"))
sub.prop(tex, "weight_1", text="1", slider=True)
sub.prop(tex, "weight_2", text="2", slider=True)
sub.prop(tex, "weight_3", text="3", slider=True)
sub.prop(tex, "weight_4", text="4", slider=True)
- layout.label(text="Noise:")
+ layout.label(text=_("Noise:"))
row = layout.row()
- row.prop(tex, "noise_scale", text="Size")
+ row.prop(tex, "noise_scale", text=_("Size"))
row.prop(tex, "nabla")
@@ -620,13 +621,13 @@ class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
tex = context.texture
layout.prop(tex, "noise_distortion")
- layout.prop(tex, "noise_basis", text="Basis")
+ layout.prop(tex, "noise_basis", text=_("Basis"))
split = layout.split()
col = split.column()
- col.prop(tex, "distortion", text="Distortion")
- col.prop(tex, "noise_scale", text="Size")
+ col.prop(tex, "distortion", text=_("Distortion"))
+ col.prop(tex, "noise_scale", text=_("Size"))
split.prop(tex, "nabla")
@@ -693,26 +694,26 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel):
col = split.column()
if pd.point_source == 'PARTICLE_SYSTEM':
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.prop(pd, "object", text="")
sub = col.column()
sub.enabled = bool(pd.object)
if pd.object:
- sub.label(text="System:")
+ sub.label(text=_("System:"))
sub.prop_search(pd, "particle_system", pd.object, "particle_systems", text="")
- sub.label(text="Cache:")
+ sub.label(text=_("Cache:"))
sub.prop(pd, "particle_cache_space", text="")
else:
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.prop(pd, "object", text="")
- col.label(text="Cache:")
+ col.label(text=_("Cache:"))
col.prop(pd, "vertex_cache_space", text="")
col.separator()
if pd.point_source == 'PARTICLE_SYSTEM':
- col.label(text="Color Source:")
+ col.label(text=_("Color Source:"))
col.prop(pd, "color_source", text="")
if pd.color_source in {'PARTICLE_SPEED', 'PARTICLE_VELOCITY'}:
col.prop(pd, "speed_scale")
@@ -722,7 +723,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel):
col = split.column()
col.label()
col.prop(pd, "radius")
- col.label(text="Falloff:")
+ col.label(text=_("Falloff:"))
col.prop(pd, "falloff", text="")
if pd.falloff == 'SOFT':
col.prop(pd, "falloff_soft")
@@ -733,7 +734,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel):
if pd.use_falloff_curve:
col = layout.column()
- col.label(text="Falloff Curve")
+ col.label(text=_("Falloff Curve"))
col.template_curve_mapping(pd, "falloff_curve", brush=False)
@@ -762,9 +763,9 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Influence:")
+ col.label(text=_("Influence:"))
col.prop(pd, "turbulence_influence", text="")
- col.label(text="Noise Basis:")
+ col.label(text=_("Noise Basis:"))
col.prop(pd, "noise_basis", text="")
col = split.column()
@@ -801,7 +802,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
if not isinstance(idblock, bpy.types.Brush):
split = layout.split(percentage=0.3)
col = split.column()
- col.label(text="Coordinates:")
+ col.label(text=_("Coordinates:"))
col = split.column()
col.prop(tex, "texture_coords", text="")
@@ -810,12 +811,12 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
ob = context.object
if ob and ob.type == 'MESH':
split = layout.split(percentage=0.3)
- split.label(text="Mesh:")
+ split.label(text=_("Mesh:"))
split.prop(ob.data, "texco_mesh", text="")
"""
elif tex.texture_coords == 'UV':
split = layout.split(percentage=0.3)
- split.label(text="Layer:")
+ split.label(text=_("Layer:"))
ob = context.object
if ob and ob.type == 'MESH':
split.prop_search(tex, "uv_layer", ob.data, "uv_textures", text="")
@@ -824,12 +825,12 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
elif tex.texture_coords == 'OBJECT':
split = layout.split(percentage=0.3)
- split.label(text="Object:")
+ split.label(text=_("Object:"))
split.prop(tex, "object", text="")
if isinstance(idblock, bpy.types.Brush):
if context.sculpt_object:
- layout.label(text="Brush Mapping:")
+ layout.label(text=_("Brush Mapping:"))
layout.prop(tex, "map_mode", expand=True)
row = layout.row()
@@ -838,7 +839,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
else:
if isinstance(idblock, bpy.types.Material):
split = layout.split(percentage=0.3)
- split.label(text="Projection:")
+ split.label(text=_("Projection:"))
split.prop(tex, "mapping", text="")
split = layout.split()
@@ -900,111 +901,111 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Diffuse:")
- factor_but(col, "use_map_diffuse", "diffuse_factor", "Intensity")
- factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", "Color")
- factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
- factor_but(col, "use_map_translucency", "translucency_factor", "Translucency")
+ col.label(text=_("Diffuse:"))
+ factor_but(col, "use_map_diffuse", "diffuse_factor", _("Intensity"))
+ factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", _("Color"))
+ factor_but(col, "use_map_alpha", "alpha_factor", _("Alpha"))
+ factor_but(col, "use_map_translucency", "translucency_factor", _("Translucency"))
- col.label(text="Specular:")
- factor_but(col, "use_map_specular", "specular_factor", "Intensity")
- factor_but(col, "use_map_color_spec", "specular_color_factor", "Color")
- factor_but(col, "use_map_hardness", "hardness_factor", "Hardness")
+ col.label(text=_("Specular:"))
+ factor_but(col, "use_map_specular", "specular_factor", _("Intensity"))
+ factor_but(col, "use_map_color_spec", "specular_color_factor", _("Color"))
+ factor_but(col, "use_map_hardness", "hardness_factor", _("Hardness"))
col = split.column()
- col.label(text="Shading:")
- factor_but(col, "use_map_ambient", "ambient_factor", "Ambient")
- factor_but(col, "use_map_emit", "emit_factor", "Emit")
- factor_but(col, "use_map_mirror", "mirror_factor", "Mirror")
- factor_but(col, "use_map_raymir", "raymir_factor", "Ray Mirror")
+ col.label(text=_("Shading:"))
+ factor_but(col, "use_map_ambient", "ambient_factor", _("Ambient"))
+ factor_but(col, "use_map_emit", "emit_factor", _("Emit"))
+ factor_but(col, "use_map_mirror", "mirror_factor", _("Mirror"))
+ factor_but(col, "use_map_raymir", "raymir_factor", _("Ray Mirror"))
- col.label(text="Geometry:")
+ col.label(text=_("Geometry:"))
# XXX replace 'or' when displacement is fixed to not rely on normal influence value.
- sub_tmp = factor_but(col, "use_map_normal", "normal_factor", "Normal")
+ sub_tmp = factor_but(col, "use_map_normal", "normal_factor", _("Normal"))
sub_tmp.active = (tex.use_map_normal or tex.use_map_displacement)
# END XXX
- factor_but(col, "use_map_warp", "warp_factor", "Warp")
- factor_but(col, "use_map_displacement", "displacement_factor", "Displace")
+ factor_but(col, "use_map_warp", "warp_factor", _("Warp"))
+ factor_but(col, "use_map_displacement", "displacement_factor", _("Displace"))
#sub = col.column()
#sub.active = tex.use_map_translucency or tex.map_emit or tex.map_alpha or tex.map_raymir or tex.map_hardness or tex.map_ambient or tex.map_specularity or tex.map_reflection or tex.map_mirror
- #sub.prop(tex, "default_value", text="Amount", slider=True)
+ #sub.prop(tex, "default_value", text=_("Amount"), slider=True)
elif idblock.type == 'HALO':
- layout.label(text="Halo:")
+ layout.label(text=_("Halo:"))
split = layout.split()
col = split.column()
- factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", "Color")
- factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
+ factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", _("Color"))
+ factor_but(col, "use_map_alpha", "alpha_factor", _("Alpha"))
col = split.column()
- factor_but(col, "use_map_raymir", "raymir_factor", "Size")
- factor_but(col, "use_map_hardness", "hardness_factor", "Hardness")
- factor_but(col, "use_map_translucency", "translucency_factor", "Add")
+ factor_but(col, "use_map_raymir", "raymir_factor", _("Size"))
+ factor_but(col, "use_map_hardness", "hardness_factor", _("Hardness"))
+ factor_but(col, "use_map_translucency", "translucency_factor", _("Add"))
elif idblock.type == 'VOLUME':
split = layout.split()
col = split.column()
- factor_but(col, "use_map_density", "density_factor", "Density")
- factor_but(col, "use_map_emission", "emission_factor", "Emission")
- factor_but(col, "use_map_scatter", "scattering_factor", "Scattering")
- factor_but(col, "use_map_reflect", "reflection_factor", "Reflection")
+ factor_but(col, "use_map_density", "density_factor", _("Density"))
+ factor_but(col, "use_map_emission", "emission_factor", _("Emission"))
+ factor_but(col, "use_map_scatter", "scattering_factor", _("Scattering"))
+ factor_but(col, "use_map_reflect", "reflection_factor", _("Reflection"))
col = split.column()
col.label(text=" ")
- factor_but(col, "use_map_color_emission", "emission_color_factor", "Emission Color")
- factor_but(col, "use_map_color_transmission", "transmission_color_factor", "Transmission Color")
- factor_but(col, "use_map_color_reflection", "reflection_color_factor", "Reflection Color")
+ factor_but(col, "use_map_color_emission", "emission_color_factor", _("Emission Color"))
+ factor_but(col, "use_map_color_transmission", "transmission_color_factor", _("Transmission Color"))
+ factor_but(col, "use_map_color_reflection", "reflection_color_factor", _("Reflection Color"))
elif isinstance(idblock, bpy.types.Lamp):
split = layout.split()
col = split.column()
- factor_but(col, "use_map_color", "color_factor", "Color")
+ factor_but(col, "use_map_color", "color_factor", _("Color"))
col = split.column()
- factor_but(col, "use_map_shadow", "shadow_factor", "Shadow")
+ factor_but(col, "use_map_shadow", "shadow_factor", _("Shadow"))
elif isinstance(idblock, bpy.types.World):
split = layout.split()
col = split.column()
- factor_but(col, "use_map_blend", "blend_factor", "Blend")
- factor_but(col, "use_map_horizon", "horizon_factor", "Horizon")
+ factor_but(col, "use_map_blend", "blend_factor", _("Blend"))
+ factor_but(col, "use_map_horizon", "horizon_factor", _("Horizon"))
col = split.column()
- factor_but(col, "use_map_zenith_up", "zenith_up_factor", "Zenith Up")
- factor_but(col, "use_map_zenith_down", "zenith_down_factor", "Zenith Down")
+ factor_but(col, "use_map_zenith_up", "zenith_up_factor", _("Zenith Up"))
+ factor_but(col, "use_map_zenith_down", "zenith_down_factor", _("Zenith Down"))
elif isinstance(idblock, bpy.types.ParticleSettings):
split = layout.split()
col = split.column()
- col.label(text="General:")
- factor_but(col, "use_map_time", "time_factor", "Time")
- factor_but(col, "use_map_life", "life_factor", "Lifetime")
- factor_but(col, "use_map_density", "density_factor", "Density")
- factor_but(col, "use_map_size", "size_factor", "Size")
+ col.label(text=_("General:"))
+ factor_but(col, "use_map_time", "time_factor", _("Time"))
+ factor_but(col, "use_map_life", "life_factor", _("Lifetime"))
+ factor_but(col, "use_map_density", "density_factor", _("Density"))
+ factor_but(col, "use_map_size", "size_factor", _("Size"))
col = split.column()
- col.label(text="Physics:")
- factor_but(col, "use_map_velocity", "velocity_factor", "Velocity")
- factor_but(col, "use_map_damp", "damp_factor", "Damp")
- factor_but(col, "use_map_gravity", "gravity_factor", "Gravity")
- factor_but(col, "use_map_field", "field_factor", "Force Fields")
+ col.label(text=_("Physics:"))
+ factor_but(col, "use_map_velocity", "velocity_factor", _("Velocity"))
+ factor_but(col, "use_map_damp", "damp_factor", _("Damp"))
+ factor_but(col, "use_map_gravity", "gravity_factor", _("Gravity"))
+ factor_but(col, "use_map_field", "field_factor", _("Force Fields"))
- layout.label(text="Hair:")
+ layout.label(text=_("Hair:"))
split = layout.split()
col = split.column()
- factor_but(col, "use_map_length", "length_factor", "Length")
- factor_but(col, "use_map_clump", "clump_factor", "Clump")
+ factor_but(col, "use_map_length", "length_factor", _("Length"))
+ factor_but(col, "use_map_clump", "clump_factor", _("Clump"))
col = split.column()
- factor_but(col, "use_map_kink", "kink_factor", "Kink")
- factor_but(col, "use_map_rough", "rough_factor", "Rough")
+ factor_but(col, "use_map_kink", "kink_factor", _("Kink"))
+ factor_but(col, "use_map_rough", "rough_factor", _("Rough"))
layout.separator()
@@ -1012,32 +1013,32 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
split = layout.split()
col = split.column()
- col.prop(tex, "blend_type", text="Blend")
+ col.prop(tex, "blend_type", text=_("Blend"))
col.prop(tex, "use_rgb_to_intensity")
# color is used on grayscale textures even when use_rgb_to_intensity is disabled.
col.prop(tex, "color", text="")
col = split.column()
- col.prop(tex, "invert", text="Negative")
+ col.prop(tex, "invert", text=_("Negative"))
col.prop(tex, "use_stencil")
if isinstance(idblock, bpy.types.Material) or isinstance(idblock, bpy.types.World):
- col.prop(tex, "default_value", text="DVar", slider=True)
+ col.prop(tex, "default_value", text=_("DVar"), slider=True)
if isinstance(idblock, bpy.types.Material):
- layout.label(text="Bump Mapping:")
+ layout.label(text=_("Bump Mapping:"))
# only show bump settings if activated but not for normalmap images
row = layout.row()
sub = row.row()
sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and (tex.texture.use_normal_map or tex.texture.use_derivative_map))
- sub.prop(tex, "bump_method", text="Method")
+ sub.prop(tex, "bump_method", text=_("Method"))
# the space setting is supported for: derivmaps + bumpmaps (DEFAULT,BEST_QUALITY), not for normalmaps
sub = row.row()
sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and ((tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'}) or (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map))
- sub.prop(tex, "bump_objectspace", text="Space")
+ sub.prop(tex, "bump_objectspace", text=_("Space"))
class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index 71ee03296a0..916667ea400 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Panel
from rna_prop_ui import PropertyPanel
+from blf import gettext as _
class WorldButtonsPanel():
@@ -115,12 +116,12 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel, Panel):
layout.active = light.use_ambient_occlusion
split = layout.split()
- split.prop(light, "ao_factor", text="Factor")
+ split.prop(light, "ao_factor", text=_("Factor"))
split.prop(light, "ao_blend_type", text="")
class WORLD_PT_environment_lighting(WorldButtonsPanel, Panel):
- bl_label = "Environment Lighting"
+ bl_label = _("Environment Lighting")
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
@@ -134,7 +135,7 @@ class WORLD_PT_environment_lighting(WorldButtonsPanel, Panel):
layout.active = light.use_environment_light
split = layout.split()
- split.prop(light, "environment_energy", text="Energy")
+ split.prop(light, "environment_energy", text=_("Energy"))
split.prop(light, "environment_color", text="")
@@ -153,11 +154,11 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, Panel):
layout.active = light.use_indirect_light and light.gather_method == 'APPROXIMATE'
split = layout.split()
- split.prop(light, "indirect_factor", text="Factor")
- split.prop(light, "indirect_bounces", text="Bounces")
+ split.prop(light, "indirect_factor", text=_("Factor"))
+ split.prop(light, "indirect_bounces", text=_("Bounces"))
if light.gather_method == 'RAYTRACE':
- layout.label(text="Only works with Approximate gather method")
+ layout.label(text=_("Only works with Approximate gather method"))
class WORLD_PT_gather(WorldButtonsPanel, Panel):
@@ -175,18 +176,18 @@ class WORLD_PT_gather(WorldButtonsPanel, Panel):
split = layout.split()
col = split.column()
- col.label(text="Attenuation:")
+ col.label(text=_("Attenuation:"))
if light.gather_method == 'RAYTRACE':
col.prop(light, "distance")
col.prop(light, "use_falloff")
sub = col.row()
sub.active = light.use_falloff
- sub.prop(light, "falloff_strength", text="Strength")
+ sub.prop(light, "falloff_strength", text=_("Strength"))
if light.gather_method == 'RAYTRACE':
col = split.column()
- col.label(text="Sampling:")
+ col.label(text=_("Sampling:"))
col.prop(light, "sample_method", text="")
sub = col.column()
@@ -201,9 +202,9 @@ class WORLD_PT_gather(WorldButtonsPanel, Panel):
if light.gather_method == 'APPROXIMATE':
col = split.column()
- col.label(text="Sampling:")
+ col.label(text=_("Sampling:"))
col.prop(light, "passes")
- col.prop(light, "error_threshold", text="Error")
+ col.prop(light, "error_threshold", text=_("Error"))
col.prop(light, "use_cache")
col.prop(light, "correction")
@@ -257,11 +258,11 @@ class WORLD_PT_stars(WorldButtonsPanel, Panel):
col = split.column()
col.prop(world.star_settings, "size")
- col.prop(world.star_settings, "color_random", text="Colors")
+ col.prop(world.star_settings, "color_random", text=_("Colors"))
col = split.column()
- col.prop(world.star_settings, "distance_min", text="Min. Dist")
- col.prop(world.star_settings, "average_separation", text="Separation")
+ col.prop(world.star_settings, "distance_min", text=_("Min. Dist"))
+ col.prop(world.star_settings, "average_separation", text=_("Separation"))
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index cbbefa01a3c..bb0cf6eda2c 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Header, Menu, Operator
from bpy.props import StringProperty
+from blf import gettext as _
class CONSOLE_HT_header(Header):
@@ -33,7 +34,7 @@ class CONSOLE_HT_header(Header):
if context.area.show_menus:
layout.menu("CONSOLE_MT_console")
- layout.operator("console.autocomplete", text="Autocomplete")
+ layout.operator("console.autocomplete", text=_("Autocomplete"))
class CONSOLE_MT_console(Menu):
diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py
index 90dcc99e6d7..580a4e7f1b6 100644
--- a/release/scripts/startup/bl_ui/space_dopesheet.py
+++ b/release/scripts/startup/bl_ui/space_dopesheet.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Header, Menu
+from blf import gettext as _
#######################################
@@ -117,7 +118,7 @@ class DOPESHEET_HT_header(Header):
row.menu("DOPESHEET_MT_gpencil_frame")
layout.prop(st, "mode", text="")
- layout.prop(st.dopesheet, "show_summary", text="Summary")
+ layout.prop(st.dopesheet, "show_summary", text=_("Summary"))
if st.mode == 'DOPESHEET':
dopesheet_filter(layout, context)
@@ -153,9 +154,9 @@ class DOPESHEET_MT_view(Menu):
layout.prop(st, "use_marker_sync")
if st.show_seconds:
- layout.operator("anim.time_toggle", text="Show Frames")
+ layout.operator("anim.time_toggle", text=_("Show Frames"))
else:
- layout.operator("anim.time_toggle", text="Show Seconds")
+ layout.operator("anim.time_toggle", text=_("Show Seconds"))
layout.separator()
layout.operator("anim.previewrange_set")
@@ -180,22 +181,22 @@ class DOPESHEET_MT_select(Menu):
# This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
layout.operator("action.select_all_toggle")
- layout.operator("action.select_all_toggle", text="Invert Selection").invert = True
+ layout.operator("action.select_all_toggle", text=_("Invert Selection")).invert = True
layout.separator()
layout.operator("action.select_border")
- layout.operator("action.select_border", text="Border Axis Range").axis_range = True
+ layout.operator("action.select_border", text=_("Border Axis Range")).axis_range = True
layout.separator()
- layout.operator("action.select_column", text="Columns on Selected Keys").mode = 'KEYS'
- layout.operator("action.select_column", text="Column on Current Frame").mode = 'CFRA'
+ layout.operator("action.select_column", text=_("Columns on Selected Keys")).mode = 'KEYS'
+ layout.operator("action.select_column", text=_("Column on Current Frame")).mode = 'CFRA'
- layout.operator("action.select_column", text="Columns on Selected Markers").mode = 'MARKERS_COLUMN'
- layout.operator("action.select_column", text="Between Selected Markers").mode = 'MARKERS_BETWEEN'
+ layout.operator("action.select_column", text=_("Columns on Selected Markers")).mode = 'MARKERS_COLUMN'
+ layout.operator("action.select_column", text=_("Between Selected Markers")).mode = 'MARKERS_BETWEEN'
layout.separator()
- layout.operator("action.select_leftright", text="Before Current Frame").mode = 'LEFT'
- layout.operator("action.select_leftright", text="After Current Frame").mode = 'RIGHT'
+ layout.operator("action.select_leftright", text=_("Before Current Frame")).mode = 'LEFT'
+ layout.operator("action.select_leftright", text=_("After Current Frame")).mode = 'RIGHT'
# FIXME: grease pencil mode isn't supported for these yet, so skip for that mode only
if context.space_data.mode != 'GPENCIL':
@@ -217,14 +218,14 @@ class DOPESHEET_MT_marker(Menu):
#layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("marker.add", "Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
+ layout.operator("marker.add", _("Add Marker"))
+ layout.operator("marker.duplicate", text=_("Duplicate Marker"))
+ layout.operator("marker.delete", text=_("Delete Marker"))
layout.separator()
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
+ layout.operator("marker.rename", text=_("Rename Marker"))
+ layout.operator("marker.move", text=_("Grab/Move Marker"))
if st.mode in {'ACTION', 'SHAPEKEY'} and st.action:
layout.separator()
@@ -254,14 +255,14 @@ class DOPESHEET_MT_channel(Menu):
layout.separator()
layout.operator("anim.channels_editable_toggle")
- layout.operator_menu_enum("action.extrapolation_type", "type", text="Extrapolation Mode")
+ layout.operator_menu_enum("action.extrapolation_type", "type", text=_("Extrapolation Mode"))
layout.separator()
layout.operator("anim.channels_expand")
layout.operator("anim.channels_collapse")
layout.separator()
- layout.operator_menu_enum("anim.channels_move", "direction", text="Move...")
+ layout.operator_menu_enum("anim.channels_move", "direction", text=_("Move..."))
layout.separator()
layout.operator("anim.channels_fcurves_enable")
@@ -273,10 +274,10 @@ class DOPESHEET_MT_key(Menu):
def draw(self, context):
layout = self.layout
- layout.menu("DOPESHEET_MT_key_transform", text="Transform")
+ layout.menu("DOPESHEET_MT_key_transform", text=_("Transform"))
- layout.operator_menu_enum("action.snap", "type", text="Snap")
- layout.operator_menu_enum("action.mirror", "type", text="Mirror")
+ layout.operator_menu_enum("action.snap", "type", text=_("Snap"))
+ layout.operator_menu_enum("action.mirror", "type", text=_("Mirror"))
layout.separator()
layout.operator("action.keyframe_insert")
@@ -286,9 +287,9 @@ class DOPESHEET_MT_key(Menu):
layout.operator("action.delete")
layout.separator()
- layout.operator_menu_enum("action.keyframe_type", "type", text="Keyframe Type")
- layout.operator_menu_enum("action.handle_type", "type", text="Handle Type")
- layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode")
+ layout.operator_menu_enum("action.keyframe_type", "type", text=_("Keyframe Type"))
+ layout.operator_menu_enum("action.handle_type", "type", text=_("Handle Type"))
+ layout.operator_menu_enum("action.interpolation_type", "type", text=_("Interpolation Mode"))
layout.separator()
layout.operator("action.clean")
@@ -305,10 +306,10 @@ class DOPESHEET_MT_key_transform(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("transform.transform", text="Grab/Move").mode = 'TIME_TRANSLATE'
- layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
- layout.operator("transform.transform", text="Slide").mode = 'TIME_SLIDE'
- layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE'
+ layout.operator("transform.transform", text=_("Grab/Move")).mode = 'TIME_TRANSLATE'
+ layout.operator("transform.transform", text=_("Extend")).mode = 'TIME_EXTEND'
+ layout.operator("transform.transform", text=_("Slide")).mode = 'TIME_SLIDE'
+ layout.operator("transform.transform", text=_("Scale")).mode = 'TIME_SCALE'
#######################################
@@ -347,7 +348,7 @@ class DOPESHEET_MT_gpencil_frame(Menu):
def draw(self, context):
layout = self.layout
- layout.menu("DOPESHEET_MT_key_transform", text="Transform")
+ layout.menu("DOPESHEET_MT_key_transform", text=_("Transform"))
#layout.operator_menu_enum("action.snap", "type", text="Snap")
#layout.operator_menu_enum("action.mirror", "type", text="Mirror")
diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py
index d4b8c415a7f..fd50d60bd45 100644
--- a/release/scripts/startup/bl_ui/space_graph.py
+++ b/release/scripts/startup/bl_ui/space_graph.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Header, Menu
+from blf import gettext as _
class GRAPH_HT_header(Header):
@@ -82,9 +83,9 @@ class GRAPH_MT_view(Menu):
layout.separator()
if st.show_handles:
- layout.operator("graph.handles_view_toggle", icon='CHECKBOX_HLT', text="Show All Handles")
+ layout.operator("graph.handles_view_toggle", icon='CHECKBOX_HLT', text=_("Show All Handles"))
else:
- layout.operator("graph.handles_view_toggle", icon='CHECKBOX_DEHLT', text="Show All Handles")
+ layout.operator("graph.handles_view_toggle", icon='CHECKBOX_DEHLT', text=_("Show All Handles"))
layout.prop(st, "use_only_selected_curves_handles")
layout.prop(st, "use_only_selected_keyframe_handles")
layout.operator("anim.time_toggle")
@@ -112,23 +113,23 @@ class GRAPH_MT_select(Menu):
# This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
layout.operator("graph.select_all_toggle")
- layout.operator("graph.select_all_toggle", text="Invert Selection").invert = True
+ layout.operator("graph.select_all_toggle", text=_("Invert Selection")).invert = True
layout.separator()
layout.operator("graph.select_border")
- layout.operator("graph.select_border", text="Border Axis Range").axis_range = True
- layout.operator("graph.select_border", text="Border (Include Handles)").include_handles = True
+ layout.operator("graph.select_border", text=_("Border Axis Range")).axis_range = True
+ layout.operator("graph.select_border", text=_("Border (Include Handles)")).include_handles = True
layout.separator()
- layout.operator("graph.select_column", text="Columns on Selected Keys").mode = 'KEYS'
- layout.operator("graph.select_column", text="Column on Current Frame").mode = 'CFRA'
+ layout.operator("graph.select_column", text=_("Columns on Selected Keys")).mode = 'KEYS'
+ layout.operator("graph.select_column", text=_("Column on Current Frame")).mode = 'CFRA'
- layout.operator("graph.select_column", text="Columns on Selected Markers").mode = 'MARKERS_COLUMN'
- layout.operator("graph.select_column", text="Between Selected Markers").mode = 'MARKERS_BETWEEN'
+ layout.operator("graph.select_column", text=_("Columns on Selected Markers")).mode = 'MARKERS_COLUMN'
+ layout.operator("graph.select_column", text=_("Between Selected Markers")).mode = 'MARKERS_BETWEEN'
layout.separator()
- layout.operator("graph.select_leftright", text="Before Current Frame").mode = 'LEFT'
- layout.operator("graph.select_leftright", text="After Current Frame").mode = 'RIGHT'
+ layout.operator("graph.select_leftright", text=_("Before Current Frame")).mode = 'LEFT'
+ layout.operator("graph.select_leftright", text=_("After Current Frame")).mode = 'RIGHT'
layout.separator()
layout.operator("graph.select_more")
@@ -146,14 +147,14 @@ class GRAPH_MT_marker(Menu):
#layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("marker.add", "Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
+ layout.operator("marker.add", _("Add Marker"))
+ layout.operator("marker.duplicate", text=_("Duplicate Marker"))
+ layout.operator("marker.delete", text=_("Delete Marker"))
layout.separator()
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
+ layout.operator("marker.rename", text=_("Rename Marker"))
+ layout.operator("marker.move", text=_("Grab/Move Marker"))
# TODO: pose markers for action edit mode only?
@@ -176,14 +177,14 @@ class GRAPH_MT_channel(Menu):
layout.separator()
layout.operator("anim.channels_editable_toggle")
layout.operator("anim.channels_visibility_set")
- layout.operator_menu_enum("graph.extrapolation_type", "type", text="Extrapolation Mode")
+ layout.operator_menu_enum("graph.extrapolation_type", "type", text=_("Extrapolation Mode"))
layout.separator()
layout.operator("anim.channels_expand")
layout.operator("anim.channels_collapse")
layout.separator()
- layout.operator_menu_enum("anim.channels_move", "direction", text="Move...")
+ layout.operator_menu_enum("anim.channels_move", "direction", text=_("Move..."))
layout.separator()
layout.operator("anim.channels_fcurves_enable")
@@ -195,10 +196,10 @@ class GRAPH_MT_key(Menu):
def draw(self, context):
layout = self.layout
- layout.menu("GRAPH_MT_key_transform", text="Transform")
+ layout.menu("GRAPH_MT_key_transform", text=_("Transform"))
- layout.operator_menu_enum("graph.snap", "type", text="Snap")
- layout.operator_menu_enum("graph.mirror", "type", text="Mirror")
+ layout.operator_menu_enum("graph.snap", "type", text=_("Snap"))
+ layout.operator_menu_enum("graph.mirror", "type", text=_("Mirror"))
layout.separator()
layout.operator("graph.keyframe_insert")
@@ -210,8 +211,8 @@ class GRAPH_MT_key(Menu):
layout.operator("graph.delete")
layout.separator()
- layout.operator_menu_enum("graph.handle_type", "type", text="Handle Type")
- layout.operator_menu_enum("graph.interpolation_type", "type", text="Interpolation Mode")
+ layout.operator_menu_enum("graph.handle_type", "type", text=_("Handle Type"))
+ layout.operator_menu_enum("graph.interpolation_type", "type", text=_("Interpolation Mode"))
layout.separator()
layout.operator("graph.clean")
@@ -224,7 +225,7 @@ class GRAPH_MT_key(Menu):
layout.operator("graph.paste")
layout.separator()
- layout.operator("graph.euler_filter", text="Discontinuity (Euler) Filter")
+ layout.operator("graph.euler_filter", text=_("Discontinuity (Euler) Filter"))
class GRAPH_MT_key_transform(Menu):
@@ -233,10 +234,10 @@ class GRAPH_MT_key_transform(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("transform.translate", text="Grab/Move")
- layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
- layout.operator("transform.rotate", text="Rotate")
- layout.operator("transform.resize", text="Scale")
+ layout.operator("transform.translate", text=_("Grab/Move"))
+ layout.operator("transform.transform", text=_("Extend")).mode = 'TIME_EXTEND'
+ layout.operator("transform.rotate", text=_("Rotate"))
+ layout.operator("transform.resize", text=_("Scale"))
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index 97b5d8457e0..f5be25d14f6 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from blf import gettext as _
class BrushButtonsPanel():
@@ -64,7 +65,7 @@ class IMAGE_MT_view(Menu):
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)
+ text = _("Zoom") + " %d:%d" % (a, b)
layout.operator("image.view_zoom_ratio", text=text).ratio = a / b
layout.separator()
@@ -92,7 +93,7 @@ class IMAGE_MT_select(Menu):
layout.separator()
layout.operator("uv.select_all")
- layout.operator("uv.select_all", text="Inverse").action = 'INVERT'
+ layout.operator("uv.select_all", text=_("Inverse")).action = 'INVERT'
layout.operator("uv.unlink_selected")
layout.separator()
@@ -122,12 +123,12 @@ class IMAGE_MT_image(Menu):
layout.operator("image.save")
layout.operator("image.save_as")
- layout.operator("image.save_as", text="Save a Copy").copy = True
+ layout.operator("image.save_as", text=_("Save a Copy")).copy = True
if ima.source == 'SEQUENCE':
layout.operator("image.save_sequence")
- layout.operator("image.external_edit", "Edit Externally")
+ layout.operator("image.external_edit", _("Edit Externally"))
layout.separator()
@@ -145,7 +146,7 @@ class IMAGE_MT_image(Menu):
# this could be done in operator poll too
if ima.is_dirty:
if ima.source in {'FILE', 'GENERATED'} and ima.type != 'MULTILAYER':
- layout.operator("image.pack", text="Pack As PNG").as_png = True
+ layout.operator("image.pack", text=_("Pack As PNG")).as_png = True
layout.separator()
@@ -158,23 +159,23 @@ class IMAGE_MT_image_invert(Menu):
def draw(self, context):
layout = self.layout
- op = layout.operator("image.invert", text="Invert Image Colors")
+ op = layout.operator("image.invert", text=_("Invert Image Colors"))
op.invert_r = True
op.invert_g = True
op.invert_b = True
layout.separator()
- op = layout.operator("image.invert", text="Invert Red Channel")
+ op = layout.operator("image.invert", text=_("Invert Red Channel"))
op.invert_r = True
- op = layout.operator("image.invert", text="Invert Green Channel")
+ op = layout.operator("image.invert", text=_("Invert Green Channel"))
op.invert_g = True
- op = layout.operator("image.invert", text="Invert Blue Channel")
+ op = layout.operator("image.invert", text=_("Invert Blue Channel"))
op.invert_b = True
- op = layout.operator("image.invert", text="Invert Alpha Channel")
+ op = layout.operator("image.invert", text=_("Invert Alpha Channel"))
op.invert_a = True
@@ -185,8 +186,8 @@ class IMAGE_MT_uvs_showhide(Menu):
layout = self.layout
layout.operator("uv.reveal")
- layout.operator("uv.hide", text="Hide Selected")
- layout.operator("uv.hide", text="Hide Unselected").unselected = True
+ layout.operator("uv.hide", text=_("Hide Selected"))
+ layout.operator("uv.hide", text=_("Hide Unselected")).unselected = True
class IMAGE_MT_uvs_transform(Menu):
@@ -211,14 +212,14 @@ class IMAGE_MT_uvs_snap(Menu):
layout = self.layout
layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("uv.snap_selected", text="Selected to Pixels").target = 'PIXELS'
- layout.operator("uv.snap_selected", text="Selected to Cursor").target = 'CURSOR'
- layout.operator("uv.snap_selected", text="Selected to Adjacent Unselected").target = 'ADJACENT_UNSELECTED'
+ layout.operator("uv.snap_selected", text=_("Selected to Pixels")).target = 'PIXELS'
+ layout.operator("uv.snap_selected", text=_("Selected to Cursor")).target = 'CURSOR'
+ layout.operator("uv.snap_selected", text=_("Selected to Adjacent Unselected")).target = 'ADJACENT_UNSELECTED'
layout.separator()
- layout.operator("uv.snap_cursor", text="Cursor to Pixels").target = 'PIXELS'
- layout.operator("uv.snap_cursor", text="Cursor to Selected").target = 'SELECTED'
+ layout.operator("uv.snap_cursor", text=_("Cursor to Pixels")).target = 'PIXELS'
+ layout.operator("uv.snap_cursor", text=_("Cursor to Selected")).target = 'SELECTED'
class IMAGE_MT_uvs_mirror(Menu):
@@ -228,8 +229,8 @@ class IMAGE_MT_uvs_mirror(Menu):
layout = self.layout
layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("transform.mirror", text="X Axis").constraint_axis[0] = True
- layout.operator("transform.mirror", text="Y Axis").constraint_axis[1] = True
+ layout.operator("transform.mirror", text=_("X Axis")).constraint_axis[0] = True
+ layout.operator("transform.mirror", text=_("Y Axis")).constraint_axis[1] = True
class IMAGE_MT_uvs_weldalign(Menu):
@@ -259,7 +260,7 @@ class IMAGE_MT_uvs(Menu):
layout.prop(uv, "use_live_unwrap")
layout.operator("uv.unwrap")
- layout.operator("uv.pin", text="Unpin").clear = True
+ layout.operator("uv.pin", text=_("Unpin")).clear = True
layout.operator("uv.pin")
layout.separator()
@@ -299,32 +300,32 @@ class IMAGE_MT_uvs_select_mode(Menu):
# do smart things depending on whether uv_select_sync is on
if toolsettings.use_uv_select_sync:
- prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
+ prop = layout.operator("wm.context_set_value", text=_("Vertex"), icon='VERTEXSEL')
prop.value = "(True, False, False)"
prop.data_path = "tool_settings.mesh_select_mode"
- prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
+ prop = layout.operator("wm.context_set_value", text=_("Edge"), icon='EDGESEL')
prop.value = "(False, True, False)"
prop.data_path = "tool_settings.mesh_select_mode"
- prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
+ prop = layout.operator("wm.context_set_value", text=_("Face"), icon='FACESEL')
prop.value = "(False, False, True)"
prop.data_path = "tool_settings.mesh_select_mode"
else:
- prop = layout.operator("wm.context_set_string", text="Vertex", icon='UV_VERTEXSEL')
+ prop = layout.operator("wm.context_set_string", text=_("Vertex"), icon='UV_VERTEXSEL')
prop.value = "VERTEX"
prop.data_path = "tool_settings.uv_select_mode"
- prop = layout.operator("wm.context_set_string", text="Edge", icon='UV_EDGESEL')
+ prop = layout.operator("wm.context_set_string", text=_("Edge"), icon='UV_EDGESEL')
prop.value = "EDGE"
prop.data_path = "tool_settings.uv_select_mode"
- prop = layout.operator("wm.context_set_string", text="Face", icon='UV_FACESEL')
+ prop = layout.operator("wm.context_set_string", text=_("Face"), icon='UV_FACESEL')
prop.value = "FACE"
prop.data_path = "tool_settings.uv_select_mode"
- prop = layout.operator("wm.context_set_string", text="Island", icon='UV_ISLANDSEL')
+ prop = layout.operator("wm.context_set_string", text=_("Island"), icon='UV_ISLANDSEL')
prop.value = "ISLAND"
prop.data_path = "tool_settings.uv_select_mode"
@@ -356,9 +357,9 @@ class IMAGE_HT_header(Header):
sub.menu("IMAGE_MT_select")
if ima and ima.is_dirty:
- sub.menu("IMAGE_MT_image", text="Image*")
+ sub.menu("IMAGE_MT_image", text=_("Image*"))
else:
- sub.menu("IMAGE_MT_image", text="Image")
+ sub.menu("IMAGE_MT_image", text=_("Image"))
if show_uvedit:
sub.menu("IMAGE_MT_uvs")
@@ -596,22 +597,22 @@ class IMAGE_PT_view_properties(Panel):
col = split.column()
if ima:
- col.prop(ima, "display_aspect", text="Aspect Ratio")
+ col.prop(ima, "display_aspect", text=_("Aspect Ratio"))
col = split.column()
- col.label(text="Coordinates:")
- col.prop(sima, "show_repeat", text="Repeat")
+ col.label(text=_("Coordinates:"))
+ col.prop(sima, "show_repeat", text=_("Repeat"))
if show_uvedit:
- col.prop(uvedit, "show_normalized_coords", text="Normalized")
+ col.prop(uvedit, "show_normalized_coords", text=_("Normalized"))
elif show_uvedit:
- col.label(text="Coordinates:")
- col.prop(uvedit, "show_normalized_coords", text="Normalized")
+ col.label(text=_("Coordinates:"))
+ col.prop(uvedit, "show_normalized_coords", text=_("Normalized"))
if show_uvedit:
col = layout.column()
- col.label("Cursor Location:")
+ col.label(_("Cursor Location:"))
col.row().prop(uvedit, "cursor_location", text="")
col.separator()
@@ -623,11 +624,11 @@ class IMAGE_PT_view_properties(Panel):
col = split.column()
col.prop(uvedit, "show_faces")
- col.prop(uvedit, "show_smooth_edges", text="Smooth")
- col.prop(uvedit, "show_modified_edges", text="Modified")
+ col.prop(uvedit, "show_smooth_edges", text=_("Smooth"))
+ col.prop(uvedit, "show_modified_edges", text=_("Modified"))
col = split.column()
- col.prop(uvedit, "show_stretch", text="Stretch")
+ col.prop(uvedit, "show_stretch", text=_("Stretch"))
sub = col.column()
sub.active = uvedit.show_stretch
sub.row().prop(uvedit, "draw_stretch_type", expand=True)
@@ -669,12 +670,12 @@ class IMAGE_PT_paint(Panel):
row.prop(brush, "jitter", slider=True)
row.prop(brush, "use_pressure_jitter", toggle=True, text="")
- col.prop(brush, "blend", text="Blend")
+ col.prop(brush, "blend", text=_("Blend"))
if brush.image_tool == 'CLONE':
col.separator()
- col.prop(brush, "clone_image", text="Image")
- col.prop(brush, "clone_alpha", text="Alpha")
+ col.prop(brush, "clone_image", text=_("Image"))
+ col.prop(brush, "clone_alpha", text=_("Alpha"))
class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
@@ -728,7 +729,7 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
layout.prop(brush, "use_space")
row = layout.row(align=True)
row.active = brush.use_space
- row.prop(brush, "spacing", text="Distance", slider=True)
+ row.prop(brush, "spacing", text=_("Distance"), slider=True)
row.prop(brush, "use_pressure_spacing", toggle=True, text="")
layout.prop(brush, "use_wrap")
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 7f5a5f231cf..3e6abaa8ea3 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Operator
+from blf import gettext as _
class INFO_HT_header(Header):
@@ -45,7 +46,7 @@ class INFO_HT_header(Header):
sub.menu("INFO_MT_help")
if window.screen.show_fullscreen:
- layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text="Back to Previous")
+ layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text=_("Back to Previous"))
layout.separator()
else:
layout.template_ID(context.window, "screen", new="screen.new", unlink="screen.delete")
@@ -73,11 +74,11 @@ class INFO_HT_header(Header):
"""
sinfo = context.space_data
row = layout.row(align=True)
- row.prop(sinfo, "show_report_debug", text="Debug")
- row.prop(sinfo, "show_report_info", text="Info")
- row.prop(sinfo, "show_report_operator", text="Operators")
- row.prop(sinfo, "show_report_warning", text="Warnings")
- row.prop(sinfo, "show_report_error", text="Errors")
+ row.prop(sinfo, "show_report_debug", text=_("Debug"))
+ row.prop(sinfo, "show_report_info", text=_("Info"))
+ row.prop(sinfo, "show_report_operator", text=_("Operators"))
+ row.prop(sinfo, "show_report_warning", text=_("Warnings"))
+ row.prop(sinfo, "show_report_error", text=_("Errors"))
row = layout.row()
row.enabled = sinfo.show_report_operator
@@ -106,25 +107,25 @@ class INFO_MT_file(Menu):
layout = self.layout
layout.operator_context = 'EXEC_AREA'
- layout.operator("wm.read_homefile", text="New", icon='NEW')
+ layout.operator("wm.read_homefile", text=_("New"), icon='NEW')
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
+ layout.operator("wm.open_mainfile", text=_("Open..."), icon='FILE_FOLDER')
layout.menu("INFO_MT_file_open_recent")
layout.operator("wm.recover_last_session", icon='RECOVER_LAST')
- layout.operator("wm.recover_auto_save", text="Recover Auto Save...")
+ layout.operator("wm.recover_auto_save", text=_("Recover Auto Save..."))
layout.separator()
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK').check_existing = False
+ layout.operator("wm.save_mainfile", text=_("Save"), icon='FILE_TICK').check_existing = False
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.save_as_mainfile", text="Save As...")
+ layout.operator("wm.save_as_mainfile", text=_("Save As..."))
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.save_as_mainfile", text="Save Copy...").copy = True
+ layout.operator("wm.save_as_mainfile", text=_("Save Copy...")).copy = True
layout.separator()
- layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES')
+ layout.operator("screen.userpref_show", text=_("User Preferences..."), icon='PREFERENCES')
layout.operator_context = 'EXEC_AREA'
layout.operator("wm.save_homefile")
@@ -133,8 +134,8 @@ class INFO_MT_file(Menu):
layout.separator()
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.link_append", text="Link")
- props = layout.operator("wm.link_append", text="Append")
+ layout.operator("wm.link_append", text=_("Link"))
+ props = layout.operator("wm.link_append", text=_("Append"))
props.link = False
props.instance_groups = False
@@ -150,7 +151,7 @@ class INFO_MT_file(Menu):
layout.separator()
layout.operator_context = 'EXEC_AREA'
- layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
+ layout.operator("wm.quit_blender", text=_("Quit"), icon='QUIT')
class INFO_MT_file_import(Menu):
@@ -177,8 +178,8 @@ class INFO_MT_file_external_data(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("file.pack_all", text="Pack into .blend file")
- layout.operator("file.unpack_all", text="Unpack into Files")
+ layout.operator("file.pack_all", text=_("Pack into .blend file"))
+ layout.operator("file.unpack_all", text=_("Unpack into Files"))
layout.separator()
@@ -196,17 +197,17 @@ class INFO_MT_mesh_add(Menu):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane")
- layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube")
- layout.operator("mesh.primitive_circle_add", icon='MESH_CIRCLE', text="Circle")
- layout.operator("mesh.primitive_uv_sphere_add", icon='MESH_UVSPHERE', text="UV Sphere")
- layout.operator("mesh.primitive_ico_sphere_add", icon='MESH_ICOSPHERE', text="Icosphere")
- layout.operator("mesh.primitive_cylinder_add", icon='MESH_CYLINDER', text="Cylinder")
- layout.operator("mesh.primitive_cone_add", icon='MESH_CONE', text="Cone")
+ layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text=_("Plane"))
+ layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text=_("Cube"))
+ layout.operator("mesh.primitive_circle_add", icon='MESH_CIRCLE', text=_("Circle"))
+ layout.operator("mesh.primitive_uv_sphere_add", icon='MESH_UVSPHERE', text=_("UV Sphere"))
+ layout.operator("mesh.primitive_ico_sphere_add", icon='MESH_ICOSPHERE', text=_("Icosphere"))
+ layout.operator("mesh.primitive_cylinder_add", icon='MESH_CYLINDER', text=_("Cylinder"))
+ layout.operator("mesh.primitive_cone_add", icon='MESH_CONE', text=_("Cone"))
layout.separator()
- layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text="Grid")
- layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text="Monkey")
- layout.operator("mesh.primitive_torus_add", text="Torus", icon='MESH_TORUS')
+ layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text=_("Grid"))
+ layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text=_("Monkey"))
+ layout.operator("mesh.primitive_torus_add", text=_("Torus"), icon='MESH_TORUS')
class INFO_MT_curve_add(Menu):
@@ -217,11 +218,11 @@ class INFO_MT_curve_add(Menu):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
- layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
- layout.operator("curve.primitive_nurbs_curve_add", icon='CURVE_NCURVE', text="Nurbs Curve")
- layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text="Nurbs Circle")
- layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path")
+ layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text=_("Bezier"))
+ layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text=_("Circle"))
+ layout.operator("curve.primitive_nurbs_curve_add", icon='CURVE_NCURVE', text=_("Nurbs Curve"))
+ layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text=_("Nurbs Circle"))
+ layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text=_("Path"))
class INFO_MT_edit_curve_add(Menu):
@@ -248,12 +249,12 @@ class INFO_MT_surface_add(Menu):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
- layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
- layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text="NURBS Surface")
- layout.operator("surface.primitive_nurbs_surface_cylinder_add", icon='SURFACE_NCYLINDER', text="NURBS Cylinder")
- layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
- layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus")
+ layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text=_("NURBS Curve"))
+ layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text=_("NURBS Circle"))
+ layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text=_("NURBS Surface"))
+ layout.operator("surface.primitive_nurbs_surface_cylinder_add", icon='SURFACE_NCYLINDER', text=_("NURBS Cylinder"))
+ layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text=_("NURBS Sphere"))
+ layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text=_("NURBS Torus"))
class INFO_MT_armature_add(Menu):
@@ -264,7 +265,7 @@ class INFO_MT_armature_add(Menu):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
+ layout.operator("object.armature_add", text=_("Single Bone"), icon='BONE_DATA')
class INFO_MT_add(Menu):
@@ -275,39 +276,39 @@ class INFO_MT_add(Menu):
layout.operator_context = 'EXEC_SCREEN'
- #layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH')
+ #layout.operator_menu_enum("object.mesh_add", "type", text=_("Mesh"), icon='OUTLINER_OB_MESH')
layout.menu("INFO_MT_mesh_add", icon='OUTLINER_OB_MESH')
- #layout.operator_menu_enum("object.curve_add", "type", text="Curve", icon='OUTLINER_OB_CURVE')
+ #layout.operator_menu_enum("object.curve_add", "type", text=_("Curve"), icon='OUTLINER_OB_CURVE')
layout.menu("INFO_MT_curve_add", icon='OUTLINER_OB_CURVE')
- #layout.operator_menu_enum("object.surface_add", "type", text="Surface", icon='OUTLINER_OB_SURFACE')
+ #layout.operator_menu_enum("object.surface_add", "type", text=_("Surface"), icon='OUTLINER_OB_SURFACE')
layout.menu("INFO_MT_surface_add", icon='OUTLINER_OB_SURFACE')
- layout.operator_menu_enum("object.metaball_add", "type", text="Metaball", icon='OUTLINER_OB_META')
+ layout.operator_menu_enum("object.metaball_add", "type", text=_("Metaball"), icon='OUTLINER_OB_META')
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
+ layout.operator("object.text_add", text=_("Text"), icon='OUTLINER_OB_FONT')
layout.separator()
layout.menu("INFO_MT_armature_add", icon='OUTLINER_OB_ARMATURE')
- layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
- layout.operator("object.add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
+ layout.operator("object.add", text=_("Lattice"), icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
+ layout.operator("object.add", text=_("Empty"), icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
layout.separator()
- layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')
+ layout.operator("object.speaker_add", text=_("Speaker"), icon='OUTLINER_OB_SPEAKER')
layout.separator()
- layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
+ layout.operator("object.camera_add", text=_("Camera"), icon='OUTLINER_OB_CAMERA')
layout.operator_context = 'EXEC_SCREEN'
- layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
+ layout.operator_menu_enum("object.lamp_add", "type", text=_("Lamp"), icon='OUTLINER_OB_LAMP')
layout.separator()
- layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY')
+ layout.operator_menu_enum("object.effector_add", "type", text=_("Force Field"), icon='OUTLINER_OB_EMPTY')
layout.separator()
if(len(bpy.data.groups) > 10):
layout.operator_context = 'INVOKE_DEFAULT'
- layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_EMPTY')
+ layout.operator("object.group_instance_add", text=_("Group Instance..."), icon='OUTLINER_OB_EMPTY')
else:
- layout.operator_menu_enum("object.group_instance_add", "group", text="Group Instance", icon='OUTLINER_OB_EMPTY')
+ layout.operator_menu_enum("object.group_instance_add", "group", text=_("Group Instance"), icon='OUTLINER_OB_EMPTY')
class INFO_MT_game(Menu):
@@ -337,13 +338,13 @@ class INFO_MT_render(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("render.render", text="Render Image", icon='RENDER_STILL')
- layout.operator("render.render", text="Render Animation", icon='RENDER_ANIMATION').animation = True
+ layout.operator("render.render", text=_("Render Image"), icon='RENDER_STILL')
+ layout.operator("render.render", text=_("Render Animation"), icon='RENDER_ANIMATION').animation = True
layout.separator()
- layout.operator("render.opengl", text="OpenGL Render Image")
- layout.operator("render.opengl", text="OpenGL Render Animation").animation = True
+ layout.operator("render.opengl", text=_("OpenGL Render Image"))
+ layout.operator("render.opengl", text=_("OpenGL Render Animation")).animation = True
layout.separator()
@@ -359,27 +360,28 @@ class INFO_MT_help(Menu):
layout = self.layout
- layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
- layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-259/'
+ layout.operator("wm.url_open", text=_("Manual"), icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
+ layout.operator("wm.url_open", text=_("Release Log"), icon='URL').url = 'http://www.blender.org/development/release-logs/blender-259/'
layout.separator()
- layout.operator("wm.url_open", text="Blender Website", icon='URL').url = 'http://www.blender.org/'
- layout.operator("wm.url_open", text="Blender e-Shop", icon='URL').url = 'http://www.blender.org/e-shop'
- layout.operator("wm.url_open", text="Developer Community", icon='URL').url = 'http://www.blender.org/community/get-involved/'
- layout.operator("wm.url_open", text="User Community", icon='URL').url = 'http://www.blender.org/community/user-community/'
+ layout.operator("wm.url_open", text=_("Blender Website"), icon='URL').url = 'http://www.blender.org/'
+ layout.operator("wm.url_open", text=_("Blender e-Shop"), icon='URL').url = 'http://www.blender.org/e-shop'
+ layout.operator("wm.url_open", text=_("Developer Community"), icon='URL').url = 'http://www.blender.org/community/get-involved/'
+ layout.operator("wm.url_open", text=_("User Community"), icon='URL').url = 'http://www.blender.org/community/user-community/'
layout.separator()
- layout.operator("wm.url_open", text="Report a Bug", icon='URL').url = 'http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse'
+ layout.operator("wm.url_open", text=_("Report a Bug"), icon='URL').url = 'http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse'
layout.separator()
- layout.operator("wm.url_open", text="Python API Reference", icon='URL').url = bpy.types.WM_OT_doc_view._prefix
+ layout.operator("wm.url_open", text=_("Python API Reference"), icon='URL').url = bpy.types.WM_OT_doc_view._prefix
layout.operator("help.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("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')
diff --git a/release/scripts/startup/bl_ui/space_logic.py b/release/scripts/startup/bl_ui/space_logic.py
index 869a91124d3..b1149913d17 100644
--- a/release/scripts/startup/bl_ui/space_logic.py
+++ b/release/scripts/startup/bl_ui/space_logic.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from blf import gettext as _
class LOGIC_PT_properties(Panel):
@@ -37,7 +38,7 @@ class LOGIC_PT_properties(Panel):
ob = context.active_object
game = ob.game
- layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN')
+ layout.operator("object.game_property_new", text=_("Add Game Property"), icon='ZOOMIN')
for i, prop in enumerate(game.properties):
@@ -56,9 +57,9 @@ class LOGIC_MT_logicbricks_add(Menu):
def draw(self, context):
layout = self.layout
- layout.operator_menu_enum("logic.sensor_add", "type", text="Sensor")
- layout.operator_menu_enum("logic.controller_add", "type", text="Controller")
- layout.operator_menu_enum("logic.actuator_add", "type", text="Actuator")
+ layout.operator_menu_enum("logic.sensor_add", "type", text=_("Sensor"))
+ layout.operator_menu_enum("logic.controller_add", "type", text=_("Controller"))
+ layout.operator_menu_enum("logic.actuator_add", "type", text=_("Actuator"))
class LOGIC_HT_header(Header):
diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py
index ffead81c507..8a4b0a61291 100644
--- a/release/scripts/startup/bl_ui/space_nla.py
+++ b/release/scripts/startup/bl_ui/space_nla.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Header, Menu
+from blf import gettext as _
class NLA_HT_header(Header):
@@ -62,7 +63,7 @@ class NLA_MT_view(Menu):
layout.prop(st, "use_realtime_update")
layout.prop(st, "show_frame_indicator")
- layout.operator("anim.time_toggle", text="Show Frames" if st.show_seconds else "Show Seconds")
+ layout.operator("anim.time_toggle", text=_("Show Frames") if st.show_seconds else _("Show Seconds"))
layout.prop(st, "show_strip_curves")
@@ -87,33 +88,33 @@ class NLA_MT_select(Menu):
# This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
layout.operator("nla.select_all_toggle")
- layout.operator("nla.select_all_toggle", text="Invert Selection").invert = True
+ layout.operator("nla.select_all_toggle", text=_("Invert Selection")).invert = True
layout.separator()
layout.operator("nla.select_border")
- layout.operator("nla.select_border", text="Border Axis Range").axis_range = True
+ layout.operator("nla.select_border", text=_("Border Axis Range")).axis_range = True
layout.separator()
- layout.operator("nla.select_leftright", text="Before Current Frame").mode = 'LEFT'
- layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT'
+ layout.operator("nla.select_leftright", text=_("Before Current Frame")).mode = 'LEFT'
+ layout.operator("nla.select_leftright", text=_("After Current Frame")).mode = 'RIGHT'
class NLA_MT_marker(Menu):
- bl_label = "Marker"
+ bl_label = _("Marker")
def draw(self, context):
layout = self.layout
#layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("marker.add", "Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
+ layout.operator("marker.add", _("Add Marker"))
+ layout.operator("marker.duplicate", text=_("Duplicate Marker"))
+ layout.operator("marker.delete", text=_("Delete Marker"))
layout.separator()
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
+ layout.operator("marker.rename", text=_("Rename Marker"))
+ layout.operator("marker.move", text=_("Grab/Move Marker"))
class NLA_MT_edit(Menu):
@@ -124,9 +125,9 @@ class NLA_MT_edit(Menu):
scene = context.scene
- layout.menu("NLA_MT_edit_transform", text="Transform")
+ layout.menu("NLA_MT_edit_transform", text=_("Transform"))
- layout.operator_menu_enum("nla.snap", "type", text="Snap")
+ layout.operator_menu_enum("nla.snap", "type", text=_("Snap"))
layout.separator()
layout.operator("nla.duplicate")
@@ -148,14 +149,14 @@ class NLA_MT_edit(Menu):
# TODO: this really belongs more in a "channel" (or better, "track") menu
layout.separator()
- layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...")
+ layout.operator_menu_enum("anim.channels_move", "direction", text=_("Track Ordering..."))
layout.separator()
# TODO: names of these tools for 'tweakmode' need changing?
if scene.is_nla_tweakmode:
- layout.operator("nla.tweakmode_exit", text="Stop Tweaking Strip Actions")
+ layout.operator("nla.tweakmode_exit", text=_("Stop Tweaking Strip Actions"))
else:
- layout.operator("nla.tweakmode_enter", text="Start Tweaking Strip Actions")
+ layout.operator("nla.tweakmode_enter", text=_("Start Tweaking Strip Actions"))
class NLA_MT_add(Menu):
@@ -174,7 +175,7 @@ class NLA_MT_add(Menu):
layout.separator()
layout.operator("nla.tracks_add")
- layout.operator("nla.tracks_add", text="Add Tracks Above Selected").above_selected = True
+ layout.operator("nla.tracks_add", text=_("Add Tracks Above Selected")).above_selected = True
class NLA_MT_edit_transform(Menu):
@@ -183,9 +184,9 @@ class NLA_MT_edit_transform(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("transform.translate", text="Grab/Move")
- layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
- layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE'
+ layout.operator("transform.translate", text=_("Grab/Move"))
+ layout.operator("transform.transform", text=_("Extend")).mode = 'TIME_EXTEND'
+ layout.operator("transform.transform", text=_("Scale")).mode = 'TIME_SCALE'
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index 708017ba749..0808ddf769a 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from blf import gettext as _
class NODE_HT_header(Header):
@@ -61,7 +62,7 @@ class NODE_HT_header(Header):
elif snode.tree_type == 'COMPOSITING':
layout.prop(snode_id, "use_nodes")
- layout.prop(snode_id.render, "use_free_unused_nodes", text="Free Unused")
+ layout.prop(snode_id.render, "use_free_unused_nodes", text=_("Free Unused"))
layout.prop(snode, "show_backdrop")
if snode.show_backdrop:
row = layout.row(align=True)
@@ -92,9 +93,9 @@ class NODE_MT_view(Menu):
if context.space_data.show_backdrop:
layout.separator()
- layout.operator("node.backimage_move", text="Backdrop move")
- layout.operator("node.backimage_zoom", text="Backdrop zoom in").factor = 1.2
- layout.operator("node.backimage_zoom", text="Backdrop zoom out").factor = 0.833
+ layout.operator("node.backimage_move", text=_("Backdrop move"))
+ layout.operator("node.backimage_zoom", text=_("Backdrop zoom in")).factor = 1.2
+ layout.operator("node.backimage_zoom", text=_("Backdrop zoom out")).factor = 0.833
layout.separator()
@@ -137,7 +138,7 @@ class NODE_MT_node(Menu):
layout.separator()
layout.operator("node.link_make")
- layout.operator("node.link_make", text="Make and Replace Links").replace = True
+ layout.operator("node.link_make", text=_("Make and Replace Links")).replace = True
layout.operator("node.links_cut")
layout.separator()
@@ -180,13 +181,13 @@ class NODE_PT_properties(Panel):
snode = context.space_data
layout.active = snode.show_backdrop
layout.prop(snode, "backdrop_channels", text="")
- layout.prop(snode, "backdrop_zoom", text="Zoom")
+ layout.prop(snode, "backdrop_zoom", text=_("Zoom"))
col = layout.column(align=True)
- col.label(text="Offset:")
+ col.label(text=_("Offset:"))
col.prop(snode, "backdrop_x", text="X")
col.prop(snode, "backdrop_y", text="Y")
- col.operator("node.backimage_move", text="Move")
+ col.operator("node.backimage_move", text=_("Move"))
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 36f606da635..a9a5eae3179 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from blf import gettext as _
def act_strip(context):
@@ -64,9 +65,9 @@ class SEQUENCER_HT_header(Header):
elif st.view_type == 'SEQUENCER_PREVIEW':
layout.separator()
layout.operator("sequencer.refresh_all")
- layout.prop(st, "display_channel", text="Channel")
+ layout.prop(st, "display_channel", text=_("Channel"))
else:
- layout.prop(st, "display_channel", text="Channel")
+ layout.prop(st, "display_channel", text=_("Channel"))
ed = context.scene.sequence_editor
if ed:
@@ -101,11 +102,11 @@ class SEQUENCER_MT_view(Menu):
layout.separator()
if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
- layout.operator("sequencer.view_all", text='View all Sequences')
+ layout.operator("sequencer.view_all", text=_('View all Sequences'))
if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}:
layout.operator_context = 'INVOKE_REGION_PREVIEW'
- layout.operator("sequencer.view_all_preview", text='Fit preview in window')
- layout.operator("sequencer.view_zoom_ratio", text='Show preview 1:1').ratio = 1.0
+ layout.operator("sequencer.view_all_preview", text=_('Fit preview in window'))
+ layout.operator("sequencer.view_zoom_ratio", text=_('Show preview 1:1')).ratio = 1.0
layout.operator_context = 'INVOKE_DEFAULT'
# # XXX, invokes in the header view
@@ -114,9 +115,9 @@ class SEQUENCER_MT_view(Menu):
layout.operator("sequencer.view_selected")
if st.show_frames:
- layout.operator("anim.time_toggle", text="Show Seconds")
+ layout.operator("anim.time_toggle", text=_("Show Seconds"))
else:
- layout.operator("anim.time_toggle", text="Show Frames")
+ layout.operator("anim.time_toggle", text=_("Show Frames"))
layout.prop(st, "show_frame_indicator")
if st.display_mode == 'IMAGE':
@@ -138,12 +139,12 @@ class SEQUENCER_MT_select(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT'
- layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT'
+ layout.operator("sequencer.select_active_side", text=_("Strips to the Left")).side = 'LEFT'
+ layout.operator("sequencer.select_active_side", text=_("Strips to the Right")).side = 'RIGHT'
layout.separator()
- layout.operator("sequencer.select_handles", text="Surrounding Handles").side = 'BOTH'
- layout.operator("sequencer.select_handles", text="Left Handle").side = 'LEFT'
- layout.operator("sequencer.select_handles", text="Right Handle").side = 'RIGHT'
+ layout.operator("sequencer.select_handles", text=_("Surrounding Handles")).side = 'BOTH'
+ layout.operator("sequencer.select_handles", text=_("Left Handle")).side = 'LEFT'
+ layout.operator("sequencer.select_handles", text=_("Right Handle")).side = 'RIGHT'
layout.separator()
layout.operator("sequencer.select_linked")
layout.operator("sequencer.select_all_toggle")
@@ -158,14 +159,14 @@ class SEQUENCER_MT_marker(Menu):
#layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("marker.add", "Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
+ layout.operator("marker.add", _("Add Marker"))
+ layout.operator("marker.duplicate", text=_("Duplicate Marker"))
+ layout.operator("marker.delete", text=_("Delete Marker"))
layout.separator()
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
+ layout.operator("marker.rename", text=_("Rename Marker"))
+ layout.operator("marker.move", text=_("Grab/Move Marker"))
#layout.operator("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
@@ -180,7 +181,7 @@ class SEQUENCER_MT_change(Menu):
layout.operator_menu_enum("sequencer.change_effect_input", "swap")
layout.operator_menu_enum("sequencer.change_effect_type", "type")
- layout.operator("sequencer.change_path", text="Path/Files")
+ layout.operator("sequencer.change_path", text=_("Path/Files"))
class SEQUENCER_MT_add(Menu):
@@ -192,13 +193,13 @@ class SEQUENCER_MT_add(Menu):
if len(bpy.data.scenes) > 10:
layout.operator_context = 'INVOKE_DEFAULT'
- layout.operator("sequencer.scene_strip_add", text="Scene...")
+ layout.operator("sequencer.scene_strip_add", text=_("Scene..."))
else:
- layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene...")
+ layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text=_("Scene..."))
- layout.operator("sequencer.movie_strip_add", text="Movie")
- layout.operator("sequencer.image_strip_add", text="Image")
- layout.operator("sequencer.sound_strip_add", text="Sound")
+ layout.operator("sequencer.movie_strip_add", text=_("Movie"))
+ layout.operator("sequencer.image_strip_add", text=_("Image"))
+ layout.operator("sequencer.sound_strip_add", text=_("Sound"))
layout.menu("SEQUENCER_MT_add_effect")
@@ -210,22 +211,22 @@ class SEQUENCER_MT_add_effect(Menu):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("sequencer.effect_strip_add", text="Add").type = 'ADD'
- layout.operator("sequencer.effect_strip_add", text="Subtract").type = 'SUBTRACT'
- layout.operator("sequencer.effect_strip_add", text="Alpha Over").type = 'ALPHA_OVER'
- layout.operator("sequencer.effect_strip_add", text="Alpha Under").type = 'ALPHA_UNDER'
- layout.operator("sequencer.effect_strip_add", text="Cross").type = 'CROSS'
- 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'
- layout.operator("sequencer.effect_strip_add", text="Color").type = 'COLOR'
- layout.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED'
- layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM'
- layout.operator("sequencer.effect_strip_add", text="Adjustment Layer").type = 'ADJUSTMENT'
+ layout.operator("sequencer.effect_strip_add", text=_("Add")).type = 'ADD'
+ layout.operator("sequencer.effect_strip_add", text=_("Subtract")).type = 'SUBTRACT'
+ layout.operator("sequencer.effect_strip_add", text=_("Alpha Over")).type = 'ALPHA_OVER'
+ layout.operator("sequencer.effect_strip_add", text=_("Alpha Under")).type = 'ALPHA_UNDER'
+ layout.operator("sequencer.effect_strip_add", text=_("Cross")).type = 'CROSS'
+ 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'
+ layout.operator("sequencer.effect_strip_add", text=_("Color")).type = 'COLOR'
+ layout.operator("sequencer.effect_strip_add", text=_("Speed Control")).type = 'SPEED'
+ layout.operator("sequencer.effect_strip_add", text=_("Multicam Selector")).type = 'MULTICAM'
+ layout.operator("sequencer.effect_strip_add", text=_("Adjustment Layer")).type = 'ADJUSTMENT'
class SEQUENCER_MT_strip(Menu):
@@ -236,13 +237,13 @@ class SEQUENCER_MT_strip(Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("transform.transform", text="Grab/Move").mode = 'TRANSLATION'
- layout.operator("transform.transform", text="Grab/Extend from frame").mode = 'TIME_EXTEND'
+ layout.operator("transform.transform", text=_("Grab/Move")).mode = 'TRANSLATION'
+ layout.operator("transform.transform", text=_("Grab/Extend from frame")).mode = 'TIME_EXTEND'
# uiItemO(layout, NULL, 0, "sequencer.strip_snap"); // TODO - add this operator
layout.separator()
- layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD'
- layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT'
+ layout.operator("sequencer.cut", text=_("Cut (hard) at frame")).type = 'HARD'
+ layout.operator("sequencer.cut", text=_("Cut (soft) at frame")).type = 'SOFT'
layout.operator("sequencer.images_separate")
layout.operator("sequencer.offset_clear")
layout.operator("sequencer.deinterlace_selected_movies")
@@ -296,7 +297,7 @@ class SEQUENCER_MT_strip(Menu):
layout.operator("sequencer.mute")
layout.operator("sequencer.unmute")
- layout.operator("sequencer.mute", text="Mute Deselected Strips").unselected = True
+ layout.operator("sequencer.mute", text=_("Mute Deselected Strips")).unselected = True
layout.operator("sequencer.snap")
@@ -344,21 +345,21 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
strip = act_strip(context)
split = layout.split(percentage=0.3)
- split.label(text="Name:")
+ split.label(text=_("Name:"))
split.prop(strip, "name", text="")
split = layout.split(percentage=0.3)
- split.label(text="Type:")
+ split.label(text=_("Type:"))
split.prop(strip, "type", text="")
split = layout.split(percentage=0.3)
- split.label(text="Blend:")
+ split.label(text=_("Blend:"))
split.prop(strip, "blend_type", text="")
row = layout.row(align=True)
sub = row.row()
sub.active = (not strip.mute)
- sub.prop(strip, "blend_alpha", text="Opacity", slider=True)
+ sub.prop(strip, "blend_alpha", text=_("Opacity"), slider=True)
row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="")
@@ -371,13 +372,13 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
col = layout.column(align=True)
row = col.row()
- row.label(text="Final Length: %s" % bpy.utils.smpte_from_frame(strip.frame_final_duration))
+ row.label(text=_("Final Length")+": %s" % bpy.utils.smpte_from_frame(strip.frame_final_duration))
row = col.row()
row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
- row.label(text="Playhead: %d" % (frame_current - strip.frame_start))
+ row.label(text=_("Playhead")+": %d" % (frame_current - strip.frame_start))
- col.label(text="Frame Offset %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
- col.label(text="Frame Still %d:%d" % (strip.frame_still_start, strip.frame_still_end))
+ col.label(text=_("Frame Offset")+" %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
+ col.label(text=_("Frame Still")+" %d:%d" % (strip.frame_still_start, strip.frame_still_end))
elem = False
@@ -387,9 +388,9 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
elem = strip.elements[0]
if elem and elem.orig_width > 0 and elem.orig_height > 0:
- col.label(text="Orig Dim: %dx%d" % (elem.orig_width, elem.orig_height))
+ col.label(text=_("Orig Dim")+": %dx%d" % (elem.orig_width, elem.orig_height))
else:
- col.label(text="Orig Dim: None")
+ col.label(text=_("Orig Dim: None"))
class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
@@ -429,7 +430,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col = layout.column()
col.prop(strip, "transition_type")
- col.label(text="Direction:")
+ col.label(text=_("Direction:"))
col.row().prop(strip, "direction", expand=True)
col = layout.column()
@@ -449,13 +450,13 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
row.prop(strip, "use_only_boost")
elif strip.type == 'SPEED':
- layout.prop(strip, "use_default_fade", "Stretch to input strip length")
+ layout.prop(strip, "use_default_fade", _("Stretch to input strip length"))
if not strip.use_default_fade:
layout.prop(strip, "use_as_speed")
if strip.use_as_speed:
layout.prop(strip, "speed_factor")
else:
- layout.prop(strip, "speed_factor", text="Frame number")
+ layout.prop(strip, "speed_factor", text=_("Frame number"))
layout.prop(strip, "scale_to_length")
#doesn't work currently
@@ -473,7 +474,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY')
- row.label("Cut To")
+ row.label(_("Cut To"))
for i in range(1, strip.channel):
row.operator("sequencer.cut_multicam", text=str(i)).camera = i
@@ -481,17 +482,17 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
if strip.type == 'SPEED':
col.prop(strip, "multiply_speed")
elif strip.type in {'CROSS', 'GAMMA_CROSS', 'PLUGIN', 'WIPE'}:
- col.prop(strip, "use_default_fade", "Default fade")
+ col.prop(strip, "use_default_fade", _("Default fade"))
if not strip.use_default_fade:
- col.prop(strip, "effect_fader", text="Effect fader")
+ col.prop(strip, "effect_fader", text=_("Effect fader"))
- layout.prop(strip, "use_translation", text="Image Offset:")
+ layout.prop(strip, "use_translation", text=_("Image Offset:"))
if strip.use_translation:
col = layout.column(align=True)
col.prop(strip.transform, "offset_x", text="X")
col.prop(strip.transform, "offset_y", text="Y")
- layout.prop(strip, "use_crop", text="Image Crop:")
+ layout.prop(strip, "use_crop", text=_("Image Crop:"))
if strip.use_crop:
col = layout.column(align=True)
col.prop(strip.crop, "max_y")
@@ -506,7 +507,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col.prop(strip, "interpolation")
col.prop(strip, "translation_unit")
col = layout.column(align=True)
- col.label(text="Position:")
+ col.label(text=_("Position:"))
col.prop(strip, "translate_start_x", text="X")
col.prop(strip, "translate_start_y", text="Y")
@@ -516,18 +517,18 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col.prop(strip, "use_uniform_scale")
if (strip.use_uniform_scale):
col = layout.column(align=True)
- col.prop(strip, "scale_start_x", text="Scale")
+ col.prop(strip, "scale_start_x", text=_("Scale"))
else:
col = layout.column(align=True)
- col.label(text="Scale:")
+ col.label(text=_("Scale:"))
col.prop(strip, "scale_start_x", text="X")
col.prop(strip, "scale_start_y", text="Y")
layout.separator()
col = layout.column(align=True)
- col.label(text="Rotation:")
- col.prop(strip, "rotation_start", text="Rotation")
+ col.label(text=_("Rotation:"))
+ col.prop(strip, "rotation_start", text=_("Rotation"))
class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
@@ -560,7 +561,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
if seq_type == 'IMAGE':
split = layout.split(percentage=0.2)
col = split.column()
- col.label(text="Path:")
+ col.label(text=_("Path:"))
col = split.column()
col.prop(strip, "directory", text="")
@@ -570,7 +571,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
if elem:
split = layout.split(percentage=0.2)
col = split.column()
- col.label(text="File:")
+ col.label(text=_("File:"))
col = split.column()
col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback
@@ -580,22 +581,22 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
elif seq_type == 'MOVIE':
split = layout.split(percentage=0.2)
col = split.column()
- col.label(text="Path:")
+ col.label(text=_("Path:"))
col = split.column()
col.prop(strip, "filepath", text="")
- col.prop(strip, "mpeg_preseek", text="MPEG Preseek")
- col.prop(strip, "streamindex", text="Stream Index")
+ col.prop(strip, "mpeg_preseek", text=_("MPEG Preseek"))
+ col.prop(strip, "streamindex", text=_("Stream Index"))
# TODO, sound???
# end drawing filename
- layout.prop(strip, "use_translation", text="Image Offset:")
+ layout.prop(strip, "use_translation", text=_("Image Offset:"))
if strip.use_translation:
col = layout.column(align=True)
col.prop(strip.transform, "offset_x", text="X")
col.prop(strip.transform, "offset_y", text="Y")
- layout.prop(strip, "use_crop", text="Image Crop:")
+ layout.prop(strip, "use_crop", text=_("Image Crop:"))
if strip.use_crop:
col = layout.column(align=True)
col.prop(strip.crop, "max_y")
@@ -605,14 +606,14 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
if not isinstance(strip, bpy.types.EffectSequence):
col = layout.column(align=True)
- col.label(text="Trim Duration (hard):")
- col.prop(strip, "animation_offset_start", text="Start")
- col.prop(strip, "animation_offset_end", text="End")
+ col.label(text=_("Trim Duration (hard):"))
+ col.prop(strip, "animation_offset_start", text=_("Start"))
+ col.prop(strip, "animation_offset_end", text=_("End"))
col = layout.column(align=True)
- col.label(text="Trim Duration (soft):")
- col.prop(strip, "frame_offset_start", text="Start")
- col.prop(strip, "frame_offset_end", text="End")
+ col.label(text=_("Trim Duration (soft):"))
+ col.prop(strip, "frame_offset_start", text=_("Start"))
+ col.prop(strip, "frame_offset_end", text=_("End"))
class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
@@ -641,9 +642,9 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
row = layout.row()
if strip.sound.packed_file:
- row.operator("sound.unpack", icon='PACKAGE', text="Unpack")
+ row.operator("sound.unpack", icon='PACKAGE', text=_("Unpack"))
else:
- row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack")
+ row.operator("sound.pack", icon='UGLYPACKAGE', text=_("Pack"))
row.prop(strip.sound, "use_memory_cache")
@@ -654,8 +655,8 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, Panel):
col = layout.column(align=True)
col.label(text="Trim Duration:")
- col.prop(strip, "animation_offset_start", text="Start")
- col.prop(strip, "animation_offset_end", text="End")
+ col.prop(strip, "animation_offset_start", text=_("Start"))
+ col.prop(strip, "animation_offset_end", text=_("End"))
class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
@@ -683,13 +684,13 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
if scene:
layout.prop(scene.render, "use_sequencer")
- layout.label(text="Camera Override")
+ layout.label(text=_("Camera Override"))
layout.template_ID(strip, "scene_camera")
if scene:
sta = scene.frame_start
end = scene.frame_end
- layout.label(text="Original frame range: %d-%d (%d)" % (sta, end, end - sta + 1))
+ layout.label(text=_("Original frame range")+": %d-%d (%d)" % (sta, end, end - sta + 1))
class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
@@ -717,22 +718,22 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
strip = act_strip(context)
col = layout.column()
- col.label(text="Video:")
+ col.label(text=_("Video:"))
col.prop(strip, "strobe")
row = layout.row()
- row.label(text="Flip:")
+ row.label(text=_("Flip:"))
row.prop(strip, "use_flip_x", text="X")
row.prop(strip, "use_flip_y", text="Y")
col = layout.column()
- col.prop(strip, "use_reverse_frames", text="Backwards")
+ col.prop(strip, "use_reverse_frames", text=_("Backwards"))
col.prop(strip, "use_deinterlace")
col = layout.column()
- col.label(text="Colors:")
- col.prop(strip, "color_saturation", text="Saturation")
- col.prop(strip, "color_multiply", text="Multiply")
+ col.label(text=_("Colors:"))
+ col.prop(strip, "color_saturation", text=_("Saturation"))
+ col.prop(strip, "color_multiply", text=_("Multiply"))
col.prop(strip, "use_premultiply")
col.prop(strip, "use_float")
@@ -743,15 +744,15 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
col = row.column()
col.template_color_wheel(strip.color_balance, "lift", value_slider=False, cubic=True)
col.row().prop(strip.color_balance, "lift")
- col.prop(strip.color_balance, "invert_lift", text="Inverse")
+ col.prop(strip.color_balance, "invert_lift", text=_("Inverse"))
col = row.column()
col.template_color_wheel(strip.color_balance, "gamma", value_slider=False, lock_luminosity=True, cubic=True)
col.row().prop(strip.color_balance, "gamma")
- col.prop(strip.color_balance, "invert_gamma", text="Inverse")
+ col.prop(strip.color_balance, "invert_gamma", text=_("Inverse"))
col = row.column()
col.template_color_wheel(strip.color_balance, "gain", value_slider=False, lock_luminosity=True, cubic=True)
col.row().prop(strip.color_balance, "gain")
- col.prop(strip.color_balance, "invert_gain", text="Inverse")
+ col.prop(strip.color_balance, "invert_gain", text=_("Inverse"))
class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
@@ -794,18 +795,18 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
row.prop(strip.proxy, "build_100")
col = layout.column()
- col.label(text="Build JPEG quality")
+ col.label(text=_("Build JPEG quality"))
col.prop(strip.proxy, "quality")
if strip.type == "MOVIE":
col = layout.column()
- col.label(text="Use timecode index:")
+ col.label(text=_("Use timecode index:"))
col.prop(strip.proxy, "timecode")
class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
- bl_label = "Scene Preview/Render"
+ bl_label = _("Scene Preview/Render")
bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI'
@@ -815,7 +816,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
col = layout.column()
col.active = False # Currently only opengl preview works!
- col.prop(render, "use_sequencer_gl_preview", text="Open GL Preview")
+ col.prop(render, "use_sequencer_gl_preview", text=_("Open GL Preview"))
col = layout.column()
#col.active = render.use_sequencer_gl_preview
col.prop(render, "sequencer_gl_preview", text="")
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index 12e07c19ca1..cd72d42857b 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -19,6 +19,7 @@
# <pep8-80 compliant>
import bpy
from bpy.types import Header, Menu, Panel
+from blf import gettext as _
class TEXT_HT_header(Header):
@@ -66,13 +67,13 @@ class TEXT_HT_header(Header):
row = layout.row()
if text.filepath:
if text.is_dirty:
- row.label(text="File: *%r (unsaved)" % text.filepath)
+ row.label(text=_("File")+": *%r " % text.filepath+_("(unsaved)"))
else:
- row.label(text="File: %r" % text.filepath)
+ row.label(text=_("File")+": %r" % text.filepath)
else:
- row.label(text="Text: External"
+ row.label(text=_("Text: External")
if text.library
- else "Text: Internal")
+ else _("Text: Internal"))
class TEXT_PT_properties(Panel):
@@ -136,8 +137,8 @@ class TEXT_PT_find(Panel):
# settings
layout.prop(st, "use_match_case")
row = layout.row()
- row.prop(st, "use_find_wrap", text="Wrap")
- row.prop(st, "use_find_all", text="All")
+ row.prop(st, "use_find_wrap", text=_("Wrap"))
+ row.prop(st, "use_find_all", text=_("All"))
class TEXT_MT_view(Menu):
@@ -156,10 +157,10 @@ class TEXT_MT_view(Menu):
layout.separator()
layout.operator("text.move",
- text="Top of File",
+ text=_("Top of File"),
).type = 'FILE_TOP'
layout.operator("text.move",
- text="Bottom of File",
+ text=_("Bottom of File"),
).type = 'FILE_BOTTOM'
@@ -248,10 +249,10 @@ class TEXT_MT_edit_to3d(Menu):
layout = self.layout
layout.operator("text.to_3d_object",
- text="One Object",
+ text=_("One Object"),
).split_lines = False
layout.operator("text.to_3d_object",
- text="One Object Per Line",
+ text=_("One Object Per Line"),
).split_lines = True
@@ -282,7 +283,7 @@ class TEXT_MT_edit(Menu):
layout.separator()
layout.operator("text.jump")
- layout.operator("text.properties", text="Find...")
+ layout.operator("text.properties", text=_("Find..."))
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 396ad035f31..afcc4d250e2 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu
+from blf import gettext as _
class TIME_HT_header(Header):
@@ -43,11 +44,11 @@ class TIME_HT_header(Header):
row = layout.row(align=True)
if not scene.use_preview_range:
- row.prop(scene, "frame_start", text="Start")
- row.prop(scene, "frame_end", text="End")
+ row.prop(scene, "frame_start", text=_("Start"))
+ row.prop(scene, "frame_end", text=_("End"))
else:
- row.prop(scene, "frame_preview_start", text="Start")
- row.prop(scene, "frame_preview_end", text="End")
+ row.prop(scene, "frame_preview_start", text=_("Start"))
+ row.prop(scene, "frame_preview_end", text=_("End"))
layout.prop(scene, "frame_current", text="")
@@ -143,14 +144,14 @@ class TIME_MT_frame(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("marker.add", text="Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
+ layout.operator("marker.add", text=_("Add Marker"))
+ layout.operator("marker.duplicate", text=_("Duplicate Marker"))
+ layout.operator("marker.delete", text=_("Delete Marker"))
layout.separator()
- layout.operator("marker.rename", text="Rename Marker")
- layout.operator("marker.move", text="Grab/Move Marker")
+ layout.operator("marker.rename", text=_("Rename Marker"))
+ layout.operator("marker.move", text=_("Grab/Move Marker"))
layout.separator()
@@ -182,8 +183,8 @@ class TIME_MT_playback(Menu):
layout.separator()
- layout.prop(scene, "use_frame_drop", text="Frame Dropping")
- layout.prop(scene, "use_audio_sync", text="AV-sync", icon='SPEAKER')
+ layout.prop(scene, "use_frame_drop", text=_("Frame Dropping"))
+ layout.prop(scene, "use_audio_sync", text=_("AV-sync"), icon='SPEAKER')
layout.prop(scene, "use_audio")
layout.prop(scene, "use_audio_scrub")
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 13edc3471d2..d0e7ae5e609 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -23,6 +23,7 @@ import os
import addon_utils
from bpy.props import StringProperty, BoolProperty, EnumProperty
+from blf import gettext as _
def ui_items_general(col, context):
@@ -65,10 +66,10 @@ def opengl_lamp_buttons(column, lamp):
col = split.column()
col.active = lamp.use
row = col.row()
- row.label(text="Diffuse:")
+ row.label(text=_("Diffuse:"))
row.prop(lamp, "diffuse_color", text="")
row = col.row()
- row.label(text="Specular:")
+ row.label(text=_("Specular:"))
row.prop(lamp, "specular_color", text="")
col = split.column()
@@ -86,7 +87,7 @@ class USERPREF_HT_header(Header):
userpref = context.user_preferences
layout.operator_context = 'EXEC_AREA'
- layout.operator("wm.save_homefile", text="Save As Default")
+ layout.operator("wm.save_homefile", text=_("Save As Default"))
layout.operator_context = 'INVOKE_DEFAULT'
@@ -127,7 +128,7 @@ class USERPREF_MT_appconfigs(Menu):
preset_operator = "wm.appconfig_activate"
def draw(self, context):
- self.layout.operator("wm.appconfig_default", text="Blender (default)")
+ self.layout.operator("wm.appconfig_default", text=_("Blender (default)"))
# now draw the presets
Menu.draw_preset(self, context)
@@ -142,12 +143,12 @@ class USERPREF_MT_splash(Menu):
row = split.row()
row.label("")
row = split.row()
- row.label("Interaction:")
+ row.label(_("Interaction:"))
# XXX, no redraws
# text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
# if not text:
# text = "Blender (default)"
- row.menu("USERPREF_MT_appconfigs", text="Preset")
+ row.menu("USERPREF_MT_appconfigs", text=_("Preset"))
class USERPREF_PT_interface(Panel):
@@ -170,13 +171,13 @@ class USERPREF_PT_interface(Panel):
row = layout.row()
col = row.column()
- col.label(text="Display:")
+ col.label(text=_("Display:"))
col.prop(view, "show_tooltips")
col.prop(view, "show_tooltips_python")
- col.prop(view, "show_object_info", text="Object Info")
+ col.prop(view, "show_object_info", text=_("Object Info"))
col.prop(view, "show_large_cursors")
- col.prop(view, "show_view_name", text="View Name")
- col.prop(view, "show_playback_fps", text="Playback FPS")
+ col.prop(view, "show_view_name", text=_("View Name"))
+ col.prop(view, "show_playback_fps", text=_("Playback FPS"))
col.prop(view, "use_global_scene")
col.prop(view, "object_origin_size")
@@ -184,18 +185,18 @@ class USERPREF_PT_interface(Panel):
col.separator()
col.separator()
- col.prop(view, "show_mini_axis", text="Display Mini Axis")
+ col.prop(view, "show_mini_axis", text=_("Display Mini Axis"))
sub = col.column()
sub.active = view.show_mini_axis
- sub.prop(view, "mini_axis_size", text="Size")
- sub.prop(view, "mini_axis_brightness", text="Brightness")
+ sub.prop(view, "mini_axis_size", text=_("Size"))
+ sub.prop(view, "mini_axis_brightness", text=_("Brightness"))
col.separator()
row.separator()
row.separator()
col = row.column()
- col.label(text="View Manipulation:")
+ col.label(text=_("View Manipulation:"))
col.prop(view, "use_mouse_auto_depth")
col.prop(view, "use_zoom_to_mouse")
col.prop(view, "use_rotate_around_active")
@@ -211,8 +212,8 @@ class USERPREF_PT_interface(Panel):
col.separator()
col.separator()
- col.label(text="2D Viewports:")
- col.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing")
+ col.label(text=_("2D Viewports:"))
+ col.prop(view, "view2d_grid_spacing_min", text=_("Minimum Grid Spacing"))
col.prop(view, "timecode_style")
row.separator()
@@ -228,19 +229,19 @@ class USERPREF_PT_interface(Panel):
col.prop(view, "show_manipulator")
sub = col.column()
sub.active = view.show_manipulator
- sub.prop(view, "manipulator_size", text="Size")
- sub.prop(view, "manipulator_handle_size", text="Handle Size")
- sub.prop(view, "manipulator_hotspot", text="Hotspot")
+ sub.prop(view, "manipulator_size", text=_("Size"))
+ sub.prop(view, "manipulator_handle_size", text=_("Handle Size"))
+ sub.prop(view, "manipulator_hotspot", text=_("Hotspot"))
col.separator()
col.separator()
col.separator()
- col.label(text="Menus:")
+ col.label(text=_("Menus:"))
col.prop(view, "use_mouse_over_open")
- col.label(text="Menu Open Delay:")
- col.prop(view, "open_toplevel_delay", text="Top Level")
- col.prop(view, "open_sublevel_delay", text="Sub Level")
+ col.label(text=_("Menu Open Delay:"))
+ col.prop(view, "open_toplevel_delay", text=_("Top Level"))
+ col.prop(view, "open_sublevel_delay", text=_("Sub Level"))
col.separator()
@@ -267,97 +268,97 @@ class USERPREF_PT_edit(Panel):
row = layout.row()
col = row.column()
- col.label(text="Link Materials To:")
+ col.label(text=_("Link Materials To:"))
col.prop(edit, "material_link", text="")
col.separator()
col.separator()
col.separator()
- col.label(text="New Objects:")
+ col.label(text=_("New Objects:"))
col.prop(edit, "use_enter_edit_mode")
- col.label(text="Align To:")
+ col.label(text=_("Align To:"))
col.prop(edit, "object_align", text="")
col.separator()
col.separator()
col.separator()
- col.label(text="Undo:")
+ col.label(text=_("Undo:"))
col.prop(edit, "use_global_undo")
- col.prop(edit, "undo_steps", text="Steps")
- col.prop(edit, "undo_memory_limit", text="Memory Limit")
+ col.prop(edit, "undo_steps", text=_("Steps"))
+ col.prop(edit, "undo_memory_limit", text=_("Memory Limit"))
row.separator()
row.separator()
col = row.column()
- col.label(text="Grease Pencil:")
- col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
- col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
+ col.label(text=_("Grease Pencil:"))
+ col.prop(edit, "grease_pencil_manhattan_distance", text=_("Manhattan Distance"))
+ col.prop(edit, "grease_pencil_euclidean_distance", text=_("Euclidean Distance"))
#col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
- col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
- col.prop(edit, "use_grease_pencil_smooth_stroke", text="Smooth Stroke")
+ col.prop(edit, "grease_pencil_eraser_radius", text=_("Eraser Radius"))
+ col.prop(edit, "use_grease_pencil_smooth_stroke", text=_("Smooth Stroke"))
col.separator()
col.separator()
col.separator()
- col.label(text="Playback:")
+ col.label(text=_("Playback:"))
col.prop(edit, "use_negative_frames")
row.separator()
row.separator()
col = row.column()
- col.label(text="Keyframing:")
+ col.label(text=_("Keyframing:"))
col.prop(edit, "use_visual_keying")
- col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
+ col.prop(edit, "use_keyframe_insert_needed", text=_("Only Insert Needed"))
col.separator()
- col.prop(edit, "use_auto_keying", text="Auto Keyframing:")
+ col.prop(edit, "use_auto_keying", text=_("Auto Keyframing:"))
sub = col.column()
# sub.active = edit.use_keyframe_insert_auto # incorrect, timeline can enable
- sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
+ sub.prop(edit, "use_keyframe_insert_available", text=_("Only Insert Available"))
col.separator()
- col.label(text="New F-Curve Defaults:")
- col.prop(edit, "keyframe_new_interpolation_type", text="Interpolation")
- col.prop(edit, "keyframe_new_handle_type", text="Handles")
- col.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
+ col.label(text=_("New F-Curve Defaults:"))
+ col.prop(edit, "keyframe_new_interpolation_type", text=_("Interpolation"))
+ col.prop(edit, "keyframe_new_handle_type", text=_("Handles"))
+ col.prop(edit, "use_insertkey_xyz_to_rgb", text=_("XYZ to RGB"))
col.separator()
col.separator()
col.separator()
- col.label(text="Transform:")
+ col.label(text=_("Transform:"))
col.prop(edit, "use_drag_immediately")
row.separator()
row.separator()
col = row.column()
- col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color")
+ col.prop(edit, "sculpt_paint_overlay_color", text=_("Sculpt Overlay Color"))
col.separator()
col.separator()
col.separator()
- col.label(text="Duplicate Data:")
- col.prop(edit, "use_duplicate_mesh", text="Mesh")
- col.prop(edit, "use_duplicate_surface", text="Surface")
- col.prop(edit, "use_duplicate_curve", text="Curve")
- col.prop(edit, "use_duplicate_text", text="Text")
- col.prop(edit, "use_duplicate_metaball", text="Metaball")
- col.prop(edit, "use_duplicate_armature", text="Armature")
- col.prop(edit, "use_duplicate_lamp", text="Lamp")
- col.prop(edit, "use_duplicate_material", text="Material")
- col.prop(edit, "use_duplicate_texture", text="Texture")
- #col.prop(edit, "use_duplicate_fcurve", text="F-Curve")
- col.prop(edit, "use_duplicate_action", text="Action")
- col.prop(edit, "use_duplicate_particle", text="Particle")
+ col.label(text=_("Duplicate Data:"))
+ col.prop(edit, "use_duplicate_mesh", text=_("Mesh"))
+ col.prop(edit, "use_duplicate_surface", text=_("Surface"))
+ col.prop(edit, "use_duplicate_curve", text=_("Curve"))
+ col.prop(edit, "use_duplicate_text", text=_("Text"))
+ col.prop(edit, "use_duplicate_metaball", text=_("Metaball"))
+ col.prop(edit, "use_duplicate_armature", text=_("Armature"))
+ col.prop(edit, "use_duplicate_lamp", text=_("Lamp"))
+ col.prop(edit, "use_duplicate_material", text=_("Material"))
+ col.prop(edit, "use_duplicate_texture", text=_("Texture"))
+ #col.prop(edit, "use_duplicate_fcurve", text=_("F-Curve"))
+ col.prop(edit, "use_duplicate_action", text=_("Action"))
+ col.prop(edit, "use_duplicate_particle", text=_("Particle"))
class USERPREF_PT_system(Panel):
@@ -384,11 +385,11 @@ class USERPREF_PT_system(Panel):
colsplit = column.split(percentage=0.85)
col = colsplit.column()
- col.label(text="General:")
+ col.label(text=_("General:"))
col.prop(system, "dpi")
col.prop(system, "frame_server_port")
- col.prop(system, "scrollback", text="Console Scrollback")
- col.prop(system, "author", text="Author")
+ col.prop(system, "scrollback", text=_("Console Scrollback"))
+ col.prop(system, "author", text=_("Author"))
col.prop(system, "use_scripts_auto_execute")
col.prop(system, "use_tabs_as_spaces")
@@ -396,80 +397,66 @@ class USERPREF_PT_system(Panel):
col.separator()
col.separator()
- col.label(text="Sound:")
+ col.label(text=_("Sound:"))
col.row().prop(system, "audio_device", expand=True)
sub = col.column()
sub.active = system.audio_device != 'NONE'
#sub.prop(system, "use_preview_images")
- sub.prop(system, "audio_channels", text="Channels")
- sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer")
- sub.prop(system, "audio_sample_rate", text="Sample Rate")
- sub.prop(system, "audio_sample_format", text="Sample Format")
+ sub.prop(system, "audio_channels", text=_("Channels"))
+ sub.prop(system, "audio_mixing_buffer", text=_("Mixing Buffer"))
+ sub.prop(system, "audio_sample_rate", text=_("Sample Rate"))
+ sub.prop(system, "audio_sample_format", text=_("Sample Format"))
col.separator()
col.separator()
col.separator()
- col.label(text="Screencast:")
+ col.label(text=_("Screencast:"))
col.prop(system, "screencast_fps")
col.prop(system, "screencast_wait_time")
col.separator()
col.separator()
col.separator()
- #column = split.column()
- #colsplit = column.split(percentage=0.85)
-
- # No translation in 2.5 yet
- #col.prop(system, "language")
- #col.label(text="Translate:")
- #col.prop(system, "use_translate_tooltips", text="Tooltips")
- #col.prop(system, "use_translate_buttons", text="Labels")
- #col.prop(system, "use_translate_toolbox", text="Toolbox")
-
- #col.separator()
-
- #col.prop(system, "use_textured_fonts")
-
# 2. Column
column = split.column()
colsplit = column.split(percentage=0.85)
col = colsplit.column()
- col.label(text="OpenGL:")
+ col.label(text=_("OpenGL:"))
col.prop(system, "gl_clip_alpha", slider=True)
col.prop(system, "use_mipmaps")
- col.label(text="Anisotropic Filtering")
+ col.label(text=_("Anisotropic Filtering"))
col.prop(system, "anisotropic_filter", text="")
col.prop(system, "use_vertex_buffer_objects")
#Anti-aliasing is disabled as it breaks broder/lasso select
#col.prop(system, "use_antialiasing")
- col.label(text="Window Draw Method:")
+ col.label(text=_("Window Draw Method:"))
col.prop(system, "window_draw_method", text="")
- col.label(text="Text Draw Options:")
+ col.label(text=_("Text Draw Options:"))
col.prop(system, "use_text_antialiasing")
- col.label(text="Textures:")
- col.prop(system, "gl_texture_limit", text="Limit Size")
- col.prop(system, "texture_time_out", text="Time Out")
- col.prop(system, "texture_collection_rate", text="Collection Rate")
+ col.label(text=_("Textures:"))
+ col.prop(system, "gl_texture_limit", text=_("Limit Size"))
+ col.prop(system, "texture_time_out", text=_("Time Out"))
+ col.prop(system, "texture_collection_rate", text=_("Collection Rate"))
col.separator()
col.separator()
col.separator()
- col.label(text="Sequencer:")
+ col.label(text=_("Sequencer:"))
col.prop(system, "prefetch_frames")
col.prop(system, "memory_cache_limit")
# 3. Column
column = split.column()
- column.label(text="Solid OpenGL lights:")
+ column.label(text=_("Solid OpenGL lights:"))
split = column.split(percentage=0.1)
split.label()
- split.label(text="Colors:")
- split.label(text="Direction:")
+ split.label(text=_("Colors:"))
+ split.label(text=_("Direction:"))
lamp = system.solid_lights[0]
opengl_lamp_buttons(column, lamp)
@@ -481,21 +468,27 @@ class USERPREF_PT_system(Panel):
opengl_lamp_buttons(column, lamp)
column.separator()
- column.separator()
- column.separator()
- column.label(text="Color Picker Type:")
+ column.label(text=_("Color Picker Type:"))
column.row().prop(system, "color_picker_type", text="")
column.separator()
- column.separator()
- column.separator()
- column.prop(system, "use_weight_color_range", text="Custom Weight Paint Range")
+ column.prop(system, "use_weight_color_range", text=_("Custom Weight Paint Range"))
sub = column.column()
sub.active = system.use_weight_color_range
sub.template_color_ramp(system, "weight_color_range", expand=True)
+ column.separator()
+
+ column.prop(system, "use_international_fonts")
+ if system.use_international_fonts:
+ column.prop(system, "language")
+ row = column.row()
+ row.label(text="Translate:")
+ row.prop(system, "use_translate_interface", text="Interface")
+ row.prop(system, "use_translate_tooltips", text="Tooltips")
+
class USERPREF_PT_theme(Panel):
bl_space_type = 'USER_PREFERENCES'
@@ -557,71 +550,71 @@ class USERPREF_PT_theme(Panel):
col = split.column()
ui = theme.user_interface.wcol_regular
- col.label(text="Regular:")
+ col.label(text=_("Regular:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_tool
- col.label(text="Tool:")
+ col.label(text=_("Tool:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_radio
- col.label(text="Radio Buttons:")
+ col.label(text=_("Radio Buttons:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_text
- col.label(text="Text:")
+ col.label(text=_("Text:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_option
- col.label(text="Option:")
+ col.label(text=_("Option:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_toggle
- col.label(text="Toggle:")
+ col.label(text=_("Toggle:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_num
- col.label(text="Number Field:")
+ col.label(text=_("Number Field:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_numslider
- col.label(text="Value Slider:")
+ col.label(text=_("Value Slider:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_box
- col.label(text="Box:")
+ col.label(text=_("Box:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_menu
- col.label(text="Menu:")
+ col.label(text=_("Menu:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_pulldown
- col.label(text="Pulldown:")
+ col.label(text=_("Pulldown:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_menu_back
- col.label(text="Menu Back:")
+ col.label(text=_("Menu Back:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_menu_item
- col.label(text="Menu Item:")
+ col.label(text=_("Menu Item:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_scroll
- col.label(text="Scroll Bar:")
+ col.label(text=_("Scroll Bar:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_progress
- col.label(text="Progress Bar:")
+ col.label(text=_("Progress Bar:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_list_item
- col.label(text="List Item:")
+ col.label(text=_("List Item:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_state
- col.label(text="State:")
+ col.label(text=_("State:"))
row = col.row()
@@ -657,7 +650,7 @@ class USERPREF_PT_theme(Panel):
col = split.column()
for i, ui in enumerate(theme.bone_color_sets):
- col.label(text="Color Set %d:" % (i + 1)) # i starts from 0
+ col.label(text=_("Color Set")+" %d:" % (i + 1)) # i starts from 0
row = col.row()
@@ -700,22 +693,22 @@ class USERPREF_PT_file(Panel):
split = layout.split(percentage=0.7)
col = split.column()
- col.label(text="File Paths:")
+ col.label(text=_("File Paths:"))
colsplit = col.split(percentage=0.95)
col1 = colsplit.split(percentage=0.3)
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:")
- sub.label(text="Temp:")
- sub.label(text="Image Editor:")
- sub.label(text="Animation Player:")
+ 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:"))
+ sub.label(text=_("Temp:"))
+ sub.label(text=_("Image Editor:"))
+ sub.label(text=_("Animation Player:"))
sub = col1.column()
sub.prop(paths, "font_directory", text="")
@@ -732,7 +725,7 @@ class USERPREF_PT_file(Panel):
subsplit.prop(paths, "animation_player", text="")
col = split.column()
- col.label(text="Save & Load:")
+ col.label(text=_("Save & Load:"))
col.prop(paths, "use_relative_paths")
col.prop(paths, "use_file_compression")
col.prop(paths, "use_load_ui")
@@ -747,11 +740,11 @@ class USERPREF_PT_file(Panel):
col.prop(paths, "save_version")
col.prop(paths, "recent_files")
col.prop(paths, "use_save_preview_images")
- col.label(text="Auto Save:")
+ col.label(text=_("Auto Save:"))
col.prop(paths, "use_auto_save_temporary_files")
sub = col.column()
sub.active = paths.use_auto_save_temporary_files
- sub.prop(paths, "auto_save_time", text="Timer (mins)")
+ sub.prop(paths, "auto_save_time", text=_("Timer (mins)"))
from bl_ui.space_userpref_keymap import InputKeyMapPanel
@@ -773,7 +766,18 @@ class USERPREF_MT_ndof_settings(Menu):
layout.separator()
layout.label(text="orbit options")
- layout.prop(input_prefs, "ndof_orbit_invert_axes")
+ if input_prefs.view_rotate_method == 'TRACKBALL':
+ layout.prop(input_prefs, "ndof_roll_invert_axis")
+ layout.prop(input_prefs, "ndof_tilt_invert_axis")
+ layout.prop(input_prefs, "ndof_rotate_invert_axis")
+ else:
+ layout.prop(input_prefs, "ndof_orbit_invert_axes")
+
+ layout.separator()
+ layout.label(text="pan options")
+ layout.prop(input_prefs, "ndof_panx_invert_axis")
+ layout.prop(input_prefs, "ndof_pany_invert_axis")
+ layout.prop(input_prefs, "ndof_panz_invert_axis")
layout.separator()
layout.label(text="fly options")
@@ -796,7 +800,7 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
col = row.column()
sub = col.column()
- sub.label(text="Presets:")
+ sub.label(text=_("Presets:"))
subrow = sub.row(align=True)
subrow.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label)
@@ -804,19 +808,19 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
subrow.operator("wm.interaction_preset_add", text="", icon='ZOOMOUT').remove_active = True
sub.separator()
- sub.label(text="Mouse:")
+ sub.label(text=_("Mouse:"))
sub1 = sub.column()
sub1.active = (inputs.select_mouse == 'RIGHT')
sub1.prop(inputs, "use_mouse_emulate_3_button")
sub.prop(inputs, "use_mouse_continuous")
sub.prop(inputs, "drag_threshold")
- sub.label(text="Select With:")
+ sub.label(text=_("Select With:"))
sub.row().prop(inputs, "select_mouse", expand=True)
sub = col.column()
- sub.label(text="Double Click:")
- sub.prop(inputs, "mouse_double_click_time", text="Speed")
+ sub.label(text=_("Double Click:"))
+ sub.prop(inputs, "mouse_double_click_time", text=_("Speed"))
sub.separator()
@@ -824,10 +828,10 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
sub.separator()
- sub.label(text="Orbit Style:")
+ sub.label(text=_("Orbit Style:"))
sub.row().prop(inputs, "view_rotate_method", expand=True)
- sub.label(text="Zoom Style:")
+ sub.label(text=_("Zoom Style:"))
sub.row().prop(inputs, "view_zoom_method", text="")
if inputs.view_zoom_method in {'DOLLY', 'CONTINUE'}:
sub.row().prop(inputs, "view_zoom_axis", expand=True)
@@ -838,8 +842,8 @@ class USERPREF_PT_input(Panel, InputKeyMapPanel):
#col.separator()
sub = col.column()
- sub.label(text="Mouse Wheel:")
- sub.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
+ sub.label(text=_("Mouse Wheel:"))
+ sub.prop(inputs, "invert_zoom_wheel", text=_("Invert Wheel Zoom Direction"))
#sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
col.separator()
@@ -877,9 +881,9 @@ class USERPREF_MT_addons_dev_guides(Menu):
# menu to open webpages with addons development guides
def draw(self, context):
layout = self.layout
- layout.operator('wm.url_open', text='API Concepts', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
- layout.operator('wm.url_open', text='Addon Guidelines', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
- layout.operator('wm.url_open', text='How to share your addon', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
+ layout.operator('wm.url_open', text=_('API Concepts'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
+ layout.operator('wm.url_open', text=_('Addon Guidelines'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
+ layout.operator('wm.url_open', text=_('How to share your addon'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
class USERPREF_PT_addons(Panel):
@@ -934,10 +938,10 @@ class USERPREF_PT_addons(Panel):
split = layout.split(percentage=0.2)
col = split.column()
col.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
- col.label(text="Categories")
+ col.label(text=_("Categories"))
col.prop(context.window_manager, "addon_filter", expand=True)
- col.label(text="Supported Level")
+ col.label(text=_("Supported Level"))
col.prop(context.window_manager, "addon_support", expand=True)
col = split.column()
@@ -1014,23 +1018,23 @@ class USERPREF_PT_addons(Panel):
if info["show_expanded"]:
if info["description"]:
split = colsub.row().split(percentage=0.15)
- split.label(text='Description:')
+ split.label(text=_('Description:'))
split.label(text=info["description"])
if info["location"]:
split = colsub.row().split(percentage=0.15)
- split.label(text='Location:')
+ split.label(text=_('Location:'))
split.label(text=info["location"])
if info["author"]:
split = colsub.row().split(percentage=0.15)
- split.label(text='Author:')
+ split.label(text=_('Author:'))
split.label(text=info["author"])
if info["version"]:
split = colsub.row().split(percentage=0.15)
- split.label(text='Version:')
+ split.label(text=_('Version:'))
split.label(text='.'.join(str(x) for x in info["version"]))
if info["warning"]:
split = colsub.row().split(percentage=0.15)
- split.label(text="Warning:")
+ split.label(text=_("Warning:"))
split.label(text=' ' + info["warning"], icon='ERROR')
user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths)
@@ -1038,13 +1042,13 @@ class USERPREF_PT_addons(Panel):
if tot_row:
split = colsub.row().split(percentage=0.15)
- split.label(text="Internet:")
+ split.label(text=_("Internet:"))
if info["wiki_url"]:
- split.operator("wm.url_open", text="Link to the Wiki", icon='HELP').url = info["wiki_url"]
+ split.operator("wm.url_open", text=_("Link to the Wiki"), icon='HELP').url = info["wiki_url"]
if info["tracker_url"]:
- split.operator("wm.url_open", text="Report a Bug", icon='URL').url = info["tracker_url"]
+ split.operator("wm.url_open", text=_("Report a Bug"), icon='URL').url = info["tracker_url"]
if user_addon:
- split.operator("wm.addon_remove", text="Remove", icon='CANCEL').module = mod.__name__
+ split.operator("wm.addon_remove", text=_("Remove"), icon='CANCEL').module = mod.__name__
for i in range(4 - tot_row):
split.separator()
@@ -1056,7 +1060,7 @@ class USERPREF_PT_addons(Panel):
if missing_modules and filter in {"All", "Enabled"}:
col.column().separator()
- col.column().label(text="Missing script files")
+ col.column().label(text=_("Missing script files"))
module_names = {mod.__name__ for mod, info in addons}
for module_name in sorted(missing_modules):
@@ -1093,8 +1097,8 @@ class WM_OT_addon_enable(Operator):
if info_ver > bpy.app.version:
self.report({'WARNING'}, ("This script was written Blender "
"version %d.%d.%d and might not "
- "function (correctly).\n"
- "The script is enabled though.") %
+ "function (correctly), "
+ "though it is enabled") %
info_ver)
return {'FINISHED'}
else:
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index 9ed1591cbf3..f8d77a1604b 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -20,6 +20,7 @@
import bpy
from bpy.types import Menu, Operator, OperatorProperties
import os
+from blf import gettext as _
KM_HIERARCHY = [
@@ -131,7 +132,7 @@ class USERPREF_MT_keyconfigs(Menu):
preset_operator = "wm.keyconfig_activate"
def draw(self, context):
- props = self.layout.operator("wm.context_set_value", text="Blender (default)")
+ props = self.layout.operator("wm.context_set_value", text=_("Blender (default)"))
props.data_path = "window_manager.keyconfigs.active"
props.value = "context.window_manager.keyconfigs.default"
@@ -182,7 +183,7 @@ class InputKeyMapPanel:
row = col.row()
row.prop(km, "show_expanded_children", text="", emboss=False)
- row.label(text=km.name)
+ row.label(text=_(km.name))
row.label()
row.label()
@@ -190,7 +191,7 @@ class InputKeyMapPanel:
if km.is_modal:
row.label(text="", icon='LINKED')
if km.is_user_modified:
- row.operator("wm.keymap_restore", text="Restore")
+ row.operator("wm.keymap_restore", text=_("Restore"))
else:
row.label()
@@ -201,7 +202,7 @@ class InputKeyMapPanel:
subcol = self.indented_layout(col, level + 1)
subrow = subcol.row()
subrow.prop(km, "show_expanded_items", text="", emboss=False)
- subrow.label(text="%s (Global)" % km.name)
+ subrow.label(text="%s " % _(km.name) + _("(Global)") )
else:
km.show_expanded_items = True
@@ -213,7 +214,7 @@ class InputKeyMapPanel:
# "Add New" at end of keymap item list
col = self.indented_layout(col, level + 1)
subcol = col.split(percentage=0.2).column()
- subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
+ subcol.operator("wm.keyitem_add", text=_("Add New"), icon='ZOOMIN')
col.separator()
@@ -261,7 +262,7 @@ class InputKeyMapPanel:
if km.is_modal:
row.prop(kmi, "propvalue", text="")
else:
- row.label(text=kmi.name)
+ row.label(text=_(kmi.name))
row = split.row()
row.prop(kmi, "map_type", text="")
@@ -350,7 +351,7 @@ class InputKeyMapPanel:
row.label()
if km.is_user_modified:
- row.operator("wm.keymap_restore", text="Restore")
+ row.operator("wm.keymap_restore", text=_("Restore"))
else:
row.label()
@@ -360,7 +361,7 @@ class InputKeyMapPanel:
# "Add New" at end of keymap item list
col = self.indented_layout(layout, 1)
subcol = col.split(percentage=0.2).column()
- subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
+ subcol.operator("wm.keyitem_add", text=_("Add New"), icon='ZOOMIN')
def draw_hierarchy(self, display_keymaps, layout):
for entry in KM_HIERARCHY:
@@ -381,7 +382,7 @@ class InputKeyMapPanel:
#row.prop_search(wm.keyconfigs, "active", wm, "keyconfigs", text="Key Config:")
text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
if not text:
- text = "Blender (default)"
+ text = _("Blender (default)")
row.menu("USERPREF_MT_keyconfigs", text=text)
row.operator("wm.keyconfig_preset_add", text="", icon="ZOOMIN")
row.operator("wm.keyconfig_preset_add", text="", icon="ZOOMOUT").remove_active = True
@@ -423,7 +424,7 @@ def export_properties(prefix, properties, lines=None):
class WM_OT_keyconfig_test(Operator):
"Test keyconfig for conflicts"
bl_idname = "wm.keyconfig_test"
- bl_label = "Test Key Configuration for Conflicts"
+ bl_label = _("Test Key Configuration for Conflicts")
def testEntry(self, kc, entry, src=None, parent=None):
result = False
@@ -597,7 +598,7 @@ class WM_OT_keyconfig_import(Operator):
class WM_OT_keyconfig_export(Operator):
"Export key configuration to a python script"
bl_idname = "wm.keyconfig_export"
- bl_label = "Export Key Configuration..."
+ bl_label = _("Export Key Configuration...")
filepath = StringProperty(
name="File Path",
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 9f96df1eb66..2e86e875bab 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Header, Menu, Operator, Panel
+from blf import gettext as _
class VIEW3D_HT_header(Header):
@@ -124,9 +125,9 @@ class ShowHideMenu():
def draw(self, context):
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 Unselected").unselected = True
+ 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 Unselected")).unselected = True
class VIEW3D_MT_transform(Menu):
@@ -145,35 +146,35 @@ class VIEW3D_MT_transform(Menu):
layout.separator()
- layout.operator("transform.tosphere", text="To Sphere")
- layout.operator("transform.shear", text="Shear")
- layout.operator("transform.warp", text="Warp")
- layout.operator("transform.push_pull", text="Push/Pull")
+ layout.operator("transform.tosphere", text=_("To Sphere"))
+ layout.operator("transform.shear", text=_("Shear"))
+ layout.operator("transform.warp", text=_("Warp"))
+ layout.operator("transform.push_pull", text=_("Push/Pull"))
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.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'
+ 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")
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.transform", text=_("Align to Transform Orientation")).mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
layout.separator()
layout.operator_context = 'EXEC_AREA'
- layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN'
- layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY'
- layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR'
+ layout.operator("object.origin_set", text=_("Geometry to Origin")).type = 'GEOMETRY_ORIGIN'
+ layout.operator("object.origin_set", text=_("Origin to Geometry")).type = 'ORIGIN_GEOMETRY'
+ layout.operator("object.origin_set", text=_("Origin to 3D Cursor")).type = 'ORIGIN_CURSOR'
layout.separator()
@@ -191,32 +192,32 @@ class VIEW3D_MT_mirror(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("transform.mirror", text="Interactive Mirror")
+ layout.operator("transform.mirror", text=_("Interactive Mirror"))
layout.separator()
layout.operator_context = 'INVOKE_REGION_WIN'
- props = layout.operator("transform.mirror", text="X Global")
+ props = layout.operator("transform.mirror", text=_("X Global"))
props.constraint_axis = (True, False, False)
props.constraint_orientation = 'GLOBAL'
- props = layout.operator("transform.mirror", text="Y Global")
+ props = layout.operator("transform.mirror", text=_("Y Global"))
props.constraint_axis = (False, True, False)
props.constraint_orientation = 'GLOBAL'
- props = layout.operator("transform.mirror", text="Z Global")
+ props = layout.operator("transform.mirror", text=_("Z Global"))
props.constraint_axis = (False, False, True)
props.constraint_orientation = 'GLOBAL'
if context.edit_object:
layout.separator()
- props = layout.operator("transform.mirror", text="X Local")
+ props = layout.operator("transform.mirror", text=_("X Local"))
props.constraint_axis = (True, False, False)
props.constraint_orientation = 'LOCAL'
- props = layout.operator("transform.mirror", text="Y Local")
+ props = layout.operator("transform.mirror", text=_("Y Local"))
props.constraint_axis = (False, True, False)
props.constraint_orientation = 'LOCAL'
- props = layout.operator("transform.mirror", text="Z Local")
+ props = layout.operator("transform.mirror", text=_("Z Local"))
props.constraint_axis = (False, False, True)
props.constraint_orientation = 'LOCAL'
@@ -229,15 +230,15 @@ class VIEW3D_MT_snap(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("view3d.snap_selected_to_grid", text="Selection to Grid")
- layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor")
+ layout.operator("view3d.snap_selected_to_grid", text=_("Selection to Grid"))
+ layout.operator("view3d.snap_selected_to_cursor", text=_("Selection to Cursor"))
layout.separator()
- layout.operator("view3d.snap_cursor_to_selected", text="Cursor to Selected")
- layout.operator("view3d.snap_cursor_to_center", text="Cursor to Center")
- layout.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid")
- layout.operator("view3d.snap_cursor_to_active", text="Cursor to Active")
+ layout.operator("view3d.snap_cursor_to_selected", text=_("Cursor to Selected"))
+ layout.operator("view3d.snap_cursor_to_center", text=_("Cursor to Center"))
+ layout.operator("view3d.snap_cursor_to_grid", text=_("Cursor to Grid"))
+ layout.operator("view3d.snap_cursor_to_active", text=_("Cursor to Active"))
class VIEW3D_MT_uv_map(Menu):
@@ -263,7 +264,7 @@ class VIEW3D_MT_uv_map(Menu):
layout.separator()
layout.operator("uv.project_from_view")
- layout.operator("uv.project_from_view", text="Project from View (Bounds)").scale_to_bounds = True
+ layout.operator("uv.project_from_view", text=_("Project from View (Bounds)")).scale_to_bounds = True
layout.separator()
@@ -284,15 +285,15 @@ class VIEW3D_MT_view(Menu):
layout.separator()
- layout.operator("view3d.viewnumpad", text="Camera").type = 'CAMERA'
- layout.operator("view3d.viewnumpad", text="Top").type = 'TOP'
- layout.operator("view3d.viewnumpad", text="Bottom").type = 'BOTTOM'
- layout.operator("view3d.viewnumpad", text="Front").type = 'FRONT'
- layout.operator("view3d.viewnumpad", text="Back").type = 'BACK'
- layout.operator("view3d.viewnumpad", text="Right").type = 'RIGHT'
- layout.operator("view3d.viewnumpad", text="Left").type = 'LEFT'
+ layout.operator("view3d.viewnumpad", text=_("Camera")).type = 'CAMERA'
+ layout.operator("view3d.viewnumpad", text=_("Top")).type = 'TOP'
+ layout.operator("view3d.viewnumpad", text=_("Bottom")).type = 'BOTTOM'
+ layout.operator("view3d.viewnumpad", text=_("Front")).type = 'FRONT'
+ layout.operator("view3d.viewnumpad", text=_("Back")).type = 'BACK'
+ layout.operator("view3d.viewnumpad", text=_("Right")).type = 'RIGHT'
+ layout.operator("view3d.viewnumpad", text=_("Left")).type = 'LEFT'
- layout.menu("VIEW3D_MT_view_cameras", text="Cameras")
+ layout.menu("VIEW3D_MT_view_cameras", text=_("Cameras"))
layout.separator()
@@ -307,22 +308,22 @@ class VIEW3D_MT_view(Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("view3d.clip_border", text="Clipping Border...")
- layout.operator("view3d.zoom_border", text="Zoom Border...")
+ layout.operator("view3d.clip_border", text=_("Clipping Border..."))
+ layout.operator("view3d.zoom_border", text=_("Zoom Border..."))
layout.separator()
- layout.operator("view3d.layers", text="Show All Layers").nr = 0
+ layout.operator("view3d.layers", text=_("Show All Layers")).nr = 0
layout.separator()
- layout.operator("view3d.localview", text="View Global/Local")
+ layout.operator("view3d.localview", text=_("View Global/Local"))
layout.operator("view3d.view_selected")
layout.operator("view3d.view_all")
layout.separator()
- layout.operator("screen.animation_play", text="Playback Animation")
+ layout.operator("screen.animation_play", text=_("Playback Animation"))
layout.separator()
@@ -345,9 +346,9 @@ class VIEW3D_MT_view_navigation(Menu):
layout.separator()
- layout.operator("view3d.zoom", text="Zoom In").delta = 1
- layout.operator("view3d.zoom", text="Zoom Out").delta = -1
- layout.operator("view3d.zoom_camera_1_to_1", text="Zoom Camera 1:1")
+ layout.operator("view3d.zoom", text=_("Zoom In")).delta = 1
+ layout.operator("view3d.zoom", text=_("Zoom Out")).delta = -1
+ layout.operator("view3d.zoom_camera_1_to_1", text=_("Zoom Camera 1:1"))
layout.separator()
@@ -364,8 +365,8 @@ class VIEW3D_MT_view_align(Menu):
layout.separator()
- layout.operator("view3d.view_all", text="Center Cursor and View All").center = True
- layout.operator("view3d.camera_to_view", text="Align Active Camera to View")
+ layout.operator("view3d.view_all", text=_("Center Cursor and View All")).center = True
+ layout.operator("view3d.camera_to_view", text=_("Align Active Camera to View"))
layout.operator("view3d.view_selected")
layout.operator("view3d.view_center_cursor")
@@ -376,22 +377,22 @@ class VIEW3D_MT_view_align_selected(Menu):
def draw(self, context):
layout = self.layout
- props = layout.operator("view3d.viewnumpad", text="Top")
+ props = layout.operator("view3d.viewnumpad", text=_("Top"))
props.align_active = True
props.type = 'TOP'
- props = layout.operator("view3d.viewnumpad", text="Bottom")
+ props = layout.operator("view3d.viewnumpad", text=_("Bottom"))
props.align_active = True
props.type = 'BOTTOM'
- props = layout.operator("view3d.viewnumpad", text="Front")
+ props = layout.operator("view3d.viewnumpad", text=_("Front"))
props.align_active = True
props.type = 'FRONT'
- props = layout.operator("view3d.viewnumpad", text="Back")
+ props = layout.operator("view3d.viewnumpad", text=_("Back"))
props.align_active = True
props.type = 'BACK'
- props = layout.operator("view3d.viewnumpad", text="Right")
+ props = layout.operator("view3d.viewnumpad", text=_("Right"))
props.align_active = True
props.type = 'RIGHT'
- props = layout.operator("view3d.viewnumpad", text="Left")
+ props = layout.operator("view3d.viewnumpad", text=_("Left"))
props.align_active = True
props.type = 'LEFT'
@@ -403,7 +404,7 @@ class VIEW3D_MT_view_cameras(Menu):
layout = self.layout
layout.operator("view3d.object_as_camera")
- layout.operator("view3d.viewnumpad", text="Active Camera").type = 'CAMERA'
+ layout.operator("view3d.viewnumpad", text=_("Active Camera")).type = 'CAMERA'
# ********** Select menus, suffix from context.mode **********
@@ -419,19 +420,19 @@ class VIEW3D_MT_select_object(Menu):
layout.separator()
- layout.operator("object.select_all", text="Select/Deselect All")
- layout.operator("object.select_inverse", text="Inverse")
- layout.operator("object.select_random", text="Random")
- layout.operator("object.select_mirror", text="Mirror")
- layout.operator("object.select_by_layer", text="Select All by Layer")
- layout.operator_menu_enum("object.select_by_type", "type", text="Select All by Type...")
- layout.operator("object.select_camera", text="Select Camera")
+ layout.operator("object.select_all", text=_("Select/Deselect All"))
+ layout.operator("object.select_inverse", text=_("Inverse"))
+ layout.operator("object.select_random", text=_("Random"))
+ layout.operator("object.select_mirror", text=_("Mirror"))
+ layout.operator("object.select_by_layer", text=_("Select All by Layer"))
+ layout.operator_menu_enum("object.select_by_type", "type", text=_("Select All by Type..."))
+ layout.operator("object.select_camera", text=_("Select Camera"))
layout.separator()
- layout.operator_menu_enum("object.select_grouped", "type", text="Grouped")
- layout.operator_menu_enum("object.select_linked", "type", text="Linked")
- layout.operator("object.select_pattern", text="Select Pattern...")
+ layout.operator_menu_enum("object.select_grouped", "type", text=_("Grouped"))
+ layout.operator_menu_enum("object.select_linked", "type", text=_("Linked"))
+ layout.operator("object.select_pattern", text=_("Select Pattern..."))
class VIEW3D_MT_select_pose(Menu):
@@ -444,31 +445,31 @@ class VIEW3D_MT_select_pose(Menu):
layout.separator()
- layout.operator("pose.select_all", text="Select/Deselect All")
- layout.operator("pose.select_inverse", text="Inverse")
- layout.operator("pose.select_flip_active", text="Flip Active")
- layout.operator("pose.select_constraint_target", text="Constraint Target")
- layout.operator("pose.select_linked", text="Linked")
+ layout.operator("pose.select_all", text=_("Select/Deselect All"))
+ layout.operator("pose.select_inverse", text=_("Inverse"))
+ layout.operator("pose.select_flip_active", text=_("Flip Active"))
+ layout.operator("pose.select_constraint_target", text=_("Constraint Target"))
+ layout.operator("pose.select_linked", text=_("Linked"))
layout.separator()
- layout.operator("pose.select_hierarchy", text="Parent").direction = 'PARENT'
- layout.operator("pose.select_hierarchy", text="Child").direction = 'CHILD'
+ layout.operator("pose.select_hierarchy", text=_("Parent")).direction = 'PARENT'
+ layout.operator("pose.select_hierarchy", text=_("Child")).direction = 'CHILD'
layout.separator()
- props = layout.operator("pose.select_hierarchy", text="Extend Parent")
+ props = layout.operator("pose.select_hierarchy", text=_("Extend Parent"))
props.extend = True
props.direction = 'PARENT'
- props = layout.operator("pose.select_hierarchy", text="Extend Child")
+ props = layout.operator("pose.select_hierarchy", text=_("Extend Child"))
props.extend = True
props.direction = 'CHILD'
layout.separator()
- layout.operator_menu_enum("pose.select_grouped", "type", text="Grouped")
- layout.operator("object.select_pattern", text="Select Pattern...")
+ layout.operator_menu_enum("pose.select_grouped", "type", text=_("Grouped"))
+ layout.operator("object.select_pattern", text=_("Select Pattern..."))
class VIEW3D_MT_select_particle(Menu):
@@ -481,7 +482,7 @@ class VIEW3D_MT_select_particle(Menu):
layout.separator()
- layout.operator("particle.select_all", text="Select/Deselect All")
+ layout.operator("particle.select_all", text=_("Select/Deselect All"))
layout.operator("particle.select_linked")
layout.operator("particle.select_inverse")
@@ -492,8 +493,8 @@ class VIEW3D_MT_select_particle(Menu):
layout.separator()
- layout.operator("particle.select_roots", text="Roots")
- layout.operator("particle.select_tips", text="Tips")
+ layout.operator("particle.select_roots", text=_("Roots"))
+ layout.operator("particle.select_tips", text=_("Tips"))
class VIEW3D_MT_select_edit_mesh(Menu):
@@ -507,40 +508,40 @@ class VIEW3D_MT_select_edit_mesh(Menu):
layout.separator()
- layout.operator("mesh.select_all", text="Select/Deselect All")
- layout.operator("mesh.select_inverse", text="Inverse")
+ layout.operator("mesh.select_all", text=_("Select/Deselect All"))
+ layout.operator("mesh.select_inverse", text=_("Inverse"))
layout.separator()
- layout.operator("mesh.select_random", text="Random")
- layout.operator("mesh.select_nth", text="Every N Number of Verts")
- layout.operator("mesh.edges_select_sharp", text="Sharp Edges")
- layout.operator("mesh.faces_select_linked_flat", text="Linked Flat Faces")
- layout.operator("mesh.faces_select_interior", text="Interior Faces")
- layout.operator("mesh.select_axis", text="Side of Active")
+ layout.operator("mesh.select_random", text=_("Random"))
+ layout.operator("mesh.select_nth", text=_("Every N Number of Verts"))
+ layout.operator("mesh.edges_select_sharp", text=_("Sharp Edges"))
+ layout.operator("mesh.faces_select_linked_flat", text=_("Linked Flat Faces"))
+ layout.operator("mesh.faces_select_interior", text=_("Interior Faces"))
+ layout.operator("mesh.select_axis", text=_("Side of Active"))
layout.separator()
- layout.operator("mesh.select_by_number_vertices", text="Triangles").type = 'TRIANGLES'
- layout.operator("mesh.select_by_number_vertices", text="Quads").type = 'QUADS'
+ layout.operator("mesh.select_by_number_vertices", text=_("Triangles")).type = 'TRIANGLES'
+ layout.operator("mesh.select_by_number_vertices", text=_("Quads")).type = 'QUADS'
if context.scene.tool_settings.mesh_select_mode[2] == False:
- layout.operator("mesh.select_non_manifold", text="Non Manifold")
- layout.operator("mesh.select_by_number_vertices", text="Loose Verts/Edges").type = 'OTHER'
- layout.operator("mesh.select_similar", text="Similar")
+ layout.operator("mesh.select_non_manifold", text=_("Non Manifold"))
+ layout.operator("mesh.select_by_number_vertices", text=_("Loose Verts/Edges")).type = 'OTHER'
+ layout.operator("mesh.select_similar", text=_("Similar"))
layout.separator()
- layout.operator("mesh.select_less", text="Less")
- layout.operator("mesh.select_more", text="More")
+ layout.operator("mesh.select_less", text=_("Less"))
+ layout.operator("mesh.select_more", text=_("More"))
layout.separator()
- layout.operator("mesh.select_mirror", text="Mirror")
+ layout.operator("mesh.select_mirror", text=_("Mirror"))
- layout.operator("mesh.select_linked", text="Linked")
- layout.operator("mesh.select_vertex_path", text="Vertex Path")
- layout.operator("mesh.loop_multi_select", text="Edge Loop")
- layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True
+ layout.operator("mesh.select_linked", text=_("Linked"))
+ layout.operator("mesh.select_vertex_path", text=_("Vertex Path"))
+ layout.operator("mesh.loop_multi_select", text=_("Edge Loop"))
+ layout.operator("mesh.loop_multi_select", text=_("Edge Ring")).ring = True
layout.separator()
@@ -559,10 +560,10 @@ class VIEW3D_MT_select_edit_curve(Menu):
layout.separator()
- layout.operator("curve.select_all", text="Select/Deselect All")
+ layout.operator("curve.select_all", text=_("Select/Deselect All"))
layout.operator("curve.select_inverse")
layout.operator("curve.select_random")
- layout.operator("curve.select_nth", text="Every Nth Number of Points")
+ layout.operator("curve.select_nth", text=_("Every Nth Number of Points"))
layout.separator()
@@ -588,10 +589,10 @@ class VIEW3D_MT_select_edit_surface(Menu):
layout.separator()
- layout.operator("curve.select_all", text="Select/Deselect All")
+ layout.operator("curve.select_all", text=_("Select/Deselect All"))
layout.operator("curve.select_inverse")
layout.operator("curve.select_random")
- layout.operator("curve.select_nth", text="Every Nth Number of Points")
+ layout.operator("curve.select_nth", text=_("Every Nth Number of Points"))
layout.separator()
@@ -631,7 +632,7 @@ class VIEW3D_MT_select_edit_lattice(Menu):
layout.separator()
- layout.operator("lattice.select_all", text="Select/Deselect All")
+ layout.operator("lattice.select_all", text=_("Select/Deselect All"))
class VIEW3D_MT_select_edit_armature(Menu):
@@ -644,25 +645,25 @@ class VIEW3D_MT_select_edit_armature(Menu):
layout.separator()
- layout.operator("armature.select_all", text="Select/Deselect All")
- layout.operator("armature.select_inverse", text="Inverse")
+ layout.operator("armature.select_all", text=_("Select/Deselect All"))
+ layout.operator("armature.select_inverse", text=_("Inverse"))
layout.separator()
- layout.operator("armature.select_hierarchy", text="Parent").direction = 'PARENT'
- layout.operator("armature.select_hierarchy", text="Child").direction = 'CHILD'
+ layout.operator("armature.select_hierarchy", text=_("Parent")).direction = 'PARENT'
+ layout.operator("armature.select_hierarchy", text=_("Child")).direction = 'CHILD'
layout.separator()
- props = layout.operator("armature.select_hierarchy", text="Extend Parent")
+ props = layout.operator("armature.select_hierarchy", text=_("Extend Parent"))
props.extend = True
props.direction = 'PARENT'
- props = layout.operator("armature.select_hierarchy", text="Extend Child")
+ props = layout.operator("armature.select_hierarchy", text=_("Extend Child"))
props.extend = True
props.direction = 'CHILD'
- layout.operator("object.select_pattern", text="Select Pattern...")
+ layout.operator("object.select_pattern", text=_("Select Pattern..."))
class VIEW3D_MT_select_face(Menu): # XXX no matching enum
@@ -705,11 +706,11 @@ class VIEW3D_MT_object(Menu):
layout.operator("object.duplicate_move")
layout.operator("object.duplicate_move_linked")
- layout.operator("object.delete", text="Delete...")
- layout.operator("object.proxy_make", text="Make Proxy...")
- layout.menu("VIEW3D_MT_make_links", text="Make Links...")
+ layout.operator("object.delete", text=_("Delete..."))
+ layout.operator("object.proxy_make", text=_("Make Proxy..."))
+ layout.menu("VIEW3D_MT_make_links", text=_("Make Links..."))
layout.operator("object.make_dupli_face")
- layout.operator_menu_enum("object.make_local", "type", text="Make Local...")
+ layout.operator_menu_enum("object.make_local", "type", text=_("Make Local..."))
layout.menu("VIEW3D_MT_make_single_user")
layout.separator()
@@ -730,7 +731,7 @@ class VIEW3D_MT_object(Menu):
layout.separator()
- layout.operator("object.move_to_layer", text="Move to Layer...")
+ layout.operator("object.move_to_layer", text=_("Move to Layer..."))
layout.menu("VIEW3D_MT_object_showhide")
layout.operator_menu_enum("object.convert", "target")
@@ -742,9 +743,9 @@ class VIEW3D_MT_object_animation(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...")
- layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframe...")
- layout.operator("anim.keying_set_active_set", text="Change Keying Set...")
+ layout.operator("anim.keyframe_insert_menu", text=_("Insert Keyframe..."))
+ layout.operator("anim.keyframe_delete_v3d", text=_("Delete Keyframe..."))
+ layout.operator("anim.keying_set_active_set", text=_("Change Keying Set..."))
class VIEW3D_MT_object_clear(Menu):
@@ -753,10 +754,10 @@ class VIEW3D_MT_object_clear(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.location_clear", text="Location")
- layout.operator("object.rotation_clear", text="Rotation")
- layout.operator("object.scale_clear", text="Scale")
- layout.operator("object.origin_clear", text="Origin")
+ layout.operator("object.location_clear", text=_("Location"))
+ layout.operator("object.rotation_clear", text=_("Rotation"))
+ layout.operator("object.scale_clear", text=_("Scale"))
+ layout.operator("object.origin_clear", text=_("Origin"))
class VIEW3D_MT_object_specials(Menu):
@@ -775,19 +776,19 @@ class VIEW3D_MT_object_specials(Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
if obj.data.type == 'PERSP':
- props = layout.operator("wm.context_modal_mouse", text="Camera Lens Angle")
+ props = layout.operator("wm.context_modal_mouse", text=_("Camera Lens Angle"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.lens"
props.input_scale = 0.1
else:
- props = layout.operator("wm.context_modal_mouse", text="Camera Lens Scale")
+ props = layout.operator("wm.context_modal_mouse", text=_("Camera Lens Scale"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.ortho_scale"
props.input_scale = 0.01
if not obj.data.dof_object:
#layout.label(text="Test Has DOF obj");
- props = layout.operator("wm.context_modal_mouse", text="DOF Distance")
+ props = layout.operator("wm.context_modal_mouse", text=_("DOF Distance"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.dof_distance"
props.input_scale = 0.02
@@ -795,12 +796,12 @@ class VIEW3D_MT_object_specials(Menu):
if obj.type in {'CURVE', 'FONT'}:
layout.operator_context = 'INVOKE_REGION_WIN'
- props = layout.operator("wm.context_modal_mouse", text="Extrude Size")
+ props = layout.operator("wm.context_modal_mouse", text=_("Extrude Size"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.extrude"
props.input_scale = 0.01
- props = layout.operator("wm.context_modal_mouse", text="Width Size")
+ props = layout.operator("wm.context_modal_mouse", text=_("Width Size"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.offset"
props.input_scale = 0.01
@@ -808,7 +809,7 @@ class VIEW3D_MT_object_specials(Menu):
if obj.type == 'EMPTY':
layout.operator_context = 'INVOKE_REGION_WIN'
- props = layout.operator("wm.context_modal_mouse", text="Empty Draw Size")
+ props = layout.operator("wm.context_modal_mouse", text=_("Empty Draw Size"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "empty_draw_size"
props.input_scale = 0.01
@@ -816,34 +817,34 @@ class VIEW3D_MT_object_specials(Menu):
if obj.type == 'LAMP':
layout.operator_context = 'INVOKE_REGION_WIN'
- props = layout.operator("wm.context_modal_mouse", text="Energy")
+ props = layout.operator("wm.context_modal_mouse", text=_("Energy"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.energy"
if obj.data.type in {'SPOT', 'AREA', 'POINT'}:
- props = layout.operator("wm.context_modal_mouse", text="Falloff Distance")
+ props = layout.operator("wm.context_modal_mouse", text=_("Falloff Distance"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.distance"
props.input_scale = 0.1
if obj.data.type == 'SPOT':
layout.separator()
- props = layout.operator("wm.context_modal_mouse", text="Spot Size")
+ props = layout.operator("wm.context_modal_mouse", text=_("Spot Size"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.spot_size"
props.input_scale = 0.01
- props = layout.operator("wm.context_modal_mouse", text="Spot Blend")
+ props = layout.operator("wm.context_modal_mouse", text=_("Spot Blend"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.spot_blend"
props.input_scale = -0.01
- props = layout.operator("wm.context_modal_mouse", text="Clip Start")
+ props = layout.operator("wm.context_modal_mouse", text=_("Clip Start"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.shadow_buffer_clip_start"
props.input_scale = 0.05
- props = layout.operator("wm.context_modal_mouse", text="Clip End")
+ props = layout.operator("wm.context_modal_mouse", text=_("Clip End"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.shadow_buffer_clip_end"
props.input_scale = 0.05
@@ -860,16 +861,16 @@ class VIEW3D_MT_object_apply(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.transform_apply", text="Location").location = True
- layout.operator("object.transform_apply", text="Rotation").rotation = True
- layout.operator("object.transform_apply", text="Scale").scale = True
- props = layout.operator("object.transform_apply", text="Rotation & Scale")
+ layout.operator("object.transform_apply", text=_("Location")).location = True
+ layout.operator("object.transform_apply", text=_("Rotation")).rotation = True
+ layout.operator("object.transform_apply", text=_("Scale")).scale = True
+ props = layout.operator("object.transform_apply", text=_("Rotation & Scale"))
props.scale = True
props.rotation = True
layout.separator()
- layout.operator("object.visual_transform_apply", text="Visual Transform")
+ layout.operator("object.visual_transform_apply", text=_("Visual Transform"))
layout.operator("object.duplicates_make_real")
@@ -879,8 +880,8 @@ class VIEW3D_MT_object_parent(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.parent_set", text="Set")
- layout.operator("object.parent_clear", text="Clear")
+ layout.operator("object.parent_set", text=_("Set"))
+ layout.operator("object.parent_clear", text=_("Clear"))
class VIEW3D_MT_object_track(Menu):
@@ -889,8 +890,8 @@ class VIEW3D_MT_object_track(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.track_set", text="Set")
- layout.operator("object.track_clear", text="Clear")
+ layout.operator("object.track_set", text=_("Set"))
+ layout.operator("object.track_clear", text=_("Clear"))
class VIEW3D_MT_object_group(Menu):
@@ -925,9 +926,9 @@ class VIEW3D_MT_object_showhide(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.hide_view_clear", text="Show Hidden")
- layout.operator("object.hide_view_set", text="Hide Selected")
- layout.operator("object.hide_view_set", text="Hide Unselected").unselected = True
+ layout.operator("object.hide_view_clear", text=_("Show Hidden"))
+ layout.operator("object.hide_view_set", text=_("Hide Selected"))
+ layout.operator("object.hide_view_set", text=_("Hide Unselected")).unselected = True
class VIEW3D_MT_make_single_user(Menu):
@@ -936,19 +937,19 @@ class VIEW3D_MT_make_single_user(Menu):
def draw(self, context):
layout = self.layout
- props = layout.operator("object.make_single_user", text="Object")
+ props = layout.operator("object.make_single_user", text=_("Object"))
props.object = True
- props = layout.operator("object.make_single_user", text="Object & Data")
+ props = layout.operator("object.make_single_user", text=_("Object & Data"))
props.object = props.obdata = True
- props = layout.operator("object.make_single_user", text="Object & Data & Materials+Tex")
+ props = layout.operator("object.make_single_user", text=_("Object & Data & Materials+Tex"))
props.object = props.obdata = props.material = props.texture = True
- props = layout.operator("object.make_single_user", text="Materials+Tex")
+ props = layout.operator("object.make_single_user", text=_("Materials+Tex"))
props.material = props.texture = True
- props = layout.operator("object.make_single_user", text="Object Animation")
+ props = layout.operator("object.make_single_user", text=_("Object Animation"))
props.animation = True
@@ -960,11 +961,11 @@ class VIEW3D_MT_make_links(Menu):
if(len(bpy.data.scenes) > 10):
layout.operator_context = 'INVOKE_DEFAULT'
- layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY')
- layout.operator("object.make_links_scene", text="Markers to Scene...", icon='OUTLINER_OB_EMPTY')
+ layout.operator("object.make_links_scene", text=_("Objects to Scene..."), icon='OUTLINER_OB_EMPTY')
+ layout.operator("object.make_links_scene", text=_("Markers to Scene..."), icon='OUTLINER_OB_EMPTY')
else:
- layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...")
- layout.operator_menu_enum("marker.make_links_scene", "scene", text="Markers to Scene...")
+ layout.operator_menu_enum("object.make_links_scene", "scene", text=_("Objects to Scene..."))
+ layout.operator_menu_enum("marker.make_links_scene", "scene", text=_("Markers to Scene..."))
layout.operator_enum("object.make_links_data", "type") # inline
@@ -975,13 +976,13 @@ class VIEW3D_MT_object_game(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.logic_bricks_copy", text="Copy Logic Bricks")
+ layout.operator("object.logic_bricks_copy", text=_("Copy Logic Bricks"))
layout.separator()
- layout.operator("object.game_property_copy", text="Replace Properties").operation = 'REPLACE'
- layout.operator("object.game_property_copy", text="Merge Properties").operation = 'MERGE'
- layout.operator_menu_enum("object.game_property_copy", "property", text="Copy Properties...")
+ layout.operator("object.game_property_copy", text=_("Replace Properties")).operation = 'REPLACE'
+ layout.operator("object.game_property_copy", text=_("Merge Properties")).operation = 'MERGE'
+ layout.operator_menu_enum("object.game_property_copy", "property", text=_("Copy Properties..."))
layout.separator()
@@ -1031,21 +1032,21 @@ class VIEW3D_MT_vertex_group(Menu):
def draw(self, context):
layout = self.layout
layout.operator_context = 'EXEC_AREA'
- layout.operator("object.vertex_group_assign", text="Assign to New Group").new = True
+ layout.operator("object.vertex_group_assign", text=_("Assign to New Group")).new = True
ob = context.active_object
if ob.mode == 'EDIT':
if ob.vertex_groups.active:
layout.separator()
- layout.operator("object.vertex_group_assign", text="Assign to Active Group")
- layout.operator("object.vertex_group_remove_from", text="Remove from Active Group")
- layout.operator("object.vertex_group_remove_from", text="Remove from All").all = True
+ layout.operator("object.vertex_group_assign", text=_("Assign to Active Group"))
+ layout.operator("object.vertex_group_remove_from", text=_("Remove from Active Group"))
+ layout.operator("object.vertex_group_remove_from", text=_("Remove from All")).all = True
layout.separator()
if ob.vertex_groups.active:
- layout.operator_menu_enum("object.vertex_group_set_active", "group", text="Set Active Group")
- layout.operator("object.vertex_group_remove", text="Remove Active Group")
- layout.operator("object.vertex_group_remove", text="Remove All Groups").all = True
+ layout.operator_menu_enum("object.vertex_group_set_active", "group", text=_("Set Active Group"))
+ layout.operator("object.vertex_group_remove", text=_("Remove Active Group"))
+ layout.operator("object.vertex_group_remove", text=_("Remove All Groups")).all = True
# ********** Weight paint menu **********
@@ -1062,16 +1063,17 @@ class VIEW3D_MT_paint_weight(Menu):
layout.separator()
- layout.operator("paint.weight_from_bones", text="Assign Automatic From Bones").type = 'AUTOMATIC'
- layout.operator("paint.weight_from_bones", text="Assign From Bone Envelopes").type = 'ENVELOPES'
+ layout.operator("paint.weight_from_bones", text=_("Assign Automatic From Bones")).type = 'AUTOMATIC'
+ layout.operator("paint.weight_from_bones", text=_("Assign From Bone Envelopes")).type = 'ENVELOPES'
layout.separator()
- layout.operator("object.vertex_group_normalize_all", text="Normalize All")
- layout.operator("object.vertex_group_normalize", text="Normalize")
- layout.operator("object.vertex_group_invert", text="Invert")
- layout.operator("object.vertex_group_clean", text="Clean")
- layout.operator("object.vertex_group_levels", text="Levels")
+ layout.operator("object.vertex_group_normalize_all", text=_("Normalize All"))
+ layout.operator("object.vertex_group_normalize", text=_("Normalize"))
+ layout.operator("object.vertex_group_invert", text=_("Invert"))
+ layout.operator("object.vertex_group_clean", text=_("Clean"))
+ layout.operator("object.vertex_group_levels", text=_("Levels"))
+ layout.operator("object.vertex_group_fix", text="Fix Deforms")
layout.separator()
@@ -1120,12 +1122,12 @@ class VIEW3D_MT_sculpt(Menu):
layout.operator("sculpt.set_persistent_base")
layout.separator()
- layout.prop(sculpt, "use_threaded", text="Threaded Sculpt")
+ layout.prop(sculpt, "use_threaded", text=_("Threaded Sculpt"))
layout.prop(sculpt, "show_brush")
# TODO, make availabel from paint menu!
- layout.prop(tool_settings, "sculpt_paint_use_unified_size", text="Unify Size")
- layout.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Unify Strength")
+ layout.prop(tool_settings, "sculpt_paint_use_unified_size", text=_("Unify Size"))
+ layout.prop(tool_settings, "sculpt_paint_use_unified_strength", text=_("Unify Strength"))
# ********** Particle menu **********
@@ -1218,7 +1220,7 @@ class VIEW3D_MT_pose(Menu):
layout.operator("pose.copy")
layout.operator("pose.paste")
- layout.operator("pose.paste", text="Paste X-Flipped Pose").flipped = True
+ layout.operator("pose.paste", text=_("Paste X-Flipped Pose")).flipped = True
layout.separator()
@@ -1235,9 +1237,9 @@ class VIEW3D_MT_pose(Menu):
layout.separator()
layout.operator_context = 'EXEC_AREA'
- layout.operator("pose.autoside_names", text="AutoName Left/Right").axis = 'XAXIS'
- layout.operator("pose.autoside_names", text="AutoName Front/Back").axis = 'YAXIS'
- layout.operator("pose.autoside_names", text="AutoName Top/Bottom").axis = 'ZAXIS'
+ layout.operator("pose.autoside_names", text=_("AutoName Left/Right")).axis = 'XAXIS'
+ layout.operator("pose.autoside_names", text=_("AutoName Front/Back")).axis = 'YAXIS'
+ layout.operator("pose.autoside_names", text=_("AutoName Top/Bottom")).axis = 'ZAXIS'
layout.operator("pose.flip_names")
@@ -1246,13 +1248,13 @@ class VIEW3D_MT_pose(Menu):
layout.separator()
layout.operator_context = 'INVOKE_AREA'
- layout.operator("pose.armature_layers", text="Change Armature Layers...")
- layout.operator("pose.bone_layers", text="Change Bone Layers...")
+ layout.operator("pose.armature_layers", text=_("Change Armature Layers..."))
+ layout.operator("pose.bone_layers", text=_("Change Bone Layers..."))
layout.separator()
layout.menu("VIEW3D_MT_pose_showhide")
- layout.menu("VIEW3D_MT_bone_options_toggle", text="Bone Settings")
+ layout.menu("VIEW3D_MT_bone_options_toggle", text=_("Bone Settings"))
class VIEW3D_MT_pose_transform(Menu):
@@ -1261,17 +1263,17 @@ class VIEW3D_MT_pose_transform(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("pose.transforms_clear", text="All")
+ layout.operator("pose.transforms_clear", text=_("All"))
layout.separator()
- layout.operator("pose.loc_clear", text="Location")
- layout.operator("pose.rot_clear", text="Rotation")
- layout.operator("pose.scale_clear", text="Scale")
+ layout.operator("pose.loc_clear", text=_("Location"))
+ layout.operator("pose.rot_clear", text=_("Rotation"))
+ layout.operator("pose.scale_clear", text=_("Scale"))
layout.separator()
- layout.operator("pose.user_transforms_clear", text="Reset unkeyed")
+ layout.operator("pose.user_transforms_clear", text=_("Reset unkeyed"))
class VIEW3D_MT_pose_slide(Menu):
@@ -1295,12 +1297,12 @@ class VIEW3D_MT_pose_propagate(Menu):
layout.separator()
- layout.operator("pose.propagate", text="To Next Keyframe").mode = 'NEXT_KEY'
- layout.operator("pose.propagate", text="To Last Keyframe (Make Cyclic)").mode = 'LAST_KEY'
+ layout.operator("pose.propagate", text=_("To Next Keyframe")).mode = 'NEXT_KEY'
+ layout.operator("pose.propagate", text=_("To Last Keyframe (Make Cyclic)")).mode = 'LAST_KEY'
layout.separator()
- layout.operator("pose.propagate", text="On Selected Markers").mode = 'SELECTED_MARKERS'
+ layout.operator("pose.propagate", text=_("On Selected Markers")).mode = 'SELECTED_MARKERS'
class VIEW3D_MT_pose_library(Menu):
@@ -1309,13 +1311,13 @@ class VIEW3D_MT_pose_library(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("poselib.browse_interactive", text="Browse Poses...")
+ layout.operator("poselib.browse_interactive", text=_("Browse Poses..."))
layout.separator()
- layout.operator("poselib.pose_add", text="Add Pose...")
- layout.operator("poselib.pose_rename", text="Rename Pose...")
- layout.operator("poselib.pose_remove", text="Remove Pose...")
+ layout.operator("poselib.pose_add", text=_("Add Pose..."))
+ layout.operator("poselib.pose_rename", text=_("Rename Pose..."))
+ layout.operator("poselib.pose_remove", text=_("Remove Pose..."))
class VIEW3D_MT_pose_motion(Menu):
@@ -1324,8 +1326,8 @@ class VIEW3D_MT_pose_motion(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("pose.paths_calculate", text="Calculate")
- layout.operator("pose.paths_clear", text="Clear")
+ layout.operator("pose.paths_calculate", text=_("Calculate"))
+ layout.operator("pose.paths_clear", text=_("Clear"))
class VIEW3D_MT_pose_group(Menu):
@@ -1358,7 +1360,7 @@ class VIEW3D_MT_pose_constraints(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("pose.constraint_add_with_targets", text="Add (With Targets)...")
+ layout.operator("pose.constraint_add_with_targets", text=_("Add (With Targets)..."))
layout.operator("pose.constraints_copy")
layout.operator("pose.constraints_clear")
@@ -1368,7 +1370,7 @@ class VIEW3D_MT_pose_showhide(ShowHideMenu, Menu):
class VIEW3D_MT_pose_apply(Menu):
- bl_label = "Apply"
+ bl_label = _("Apply")
def draw(self, context):
layout = self.layout
@@ -1443,14 +1445,14 @@ class VIEW3D_MT_edit_mesh(Menu):
layout.separator()
- layout.menu("VIEW3D_MT_uv_map", text="UV Unwrap...")
+ layout.menu("VIEW3D_MT_uv_map", text=_("UV Unwrap..."))
layout.separator()
- layout.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region")
- layout.operator("view3d.edit_mesh_extrude_individual_move", text="Extrude Individual")
+ layout.operator("view3d.edit_mesh_extrude_move_normal", text=_("Extrude Region"))
+ layout.operator("view3d.edit_mesh_extrude_individual_move", text=_("Extrude Individual"))
layout.operator("mesh.duplicate_move")
- layout.operator("mesh.delete", text="Delete...")
+ layout.operator("mesh.delete", text=_("Delete..."))
layout.separator()
@@ -1478,15 +1480,15 @@ class VIEW3D_MT_edit_mesh_specials(Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("mesh.subdivide", text="Subdivide")
- layout.operator("mesh.subdivide", text="Subdivide Smooth").smoothness = 1.0
- layout.operator("mesh.merge", text="Merge...")
+ layout.operator("mesh.subdivide", text=_("Subdivide"))
+ 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.reveal", text="Reveal")
+ layout.operator("mesh.hide", text=_("Hide"))
+ layout.operator("mesh.reveal", text=_("Reveal"))
layout.operator("mesh.select_inverse")
layout.operator("mesh.flip_normals")
- layout.operator("mesh.vertices_smooth", text="Smooth")
+ layout.operator("mesh.vertices_smooth", text=_("Smooth"))
# layout.operator("mesh.bevel", text="Bevel")
layout.operator("mesh.faces_shade_smooth")
layout.operator("mesh.faces_shade_flat")
@@ -1503,15 +1505,15 @@ class VIEW3D_MT_edit_mesh_select_mode(Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
- prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
+ prop = layout.operator("wm.context_set_value", text=_("Vertex"), icon='VERTEXSEL')
prop.value = "(True, False, False)"
prop.data_path = "tool_settings.mesh_select_mode"
- prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
+ prop = layout.operator("wm.context_set_value", text=_("Edge"), icon='EDGESEL')
prop.value = "(False, True, False)"
prop.data_path = "tool_settings.mesh_select_mode"
- prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
+ prop = layout.operator("wm.context_set_value", text=_("Face"), icon='FACESEL')
prop.value = "(False, False, True)"
prop.data_path = "tool_settings.mesh_select_mode"
@@ -1520,10 +1522,10 @@ class VIEW3D_MT_edit_mesh_extrude(Menu):
bl_label = "Extrude"
_extrude_funcs = { \
- "VERT": lambda layout: layout.operator("mesh.extrude_vertices_move", text="Vertices Only"),
- "EDGE": lambda layout: layout.operator("mesh.extrude_edges_move", text="Edges Only"),
- "FACE": lambda layout: layout.operator("mesh.extrude_faces_move", text="Individual Faces"),
- "REGION": lambda layout: layout.operator("view3d.edit_mesh_extrude_move_normal", text="Region"),
+ "VERT": lambda layout: layout.operator("mesh.extrude_vertices_move", text=_("Vertices Only")),
+ "EDGE": lambda layout: layout.operator("mesh.extrude_edges_move", text=_("Edges Only")),
+ "FACE": lambda layout: layout.operator("mesh.extrude_faces_move", text=_("Individual Faces")),
+ "REGION": lambda layout: layout.operator("view3d.edit_mesh_extrude_move_normal", text=_("Region")),
}
@staticmethod
@@ -1650,28 +1652,28 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
layout.separator()
layout.operator("mesh.mark_seam")
- layout.operator("mesh.mark_seam", text="Clear Seam").clear = True
+ layout.operator("mesh.mark_seam", text=_("Clear Seam")).clear = True
layout.separator()
layout.operator("mesh.mark_sharp")
- layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
+ layout.operator("mesh.mark_sharp", text=_("Clear Sharp")).clear = True
layout.separator()
- layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
- layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").direction = 'CCW'
+ layout.operator("mesh.edge_rotate", text=_("Rotate Edge CW")).direction = 'CW'
+ layout.operator("mesh.edge_rotate", text=_("Rotate Edge CCW")).direction = 'CCW'
layout.separator()
layout.operator("TRANSFORM_OT_edge_slide")
layout.operator("TRANSFORM_OT_edge_crease")
- layout.operator("mesh.loop_multi_select", text="Edge Loop")
+ layout.operator("mesh.loop_multi_select", text=_("Edge Loop"))
# uiItemO(layout, "Loopcut", 0, "mesh.loop_cut"); // CutEdgeloop(em, 1);
# uiItemO(layout, "Edge Slide", 0, "mesh.edge_slide"); // EdgeSlide(em, 0,0.0);
- layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True
+ layout.operator("mesh.loop_multi_select", text=_("Edge Ring")).ring = True
layout.operator("mesh.loop_to_region")
layout.operator("mesh.region_to_loop")
@@ -1715,7 +1717,7 @@ class VIEW3D_MT_edit_mesh_faces(Menu):
# uiItemO(layout, NULL, 0, "mesh.face_mode"); // mesh_set_face_flags(em, 1);
# uiItemBooleanO(layout, NULL, 0, "mesh.face_mode", "clear", 1); // mesh_set_face_flags(em, 0);
- layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
+ layout.operator("mesh.edge_rotate", text=_("Rotate Edge CW")).direction = 'CW'
layout.separator()
@@ -1731,8 +1733,8 @@ class VIEW3D_MT_edit_mesh_normals(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("mesh.normals_make_consistent", text="Recalculate Outside")
- layout.operator("mesh.normals_make_consistent", text="Recalculate Inside").inside = True
+ layout.operator("mesh.normals_make_consistent", text=_("Recalculate Outside"))
+ layout.operator("mesh.normals_make_consistent", text=_("Recalculate Inside")).inside = True
layout.separator()
@@ -1762,7 +1764,7 @@ def draw_curve(self, context):
layout.operator("curve.separate")
layout.operator("curve.make_segment")
layout.operator("curve.cyclic_toggle")
- layout.operator("curve.delete", text="Delete...")
+ layout.operator("curve.delete", text=_("Delete..."))
layout.separator()
@@ -1794,7 +1796,7 @@ class VIEW3D_MT_edit_curve_ctrlpoints(Menu):
edit_object = context.edit_object
if edit_object.type == 'CURVE':
- layout.operator("transform.transform", text="Tilt").mode = 'TILT'
+ layout.operator("transform.transform", text=_("Tilt")).mode = 'TILT'
layout.operator("curve.tilt_clear")
layout.operator("curve.separate")
@@ -1855,10 +1857,10 @@ class VIEW3D_MT_edit_font(Menu):
layout.separator()
- layout.operator("font.style_toggle", text="Toggle Bold").style = 'BOLD'
- layout.operator("font.style_toggle", text="Toggle Italic").style = 'ITALIC'
- layout.operator("font.style_toggle", text="Toggle Underline").style = 'UNDERLINE'
- layout.operator("font.style_toggle", text="Toggle Small Caps").style = 'SMALL_CAPS'
+ layout.operator("font.style_toggle", text=_("Toggle Bold")).style = 'BOLD'
+ layout.operator("font.style_toggle", text=_("Toggle Italic")).style = 'ITALIC'
+ layout.operator("font.style_toggle", text=_("Toggle Underline")).style = 'UNDERLINE'
+ layout.operator("font.style_toggle", text=_("Toggle Small Caps")).style = 'SMALL_CAPS'
class VIEW3D_MT_edit_text_chars(Menu):
@@ -1915,7 +1917,7 @@ class VIEW3D_MT_edit_meta(Menu):
layout.separator()
- layout.operator("mball.delete_metaelems", text="Delete...")
+ layout.operator("mball.delete_metaelems", text=_("Delete..."))
layout.operator("mball.duplicate_metaelems")
layout.separator()
@@ -1934,9 +1936,9 @@ class VIEW3D_MT_edit_meta_showhide(Menu):
def draw(self, context):
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 Unselected").unselected = True
+ layout.operator("mball.reveal_metaelems", text=_("Show Hidden"))
+ layout.operator("mball.hide_metaelems", text=_("Hide Selected"))
+ layout.operator("mball.hide_metaelems", text=_("Hide Unselected")).unselected = True
class VIEW3D_MT_edit_lattice(Menu):
@@ -1990,15 +1992,15 @@ class VIEW3D_MT_edit_armature(Menu):
layout.separator()
- layout.operator("armature.subdivide", text="Subdivide")
- layout.operator("armature.switch_direction", text="Switch Direction")
+ layout.operator("armature.subdivide", text=_("Subdivide"))
+ layout.operator("armature.switch_direction", text=_("Switch Direction"))
layout.separator()
layout.operator_context = 'EXEC_AREA'
- layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS'
- layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS'
- layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Left/Right")).type = 'XAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Front/Back")).type = 'YAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Top/Bottom")).type = 'ZAXIS'
layout.operator("armature.flip_names")
layout.separator()
@@ -2013,7 +2015,7 @@ class VIEW3D_MT_edit_armature(Menu):
layout.separator()
- layout.menu("VIEW3D_MT_bone_options_toggle", text="Bone Settings")
+ layout.menu("VIEW3D_MT_bone_options_toggle", text=_("Bone Settings"))
class VIEW3D_MT_armature_specials(Menu):
@@ -2024,16 +2026,16 @@ class VIEW3D_MT_armature_specials(Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("armature.subdivide", text="Subdivide")
- layout.operator("armature.switch_direction", text="Switch Direction")
+ layout.operator("armature.subdivide", text=_("Subdivide"))
+ layout.operator("armature.switch_direction", text=_("Switch Direction"))
layout.separator()
layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS'
- layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS'
- layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS'
- layout.operator("armature.flip_names", text="Flip Names")
+ layout.operator("armature.autoside_names", text=_("AutoName Left/Right")).type = 'XAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Front/Back")).type = 'YAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Top/Bottom")).type = 'ZAXIS'
+ layout.operator("armature.flip_names", text=_("Flip Names"))
class VIEW3D_MT_edit_armature_parent(Menu):
@@ -2042,8 +2044,8 @@ class VIEW3D_MT_edit_armature_parent(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("armature.parent_set", text="Make")
- layout.operator("armature.parent_clear", text="Clear")
+ layout.operator("armature.parent_set", text=_("Make"))
+ layout.operator("armature.parent_clear", text=_("Clear"))
class VIEW3D_MT_edit_armature_roll(Menu):
@@ -2056,7 +2058,7 @@ class VIEW3D_MT_edit_armature_roll(Menu):
layout.separator()
- layout.operator("transform.transform", text="Set Roll").mode = 'BONE_ROLL'
+ layout.operator("transform.transform", text=_("Set Roll")).mode = 'BONE_ROLL'
# ********** Panel **********
@@ -2079,26 +2081,26 @@ class VIEW3D_PT_view3d_properties(Panel):
col = layout.column()
col.active = view.region_3d.view_perspective != 'CAMERA'
col.prop(view, "lens")
- col.label(text="Lock to Object:")
+ col.label(text=_("Lock to Object:"))
col.prop(view, "lock_object", text="")
lock_object = view.lock_object
if lock_object:
if lock_object.type == 'ARMATURE':
col.prop_search(view, "lock_bone", lock_object.data, "edit_bones" if lock_object.mode == 'EDIT' else "bones", text="")
else:
- col.prop(view, "lock_cursor", text="Lock to Cursor")
+ col.prop(view, "lock_cursor", text=_("Lock to Cursor"))
col = layout.column()
col.prop(view, "lock_camera")
col = layout.column(align=True)
- col.label(text="Clip:")
- col.prop(view, "clip_start", text="Start")
- col.prop(view, "clip_end", text="End")
+ col.label(text=_("Clip:"))
+ col.prop(view, "clip_start", text=_("Start"))
+ col.prop(view, "clip_end", text=_("End"))
subcol = col.column()
subcol.enabled = not view.lock_camera_and_layers
- subcol.label(text="Local Camera:")
+ subcol.label(text=_("Local Camera:"))
subcol.prop(view, "camera", text="")
layout.column().prop(view, "cursor_location")
@@ -2164,7 +2166,7 @@ class VIEW3D_PT_view3d_display(Panel):
col = layout.column()
col.active = display_all
split = col.split(percentage=0.55)
- split.prop(view, "show_floor", text="Grid Floor")
+ split.prop(view, "show_floor", text=_("Grid Floor"))
row = split.row(align=True)
row.prop(view, "show_axis_x", text="X", toggle=True)
@@ -2173,14 +2175,14 @@ class VIEW3D_PT_view3d_display(Panel):
sub = col.column(align=True)
sub.active = (display_all and view.show_floor)
- sub.prop(view, "grid_lines", text="Lines")
- sub.prop(view, "grid_scale", text="Scale")
+ sub.prop(view, "grid_lines", text=_("Lines"))
+ sub.prop(view, "grid_scale", text=_("Scale"))
subsub = sub.column(align=True)
subsub.active = scene.unit_settings.system == 'NONE'
- subsub.prop(view, "grid_subdivisions", text="Subdivisions")
+ subsub.prop(view, "grid_subdivisions", text=_("Subdivisions"))
col = layout.column()
- col.label(text="Shading:")
+ col.label(text=_("Shading:"))
col.prop(gs, "material_mode", text="")
col.prop(view, "show_textured_solid")
@@ -2188,7 +2190,7 @@ class VIEW3D_PT_view3d_display(Panel):
region = view.region_quadview
- layout.operator("screen.region_quadview", text="Toggle Quad View")
+ layout.operator("screen.region_quadview", text=_("Toggle Quad View"))
if region:
col = layout.column()
@@ -2217,22 +2219,22 @@ class VIEW3D_PT_view3d_meshdisplay(Panel):
mesh = context.active_object.data
col = layout.column()
- col.label(text="Overlays:")
- col.prop(mesh, "show_edges", text="Edges")
- col.prop(mesh, "show_faces", text="Faces")
- col.prop(mesh, "show_edge_crease", text="Creases")
- col.prop(mesh, "show_edge_bevel_weight", text="Bevel Weights")
- col.prop(mesh, "show_edge_seams", text="Seams")
- col.prop(mesh, "show_edge_sharp", text="Sharp")
+ col.label(text=_("Overlays:"))
+ col.prop(mesh, "show_edges", text=_("Edges"))
+ col.prop(mesh, "show_faces", text=_("Faces"))
+ col.prop(mesh, "show_edge_crease", text=_("Creases"))
+ col.prop(mesh, "show_edge_bevel_weight", text=_("Bevel Weights"))
+ col.prop(mesh, "show_edge_seams", text=_("Seams"))
+ col.prop(mesh, "show_edge_sharp", text=_("Sharp"))
col.separator()
- col.label(text="Normals:")
- col.prop(mesh, "show_normal_face", text="Face")
- col.prop(mesh, "show_normal_vertex", text="Vertex")
- col.prop(context.scene.tool_settings, "normal_size", text="Normal Size")
+ col.label(text=_("Normals:"))
+ col.prop(mesh, "show_normal_face", text=_("Face"))
+ col.prop(mesh, "show_normal_vertex", text=_("Vertex"))
+ col.prop(context.scene.tool_settings, "normal_size", text=_("Normal Size"))
col.separator()
- col.label(text="Numerics:")
+ col.label(text=_("Numerics:"))
col.prop(mesh, "show_extra_edge_length")
col.prop(mesh, "show_extra_face_angle")
col.prop(mesh, "show_extra_face_area")
@@ -2254,10 +2256,10 @@ class VIEW3D_PT_view3d_curvedisplay(Panel):
curve = context.active_object.data
col = layout.column()
- col.label(text="Overlays:")
- col.prop(curve, "show_handles", text="Handles")
- col.prop(curve, "show_normal_face", text="Normals")
- col.prop(context.scene.tool_settings, "normal_size", text="Normal Size")
+ col.label(text=_("Overlays:"))
+ col.prop(curve, "show_handles", text=_("Handles"))
+ col.prop(curve, "show_normal_face", text=_("Normals"))
+ col.prop(context.scene.tool_settings, "normal_size", text=_("Normal Size"))
class VIEW3D_PT_background_image(Panel):
@@ -2284,7 +2286,7 @@ class VIEW3D_PT_background_image(Panel):
view = context.space_data
col = layout.column()
- col.operator("view3d.background_image_add", text="Add Image")
+ col.operator("view3d.background_image_add", text=_("Add Image"))
for i, bg in enumerate(view.background_images):
layout.active = view.show_background_images
@@ -2294,10 +2296,10 @@ class VIEW3D_PT_background_image(Panel):
if bg.image:
row.prop(bg.image, "name", text="", emboss=False)
else:
- row.label(text="Not Set")
+ row.label(text=_("Not Set"))
row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i
- box.prop(bg, "view_axis", text="Axis")
+ box.prop(bg, "view_axis", text=_("Axis"))
if bg.show_expanded:
row = box.row()
@@ -2332,13 +2334,13 @@ class VIEW3D_PT_transform_orientations(Panel):
col = layout.column()
col.prop(view, "transform_orientation")
- col.operator("transform.create_orientation", text="Create")
+ col.operator("transform.create_orientation", text=_("Create"))
orientation = view.current_orientation
if orientation:
col.prop(orientation, "name")
- col.operator("transform.delete_orientation", text="Delete")
+ col.operator("transform.delete_orientation", text=_("Delete"))
class VIEW3D_PT_etch_a_ton(Panel):
@@ -2383,7 +2385,7 @@ class VIEW3D_PT_etch_a_ton(Panel):
col.prop(toolsettings, "etch_number")
col.prop(toolsettings, "etch_side")
- col.operator("sketch.convert", text="Convert")
+ col.operator("sketch.convert", text=_("Convert"))
class VIEW3D_PT_context_properties(Panel):
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index b71593add96..6bd2168dab9 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel
+from blf import gettext as _
class View3DPanel():
@@ -31,30 +32,33 @@ class View3DPanel():
# History/Repeat tools
def draw_repeat_tools(context, layout):
col = layout.column(align=True)
- col.label(text="Repeat:")
+ col.label(text=_("Repeat:"))
col.operator("screen.repeat_last")
- col.operator("screen.repeat_history", text="History...")
+ col.operator("screen.repeat_history", text=_("History..."))
# Keyframing tools
def draw_keyframing_tools(context, layout):
col = layout.column(align=True)
- col.label(text="Keyframes:")
+ col.label(text=_("Keyframes:"))
row = col.row()
- row.operator("anim.keyframe_insert_menu", text="Insert")
- row.operator("anim.keyframe_delete_v3d", text="Remove")
+ row.operator("anim.keyframe_insert_menu", text=_("Insert"))
+ row.operator("anim.keyframe_delete_v3d", text=_("Remove"))
# Grease Pencil tools
def draw_gpencil_tools(context, layout):
col = layout.column(align=True)
- col.label(text="Grease Pencil:")
+ col.label(text=_("Grease Pencil:"))
row = col.row()
- row.operator("gpencil.draw", text="Draw").mode = 'DRAW'
- row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT'
- row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
+ row.operator("gpencil.draw", text=_("Draw")).mode = 'DRAW'
+ row.operator("gpencil.draw", text=_("Line")).mode = 'DRAW_STRAIGHT'
+
+ row = col.row()
+ row.operator("gpencil.draw", text=_("Poly")).mode = 'DRAW_POLY'
+ row.operator("gpencil.draw", text=_("Erase")).mode = 'ERASER'
row = col.row()
row.prop(context.tool_settings, "use_grease_pencil_sessions")
@@ -70,16 +74,16 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
layout = self.layout
col = layout.column(align=True)
- col.label(text="Transform:")
+ col.label(text=_("Transform:"))
col.operator("transform.translate")
col.operator("transform.rotate")
- col.operator("transform.resize", text="Scale")
+ col.operator("transform.resize", text=_("Scale"))
col = layout.column(align=True)
- col.operator("object.origin_set", text="Origin")
+ col.operator("object.origin_set", text=_("Origin"))
col = layout.column(align=True)
- col.label(text="Object:")
+ col.label(text=_("Object:"))
col.operator("object.duplicate_move")
col.operator("object.delete")
col.operator("object.join")
@@ -88,17 +92,17 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
if active_object and active_object.type == 'MESH':
col = layout.column(align=True)
- col.label(text="Shading:")
+ col.label(text=_("Shading:"))
row = col.row(align=True)
- row.operator("object.shade_smooth", text="Smooth")
- row.operator("object.shade_flat", text="Flat")
+ row.operator("object.shade_smooth", text=_("Smooth"))
+ row.operator("object.shade_flat", text=_("Flat"))
draw_keyframing_tools(context, layout)
col = layout.column(align=True)
- col.label(text="Motion Paths:")
- col.operator("object.paths_calculate", text="Calculate Paths")
- col.operator("object.paths_clear", text="Clear Paths")
+ col.label(text=_("Motion Paths:"))
+ col.operator("object.paths_calculate", text=_("Calculate Paths"))
+ col.operator("object.paths_clear", text=_("Clear Paths"))
draw_repeat_tools(context, layout)
@@ -119,8 +123,8 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
col.operator("transform.translate")
col.operator("transform.rotate")
col.operator("transform.resize", text="Scale")
- col.operator("transform.shrink_fatten", text="Shrink/Fatten")
- col.operator("transform.push_pull", text="Push/Pull")
+ col.operator("transform.shrink_fatten", text=_("Shrink/Fatten"))
+ col.operator("transform.push_pull", text=_("Push/Pull"))
col = layout.column(align=True)
col.label(text="Deform:")
@@ -643,6 +647,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, Panel):
elif context.weight_paint_object and brush:
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
layout.prop(context.tool_settings, "use_auto_normalize", text="Auto Normalize")
+ layout.prop(context.tool_settings, "use_multipaint", text="Multi-Paint")
col = layout.column()
@@ -765,9 +770,9 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, Panel):
col = row.column()
if brush.use_texture_overlay:
- col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='MUTE_IPO_OFF')
+ col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_OFF')
else:
- col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='MUTE_IPO_ON')
+ col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='RESTRICT_VIEW_ON')
col.active = tex_slot.map_mode in {'FIXED', 'TILED'}
@@ -1012,7 +1017,7 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, Panel):
brush = settings.brush
if brush is None: # unlikely but can happen
- layout.label(text="Brush Unset")
+ layout.label(text=_("Brush Unset"))
return
col = layout.column()
@@ -1055,6 +1060,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel, Panel):
col.operator("object.vertex_group_invert", text="Invert")
col.operator("object.vertex_group_clean", text="Clean")
col.operator("object.vertex_group_levels", text="Levels")
+ col.operator("object.vertex_group_fix", text="Fix Deforms")
class VIEW3D_PT_tools_weightpaint_options(View3DPanel, Panel):
diff --git a/release/scripts/templates/operator_export.py b/release/scripts/templates/operator_export.py
index b1d53e6ee0c..3a7040ae2d2 100644
--- a/release/scripts/templates/operator_export.py
+++ b/release/scripts/templates/operator_export.py
@@ -41,7 +41,7 @@ class ExportSomeData(bpy.types.Operator, ExportHelper):
name="Example Enum",
description="Choose between two items",
items=(('OPT_A', "First Option", "Description one"),
- ('OPT_B', "Second Option", "Description two.")),
+ ('OPT_B', "Second Option", "Description two")),
default='OPT_A',
)
diff --git a/source/blender/avi/intern/avirgb.c b/source/blender/avi/intern/avirgb.c
index b7f6a58b6d7..7050aec9bf6 100644
--- a/source/blender/avi/intern/avirgb.c
+++ b/source/blender/avi/intern/avirgb.c
@@ -42,11 +42,6 @@
#include "MEM_guardedalloc.h"
#include "avirgb.h"
-#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
-#define WORDS_BIGENDIAN
-#endif
-
-
/* implementation */
void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *buffer, int *size) {
@@ -63,9 +58,9 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu
if (bits==16) {
unsigned short *pxl;
unsigned char *to;
- #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
unsigned char *pxla;
- #endif
+#endif
buf = MEM_mallocN (movie->header->Height * movie->header->Width * 3, "fromavirgbbuf");
@@ -75,19 +70,19 @@ void *avi_converter_from_avi_rgb (AviMovie *movie, int stream, unsigned char *bu
while (y--) {
pxl= (unsigned short *) (buffer + y * movie->header->Width * 2);
- #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
pxla= (unsigned char *)pxl;
- #endif
+#endif
x= movie->header->Width;
while (x--) {
- #ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
i= pxla[0];
pxla[0]= pxla[1];
pxla[1]= i;
pxla+=2;
- #endif
+#endif
*(to++)= ((*pxl>>10)&0x1f)*8;
*(to++)= ((*pxl>>5)&0x1f)*8;
diff --git a/source/blender/avi/intern/endian.c b/source/blender/avi/intern/endian.c
index a985e8c3d5e..50ec2330beb 100644
--- a/source/blender/avi/intern/endian.c
+++ b/source/blender/avi/intern/endian.c
@@ -43,11 +43,7 @@
#include "endian.h"
#include "avi_intern.h"
-#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
-#define WORDS_BIGENDIAN
-#endif
-
-#ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
static void invert (int *num) {
int new=0,i,j;
@@ -79,7 +75,7 @@ static void Ichunk (AviChunk *chunk) {
}
#endif
-#ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
static void Ilist (AviList *list){
invert (&list->fcc);
invert (&list->size);
@@ -159,10 +155,10 @@ static void Iindexe (AviIndexEntry *indexe) {
invert (&indexe->Offset);
invert (&indexe->Size);
}
-#endif /* WORDS_BIGENDIAN */
+#endif /* __BIG_ENDIAN__ */
void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int type) {
-#ifdef WORDS_BIGENDIAN
+#ifdef __BIG_ENDIAN__
void *data;
data = MEM_mallocN (size, "avi endian");
@@ -209,9 +205,9 @@ void awrite (AviMovie *movie, void *datain, int block, int size, FILE *fp, int t
}
MEM_freeN (data);
-#else /* WORDS_BIGENDIAN */
+#else /* __BIG_ENDIAN__ */
(void)movie; /* unused */
(void)type; /* unused */
fwrite (datain, block, size, fp);
-#endif /* WORDS_BIGENDIAN */
+#endif /* __BIG_ENDIAN__ */
}
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index 57f8c83eda6..1bb61d02b78 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -66,7 +66,7 @@ void BLF_size(int fontid, int size, int dpi);
| m[3] m[7] m[11] m[15] |
*/
-void BLF_matrix(int fontid, double *m);
+void BLF_matrix(int fontid, const double m[16]);
/* Draw the string using the default font, size and dpi. */
void BLF_draw_default(float x, float y, float z, const char *str, size_t len);
@@ -178,20 +178,6 @@ void BLF_buffer_col(int fontid, float r, float g, float b, float a);
*/
void BLF_draw_buffer(int fontid, const char *str);
-/*
- * Search the path directory to the locale files, this try all
- * the case for Linux, Win and Mac.
- */
-void BLF_lang_init(void);
-
-/* Set the current locale. */
-void BLF_lang_set(const char *);
-
-/* Set the current encoding name. */
-void BLF_lang_encoding_name(const char *str);
-
-void BLF_lang_encoding(const char *str);
-
/* Add a path to the font dir paths. */
void BLF_dir_add(const char *path);
diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h
new file mode 100644
index 00000000000..4377d391354
--- /dev/null
+++ b/source/blender/blenfont/BLF_translation.h
@@ -0,0 +1,66 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation,
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenfont/BLF_translation.h
+ * \ingroup blf
+ */
+
+
+#ifndef BLF_TRANSLATION_H
+#define BLF_TRANSLATION_H
+
+/* blf_translation.c */
+
+#ifdef INTERNATIONAL
+unsigned char *BLF_get_unifont(int *unifont_size);
+void BLF_free_unifont(void);
+#endif
+
+const char* BLF_gettext(const char *msgid);
+
+/* blf_lang.c */
+
+/*
+ * Search the path directory to the locale files, this try all
+ * the case for Linux, Win and Mac.
+ */
+void BLF_lang_init(void);
+
+/* Set the current locale. */
+void BLF_lang_set(const char *);
+
+/* Set the current encoding name. */
+void BLF_lang_encoding_name(const char *str);
+
+void BLF_lang_encoding(const char *str);
+
+#define _(msgid) BLF_gettext(msgid)
+#define N_(msgid) msgid
+
+#endif /* BLF_TRANSLATION_H */
diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index 82099d4f125..b87a3b88f07 100644
--- a/source/blender/blenfont/CMakeLists.txt
+++ b/source/blender/blenfont/CMakeLists.txt
@@ -42,9 +42,11 @@ set(SRC
intern/blf_font.c
intern/blf_glyph.c
intern/blf_lang.c
+ intern/blf_translation.c
intern/blf_util.c
BLF_api.h
+ BLF_translation.h
intern/blf_internal.h
intern/blf_internal_types.h
)
@@ -56,9 +58,5 @@ if(WITH_INTERNATIONAL)
add_definitions(-DINTERNATIONAL)
endif()
-if(WIN32 AND NOT UNIX)
- add_definitions(-DUSE_GETTEXT_DLL)
-endif()
-
blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/blenfont/SConscript b/source/blender/blenfont/SConscript
index 2763bea0da0..45a55793856 100644
--- a/source/blender/blenfont/SConscript
+++ b/source/blender/blenfont/SConscript
@@ -13,7 +13,6 @@ defs = []
if sys.platform == 'win32' or env['OURPLATFORM'] == 'linuxcross':
defs.append('_WIN32')
- defs.append('USE_GETTEXT_DLL')
if env['WITH_BF_INTERNATIONAL']:
defs.append('INTERNATIONAL')
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index fc812d652b3..cccecd00bf7 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -6,7 +6,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
@@ -20,7 +20,7 @@
* The Original Code is Copyright (C) 2009 Blender Foundation.
* All rights reserved.
*
- *
+ *
* Contributor(s): Blender Foundation
*
* ***** END GPL LICENSE BLOCK *****
@@ -78,8 +78,8 @@ int blf_mono_font_render= -1;
static FontBLF *BLF_get(int fontid)
{
if (fontid >= 0 && fontid < BLF_MAX_FONT)
- return(global_font[fontid]);
- return(NULL);
+ return global_font[fontid];
+ return NULL;
}
int BLF_init(int points, int dpi)
@@ -91,7 +91,7 @@ int BLF_init(int points, int dpi)
global_font_points= points;
global_font_dpi= dpi;
- return(blf_font_init());
+ return blf_font_init();
}
void BLF_exit(void)
@@ -128,9 +128,9 @@ static int blf_search(const char *name)
for (i= 0; i < BLF_MAX_FONT; i++) {
font= global_font[i];
if (font && (!strcmp(font->name, name)))
- return(i);
+ return i;
}
- return(-1);
+ return -1;
}
int BLF_load(const char *name)
@@ -140,24 +140,24 @@ int BLF_load(const char *name)
int i;
if (!name)
- return(-1);
+ return -1;
/* check if we already load this font. */
i= blf_search(name);
if (i >= 0) {
/*font= global_font[i];*/ /*UNUSED*/
- return(i);
+ return i;
}
if (global_font_num+1 >= BLF_MAX_FONT) {
printf("Too many fonts!!!\n");
- return(-1);
+ return -1;
}
filename= blf_dir_search(name);
if (!filename) {
printf("Can't find font: %s\n", name);
- return(-1);
+ return -1;
}
font= blf_font_new(name, filename);
@@ -165,13 +165,13 @@ int BLF_load(const char *name)
if (!font) {
printf("Can't load font: %s\n", name);
- return(-1);
+ return -1;
}
global_font[global_font_num]= font;
i= global_font_num;
global_font_num++;
- return(i);
+ return i;
}
int BLF_load_unique(const char *name)
@@ -181,20 +181,20 @@ int BLF_load_unique(const char *name)
int i;
if (!name)
- return(-1);
+ return -1;
/* Don't search in the cache!! make a new
* object font, this is for keep fonts threads safe.
*/
if (global_font_num+1 >= BLF_MAX_FONT) {
printf("Too many fonts!!!\n");
- return(-1);
+ return -1;
}
filename= blf_dir_search(name);
if (!filename) {
printf("Can't find font: %s\n", name);
- return(-1);
+ return -1;
}
font= blf_font_new(name, filename);
@@ -202,22 +202,22 @@ int BLF_load_unique(const char *name)
if (!font) {
printf("Can't load font: %s\n", name);
- return(-1);
+ return -1;
}
global_font[global_font_num]= font;
i= global_font_num;
global_font_num++;
- return(i);
+ return i;
}
void BLF_metrics_attach(int fontid, unsigned char *mem, int mem_size)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
+ if (font) {
blf_font_attach_from_mem(font, mem, mem_size);
+ }
}
int BLF_load_mem(const char *name, unsigned char *mem, int mem_size)
@@ -226,34 +226,34 @@ int BLF_load_mem(const char *name, unsigned char *mem, int mem_size)
int i;
if (!name)
- return(-1);
+ return -1;
i= blf_search(name);
if (i >= 0) {
/*font= global_font[i];*/ /*UNUSED*/
- return(i);
+ return i;
}
if (global_font_num+1 >= BLF_MAX_FONT) {
printf("Too many fonts!!!\n");
- return(-1);
+ return -1;
}
if (!mem || !mem_size) {
printf("Can't load font: %s from memory!!\n", name);
- return(-1);
+ return -1;
}
font= blf_font_new_from_mem(name, mem, mem_size);
if (!font) {
printf("Can't load font: %s from memory!!\n", name);
- return(-1);
+ return -1;
}
global_font[global_font_num]= font;
i= global_font_num;
global_font_num++;
- return(i);
+ return i;
}
int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size)
@@ -262,7 +262,7 @@ int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size)
int i;
if (!name)
- return(-1);
+ return -1;
/*
* Don't search in the cache, make a new object font!
@@ -270,67 +270,66 @@ int BLF_load_mem_unique(const char *name, unsigned char *mem, int mem_size)
*/
if (global_font_num+1 >= BLF_MAX_FONT) {
printf("Too many fonts!!!\n");
- return(-1);
+ return -1;
}
if (!mem || !mem_size) {
printf("Can't load font: %s from memory!!\n", name);
- return(-1);
+ return -1;
}
font= blf_font_new_from_mem(name, mem, mem_size);
if (!font) {
printf("Can't load font: %s from memory!!\n", name);
- return(-1);
+ return -1;
}
global_font[global_font_num]= font;
i= global_font_num;
global_font_num++;
- return(i);
+ return i;
}
void BLF_enable(int fontid, int option)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
+ if (font) {
font->flags |= option;
+ }
}
void BLF_disable(int fontid, int option)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
+ if (font) {
font->flags &= ~option;
+ }
}
void BLF_enable_default(int option)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(global_font_default);
- font= BLF_get(global_font_default);
- if (font)
+ if (font) {
font->flags |= option;
+ }
}
void BLF_disable_default(int option)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(global_font_default);
- font= BLF_get(global_font_default);
- if (font)
+ if (font) {
font->flags &= ~option;
+ }
}
void BLF_aspect(int fontid, float x, float y, float z)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
if (font) {
font->aspect[0]= x;
font->aspect[1]= y;
@@ -338,26 +337,23 @@ void BLF_aspect(int fontid, float x, float y, float z)
}
}
-void BLF_matrix(int fontid, double *m)
+void BLF_matrix(int fontid, const double m[16])
{
- FontBLF *font;
- int i;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
if (font) {
- for (i= 0; i < 16; i++)
- font->m[i]= m[i];
+ memcpy(font->m, m, sizeof(font->m));
}
}
void BLF_position(int fontid, float x, float y, float z)
{
- FontBLF *font;
- float remainder;
- float xa, ya, za;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
if (font) {
+ float xa, ya, za;
+ float remainder;
+
if (font->flags & BLF_ASPECT) {
xa= font->aspect[0];
ya= font->aspect[1];
@@ -401,20 +397,20 @@ void BLF_position(int fontid, float x, float y, float z)
void BLF_size(int fontid, int size, int dpi)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
+ if (font) {
blf_font_size(font, size, dpi);
+ }
}
void BLF_blur(int fontid, int size)
{
- FontBLF *font;
-
- font= BLF_get(fontid);
- if (font)
+ FontBLF *font= BLF_get(fontid);
+
+ if (font) {
font->blur= size;
+ }
}
void BLF_draw_default(float x, float y, float z, const char *str, size_t len)
@@ -456,11 +452,11 @@ void BLF_draw_default_ascii(float x, float y, float z, const char *str, size_t l
void BLF_rotation_default(float angle)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(global_font_default);
- font= BLF_get(global_font_default);
- if (font)
+ if (font) {
font->angle= angle;
+ }
}
static void blf_draw__start(FontBLF *font)
@@ -486,6 +482,13 @@ static void blf_draw__start(FontBLF *font)
if (font->flags & BLF_ROTATION)
glRotatef(font->angle, 0.0f, 0.0f, 1.0f);
+
+ if(font->shadow || font->blur)
+ glGetFloatv(GL_CURRENT_COLOR, font->orig_col);
+
+ /* always bind the texture for the first glyph */
+ font->tex_bind_state= -1;
+
}
static void blf_draw__end(void)
@@ -498,7 +501,8 @@ static void blf_draw__end(void)
void BLF_draw(int fontid, const char *str, size_t len)
{
FontBLF *font= BLF_get(fontid);
- if (font) {
+
+ if (font && font->glyph_cache) {
blf_draw__start(font);
blf_font_draw(font, str, len);
blf_draw__end();
@@ -508,7 +512,8 @@ void BLF_draw(int fontid, const char *str, size_t len)
void BLF_draw_ascii(int fontid, const char *str, size_t len)
{
FontBLF *font= BLF_get(fontid);
- if (font) {
+
+ if (font && font->glyph_cache) {
blf_draw__start(font);
blf_font_draw_ascii(font, str, len);
blf_draw__end();
@@ -517,148 +522,141 @@ void BLF_draw_ascii(int fontid, const char *str, size_t len)
void BLF_boundbox(int fontid, const char *str, rctf *box)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
+ if (font) {
blf_font_boundbox(font, str, box);
+ }
}
void BLF_width_and_height(int fontid, const char *str, float *width, float *height)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
+ if (font && font->glyph_cache) {
blf_font_width_and_height(font, str, width, height);
+ }
}
float BLF_width(int fontid, const char *str)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
- return(blf_font_width(font, str));
- return(0.0f);
+ if (font && font->glyph_cache) {
+ return blf_font_width(font, str);
+ }
+
+ return 0.0f;
}
float BLF_fixed_width(int fontid)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
+
+ if (font && font->glyph_cache) {
+ return blf_font_fixed_width(font);
+ }
- font= BLF_get(fontid);
- if (font)
- return(blf_font_fixed_width(font));
- return(0.0f);
+ return 0.0f;
}
float BLF_width_default(const char *str)
{
- float width;
-
if (global_font_default == -1)
global_font_default= blf_search("default");
if (global_font_default == -1) {
printf("Error: Can't found default font!!\n");
- return(0.0f);
+ return 0.0f;
}
BLF_size(global_font_default, global_font_points, global_font_dpi);
- width= BLF_width(global_font_default, str);
- return(width);
+ return BLF_width(global_font_default, str);
}
float BLF_height(int fontid, const char *str)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
- return(blf_font_height(font, str));
- return(0.0f);
+ if (font && font->glyph_cache) {
+ return blf_font_height(font, str);
+ }
+
+ return 0.0f;
}
float BLF_height_max(int fontid)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font) {
- if(font->glyph_cache)
- return(font->glyph_cache->max_glyph_height);
+ if (font && font->glyph_cache) {
+ return font->glyph_cache->max_glyph_height;
}
- return(0.0f);
+
+ return 0.0f;
}
float BLF_width_max(int fontid)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font) {
- if(font->glyph_cache)
- return(font->glyph_cache->max_glyph_width);
+ if (font && font->glyph_cache) {
+ return font->glyph_cache->max_glyph_width;
}
- return(0.0f);
+
+ return 0.0f;
}
float BLF_descender(int fontid)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font) {
- if(font->glyph_cache)
- return(font->glyph_cache->descender);
+ if (font && font->glyph_cache) {
+ return font->glyph_cache->descender;
}
- return(0.0f);
+
+ return 0.0f;
}
float BLF_ascender(int fontid)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font) {
- if(font->glyph_cache)
- return(font->glyph_cache->ascender);
+ if (font && font->glyph_cache) {
+ return font->glyph_cache->ascender;
}
- return(0.0f);
+
+ return 0.0f;
}
float BLF_height_default(const char *str)
{
- float height;
-
if (global_font_default == -1)
global_font_default= blf_search("default");
if (global_font_default == -1) {
printf("Error: Can't found default font!!\n");
- return(0.0f);
+ return 0.0f;
}
BLF_size(global_font_default, global_font_points, global_font_dpi);
- height= BLF_height(global_font_default, str);
- return(height);
+
+ return BLF_height(global_font_default, str);
}
void BLF_rotation(int fontid, float angle)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
+ if (font) {
font->angle= angle;
+ }
}
void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
if (font) {
font->clip_rec.xmin= xmin;
font->clip_rec.ymin= ymin;
@@ -669,9 +667,8 @@ void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax)
void BLF_clipping_default(float xmin, float ymin, float xmax, float ymax)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(global_font_default);
- font= BLF_get(global_font_default);
if (font) {
font->clip_rec.xmin= xmin;
font->clip_rec.ymin= ymin;
@@ -682,9 +679,8 @@ void BLF_clipping_default(float xmin, float ymin, float xmax, float ymax)
void BLF_shadow(int fontid, int level, float r, float g, float b, float a)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
if (font) {
font->shadow= level;
font->shadow_col[0]= r;
@@ -696,9 +692,8 @@ void BLF_shadow(int fontid, int level, float r, float g, float b, float a)
void BLF_shadow_offset(int fontid, int x, int y)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
if (font) {
font->shadow_x= x;
font->shadow_y= y;
@@ -707,9 +702,8 @@ void BLF_shadow_offset(int fontid, int x, int y)
void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int nch)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
if (font) {
font->b_fbuf= fbuf;
font->b_cbuf= cbuf;
@@ -721,9 +715,8 @@ void BLF_buffer(int fontid, float *fbuf, unsigned char *cbuf, int w, int h, int
void BLF_buffer_col(int fontid, float r, float g, float b, float a)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
if (font) {
font->b_col[0]= r;
font->b_col[1]= g;
@@ -734,9 +727,9 @@ void BLF_buffer_col(int fontid, float r, float g, float b, float a)
void BLF_draw_buffer(int fontid, const char *str)
{
- FontBLF *font;
+ FontBLF *font= BLF_get(fontid);
- font= BLF_get(fontid);
- if (font)
+ if (font && font->glyph_cache && (font->b_fbuf || font->b_cbuf)) {
blf_font_buffer(font, str);
+ }
}
diff --git a/source/blender/blenfont/intern/blf_dir.c b/source/blender/blenfont/intern/blf_dir.c
index fd874d991ea..46be49b37e9 100644
--- a/source/blender/blenfont/intern/blf_dir.c
+++ b/source/blender/blenfont/intern/blf_dir.c
@@ -62,10 +62,10 @@ static DirBLF *blf_dir_find(const char *path)
p= global_font_dir.first;
while (p) {
if (BLI_path_cmp(p->path, path) == 0)
- return(p);
+ return p;
p= p->next;
}
- return(NULL);
+ return NULL;
}
void BLF_dir_add(const char *path)
@@ -76,7 +76,7 @@ void BLF_dir_add(const char *path)
if (dir) /* already in the list ? just return. */
return;
- dir= (DirBLF *)MEM_mallocN(sizeof(DirBLF), "BLF_dir_add");
+ dir= (DirBLF *)MEM_callocN(sizeof(DirBLF), "BLF_dir_add");
dir->path= BLI_strdup(path);
BLI_addhead(&global_font_dir, dir);
}
@@ -102,9 +102,9 @@ char **BLF_dir_get(int *ndir)
count= BLI_countlist(&global_font_dir);
if (!count)
- return(NULL);
+ return NULL;
- dirs= (char **)MEM_mallocN(sizeof(char *) * count, "BLF_dir_get");
+ dirs= (char **)MEM_callocN(sizeof(char *) * count, "BLF_dir_get");
p= global_font_dir.first;
i= 0;
while (p) {
@@ -113,7 +113,7 @@ char **BLF_dir_get(int *ndir)
p= p->next;
}
*ndir= i;
- return(dirs);
+ return dirs;
}
void BLF_dir_free(char **dirs, int count)
@@ -147,8 +147,8 @@ char *blf_dir_search(const char *file)
if (BLI_exist(file))
s= BLI_strdup(file);
}
-
- return(s);
+
+ return s;
}
#if 0 // UNUSED
@@ -171,9 +171,9 @@ int blf_dir_split(const char *str, char *file, int *size)
file[i+4]= '\0';
s++;
*size= atoi(s);
- return(1);
+ return 1;
}
- return(0);
+ return 0;
}
#endif
@@ -188,9 +188,9 @@ char *blf_dir_metrics_search(const char *filename)
mfile= BLI_strdup(filename);
s= strrchr(mfile, '.');
if (s) {
- if (strlen(s) < 4) {
+ if (BLI_strnlen(s, 4) < 4) {
MEM_freeN(mfile);
- return(NULL);
+ return NULL;
}
s++;
s[0]= 'a';
@@ -199,14 +199,14 @@ char *blf_dir_metrics_search(const char *filename)
/* first check .afm */
if (BLI_exist(s))
- return(s);
+ return s;
/* and now check .pfm */
s[0]= 'p';
if (BLI_exist(s))
- return(s);
+ return s;
}
MEM_freeN(mfile);
- return(NULL);
+ return NULL;
}
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index fb6505fe935..26af3a3fd4f 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -62,7 +62,7 @@ static FT_Library ft_lib;
int blf_font_init(void)
{
- return(FT_Init_FreeType(&ft_lib));
+ return FT_Init_FreeType(&ft_lib);
}
void blf_font_exit(void)
@@ -97,51 +97,82 @@ void blf_font_size(FontBLF *font, int size, int dpi)
}
}
+static void blf_font_ensure_ascii_table(FontBLF *font)
+{
+ GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
+
+ /* build ascii on demand */
+ if(glyph_ascii_table['0']==NULL) {
+ GlyphBLF *g;
+ unsigned int i;
+ for(i=0; i<256; i++) {
+ g= blf_glyph_search(font->glyph_cache, i);
+ if (!g) {
+ FT_UInt glyph_index= FT_Get_Char_Index(font->face, i);
+ g= blf_glyph_add(font, glyph_index, i);
+ }
+ glyph_ascii_table[i]= g;
+ }
+ }
+}
+
+/* Fast path for runs of ASCII characters. Given that common UTF-8
+ * input will consist of an overwhelming majority of ASCII
+ * characters.
+ */
+
+/* Note,
+ * blf_font_ensure_ascii_table(font); must be called before this macro */
+
+#define BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table) \
+ if(((c)= (str)[i]) < 0x80) { \
+ g= (glyph_ascii_table)[c]; \
+ i++; \
+ } \
+ else if ((c= blf_utf8_next((unsigned char *)(str), &(i)))) { \
+ if ((g= blf_glyph_search((font)->glyph_cache, c)) == NULL) { \
+ g= blf_glyph_add(font, FT_Get_Char_Index((font)->face, c), c); \
+ } \
+ } \
+
+
+#define BLF_KERNING_VARS(_font, _has_kerning, _kern_mode) \
+ const short has_kerning= FT_HAS_KERNING((_font)->face); \
+ const FT_UInt kern_mode= (has_kerning == 0) ? 0 : \
+ (((_font)->flags & BLF_KERNING_DEFAULT) ? \
+ ft_kerning_default : FT_KERNING_UNFITTED) \
+ \
+
+
+#define BLF_KERNING_STEP(_font, kern_mode, g_prev, g, delta, pen_x) \
+{ \
+ if (g_prev) { \
+ delta.x= delta.y= 0; \
+ if (FT_Get_Kerning((_font)->face, g_prev->idx, g->idx, kern_mode, &delta) == 0) \
+ pen_x += delta.x >> 6; \
+ } \
+} \
+
void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
{
unsigned int c;
- GlyphBLF *g, *g_prev;
+ GlyphBLF *g, *g_prev= NULL;
FT_Vector delta;
- FT_UInt glyph_index;
- int pen_x, pen_y;
- int i, has_kerning, st;
+ int pen_x= 0, pen_y= 0;
+ unsigned int i= 0;
+ GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
- if (!font->glyph_cache)
- return;
+ BLF_KERNING_VARS(font, has_kerning, kern_mode);
- i= 0;
- pen_x= 0;
- pen_y= 0;
- has_kerning= FT_HAS_KERNING(font->face);
- g_prev= NULL;
+ blf_font_ensure_ascii_table(font);
while (str[i] && i < len) {
- c= blf_utf8_next((unsigned char *)str, &i);
- if (c == 0)
- break;
-
- g= blf_glyph_search(font->glyph_cache, c);
- if (!g) {
- glyph_index= FT_Get_Char_Index(font->face, c);
- g= blf_glyph_add(font, glyph_index, c);
- }
- /* if we don't found a glyph, skip it. */
- if (!g)
- continue;
+ BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
- if (has_kerning && g_prev) {
- delta.x= 0;
- delta.y= 0;
-
- if (font->flags & BLF_KERNING_DEFAULT)
- st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, ft_kerning_default, &delta);
- else
- st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, FT_KERNING_UNFITTED, &delta);
-
- if (st == 0)
- pen_x += delta.x >> 6;
- }
+ if (c == 0) break;
+ if (g == NULL) continue;
+ if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
/* do not return this loop if clipped, we want every character tested */
blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
@@ -154,52 +185,19 @@ void blf_font_draw(FontBLF *font, const char *str, unsigned int len)
/* faster version of blf_font_draw, ascii only for view dimensions */
void blf_font_draw_ascii(FontBLF *font, const char *str, unsigned int len)
{
- char c;
- GlyphBLF *g, *g_prev;
+ unsigned char c;
+ GlyphBLF *g, *g_prev= NULL;
FT_Vector delta;
- FT_UInt glyph_index;
- int pen_x, pen_y;
- int i, has_kerning, st;
+ int pen_x= 0, pen_y= 0;
+ GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
- if (!font->glyph_cache)
- return;
+ BLF_KERNING_VARS(font, has_kerning, kern_mode);
- pen_x= 0;
- pen_y= 0;
- has_kerning= FT_HAS_KERNING(font->face);
- g_prev= NULL;
+ blf_font_ensure_ascii_table(font);
- /* build ascii on demand */
- if(font->glyph_ascii_table['0']==NULL) {
- for(i=0; i<256; i++) {
- g= blf_glyph_search(font->glyph_cache, i);
- if (!g) {
- glyph_index= FT_Get_Char_Index(font->face, i);
- g= blf_glyph_add(font, glyph_index, i);
- }
- font->glyph_ascii_table[i]= g;
- }
- }
-
while ((c= *(str++)) && len--) {
- g= font->glyph_ascii_table[c];
-
- /* if we don't found a glyph, skip it. */
- if (!g)
- continue;
-
- if (has_kerning && g_prev) {
- delta.x= 0;
- delta.y= 0;
-
- if (font->flags & BLF_KERNING_DEFAULT)
- st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, ft_kerning_default, &delta);
- else
- st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, FT_KERNING_UNFITTED, &delta);
-
- if (st == 0)
- pen_x += delta.x >> 6;
- }
+ if ((g= glyph_ascii_table[c]) == NULL) continue;
+ if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
/* do not return this loop if clipped, we want every character tested */
blf_glyph_render(font, g, (float)pen_x, (float)pen_y);
@@ -209,59 +207,37 @@ void blf_font_draw_ascii(FontBLF *font, const char *str, unsigned int len)
}
}
+/* Sanity checks are done by BLF_draw_buffer() */
void blf_font_buffer(FontBLF *font, const char *str)
{
- unsigned char *cbuf;
unsigned int c;
- unsigned char b_col_char[4];
- GlyphBLF *g, *g_prev;
+ GlyphBLF *g, *g_prev= NULL;
FT_Vector delta;
- FT_UInt glyph_index;
+ int pen_x= (int)font->pos[0], pen_y= 0;
+ unsigned int i= 0;
+ GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
+
+ /* buffer spesific vars*/
+ const unsigned char b_col_char[4]= {font->b_col[0] * 255,
+ font->b_col[1] * 255,
+ font->b_col[2] * 255,
+ font->b_col[3] * 255};
+ unsigned char *cbuf;
+ int chx, chy;
+ int y, x;
float a, *fbuf;
- int pen_x, y, x;
- int i, has_kerning, st, chx, chy;
-
- if (!font->glyph_cache || (!font->b_fbuf && !font->b_cbuf))
- return;
-
- i= 0;
- pen_x= (int)font->pos[0];
- has_kerning= FT_HAS_KERNING(font->face);
- g_prev= NULL;
-
- b_col_char[0]= font->b_col[0] * 255;
- b_col_char[1]= font->b_col[1] * 255;
- b_col_char[2]= font->b_col[2] * 255;
- b_col_char[3]= font->b_col[3] * 255;
-
- while (str[i]) {
- int pen_y;
- c= blf_utf8_next((unsigned char *)str, &i);
- if (c == 0)
- break;
- g= blf_glyph_search(font->glyph_cache, c);
- if (!g) {
- glyph_index= FT_Get_Char_Index(font->face, c);
- g= blf_glyph_add(font, glyph_index, c);
- }
+ BLF_KERNING_VARS(font, has_kerning, kern_mode);
- /* if we don't found a glyph, skip it. */
- if (!g)
- continue;
+ blf_font_ensure_ascii_table(font);
- if (has_kerning && g_prev) {
- delta.x= 0;
- delta.y= 0;
+ while (str[i]) {
- if (font->flags & BLF_KERNING_DEFAULT)
- st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, ft_kerning_default, &delta);
- else
- st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, FT_KERNING_UNFITTED, &delta);
+ BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
- if (st == 0)
- pen_x += delta.x >> 6;
- }
+ if (c == 0) break;
+ if (g == NULL) continue;
+ if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
chx= pen_x + ((int)g->pos_x);
chy= (int)font->pos[1] + g->height;
@@ -361,69 +337,41 @@ void blf_font_buffer(FontBLF *font, const char *str)
void blf_font_boundbox(FontBLF *font, const char *str, rctf *box)
{
unsigned int c;
- GlyphBLF *g, *g_prev;
+ GlyphBLF *g, *g_prev= NULL;
FT_Vector delta;
- FT_UInt glyph_index;
+ int pen_x= 0, pen_y= 0;
+ unsigned int i= 0;
+ GlyphBLF **glyph_ascii_table= font->glyph_cache->glyph_ascii_table;
+
rctf gbox;
- int pen_x, pen_y;
- int i, has_kerning, st;
- if (!font->glyph_cache)
- return;
+ BLF_KERNING_VARS(font, has_kerning, kern_mode);
box->xmin= 32000.0f;
box->xmax= -32000.0f;
box->ymin= 32000.0f;
box->ymax= -32000.0f;
- i= 0;
- pen_x= 0;
- pen_y= 0;
- has_kerning= FT_HAS_KERNING(font->face);
- g_prev= NULL;
+ blf_font_ensure_ascii_table(font);
while (str[i]) {
- c= blf_utf8_next((unsigned char *)str, &i);
- if (c == 0)
- break;
-
- g= blf_glyph_search(font->glyph_cache, c);
- if (!g) {
- glyph_index= FT_Get_Char_Index(font->face, c);
- g= blf_glyph_add(font, glyph_index, c);
- }
-
- /* if we don't found a glyph, skip it. */
- if (!g)
- continue;
- if (has_kerning && g_prev) {
- delta.x= 0;
- delta.y= 0;
+ BLF_UTF8_NEXT_FAST(font, g, str, i, c, glyph_ascii_table);
- if (font->flags & BLF_KERNING_DEFAULT)
- st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, ft_kerning_default, &delta);
- else
- st= FT_Get_Kerning(font->face, g_prev->idx, g->idx, FT_KERNING_UNFITTED, &delta);
-
- if (st == 0)
- pen_x += delta.x >> 6;
- }
+ if (c == 0) break;
+ if (g == NULL) continue;
+ if (has_kerning) BLF_KERNING_STEP(font, kern_mode, g_prev, g, delta, pen_x);
gbox.xmin= pen_x;
gbox.xmax= pen_x + g->advance;
gbox.ymin= g->box.ymin + pen_y;
gbox.ymax= g->box.ymax + pen_y;
- if (gbox.xmin < box->xmin)
- box->xmin= gbox.xmin;
- if (gbox.ymin < box->ymin)
- box->ymin= gbox.ymin;
+ if (gbox.xmin < box->xmin) box->xmin= gbox.xmin;
+ if (gbox.ymin < box->ymin) box->ymin= gbox.ymin;
- if (gbox.xmax > box->xmax)
- box->xmax= gbox.xmax;
- if (gbox.ymax > box->ymax)
- box->ymax= gbox.ymax;
+ if (gbox.xmax > box->xmax) box->xmax= gbox.xmax;
+ if (gbox.ymax > box->ymax) box->ymax= gbox.ymax;
pen_x += g->advance;
g_prev= g;
@@ -442,20 +390,18 @@ void blf_font_width_and_height(FontBLF *font, const char *str, float *width, flo
float xa, ya;
rctf box;
- if (font->glyph_cache) {
- if (font->flags & BLF_ASPECT) {
- xa= font->aspect[0];
- ya= font->aspect[1];
- }
- else {
- xa= 1.0f;
- ya= 1.0f;
- }
-
- blf_font_boundbox(font, str, &box);
- *width= ((box.xmax - box.xmin) * xa);
- *height= ((box.ymax - box.ymin) * ya);
+ if (font->flags & BLF_ASPECT) {
+ xa= font->aspect[0];
+ ya= font->aspect[1];
}
+ else {
+ xa= 1.0f;
+ ya= 1.0f;
+ }
+
+ blf_font_boundbox(font, str, &box);
+ *width= ((box.xmax - box.xmin) * xa);
+ *height= ((box.ymax - box.ymin) * ya);
}
float blf_font_width(FontBLF *font, const char *str)
@@ -463,16 +409,13 @@ float blf_font_width(FontBLF *font, const char *str)
float xa;
rctf box;
- if (!font->glyph_cache)
- return(0.0f);
-
if (font->flags & BLF_ASPECT)
xa= font->aspect[0];
else
xa= 1.0f;
blf_font_boundbox(font, str, &box);
- return((box.xmax - box.xmin) * xa);
+ return (box.xmax - box.xmin) * xa;
}
float blf_font_height(FontBLF *font, const char *str)
@@ -480,36 +423,28 @@ float blf_font_height(FontBLF *font, const char *str)
float ya;
rctf box;
- if (!font->glyph_cache)
- return(0.0f);
-
if (font->flags & BLF_ASPECT)
ya= font->aspect[1];
else
ya= 1.0f;
blf_font_boundbox(font, str, &box);
- return((box.ymax - box.ymin) * ya);
+ return (box.ymax - box.ymin) * ya;
}
float blf_font_fixed_width(FontBLF *font)
{
- GlyphBLF *g;
- FT_UInt glyph_index;
- unsigned int c = ' ';
-
- if (!font->glyph_cache)
- return 0.0f;
-
- glyph_index= FT_Get_Char_Index(font->face, c);
- g= blf_glyph_search(font->glyph_cache, c);
- if (!g)
- g= blf_glyph_add(font, glyph_index, c);
-
- /* if we don't find the glyph. */
- if (!g)
- return 0.0f;
-
+ const unsigned int c = ' ';
+ GlyphBLF *g= blf_glyph_search(font->glyph_cache, c);
+ if (!g) {
+ g= blf_glyph_add(font, FT_Get_Char_Index(font->face, c), c);
+
+ /* if we don't find the glyph. */
+ if (!g) {
+ return 0.0f;
+ }
+ }
+
return g->advance;
}
@@ -534,7 +469,7 @@ void blf_font_free(FontBLF *font)
static void blf_font_fill(FontBLF *font)
{
- int i;
+ unsigned int i;
font->aspect[0]= 1.0f;
font->aspect[1]= 1.0f;
@@ -568,8 +503,6 @@ static void blf_font_fill(FontBLF *font)
font->b_col[2]= 0;
font->b_col[3]= 0;
font->ft_lib= ft_lib;
-
- memset(font->glyph_ascii_table, 0, sizeof(font->glyph_ascii_table));
}
FontBLF *blf_font_new(const char *name, const char *filename)
@@ -578,11 +511,11 @@ FontBLF *blf_font_new(const char *name, const char *filename)
FT_Error err;
char *mfile;
- font= (FontBLF *)MEM_mallocN(sizeof(FontBLF), "blf_font_new");
+ font= (FontBLF *)MEM_callocN(sizeof(FontBLF), "blf_font_new");
err= FT_New_Face(ft_lib, filename, 0, &font->face);
if (err) {
MEM_freeN(font);
- return(NULL);
+ return NULL;
}
err= FT_Select_Charmap(font->face, ft_encoding_unicode);
@@ -590,7 +523,7 @@ FontBLF *blf_font_new(const char *name, const char *filename)
printf("Can't set the unicode character map!\n");
FT_Done_Face(font->face);
MEM_freeN(font);
- return(NULL);
+ return NULL;
}
mfile= blf_dir_metrics_search(filename);
@@ -602,7 +535,7 @@ FontBLF *blf_font_new(const char *name, const char *filename)
font->name= BLI_strdup(name);
font->filename= BLI_strdup(filename);
blf_font_fill(font);
- return(font);
+ return font;
}
void blf_font_attach_from_mem(FontBLF *font, const unsigned char *mem, int mem_size)
@@ -620,11 +553,11 @@ FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_siz
FontBLF *font;
FT_Error err;
- font= (FontBLF *)MEM_mallocN(sizeof(FontBLF), "blf_font_new_from_mem");
+ font= (FontBLF *)MEM_callocN(sizeof(FontBLF), "blf_font_new_from_mem");
err= FT_New_Memory_Face(ft_lib, mem, mem_size, 0, &font->face);
if (err) {
MEM_freeN(font);
- return(NULL);
+ return NULL;
}
err= FT_Select_Charmap(font->face, ft_encoding_unicode);
@@ -632,11 +565,11 @@ FontBLF *blf_font_new_from_mem(const char *name, unsigned char *mem, int mem_siz
printf("Can't set the unicode character map!\n");
FT_Done_Face(font->face);
MEM_freeN(font);
- return(NULL);
+ return NULL;
}
font->name= BLI_strdup(name);
font->filename= NULL;
blf_font_fill(font);
- return(font);
+ return font;
}
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index e165012f43e..99d41cd7abd 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -64,28 +64,25 @@ GlyphCacheBLF *blf_glyph_cache_find(FontBLF *font, int size, int dpi)
p= (GlyphCacheBLF *)font->cache.first;
while (p) {
if (p->size == size && p->dpi == dpi)
- return(p);
+ return p;
p= p->next;
}
- return(NULL);
+ return NULL;
}
/* Create a new glyph cache for the current size and dpi. */
GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font)
{
GlyphCacheBLF *gc;
- int i;
- gc= (GlyphCacheBLF *)MEM_mallocN(sizeof(GlyphCacheBLF), "blf_glyph_cache_new");
+ gc= (GlyphCacheBLF *)MEM_callocN(sizeof(GlyphCacheBLF), "blf_glyph_cache_new");
gc->next= NULL;
gc->prev= NULL;
gc->size= font->size;
gc->dpi= font->dpi;
- for (i= 0; i < 257; i++) {
- gc->bucket[i].first= NULL;
- gc->bucket[i].last= NULL;
- }
+ memset(gc->glyph_ascii_table, 0, sizeof(gc->glyph_ascii_table));
+ memset(gc->bucket, 0, sizeof(gc->bucket));
gc->textures= (GLuint *)malloc(sizeof(GLuint)*256);
gc->ntex= 256;
@@ -117,7 +114,7 @@ GlyphCacheBLF *blf_glyph_cache_new(FontBLF *font)
gc->p2_height= 0;
BLI_addhead(&font->cache, gc);
- return(gc);
+ return gc;
}
void blf_glyph_cache_clear(FontBLF *font)
@@ -134,9 +131,9 @@ void blf_glyph_cache_clear(FontBLF *font)
blf_glyph_free(g);
}
}
- }
- memset(font->glyph_ascii_table, 0, sizeof(font->glyph_ascii_table));
+ memset(gc->glyph_ascii_table, 0, sizeof(gc->glyph_ascii_table));
+ }
}
void blf_glyph_cache_free(GlyphCacheBLF *gc)
@@ -186,7 +183,7 @@ static void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc)
memset((void *)buf, 0, tot_mem);
glGenTextures(1, &gc->textures[gc->cur_tex]);
- glBindTexture(GL_TEXTURE_2D, gc->textures[gc->cur_tex]);
+ glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state= gc->textures[gc->cur_tex]));
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
@@ -205,10 +202,10 @@ GlyphBLF *blf_glyph_search(GlyphCacheBLF *gc, unsigned int c)
p= gc->bucket[key].first;
while (p) {
if (p->c == c)
- return(p);
+ return p;
p= p->next;
}
- return(NULL);
+ return NULL;
}
GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
@@ -223,14 +220,14 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
g= blf_glyph_search(font->glyph_cache, c);
if (g)
- return(g);
+ return g;
if (sharp)
err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_MONO);
else
err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); /* Sure about NO_* flags? */
if (err)
- return(NULL);
+ return NULL;
/* get the glyph. */
slot= font->face->glyph;
@@ -249,22 +246,13 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
}
if (err || slot->format != FT_GLYPH_FORMAT_BITMAP)
- return(NULL);
+ return NULL;
- g= (GlyphBLF *)MEM_mallocN(sizeof(GlyphBLF), "blf_glyph_add");
- g->next= NULL;
- g->prev= NULL;
+ g= (GlyphBLF *)MEM_callocN(sizeof(GlyphBLF), "blf_glyph_add");
g->c= c;
g->idx= (FT_UInt)index;
- g->tex= 0;
- g->build_tex= 0;
- g->bitmap= NULL;
g->xoff= -1;
g->yoff= -1;
- g->uv[0][0]= 0.0f;
- g->uv[0][1]= 0.0f;
- g->uv[1][0]= 0.0f;
- g->uv[1][1]= 0.0f;
bitmap= slot->bitmap;
g->width= bitmap.width;
g->height= bitmap.rows;
@@ -295,7 +283,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
key= blf_hash(g->c);
BLI_addhead(&(font->glyph_cache->bucket[key]), g);
- return(g);
+ return g;
}
void blf_glyph_free(GlyphBLF *g)
@@ -327,23 +315,25 @@ static void blf_texture_draw(float uv[2][2], float dx, float y1, float dx1, floa
}
-static void blf_texture5_draw(float uv[2][2], float x1, float y1, float x2, float y2)
+static void blf_texture5_draw(const float shadow_col[4], float uv[2][2], float x1, float y1, float x2, float y2)
{
- float soft[25]= {
- 1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f,
- 1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f,
- 2/60.0f, 5/60.0f, 8/60.0f, 5/60.0f, 2/60.0f,
- 1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f,
- 1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f};
+ float soft[25]= {1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f,
+ 1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f,
+ 2/60.0f, 5/60.0f, 8/60.0f, 5/60.0f, 2/60.0f,
+ 1/60.0f, 3/60.0f, 5/60.0f, 3/60.0f, 1/60.0f,
+ 1/60.0f, 1/60.0f, 2/60.0f, 1/60.0f, 1/60.0f};
float color[4], *fp= soft;
int dx, dy;
-
- glGetFloatv(GL_CURRENT_COLOR, color);
+
+ color[0]= shadow_col[0];
+ color[1]= shadow_col[1];
+ color[2]= shadow_col[2];
for(dx=-2; dx<3; dx++) {
for(dy=-2; dy<3; dy++, fp++) {
- glColor4f(color[0], color[1], color[2], fp[0]*color[3]);
+ color[3]= *(fp) * shadow_col[3];
+ glColor4fv(color);
blf_texture_draw(uv, x1+dx, y1+dy, x2+dx, y2+dy);
}
}
@@ -351,17 +341,23 @@ static void blf_texture5_draw(float uv[2][2], float x1, float y1, float x2, floa
glColor4fv(color);
}
-static void blf_texture3_draw(float uv[2][2], float x1, float y1, float x2, float y2)
+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, 1/16.0f, 2/16.0f, 1/16.0f};
+ 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 color[4], *fp= soft;
int dx, dy;
-
- glGetFloatv(GL_CURRENT_COLOR, color);
-
+
+ color[0]= shadow_col[0];
+ color[1]= shadow_col[1];
+ color[2]= shadow_col[2];
+
for(dx=-1; dx<2; dx++) {
for(dy=-1; dy<2; dy++, fp++) {
- glColor4f(color[0], color[1], color[2], fp[0]*color[3]);
+ color[3]= *(fp) * shadow_col[3];
+ glColor4fv(color);
blf_texture_draw(uv, x1+dx, y1+dy, x2+dx, y2+dy);
}
}
@@ -371,18 +367,15 @@ static void blf_texture3_draw(float uv[2][2], float x1, float y1, float x2, floa
int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
{
- GlyphCacheBLF *gc;
- GLint cur_tex;
float dx, dx1;
float y1, y2;
float xo, yo;
- float color[4];
if ((!g->width) || (!g->height))
- return(1);
+ return 1;
if (g->build_tex == 0) {
- gc= font->glyph_cache;
+ GlyphCacheBLF *gc= font->glyph_cache;
if (font->max_tex_size == -1)
glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint *)&font->max_tex_size);
@@ -445,31 +438,36 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
if (font->flags & BLF_CLIPPING) {
if (!BLI_in_rctf(&font->clip_rec, dx + font->pos[0], y1 + font->pos[1]))
- return(0);
+ return 0;
if (!BLI_in_rctf(&font->clip_rec, dx + font->pos[0], y2 + font->pos[1]))
- return(0);
+ return 0;
if (!BLI_in_rctf(&font->clip_rec, dx1 + font->pos[0], y2 + font->pos[1]))
- return(0);
+ return 0;
if (!BLI_in_rctf(&font->clip_rec, dx1 + font->pos[0], y1 + font->pos[1]))
- return(0);
+ return 0;
}
- glGetIntegerv(GL_TEXTURE_2D_BINDING_EXT, &cur_tex);
- if (cur_tex != g->tex)
- glBindTexture(GL_TEXTURE_2D, g->tex);
+ if (font->tex_bind_state != g->tex) {
+ glBindTexture(GL_TEXTURE_2D, (font->tex_bind_state= g->tex));
+ }
if (font->flags & BLF_SHADOW) {
- glGetFloatv(GL_CURRENT_COLOR, color);
- glColor4fv(font->shadow_col);
-
- if (font->shadow == 3)
- blf_texture3_draw(g->uv, dx, y1, dx1, y2);
- else if (font->shadow == 5)
- blf_texture5_draw(g->uv, dx, y1, dx1, y2);
- else
- blf_texture_draw(g->uv, dx, y1, dx1, y2);
- glColor4fv(color);
+ switch(font->shadow) {
+ case 3:
+ blf_texture3_draw(font->shadow_col, g->uv, dx, y1, dx1, y2);
+ break;
+ case 5:
+ blf_texture5_draw(font->shadow_col, g->uv, dx, y1, dx1, y2);
+ break;
+ default:
+ glColor4fv(font->shadow_col);
+ blf_texture_draw(g->uv, dx, y1, dx1, y2);
+ break;
+ }
+
+ glColor4fv(font->orig_col);
+
x= xo;
y= yo;
@@ -479,12 +477,17 @@ int blf_glyph_render(FontBLF *font, GlyphBLF *g, float x, float y)
y2= y + g->pos_y - g->height;
}
- if (font->blur==3)
- blf_texture3_draw(g->uv, dx, y1, dx1, y2);
- else if (font->blur==5)
- blf_texture5_draw(g->uv, dx, y1, dx1, y2);
- else
- blf_texture_draw(g->uv, dx, y1, dx1, y2);
+ switch(font->blur) {
+ case 3:
+ blf_texture3_draw(font->orig_col, g->uv, dx, y1, dx1, y2);
+ break;
+ case 5:
+ blf_texture5_draw(font->orig_col, g->uv, dx, y1, dx1, y2);
+ break;
+ default:
+ blf_texture_draw(g->uv, dx, y1, dx1, y2);
+ break;
+ }
- return(1);
+ return 1;
}
diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h
index 9271d8d5a9e..ba0b9985dd4 100644
--- a/source/blender/blenfont/intern/blf_internal.h
+++ b/source/blender/blenfont/intern/blf_internal.h
@@ -40,7 +40,7 @@ struct rctf;
unsigned int blf_next_p2(unsigned int x);
unsigned int blf_hash(unsigned int val);
-int blf_utf8_next(unsigned char *buf, int *iindex);
+int blf_utf8_next(unsigned char *buf, unsigned int *iindex);
char *blf_dir_search(const char *file);
char *blf_dir_metrics_search(const char *filename);
diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h
index c4e192626e8..1450ad39ad8 100644
--- a/source/blender/blenfont/intern/blf_internal_types.h
+++ b/source/blender/blenfont/intern/blf_internal_types.h
@@ -46,6 +46,9 @@ typedef struct GlyphCacheBLF {
/* and the glyphs. */
ListBase bucket[257];
+ /* fast ascii lookup */
+ struct GlyphBLF *glyph_ascii_table[256];
+
/* texture array, to draw the glyphs. */
GLuint *textures;
@@ -158,7 +161,10 @@ typedef struct FontBLF {
/* shadow color. */
float shadow_col[4];
-
+
+ /* store color here when drawing shadow or blur. */
+ float orig_col[4];
+
/* Multiplied this matrix with the current one before
* draw the text! see blf_draw__start.
*/
@@ -176,6 +182,9 @@ typedef struct FontBLF {
/* max texture size. */
int max_tex_size;
+ /* current opengl texture bind, avoids calling glGet */
+ int tex_bind_state;
+
/* font options. */
int flags;
@@ -184,9 +193,6 @@ typedef struct FontBLF {
/* current glyph cache, size and dpi. */
GlyphCacheBLF *glyph_cache;
-
- /* fast ascii lookip */
- GlyphBLF *glyph_ascii_table[256];
/* freetype2 lib handle. */
FT_Library ft_lib;
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index e7f9d1746ad..8f745180b8b 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -39,8 +39,14 @@
#ifdef INTERNATIONAL
#include <locale.h>
+
+#if defined (_WIN32)
+#include <windows.h>
+#endif
+
#include "libintl.h"
+#include "DNA_userdef_types.h"
#include "DNA_listBase.h"
#include "DNA_vec_types.h"
@@ -51,11 +57,6 @@
#include "BLI_string.h"
#include "BLI_path_util.h"
-
-#ifdef __APPLE__
-
-#endif
-
#define DOMAIN_NAME "blender"
#define SYSTEM_ENCODING_DEFAULT "UTF-8"
#define FONT_SIZE_DEFAULT 12
@@ -65,6 +66,35 @@ static char global_messagepath[1024];
static char global_language[32];
static char global_encoding_name[32];
+/* map from the rna_userdef.c:rna_def_userdef_system(BlenderRNA *brna):language_items */
+static const char *locales[] = {
+ "", "",
+ "english", "en_US",
+ "japanese", "ja_JP",
+ "dutch", "nl_NL",
+ "italian", "it_IT",
+ "german", "de_DE",
+ "finnish", "fi_FI",
+ "swedish", "sv_SE",
+ "french", "fr_FR",
+ "spanish", "es_ES",
+ "catalan", "ca_AD",
+ "czech", "cs_CZ",
+ "ptb", "pt_BR",
+ "chs", "zh_CN",
+ "cht", "zh_TW",
+ "russian", "ru_RU",
+ "croatian", "hr_HR",
+ "serbian", "sr_RS",
+ "ukrainian", "uk_UA",
+ "polish", "pl_PL",
+ "romanian", "ro_RO",
+ "arabic", "ar_EG",
+ "bulgarian", "bg_BG",
+ "greek", "el_GR",
+ "korean", "ko_KR",
+ "nepali", "ne_NP",
+};
void BLF_lang_init(void)
{
@@ -82,34 +112,95 @@ void BLF_lang_init(void)
/* XXX WARNING!!! IN osx somehow the previous function call jumps in this one??? (ton, ppc) */
void BLF_lang_set(const char *str)
{
- if(str==NULL) {
+ char *locreturn;
+ const char *short_locale;
+ int ok= 1;
+#if defined (_WIN32)
+ char *long_locale = locales[ 2 * U.language];
+#endif
+
+ if((U.transopts&USER_DOTRANSLATE)==0)
return;
+
+ if(str)
+ short_locale = str;
+ else
+ short_locale = locales[ 2 * U.language + 1];
+
+#if defined (_WIN32)
+ if(short_locale) {
+ char *envStr;
+
+ if( U.language==0 )/* use system setting */
+ envStr = BLI_sprintfN( "LANG=%s", getenv("LANG") );
+ else
+ envStr = BLI_sprintfN( "LANG=%s", short_locale );
+
+ gettext_putenv(envStr);
+ MEM_freeN(envStr);
+ }
+
+ locreturn= setlocale(LC_ALL, long_locale);
+
+ if (locreturn == NULL) {
+ printf("Could not change locale to %s\n", long_locale);
+ ok= 0;
}
- else {
-
-#if defined (_WIN32) || defined(__APPLE__)
- BLI_setenv("LANG", str);
#else
- char *locreturn= setlocale(LC_ALL, str);
+ {
+ const char *locale;
+ static char default_locale[64]="\0";
+
+ if(default_locale[0]==0) {
+ char *env_language= getenv("LANGUAGE");
+
+ if(env_language) {
+ char *s;
+
+ /* store defaul locale */
+ strncpy(default_locale, env_language, sizeof(default_locale));
+
+ /* use first language as default */
+ s= strchr(default_locale, ':');
+ if(s) s[0]= 0;
+ }
+ }
+
+ if(short_locale[0])
+ locale= short_locale;
+ else
+ locale= default_locale;
+
+ BLI_setenv("LANG", locale);
+ BLI_setenv("LANGUAGE", locale);
+
+ locreturn= setlocale(LC_ALL, locale);
+
if (locreturn == NULL) {
- char *lang= BLI_sprintfN("%s.UTF-8", str);
+ char *short_locale_utf8= BLI_sprintfN("%s.UTF-8", short_locale);
+
+ locreturn= setlocale(LC_ALL, short_locale_utf8);
- locreturn= setlocale(LC_ALL, lang);
if (locreturn == NULL) {
- printf("could not change language to %s nor %s\n", str, lang);
+ printf("Could not change locale to %s nor %s\n", short_locale, short_locale_utf8);
+ ok= 0;
}
- MEM_freeN(lang);
+ MEM_freeN(short_locale_utf8);
}
-
- setlocale(LC_NUMERIC, "C");
+ }
#endif
- textdomain(DOMAIN_NAME);
- bindtextdomain(DOMAIN_NAME, global_messagepath);
- /* bind_textdomain_codeset(DOMAIN_NAME, global_encoding_name); */
- BLI_strncpy(global_language, str, sizeof(global_language));
-
+
+ if(ok) {
+ //printf("Change locale to %s\n", locreturn );
+ BLI_strncpy(global_language, locreturn, sizeof(global_language));
}
+
+ setlocale(LC_NUMERIC, "C");
+
+ textdomain(DOMAIN_NAME);
+ bindtextdomain(DOMAIN_NAME, global_messagepath);
+ bind_textdomain_codeset(DOMAIN_NAME, global_encoding_name);
}
void BLF_lang_encoding(const char *str)
diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
new file mode 100644
index 00000000000..b53f4cf7609
--- /dev/null
+++ b/source/blender/blenfont/intern/blf_translation.c
@@ -0,0 +1,86 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Blender Foundation,
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenfont/intern/blf_translation.c
+ * \ingroup blf
+ */
+
+#include <stdlib.h>
+
+#ifdef INTERNATIONAL
+#include <libintl.h>
+#endif
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_path_util.h"
+#include "BLI_string.h"
+#include "BLI_path_util.h"
+#include "BLI_fileops.h"
+
+#include "BLF_translation.h"
+
+#ifdef INTERNATIONAL
+const char unifont_filename[]="droidsans.ttf.gz";
+static unsigned char *unifont_ttf= NULL;
+static int unifont_size= 0;
+
+unsigned char *BLF_get_unifont(int *unifont_size_r)
+{
+ if(unifont_ttf==NULL) {
+ char *fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts");
+ char unifont_path[1024];
+
+ BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename);
+
+ unifont_ttf= (unsigned char*)BLI_ungzip_to_mem(unifont_path, &unifont_size);
+ }
+
+ *unifont_size_r= unifont_size;
+
+ return unifont_ttf;
+}
+
+void BLF_free_unifont(void)
+{
+ if(unifont_ttf)
+ MEM_freeN(unifont_ttf);
+}
+
+#endif
+
+const char* BLF_gettext(const char *msgid)
+{
+#ifdef INTERNATIONAL
+ if( msgid[0] )
+ return gettext( msgid );
+ return "";
+#else
+ return msgid;
+#endif
+}
diff --git a/source/blender/blenfont/intern/blf_util.c b/source/blender/blenfont/intern/blf_util.c
index ab6b516787e..cfe77887674 100644
--- a/source/blender/blenfont/intern/blf_util.c
+++ b/source/blender/blenfont/intern/blf_util.c
@@ -46,7 +46,7 @@ unsigned int blf_next_p2(unsigned int x)
x |= (x >> 2);
x |= (x >> 1);
x += 1;
- return(x);
+ return x;
}
unsigned int blf_hash(unsigned int val)
@@ -60,7 +60,7 @@ unsigned int blf_hash(unsigned int val)
key ^= (key >> 13);
key += ~(key << 9);
key ^= (key >> 17);
- return(key % 257);
+ return key % 257;
}
/*
@@ -72,7 +72,7 @@ unsigned int blf_hash(unsigned int val)
* The original name: imlib_font_utf8_get_next
* more info here: http://docs.enlightenment.org/api/imlib2/html/
*/
-int blf_utf8_next(unsigned char *buf, int *iindex)
+int blf_utf8_next(unsigned char *buf, unsigned int *iindex)
{
/* Reads UTF8 bytes from 'buf', starting at 'index' and
* returns the code point of the next valid code point.
@@ -85,7 +85,7 @@ int blf_utf8_next(unsigned char *buf, int *iindex)
d= buf[index++];
if (!d)
- return(0);
+ return 0;
while (buf[index] && ((buf[index] & 0xc0) == 0x80))
index++;
@@ -124,5 +124,5 @@ int blf_utf8_next(unsigned char *buf, int *iindex)
r |= (d4 & 0x3f);
}
*iindex= index;
- return(r);
+ return r;
}
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 7d60c00156d..8836999bc9b 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -100,6 +100,8 @@ void get_objectspace_bone_matrix (struct Bone* bone, float M_accumulatedMatrix[]
void vec_roll_to_mat3(float *vec, float roll, float mat[][3]);
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, float *inloc, float *outloc);
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 0f19cfbc481..a09e475c9a3 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -44,7 +44,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 259
-#define BLENDER_SUBVERSION 1
+#define BLENDER_SUBVERSION 3
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0
@@ -53,7 +53,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 alpha
+#define BLENDER_VERSION_CYCLE beta
struct ListBase;
struct MemFile;
diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h
index 744ed9dba9c..5b40fa5d758 100644
--- a/source/blender/blenkernel/BKE_colortools.h
+++ b/source/blender/blenkernel/BKE_colortools.h
@@ -55,7 +55,7 @@ void floatbuf_to_byte(float *rectf, unsigned char *rectc, int x1, int x2, int
struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
void curvemapping_free(struct CurveMapping *cumap);
struct CurveMapping *curvemapping_copy(struct CurveMapping *cumap);
-void curvemapping_set_black_white(struct CurveMapping *cumap, float *black, float *white);
+void curvemapping_set_black_white(struct CurveMapping *cumap, const float black[3], const float white[3]);
#define CURVEMAP_SLOPE_NEGATIVE 0
#define CURVEMAP_SLOPE_POSITIVE 1
@@ -70,9 +70,9 @@ void curvemapping_changed(struct CurveMapping *cumap, int rem_doubles);
float curvemap_evaluateF(struct CurveMap *cuma, float value);
/* single curve, with table check */
float curvemapping_evaluateF(struct CurveMapping *cumap, int cur, float value);
-void curvemapping_evaluate3F(struct CurveMapping *cumap, float *vecout, const float *vecin);
-void curvemapping_evaluateRGBF(struct CurveMapping *cumap, float *vecout, const float *vecin);
-void curvemapping_evaluate_premulRGBF(struct CurveMapping *cumap, float *vecout, const float *vecin);
+void curvemapping_evaluate3F(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+void curvemapping_evaluateRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
+void curvemapping_evaluate_premulRGBF(struct CurveMapping *cumap, float vecout[3], const float vecin[3]);
void curvemapping_do_ibuf(struct CurveMapping *cumap, struct ImBuf *ibuf);
void curvemapping_premultiply(struct CurveMapping *cumap, int restore);
int curvemapping_RGBA_does_something(struct CurveMapping *cumap);
diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h
index 557ce417b14..02fc70e41e8 100644
--- a/source/blender/blenkernel/BKE_curve.h
+++ b/source/blender/blenkernel/BKE_curve.h
@@ -34,14 +34,16 @@
* \since March 2001
* \author nzc
*/
+
+struct BevList;
+struct BezTriple;
struct Curve;
+struct EditNurb;
struct ListBase;
+struct ListBase;
+struct Nurb;
struct Object;
struct Scene;
-struct Nurb;
-struct ListBase;
-struct BezTriple;
-struct BevList;
#define KNOTSU(nu) ( (nu)->orderu+ (nu)->pntsu+ (((nu)->flagu & CU_NURB_CYCLIC) ? ((nu)->orderu-1) : 0) )
#define KNOTSV(nu) ( (nu)->orderv+ (nu)->pntsv+ (((nu)->flagv & CU_NURB_CYCLIC) ? ((nu)->orderv-1) : 0) )
@@ -55,11 +57,14 @@ struct BevList;
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 tex_space_curve( struct Curve *cu);
diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h
index 17876c6ec9d..a59d43d315d 100644
--- a/source/blender/blenkernel/BKE_global.h
+++ b/source/blender/blenkernel/BKE_global.h
@@ -111,7 +111,7 @@ typedef struct Global {
#define G_SCRIPT_OVERRIDE_PREF (1 << 14) /* when this flag is set ignore the userprefs */
/* #define G_NOFROZEN (1 << 17) also removed */
-#define G_GREASEPENCIL (1 << 17)
+/* #define G_GREASEPENCIL (1 << 17) also removed */
/* #define G_AUTOMATKEYS (1 << 30) also removed */
@@ -151,9 +151,18 @@ typedef struct Global {
/* ENDIAN_ORDER: indicates what endianness the platform where the file was
* written had. */
+#if !defined( __BIG_ENDIAN__ ) && !defined( __LITTLE_ENDIAN__ )
+# error Either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ must be defined.
+#endif
+
#define L_ENDIAN 1
#define B_ENDIAN 0
-extern short ENDIAN_ORDER;
+
+#ifdef __BIG_ENDIAN__
+# define ENDIAN_ORDER B_ENDIAN
+#else
+# define ENDIAN_ORDER L_ENDIAN
+#endif
/* G.moving, signals drawing in (3d) window to denote transform */
#define G_TRANSFORM_OBJ 1
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index 0c31083a266..8181ad6421c 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -168,6 +168,9 @@ struct Image *copy_image(struct Image *ima);
/* merge source into dest, and free source */
void BKE_image_merge(struct Image *dest, struct Image *source);
+/* check if texture has alpha (depth=32) */
+int BKE_image_has_alpha(struct Image *image);
+
/* image_gen.c */
void BKE_image_buf_fill_color(unsigned char *rect, float *rect_float, int width, int height, float color[4]);
void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int height, int width);
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 88965d12e4a..cb6a0b9ab37 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -42,6 +42,8 @@ struct Main;
struct Material;
struct ID;
struct Object;
+struct Mesh;
+struct MTFace;
/* materials */
@@ -50,6 +52,7 @@ void free_material(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_main(struct Main *main, const char *name);
struct Material *add_material(const char *name);
struct Material *copy_material(struct Material *ma);
struct Material *localize_material(struct Material *ma);
@@ -66,19 +69,19 @@ short *give_totcolp(struct Object *ob);
struct Material ***give_matarar_id(struct ID *id); /* same but for ID's */
short *give_totcolp_id(struct ID *id);
-struct Material *give_current_material(struct Object *ob, int act);
-struct ID *material_from(struct Object *ob, int act);
-void assign_material(struct Object *ob, struct Material *ma, int act);
-void assign_matarar(struct Object *ob, struct Material ***matar, int totcol);
+struct Material *give_current_material(struct Object *ob, short act);
+struct ID *material_from(struct Object *ob, short act);
+void assign_material(struct Object *ob, struct Material *ma, short act);
+void assign_matarar(struct Object *ob, struct Material ***matar, short totcol);
-int find_material_index(struct Object *ob, struct Material *ma);
+short find_material_index(struct Object *ob, struct Material *ma);
int object_add_material_slot(struct Object *ob);
int object_remove_material_slot(struct Object *ob);
/* rna api */
void material_append_id(struct ID *id, struct Material *ma);
-struct Material *material_pop_id(struct ID *id, int index, int remove_material_slot);
+struct Material *material_pop_id(struct ID *id, int index, int remove_material_slot); /* index is an int because of RNA */
/* rendering */
@@ -89,7 +92,7 @@ void end_render_materials(struct Main *);
int material_in_material(struct Material *parmat, struct Material *mat);
-void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col);
+void ramp_blend(int type, float *r, float *g, float *b, float fac, const float col[3]);
/* copy/paste */
void clear_matcopybuf(void);
@@ -101,6 +104,9 @@ void clear_mat_mtex_copybuf(void);
void copy_mat_mtex_copybuf(struct ID *id);
void paste_mat_mtex_copybuf(struct ID *id);
+/* handle backward compatibility for tface/materials called from doversion (fileload=1) or Help Menu (fileload=0) */
+int do_version_tface(struct Main *main, int fileload);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 08c150e30e3..95490b1aff6 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -84,7 +84,7 @@ void nurbs_to_mesh(struct Object *ob);
void mesh_to_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, int index);
+void mesh_delete_material_index(struct Mesh *me, short index);
void mesh_set_smooth_flag(struct Object *meshOb, int enableSmooth);
struct BoundBox *mesh_get_bb(struct Object *ob);
diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h
new file mode 100644
index 00000000000..01d32321c81
--- /dev/null
+++ b/source/blender/blenkernel/BKE_navmesh_conversion.h
@@ -0,0 +1,65 @@
+/**
+* $Id$
+*
+* ***** 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 BKE_NAVMESH_CONVERSION_H
+#define BKE_NAVMESH_CONVERSION_H
+
+struct DerivedMesh;
+
+/* navmesh_conversion.c */
+int buildNavMeshDataByDerivedMesh(struct DerivedMesh *dm, int *vertsPerPoly,
+ int *nverts, float **verts,
+ int *ndtris, unsigned short **dtris,
+ int *npolys, unsigned short **dmeshes,
+ unsigned short **polys, int **dtrisToPolysMap,
+ int **dtrisToTrisMap, int **trisToFacesMap);
+
+int buildRawVertIndicesData(struct DerivedMesh* dm, int *nverts, float **verts,
+ int *ntris, unsigned short **tris, int **trisToFacesMap,
+ int **recastData);
+
+int buildNavMeshData(const int nverts, const float* verts,
+ const int ntris, const unsigned short *tris,
+ const int* recastData, const int* trisToFacesMap,
+ int *ndtris, unsigned short **dtris,
+ int *npolys, unsigned short **dmeshes, unsigned short **polys,
+ int *vertsPerPoly, int **dtrisToPolysMap, int **dtrisToTrisMap);
+
+int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
+ unsigned short* polys, const unsigned short* dmeshes,
+ const float* verts, const unsigned short* dtris,
+ const int* dtrisToPolysMap);
+
+int polyNumVerts(const unsigned short* p, const int vertsPerPoly);
+int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* verts);
+int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx);
+float distPointToSegmentSq(const float* point, const float* a, const float* b);
+
+
+#endif //NAVMESH_CONVERSION_H
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index e44b5d96852..1de3c295f4d 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -37,6 +37,10 @@
* \ingroup bke
*/
+#include "DNA_listBase.h"
+
+#include "RNA_types.h"
+
/* not very important, but the stack solver likes to know a maximum */
#define MAX_SOCKET 64
@@ -46,63 +50,151 @@ struct bNodeLink;
struct bNodeSocket;
struct bNodeStack;
struct bNodeTree;
+struct bNodeTreeExec;
struct GPUMaterial;
struct GPUNode;
struct GPUNodeStack;
struct ID;
struct ListBase;
struct Main;
+struct uiBlock;
+struct uiLayout;
struct MTex;
struct PointerRNA;
struct rctf;
struct RenderData;
struct Scene;
struct Tex;
-struct uiLayout;
-
+struct SpaceNode;
+struct ARegion;
+struct Object;
/* ************** NODE TYPE DEFINITIONS ***** */
-typedef struct bNodeSocketType {
+/** Compact definition of a node socket.
+ * Can be used to quickly define a list of static sockets for a node,
+ * which are added to each new node of that type.
+ *
+ * \deprecated New nodes should add default sockets in the initialization
+ * function instead. This struct is mostly kept for old nodes and should
+ * be removed some time.
+ */
+typedef struct bNodeSocketTemplate {
int type, limit;
- const char *name;
- float val1, val2, val3, val4; /* default alloc value for inputs */
- float min, max; /* default range for inputs */
+ char name[32];
+ float val1, val2, val3, val4; /* default alloc value for inputs */
+ float min, max;
+ PropertySubType subtype;
/* after this line is used internal only */
- struct bNodeSocket *sock; /* used during verify_types */
+ struct bNodeSocket *sock; /* used to hold verified socket */
+} bNodeSocketTemplate;
+
+typedef void (*NodeSocketButtonFunction)(const struct bContext *C, struct uiBlock *block,
+ struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock,
+ const char *name, int x, int y, int width);
+
+/** Defines a socket type.
+ * Defines the appearance and behavior of a socket in the UI.
+ */
+typedef struct bNodeSocketType {
+ int type;
+ char ui_name[32];
+ char ui_description[128];
+ int ui_icon;
+ char ui_color[4];
+
+ const char *value_structname;
+ int value_structsize;
+
+ NodeSocketButtonFunction buttonfunc;
} bNodeSocketType;
+/** Template for creating a node.
+ * Stored required parameters to make a new node of a specific type.
+ */
+typedef struct bNodeTemplate {
+ int type;
+
+ /* group tree */
+ struct bNodeTree *ngroup;
+} bNodeTemplate;
+
+/** Defines a node type.
+ * Initial attributes and constants for a node as well as callback functions
+ * implementing the node behavior.
+ */
typedef struct bNodeType {
void *next,*prev;
+ short needs_free; /* set for allocated types that need to be freed */
+
int type;
- const char *name; /* can be allocated too */
+ char name[32];
float width, minwidth, maxwidth;
+ float height, minheight, maxheight;
short nclass, flag;
- bNodeSocketType *inputs, *outputs;
+ /* templates for static sockets */
+ bNodeSocketTemplate *inputs, *outputs;
char storagename[64]; /* struct name for DNA */
- void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **);
-
- /* this line is set on startup of blender */
+ /// Main draw function for the node.
+ void (*drawfunc)(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node);
+ /// Updates the node geometry attributes according to internal state before actual drawing.
+ void (*drawupdatefunc)(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
+ /// Draw the option buttons on the node.
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);
+ /// Optional custom label function for the node header.
const char *(*labelfunc)(struct bNode *);
-
- void (*initfunc)(struct bNode *);
- void (*freestoragefunc)(struct bNode *);
- void (*copystoragefunc)(struct bNode *, struct bNode *);
+ /// Optional custom resize handle polling.
+ int (*resize_area_func)(struct bNode *node, int x, int y);
- /* for use with dynamic typedefs */
- ID *id;
- void *pynode; /* holds pointer to python script */
- void *pydict; /* holds pointer to python script dictionary (scope)*/
-
+ /// Called when the node is updated in the editor.
+ void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node);
+ /// Check and update if internal ID data has changed.
+ void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id);
+
+ /// Initialize a new node instance of this type after creation.
+ void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp);
+ /// Free the custom storage data.
+ void (*freestoragefunc)(struct bNode *node);
+ /// Make a copy of the custom storage data.
+ void (*copystoragefunc)(struct bNode *node, struct bNode *target);
+
+ /// Create a template from an existing node.
+ struct bNodeTemplate (*templatefunc)(struct bNode *);
+ /** If a node can be made from the template in the given node tree.
+ * \example Node groups can not be created inside their own node tree.
+ */
+ int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp);
+
+ /// Initialize a node tree associated to this node type.
+ void (*inittreefunc)(struct bNodeTree *ntree);
+ /// Update a node tree associated to this node type.
+ void (*updatetreefunc)(struct bNodeTree *ntree);
+
+ /* group edit callbacks for operators */
+ /* XXX this is going to be changed as required by the UI */
+ struct bNodeTree *(*group_edit_get)(struct bNode *node);
+ struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit);
+ void (*group_edit_clear)(struct bNode *node);
+
+
+ /* **** execution callbacks **** */
+ void *(*initexecfunc)(struct bNode *node);
+ void (*freeexecfunc)(struct bNode *node, void *nodedata);
+ void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **);
+ /* XXX this alternative exec function has been added to avoid changing all node types.
+ * when a final generic version of execution code is defined, this will be changed anyway
+ */
+ void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **);
/* gpu */
int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out);
-
+ /* extended gpu function */
+ int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out);
} bNodeType;
/* node->exec, now in use for composites (#define for break is same as ready yes) */
@@ -113,72 +205,124 @@ typedef struct bNodeType {
#define NODE_FREEBUFS 8
#define NODE_SKIPPED 16
+/* sim_exec return value */
+#define NODE_EXEC_FINISHED 0
+#define NODE_EXEC_SUSPEND 1
+
/* nodetype->nclass, for add-menu and themes */
-#define NODE_CLASS_INPUT 0
-#define NODE_CLASS_OUTPUT 1
-#define NODE_CLASS_OP_COLOR 3
-#define NODE_CLASS_OP_VECTOR 4
-#define NODE_CLASS_OP_FILTER 5
-#define NODE_CLASS_GROUP 6
-#define NODE_CLASS_FILE 7
-#define NODE_CLASS_CONVERTOR 8
-#define NODE_CLASS_MATTE 9
-#define NODE_CLASS_DISTORT 10
-#define NODE_CLASS_OP_DYNAMIC 11
-#define NODE_CLASS_PATTERN 12
-#define NODE_CLASS_TEXTURE 13
+#define NODE_CLASS_INPUT 0
+#define NODE_CLASS_OUTPUT 1
+#define NODE_CLASS_OP_COLOR 3
+#define NODE_CLASS_OP_VECTOR 4
+#define NODE_CLASS_OP_FILTER 5
+#define NODE_CLASS_GROUP 6
+#define NODE_CLASS_FILE 7
+#define NODE_CLASS_CONVERTOR 8
+#define NODE_CLASS_MATTE 9
+#define NODE_CLASS_DISTORT 10
+#define NODE_CLASS_OP_DYNAMIC 11
+#define NODE_CLASS_PATTERN 12
+#define NODE_CLASS_TEXTURE 13
+#define NODE_CLASS_EXECUTION 14
+#define NODE_CLASS_GETDATA 15
+#define NODE_CLASS_SETDATA 16
+#define NODE_CLASS_MATH 17
+#define NODE_CLASS_MATH_VECTOR 18
+#define NODE_CLASS_MATH_ROTATION 19
+#define NODE_CLASS_PARTICLES 25
+#define NODE_CLASS_TRANSFORM 30
+#define NODE_CLASS_COMBINE 31
+#define NODE_CLASS_LAYOUT 100
/* enum values for input/output */
#define SOCK_IN 1
#define SOCK_OUT 2
+struct bNodeTreeExec;
+
+typedef void (*bNodeTreeCallback)(void *calldata, struct ID *owner_id, struct bNodeTree *ntree);
+typedef struct bNodeTreeType
+{
+ int type; /* type identifier */
+ char idname[64]; /* id name for RNA identification */
+
+ ListBase node_types; /* type definitions */
+
+ /* callbacks */
+ void (*free_cache)(struct bNodeTree *ntree);
+ void (*free_node_cache)(struct bNodeTree *ntree, struct bNode *node);
+ void (*foreach_nodetree)(struct Main *main, void *calldata, bNodeTreeCallback func); /* iteration over all node trees */
+
+ /* calls allowing threaded composite */
+ void (*localize)(struct bNodeTree *localtree, struct bNodeTree *ntree);
+ void (*local_sync)(struct bNodeTree *localtree, struct bNodeTree *ntree);
+ void (*local_merge)(struct bNodeTree *localtree, struct bNodeTree *ntree);
+
+ /* Tree update. Overrides nodetype->updatetreefunc! */
+ void (*update)(struct bNodeTree *ntree);
+ /* Node update. Overrides nodetype->updatefunc! */
+ void (*update_node)(struct bNodeTree *ntree, struct bNode *node);
+
+ int (*validate_link)(struct bNodeTree *ntree, struct bNodeLink *link);
+} bNodeTreeType;
+
/* ************** GENERIC API, TREES *************** */
-void ntreeVerifyTypes(struct bNodeTree *ntree);
+struct bNodeTreeType *ntreeGetType(int type);
+struct bNodeType *ntreeGetNodeType(struct bNodeTree *ntree);
+struct bNodeSocketType *ntreeGetSocketType(int type);
-struct bNodeTree *ntreeAddTree(const char *name, int type, const short is_group);
+struct bNodeTree *ntreeAddTree(const char *name, int type, int nodetype);
void ntreeInitTypes(struct bNodeTree *ntree);
-//void ntreeMakeGroupSockets(struct bNodeTree *ntree);
-void ntreeUpdateType(struct bNodeTree *ntree, struct bNodeType *ntype);
void ntreeFreeTree(struct bNodeTree *ntree);
struct bNodeTree *ntreeCopyTree(struct bNodeTree *ntree);
void ntreeSwitchID(struct bNodeTree *ntree, struct ID *sce_from, struct ID *sce_to);
void ntreeMakeLocal(struct bNodeTree *ntree);
+int ntreeHasType(struct bNodeTree *ntree, int type);
void ntreeSocketUseFlags(struct bNodeTree *ntree);
-void ntreeSolveOrder(struct bNodeTree *ntree);
+void ntreeUpdateTree(struct bNodeTree *ntree);
+/* XXX Currently each tree update call does call to ntreeVerifyNodes too.
+ * Some day this should be replaced by a decent depsgraph automatism!
+ */
+void ntreeVerifyNodes(struct Main *main, struct ID *id);
-void ntreeBeginExecTree(struct bNodeTree *ntree);
-void ntreeExecTree(struct bNodeTree *ntree, void *callerdata, int thread);
-void ntreeCompositExecTree(struct bNodeTree *ntree, struct RenderData *rd, int do_previews);
-void ntreeEndExecTree(struct bNodeTree *ntree);
+void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes);
+/* XXX old trees handle output flags automatically based on special output node types and last active selection.
+ * new tree types have a per-output socket flag to indicate the final output to use explicitly.
+ */
+void ntreeSetOutput(struct bNodeTree *ntree);
void ntreeInitPreview(struct bNodeTree *, int xsize, int ysize);
void ntreeClearPreview(struct bNodeTree *ntree);
void ntreeFreeCache(struct bNodeTree *ntree);
-
- /* calls allowing threaded composite */
+
+int ntreeNodeExists(struct bNodeTree *ntree, struct bNode *testnode);
+int ntreeOutputExists(struct bNode *node, struct bNodeSocket *testsock);
struct bNodeTree *ntreeLocalize(struct bNodeTree *ntree);
void ntreeLocalSync(struct bNodeTree *localtree, struct bNodeTree *ntree);
void ntreeLocalMerge(struct bNodeTree *localtree, struct bNodeTree *ntree);
/* ************** GENERIC API, NODES *************** */
-void nodeVerifyType(struct bNodeTree *ntree, struct bNode *node);
+struct bNodeSocket *nodeAddSocket(struct bNodeTree *ntree, struct bNode *node, int in_out, const char *name, int type);
+struct bNodeSocket *nodeInsertSocket(struct bNodeTree *ntree, struct bNode *node, int in_out, struct bNodeSocket *next_sock, const char *name, int type);
+void nodeRemoveSocket(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocket *sock);
+void nodeRemoveAllSockets(struct bNodeTree *ntree, struct bNode *node);
void nodeAddToPreview(struct bNode *, float *, int, int, int);
+struct bNode *nodeAddNode(struct bNodeTree *ntree, struct bNodeTemplate *ntemp);
void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node);
void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node);
-void nodeAddSockets(struct bNode *node, struct bNodeType *ntype);
-struct bNode *nodeAddNodeType(struct bNodeTree *ntree, int type, struct bNodeTree *ngroup, struct ID *id);
-void nodeRegisterType(struct ListBase *typelist, const struct bNodeType *ntype) ;
-void nodeUpdateType(struct bNodeTree *ntree, struct bNode* node, struct bNodeType *ntype);
+
+void nodeRegisterType(struct ListBase *typelist, struct bNodeType *ntype) ;
void nodeMakeDynamicType(struct bNode *node);
int nodeDynamicUnlinkText(struct ID *txtid);
+
void nodeFreeNode(struct bNodeTree *ntree, struct bNode *node);
struct bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node);
@@ -186,6 +330,10 @@ struct bNodeLink *nodeAddLink(struct bNodeTree *ntree, struct bNode *fromnode, s
void nodeRemLink(struct bNodeTree *ntree, struct bNodeLink *link);
void nodeRemSocketLinks(struct bNodeTree *ntree, struct bNodeSocket *sock);
+void nodeSpaceCoords(struct bNode *node, float *locx, float *locy);
+void nodeAttachNode(struct bNode *node, struct bNode *parent);
+void nodeDetachNode(struct bNode *node);
+
struct bNode *nodeFindNodebyName(struct bNodeTree *ntree, const char *name);
int nodeFindNode(struct bNodeTree *ntree, struct bNodeSocket *sock, struct bNode **nodep, int *sockindex, int *in_out);
@@ -202,41 +350,71 @@ void NodeTagChanged(struct bNodeTree *ntree, struct bNode *node);
int NodeTagIDChanged(struct bNodeTree *ntree, struct ID *id);
void ntreeClearTags(struct bNodeTree *ntree);
-/* ************** Groups ****************** */
-
-struct bNode *nodeMakeGroupFromSelected(struct bNodeTree *ntree);
-int nodeGroupUnGroup(struct bNodeTree *ntree, struct bNode *gnode);
-
-void nodeGroupVerify(struct bNodeTree *ngroup);
-void nodeGroupSocketUseFlags(struct bNodeTree *ngroup);
-
-void nodeGroupCopy(struct bNode *gnode);
+void nodeFreePreview(struct bNode *node);
-struct bNodeSocket *nodeGroupAddSocket(struct bNodeTree *ngroup, const char *name, int type, int in_out);
-struct bNodeSocket *nodeGroupExposeSocket(struct bNodeTree *ngroup, struct bNodeSocket *sock, int in_out);
-void nodeGroupExposeAllSockets(struct bNodeTree *ngroup);
-void nodeGroupRemoveSocket(struct bNodeTree *ngroup, struct bNodeSocket *gsock, int in_out);
+/* ************** NODE TYPE ACCESS *************** */
-/* ************** COMMON NODES *************** */
+struct bNodeTemplate nodeMakeTemplate(struct bNode *node);
+int nodeValid(struct bNodeTree *ntree, struct bNodeTemplate *ntemp);
+const char* nodeLabel(struct bNode *node);
+struct bNodeTree *nodeGroupEditGet(struct bNode *node);
+struct bNodeTree *nodeGroupEditSet(struct bNode *node, int edit);
+void nodeGroupEditClear(struct bNode *node);
/* Init a new node type struct with default values and callbacks */
-void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag,
- struct bNodeSocketType *inputs, struct bNodeSocketType *outputs);
+void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
+void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs);
void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth);
-void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNode *));
+void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp));
+void node_type_valid(struct bNodeType *ntype, int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp));
void node_type_storage(struct bNodeType *ntype,
const char *storagename,
void (*freestoragefunc)(struct bNode *),
void (*copystoragefunc)(struct bNode *, struct bNode *));
+void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *));
+void node_type_template(struct bNodeType *ntype, struct bNodeTemplate (*templatefunc)(struct bNode *));
+void node_type_update(struct bNodeType *ntype,
+ void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node),
+ void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id));
+void node_type_tree(struct bNodeType *ntype,
+ void (*inittreefunc)(struct bNodeTree *),
+ void (*updatetreefunc)(struct bNodeTree *));
+void node_type_group_edit(struct bNodeType *ntype,
+ struct bNodeTree *(*group_edit_get)(struct bNode *node),
+ struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit),
+ void (*group_edit_clear)(struct bNode *node));
+
void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **));
+void node_type_exec_new(struct bNodeType *ntype,
+ void *(*initexecfunc)(struct bNode *node),
+ void (*freeexecfunc)(struct bNode *node, void *nodedata),
+ void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **));
void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out));
-void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *));
+void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out));
+
+/* ************** COMMON NODES *************** */
#define NODE_GROUP 2
-#define NODE_GROUP_MENU 1000
-#define NODE_DYNAMIC_MENU 4000
+#define NODE_FORLOOP 3
+#define NODE_WHILELOOP 4
+#define NODE_FRAME 5
+#define NODE_GROUP_MENU 10000
+#define NODE_DYNAMIC_MENU 20000
+
+/* look up a socket on a group node by the internal group socket */
+struct bNodeSocket *node_group_find_input(struct bNode *gnode, struct bNodeSocket *gsock);
+struct bNodeSocket *node_group_find_output(struct bNode *gnode, struct bNodeSocket *gsock);
+
+struct bNodeSocket *node_group_add_socket(struct bNodeTree *ngroup, const char *name, int type, int in_out);
+struct bNodeSocket *node_group_expose_socket(struct bNodeTree *ngroup, struct bNodeSocket *sock, int in_out);
+void node_group_expose_all_sockets(struct bNodeTree *ngroup);
+void node_group_remove_socket(struct bNodeTree *ngroup, struct bNodeSocket *gsock, int in_out);
-void register_node_type_group(ListBase *lb);
+struct bNode *node_group_make_from_selected(struct bNodeTree *ntree);
+int node_group_ungroup(struct bNodeTree *ntree, struct bNode *gnode);
+
+/* in node_common.c */
+void register_node_type_frame(ListBase *lb);
/* ************** SHADER NODES *************** */
@@ -286,11 +464,10 @@ struct ShadeResult;
#define NODE_DYNAMIC_REPARSE 6 /* 64 */
#define NODE_DYNAMIC_SET 15 /* sign */
-/* the type definitions array */
-extern struct ListBase node_all_shaders;
-
/* API */
+struct bNodeTreeExec *ntreeShaderBeginExecTree(struct bNodeTree *ntree, int use_tree_data);
+void ntreeShaderEndExecTree(struct bNodeTreeExec *exec, int use_tree_data);
void ntreeShaderExecTree(struct bNodeTree *ntree, struct ShadeInput *shi, struct ShadeResult *shr);
void ntreeShaderGetTexcoMode(struct bNodeTree *ntree, int osa, short *texco, int *mode);
void nodeShaderSynchronizeID(struct bNode *node, int copyto);
@@ -415,11 +592,11 @@ void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat);
#define CMP_SCALE_RENDERPERCENT 3
-/* the type definitions array */
-extern struct ListBase node_all_composit;
-
/* API */
struct CompBuf;
+struct bNodeTreeExec *ntreeCompositBeginExecTree(struct bNodeTree *ntree, int use_tree_data);
+void ntreeCompositEndExecTree(struct bNodeTreeExec *exec, int use_tree_data);
+void ntreeCompositExecTree(struct bNodeTree *ntree, struct RenderData *rd, int do_previews);
void ntreeCompositTagRender(struct Scene *sce);
int ntreeCompositTagAnimated(struct bNodeTree *ntree);
void ntreeCompositTagGenerators(struct bNodeTree *ntree);
@@ -459,23 +636,22 @@ struct TexResult;
#define TEX_NODE_PROC 500
#define TEX_NODE_PROC_MAX 600
-extern struct ListBase node_all_textures;
-
/* API */
int ntreeTexTagAnimated(struct bNodeTree *ntree);
void ntreeTexSetPreviewFlag(int);
-int ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, int osatex, short thread, struct Tex *tex, short which_output, int cfra, int preview, struct ShadeInput *shi, struct MTex *mtex);
void ntreeTexCheckCyclics(struct bNodeTree *ntree);
char* ntreeTexOutputMenu(struct bNodeTree *ntree);
+struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree, int use_tree_data);
+void ntreeTexEndExecTree(struct bNodeTreeExec *exec, int use_tree_data);
+int ntreeTexExecTree(struct bNodeTree *ntree, struct TexResult *target, float *coord, float *dxt, float *dyt, int osatex, short thread, struct Tex *tex, short which_output, int cfra, int preview, struct ShadeInput *shi, struct MTex *mtex);
+
-/**/
+/*************************************************/
void init_nodesystem(void);
void free_nodesystem(void);
-/**/
-
void clear_scene_in_nodes(struct Main *bmain, struct Scene *sce);
#endif
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index a6b5c04b5c3..7e39461a032 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -108,6 +108,7 @@ 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);
void set_no_parent_ipo(int val);
+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);
@@ -128,6 +129,7 @@ void *object_tfm_backup(struct Object *ob);
void object_tfm_restore(struct Object *ob, void *obtfm_pt);
void object_handle_update(struct Scene *scene, struct Object *ob);
+void object_sculpt_modifiers_changed(struct Object *ob);
float give_timeoffset(struct Object *ob);
int give_obdata_texspace(struct Object *ob, short **texflag, float **loc, float **size, float **rot);
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index ef16129e1e7..2578a90808a 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -59,6 +59,7 @@ void paint_brush_set(struct Paint *paint, struct Brush *br);
* Texture paint could be removed since selected faces are not used
* however hiding faces is useful */
int paint_facesel_test(struct Object *ob);
+int paint_vertsel_test(struct Object *ob);
/* Session data (mode-specific) */
@@ -97,5 +98,6 @@ typedef struct SculptSession {
} SculptSession;
void free_sculptsession(struct Object *ob);
+void free_sculptsession_deformMats(struct SculptSession *ss);
#endif
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index cf68e5795b4..9cb4dfae534 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -45,8 +45,6 @@ struct Strip;
struct StripElem;
struct bSound;
-#define MAXSEQ 32
-
#define BUILD_SEQAR_COUNT_NOTHING 0
#define BUILD_SEQAR_COUNT_CURRENT 1
#define BUILD_SEQAR_COUNT_CHILDREN 2
diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h
index fac5bf1cfd2..3728dd41089 100644
--- a/source/blender/blenkernel/BKE_sound.h
+++ b/source/blender/blenkernel/BKE_sound.h
@@ -39,7 +39,6 @@
struct PackedFile;
struct bSound;
-struct bContext;
struct ListBase;
struct Main;
struct Sequence;
@@ -65,12 +64,12 @@ struct bSound* sound_new_file(struct Main *main, const char *filename);
// XXX unused currently
#if 0
-struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source);
+struct bSound* sound_new_buffer(struct Main *bmain, struct bSound *source);
-struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, float start, float end);
+struct bSound* sound_new_limiter(struct Main *bmain, struct bSound *source, float start, float end);
#endif
-void sound_delete(struct bContext *C, struct bSound* sound);
+void sound_delete(struct Main *bmain, struct bSound* sound);
void sound_cache(struct bSound* sound);
@@ -124,7 +123,7 @@ void sound_play_scene(struct Scene *scene);
void sound_stop_scene(struct Scene *scene);
-void sound_seek_scene(struct bContext *C);
+void sound_seek_scene(struct Main *bmain, struct Scene *scene);
float sound_sync_scene(struct Scene *scene);
diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h
index 14e622c972e..87684e4895d 100644
--- a/source/blender/blenkernel/BKE_utildefines.h
+++ b/source/blender/blenkernel/BKE_utildefines.h
@@ -47,18 +47,18 @@
/* this weirdo pops up in two places ... */
#if !defined(WIN32)
-#ifndef O_BINARY
-#define O_BINARY 0
-#endif
+# ifndef O_BINARY
+# define O_BINARY 0
+# endif
#endif
/* INTEGER CODES */
-#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
- /* Big Endian */
-#define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
+#ifdef __BIG_ENDIAN__
+ /* Big Endian */
+# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
#else
- /* Little Endian */
-#define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
+ /* Little Endian */
+# define MAKE_ID(a,b,c,d) ( (int)(d)<<24 | (int)(c)<<16 | (b)<<8 | (a) )
#endif
#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
@@ -74,11 +74,11 @@
#define ENDB MAKE_ID('E','N','D','B')
/* Bit operations */
-#define BTST(a,b) ( ( (a) & 1<<(b) )!=0 )
-#define BNTST(a,b) ( ( (a) & 1<<(b) )==0 )
-#define BTST2(a,b,c) ( BTST( (a), (b) ) || BTST( (a), (c) ) )
-#define BSET(a,b) ( (a) | 1<<(b) )
-#define BCLR(a,b) ( (a) & ~(1<<(b)) )
+#define BTST(a,b) ( ( (a) & 1<<(b) )!=0 )
+#define BNTST(a,b) ( ( (a) & 1<<(b) )==0 )
+#define BTST2(a,b,c) ( BTST( (a), (b) ) || BTST( (a), (c) ) )
+#define BSET(a,b) ( (a) | 1<<(b) )
+#define BCLR(a,b) ( (a) & ~(1<<(b)) )
/* bit-row */
#define BROW(min, max) (((max)>=31? 0xFFFFFFFF: (1<<(max+1))-1) - ((min)? ((1<<(min))-1):0) )
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 18216f03873..5f7716e9cb5 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -35,7 +35,6 @@ set(INC
../blenfont
../blenlib
../blenloader
- ../editors/include
../gpu
../ikplugin
../imbuf
@@ -181,7 +180,6 @@ set(SRC
BKE_depsgraph.h
BKE_displist.h
BKE_effect.h
- BKE_endian.h
BKE_fcurve.h
BKE_fluidsim.h
BKE_font.h
@@ -354,6 +352,16 @@ if(WITH_LZMA)
add_definitions(-DWITH_LZMA)
endif()
+if(WITH_GAMEENGINE)
+ list(APPEND INC_SYS
+ ../../../extern/recastnavigation
+ )
+ list(APPEND SRC
+ intern/navmesh_conversion.c
+ BKE_navmesh_conversion.h
+ )
+endif()
+
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
endif()
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index 5ea42ee65ae..7d7ab56ec3f 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -1,9 +1,10 @@
#!/usr/bin/python
Import ('env')
+import os
sources = env.Glob('intern/*.c')
-incs = '. #/intern/guardedalloc #/intern/memutil ../editors/include'
+incs = '. #/intern/guardedalloc #/intern/memutil'
incs += ' ../blenlib ../blenfont ../makesdna ../windowmanager'
incs += ' ../render/extern/include #/intern/decimation/extern ../makesrna'
incs += ' ../imbuf ../ikplugin ../avi #/intern/elbeem/extern ../nodes ../modifiers'
@@ -90,6 +91,12 @@ if env['WITH_BF_LZMA']:
incs += ' #/extern/lzma'
defs.append('WITH_LZMA')
+if env['WITH_BF_GAMEENGINE']:
+ incs += ' #/extern/recastnavigation'
+ defs.append('WITH_GAMEENGINE')
+else:
+ sources.remove('intern' + os.sep + 'navmesh_conversion.c')
+
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c
index 04c5bf0e1e0..dde63505738 100644
--- a/source/blender/blenkernel/intern/DerivedMesh.c
+++ b/source/blender/blenkernel/intern/DerivedMesh.c
@@ -40,6 +40,7 @@
#include "DNA_cloth_types.h"
#include "DNA_key_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_armature_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h" // N_T
@@ -59,19 +60,18 @@
#include "BKE_paint.h"
#include "BKE_texture.h"
#include "BKE_multires.h"
-
+#include "BKE_armature.h"
#include "BLO_sys_types.h" // for intptr_t support
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
+#include "GL/glew.h"
#include "GPU_buffers.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
#include "GPU_material.h"
-#include "ED_sculpt.h" /* for ED_sculpt_modifiers_changed */
+extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */
///////////////////////////////////
///////////////////////////////////
@@ -643,13 +643,22 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
EditMeshDerivedMesh *emdm= (EditMeshDerivedMesh*) dm;
EditFace *efa;
int i, draw;
-
+ 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;
+
(void)setMaterial; /* unused */
/* currently unused -- each original face is handled separately */
(void)compareDrawOptions;
if (emdm->vertexCos) {
+ /* add direct access */
+ float (*vertexCos)[3]= emdm->vertexCos;
+ float (*vertexNos)[3]= emdm->vertexNos;
+ float (*faceNos)[3]= emdm->faceNos;
EditVert *eve;
for (i=0,eve=emdm->em->verts.first; eve; eve= eve->next)
@@ -659,75 +668,134 @@ static void emDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
int drawSmooth = (efa->flag & ME_SMOOTH);
draw = setDrawOptions==NULL ? 1 : setDrawOptions(userData, i, &drawSmooth);
if(draw) {
+ const GLenum poly_type= efa->v4 ? GL_QUADS:GL_TRIANGLES;
if (draw==2) { /* enabled with stipple */
- glEnable(GL_POLYGON_STIPPLE);
- glPolygonStipple(stipple_quarttone);
+
+ if(poly_prev != GL_ZERO) glEnd();
+ poly_prev= GL_ZERO; /* force glBegin */
+
+ glEnable(GL_POLYGON_STIPPLE);
+ glPolygonStipple(stipple_quarttone);
}
- glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
+ if(skip_normals) {
+ if(poly_type != poly_prev) {
+ if(poly_prev != GL_ZERO) glEnd();
+ glBegin((poly_prev= poly_type));
+ }
+ glVertex3fv(vertexCos[(int) efa->v1->tmp.l]);
+ glVertex3fv(vertexCos[(int) efa->v2->tmp.l]);
+ glVertex3fv(vertexCos[(int) efa->v3->tmp.l]);
+ if(poly_type == GL_QUADS) glVertex3fv(vertexCos[(int) efa->v4->tmp.l]);
+ }
+ else {
+ const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
+ if (shade_type != shade_prev) {
+ glShadeModel((shade_prev= shade_type));
+ }
+ if(poly_type != poly_prev) {
+ if(poly_prev != GL_ZERO) glEnd();
+ glBegin((poly_prev= poly_type));
+ }
- glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
- if (!drawSmooth) {
- glNormal3fv(emdm->faceNos[i]);
- glVertex3fv(emdm->vertexCos[(int) efa->v1->tmp.l]);
- glVertex3fv(emdm->vertexCos[(int) efa->v2->tmp.l]);
- glVertex3fv(emdm->vertexCos[(int) efa->v3->tmp.l]);
- if(efa->v4) glVertex3fv(emdm->vertexCos[(int) efa->v4->tmp.l]);
- } else {
- glNormal3fv(emdm->vertexNos[(int) efa->v1->tmp.l]);
- glVertex3fv(emdm->vertexCos[(int) efa->v1->tmp.l]);
- glNormal3fv(emdm->vertexNos[(int) efa->v2->tmp.l]);
- glVertex3fv(emdm->vertexCos[(int) efa->v2->tmp.l]);
- glNormal3fv(emdm->vertexNos[(int) efa->v3->tmp.l]);
- glVertex3fv(emdm->vertexCos[(int) efa->v3->tmp.l]);
- if(efa->v4) {
- glNormal3fv(emdm->vertexNos[(int) efa->v4->tmp.l]);
- glVertex3fv(emdm->vertexCos[(int) efa->v4->tmp.l]);
+ if (!drawSmooth) {
+ glNormal3fv(faceNos[i]);
+ glVertex3fv(vertexCos[(int) efa->v1->tmp.l]);
+ glVertex3fv(vertexCos[(int) efa->v2->tmp.l]);
+ glVertex3fv(vertexCos[(int) efa->v3->tmp.l]);
+ if(poly_type == GL_QUADS) glVertex3fv(vertexCos[(int) efa->v4->tmp.l]);
+ } else {
+ glNormal3fv(vertexNos[(int) efa->v1->tmp.l]);
+ glVertex3fv(vertexCos[(int) efa->v1->tmp.l]);
+ glNormal3fv(vertexNos[(int) efa->v2->tmp.l]);
+ glVertex3fv(vertexCos[(int) efa->v2->tmp.l]);
+ glNormal3fv(vertexNos[(int) efa->v3->tmp.l]);
+ glVertex3fv(vertexCos[(int) efa->v3->tmp.l]);
+ if(poly_type == GL_QUADS) {
+ glNormal3fv(vertexNos[(int) efa->v4->tmp.l]);
+ glVertex3fv(vertexCos[(int) efa->v4->tmp.l]);
+ }
}
}
- glEnd();
+
- if (draw==2)
+ if (draw==2) {
+ glEnd();
+ poly_prev= GL_ZERO; /* force glBegin */
+
glDisable(GL_POLYGON_STIPPLE);
+ }
}
}
- } else {
+ }
+ else {
for (i=0,efa= emdm->em->faces.first; efa; i++,efa= efa->next) {
int drawSmooth = (efa->flag & ME_SMOOTH);
draw = setDrawOptions==NULL ? 1 : setDrawOptions(userData, i, &drawSmooth);
if(draw) {
+ const GLenum poly_type= efa->v4 ? GL_QUADS:GL_TRIANGLES;
if (draw==2) { /* enabled with stipple */
+
+ if(poly_prev != GL_ZERO) glEnd();
+ poly_prev= GL_ZERO; /* force glBegin */
+
glEnable(GL_POLYGON_STIPPLE);
glPolygonStipple(stipple_quarttone);
}
- glShadeModel(drawSmooth?GL_SMOOTH:GL_FLAT);
- glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
- if (!drawSmooth) {
- glNormal3fv(efa->n);
- glVertex3fv(efa->v1->co);
- glVertex3fv(efa->v2->co);
- glVertex3fv(efa->v3->co);
- if(efa->v4) glVertex3fv(efa->v4->co);
- } else {
- glNormal3fv(efa->v1->no);
+ if(skip_normals) {
+ if(poly_type != poly_prev) {
+ if(poly_prev != GL_ZERO) glEnd();
+ glBegin((poly_prev= poly_type));
+ }
glVertex3fv(efa->v1->co);
- glNormal3fv(efa->v2->no);
glVertex3fv(efa->v2->co);
- glNormal3fv(efa->v3->no);
glVertex3fv(efa->v3->co);
- if(efa->v4) {
- glNormal3fv(efa->v4->no);
- glVertex3fv(efa->v4->co);
+ if(poly_type == GL_QUADS) glVertex3fv(efa->v4->co);
+ }
+ else {
+ const GLenum shade_type= drawSmooth ? GL_SMOOTH : GL_FLAT;
+ if (shade_type != shade_prev) {
+ glShadeModel((shade_prev= shade_type));
+ }
+ if(poly_type != poly_prev) {
+ if(poly_prev != GL_ZERO) glEnd();
+ glBegin((poly_prev= poly_type));
+ }
+
+ if (!drawSmooth) {
+ glNormal3fv(efa->n);
+ glVertex3fv(efa->v1->co);
+ glVertex3fv(efa->v2->co);
+ glVertex3fv(efa->v3->co);
+ if(poly_type == GL_QUADS) glVertex3fv(efa->v4->co);
+ } else {
+ glNormal3fv(efa->v1->no);
+ glVertex3fv(efa->v1->co);
+ glNormal3fv(efa->v2->no);
+ glVertex3fv(efa->v2->co);
+ glNormal3fv(efa->v3->no);
+ glVertex3fv(efa->v3->co);
+ if(poly_type == GL_QUADS) {
+ glNormal3fv(efa->v4->no);
+ glVertex3fv(efa->v4->co);
+ }
}
}
- glEnd();
+
- if (draw==2)
+ if (draw==2) {
+ glEnd();
+ poly_prev= GL_ZERO;
+
glDisable(GL_POLYGON_STIPPLE);
+ }
}
}
}
+
+ /* if non zero we know a face was rendered */
+ if(poly_prev != GL_ZERO) glEnd();
}
static void emDM_drawFacesTex_common(DerivedMesh *dm,
@@ -920,17 +988,14 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
EditFace *efa;
DMVertexAttribs attribs= {{{0}}};
GPUVertexAttribs gattribs;
- MTFace *tf;
- int transp, new_transp, orig_transp, tfoffset;
- int i, b, matnr, new_matnr, dodraw, layer;
+ /* int tfoffset; */ /* UNUSED */
+ int i, b, matnr, new_matnr, dodraw /* , layer */ /* UNUSED */;
dodraw = 0;
matnr = -1;
- transp = GPU_get_material_blend_mode();
- orig_transp = transp;
- layer = CustomData_get_layer_index(&em->fdata, CD_MTFACE);
- tfoffset = (layer == -1)? -1: em->fdata.layers[layer].offset;
+ /* layer = CustomData_get_layer_index(&em->fdata, CD_MTFACE); */ /* UNUSED */
+ /* tfoffset = (layer == -1)? -1: em->fdata.layers[layer].offset; */ /* UNUSED */
/* always use smooth shading even for flat faces, else vertex colors wont interpolate */
glShadeModel(GL_SMOOTH);
@@ -972,19 +1037,6 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
}
- if(tfoffset != -1) {
- tf = (MTFace*)((char*)efa->data)+tfoffset;
- new_transp = tf->transp;
-
- if(new_transp != transp) {
- if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
- GPU_set_material_blend_mode(orig_transp);
- else
- GPU_set_material_blend_mode(new_transp);
- transp = new_transp;
- }
- }
-
if(dodraw) {
glBegin(efa->v4?GL_QUADS:GL_TRIANGLES);
if (!drawSmooth) {
@@ -1607,20 +1659,64 @@ void weight_to_rgb(float input, float *fr, float *fg, float *fb)
}
}
-static void calc_weightpaint_vert_color(Object *ob, ColorBand *coba, int vert, unsigned char *col)
+/* draw_flag's for calc_weightpaint_vert_color */
+enum {
+ CALC_WP_MULTIPAINT= (1<<0),
+ CALC_WP_AUTO_NORMALIZE= (1<<1),
+};
+
+static void calc_weightpaint_vert_color(Object *ob, ColorBand *coba, int vert, unsigned char *col, char *dg_flags, int selected, int UNUSED(unselected), const int draw_flag)
{
Mesh *me = ob->data;
float colf[4], input = 0.0f;
int i;
+
+ int make_black= FALSE;
+
if (me->dvert) {
- for (i=0; i<me->dvert[vert].totweight; i++)
- if (me->dvert[vert].dw[i].def_nr==ob->actdef-1)
- input+=me->dvert[vert].dw[i].weight;
- }
+ if ((selected > 1) && (draw_flag & CALC_WP_MULTIPAINT)) {
+
+ int was_a_nonzero= FALSE;
+ for (i=0; i<me->dvert[vert].totweight; i++) {
+ /* in multipaint, get the average if auto normalize is inactive
+ * get the sum if it is active */
+ if(dg_flags[me->dvert[vert].dw[i].def_nr]) {
+ if(me->dvert[vert].dw[i].weight) {
+ input+= me->dvert[vert].dw[i].weight;
+ was_a_nonzero= TRUE;
+ }
+ }
+ }
- CLAMP(input, 0.0f, 1.0f);
+ /* make it black if the selected groups have no weight on a vertex */
+ if(was_a_nonzero == FALSE) {
+ make_black = TRUE;
+ }
+ else if ((draw_flag & CALC_WP_AUTO_NORMALIZE) == FALSE) {
+ input /= selected; /* get the average */
+ }
+ }
+ else {
+ /* default, non tricky behavior */
+ for (i=0; i<me->dvert[vert].totweight; i++) {
+ if (me->dvert[vert].dw[i].def_nr==ob->actdef-1) {
+ input+=me->dvert[vert].dw[i].weight;
+ }
+ }
+ }
+ }
+ if (make_black) {
+ col[3] = 0;
+ col[2] = 0;
+ col[1] = 0;
+ col[0] = 255;
+ return;
+ }
+
+ CLAMP(input, 0.0f, 1.0f);
+
if(coba)
do_colorband(coba, input, colf);
else
@@ -1639,7 +1735,7 @@ void vDM_ColorBand_store(ColorBand *coba)
stored_cb= coba;
}
-static void add_weight_mcol_dm(Object *ob, DerivedMesh *dm)
+static void add_weight_mcol_dm(Object *ob, DerivedMesh *dm, int const draw_flag)
{
Mesh *me = ob->data;
MFace *mf = me->mface;
@@ -1647,17 +1743,24 @@ static void add_weight_mcol_dm(Object *ob, DerivedMesh *dm)
unsigned char *wtcol;
int i;
+ int defbase_len = BLI_countlist(&ob->defbase);
+ char *defbase_sel = MEM_mallocN(defbase_len * sizeof(char), __func__);
+ int selected = get_selected_defgroups(ob, defbase_sel, defbase_len);
+ int unselected = defbase_len - selected;
+
wtcol = MEM_callocN (sizeof (unsigned char) * me->totface*4*4, "weightmap");
memset(wtcol, 0x55, sizeof (unsigned char) * me->totface*4*4);
for (i=0; i<me->totface; i++, mf++) {
- calc_weightpaint_vert_color(ob, coba, mf->v1, &wtcol[(i*4 + 0)*4]);
- calc_weightpaint_vert_color(ob, coba, mf->v2, &wtcol[(i*4 + 1)*4]);
- calc_weightpaint_vert_color(ob, coba, mf->v3, &wtcol[(i*4 + 2)*4]);
+ calc_weightpaint_vert_color(ob, coba, mf->v1, &wtcol[(i*4 + 0)*4], defbase_sel, selected, unselected, draw_flag);
+ calc_weightpaint_vert_color(ob, coba, mf->v2, &wtcol[(i*4 + 1)*4], defbase_sel, selected, unselected, draw_flag);
+ calc_weightpaint_vert_color(ob, coba, mf->v3, &wtcol[(i*4 + 2)*4], defbase_sel, selected, unselected, draw_flag);
if (mf->v4)
- calc_weightpaint_vert_color(ob, coba, mf->v4, &wtcol[(i*4 + 3)*4]);
+ calc_weightpaint_vert_color(ob, coba, mf->v4, &wtcol[(i*4 + 3)*4], defbase_sel, selected, unselected, draw_flag);
}
+ MEM_freeN(defbase_sel);
+
CustomData_add_layer(&dm->faceData, CD_WEIGHT_MCOL, CD_ASSIGN, wtcol, dm->numFaceData);
}
@@ -1685,6 +1788,9 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
int has_multires = mmd != NULL, multires_applied = 0;
int sculpt_mode = ob->mode & OB_MODE_SCULPT && ob->sculpt;
+ int draw_flag= ((scene->toolsettings->multipaint ? CALC_WP_MULTIPAINT : 0) |
+ (scene->toolsettings->auto_normalize ? CALC_WP_AUTO_NORMALIZE : 0));
+
if(mmd && !mmd->sculptlvl)
has_multires = 0;
@@ -1864,7 +1970,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
}
if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
- add_weight_mcol_dm(ob, dm);
+ add_weight_mcol_dm(ob, dm, draw_flag);
/* Constructive modifiers need to have an origindex
* otherwise they wont have anywhere to copy the data from.
@@ -1981,7 +2087,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
CDDM_calc_normals(finaldm);
if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
- add_weight_mcol_dm(ob, finaldm);
+ add_weight_mcol_dm(ob, finaldm, draw_flag);
} else if(dm) {
finaldm = dm;
} else {
@@ -1993,7 +2099,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
}
if((dataMask & CD_MASK_WEIGHT_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT))
- add_weight_mcol_dm(ob, finaldm);
+ add_weight_mcol_dm(ob, finaldm, draw_flag);
}
/* add an orco layer if needed */
@@ -2259,14 +2365,14 @@ static void clear_mesh_caches(Object *ob)
}
if(ob->sculpt) {
- ED_sculpt_modifiers_changed(ob);
+ object_sculpt_modifiers_changed(ob);
}
}
static void mesh_build_data(Scene *scene, Object *ob, CustomDataMask dataMask)
{
Object *obact = scene->basact?scene->basact->object:NULL;
- int editing = paint_facesel_test(ob);
+ int editing = paint_facesel_test(ob) || paint_vertsel_test(ob);/* paint_vertsel_test */
/* weight paint and face select need original indices because of selection buffer drawing */
int needMapping = (ob==obact) && (editing || (ob->mode & (OB_MODE_WEIGHT_PAINT|OB_MODE_VERTEX_PAINT)));
@@ -2454,13 +2560,13 @@ static void make_vertexcosnos__mapFunc(void *userData, int index, float *co, flo
/* check if we've been here before (normal should not be 0) */
if(vec[3] || vec[4] || vec[5]) return;
- VECCOPY(vec, co);
+ copy_v3_v3(vec, co);
vec+= 3;
if(no_f) {
- VECCOPY(vec, no_f);
+ copy_v3_v3(vec, no_f);
}
else {
- VECCOPY(vec, no_s);
+ normal_short_to_float_v3(vec, no_s);
}
}
@@ -2834,7 +2940,7 @@ void DM_set_object_boundbox(Object *ob, DerivedMesh *dm)
dm->getMinMax(dm, min, max);
if(!ob->bb)
- ob->bb= MEM_callocN(sizeof(BoundBox), "bb");
+ ob->bb= MEM_callocN(sizeof(BoundBox), "DM-BoundBox");
boundbox_set_from_min_max(ob->bb, min, max);
}
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 9c2467505cd..73ddcbecf94 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -117,7 +117,7 @@ static void make_localact_apply_cb(ID *id, AnimData *adt, void *mlac_ptr)
tMakeLocalActionContext *mlac = (tMakeLocalActionContext *)mlac_ptr;
if (adt->action == mlac->act) {
- if (id->lib==0) {
+ if (id->lib == NULL) {
adt->action = mlac->actn;
id_us_plus(&mlac->actn->id);
@@ -524,7 +524,6 @@ void copy_pose (bPose **dst, bPose *src, int copycon)
if (copycon) {
copy_constraints(&listb, &pchan->constraints, TRUE); // copy_constraints NULLs listb
pchan->constraints= listb;
- pchan->path= NULL; // XXX remove this line when the new motionpaths are ready... (depreceated code)
pchan->mpath= NULL; /* motion paths should not get copied yet... */
}
@@ -595,17 +594,12 @@ void free_pose_channels_hash(bPose *pose)
void free_pose_channel(bPoseChannel *pchan)
{
- // XXX this case here will need to be removed when the new motionpaths are ready
- if (pchan->path) {
- MEM_freeN(pchan->path);
- pchan->path= NULL;
- }
-
+
if (pchan->mpath) {
animviz_free_motionpath(pchan->mpath);
pchan->mpath= NULL;
}
-
+
free_constraints(&pchan->constraints);
if (pchan->prop) {
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 9ca11db7fce..824bbb8f70d 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -1143,11 +1143,11 @@ static void face_duplilist(ListBase *lb, ID *id, Scene *scene, Object *par, floa
w= (mv4)? 0.25f: 1.0f/3.0f;
if(orco) {
- VECADDFAC(dob->orco, dob->orco, orco[mv1], w);
- VECADDFAC(dob->orco, dob->orco, orco[mv2], w);
- VECADDFAC(dob->orco, dob->orco, orco[mv3], w);
+ madd_v3_v3v3fl(dob->orco, dob->orco, orco[mv1], w);
+ madd_v3_v3v3fl(dob->orco, dob->orco, orco[mv2], w);
+ madd_v3_v3v3fl(dob->orco, dob->orco, orco[mv3], w);
if(mv4)
- VECADDFAC(dob->orco, dob->orco, orco[mv4], w);
+ madd_v3_v3v3fl(dob->orco, dob->orco, orco[mv4], w);
}
if(mtface) {
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index b690c9b4a91..5d01db87422 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1557,7 +1557,7 @@ static NlaEvalChannel *nlaevalchan_verify (PointerRNA *ptr, ListBase *channels,
PropertyRNA *prop;
PointerRNA new_ptr;
char *path = NULL;
- short free_path=0;
+ /* short free_path=0; */
/* sanity checks */
if (channels == NULL)
@@ -1565,7 +1565,7 @@ static NlaEvalChannel *nlaevalchan_verify (PointerRNA *ptr, ListBase *channels,
/* get RNA pointer+property info from F-Curve for more convenient handling */
/* get path, remapped as appropriate to work in its new environment */
- free_path= animsys_remap_path(strip->remap, fcu->rna_path, &path);
+ /* free_path= */ /* UNUSED */ animsys_remap_path(strip->remap, fcu->rna_path, &path);
/* a valid property must be available, and it must be animateable */
if (RNA_path_resolve(ptr, path, &new_ptr, &prop) == 0) {
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 62ce184a2d7..1149d8eee25 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -1483,7 +1483,6 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
pchanw.next= pchan->next;
pchanw.parent= pchan->parent;
pchanw.child= pchan->child;
- pchanw.path= NULL;
/* this is freed so copy a copy, else undo crashes */
if(pchanw.prop) {
@@ -2465,3 +2464,33 @@ void where_is_pose (Scene *scene, Object *ob)
}
}
}
+
+
+/* Returns total selected vgroups,
+ * wpi.defbase_sel is assumed malloc'd, all values are set */
+int get_selected_defgroups(Object *ob, char *dg_selection, int defbase_len)
+{
+ bDeformGroup *defgroup;
+ unsigned int i;
+ Object *armob= 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_len && defgroup; defgroup = defgroup->next, i++) {
+ bPoseChannel *pchan= get_pose_channel(pose, defgroup->name);
+ if(pchan && (pchan->bone->flag & BONE_SELECTED)) {
+ dg_selection[i]= TRUE;
+ dg_flags_sel_tot++;
+ }
+ else {
+ dg_selection[i]= FALSE;
+ }
+ }
+ }
+ else {
+ memset(dg_selection, FALSE, sizeof(char) * defbase_len);
+ }
+
+ return dg_flags_sel_tot;
+}
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 5f33059e117..218b83fc52a 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -98,7 +98,6 @@
Global G;
UserDef U;
/* ListBase = {NULL, NULL}; */
-short ENDIAN_ORDER;
char versionstr[48]= "";
@@ -132,9 +131,6 @@ void initglobals(void)
strcpy(G.ima, "//");
- ENDIAN_ORDER= 1;
- ENDIAN_ORDER= (((char*)&ENDIAN_ORDER)[0])? L_ENDIAN: B_ENDIAN;
-
if(BLENDER_SUBVERSION)
BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d.%d", BLENDER_VERSION, BLENDER_SUBVERSION);
else
@@ -324,17 +320,14 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath
MEM_freeN(bfd);
}
-static int handle_subversion_warning(Main *main)
+static int handle_subversion_warning(Main *main, ReportList *reports)
{
if(main->minversionfile > BLENDER_VERSION ||
(main->minversionfile == BLENDER_VERSION &&
main->minsubversionfile > BLENDER_SUBVERSION)) {
-
- char str[128];
-
- BLI_snprintf(str, sizeof(str), "File written by newer Blender binary: %d.%d , expect loss of data!", main->minversionfile, main->minsubversionfile);
-// XXX error(str);
+ BKE_reportf(reports, RPT_ERROR, "File written by newer Blender binary: %d.%d , expect loss of data!", main->minversionfile, main->minsubversionfile);
}
+
return 1;
}
@@ -392,7 +385,7 @@ int BKE_read_file(bContext *C, const char *filepath, ReportList *reports)
if (bfd) {
if(bfd->user) retval= BKE_READ_FILE_OK_USERPREFS;
- if(0==handle_subversion_warning(bfd->main)) {
+ if(0==handle_subversion_warning(bfd->main, reports)) {
free_main(bfd->main);
MEM_freeN(bfd);
bfd= NULL;
@@ -507,7 +500,7 @@ static int read_undosave(bContext *C, UndoElem *uel)
void BKE_write_undo(bContext *C, const char *name)
{
uintptr_t maxmem, totmem, memused;
- int nr, success;
+ int nr /*, success */ /* UNUSED */;
UndoElem *uel;
if( (U.uiflag & USER_GLOBALUNDO)==0) return;
@@ -559,7 +552,7 @@ void BKE_write_undo(bContext *C, const char *name)
BLI_snprintf(numstr, sizeof(numstr), "%d.blend", counter);
BLI_make_file_string("/", filepath, btempdir, numstr);
- success= BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL);
+ /* success= */ /* UNUSED */ BLO_write_file(CTX_data_main(C), filepath, fileflags, NULL, NULL);
BLI_strncpy(curundo->str, filepath, sizeof(curundo->str));
}
@@ -569,7 +562,7 @@ void BKE_write_undo(bContext *C, const char *name)
if(curundo->prev) prevfile= &(curundo->prev->memfile);
memused= MEM_get_memory_in_use();
- success= BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags);
+ /* success= */ /* UNUSED */ BLO_write_file_mem(CTX_data_main(C), prevfile, &curundo->memfile, G.fileflags);
curundo->undosize= MEM_get_memory_in_use() - memused;
}
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
index a0f38e675f9..3966caa1fa9 100644
--- a/source/blender/blenkernel/intern/boids.c
+++ b/source/blender/blenkernel/intern/boids.c
@@ -156,8 +156,8 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
if(rule->type == eBoidRuleType_Goal && boids->options & BOID_ALLOW_CLIMB && surface!=0.0f) {
if(!bbd->goal_ob || bbd->goal_priority < priority) {
bbd->goal_ob = eob;
- VECCOPY(bbd->goal_co, efd.loc);
- VECCOPY(bbd->goal_nor, efd.nor);
+ copy_v3_v3(bbd->goal_co, efd.loc);
+ copy_v3_v3(bbd->goal_nor, efd.nor);
}
}
else if(rule->type == eBoidRuleType_Avoid && bpa->data.mode == eBoidMode_Climbing &&
@@ -869,7 +869,7 @@ static void boid_climb(BoidSettings *boids, ParticleData *pa, float *surface_co,
{
BoidParticle *bpa = pa->boid;
float nor[3], vel[3];
- VECCOPY(nor, surface_nor);
+ copy_v3_v3(nor, surface_nor);
/* gather apparent gravity */
VECADDFAC(bpa->gravity, bpa->gravity, surface_nor, -1.0f);
@@ -1345,7 +1345,7 @@ void boid_body(BoidBrainData *bbd, ParticleData *pa)
{
boid_climb(boids, pa, ground_co, ground_nor);
//float nor[3];
- //VECCOPY(nor, ground_nor);
+ //copy_v3_v3(nor, ground_nor);
///* gather apparent gravity to r_ve */
//VECADDFAC(pa->r_ve, pa->r_ve, ground_nor, -1.0);
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index c497cd2813a..c84a3cfc730 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -555,7 +555,7 @@ void brush_imbuf_new(Brush *brush, short flt, short texfall, int bufsize, ImBuf
if (texfall == 0) {
dist = sqrt(xy[0]*xy[0] + xy[1]*xy[1]);
- VECCOPY(dstf, brush_rgb);
+ copy_v3_v3(dstf, brush_rgb);
dstf[3]= alpha*brush_curve_strength_clamp(brush, dist, radius);
}
else if (texfall == 1) {
@@ -754,7 +754,7 @@ static void brush_painter_do_partial(BrushPainter *painter, ImBuf *oldtexibuf, i
for (x=origx; x < w; x++, bf+=4, mf+=4, tf+=4) {
if (dotexold) {
- VECCOPY(tf, otf);
+ copy_v3_v3(tf, otf);
tf[3] = otf[3];
otf += 4;
}
@@ -926,7 +926,7 @@ static void brush_apply_pressure(BrushPainter *painter, Brush *brush, float pres
brush->spacing = MAX2(1.0f, painter->startspacing*(1.5f-pressure));
}
-void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos)
+void brush_jitter_pos(Brush *brush, float pos[2], float jitterpos[2])
{
int use_jitter= brush->jitter != 0;
@@ -949,7 +949,7 @@ void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos)
jitterpos[1] = pos[1] + 2*rand_pos[1]*diameter*brush->jitter;
}
else {
- VECCOPY2D(jitterpos, pos);
+ copy_v2_v2(jitterpos, pos);
}
}
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 5e2f0aa5b7a..bf36b73552c 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -36,10 +36,7 @@
* \ingroup bke
*/
-
-/* TODO maybe BIF_gl.h should include string.h? */
-#include <string.h>
-#include "BIF_gl.h"
+#include "GL/glew.h"
#include "BLI_blenlib.h"
#include "BLI_edgehash.h"
@@ -1065,18 +1062,15 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
DMVertexAttribs attribs;
MVert *mvert = cddm->mvert;
MFace *mface = cddm->mface;
- MTFace *tf = dm->getFaceDataArray(dm, CD_MTFACE);
+ /* MTFace *tf = dm->getFaceDataArray(dm, CD_MTFACE); */ /* UNUSED */
float (*nors)[3] = dm->getFaceDataArray(dm, CD_NORMAL);
int a, b, dodraw, matnr, new_matnr;
- int transp, new_transp, orig_transp;
int orig, *index = dm->getFaceDataArray(dm, CD_ORIGINDEX);
cdDM_update_normals_from_pbvh(dm);
matnr = -1;
dodraw = 0;
- transp = GPU_get_material_blend_mode();
- orig_transp = transp;
glShadeModel(GL_SMOOTH);
@@ -1116,22 +1110,6 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
continue;
}
- if(tf) {
- new_transp = tf[a].transp;
-
- if(new_transp != transp) {
- glEnd();
-
- if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
- GPU_set_material_blend_mode(orig_transp);
- else
- GPU_set_material_blend_mode(new_transp);
- transp = new_transp;
-
- glBegin(GL_QUADS);
- }
- }
-
if(!smoothnormal) {
if(nors) {
glNormal3fv(nors[a]);
@@ -1163,7 +1141,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
GPUBuffer *buffer = NULL;
char *varray = NULL;
int numdata = 0, elementsize = 0, offset;
- int start = 0, numfaces = 0, prevdraw = 0, curface = 0;
+ int start = 0, numfaces = 0 /* , prevdraw = 0 */ /* UNUSED */, curface = 0;
int i;
MFace *mf = mface;
@@ -1207,7 +1185,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
}
numdata = 0;
start = curface;
- prevdraw = dodraw;
+ /* prevdraw = dodraw; */ /* UNUSED */
dodraw = setMaterial(matnr = new_matnr, &gattribs);
if(dodraw) {
DM_vertex_attributes_from_gpu(dm, &gattribs, &attribs);
@@ -1255,7 +1233,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
else {
/* if the buffer was set, dont use it again.
* prevdraw was assumed true but didnt run so set to false - [#21036] */
- prevdraw= 0;
+ /* prevdraw= 0; */ /* UNUSED */
buffer= NULL;
}
}
@@ -1264,33 +1242,6 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
continue;
}
- if(tf) {
- new_transp = tf[a].transp;
-
- if(new_transp != transp) {
- numfaces = curface - start;
- if( numfaces > 0 ) {
- if( dodraw ) {
- if( numdata != 0 ) {
- GPU_buffer_unlock(buffer);
- GPU_interleaved_attrib_setup(buffer,datatypes,numdata);
- }
- glDrawArrays(GL_TRIANGLES,start*3,(curface-start)*3);
- if( numdata != 0 ) {
- varray = GPU_buffer_lock_stream(buffer);
- }
- }
- }
- start = curface;
-
- if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
- GPU_set_material_blend_mode(orig_transp);
- else
- GPU_set_material_blend_mode(new_transp);
- transp = new_transp;
- }
- }
-
if( numdata != 0 ) {
offset = 0;
if(attribs.totorco) {
@@ -1855,7 +1806,7 @@ void CDDM_apply_vert_normals(DerivedMesh *dm, short (*vertNormals)[3])
cddm->mvert = vert;
for(i = 0; i < dm->numVertData; ++i, ++vert)
- VECCOPY(vert->no, vertNormals[i]);
+ copy_v3_v3_short(vert->no, vertNormals[i]);
}
void CDDM_calc_normals(DerivedMesh *dm)
diff --git a/source/blender/blenkernel/intern/collision.c b/source/blender/blenkernel/intern/collision.c
index ed073f03270..d8b51973948 100644
--- a/source/blender/blenkernel/intern/collision.c
+++ b/source/blender/blenkernel/intern/collision.c
@@ -104,11 +104,11 @@ BVHTree *bvhtree_build_from_mvert ( MFace *mfaces, unsigned int numfaces, MVert
// fill tree
for ( i = 0; i < numfaces; i++, tface++ )
{
- VECCOPY ( &co[0*3], x[tface->v1].co );
- VECCOPY ( &co[1*3], x[tface->v2].co );
- VECCOPY ( &co[2*3], x[tface->v3].co );
+ 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 );
if ( tface->v4 )
- VECCOPY ( &co[3*3], x[tface->v4].co );
+ copy_v3_v3 ( &co[3*3], x[tface->v4].co );
BLI_bvhtree_insert ( tree, i, co, ( mfaces->v4 ? 4 : 3 ) );
}
@@ -133,21 +133,21 @@ void bvhtree_update_from_mvert ( BVHTree * bvhtree, MFace *faces, int numfaces,
{
for ( i = 0; i < numfaces; i++, mfaces++ )
{
- VECCOPY ( &co[0*3], x[mfaces->v1].co );
- VECCOPY ( &co[1*3], x[mfaces->v2].co );
- VECCOPY ( &co[2*3], x[mfaces->v3].co );
+ 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 );
if ( mfaces->v4 )
- VECCOPY ( &co[3*3], x[mfaces->v4].co );
+ copy_v3_v3 ( &co[3*3], x[mfaces->v4].co );
// copy new locations into array
if ( moving && xnew )
{
// update moving positions
- VECCOPY ( &co_moving[0*3], xnew[mfaces->v1].co );
- VECCOPY ( &co_moving[1*3], xnew[mfaces->v2].co );
- VECCOPY ( &co_moving[2*3], xnew[mfaces->v3].co );
+ copy_v3_v3 ( &co_moving[0*3], xnew[mfaces->v1].co );
+ copy_v3_v3 ( &co_moving[1*3], xnew[mfaces->v2].co );
+ copy_v3_v3 ( &co_moving[2*3], xnew[mfaces->v3].co );
if ( mfaces->v4 )
- VECCOPY ( &co_moving[3*3], xnew[mfaces->v4].co );
+ copy_v3_v3 ( &co_moving[3*3], xnew[mfaces->v4].co );
ret = BLI_bvhtree_update_node ( bvhtree, i, co, co_moving, ( mfaces->v4 ? 4 : 3 ) );
}
@@ -550,7 +550,7 @@ static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionM
float temp[3], spf;
// calculate tangential velocity
- VECCOPY ( temp, collpair->normal );
+ copy_v3_v3 ( temp, collpair->normal );
mul_v3_fl( temp, magrelVel );
VECSUB ( vrel_t_pre, relativeVelocity, temp );
@@ -2021,7 +2021,7 @@ static int cloth_collision_moving_edges ( ClothModifierData *clmd, CollisionModi
{
if(edgecollpair.p21==6 || edgecollpair.p22 == 6)
{
- printf("dist: %f, sol[k]: %lf, sol2[k]: %lf\n", distance, solution[k], solution2[k]);
+ printf("dist: %f, sol[k]: %f, sol2[k]: %f\n", distance, solution[k], solution2[k]);
printf("a1: %f, a2: %f, b1: %f, b2: %f\n", x1[0], x2[0], x3[0], v1[0]);
printf("b21: %d, b22: %d\n", edgecollpair.p21, edgecollpair.p22);
}
@@ -2346,7 +2346,7 @@ static int cloth_bvh_objcollisions_resolve ( ClothModifierData * clmd, Collision
if ( verts[i].impulse_count )
{
VECADDMUL ( verts[i].tv, verts[i].impulse, 1.0f / verts[i].impulse_count );
- VECCOPY ( verts[i].impulse, tnull );
+ copy_v3_v3 ( verts[i].impulse, tnull );
verts[i].impulse_count = 0;
ret++;
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 9a6c2cc7e31..61e9daf4138 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -167,14 +167,14 @@ CurveMapping *curvemapping_copy(CurveMapping *cumap)
return NULL;
}
-void curvemapping_set_black_white(CurveMapping *cumap, float *black, float *white)
+void curvemapping_set_black_white(CurveMapping *cumap, const float black[3], const float white[3])
{
int a;
if(white)
- VECCOPY(cumap->white, white);
+ copy_v3_v3(cumap->white, white);
if(black)
- VECCOPY(cumap->black, black);
+ copy_v3_v3(cumap->black, black);
for(a=0; a<3; a++) {
if(cumap->white[a]==cumap->black[a])
@@ -432,7 +432,7 @@ static void calchandle_curvemap(BezTriple *bezt, BezTriple *prev, BezTriple *nex
/* in X, out Y.
X is presumed to be outside first or last */
-static float curvemap_calc_extend(CurveMap *cuma, float x, float *first, float *last)
+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) {
@@ -753,7 +753,7 @@ float curvemapping_evaluateF(CurveMapping *cumap, int cur, float value)
}
/* vector case */
-void curvemapping_evaluate3F(CurveMapping *cumap, float *vecout, const float *vecin)
+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]);
@@ -761,7 +761,7 @@ void curvemapping_evaluate3F(CurveMapping *cumap, float *vecout, const float *ve
}
/* RGB case, no black/white points, no premult */
-void curvemapping_evaluateRGBF(CurveMapping *cumap, float *vecout, const float *vecin)
+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]));
@@ -770,7 +770,7 @@ void curvemapping_evaluateRGBF(CurveMapping *cumap, float *vecout, const float *
/* RGB with black/white points and premult. tables are checked */
-void curvemapping_evaluate_premulRGBF(CurveMapping *cumap, float *vecout, const float *vecin)
+void curvemapping_evaluate_premulRGBF(CurveMapping *cumap, float vecout[3], const float vecin[3])
{
float fac;
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 91091d3880f..a59092784dd 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -2167,7 +2167,7 @@ static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraint
if (data->type < 10) {
/* extract rotation (is in whatever space target should be in) */
mat4_to_eul(vec, tempmat);
- mul_v3_fl(vec, (float)(180.0/M_PI)); /* rad -> deg */
+ mul_v3_fl(vec, RAD2DEGF(1.0f)); /* rad -> deg */
axis= data->type;
}
else if (data->type < 20) {
@@ -3325,7 +3325,7 @@ static void transform_evaluate (bConstraint *con, bConstraintOb *cob, ListBase *
break;
case 1: /* rotation (convert to degrees first) */
mat4_to_eulO(dvec, cob->rotOrder, ct->matrix);
- mul_v3_fl(dvec, (float)(180.0/M_PI)); /* rad -> deg */
+ mul_v3_fl(dvec, RAD2DEGF(1.0f)); /* rad -> deg */
break;
default: /* location */
copy_v3_v3(dvec, ct->matrix[3]);
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index b1beb6c449a..794006e6f39 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -41,9 +41,10 @@
#include "MEM_guardedalloc.h"
-#include "BLI_blenlib.h"
-#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_math.h"
#include "BLI_utildefines.h"
+#include "BLI_ghash.h"
#include "DNA_curve_types.h"
#include "DNA_material_types.h"
@@ -66,9 +67,6 @@
#include "BKE_object.h"
#include "BKE_material.h"
-
-#include "ED_curve.h"
-
/* globals */
/* local */
@@ -118,6 +116,25 @@ void BKE_free_editfont(Curve *cu)
}
}
+void free_curve_editNurb_keyIndex(EditNurb *editnurb)
+{
+ if (!editnurb->keyindex) {
+ return;
+ }
+ BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)MEM_freeN);
+ editnurb->keyindex= NULL;
+}
+
+void free_curve_editNurb (Curve *cu)
+{
+ if(cu->editnurb) {
+ freeNurblist(&cu->editnurb->nurbs);
+ free_curve_editNurb_keyIndex(cu->editnurb);
+ MEM_freeN(cu->editnurb);
+ cu->editnurb= NULL;
+ }
+}
+
/* don't free curve itself */
void free_curve(Curve *cu)
{
@@ -281,6 +298,16 @@ void make_local_curve(Curve *cu)
}
}
+/* Get list of nurbs from editnurbs structure */
+ListBase *curve_editnurbs(Curve *cu)
+{
+ if (cu->editnurb) {
+ return &cu->editnurb->nurbs;
+ }
+
+ return NULL;
+}
+
short curve_type(Curve *cu)
{
Nurb *nu;
@@ -358,7 +385,6 @@ void tex_space_curve(Curve *cu)
}
}
-
int count_curveverts(ListBase *nurb)
{
Nurb *nu;
@@ -1898,7 +1924,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
/* flip rotation if needs be */
cross_v3_v3v3(cross_tmp, vec_1, vec_2);
normalize_v3(cross_tmp);
- if(angle_normalized_v3v3(bevp_first->dir, cross_tmp) < 90.0f/(float)(180.0/M_PI))
+ if(angle_normalized_v3v3(bevp_first->dir, cross_tmp) < DEG2RADF(90.0f))
angle = -angle;
bevp2= (BevPoint *)(bl+1);
@@ -2049,7 +2075,7 @@ void makeBevelList(Object *ob)
BLI_freelistN(&(cu->bev));
if(cu->editnurb && ob->type!=OB_FONT) {
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
nu= nurbs->first;
} else nu= cu->nurb.first;
@@ -2547,9 +2573,9 @@ void calchandleNurb(BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode)
sub_v3_v3v3(h2, p2, p2+3);
len1= normalize_v3(h1);
len2= normalize_v3(h2);
-
- vz= INPR(h1, h2);
-
+
+ vz= dot_v3v3(h1, h2);
+
if(leftviolate) {
*(p2+3)= *(p2) - vz*len2*h1[0];
*(p2+4)= *(p2+1) - vz*len2*h1[1];
@@ -3157,7 +3183,7 @@ int clamp_nurb_order_v( struct Nurb *nu)
ListBase *BKE_curve_nurbs(Curve *cu)
{
if (cu->editnurb) {
- return ED_curve_editnurbs(cu);
+ return curve_editnurbs(cu);
}
return &cu->nurb;
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index c342bbc917f..30da2e01011 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -326,7 +326,7 @@ static void layerSwap_tface(void *data, const int *corner_indices)
static void layerDefault_tface(void *data, int count)
{
static MTFace default_tf = {{{0, 0}, {1, 0}, {1, 1}, {0, 1}}, NULL,
- 0, 0, TF_DYNAMIC, 0, 0};
+ 0, 0, TF_DYNAMIC|TF_CONVERTED, 0, 0};
MTFace *tf = (MTFace*)data;
int i;
@@ -867,7 +867,9 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
{sizeof(MCol)*4, "MCol", 4, "TexturedCol", NULL, NULL, layerInterp_mcol,
layerSwap_mcol, layerDefault_mcol},
/* 23: CD_CLOTH_ORCO */
- {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL}
+ {sizeof(float)*3, "", 0, NULL, NULL, NULL, NULL, NULL, NULL},
+ /* 24: CD_RECAST */
+ {sizeof(MRecast), "MRecast", 1,"Recast",NULL,NULL,NULL,NULL}
};
static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
@@ -875,7 +877,7 @@ static const char *LAYERTYPENAMES[CD_NUMTYPES] = {
/* 5-9 */ "CDMTFace", "CDMCol", "CDOrigIndex", "CDNormal", "CDFlags",
/* 10-14 */ "CDMFloatProperty", "CDMIntProperty","CDMStringProperty", "CDOrigSpace", "CDOrco",
/* 15-19 */ "CDMTexPoly", "CDMLoopUV", "CDMloopCol", "CDTangent", "CDMDisps",
- /* 20-23 */"CDWeightMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco"
+ /* 20-24 */"CDWeightMCol", "CDIDMCol", "CDTextureMCol", "CDClothOrco", "CDMRecast"
};
const CustomDataMask CD_MASK_BAREMESH =
@@ -883,14 +885,14 @@ const CustomDataMask CD_MASK_BAREMESH =
const CustomDataMask CD_MASK_MESH =
CD_MASK_MVERT | CD_MASK_MEDGE | CD_MASK_MFACE |
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE | CD_MASK_MCOL |
- CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS;
+ CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS | CD_MASK_RECAST;
const CustomDataMask CD_MASK_EDITMESH =
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE |
- CD_MASK_MCOL|CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS;
+ CD_MASK_MCOL|CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR | CD_MASK_MDISPS | CD_MASK_RECAST;
const CustomDataMask CD_MASK_DERIVEDMESH =
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_MTFACE |
CD_MASK_MCOL | CD_MASK_ORIGINDEX | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_CLOTH_ORCO |
- CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO | CD_MASK_TANGENT | CD_MASK_WEIGHT_MCOL;
+ CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORCO | CD_MASK_TANGENT | CD_MASK_WEIGHT_MCOL | CD_MASK_RECAST;
const CustomDataMask CD_MASK_BMESH =
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT | CD_MASK_PROP_STR;
const CustomDataMask CD_MASK_FACECORNERS =
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index c2ed6468643..b19ea93a1b8 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -67,8 +67,6 @@
#include "BLO_sys_types.h" // for intptr_t support
-#include "ED_curve.h" /* for BKE_curve_nurbs */
-
extern Material defmaterial; /* material.c */
static void boundbox_displist(Object *ob);
@@ -1102,7 +1100,7 @@ void makeDispListSurf(Scene *scene, Object *ob, ListBase *dispbase,
float (*deformedVerts)[3];
if(!forRender && cu->editnurb)
- nubase= ED_curve_editnurbs(cu);
+ nubase= curve_editnurbs(cu);
else
nubase= &cu->nurb;
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index c4c71adfb9a..42462ab7955 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -62,7 +62,7 @@
#include "RNA_define.h"
#include "RNA_enum_types.h"
-#include "ED_screen.h"
+#include "../editors/include/ED_screen.h"
#include "WM_api.h"
/* for image output */
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 4b95c44f55f..7fb9f96e0cf 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -571,7 +571,7 @@ float effector_falloff(EffectorCache *eff, EffectorData *efd, EffectedPoint *UNU
if(falloff == 0.0f)
break;
- r_fac=saacos(fac/len_v3(efd->vec_to_point))*180.0f/(float)M_PI;
+ r_fac= RAD2DEGF(saacos(fac/len_v3(efd->vec_to_point)));
falloff*= falloff_func_rad(eff->pd, r_fac);
break;
@@ -590,16 +590,16 @@ int closest_point_on_surface(SurfaceModifierData *surmd, float *co, float *surfa
BLI_bvhtree_find_nearest(surmd->bvhtree->tree, co, &nearest, surmd->bvhtree->nearest_callback, surmd->bvhtree);
if(nearest.index != -1) {
- VECCOPY(surface_co, nearest.co);
+ copy_v3_v3(surface_co, nearest.co);
if(surface_nor) {
- VECCOPY(surface_nor, nearest.no);
+ copy_v3_v3(surface_nor, nearest.no);
}
if(surface_vel) {
MFace *mface = CDDM_get_face(surmd->dm, nearest.index);
- VECCOPY(surface_vel, surmd->v[mface->v1].co);
+ copy_v3_v3(surface_vel, surmd->v[mface->v1].co);
add_v3_v3(surface_vel, surmd->v[mface->v2].co);
add_v3_v3(surface_vel, surmd->v[mface->v3].co);
if(mface->v4)
@@ -705,7 +705,7 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
sub_v3_v3v3(efd->loc, point->loc, translate);
}
else {
- VECCOPY(efd->loc, ob->obmat[3]);
+ copy_v3_v3(efd->loc, ob->obmat[3]);
}
if(real_velocity)
@@ -727,8 +727,8 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
mul_v3_fl(efd->vec_to_point, (efd->distance-eff->pd->f_size)/efd->distance);
if(eff->flag & PE_USE_NORMAL_DATA) {
- VECCOPY(efd->vec_to_point2, efd->vec_to_point);
- VECCOPY(efd->nor2, efd->nor);
+ copy_v3_v3(efd->vec_to_point2, efd->vec_to_point);
+ copy_v3_v3(efd->nor2, efd->nor);
}
else {
/* for some effectors we need the object center every time */
@@ -800,7 +800,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
strength= eff->pd->f_strength * efd->falloff;
- VECCOPY(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);
@@ -878,11 +878,11 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
damp += wind_func(rng, noise_factor);
}
- VECCOPY(force, efd->vec_to_point);
+ copy_v3_v3(force, efd->vec_to_point);
switch(pd->forcefield){
case PFIELD_WIND:
- VECCOPY(force, efd->nor);
+ copy_v3_v3(force, efd->nor);
mul_v3_fl(force, strength * efd->falloff);
break;
case PFIELD_FORCE:
@@ -944,7 +944,7 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
return;
case PFIELD_TURBULENCE:
if(pd->flag & PFIELD_GLOBAL_CO) {
- VECCOPY(temp, point->loc);
+ copy_v3_v3(temp, point->loc);
}
else {
VECADD(temp, efd->vec_to_point2, efd->nor2);
@@ -955,7 +955,7 @@ static void do_physical_effector(EffectorCache *eff, EffectorData *efd, Effected
mul_v3_fl(force, strength * efd->falloff);
break;
case PFIELD_DRAG:
- VECCOPY(force, point->vel);
+ copy_v3_v3(force, point->vel);
fac = normalize_v3(force) * point->vel_to_sec;
strength = MIN2(strength, 2.0f);
@@ -1039,7 +1039,7 @@ void pdDoEffectors(ListBase *effectors, ListBase *colliders, EffectorWeights *we
do_texture_effector(eff, &efd, point, force);
else {
float temp1[3]={0,0,0}, temp2[3];
- VECCOPY(temp1, force);
+ copy_v3_v3(temp1, force);
do_physical_effector(eff, &efd, point, force);
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 4ce5de78895..d764826cd47 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -592,7 +592,7 @@ void BKE_image_print_memlist(void)
for(ima= G.main->image.first; ima; ima= ima->id.next)
totsize += image_mem_size(ima);
- printf("\ntotal image memory len: %.3lf 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);
@@ -2290,3 +2290,20 @@ void BKE_image_user_calc_frame(ImageUser *iuser, int cfra, int fieldnr)
iuser->framenr= framenr;
if(iuser->ok==0) iuser->ok= 1;
}
+
+int BKE_image_has_alpha(struct Image *image)
+{
+ ImBuf *ibuf;
+ void *lock;
+ int depth;
+
+ ibuf= BKE_image_acquire_ibuf(image, NULL, &lock);
+ depth = (ibuf?ibuf->depth:0);
+ BKE_image_release_ibuf(image, lock);
+
+ if (depth == 32)
+ return 1;
+ else
+ return 0;
+}
+
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 0d3f3cc5ae4..5acd6c169a0 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -942,7 +942,7 @@ static char *get_rna_access (int blocktype, int adrcode, char actname[], char co
sprintf(buf, "sequence_editor.sequences_all[\"%s\"]", seq->name+2);
}
else
- strcpy(buf, ""); /* empty string */
+ buf[0]= '\0'; /* empty string */
BLI_dynstr_append(path, buf);
/* need to add dot before property if there was anything precceding this */
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 29615986191..f5df6efd622 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -37,12 +37,16 @@
#include <string.h>
#include <math.h>
+#include <stddef.h>
#include "MEM_guardedalloc.h"
#include "DNA_curve_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_customdata_types.h"
+#include "DNA_ID.h"
#include "DNA_meta_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
@@ -56,6 +60,7 @@
#include "BKE_displist.h"
#include "BKE_global.h"
#include "BKE_icons.h"
+#include "BKE_image.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_material.h"
@@ -188,6 +193,10 @@ void init_material(Material *ma)
ma->vol.ms_diff = 1.f;
ma->vol.ms_intensity = 1.f;
+ ma->game.flag=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->preview = NULL;
@@ -515,7 +524,7 @@ short *give_totcolp_id(ID *id)
return NULL;
}
-static void data_delete_material_index_id(ID *id, int index)
+static void data_delete_material_index_id(ID *id, short index)
{
switch(GS(id->name)) {
case ID_ME:
@@ -547,8 +556,9 @@ void material_append_id(ID *id, Material *ma)
}
}
-Material *material_pop_id(ID *id, int index, int remove_material_slot)
+Material *material_pop_id(ID *id, int index_i, int remove_material_slot)
{
+ short index= (short)index_i;
Material *ret= NULL;
Material ***matar;
if((matar= give_matarar_id(id))) {
@@ -591,7 +601,7 @@ Material *material_pop_id(ID *id, int index, int remove_material_slot)
return ret;
}
-Material *give_current_material(Object *ob, int act)
+Material *give_current_material(Object *ob, short act)
{
Material ***matarar, *ma;
short *totcolp;
@@ -629,7 +639,7 @@ Material *give_current_material(Object *ob, int act)
return ma;
}
-ID *material_from(Object *ob, int act)
+ID *material_from(Object *ob, short act)
{
if(ob==NULL) return NULL;
@@ -713,7 +723,7 @@ void test_object_materials(ID *id)
}
}
-void assign_material(Object *ob, Material *ma, int act)
+void assign_material(Object *ob, Material *ma, short act)
{
Material *mao, **matar, ***matarar;
char *matbits;
@@ -784,9 +794,10 @@ void assign_material(Object *ob, Material *ma, int 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, int totcol)
+void assign_matarar(struct Object *ob, struct Material ***matar, short totcol)
{
- int i, actcol_orig= ob->actcol;
+ int actcol_orig= ob->actcol;
+ short i;
while(object_remove_material_slot(ob)) {};
@@ -801,7 +812,7 @@ void assign_matarar(struct Object *ob, struct Material ***matar, int totcol)
}
-int find_material_index(Object *ob, Material *ma)
+short find_material_index(Object *ob, Material *ma)
{
Material ***matarar;
short a, *totcolp;
@@ -925,7 +936,8 @@ void init_render_material(Material *mat, int r_mode, float *amb)
if(mat->nodetree && mat->use_nodes) {
init_render_nodetree(mat->nodetree, mat, r_mode, amb);
- ntreeBeginExecTree(mat->nodetree); /* has internal flag to detect it only does it once */
+ if (!mat->nodetree->execdata)
+ mat->nodetree->execdata = ntreeShaderBeginExecTree(mat->nodetree, 1);
}
}
@@ -957,8 +969,10 @@ void init_render_materials(Main *bmain, int r_mode, float *amb)
/* only needed for nodes now */
void end_render_material(Material *mat)
{
- if(mat && mat->nodetree && mat->use_nodes)
- ntreeEndExecTree(mat->nodetree); /* has internal flag to detect it only does it once */
+ if(mat && mat->nodetree && mat->use_nodes) {
+ if (mat->nodetree->execdata)
+ ntreeShaderEndExecTree(mat->nodetree->execdata, 1);
+ }
}
void end_render_materials(Main *bmain)
@@ -1050,7 +1064,7 @@ int object_remove_material_slot(Object *ob)
Material *mao, ***matarar;
Object *obt;
short *totcolp;
- int a, actcol;
+ short a, actcol;
if(ob==NULL || ob->totcol==0) return FALSE;
@@ -1119,7 +1133,7 @@ int object_remove_material_slot(Object *ob)
/* r g b = current value, col = new value, fac==0 is no change */
/* if g==NULL, it only does r channel */
-void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
+void ramp_blend(int type, float *r, float *g, float *b, float fac, const float col[3])
{
float tmp, facm= 1.0f-fac;
@@ -1465,3 +1479,482 @@ void paste_matcopybuf(Material *ma)
ma->nodetree= ntreeCopyTree(matcopybuf.nodetree);
}
+
+
+/*********************** texface to material convert functions **********************/
+/* encode all the TF information into a single int */
+static int encode_tfaceflag(MTFace *tf, int convertall)
+{
+ /* calculate the flag */
+ int flag = tf->mode;
+
+ /* options that change the material offline render */
+ if (!convertall) {
+ flag &= ~TF_OBCOL;
+ }
+
+ /* clean flags that are not being converted */
+ flag &= ~TF_TEX;
+ flag &= ~TF_SHAREDVERT;
+ flag &= ~TF_SHAREDCOL;
+ flag &= ~TF_CONVERTED;
+
+ /* light tface flag is ignored in GLSL mode */
+ flag &= ~TF_LIGHT;
+
+ /* 15 is how big the flag can be - hardcoded here and in decode_tfaceflag() */
+ flag |= tf->transp << 15;
+
+ /* increase 1 so flag 0 is different than no flag yet */
+ return flag + 1;
+}
+
+/* set the material options based in the tface flag */
+static void decode_tfaceflag(Material *ma, int flag, int convertall)
+{
+ int alphablend;
+ GameSettings *game= &ma->game;
+
+ /* flag is shifted in 1 to make 0 != no flag yet (see encode_tfaceflag) */
+ flag -= 1;
+
+ alphablend = flag >> 15; //encoded in the encode_tfaceflag function
+ (*game).flag = 0;
+
+ /* General Material Options */
+ if ((flag & TF_DYNAMIC)==0) (*game).flag |= GEMAT_NOPHYSICS;
+
+ /* Material Offline Rendering Properties */
+ if (convertall) {
+ if (flag & TF_OBCOL) ma->shade_flag |= MA_OBCOLOR;
+ }
+
+ /* Special Face Properties */
+ 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 */
+ if (flag & TF_BILLBOARD) (*game).face_orientation |= GEMAT_HALO;
+ else if (flag & TF_BILLBOARD2) (*game).face_orientation |= GEMAT_BILLBOARD;
+ else if (flag & TF_SHADOW) (*game).face_orientation |= GEMAT_SHADOW;
+
+ /* Alpha Blend */
+ if (flag & TF_ALPHASORT && ELEM(alphablend, TF_ALPHA, TF_ADD)) (*game).alpha_blend = GEMAT_ALPHA_SORT;
+ else if (alphablend & TF_ALPHA) (*game).alpha_blend = GEMAT_ALPHA;
+ else if (alphablend & TF_ADD) (*game).alpha_blend = GEMAT_ADD;
+ else if (alphablend & TF_CLIP) (*game).alpha_blend = GEMAT_CLIP;
+}
+
+/* boolean check to see if the mesh needs a material */
+static int check_tfaceneedmaterial(int flag)
+{
+ // check if the flags we have are not deprecated != than default material options
+ // 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;
+
+ // deprecated flags
+ flag &= ~TF_OBCOL;
+ flag &= ~TF_SHAREDVERT;
+ flag &= ~TF_SHAREDCOL;
+
+ /* light tface flag is ignored in GLSL mode */
+ flag &= ~TF_LIGHT;
+
+ // automatic detected if tex image has alpha
+ flag &= ~(TF_ALPHA << 15);
+ // automatic detected if using texture
+ flag &= ~TF_TEX;
+
+ // settings for the default NoMaterial
+ if (flag == TF_DYNAMIC)
+ return 0;
+
+ else
+ return 1;
+}
+
+/* return number of digits of an integer */
+// XXX to be optmized or replaced by an equivalent blender internal function
+static int integer_getdigits(int number)
+{
+ int i=0;
+ if (number == 0) return 1;
+
+ while (number != 0){
+ number = (int)(number/10);
+ i++;
+ }
+ return i;
+}
+
+static void calculate_tface_materialname(char *matname, char *newname, int flag)
+{
+ // if flag has only light and collision and material matches those values
+ // you can do strcpy(name, mat_name);
+ // otherwise do:
+ 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" */
+ sprintf(newname, "%.*s.TF.%0*d", MAX_ID_NAME-(digits+5), matname, digits, flag);
+}
+
+/* returns -1 if no match */
+static short mesh_getmaterialnumber(Mesh *me, Material *ma)
+{
+ short a;
+
+ for (a=0; a<me->totcol; a++) {
+ if (me->mat[a] == ma) {
+ return a;
+ }
+ }
+
+ return -1;
+}
+
+/* append material */
+static short mesh_addmaterial(Mesh *me, Material *ma)
+{
+ material_append_id(&me->id, NULL);
+ me->mat[me->totcol-1]= ma;
+
+ id_us_plus(&ma->id);
+
+ return me->totcol-1;
+}
+
+static void set_facetexture_flags(Material *ma, Image *image)
+{
+ if(image) {
+ ma->mode |= MA_FACETEXTURE;
+ /* we could check if the texture has alpha, but then more meshes sharing the same
+ * material may need it. Let's make it simple. */
+ if(BKE_image_has_alpha(image))
+ ma->mode |= MA_FACETEXTURE_ALPHA;
+ }
+}
+
+/* returns material number */
+static short convert_tfacenomaterial(Main *main, Mesh *me, MTFace *tf, int flag)
+{
+ Material *ma;
+ char idname[MAX_ID_NAME];
+ short mat_nr= -1;
+
+ /* new material, the name uses the flag*/
+ sprintf(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);
+ /* assign the material to the mesh */
+ 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);
+
+ if(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);
+
+ decode_tfaceflag(ma, flag, 1);
+ // the final decoding will happen after, outside the main loop
+ // for now store the flag into the material and change light/tex/collision
+ // store the flag as a negative number
+ 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);
+ }
+
+ /* set as converted, no need to go bad to this face */
+ tf->mode |= TF_CONVERTED;
+ return mat_nr;
+}
+
+/* Function to fully convert materials */
+static void convert_tfacematerial(Main *main, Material *ma)
+{
+ Mesh *me;
+ Material *mat_new;
+ MFace *mf;
+ MTFace *tf;
+ int flag, index;
+ int a;
+ short mat_nr;
+ CustomDataLayer *cdl;
+ char idname[MAX_ID_NAME];
+
+ for(me=main->mesh.first; me; me=me->id.next){
+ /* check if this mesh uses this material */
+ 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];
+ 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++) {
+ if(me->mat[mf->mat_nr] != ma) continue;
+
+ /* texface data for this face */
+ 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))) {
+ /* 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);
+ }
+ /* create a new material */
+ else {
+ mat_new=copy_material(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);
+ decode_tfaceflag(mat_new, flag, 1);
+ }
+ else {
+ printf("Error: Unable to create Material \"%s\" for Mesh \"%s.", idname+2, me->id.name+2);
+ mat_nr = mf->mat_nr;
+ continue;
+ }
+ }
+
+ /* if the material has a texture but no texture channel
+ * set "Face Textures [Alpha]" Material options
+ * actually we need to run it always, because of old behavior
+ * of using face texture if any texture channel was present (multitex) */
+ //if((!mat_new->mtex[0]) && (!mat_new->mtex[0]->tex))
+ set_facetexture_flags(mat_new, tf->tpage);
+
+ /* set the material number to the face*/
+ 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++;
+ }
+}
+
+
+#define MAT_BGE_DISPUTED -99999
+
+int do_version_tface(Main *main, int fileload)
+{
+ Mesh *me;
+ Material *ma;
+ MFace *mf;
+ MTFace *tf;
+ CustomDataLayer *cdl;
+ int a;
+ int flag;
+ int index;
+
+ /* sometimes mesh has no materials but will need a new one. In those
+ * cases we need to ignore the mf->mat_nr and only look at the face
+ * mode because it can be zero as uninitialized or the 1st created material
+ */
+ int nomaterialslots;
+
+ /* alert to user to check the console */
+ int nowarning = 1;
+
+ /* mark all the materials to conversion with a flag
+ * if there is tface create a complete flag for that storing in flag
+ * if there is tface and flag > 0: creates a new flag based on this face
+ * if flags are different set flag to -1
+ */
+
+ /* 1st part: marking mesh materials to update */
+ 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];
+ if (!cdl) continue;
+
+ nomaterialslots = (me->totcol==0?1:0);
+
+ /* loop over all the faces*/
+ for(a=0, mf=me->mface; a<me->totface; a++, mf++) {
+ /* texface data for this face */
+ tf = ((MTFace*)cdl->data) + a;
+
+ /* conversion should happen only once */
+ if (fileload)
+ tf->mode &= ~TF_CONVERTED;
+ else {
+ if((tf->mode & TF_CONVERTED)) continue;
+ else tf->mode |= TF_CONVERTED;
+ }
+
+ /* no material slots */
+ if(nomaterialslots) {
+ flag = encode_tfaceflag(tf, 1);
+
+ /* create/find a new material and assign to the face */
+ if (check_tfaceneedmaterial(flag)) {
+ mf->mat_nr= convert_tfacenomaterial(main, me, tf, flag);
+ }
+ /* else mark them as no-material to be reverted to 0 later */
+ else {
+ mf->mat_nr = -1;
+ }
+ }
+ else if(mf->mat_nr < me->totcol) {
+ ma= me->mat[mf->mat_nr];
+
+ /* no material create one if necessary */
+ if(!ma) {
+ /* find a new material and assign to the face */
+ flag = encode_tfaceflag(tf, 1);
+
+ /* create/find a new material and assign to the face */
+ if (check_tfaceneedmaterial(flag))
+ mf->mat_nr= convert_tfacenomaterial(main, me, tf, flag);
+
+ continue;
+ }
+
+ /* we can't read from this if it comes from a library,
+ * at doversion time: direct_link might not have happened on it,
+ * so ma->mtex is not pointing to valid memory yet.
+ * later we could, but it's better not */
+ else if(ma->id.lib)
+ continue;
+
+ /* material already marked as disputed */
+ else if(ma->game.flag == MAT_BGE_DISPUTED)
+ continue;
+
+ /* found a material */
+ else {
+ flag = encode_tfaceflag(tf, ((fileload)?0:1));
+
+ /* first time changing this material */
+ if (ma->game.flag == 0)
+ ma->game.flag= -flag;
+
+ /* mark material as disputed */
+ else if (ma->game.flag != -flag) {
+ ma->game.flag = MAT_BGE_DISPUTED;
+ continue;
+ }
+
+ /* material ok so far */
+ else {
+ ma->game.flag = -flag;
+
+ /* some people uses multitexture with TexFace by creating a texture
+ * channel which not neccessarly the tf->tpage image. But the game engine
+ * was enabling it. Now it's required to set "Face Texture [Alpha] in the
+ * material settings. */
+ if(!fileload)
+ set_facetexture_flags(ma, tf->tpage);
+ }
+ }
+ }
+ else
+ continue;
+ }
+
+ /* 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 (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));
+ }
+ }
+ }
+ else {
+ for(a=0, mf=me->mface; a<me->totface; a++, mf++) {
+ mf->mat_nr=0;
+ }
+ }
+ }
+
+ }
+
+ /* 2nd part - conversion */
+ /* 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++) {
+ 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);
+ nowarning = 0;
+ }
+ else
+ convert_tfacematerial(main, ma);
+ continue;
+ }
+
+ /* no conflicts in this material - 90% of cases
+ * convert from tface system to material */
+ else if (ma->game.flag < 0) {
+ decode_tfaceflag(ma, -(ma->game.flag), 1);
+
+ /* 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){
+ /* check if this mesh uses this material */
+ 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];
+ 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++) {
+ if (me->mat[mf->mat_nr] == ma) {
+ /* texface data for this face */
+ tf = ((MTFace*)cdl->data) + a;
+ tf->mode |= TF_CONVERTED;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return nowarning;
+}
+
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c
index 32819226361..810e7c285e8 100644
--- a/source/blender/blenkernel/intern/mesh.c
+++ b/source/blender/blenkernel/intern/mesh.c
@@ -917,7 +917,7 @@ int nurbs_to_mdata_customdb(Object *ob, ListBase *dispbase, MVert **allvert, int
mface->v2= startvert+index[2];
mface->v3= startvert+index[1];
mface->v4= 0;
- mface->mat_nr= (unsigned char)dl->col;
+ mface->mat_nr= dl->col;
test_index_face(mface, NULL, 0, 3);
if(smooth) mface->flag |= ME_SMOOTH;
@@ -966,7 +966,7 @@ int nurbs_to_mdata_customdb(Object *ob, ListBase *dispbase, MVert **allvert, int
mface->v2= p3;
mface->v3= p4;
mface->v4= p2;
- mface->mat_nr= (unsigned char)dl->col;
+ mface->mat_nr= dl->col;
test_index_face(mface, NULL, 0, 4);
if(smooth) mface->flag |= ME_SMOOTH;
@@ -1252,7 +1252,7 @@ void mesh_to_curve(Scene *scene, Object *ob)
}
}
-void mesh_delete_material_index(Mesh *me, int index)
+void mesh_delete_material_index(Mesh *me, short index)
{
MFace *mf;
int i;
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c
index 70398594872..4d735f1d54b 100644
--- a/source/blender/blenkernel/intern/mesh_validate.c
+++ b/source/blender/blenkernel/intern/mesh_validate.c
@@ -143,7 +143,7 @@ int BKE_mesh_validate_arrays(Mesh *me, MVert *UNUSED(mverts), unsigned int totve
BLI_assert(!(do_fixes && me == NULL));
- PRINT("ED_mesh_validate: verts(%u), edges(%u), faces(%u)\n", totvert, totedge, totface);
+ PRINT("%s: verts(%u), edges(%u), faces(%u)\n", __func__, totvert, totedge, totface);
if(totedge == 0 && totface != 0) {
PRINT(" locical error, %u faces and 0 edges\n", totface);
diff --git a/source/blender/blenkernel/intern/navmesh_conversion.c b/source/blender/blenkernel/intern/navmesh_conversion.c
new file mode 100644
index 00000000000..8a2ec1e5169
--- /dev/null
+++ b/source/blender/blenkernel/intern/navmesh_conversion.c
@@ -0,0 +1,517 @@
+/**
+* $Id$
+*
+* ***** 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 *****
+*/
+
+#include <math.h>
+#include <stdlib.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_meshdata_types.h"
+
+#include "BKE_navmesh_conversion.h"
+#include "BKE_cdderivedmesh.h"
+
+#include "BLI_utildefines.h"
+#include "BLI_math.h"
+
+#include "recast-capi.h"
+
+BM_INLINE float area2(const float* a, const float* b, const float* c)
+{
+ return (b[0] - a[0]) * (c[2] - a[2]) - (c[0] - a[0]) * (b[2] - a[2]);
+}
+
+BM_INLINE int left(const float* a, const float* b, const float* c)
+{
+ return area2(a, b, c) < 0;
+}
+
+int polyNumVerts(const unsigned short* p, const int vertsPerPoly)
+{
+ int i, nv = 0;
+ for (i=0; i<vertsPerPoly; i++)
+ {
+ if (p[i]==0xffff)
+ break;
+ nv++;
+ }
+ return nv;
+}
+
+int polyIsConvex(const unsigned short* p, const int vertsPerPoly, const float* verts)
+{
+ int j, nv = polyNumVerts(p, vertsPerPoly);
+ if (nv<3)
+ return 0;
+ 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]];
+ if (!left(v_prev, v, v_next))
+ return 0;
+
+ }
+ return 1;
+}
+
+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);
+
+ d = abx[0]*abx[0]+abx[2]*abx[2];
+ t = abx[0]*dx[0]+abx[2]*dx[2];
+
+ if (d > 0)
+ t /= d;
+ if (t < 0)
+ t = 0;
+ else if (t > 1)
+ t = 1;
+ dx[0] = a[0] + t*abx[0] - point[0];
+ dx[2] = a[2] + t*abx[2] - point[2];
+
+ return dx[0]*dx[0] + dx[2]*dx[2];
+}
+
+int buildRawVertIndicesData(DerivedMesh* dm, int *nverts_r, float **verts_r,
+ int *ntris_r, unsigned short **tris_r, int **trisToFacesMap_r,
+ int **recastData)
+{
+ int vi, fi, triIdx;
+ int nverts, ntris;
+ int *trisToFacesMap;
+ float *verts;
+ unsigned short *tris, *tri;
+ int nfaces;
+ MFace *faces;
+
+ nverts = dm->getNumVerts(dm);
+ if (nverts>=0xffff)
+ {
+ printf("Converting navmesh: Error! Too many vertices. Max number of vertices %d\n", 0xffff);
+ return 0;
+ }
+ verts = MEM_callocN(sizeof(float)*3*nverts, "buildRawVertIndicesData verts");
+ dm->getVertCos(dm, (float(*)[3])verts);
+
+ //flip coordinates
+ for (vi=0; vi<nverts; vi++)
+ {
+ SWAP(float, verts[3*vi+1], verts[3*vi+2]);
+ }
+
+ //calculate number of tris
+ nfaces = dm->getNumFaces(dm);
+ faces = dm->getFaceArray(dm);
+ ntris = nfaces;
+ for (fi=0; fi<nfaces; fi++)
+ {
+ MFace* face = &faces[fi];
+ if (face->v4)
+ ntris++;
+ }
+
+ //copy and transform to triangles (reorder on the run)
+ trisToFacesMap = MEM_callocN(sizeof(int)*ntris, "buildRawVertIndicesData trisToFacesMap");
+ tris = MEM_callocN(sizeof(unsigned short)*3*ntris, "buildRawVertIndicesData tris");
+ tri = tris;
+ triIdx = 0;
+ 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)
+ {
+ tri[3*triIdx+0] = (unsigned short) face->v1;
+ tri[3*triIdx+1] = (unsigned short) face->v4;
+ tri[3*triIdx+2] = (unsigned short) face->v3;
+ trisToFacesMap[triIdx++]=fi;
+ }
+ }
+
+ //carefully, recast data is just reference to data in derived mesh
+ *recastData = (int*)CustomData_get_layer(&dm->faceData, CD_RECAST);
+
+ *nverts_r = nverts;
+ *verts_r = verts;
+ *ntris_r = ntris;
+ *tris_r = tris;
+ *trisToFacesMap_r = trisToFacesMap;
+
+ return 1;
+}
+
+int buildPolygonsByDetailedMeshes(const int vertsPerPoly, const int npolys,
+ unsigned short* polys, const unsigned short* dmeshes,
+ const float* verts, const unsigned short* dtris,
+ const int* dtrisToPolysMap)
+{
+ int polyidx;
+ int capacity = vertsPerPoly;
+ unsigned short* newPoly = MEM_callocN(sizeof(unsigned short)*capacity, "buildPolygonsByDetailedMeshes newPoly");
+ memset(newPoly, 0xff, sizeof(unsigned short)*capacity);
+
+ for (polyidx=0; polyidx<npolys; polyidx++)
+ {
+ size_t i;
+ int j, k;
+ int nv = 0;
+ //search border
+ int tri, btri = -1;
+ int edge, bedge = -1;
+ int dtrisNum = dmeshes[polyidx*4+3];
+ int dtrisBase = dmeshes[polyidx*4+2];
+ unsigned char *traversedTris = MEM_callocN(sizeof(unsigned char)*dtrisNum, "buildPolygonsByDetailedMeshes traversedTris");
+ unsigned short* adjustedPoly;
+ int adjustedNv;
+ int allBorderTraversed;
+
+ for (j=0; j<dtrisNum && btri==-1;j++)
+ {
+ int curpolytri = dtrisBase+j;
+ for (k=0; k<3; k++)
+ {
+ unsigned short neighbortri = dtris[curpolytri*3*2+3+k];
+ if ( neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1)
+ {
+ btri = curpolytri;
+ bedge = k;
+ break;
+ }
+ }
+ }
+ if (btri==-1 || bedge==-1)
+ {
+ //can't find triangle with border edge
+ MEM_freeN(traversedTris);
+ MEM_freeN(newPoly);
+
+ return 0;
+ }
+
+ newPoly[nv++] = dtris[btri*3*2+bedge];
+ tri = btri;
+ edge = (bedge+1)%3;
+ traversedTris[tri-dtrisBase] = 1;
+ while (tri!=btri || edge!=bedge)
+ {
+ int neighbortri = dtris[tri*3*2+3+edge];
+ if (neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1)
+ {
+ if (nv==capacity)
+ {
+ unsigned short* newPolyBig;
+ capacity += vertsPerPoly;
+ newPolyBig = MEM_callocN(sizeof(unsigned short)*capacity, "buildPolygonsByDetailedMeshes newPolyBig");
+ memset(newPolyBig, 0xff, sizeof(unsigned short)*capacity);
+ memcpy(newPolyBig, newPoly, sizeof(unsigned short)*nv);
+ MEM_freeN(newPoly);
+ newPoly = newPolyBig;
+ }
+ newPoly[nv++] = dtris[tri*3*2+edge];
+ //move to next edge
+ edge = (edge+1)%3;
+ }
+ else
+ {
+ //move to next tri
+ int twinedge = -1;
+ for (k=0; k<3; k++)
+ {
+ if (dtris[neighbortri*3*2+3+k] == tri)
+ {
+ twinedge = k;
+ break;
+ }
+ }
+ if (twinedge==-1)
+ {
+ printf("Converting navmesh: Error! Can't find neighbor edge - invalid adjacency info\n");
+ MEM_freeN(traversedTris);
+ goto returnLabel;
+ }
+ tri = neighbortri;
+ edge = (twinedge+1)%3;
+ traversedTris[tri-dtrisBase] = 1;
+ }
+ }
+
+ adjustedPoly = MEM_callocN(sizeof(unsigned short)*nv, "buildPolygonsByDetailedMeshes adjustedPoly");
+ adjustedNv = 0;
+ 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];
+ float distSq = distPointToSegmentSq(&verts[3*cur], &verts[3*prev], &verts[3*next]);
+ static const float tolerance = 0.001f;
+ if (distSq>tolerance)
+ adjustedPoly[adjustedNv++] = cur;
+ }
+ memcpy(newPoly, adjustedPoly, adjustedNv*sizeof(unsigned short));
+ MEM_freeN(adjustedPoly);
+ nv = adjustedNv;
+
+ allBorderTraversed = 1;
+ 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++)
+ {
+ unsigned short neighbortri = dtris[curpolytri*3*2+3+k];
+ if ( neighbortri==0xffff || dtrisToPolysMap[neighbortri]!=polyidx+1)
+ {
+ allBorderTraversed = 0;
+ break;
+ }
+ }
+ }
+ }
+
+ if (nv<=vertsPerPoly && allBorderTraversed)
+ {
+ for (i=0; i<nv; i++)
+ {
+ polys[polyidx*vertsPerPoly*2+i] = newPoly[i];
+ }
+ }
+
+ MEM_freeN(traversedTris);
+ }
+
+returnLabel:
+ MEM_freeN(newPoly);
+
+ return 1;
+}
+
+struct SortContext
+{
+ const int* recastData;
+ const int* trisToFacesMap;
+};
+
+/* XXX: not thread-safe, but it's called only from modifiers stack
+ which isn't threaded. Anyway, better to avoid this in the future */
+static struct SortContext *_qsort_context;
+
+static int compareByData(const void * a, const void * b)
+{
+ return ( _qsort_context->recastData[_qsort_context->trisToFacesMap[*(int*)a]] -
+ _qsort_context->recastData[_qsort_context->trisToFacesMap[*(int*)b]] );
+}
+
+int buildNavMeshData(const int nverts, const float* verts,
+ const int ntris, const unsigned short *tris,
+ const int* recastData, const int* trisToFacesMap,
+ int *ndtris_r, unsigned short **dtris_r,
+ int *npolys_r, unsigned short **dmeshes_r, unsigned short **polys_r,
+ int *vertsPerPoly_r, int **dtrisToPolysMap_r, int **dtrisToTrisMap_r)
+
+{
+ int *trisMapping = MEM_callocN(sizeof(int)*ntris, "buildNavMeshData trisMapping");
+ int i;
+ struct SortContext context;
+ int validTriStart, prevPolyIdx, curPolyIdx, newPolyIdx, prevpolyidx;
+ unsigned short *dmesh;
+
+ int ndtris, npolys, vertsPerPoly;
+ unsigned short *dtris, *dmeshes, *polys;
+ int *dtrisToPolysMap, *dtrisToTrisMap;
+
+ if (!recastData)
+ {
+ printf("Converting navmesh: Error! Can't find recast custom data\n");
+ return 0;
+ }
+
+ //sort the triangles by polygon idx
+ for (i=0; i<ntris; i++)
+ trisMapping[i]=i;
+ context.recastData = recastData;
+ context.trisToFacesMap = trisToFacesMap;
+ _qsort_context = &context;
+ qsort(trisMapping, ntris, sizeof(int), compareByData);
+
+ //search first valid triangle - triangle of convex polygon
+ validTriStart = -1;
+ for (i=0; i< ntris; i++)
+ {
+ if (recastData[trisToFacesMap[trisMapping[i]]]>0)
+ {
+ validTriStart = i;
+ break;
+ }
+ }
+
+ if (validTriStart<0)
+ {
+ printf("Converting navmesh: Error! No valid polygons in mesh\n");
+ MEM_freeN(trisMapping);
+ return 0;
+ }
+
+ ndtris = ntris-validTriStart;
+ //fill dtris to faces mapping
+ dtrisToTrisMap = MEM_callocN(sizeof(int)*ndtris, "buildNavMeshData dtrisToTrisMap");
+ memcpy(dtrisToTrisMap, &trisMapping[validTriStart], ndtris*sizeof(int));
+ MEM_freeN(trisMapping);
+
+ //create detailed mesh triangles - copy only valid triangles
+ //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++)
+ {
+ memcpy(dtris+3*2*i, tris+3*dtrisToTrisMap[i], sizeof(unsigned short)*3);
+ }
+
+ //create new recast data corresponded to dtris and renumber for continuous indices
+ prevPolyIdx = -1;
+ newPolyIdx = 0;
+ dtrisToPolysMap = MEM_callocN(sizeof(int)*ndtris, "buildNavMeshData dtrisToPolysMap");
+ for (i=0; i<ndtris; i++)
+ {
+ curPolyIdx = recastData[trisToFacesMap[dtrisToTrisMap[i]]];
+ if (curPolyIdx!=prevPolyIdx)
+ {
+ newPolyIdx++;
+ prevPolyIdx=curPolyIdx;
+ }
+ dtrisToPolysMap[i] = newPolyIdx;
+ }
+
+
+ //build adjacency info for detailed mesh triangles
+ recast_buildMeshAdjacency(dtris, ndtris, nverts, 3);
+
+ //create detailed mesh description for each navigation polygon
+ npolys = dtrisToPolysMap[ndtris-1];
+ dmeshes = MEM_callocN(sizeof(unsigned short)*npolys*4, "buildNavMeshData dmeshes");
+ memset(dmeshes, 0, npolys*4*sizeof(unsigned short));
+ dmesh = NULL;
+ prevpolyidx = 0;
+ for (i=0; i<ndtris; i++)
+ {
+ int curpolyidx = dtrisToPolysMap[i];
+ if (curpolyidx!=prevpolyidx)
+ {
+ if (curpolyidx!=prevpolyidx+1)
+ {
+ printf("Converting navmesh: Error! Wrong order of detailed mesh faces\n");
+ return 0;
+ }
+ dmesh = dmesh==NULL ? dmeshes : dmesh+4;
+ dmesh[2] = (unsigned short)i; //tbase
+ dmesh[3] = 0; //tnum
+ prevpolyidx = curpolyidx;
+ }
+ dmesh[3]++;
+ }
+
+ //create navigation polygons
+ vertsPerPoly = 6;
+ polys = MEM_callocN(sizeof(unsigned short)*npolys*vertsPerPoly*2, "buildNavMeshData polys");
+ memset(polys, 0xff, sizeof(unsigned short)*vertsPerPoly*2*npolys);
+
+ buildPolygonsByDetailedMeshes(vertsPerPoly, npolys, polys, dmeshes, verts, dtris, dtrisToPolysMap);
+
+ *ndtris_r = ndtris;
+ *npolys_r = npolys;
+ *vertsPerPoly_r = vertsPerPoly;
+ *dtris_r = dtris;
+ *dmeshes_r = dmeshes;
+ *polys_r = polys;
+ *dtrisToPolysMap_r = dtrisToPolysMap;
+ *dtrisToTrisMap_r = dtrisToTrisMap;
+
+ return 1;
+}
+
+
+int buildNavMeshDataByDerivedMesh(DerivedMesh *dm, int *vertsPerPoly,
+ int *nverts, float **verts,
+ int *ndtris, unsigned short **dtris,
+ int *npolys, unsigned short **dmeshes,
+ unsigned short **polys, int **dtrisToPolysMap,
+ int **dtrisToTrisMap, int **trisToFacesMap)
+{
+ int res = 1;
+ int ntris = 0, *recastData=NULL;
+ unsigned short *tris=NULL;
+
+ res = buildRawVertIndicesData(dm, nverts, verts, &ntris, &tris, trisToFacesMap, &recastData);
+ 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,
+ dtrisToPolysMap, dtrisToTrisMap);
+ if (!res)
+ {
+ printf("Converting navmesh: Error! Can't get vertices and indices from mesh\n");
+ goto exit;
+ }
+
+exit:
+ if (tris)
+ MEM_freeN(tris);
+
+ return res;
+}
+
+int polyFindVertex(const unsigned short* p, const int vertsPerPoly, unsigned short vertexIdx)
+{
+ int i, res = -1;
+ for(i=0; i<vertsPerPoly; i++)
+ {
+ if (p[i]==0xffff)
+ break;
+ if (p[i]==vertexIdx)
+ {
+ res = i;
+ break;
+ }
+ }
+ return res;
+}
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 5f1a6c911bc..524a63a8a95 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -46,84 +46,107 @@
#include <limits.h>
#include "DNA_anim_types.h"
-#include "DNA_action_types.h"
#include "DNA_node_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_action_types.h"
+#include "BLI_string.h"
+#include "BLI_math.h"
#include "BLI_listbase.h"
-
-#include "RNA_access.h"
+#include "BLI_path_util.h"
+#include "BLI_utildefines.h"
#include "BKE_animsys.h"
#include "BKE_action.h"
#include "BKE_fcurve.h"
+#include "BKE_global.h"
+#include "BKE_image.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_utildefines.h"
+#include "BKE_utildefines.h"
-#include "PIL_time.h"
-
-#include "CMP_node.h"
-#include "intern/CMP_util.h" /* stupid include path... */
+#include "BLI_listbase.h"
-#include "SHD_node.h"
-#include "TEX_node.h"
-#include "intern/TEX_util.h"
+#include "RNA_access.h"
-#include "GPU_material.h"
+#include "NOD_socket.h"
+#include "NOD_composite.h"
+#include "NOD_shader.h"
+#include "NOD_texture.h"
-static ListBase empty_list = {NULL, NULL};
-ListBase node_all_composit = {NULL, NULL};
-ListBase node_all_shaders = {NULL, NULL};
-ListBase node_all_textures = {NULL, NULL};
-/* ************** Type stuff ********** */
+bNodeTreeType *ntreeGetType(int type)
+{
+ static bNodeTreeType *types[NUM_NTREE_TYPES];
+ static int types_init = 1;
+ if (types_init) {
+ types[NTREE_SHADER] = &ntreeType_Shader;
+ types[NTREE_COMPOSIT] = &ntreeType_Composite;
+ types[NTREE_TEXTURE] = &ntreeType_Texture;
+ types_init = 0;
+ }
+
+ if(type >= 0 && type < NUM_NTREE_TYPES) {
+ return types[type];
+ }
+ else {
+ return NULL;
+ }
+}
-static bNodeType *node_get_type(bNodeTree *ntree, int type, ID *id)
+static bNodeType *node_get_type(bNodeTree *ntree, int type)
{
- bNodeType *ntype = ntree->alltypes.first;
+ bNodeType *ntype = ntreeGetType(ntree->type)->node_types.first;
for(; ntype; ntype= ntype->next)
- if(ntype->type==type && id==ntype->id )
+ if(ntype->type==type)
return ntype;
return NULL;
}
-void ntreeInitTypes(bNodeTree *ntree)
+bNodeType *ntreeGetNodeType(bNodeTree *ntree)
{
- bNode *node, *next;
-
- if(ntree->type==NTREE_SHADER)
- ntree->alltypes= node_all_shaders;
- else if(ntree->type==NTREE_COMPOSIT)
- ntree->alltypes= node_all_composit;
- else if(ntree->type==NTREE_TEXTURE)
- ntree->alltypes= node_all_textures;
+ return node_get_type(ntree, ntree->nodetype);
+}
+
+bNodeSocketType *ntreeGetSocketType(int type)
+{
+ static bNodeSocketType *types[NUM_SOCKET_TYPES]= {NULL};
+ static int types_init = 1;
+
+ if (types_init) {
+ node_socket_type_init(types);
+ types_init= 0;
+ }
+
+ if(type < NUM_SOCKET_TYPES) {
+ return types[type];
+ }
else {
- ntree->alltypes= empty_list;
- printf("Error: no type definitions for nodes\n");
+ return NULL;
}
+}
+
+void ntreeInitTypes(bNodeTree *ntree)
+{
+ bNode *node, *next;
for(node= ntree->nodes.first; node; node= next) {
next= node->next;
+
+ node->typeinfo= node_get_type(ntree, node->type);
+
if(node->type==NODE_DYNAMIC) {
- bNodeType *stype= NULL;
- if(node->id==NULL) { /* empty script node */
- stype= node_get_type(ntree, node->type, NULL);
- } else { /* not an empty script node */
- stype= node_get_type(ntree, node->type, node->id);
- if(!stype) {
- stype= node_get_type(ntree, node->type, NULL);
- /* needed info if the pynode script fails now: */
- if (node->id) node->storage= ntree;
- } else {
- node->custom1= 0;
- node->custom1= BSET(node->custom1,NODE_DYNAMIC_ADDEXIST);
- }
+ /* 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->typeinfo= stype;
- if(node->typeinfo)
- node->typeinfo->initfunc(node);
- } else {
- node->typeinfo= node_get_type(ntree, node->type, NULL);
+// if(node->typeinfo)
+// node->typeinfo->initfunc(node);
}
if(node->typeinfo==NULL) {
@@ -135,66 +158,51 @@ void ntreeInitTypes(bNodeTree *ntree)
ntree->init |= NTREE_TYPE_INIT;
}
-/* updates node with (modified) bNodeType.. this should be done for all trees */
-void ntreeUpdateType(bNodeTree *ntree, bNodeType *ntype)
+static bNodeSocket *make_socket(bNodeTree *UNUSED(ntree), int in_out, const char *name, int type)
{
- bNode *node;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->typeinfo== ntype) {
- nodeUpdateType(ntree, node, ntype);
- }
- }
+ bNodeSocketType *stype= ntreeGetSocketType(type);
+ bNodeSocket *sock;
+
+ sock= MEM_callocN(sizeof(bNodeSocket), "sock");
+
+ BLI_strncpy(sock->name, name, NODE_MAXSTR);
+ sock->limit = (in_out==SOCK_IN ? 1 : 0xFFF);
+ sock->type= type;
+ sock->storage = NULL;
+
+ if (stype->value_structsize > 0)
+ sock->default_value = MEM_callocN(stype->value_structsize, "default socket value");
+
+ return sock;
}
-/* only used internal... we depend on type definitions! */
-static bNodeSocket *node_add_socket_type(ListBase *lb, bNodeSocketType *stype)
+bNodeSocket *nodeAddSocket(bNodeTree *ntree, bNode *node, int in_out, const char *name, int type)
{
- bNodeSocket *sock= MEM_callocN(sizeof(bNodeSocket), "sock");
+ bNodeSocket *sock = make_socket(ntree, in_out, name, type);
+ if (in_out==SOCK_IN)
+ BLI_addtail(&node->inputs, sock);
+ else if (in_out==SOCK_OUT)
+ BLI_addtail(&node->outputs, sock);
- BLI_strncpy(sock->name, stype->name, NODE_MAXSTR);
- if(stype->limit==0) sock->limit= 0xFFF;
- else sock->limit= stype->limit;
- sock->type= stype->type;
+ ntree->update |= NTREE_UPDATE_NODES;
- sock->ns.vec[0]= stype->val1;
- sock->ns.vec[1]= stype->val2;
- sock->ns.vec[2]= stype->val3;
- sock->ns.vec[3]= stype->val4;
- sock->ns.min= stype->min;
- sock->ns.max= stype->max;
-
- if(lb)
- BLI_addtail(lb, sock);
-
return sock;
}
-static bNodeSocket *node_add_group_socket(ListBase *lb, bNodeSocket *gsock)
+bNodeSocket *nodeInsertSocket(bNodeTree *ntree, bNode *node, int in_out, bNodeSocket *next_sock, const char *name, int type)
{
- bNodeSocket *sock= MEM_callocN(sizeof(bNodeSocket), "sock");
+ bNodeSocket *sock = make_socket(ntree, in_out, name, type);
+ if (in_out==SOCK_IN)
+ BLI_insertlinkbefore(&node->inputs, next_sock, sock);
+ else if (in_out==SOCK_OUT)
+ BLI_insertlinkbefore(&node->outputs, next_sock, sock);
- /* make a copy of the group socket */
- *sock = *gsock;
- sock->link = NULL;
- sock->next = sock->prev = NULL;
- sock->new_sock = NULL;
- sock->ns.data = NULL;
+ ntree->update |= NTREE_UPDATE_NODES;
- sock->own_index = gsock->own_index;
- sock->groupsock = gsock;
- /* XXX hack: group socket input/output roles are inverted internally,
- * need to change the limit value when making actual node sockets from them.
- */
- sock->limit = (gsock->limit==1 ? 0xFFF : 1);
-
- if(lb)
- BLI_addtail(lb, sock);
-
return sock;
}
-static void node_rem_socket(bNodeTree *ntree, ListBase *lb, bNodeSocket *sock)
+void nodeRemoveSocket(bNodeTree *ntree, bNode *node, bNodeSocket *sock)
{
bNodeLink *link, *next;
@@ -205,428 +213,42 @@ static void node_rem_socket(bNodeTree *ntree, ListBase *lb, bNodeSocket *sock)
}
}
- BLI_remlink(lb, sock);
- MEM_freeN(sock);
-}
-
-static bNodeSocket *verify_socket(ListBase *lb, bNodeSocketType *stype)
-{
- bNodeSocket *sock;
-
- for(sock= lb->first; sock; sock= sock->next) {
- if(strncmp(sock->name, stype->name, NODE_MAXSTR)==0)
- break;
- }
- if(sock) {
- sock->type= stype->type; /* in future, read this from tydefs! */
- if(stype->limit==0) sock->limit= 0xFFF;
- else sock->limit= stype->limit;
-
- sock->ns.min= stype->min;
- sock->ns.max= stype->max;
-
- BLI_remlink(lb, sock);
-
- return sock;
- }
- else {
- return node_add_socket_type(NULL, stype);
- }
-}
-
-static bNodeSocket *verify_group_socket(ListBase *lb, bNodeSocket *gsock)
-{
- bNodeSocket *sock;
-
- for(sock= lb->first; sock; sock= sock->next) {
- if(sock->own_index==gsock->own_index)
- break;
- }
- if(sock) {
- sock->groupsock = gsock;
-
- strcpy(sock->name, gsock->name);
- sock->type= 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.
- */
- sock->limit = (gsock->limit==1 ? 0xFFF : 1);
-
- sock->ns.min= gsock->ns.min;
- sock->ns.max= gsock->ns.max;
-
- BLI_remlink(lb, sock);
-
- return sock;
- }
- else {
- return node_add_group_socket(NULL, gsock);
- }
-}
-
-static void verify_socket_list(bNodeTree *ntree, ListBase *lb, bNodeSocketType *stype_first)
-{
- bNodeSocketType *stype;
-
- /* no inputs anymore? */
- if(stype_first==NULL) {
- while(lb->first)
- node_rem_socket(ntree, lb, lb->first);
- }
- else {
- /* step by step compare */
- stype= stype_first;
- while(stype->type != -1) {
- stype->sock= verify_socket(lb, stype);
- stype++;
- }
- /* leftovers are removed */
- while(lb->first)
- node_rem_socket(ntree, lb, lb->first);
- /* and we put back the verified sockets */
- stype= stype_first;
- while(stype->type != -1) {
- BLI_addtail(lb, stype->sock);
- stype++;
- }
- }
-}
-
-static void verify_group_socket_list(bNodeTree *ntree, ListBase *lb, ListBase *glb)
-{
- bNodeSocket *gsock;
-
- /* step by step compare */
- for (gsock= glb->first; gsock; gsock=gsock->next) {
- /* abusing new_sock pointer for verification here! only used inside this function */
- gsock->new_sock= verify_group_socket(lb, gsock);
- }
- /* leftovers are removed */
- while(lb->first)
- node_rem_socket(ntree, lb, lb->first);
- /* and we put back the verified sockets */
- for (gsock= glb->first; gsock; gsock=gsock->next) {
- BLI_addtail(lb, gsock->new_sock);
- gsock->new_sock = NULL;
- }
-}
-
-void nodeVerifyType(bNodeTree *ntree, bNode *node)
-{
- /* node groups don't have static sock lists, but use external sockets from the tree instead */
- if (node->type==NODE_GROUP) {
- bNodeTree *ngroup= (bNodeTree*)node->id;
- if (ngroup) {
- verify_group_socket_list(ntree, &node->inputs, &ngroup->inputs);
- verify_group_socket_list(ntree, &node->outputs, &ngroup->outputs);
- }
- }
- else {
- bNodeType *ntype= node->typeinfo;
- if(ntype) {
- verify_socket_list(ntree, &node->inputs, ntype->inputs);
- verify_socket_list(ntree, &node->outputs, ntype->outputs);
- }
- }
-}
-
-void ntreeVerifyTypes(bNodeTree *ntree)
-{
- bNode *node;
-
- /* if((ntree->init & NTREE_TYPE_INIT)==0) */
- ntreeInitTypes(ntree);
-
- /* check inputs and outputs, and remove or insert them */
- for(node= ntree->nodes.first; node; node= node->next)
- nodeVerifyType(ntree, node);
+ /* this is fast, this way we don't need an in_out argument */
+ BLI_remlink(&node->inputs, sock);
+ BLI_remlink(&node->outputs, sock);
-}
-
-/* ************** Group stuff ********** */
-
-/* XXX group typeinfo struct is used directly in ntreeMakeOwnType, needs cleanup */
-static bNodeType ntype_group;
-
-/* groups display their internal tree name as label */
-static const char *group_label(bNode *node)
-{
- return (node->id)? node->id->name+2: "Missing Datablock";
-}
-
-void register_node_type_group(ListBase *lb)
-{
- node_type_base(&ntype_group, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS, NULL, NULL);
- node_type_size(&ntype_group, 120, 60, 200);
- node_type_label(&ntype_group, group_label);
+ if (sock->default_value)
+ MEM_freeN(sock->default_value);
+ MEM_freeN(sock);
- nodeRegisterType(lb, &ntype_group);
-}
-
-static bNodeSocket *find_group_node_input(bNode *gnode, bNodeSocket *gsock)
-{
- bNodeSocket *sock;
- for (sock=gnode->inputs.first; sock; sock=sock->next)
- if (sock->groupsock == gsock)
- return sock;
- return NULL;
+ ntree->update |= NTREE_UPDATE_NODES;
}
-static bNodeSocket *find_group_node_output(bNode *gnode, bNodeSocket *gsock)
+void nodeRemoveAllSockets(bNodeTree *ntree, bNode *node)
{
bNodeSocket *sock;
- for (sock=gnode->outputs.first; sock; sock=sock->next)
- if (sock->groupsock == gsock)
- return sock;
- return NULL;
-}
-
-bNode *nodeMakeGroupFromSelected(bNodeTree *ntree)
-{
- bNodeLink *link, *linkn;
- bNode *node, *gnode, *nextn;
- bNodeTree *ngroup;
- bNodeSocket *gsock;
- ListBase anim_basepaths = {NULL, NULL};
- float min[2], max[2];
- int totnode=0;
-
- INIT_MINMAX2(min, max);
-
- /* is there something to group? also do some clearing */
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->flag & NODE_SELECT) {
- /* no groups in groups */
- if(node->type==NODE_GROUP)
- return NULL;
- DO_MINMAX2( (&node->locx), min, max);
- totnode++;
- }
- node->done= 0;
- }
- if(totnode==0) return NULL;
-
- /* check if all connections are OK, no unselected node has both
- inputs and outputs to a selection */
- for(link= ntree->links.first; link; link= link->next) {
- if(link->fromnode && link->tonode && link->fromnode->flag & NODE_SELECT)
- link->tonode->done |= 1;
- if(link->fromnode && link->tonode && link->tonode->flag & NODE_SELECT)
- link->fromnode->done |= 2;
- }
-
- for(node= ntree->nodes.first; node; node= node->next) {
- if((node->flag & NODE_SELECT)==0)
- if(node->done==3)
- break;
- }
- if(node)
- return NULL;
+ bNodeLink *link, *next;
- /* OK! new nodetree */
- ngroup= ntreeAddTree("NodeGroup", ntree->type, TRUE);
-
- /* move nodes over */
- for(node= ntree->nodes.first; node; node= nextn) {
- nextn= node->next;
- if(node->flag & NODE_SELECT) {
- /* keep track of this node's RNA "base" path (the part of the pat identifying the node)
- * if the old nodetree has animation data which potentially covers this node
- */
- if (ntree->adt) {
- PointerRNA ptr;
- char *path;
-
- RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
- path = RNA_path_from_ID_to_struct(&ptr);
-
- if (path)
- BLI_addtail(&anim_basepaths, BLI_genericNodeN(path));
- }
-
- /* change node-collection membership */
- BLI_remlink(&ntree->nodes, node);
- BLI_addtail(&ngroup->nodes, node);
-
- node->locx-= 0.5f*(min[0]+max[0]);
- node->locy-= 0.5f*(min[1]+max[1]);
- }
- }
-
- /* move animation data over */
- if (ntree->adt) {
- LinkData *ld, *ldn=NULL;
-
- BKE_animdata_separate_by_basepath(&ntree->id, &ngroup->id, &anim_basepaths);
-
- /* paths + their wrappers need to be freed */
- for (ld = anim_basepaths.first; ld; ld = ldn) {
- ldn = ld->next;
-
- MEM_freeN(ld->data);
- BLI_freelinkN(&anim_basepaths, ld);
+ for(link= ntree->links.first; link; link= next) {
+ next= link->next;
+ if(link->fromnode==node || link->tonode==node) {
+ nodeRemLink(ntree, link);
}
}
- /* make group node */
- gnode= nodeAddNodeType(ntree, NODE_GROUP, ngroup, NULL);
- gnode->locx= 0.5f*(min[0]+max[0]);
- gnode->locy= 0.5f*(min[1]+max[1]);
+ for (sock=node->inputs.first; sock; sock=sock->next)
+ if (sock->default_value)
+ MEM_freeN(sock->default_value);
+ BLI_freelistN(&node->inputs);
+ for (sock=node->outputs.first; sock; sock=sock->next)
+ if (sock->default_value)
+ MEM_freeN(sock->default_value);
- /* relink external sockets */
- for(link= ntree->links.first; link; link= linkn) {
- linkn= link->next;
-
- if(link->fromnode && link->tonode && (link->fromnode->flag & link->tonode->flag & NODE_SELECT)) {
- BLI_remlink(&ntree->links, link);
- BLI_addtail(&ngroup->links, link);
- }
- else if(link->tonode && (link->tonode->flag & NODE_SELECT)) {
- gsock = nodeGroupExposeSocket(ngroup, link->tosock, SOCK_IN);
- link->tosock->link = nodeAddLink(ngroup, NULL, gsock, link->tonode, link->tosock);
- link->tosock = node_add_group_socket(&gnode->inputs, gsock);
- link->tonode = gnode;
- }
- else if(link->fromnode && (link->fromnode->flag & NODE_SELECT)) {
- /* search for existing group node socket */
- for (gsock=ngroup->outputs.first; gsock; gsock=gsock->next)
- if (gsock->link && gsock->link->fromsock==link->fromsock)
- break;
- if (!gsock) {
- gsock = nodeGroupExposeSocket(ngroup, link->fromsock, SOCK_OUT);
- gsock->link = nodeAddLink(ngroup, link->fromnode, link->fromsock, NULL, gsock);
- link->fromsock = node_add_group_socket(&gnode->outputs, gsock);
- }
- else
- link->fromsock = find_group_node_output(gnode, gsock);
- link->fromnode = gnode;
- }
- }
-
- /* update node levels */
- ntreeSolveOrder(ntree);
-
- return gnode;
-}
-
-/* here's a nasty little one, need to check users... */
-/* should become callbackable... */
-void nodeGroupVerify(bNodeTree *ngroup)
-{
- /* group changed, so we rebuild the type definition */
-// ntreeMakeGroupSockets(ngroup);
+ BLI_freelistN(&node->outputs);
- if(ngroup->type==NTREE_SHADER) {
- Material *ma;
- for(ma= G.main->mat.first; ma; ma= ma->id.next) {
- if(ma->nodetree) {
- bNode *node;
- for(node= ma->nodetree->nodes.first; node; node= node->next)
- if(node->id == (ID *)ngroup)
- nodeVerifyType(ma->nodetree, node);
- }
- }
- }
- else if(ngroup->type==NTREE_COMPOSIT) {
- Scene *sce;
- for(sce= G.main->scene.first; sce; sce= sce->id.next) {
- if(sce->nodetree) {
- bNode *node;
- for(node= sce->nodetree->nodes.first; node; node= node->next)
- if(node->id == (ID *)ngroup)
- nodeVerifyType(sce->nodetree, node);
- }
- }
- }
- else if(ngroup->type==NTREE_TEXTURE) {
- Tex *tx;
- for(tx= G.main->tex.first; tx; tx= tx->id.next) {
- if(tx->nodetree) {
- bNode *node;
- for(node= tx->nodetree->nodes.first; node; node= node->next)
- if(node->id == (ID *)ngroup)
- nodeVerifyType(tx->nodetree, node);
- }
- }
- }
+ ntree->update |= NTREE_UPDATE_NODES;
}
-/* also to check all users of groups. Now only used in editor for hide/unhide */
-/* should become callbackable? */
-void nodeGroupSocketUseFlags(bNodeTree *ngroup)
-{
- bNode *node;
- bNodeSocket *sock;
-
- /* clear flags */
- for(node= ngroup->nodes.first; node; node= node->next) {
- for(sock= node->inputs.first; sock; sock= sock->next)
- sock->flag &= ~SOCK_IN_USE;
- for(sock= node->outputs.first; sock; sock= sock->next)
- sock->flag &= ~SOCK_IN_USE;
- }
-
- /* tag all thats in use */
- if(ngroup->type==NTREE_SHADER) {
- Material *ma;
- for(ma= G.main->mat.first; ma; ma= ma->id.next) {
- if(ma->nodetree) {
- for(node= ma->nodetree->nodes.first; node; node= node->next) {
- if(node->id==&ngroup->id) {
- for(sock= node->inputs.first; sock; sock= sock->next)
- if(sock->link)
- if(sock->groupsock)
- sock->groupsock->flag |= SOCK_IN_USE;
- for(sock= node->outputs.first; sock; sock= sock->next)
- if(nodeCountSocketLinks(ma->nodetree, sock))
- if(sock->groupsock)
- sock->groupsock->flag |= SOCK_IN_USE;
- }
- }
- }
- }
- }
- else if(ngroup->type==NTREE_COMPOSIT) {
- Scene *sce;
- for(sce= G.main->scene.first; sce; sce= sce->id.next) {
- if(sce->nodetree) {
- for(node= sce->nodetree->nodes.first; node; node= node->next) {
- if(node->id==(ID *)ngroup) {
- for(sock= node->inputs.first; sock; sock= sock->next)
- if(sock->link)
- if(sock->groupsock)
- sock->groupsock->flag |= SOCK_IN_USE;
- for(sock= node->outputs.first; sock; sock= sock->next)
- if(nodeCountSocketLinks(sce->nodetree, sock))
- if(sock->groupsock)
- sock->groupsock->flag |= SOCK_IN_USE;
- }
- }
- }
- }
- }
- else if(ngroup->type==NTREE_TEXTURE) {
- Tex *tx;
- for(tx= G.main->tex.first; tx; tx= tx->id.next) {
- if(tx->nodetree) {
- for(node= tx->nodetree->nodes.first; node; node= node->next) {
- if(node->id==(ID *)ngroup) {
- for(sock= node->inputs.first; sock; sock= sock->next)
- if(sock->link)
- if(sock->groupsock)
- sock->groupsock->flag |= SOCK_IN_USE;
- for(sock= node->outputs.first; sock; sock= sock->next)
- if(nodeCountSocketLinks(tx->nodetree, sock))
- if(sock->groupsock)
- sock->groupsock->flag |= SOCK_IN_USE;
- }
- }
- }
- }
- }
-
-}
/* finds a node based on its name */
bNode *nodeFindNodebyName(bNodeTree *ntree, const char *name)
{
@@ -669,272 +291,26 @@ int nodeFindNode(bNodeTree *ntree, bNodeSocket *sock, bNode **nodep, int *sockin
return 0;
}
-/* returns 1 if its OK */
-int nodeGroupUnGroup(bNodeTree *ntree, bNode *gnode)
+/* ************** Add stuff ********** */
+static void node_add_sockets_from_type(bNodeTree *ntree, bNode *node, bNodeType *ntype)
{
- bNodeLink *link, *linkn;
- bNode *node, *nextn;
- bNodeTree *ngroup, *wgroup;
- ListBase anim_basepaths = {NULL, NULL};
-
- ngroup= (bNodeTree *)gnode->id;
- if(ngroup==NULL) return 0;
-
- /* clear new pointers, set in copytree */
- for(node= ntree->nodes.first; node; node= node->next)
- node->new_node= NULL;
-
- /* wgroup is a temporary copy of the NodeTree we're merging in
- * - all of wgroup's nodes are transferred across to their new home
- * - ngroup (i.e. the source NodeTree) is left unscathed
- */
- wgroup= ntreeCopyTree(ngroup);
-
- /* add the nodes into the ntree */
- for(node= wgroup->nodes.first; node; node= nextn) {
- nextn= node->next;
-
- /* keep track of this node's RNA "base" path (the part of the pat identifying the node)
- * if the old nodetree has animation data which potentially covers this node
- */
- if (wgroup->adt) {
- PointerRNA ptr;
- char *path;
-
- RNA_pointer_create(&wgroup->id, &RNA_Node, node, &ptr);
- path = RNA_path_from_ID_to_struct(&ptr);
+ bNodeSocketTemplate *sockdef;
+ /* bNodeSocket *sock; */ /* UNUSED */
+
+ if(ntype->inputs) {
+ sockdef= ntype->inputs;
+ while(sockdef->type != -1) {
+ /* sock = */ node_add_input_from_template(ntree, node, sockdef);
- if (path)
- BLI_addtail(&anim_basepaths, BLI_genericNodeN(path));
- }
-
- /* migrate node */
- BLI_remlink(&wgroup->nodes, node);
- BLI_addtail(&ntree->nodes, node);
-
- node->locx+= gnode->locx;
- node->locy+= gnode->locy;
-
- node->flag |= NODE_SELECT;
- }
-
- /* restore external links to and from the gnode */
- for(link= ntree->links.first; link; link= link->next) {
- if (link->fromnode==gnode) {
- if (link->fromsock->groupsock) {
- bNodeSocket *gsock= link->fromsock->groupsock;
- if (gsock->link) {
- if (gsock->link->fromnode) {
- /* NB: using the new internal copies here! the groupsock pointer still maps to the old tree */
- link->fromnode = (gsock->link->fromnode ? gsock->link->fromnode->new_node : NULL);
- link->fromsock = gsock->link->fromsock->new_sock;
- }
- else {
- /* group output directly maps to group input */
- bNodeSocket *insock= find_group_node_input(gnode, gsock->link->fromsock);
- if (insock->link) {
- link->fromnode = insock->link->fromnode;
- link->fromsock = insock->link->fromsock;
- }
- }
- }
- else {
- /* constant group output: copy the stack value to the external socket.
- * the link is kept here until all possible external users have been fixed.
- */
- QUATCOPY(link->tosock->ns.vec, gsock->ns.vec);
- }
- }
+ sockdef++;
}
}
- /* remove internal output links, these are not used anymore */
- for(link=wgroup->links.first; link; link= linkn) {
- linkn = link->next;
- if (!link->tonode)
- nodeRemLink(wgroup, link);
- }
- /* restore links from internal nodes */
- for(link= wgroup->links.first; link; link= link->next) {
- /* indicates link to group input */
- if (!link->fromnode) {
- /* NB: can't use find_group_node_input here,
- * because gnode sockets still point to the old tree!
- */
- bNodeSocket *insock;
- for (insock= gnode->inputs.first; insock; insock= insock->next)
- if (insock->groupsock->new_sock == link->fromsock)
- break;
- if (insock->link) {
- link->fromnode = insock->link->fromnode;
- link->fromsock = insock->link->fromsock;
- }
- else {
- /* uses group constant input. copy the input value and remove the dead link. */
- QUATCOPY(link->tosock->ns.vec, insock->ns.vec);
- nodeRemLink(wgroup, link);
- }
- }
- }
-
- /* add internal links to the ntree */
- for(link= wgroup->links.first; link; link= linkn) {
- linkn= link->next;
- BLI_remlink(&wgroup->links, link);
- BLI_addtail(&ntree->links, link);
- }
-
- /* and copy across the animation */
- if (wgroup->adt) {
- LinkData *ld, *ldn=NULL;
- 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);
-
- /* now perform the moving */
- BKE_animdata_separate_by_basepath(&wgroup->id, &ntree->id, &anim_basepaths);
-
- /* paths + their wrappers need to be freed */
- for (ld = anim_basepaths.first; ld; ld = ldn) {
- ldn = ld->next;
+ if(ntype->outputs) {
+ sockdef= ntype->outputs;
+ while(sockdef->type != -1) {
+ /* sock = */ node_add_output_from_template(ntree, node, sockdef);
- MEM_freeN(ld->data);
- BLI_freelinkN(&anim_basepaths, ld);
- }
-
- /* free temp action too */
- free_libblock(&G.main->action, waction);
- }
-
- /* delete the group instance. this also removes old input links! */
- nodeFreeNode(ntree, gnode);
-
- /* free the group tree (takes care of user count) */
- free_libblock(&G.main->nodetree, wgroup);
-
- /* solve order goes fine, but the level tags not... doing it twice works for now. solve this once */
- /* XXX is this still necessary with new groups? it may have been caused by non-updated sock->link pointers. lukas */
- ntreeSolveOrder(ntree);
- ntreeSolveOrder(ntree);
-
- return 1;
-}
-
-void nodeGroupCopy(bNode *gnode)
-{
- bNodeSocket *sock;
-
- gnode->id->us--;
- gnode->id= (ID *)ntreeCopyTree((bNodeTree *)gnode->id);
-
- /* new_sock was set in nodeCopyNode */
- for(sock=gnode->inputs.first; sock; sock=sock->next)
- if(sock->groupsock)
- sock->groupsock= sock->groupsock->new_sock;
-
- for(sock=gnode->outputs.first; sock; sock=sock->next)
- if(sock->groupsock)
- sock->groupsock= sock->groupsock->new_sock;
-}
-
-bNodeSocket *nodeGroupAddSocket(bNodeTree *ngroup, const char *name, int type, int in_out)
-{
- bNodeSocket *gsock = MEM_callocN(sizeof(bNodeSocket), "bNodeSocket");
-
- strncpy(gsock->name, name, sizeof(gsock->name));
- gsock->type = type;
- gsock->ns.sockettype = type;
- gsock->ns.min = INT_MIN;
- gsock->ns.max = INT_MAX;
- zero_v4(gsock->ns.vec);
- gsock->ns.data = NULL;
- gsock->flag = 0;
-
- gsock->next = gsock->prev = NULL;
- gsock->new_sock = NULL;
- gsock->link = NULL;
- gsock->ns.data = NULL;
- /* assign new unique index */
- gsock->own_index = ngroup->cur_index++;
- gsock->limit = (in_out==SOCK_IN ? 0xFFF : 1);
-
- BLI_addtail(in_out==SOCK_IN ? &ngroup->inputs : &ngroup->outputs, gsock);
-
- return gsock;
-}
-
-bNodeSocket *nodeGroupExposeSocket(bNodeTree *ngroup, bNodeSocket *sock, int in_out)
-{
- bNodeSocket *gsock= nodeGroupAddSocket(ngroup, sock->name, sock->type, in_out);
- /* initialize the default socket value */
- QUATCOPY(gsock->ns.vec, sock->ns.vec);
- return gsock;
-}
-
-void nodeGroupExposeAllSockets(bNodeTree *ngroup)
-{
- bNode *node;
- bNodeSocket *sock, *gsock;
-
- for (node=ngroup->nodes.first; node; node=node->next) {
- for (sock=node->inputs.first; sock; sock=sock->next) {
- if (!sock->link && !(sock->flag & SOCK_HIDDEN)) {
- gsock = nodeGroupAddSocket(ngroup, sock->name, sock->type, SOCK_IN);
- /* initialize the default socket value */
- QUATCOPY(gsock->ns.vec, sock->ns.vec);
- sock->link = nodeAddLink(ngroup, NULL, gsock, node, sock);
- }
- }
- for (sock=node->outputs.first; sock; sock=sock->next) {
- if (nodeCountSocketLinks(ngroup, sock)==0 && !(sock->flag & SOCK_HIDDEN)) {
- gsock = nodeGroupAddSocket(ngroup, sock->name, sock->type, SOCK_OUT);
- /* initialize the default socket value */
- QUATCOPY(gsock->ns.vec, sock->ns.vec);
- gsock->link = nodeAddLink(ngroup, node, sock, NULL, gsock);
- }
- }
- }
-}
-
-void nodeGroupRemoveSocket(bNodeTree *ngroup, bNodeSocket *gsock, int in_out)
-{
- nodeRemSocketLinks(ngroup, gsock);
- switch (in_out) {
- case SOCK_IN: BLI_remlink(&ngroup->inputs, gsock); break;
- case SOCK_OUT: BLI_remlink(&ngroup->outputs, gsock); break;
- }
- MEM_freeN(gsock);
-}
-
-/* ************** Add stuff ********** */
-void nodeAddSockets(bNode *node, bNodeType *ntype)
-{
- if (node->type==NODE_GROUP) {
- bNodeTree *ntree= (bNodeTree*)node->id;
- if (ntree) {
- bNodeSocket *gsock;
- for (gsock=ntree->inputs.first; gsock; gsock=gsock->next)
- node_add_group_socket(&node->inputs, gsock);
- for (gsock=ntree->outputs.first; gsock; gsock=gsock->next)
- node_add_group_socket(&node->outputs, gsock);
- }
- }
- else {
- bNodeSocketType *stype;
-
- if(ntype->inputs) {
- stype= ntype->inputs;
- while(stype->type != -1) {
- node_add_socket_type(&node->inputs, stype);
- stype++;
- }
- }
- if(ntype->outputs) {
- stype= ntype->outputs;
- while(stype->type != -1) {
- node_add_socket_type(&node->outputs, stype);
- stype++;
- }
+ sockdef++;
}
}
}
@@ -945,65 +321,40 @@ void nodeUniqueName(bNodeTree *ntree, bNode *node)
BLI_uniquename(&ntree->nodes, node, "Node", '.', offsetof(bNode, name), sizeof(node->name));
}
-bNode *nodeAddNodeType(bNodeTree *ntree, int type, bNodeTree *ngroup, ID *id)
+bNode *nodeAddNode(bNodeTree *ntree, struct bNodeTemplate *ntemp)
{
- bNode *node= NULL;
- bNodeType *ntype= NULL;
-
- if (ngroup && BLI_findindex(&G.main->nodetree, ngroup)==-1) {
- printf("nodeAddNodeType() error: '%s' not in main->nodetree\n", ngroup->id.name);
- return NULL;
- }
-
- if(type>=NODE_DYNAMIC_MENU) {
- int a=0, idx= type-NODE_DYNAMIC_MENU;
- ntype= ntree->alltypes.first;
- while(ntype) {
- if(ntype->type==NODE_DYNAMIC) {
- if(a==idx)
- break;
- a++;
- }
- ntype= ntype->next;
- }
- } else
- ntype= node_get_type(ntree, type, id);
-
+ bNode *node;
+ bNodeType *ntype;
+
+ ntype= node_get_type(ntree, ntemp->type);
if(ntype == NULL) {
- printf("nodeAddNodeType() error: '%d' type invalid\n", type);
+ printf("nodeAddNodeType() error: '%d' type invalid\n", ntemp->type);
return NULL;
}
-
- node= MEM_callocN(sizeof(bNode), "new node");
- BLI_addtail(&ntree->nodes, node);
- node->typeinfo= ntype;
- if(type>=NODE_DYNAMIC_MENU)
- node->custom2= type; /* for node_dynamic_init */
-
- if(ngroup)
- BLI_strncpy(node->name, ngroup->id.name+2, NODE_MAXSTR);
- else if(type>NODE_DYNAMIC_MENU) {
- BLI_strncpy(node->name, ntype->id->name+2, NODE_MAXSTR);
- }
- else
- BLI_strncpy(node->name, ntype->name, NODE_MAXSTR);
-
- nodeUniqueName(ntree, node);
+ /* validity check */
+ if (!nodeValid(ntree, ntemp))
+ return NULL;
+ node= MEM_callocN(sizeof(bNode), "new node");
node->type= ntype->type;
+ node->typeinfo= ntype;
node->flag= NODE_SELECT|ntype->flag;
node->width= ntype->width;
- node->miniwidth= 42.0f; /* small value only, allows print of first chars */
-
- if(type==NODE_GROUP)
- node->id= (ID *)ngroup;
-
- /* need init handler later? */
- /* got it-bob*/
+ node->miniwidth= 42.0f;
+ node->height= ntype->height;
+
+ node_add_sockets_from_type(ntree, node, ntype);
+
if(ntype->initfunc!=NULL)
- ntype->initfunc(node);
+ 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);
- nodeAddSockets(node, ntype);
+ ntree->update |= NTREE_UPDATE_NODES;
return node;
}
@@ -1011,9 +362,9 @@ bNode *nodeAddNodeType(bNodeTree *ntree, int type, bNodeTree *ngroup, ID *id)
void nodeMakeDynamicType(bNode *node)
{
/* find SH_DYNAMIC_NODE ntype */
- bNodeType *ntype= node_all_shaders.first;
+ bNodeType *ntype= ntreeGetType(NTREE_SHADER)->node_types.first;
while(ntype) {
- if(ntype->type==NODE_DYNAMIC && ntype->id==NULL)
+ if(ntype->type==NODE_DYNAMIC)
break;
ntype= ntype->next;
}
@@ -1023,17 +374,11 @@ void nodeMakeDynamicType(bNode *node)
/*node->typeinfo= MEM_dupallocN(ntype);*/
bNodeType *newtype= MEM_callocN(sizeof(bNodeType), "dynamic bNodeType");
*newtype= *ntype;
- newtype->name= BLI_strdup(ntype->name);
+ strcpy(newtype->name, ntype->name);
node->typeinfo= newtype;
}
}
-void nodeUpdateType(bNodeTree *ntree, bNode* node, bNodeType *ntype)
-{
- verify_socket_list(ntree, &node->inputs, ntype->inputs);
- verify_socket_list(ntree, &node->outputs, ntype->outputs);
-}
-
/* keep socket listorder identical, for copying links */
/* ntree is the target tree */
bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node)
@@ -1045,19 +390,33 @@ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node)
nodeUniqueName(ntree, nnode);
BLI_addtail(&ntree->nodes, nnode);
-
+
BLI_duplicatelist(&nnode->inputs, &node->inputs);
oldsock= node->inputs.first;
for(sock= nnode->inputs.first; sock; sock= sock->next, oldsock= oldsock->next) {
oldsock->new_sock= sock;
+ sock->stack_index= 0;
+
+ sock->default_value = (oldsock->default_value ? MEM_dupallocN(oldsock->default_value) : NULL);
+
+ /* XXX some compositor node (e.g. image, render layers) still store
+ * some persistent buffer data here, need to clear this to avoid dangling pointers.
+ */
+ sock->cache = NULL;
}
BLI_duplicatelist(&nnode->outputs, &node->outputs);
oldsock= node->outputs.first;
for(sock= nnode->outputs.first; sock; sock= sock->next, oldsock= oldsock->next) {
- sock->stack_index= 0;
- sock->ns.data= NULL;
oldsock->new_sock= sock;
+ sock->stack_index= 0;
+
+ sock->default_value = (oldsock->default_value ? MEM_dupallocN(oldsock->default_value) : NULL);
+
+ /* XXX some compositor node (e.g. image, render layers) still store
+ * some persistent buffer data here, need to clear this to avoid dangling pointers.
+ */
+ sock->cache = NULL;
}
/* don't increase node->id users, freenode doesn't decrement either */
@@ -1069,10 +428,11 @@ bNode *nodeCopyNode(struct bNodeTree *ntree, struct bNode *node)
nnode->new_node= NULL;
nnode->preview= NULL;
+ ntree->update |= NTREE_UPDATE_NODES;
+
return nnode;
}
-/* fromsock and tosock can be NULL */
/* also used via rna api, so we check for proper input output direction */
bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock, bNode *tonode, bNodeSocket *tosock)
{
@@ -1095,6 +455,21 @@ bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock,
from= -1; /* OK but flip */
}
}
+ else {
+ /* check tree sockets */
+ for(sock= ntree->inputs.first; sock; sock= sock->next)
+ if(sock==fromsock)
+ break;
+ if(sock)
+ from= 1; /* OK */
+ else {
+ for(sock= ntree->outputs.first; sock; sock= sock->next)
+ if(sock==fromsock)
+ break;
+ if(sock)
+ from= -1; /* OK but flip */
+ }
+ }
if(tonode) {
for(sock= tonode->inputs.first; sock; sock= sock->next)
if(sock==tosock)
@@ -1109,8 +484,22 @@ bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock,
to= -1; /* OK but flip */
}
}
+ else {
+ /* check tree sockets */
+ for(sock= ntree->outputs.first; sock; sock= sock->next)
+ if(sock==tosock)
+ break;
+ if(sock)
+ to= 1; /* OK */
+ else {
+ for(sock= ntree->inputs.first; sock; sock= sock->next)
+ if(sock==tosock)
+ break;
+ if(sock)
+ to= -1; /* OK but flip */
+ }
+ }
- /* this allows NULL sockets to work */
if(from >= 0 && to >= 0) {
link= MEM_callocN(sizeof(bNodeLink), "link");
BLI_addtail(&ntree->links, link);
@@ -1128,6 +517,8 @@ bNodeLink *nodeAddLink(bNodeTree *ntree, bNode *fromnode, bNodeSocket *fromsock,
link->tosock= fromsock;
}
+ ntree->update |= NTREE_UPDATE_LINKS;
+
return link;
}
@@ -1137,6 +528,8 @@ void nodeRemLink(bNodeTree *ntree, bNodeLink *link)
if(link->tosock)
link->tosock->link= NULL;
MEM_freeN(link);
+
+ ntree->update |= NTREE_UPDATE_LINKS;
}
void nodeRemSocketLinks(bNodeTree *ntree, bNodeSocket *sock)
@@ -1149,26 +542,73 @@ void nodeRemSocketLinks(bNodeTree *ntree, bNodeSocket *sock)
nodeRemLink(ntree, link);
}
}
+
+ ntree->update |= NTREE_UPDATE_LINKS;
}
+/* transforms node location to area coords */
+void nodeSpaceCoords(bNode *node, float *locx, float *locy)
+{
+ if (node->parent) {
+ nodeSpaceCoords(node->parent, locx, locy);
+ *locx += node->locx;
+ *locy += node->locy;
+ }
+ else {
+ *locx = node->locx;
+ *locy = node->locy;
+ }
+}
-bNodeTree *ntreeAddTree(const char *name, int type, const short is_group)
+void nodeAttachNode(bNode *node, bNode *parent)
{
- bNodeTree *ntree;
+ float parentx, parenty;
+
+ node->parent = parent;
+ /* transform to parent space */
+ nodeSpaceCoords(parent, &parentx, &parenty);
+ node->locx -= parentx;
+ node->locy -= parenty;
+}
- if (is_group)
- ntree= alloc_libblock(&G.main->nodetree, ID_NT, name);
- else {
+void nodeDetachNode(struct bNode *node)
+{
+ float parentx, parenty;
+
+ if (node->parent) {
+ /* transform to "global" (area) space */
+ nodeSpaceCoords(node->parent, &parentx, &parenty);
+ node->locx += parentx;
+ node->locy += parenty;
+ node->parent = NULL;
+ }
+}
+
+bNodeTree *ntreeAddTree(const char *name, int type, int nodetype)
+{
+ bNodeTree *ntree;
+ bNodeType *ntype;
+
+ /* trees are created as local trees if they of compositor, material or texture type,
+ * node groups and other tree types are created as library data.
+ */
+ if (ELEM3(type, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE) && nodetype==0) {
ntree= MEM_callocN(sizeof(bNodeTree), "new node tree");
*( (short *)ntree->id.name )= ID_NT; /* not "type", as that is ntree->type */
BLI_strncpy(ntree->id.name+2, name, sizeof(ntree->id.name));
}
-
+ else
+ ntree= alloc_libblock(&G.main->nodetree, ID_NT, name);
+
ntree->type= type;
- ntree->alltypes.first = NULL;
- ntree->alltypes.last = NULL;
-
+ ntree->nodetype = nodetype;
+
ntreeInitTypes(ntree);
+
+ ntype = node_get_type(ntree, ntree->nodetype);
+ if (ntype && ntype->inittreefunc)
+ ntype->inittreefunc(ntree);
+
return ntree;
}
@@ -1180,7 +620,7 @@ bNodeTree *ntreeAddTree(const char *name, int type, const short is_group)
bNodeTree *ntreeCopyTree(bNodeTree *ntree)
{
bNodeTree *newtree;
- bNode *node, *nnode, *last;
+ bNode *node /*, *nnode */ /* UNUSED */, *last;
bNodeLink *link;
bNodeSocket *gsock, *oldgsock;
@@ -1199,9 +639,7 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree)
id_us_plus((ID *)newtree->gpd);
/* in case a running nodetree is copied */
- newtree->init &= ~(NTREE_EXEC_INIT);
- newtree->threadstack= NULL;
- newtree->stack= NULL;
+ newtree->execdata= NULL;
newtree->nodes.first= newtree->nodes.last= NULL;
newtree->links.first= newtree->links.last= NULL;
@@ -1209,8 +647,11 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree)
last = ntree->nodes.last;
for(node= ntree->nodes.first; node; node= node->next) {
node->new_node= NULL;
- nnode= nodeCopyNode(newtree, node); /* sets node->new */
- if(node==last) break;
+ /* nnode= */ nodeCopyNode(newtree, node); /* sets node->new */
+
+ /* make sure we don't copy new nodes again! */
+ if (node==last)
+ break;
}
/* socket definition for group usage */
@@ -1218,14 +659,15 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree)
for(gsock= newtree->inputs.first, oldgsock= ntree->inputs.first; gsock; gsock=gsock->next, oldgsock=oldgsock->next) {
oldgsock->new_sock= gsock;
gsock->groupsock = (oldgsock->groupsock ? oldgsock->groupsock->new_sock : NULL);
+ gsock->default_value = (oldgsock->default_value ? MEM_dupallocN(oldgsock->default_value) : NULL);
}
-
BLI_duplicatelist(&newtree->outputs, &ntree->outputs);
for(gsock= newtree->outputs.first, oldgsock= ntree->outputs.first; gsock; gsock=gsock->next, oldgsock=oldgsock->next) {
oldgsock->new_sock= gsock;
gsock->groupsock = (oldgsock->groupsock ? oldgsock->groupsock->new_sock : NULL);
+ gsock->default_value = (oldgsock->default_value ? MEM_dupallocN(oldgsock->default_value) : NULL);
}
-
+
/* copy links */
BLI_duplicatelist(&newtree->links, &ntree->links);
for(link= newtree->links.first; link; link= link->next) {
@@ -1237,7 +679,13 @@ bNodeTree *ntreeCopyTree(bNodeTree *ntree)
if (link->tosock)
link->tosock->link = link;
}
-
+
+ /* update node->parent pointers */
+ for (node=newtree->nodes.first; node; node=node->next) {
+ if (node->parent)
+ node->parent = node->parent->new_node;
+ }
+
return newtree;
}
@@ -1256,7 +704,7 @@ void ntreeSwitchID(bNodeTree *ntree, ID *id_from, ID *id_to)
/* *************** preview *********** */
/* if node->preview, then we assume the rect to exist */
-static void node_free_preview(bNode *node)
+void nodeFreePreview(bNode *node)
{
if(node->preview) {
if(node->preview->rect)
@@ -1360,7 +808,6 @@ void nodeAddToPreview(bNode *node, float *col, int x, int y, int do_manage)
}
}
-
/* ************** Free stuff ********** */
/* goes over entire tree */
@@ -1395,50 +842,84 @@ void nodeUnlinkNode(bNodeTree *ntree, bNode *node)
}
}
-static void composit_free_node_cache(bNode *node)
+static void node_unlink_attached(bNodeTree *ntree, bNode *parent)
{
- bNodeSocket *sock;
-
- for(sock= node->outputs.first; sock; sock= sock->next) {
- if(sock->ns.data) {
- free_compbuf(sock->ns.data);
- sock->ns.data= NULL;
- }
+ bNode *node;
+ for (node=ntree->nodes.first; node; node=node->next) {
+ if (node->parent == parent)
+ nodeDetachNode(node);
}
}
void nodeFreeNode(bNodeTree *ntree, bNode *node)
{
+ bNodeTreeType *treetype= ntreeGetType(ntree->type);
+ bNodeSocket *sock, *nextsock;
+
+ /* remove all references to this node */
nodeUnlinkNode(ntree, node);
+ node_unlink_attached(ntree, node);
+
BLI_remlink(&ntree->nodes, node);
/* since it is called while free database, node->id is undefined */
- if(ntree->type==NTREE_COMPOSIT)
- composit_free_node_cache(node);
- BLI_freelistN(&node->inputs);
- BLI_freelistN(&node->outputs);
+ if (treetype->free_node_cache)
+ treetype->free_node_cache(ntree, node);
- node_free_preview(node);
+ for (sock=node->inputs.first; sock; sock = nextsock) {
+ nextsock = sock->next;
+ if (sock->default_value)
+ MEM_freeN(sock->default_value);
+ MEM_freeN(sock);
+ }
+ for (sock=node->outputs.first; sock; sock = nextsock) {
+ nextsock = sock->next;
+ if (sock->default_value)
+ MEM_freeN(sock->default_value);
+ MEM_freeN(sock);
+ }
+
+ nodeFreePreview(node);
if(node->typeinfo && node->typeinfo->freestoragefunc) {
node->typeinfo->freestoragefunc(node);
}
MEM_freeN(node);
+
+ ntree->update |= NTREE_UPDATE_NODES;
}
/* do not free ntree itself here, free_libblock calls this function too */
void ntreeFreeTree(bNodeTree *ntree)
{
bNode *node, *next;
+ bNodeSocket *sock;
if(ntree==NULL) return;
- ntreeEndExecTree(ntree); /* checks for if it is still initialized */
+ /* XXX hack! node trees should not store execution graphs at all.
+ * This should be removed when old tree types no longer require it.
+ * Currently the execution data for texture nodes remains in the tree
+ * after execution, until the node tree is updated or freed.
+ */
+ if (ntree->execdata) {
+ switch (ntree->type) {
+ case NTREE_COMPOSIT:
+ ntreeCompositEndExecTree(ntree->execdata, 1);
+ break;
+ case NTREE_SHADER:
+ ntreeShaderEndExecTree(ntree->execdata, 1);
+ break;
+ case NTREE_TEXTURE:
+ ntreeTexEndExecTree(ntree->execdata, 1);
+ break;
+ }
+ }
BKE_free_animdata((ID *)ntree);
-
+
id_us_min((ID *)ntree->gpd);
BLI_freelistN(&ntree->links); /* do first, then unlink_node goes fast */
@@ -1448,25 +929,120 @@ void ntreeFreeTree(bNodeTree *ntree)
nodeFreeNode(ntree, node);
}
+ for (sock=ntree->inputs.first; sock; sock=sock->next)
+ if (sock->default_value)
+ MEM_freeN(sock->default_value);
BLI_freelistN(&ntree->inputs);
+ for (sock=ntree->outputs.first; sock; sock=sock->next)
+ if (sock->default_value)
+ MEM_freeN(sock->default_value);
BLI_freelistN(&ntree->outputs);
}
void ntreeFreeCache(bNodeTree *ntree)
{
- bNode *node;
+ bNodeTreeType *treetype;
if(ntree==NULL) return;
+
+ treetype= ntreeGetType(ntree->type);
+ if (treetype->free_cache)
+ treetype->free_cache(ntree);
+}
- if(ntree->type==NTREE_COMPOSIT)
- for(node= ntree->nodes.first; node; node= node->next)
- composit_free_node_cache(node);
+void ntreeSetOutput(bNodeTree *ntree)
+{
+ bNode *node;
+ /* find the active outputs, might become tree type dependant handler */
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) {
+ bNode *tnode;
+ int output= 0;
+
+ /* we need a check for which output node should be tagged like this, below an exception */
+ if(node->type==CMP_NODE_OUTPUT_FILE)
+ continue;
+
+ /* there is more types having output class, each one is checked */
+ for(tnode= ntree->nodes.first; tnode; tnode= tnode->next) {
+ if(tnode->typeinfo->nclass==NODE_CLASS_OUTPUT) {
+
+ if(ntree->type==NTREE_COMPOSIT) {
+
+ /* same type, exception for viewer */
+ if(tnode->type==node->type ||
+ (ELEM(tnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) &&
+ ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))) {
+ if(tnode->flag & NODE_DO_OUTPUT) {
+ output++;
+ if(output>1)
+ tnode->flag &= ~NODE_DO_OUTPUT;
+ }
+ }
+ }
+ else {
+ /* same type */
+ if(tnode->type==node->type) {
+ if(tnode->flag & NODE_DO_OUTPUT) {
+ output++;
+ if(output>1)
+ tnode->flag &= ~NODE_DO_OUTPUT;
+ }
+ }
+ }
+ }
+ }
+ if(output==0)
+ node->flag |= NODE_DO_OUTPUT;
+ }
+ }
+
+ /* here we could recursively set which nodes have to be done,
+ might be different for editor or for "real" use... */
+}
+
+typedef struct MakeLocalCallData {
+ ID *group_id;
+ ID *new_id;
+ int lib, local;
+} MakeLocalCallData;
+
+static void ntreeMakeLocal_CheckLocal(void *calldata, ID *owner_id, bNodeTree *ntree)
+{
+ MakeLocalCallData *cd= (MakeLocalCallData*)calldata;
+ bNode *node;
+
+ /* find if group is in tree */
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->id == cd->group_id) {
+ if(owner_id->lib) cd->lib= 1;
+ else cd->local= 1;
+ }
+ }
+}
+
+static void ntreeMakeLocal_LinkNew(void *calldata, ID *owner_id, bNodeTree *ntree)
+{
+ MakeLocalCallData *cd= (MakeLocalCallData*)calldata;
+ bNode *node;
+
+ /* find if group is in tree */
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->id == cd->group_id) {
+ if(owner_id->lib==NULL) {
+ node->id= cd->new_id;
+ cd->new_id->us++;
+ cd->group_id->us--;
+ }
+ }
+ }
}
void ntreeMakeLocal(bNodeTree *ntree)
{
- int local=0, lib=0;
+ bNodeTreeType *treetype= ntreeGetType(ntree->type);
+ MakeLocalCallData cd;
/* - only lib users: do nothing
* - only local users: set flag
@@ -1482,131 +1058,139 @@ void ntreeMakeLocal(bNodeTree *ntree)
}
/* now check users of groups... again typedepending, callback... */
- if(ntree->type==NTREE_SHADER) {
- Material *ma;
- for(ma= G.main->mat.first; ma; ma= ma->id.next) {
- if(ma->nodetree) {
- bNode *node;
-
- /* find if group is in tree */
- for(node= ma->nodetree->nodes.first; node; node= node->next) {
- if(node->id == (ID *)ntree) {
- if(ma->id.lib) lib= 1;
- else local= 1;
- }
- }
- }
- }
- }
- else if(ntree->type==NTREE_COMPOSIT) {
- Scene *sce;
- for(sce= G.main->scene.first; sce; sce= sce->id.next) {
- if(sce->nodetree) {
- bNode *node;
-
- /* find if group is in tree */
- for(node= sce->nodetree->nodes.first; node; node= node->next) {
- if(node->id == (ID *)ntree) {
- if(sce->id.lib) lib= 1;
- else local= 1;
- }
- }
- }
- }
- }
- else if(ntree->type==NTREE_TEXTURE) {
- Tex *tx;
- for(tx= G.main->tex.first; tx; tx= tx->id.next) {
- if(tx->nodetree) {
- bNode *node;
-
- /* find if group is in tree */
- for(node= tx->nodetree->nodes.first; node; node= node->next) {
- if(node->id == (ID *)ntree) {
- if(tx->id.lib) lib= 1;
- else local= 1;
- }
- }
- }
- }
- }
+ cd.group_id = &ntree->id;
+ cd.new_id = NULL;
+ cd.local = 0;
+ cd.lib = 0;
+
+ treetype->foreach_nodetree(G.main, &cd, &ntreeMakeLocal_CheckLocal);
/* if all users are local, we simply make tree local */
- if(local && lib==0) {
+ if(cd.local && cd.lib==0) {
ntree->id.lib= NULL;
ntree->id.flag= LIB_LOCAL;
new_id(NULL, (ID *)ntree, NULL);
}
- else if(local && lib) {
+ else if(cd.local && cd.lib) {
/* this is the mixed case, we copy the tree and assign it to local users */
bNodeTree *newtree= ntreeCopyTree(ntree);
newtree->id.us= 0;
- if(ntree->type==NTREE_SHADER) {
- Material *ma;
- for(ma= G.main->mat.first; ma; ma= ma->id.next) {
- if(ma->nodetree) {
- bNode *node;
-
- /* find if group is in tree */
- for(node= ma->nodetree->nodes.first; node; node= node->next) {
- if(node->id == (ID *)ntree) {
- if(ma->id.lib==NULL) {
- node->id= &newtree->id;
- newtree->id.us++;
- ntree->id.us--;
- }
- }
- }
- }
- }
- }
- else if(ntree->type==NTREE_COMPOSIT) {
- Scene *sce;
- for(sce= G.main->scene.first; sce; sce= sce->id.next) {
- if(sce->nodetree) {
- bNode *node;
-
- /* find if group is in tree */
- for(node= sce->nodetree->nodes.first; node; node= node->next) {
- if(node->id == (ID *)ntree) {
- if(sce->id.lib==NULL) {
- node->id= &newtree->id;
- newtree->id.us++;
- ntree->id.us--;
- }
- }
- }
- }
- }
- }
- else if(ntree->type==NTREE_TEXTURE) {
- Tex *tx;
- for(tx= G.main->tex.first; tx; tx= tx->id.next) {
- if(tx->nodetree) {
- bNode *node;
-
- /* find if group is in tree */
- for(node= tx->nodetree->nodes.first; node; node= node->next) {
- if(node->id == (ID *)ntree) {
- if(tx->id.lib==NULL) {
- node->id= &newtree->id;
- newtree->id.us++;
- ntree->id.us--;
- }
- }
- }
- }
+
+ cd.new_id = &newtree->id;
+ treetype->foreach_nodetree(G.main, &cd, &ntreeMakeLocal_LinkNew);
+ }
+}
+
+int ntreeNodeExists(bNodeTree *ntree, bNode *testnode)
+{
+ bNode *node= ntree->nodes.first;
+ for(; node; node= node->next)
+ if(node==testnode)
+ return 1;
+ return 0;
+}
+
+int ntreeOutputExists(bNode *node, bNodeSocket *testsock)
+{
+ bNodeSocket *sock= node->outputs.first;
+ for(; sock; sock= sock->next)
+ if(sock==testsock)
+ return 1;
+ return 0;
+}
+
+/* returns localized tree for execution in threads */
+bNodeTree *ntreeLocalize(bNodeTree *ntree)
+{
+ bNodeTreeType *ntreetype= ntreeGetType(ntree->type);
+
+ bNodeTree *ltree;
+ bNode *node;
+
+ bAction *action_backup= NULL, *tmpact_backup= NULL;
+
+ /* Workaround for copying an action on each render!
+ * set action to NULL so animdata actions dont get copied */
+ AnimData *adt= BKE_animdata_from_id(&ntree->id);
+
+ if(adt) {
+ action_backup= adt->action;
+ tmpact_backup= adt->tmpact;
+
+ adt->action= NULL;
+ adt->tmpact= NULL;
+ }
+
+ /* node copy func */
+ ltree= ntreeCopyTree(ntree);
+
+ if(adt) {
+ AnimData *ladt= BKE_animdata_from_id(&ltree->id);
+
+ adt->action= ladt->action= action_backup;
+ adt->tmpact= ladt->tmpact= tmpact_backup;
+
+ if(action_backup) action_backup->id.us++;
+ if(tmpact_backup) tmpact_backup->id.us++;
+
+ }
+ /* end animdata uglyness */
+
+ /* ensures only a single output node is enabled */
+ ntreeSetOutput(ntree);
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ /* store new_node pointer to original */
+ node->new_node->new_node= node;
+ }
+
+ if (ntreetype->localize)
+ ntreetype->localize(ltree, ntree);
+
+ return ltree;
+}
+
+/* sync local composite with real tree */
+/* local tree is supposed to be running, be careful moving previews! */
+/* is called by jobs manager, outside threads, so it doesnt happen during draw */
+void ntreeLocalSync(bNodeTree *localtree, bNodeTree *ntree)
+{
+ bNodeTreeType *ntreetype= ntreeGetType(ntree->type);
+
+ if (ntreetype->local_sync)
+ ntreetype->local_sync(localtree, ntree);
+}
+
+/* merge local tree results back, and free local tree */
+/* we have to assume the editor already changed completely */
+void ntreeLocalMerge(bNodeTree *localtree, bNodeTree *ntree)
+{
+ bNodeTreeType *ntreetype= ntreeGetType(ntree->type);
+ bNode *lnode;
+
+ /* move over the compbufs and previews */
+ for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) {
+ if(ntreeNodeExists(ntree, lnode->new_node)) {
+ if(lnode->preview && lnode->preview->rect) {
+ nodeFreePreview(lnode->new_node);
+ lnode->new_node->preview= lnode->preview;
+ lnode->preview= NULL;
}
}
}
-}
+ if (ntreetype->local_merge)
+ ntreetype->local_merge(localtree, ntree);
+
+ ntreeFreeTree(localtree);
+ MEM_freeN(localtree);
+}
/* ************ find stuff *************** */
-static int ntreeHasType(bNodeTree *ntree, int type)
+int ntreeHasType(bNodeTree *ntree, int type)
{
bNode *node;
@@ -1770,7 +1354,7 @@ void ntreeSocketUseFlags(bNodeTree *ntree)
/* ************** dependency stuff *********** */
/* node is guaranteed to be not checked before */
-static int node_recurs_check(bNode *node, bNode ***nsort)
+static int node_get_deplist_recurs(bNode *node, bNode ***nsort)
{
bNode *fromnode;
bNodeSocket *sock;
@@ -1778,646 +1362,146 @@ static int node_recurs_check(bNode *node, bNode ***nsort)
node->done= 1;
+ /* check linked nodes */
for(sock= node->inputs.first; sock; sock= sock->next) {
if(sock->link) {
fromnode= sock->link->fromnode;
if(fromnode) {
if (fromnode->done==0)
- fromnode->level= node_recurs_check(fromnode, nsort);
+ fromnode->level= node_get_deplist_recurs(fromnode, nsort);
if (fromnode->level <= level)
level = fromnode->level - 1;
}
}
}
- **nsort= node;
- (*nsort)++;
- return level;
-}
-
-
-static void ntreeSetOutput(bNodeTree *ntree)
-{
- bNode *node;
-
- /* find the active outputs, might become tree type dependant handler */
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) {
- bNode *tnode;
- int output= 0;
-
- /* we need a check for which output node should be tagged like this, below an exception */
- if(node->type==CMP_NODE_OUTPUT_FILE)
- continue;
-
- /* there is more types having output class, each one is checked */
- for(tnode= ntree->nodes.first; tnode; tnode= tnode->next) {
- if(tnode->typeinfo->nclass==NODE_CLASS_OUTPUT) {
-
- if(ntree->type==NTREE_COMPOSIT) {
-
- /* same type, exception for viewer */
- if(tnode->type==node->type ||
- (ELEM(tnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) &&
- ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))) {
- if(tnode->flag & NODE_DO_OUTPUT) {
- output++;
- if(output>1)
- tnode->flag &= ~NODE_DO_OUTPUT;
- }
- }
- }
- else {
- /* same type */
- if(tnode->type==node->type) {
- if(tnode->flag & NODE_DO_OUTPUT) {
- output++;
- if(output>1)
- tnode->flag &= ~NODE_DO_OUTPUT;
- }
- }
- }
- }
- }
- if(output==0)
- node->flag |= NODE_DO_OUTPUT;
- }
+ /* check parent node */
+ if (node->parent) {
+ if (node->parent->done==0)
+ node->parent->level= node_get_deplist_recurs(node->parent, nsort);
+ if (node->parent->level <= level)
+ level = node->parent->level - 1;
}
- /* here we could recursively set which nodes have to be done,
- might be different for editor or for "real" use... */
+ if (nsort) {
+ **nsort= node;
+ (*nsort)++;
+ }
+
+ return level;
}
-void ntreeSolveOrder(bNodeTree *ntree)
+void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes)
{
- bNode *node, **nodesort, **nsort;
- bNodeSocket *sock;
- bNodeLink *link;
- int a, totnode=0;
+ bNode *node, **nsort;
+
+ *totnodes=0;
- /* the solve-order is called on each tree change, so we should be sure no exec can be running */
- ntreeEndExecTree(ntree);
-
- /* set links pointers the input sockets, to find dependencies */
/* first clear data */
for(node= ntree->nodes.first; node; node= node->next) {
node->done= 0;
- totnode++;
- for(sock= node->inputs.first; sock; sock= sock->next)
- sock->link= NULL;
+ (*totnodes)++;
}
- /* clear group socket links */
- for(sock= ntree->outputs.first; sock; sock= sock->next)
- sock->link= NULL;
- if(totnode==0)
+ if(*totnodes==0) {
+ *deplist = NULL;
return;
-
- for(link= ntree->links.first; link; link= link->next) {
- link->tosock->link= link;
}
- nsort= nodesort= MEM_callocN(totnode*sizeof(void *), "sorted node array");
+ nsort= *deplist= MEM_callocN((*totnodes)*sizeof(bNode*), "sorted node array");
/* recursive check */
for(node= ntree->nodes.first; node; node= node->next) {
if(node->done==0) {
- node->level= node_recurs_check(node, &nsort);
+ node->level= node_get_deplist_recurs(node, &nsort);
}
}
-
- /* re-insert nodes in order, first a paranoia check */
- for(a=0; a<totnode; a++) {
- if(nodesort[a]==NULL)
- break;
- }
- if(a<totnode)
- printf("sort error in node tree");
- else {
- ntree->nodes.first= ntree->nodes.last= NULL;
- for(a=0; a<totnode; a++)
- BLI_addtail(&ntree->nodes, nodesort[a]);
- }
-
- MEM_freeN(nodesort);
-
- ntreeSetOutput(ntree);
}
-
-/* Should be callback! */
-/* Do not call execs here */
-void NodeTagChanged(bNodeTree *ntree, bNode *node)
-{
- if(ntree->type==NTREE_COMPOSIT) {
- bNodeSocket *sock;
-
- for(sock= node->outputs.first; sock; sock= sock->next) {
- if(sock->ns.data) {
- //free_compbuf(sock->ns.data);
- //sock->ns.data= NULL;
- }
- }
- node->need_exec= 1;
- }
-}
-
-int NodeTagIDChanged(bNodeTree *ntree, ID *id)
-{
- int change = FALSE;
-
- if(ELEM(NULL, id, ntree))
- return change;
-
- if(ntree->type==NTREE_COMPOSIT) {
- bNode *node;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->id==id) {
- change= TRUE;
- NodeTagChanged(ntree, node);
- }
- }
- }
-
- return change;
-}
-
-
-
-/* ******************* executing ************* */
-
-/* for a given socket, find the actual stack entry */
-static bNodeStack *get_socket_stack(bNodeStack *stack, bNodeSocket *sock, bNodeStack **gin)
-{
- switch (sock->stack_type) {
- case SOCK_STACK_LOCAL:
- return stack + sock->stack_index;
- case SOCK_STACK_EXTERN:
- return (gin ? gin[sock->stack_index] : NULL);
- case SOCK_STACK_CONST:
- return sock->stack_ptr;
- }
- return NULL;
-}
-
-/* see notes at ntreeBeginExecTree */
-static void node_get_stack(bNode *node, bNodeStack *stack, bNodeStack **in, bNodeStack **out, bNodeStack **gin)
-{
- bNodeSocket *sock;
-
- /* build pointer stack */
- if (in) {
- for(sock= node->inputs.first; sock; sock= sock->next) {
- *(in++) = get_socket_stack(stack, sock, gin);
- }
- }
-
- if (out) {
- for(sock= node->outputs.first; sock; sock= sock->next) {
- *(out++) = get_socket_stack(stack, sock, gin);
- }
- }
-}
-
-static void node_group_execute(bNodeStack *stack, void *data, bNode *gnode, bNodeStack **in)
+static void ntree_update_link_pointers(bNodeTree *ntree)
{
bNode *node;
- bNodeTree *ntree= (bNodeTree *)gnode->id;
- bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
- bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
-
- if(ntree==NULL) return;
+ bNodeSocket *sock;
+ bNodeLink *link;
- stack+= gnode->stack_index;
-
+ /* first clear data */
for(node= ntree->nodes.first; node; node= node->next) {
- if(node->typeinfo->execfunc) {
- node_get_stack(node, stack, nsin, nsout, in);
-
- /* for groups, only execute outputs for edited group */
- if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) {
- if(node->type==CMP_NODE_OUTPUT_FILE || (gnode->flag & NODE_GROUP_EDIT))
- node->typeinfo->execfunc(data, node, nsin, nsout);
- }
- else
- node->typeinfo->execfunc(data, node, nsin, nsout);
- }
- }
-
- /* free internal buffers */
- if (ntree->type==NTREE_COMPOSIT) {
- bNodeSocket *sock;
- bNodeStack *ns;
-
- /* clear hasoutput on all local stack data,
- * only the group output will be used from now on
- */
- for (node=ntree->nodes.first; node; node=node->next) {
- for (sock=node->outputs.first; sock; sock=sock->next) {
- if (sock->stack_type==SOCK_STACK_LOCAL) {
- ns= get_socket_stack(stack, sock, in);
- ns->hasoutput = 0;
- }
- }
- }
- /* use the hasoutput flag to tag external sockets */
- for (sock=ntree->outputs.first; sock; sock=sock->next) {
- if (sock->stack_type==SOCK_STACK_LOCAL) {
- ns= get_socket_stack(stack, sock, in);
- ns->hasoutput = 1;
- }
- }
- /* now free all stacks that are not used from outside */
- for (node=ntree->nodes.first; node; node=node->next) {
- for (sock=node->outputs.first; sock; sock=sock->next) {
- if (sock->stack_type==SOCK_STACK_LOCAL ) {
- ns= get_socket_stack(stack, sock, in);
- if (ns->hasoutput==0 && ns->data) {
- free_compbuf(ns->data);
- ns->data = NULL;
- }
- }
- }
- }
+ for(sock= node->inputs.first; sock; sock= sock->next)
+ sock->link= NULL;
}
-}
+ /* clear socket links */
+ for(sock= ntree->outputs.first; sock; sock= sock->next)
+ sock->link= NULL;
-static int set_stack_indexes_default(bNode *node, int index)
-{
- bNodeSocket *sock;
-
- for (sock=node->inputs.first; sock; sock=sock->next) {
- if (sock->link && sock->link->fromsock) {
- sock->stack_type = sock->link->fromsock->stack_type;
- sock->stack_index = sock->link->fromsock->stack_index;
- sock->stack_ptr = sock->link->fromsock->stack_ptr;
- }
- else {
- sock->stack_type = SOCK_STACK_CONST;
- sock->stack_index = -1;
- sock->stack_ptr = &sock->ns;
- }
- }
-
- for (sock=node->outputs.first; sock; sock=sock->next) {
- sock->stack_type = SOCK_STACK_LOCAL;
- sock->stack_index = index++;
- sock->stack_ptr = NULL;
+ for(link= ntree->links.first; link; link= link->next) {
+ if (link->tosock)
+ link->tosock->link= link;
}
-
- return index;
}
-static int ntree_begin_exec_tree(bNodeTree *ntree);
-static int set_stack_indexes_group(bNode *node, int index)
+static void ntree_validate_links(bNodeTree *ntree)
{
- bNodeTree *ngroup= (bNodeTree*)node->id;
- bNodeSocket *sock;
-
- if(ngroup && (ngroup->init & NTREE_TYPE_INIT)==0)
- ntreeInitTypes(ngroup);
-
- node->stack_index = index;
- if(ngroup)
- index += ntree_begin_exec_tree(ngroup);
+ bNodeTreeType *ntreetype = ntreeGetType(ntree->type);
+ bNodeLink *link;
- for (sock=node->inputs.first; sock; sock=sock->next) {
- if (sock->link && sock->link->fromsock) {
- sock->stack_type = sock->link->fromsock->stack_type;
- sock->stack_index = sock->link->fromsock->stack_index;
- sock->stack_ptr = sock->link->fromsock->stack_ptr;
- }
- else {
- sock->stack_type = SOCK_STACK_CONST;
- sock->stack_index = -1;
- sock->stack_ptr = &sock->ns;
+ for (link = ntree->links.first; link; link = link->next) {
+ link->flag |= NODE_LINK_VALID;
+ if (link->fromnode && link->tonode && link->fromnode->level <= link->tonode->level)
+ link->flag &= ~NODE_LINK_VALID;
+ else if (ntreetype->validate_link) {
+ if (!ntreetype->validate_link(ntree, link))
+ link->flag &= ~NODE_LINK_VALID;
}
}
-
- /* identify group node outputs from internal group sockets */
- for(sock= node->outputs.first; sock; sock= sock->next) {
- if (sock->groupsock) {
- bNodeSocket *insock, *gsock = sock->groupsock;
- switch (gsock->stack_type) {
- case SOCK_STACK_EXTERN:
- /* extern stack is resolved for this group node instance */
- insock= find_group_node_input(node, gsock->link->fromsock);
- sock->stack_type = insock->stack_type;
- sock->stack_index = insock->stack_index;
- sock->stack_ptr = insock->stack_ptr;
- break;
- case SOCK_STACK_LOCAL:
- sock->stack_type = SOCK_STACK_LOCAL;
- /* local stack index must be offset by group node instance */
- sock->stack_index = gsock->stack_index + node->stack_index;
- sock->stack_ptr = NULL;
- break;
- case SOCK_STACK_CONST:
- sock->stack_type = SOCK_STACK_CONST;
- sock->stack_index = -1;
- sock->stack_ptr = gsock->stack_ptr;
- break;
- }
- }
- else {
- sock->stack_type = SOCK_STACK_LOCAL;
- sock->stack_index = index++;
- sock->stack_ptr = NULL;
- }
- }
-
- return index;
}
-/* recursively called for groups */
-/* we set all trees on own local indices, but put a total counter
- in the groups, so each instance of a group has own stack */
-static int ntree_begin_exec_tree(bNodeTree *ntree)
+static void ntree_verify_nodes_cb(void *calldata, struct ID *UNUSED(owner_id), struct bNodeTree *ntree)
{
+ ID *id= (ID*)calldata;
bNode *node;
- bNodeSocket *gsock;
- int index= 0, i;
-
- if((ntree->init & NTREE_TYPE_INIT)==0)
- ntreeInitTypes(ntree);
-
- /* group inputs are numbered 0..totinputs, so external stack can easily be addressed */
- i = 0;
- for(gsock=ntree->inputs.first; gsock; gsock = gsock->next) {
- gsock->stack_type = SOCK_STACK_EXTERN;
- gsock->stack_index = i++;
- gsock->stack_ptr = NULL;
- }
-
- /* create indices for stack, check preview */
- for(node= ntree->nodes.first; node; node= node->next) {
- /* XXX can this be done by a generic one-for-all function?
- * otherwise should use node-type callback.
- */
- if(node->type==NODE_GROUP)
- index = set_stack_indexes_group(node, index);
- else
- index = set_stack_indexes_default(node, index);
- }
- /* group outputs */
- for(gsock=ntree->outputs.first; gsock; gsock = gsock->next) {
- if (gsock->link && gsock->link->fromsock) {
- gsock->stack_type = gsock->link->fromsock->stack_type;
- gsock->stack_index = gsock->link->fromsock->stack_index;
- gsock->stack_ptr = gsock->link->fromsock->stack_ptr;
- }
- else {
- gsock->stack_type = SOCK_STACK_CONST;
- gsock->stack_index = -1;
- gsock->stack_ptr = &gsock->ns;
- }
- }
-
- return index;
+ for (node=ntree->nodes.first; node; node=node->next)
+ if (node->typeinfo->verifyfunc)
+ node->typeinfo->verifyfunc(ntree, node, id);
}
-/* copy socket compbufs to stack, initialize usage of curve nodes */
-static void composit_begin_exec(bNodeTree *ntree, bNodeStack *stack)
+void ntreeVerifyNodes(struct Main *main, struct ID *id)
{
- bNode *node;
- bNodeSocket *sock;
+ bNodeTreeType *ntreetype;
+ bNodeTree *ntree;
+ int n;
- for(node= ntree->nodes.first; node; node= node->next) {
-
- /* initialize needed for groups */
- node->exec= 0;
-
- for(sock= node->outputs.first; sock; sock= sock->next) {
- bNodeStack *ns= get_socket_stack(stack, sock, NULL);
- if(ns && sock->ns.data) {
- ns->data= sock->ns.data;
- sock->ns.data= NULL;
- }
- }
-
- /* cannot initialize them while using in threads */
- if(ELEM4(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) {
- curvemapping_initialize(node->storage);
- if(node->type==CMP_NODE_CURVE_RGB)
- curvemapping_premultiply(node->storage, 0);
- }
- if(node->type==NODE_GROUP && node->id)
- composit_begin_exec((bNodeTree *)node->id, stack + node->stack_index);
-
- }
-}
-
-/* copy stack compbufs to sockets */
-static void composit_end_exec(bNodeTree *ntree, bNodeStack *stack)
-{
- bNode *node;
- bNodeStack *ns;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- bNodeSocket *sock;
-
- for(sock= node->outputs.first; sock; sock= sock->next) {
- ns = get_socket_stack(stack, sock, NULL);
- if(ns && ns->data) {
- sock->ns.data= ns->data;
- ns->data= NULL;
- }
- }
-
- if(node->type==CMP_NODE_CURVE_RGB)
- curvemapping_premultiply(node->storage, 1);
-
- if(node->type==NODE_GROUP && node->id)
- composit_end_exec((bNodeTree *)node->id, stack + node->stack_index);
-
- node->need_exec= 0;
+ for (n=0; n < NUM_NTREE_TYPES; ++n) {
+ ntreetype= ntreeGetType(n);
+ if (ntreetype && ntreetype->foreach_nodetree)
+ ntreetype->foreach_nodetree(main, id, ntree_verify_nodes_cb);
}
+ for (ntree=main->nodetree.first; ntree; ntree=ntree->id.next)
+ ntree_verify_nodes_cb(id, NULL, ntree);
}
-static void group_tag_used_outputs(bNode *gnode, bNodeStack *stack, bNodeStack **gin)
+void ntreeUpdateTree(bNodeTree *ntree)
{
- bNodeTree *ntree= (bNodeTree *)gnode->id;
+ bNodeTreeType *ntreetype= ntreeGetType(ntree->type);
bNode *node;
- bNodeSocket *sock;
+ bNode **deplist;
+ int totnodes, n;
- stack+= gnode->stack_index;
+ ntree_update_link_pointers(ntree);
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->typeinfo->execfunc) {
- for(sock= node->inputs.first; sock; sock= sock->next) {
- bNodeStack *ns = get_socket_stack(stack, sock, gin);
- ns->hasoutput= 1;
- }
- }
-
- /* non-composite trees do all nodes by default */
- if (ntree->type!=NTREE_COMPOSIT)
- node->need_exec = 1;
-
- for(sock= node->inputs.first; sock; sock= sock->next) {
- bNodeStack *ns = get_socket_stack(stack, sock, gin);
- if (ns) {
- ns->hasoutput = 1;
-
- /* sock type is needed to detect rgba or value or vector types */
- if(sock->link && sock->link->fromsock)
- ns->sockettype= sock->link->fromsock->type;
- else
- sock->ns.sockettype= sock->type;
- }
-
- if(sock->link) {
- bNodeLink *link= sock->link;
- /* this is the test for a cyclic case */
- if(link->fromnode && link->tonode) {
- if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF);
- else {
- node->need_exec= 0;
- }
- }
- }
- }
-
- /* set stack types (for local stack entries) */
- for(sock= node->outputs.first; sock; sock= sock->next) {
- bNodeStack *ns = get_socket_stack(stack, sock, gin);
- if (ns)
- ns->sockettype = sock->type;
- }
- }
-}
-
-/* notes below are ancient! (ton) */
-/* stack indices make sure all nodes only write in allocated data, for making it thread safe */
-/* only root tree gets the stack, to enable instances to have own stack entries */
-/* per tree (and per group) unique indices are created */
-/* the index_ext we need to be able to map from groups to the group-node own stack */
-
-typedef struct bNodeThreadStack {
- struct bNodeThreadStack *next, *prev;
- bNodeStack *stack;
- int used;
-} bNodeThreadStack;
-
-static bNodeThreadStack *ntreeGetThreadStack(bNodeTree *ntree, int thread)
-{
- ListBase *lb= &ntree->threadstack[thread];
- bNodeThreadStack *nts;
-
- for(nts=lb->first; nts; nts=nts->next) {
- if(!nts->used) {
- nts->used= 1;
- return nts;
- }
- }
- nts= MEM_callocN(sizeof(bNodeThreadStack), "bNodeThreadStack");
- nts->stack= MEM_dupallocN(ntree->stack);
- nts->used= 1;
- BLI_addtail(lb, nts);
-
- return nts;
-}
-
-static void ntreeReleaseThreadStack(bNodeThreadStack *nts)
-{
- nts->used= 0;
-}
-
-/* free texture delegates */
-static void tex_end_exec(bNodeTree *ntree)
-{
- bNodeThreadStack *nts;
- bNodeStack *ns;
- int th, a;
+ /* also updates the node level! */
+ ntreeGetDependencyList(ntree, &deplist, &totnodes);
- if(ntree->threadstack) {
- for(th=0; th<BLENDER_MAX_THREADS; th++) {
- for(nts=ntree->threadstack[th].first; nts; nts=nts->next) {
- for(ns= nts->stack, a=0; a<ntree->stacksize; a++, ns++) {
- if(ns->data) {
- MEM_freeN(ns->data);
- ns->data= NULL;
- }
- }
- }
+ if (deplist) {
+ /* update individual nodes */
+ for (n=0; n < totnodes; ++n) {
+ node = deplist[n];
+ if (ntreetype->update_node)
+ ntreetype->update_node(ntree, node);
+ else if (node->typeinfo->updatefunc)
+ node->typeinfo->updatefunc(ntree, node);
}
- }
-}
-
-void ntreeBeginExecTree(bNodeTree *ntree)
-{
- bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
-
- /* let's make it sure */
- if(ntree->init & NTREE_EXEC_INIT)
- return;
-
- /* allocate the thread stack listbase array */
- if(ntree->type!=NTREE_COMPOSIT)
- ntree->threadstack= MEM_callocN(BLENDER_MAX_THREADS*sizeof(ListBase), "thread stack array");
-
- /* goes recursive over all groups */
- ntree->stacksize= ntree_begin_exec_tree(ntree);
-
- if(ntree->stacksize) {
- bNode *node;
- bNodeStack *ns;
- int a;
- /* allocate the base stack */
- ns=ntree->stack= MEM_callocN(ntree->stacksize*sizeof(bNodeStack), "node stack");
-
- /* tag inputs, the get_stack() gives own socket stackdata if not in use */
- for(a=0; a<ntree->stacksize; a++, ns++) ns->hasinput= 1;
-
- /* tag used outputs, so we know when we can skip operations */
- for(node= ntree->nodes.first; node; node= node->next) {
- bNodeSocket *sock;
-
- /* non-composite trees do all nodes by default */
- if(ntree->type!=NTREE_COMPOSIT)
- node->need_exec= 1;
-
- for(sock= node->inputs.first; sock; sock= sock->next) {
- ns = get_socket_stack(ntree->stack, sock, NULL);
- if (ns) {
- ns->hasoutput = 1;
-
- /* sock type is needed to detect rgba or value or vector types */
- if(sock->link && sock->link->fromsock)
- ns->sockettype= sock->link->fromsock->type;
- else
- sock->ns.sockettype= sock->type;
- }
-
- if(sock->link) {
- bNodeLink *link= sock->link;
- /* this is the test for a cyclic case */
- if(link->fromnode && link->tonode) {
- if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF);
- else {
- node->need_exec= 0;
- }
- }
- }
- }
-
- /* set stack types (for local stack entries) */
- for(sock= node->outputs.first; sock; sock= sock->next) {
- ns = get_socket_stack(ntree->stack, sock, NULL);
- if (ns)
- ns->sockettype = sock->type;
- }
-
- if(node->type==NODE_GROUP && node->id) {
- node_get_stack(node, ntree->stack, nsin, NULL, NULL);
- group_tag_used_outputs(node, ntree->stack, nsin);
- }
- }
-
- if(ntree->type==NTREE_COMPOSIT)
- composit_begin_exec(ntree, ntree->stack);
+ MEM_freeN(deplist);
/* ensures only a single output node is enabled, texnode allows multiple though */
if(ntree->type!=NTREE_TEXTURE)
@@ -2425,982 +1509,218 @@ void ntreeBeginExecTree(bNodeTree *ntree)
}
- ntree->init |= NTREE_EXEC_INIT;
-}
-
-void ntreeEndExecTree(bNodeTree *ntree)
-{
- bNodeStack *ns;
-
- if(ntree->init & NTREE_EXEC_INIT) {
- bNodeThreadStack *nts;
- int a;
-
- /* another callback candidate! */
- if(ntree->type==NTREE_COMPOSIT) {
- composit_end_exec(ntree, ntree->stack);
-
- for(ns= ntree->stack, a=0; a<ntree->stacksize; a++, ns++) {
- if(ns->data) {
- printf("freed leftover buffer from stack\n");
- free_compbuf(ns->data);
- ns->data= NULL;
- }
- }
- }
- else if(ntree->type==NTREE_TEXTURE)
- tex_end_exec(ntree);
-
- if(ntree->stack) {
- MEM_freeN(ntree->stack);
- ntree->stack= NULL;
- }
-
- if(ntree->threadstack) {
- for(a=0; a<BLENDER_MAX_THREADS; a++) {
- for(nts=ntree->threadstack[a].first; nts; nts=nts->next)
- if (nts->stack) MEM_freeN(nts->stack);
- BLI_freelistN(&ntree->threadstack[a]);
- }
-
- MEM_freeN(ntree->threadstack);
- ntree->threadstack= NULL;
- }
-
- ntree->init &= ~NTREE_EXEC_INIT;
+ /* general tree updates */
+ if (ntree->update & (NTREE_UPDATE_LINKS|NTREE_UPDATE_NODES)) {
+ ntree_validate_links(ntree);
}
-}
-
-/* nodes are presorted, so exec is in order of list */
-void ntreeExecTree(bNodeTree *ntree, void *callerdata, int thread)
-{
- bNode *node;
- bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
- bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
- bNodeStack *stack;
- bNodeThreadStack *nts = NULL;
-
- /* only when initialized */
- if((ntree->init & NTREE_EXEC_INIT)==0)
- ntreeBeginExecTree(ntree);
- /* composite does 1 node per thread, so no multiple stacks needed */
- if(ntree->type==NTREE_COMPOSIT) {
- stack= ntree->stack;
- }
+ /* update tree */
+ if (ntreetype->update)
+ ntreetype->update(ntree);
else {
- nts= ntreeGetThreadStack(ntree, thread);
- stack= nts->stack;
+ bNodeType *ntype= node_get_type(ntree, ntree->nodetype);
+ if (ntype && ntype->updatetreefunc)
+ ntype->updatetreefunc(ntree);
}
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->need_exec) {
- if(node->typeinfo->execfunc) {
- node_get_stack(node, stack, nsin, nsout, NULL);
- node->typeinfo->execfunc(callerdata, node, nsin, nsout);
- }
- else if(node->type==NODE_GROUP && node->id) {
- node_get_stack(node, stack, nsin, NULL, NULL);
- node_group_execute(stack, callerdata, node, nsin);
- }
- }
- }
-
- if(nts)
- ntreeReleaseThreadStack(nts);
-}
-
-
-/* ***************************** threaded version for execute composite nodes ************* */
-/* these are nodes without input, only giving values */
-/* or nodes with only value inputs */
-static int node_only_value(bNode *node)
-{
- bNodeSocket *sock;
-
- if(ELEM3(node->type, CMP_NODE_TIME, CMP_NODE_VALUE, CMP_NODE_RGB))
- return 1;
+ /* XXX hack, should be done by depsgraph!! */
+ ntreeVerifyNodes(G.main, &ntree->id);
- /* doing this for all node types goes wrong. memory free errors */
- if(node->inputs.first && node->type==CMP_NODE_MAP_VALUE) {
- int retval= 1;
- for(sock= node->inputs.first; sock; sock= sock->next) {
- if(sock->link && sock->link->fromnode)
- retval &= node_only_value(sock->link->fromnode);
- }
- return retval;
- }
- return 0;
+ /* clear the update flag */
+ ntree->update = 0;
}
-
-/* not changing info, for thread callback */
-typedef struct ThreadData {
- bNodeStack *stack;
- RenderData *rd;
-} ThreadData;
-
-static void *exec_composite_node(void *node_v)
-{
- bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
- bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
- bNode *node= node_v;
- ThreadData *thd= (ThreadData *)node->threaddata;
-
- node_get_stack(node, thd->stack, nsin, nsout, NULL);
-
- if((node->flag & NODE_MUTED) && (!node_only_value(node))) {
- /* viewers we execute, for feedback to user */
- if(ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
- node->typeinfo->execfunc(thd->rd, node, nsin, nsout);
- else
- node_compo_pass_on(node, nsin, nsout);
- }
- else if(node->typeinfo->execfunc) {
- node->typeinfo->execfunc(thd->rd, node, nsin, nsout);
- }
- else if(node->type==NODE_GROUP && node->id) {
- node_group_execute(thd->stack, thd->rd, node, nsin);
- }
-
- node->exec |= NODE_READY;
- return NULL;
-}
-
-/* return total of executable nodes, for timecursor */
-/* only compositor uses it */
-static int setExecutableNodes(bNodeTree *ntree, ThreadData *thd)
+void NodeTagChanged(bNodeTree *ntree, bNode *node)
{
- bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
- bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
- bNode *node;
- bNodeSocket *sock;
- int totnode= 0, group_edit= 0;
-
- /* note; do not add a dependency sort here, the stack was created already */
-
- /* if we are in group edit, viewer nodes get skipped when group has viewer */
- for(node= ntree->nodes.first; node; node= node->next)
- if(node->type==NODE_GROUP && (node->flag & NODE_GROUP_EDIT))
- if(ntreeHasType((bNodeTree *)node->id, CMP_NODE_VIEWER))
- group_edit= 1;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- int a;
-
- node_get_stack(node, thd->stack, nsin, nsout, NULL);
-
- /* test the outputs */
- /* skip value-only nodes (should be in type!) */
- if(!node_only_value(node)) {
- for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) {
- if(nsout[a]->data==NULL && nsout[a]->hasoutput) {
- node->need_exec= 1;
- break;
- }
- }
- }
-
- /* test the inputs */
- for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
- /* skip viewer nodes in bg render or group edit */
- if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) && (G.background || group_edit))
- node->need_exec= 0;
- /* is sock in use? */
- else if(sock->link) {
- bNodeLink *link= sock->link;
-
- /* this is the test for a cyclic case */
- if(link->fromnode==NULL || link->tonode==NULL);
- else if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) {
- if(link->fromnode->need_exec) {
- node->need_exec= 1;
- break;
- }
- }
- else {
- node->need_exec= 0;
- printf("Node %s skipped, cyclic dependency\n", node->name);
- }
- }
- }
-
- if(node->need_exec) {
-
- /* free output buffers */
- for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) {
- if(nsout[a]->data) {
- free_compbuf(nsout[a]->data);
- nsout[a]->data= NULL;
- }
- }
- totnode++;
- /* printf("node needs exec %s\n", node->name); */
-
- /* tag for getExecutableNode() */
- node->exec= 0;
- }
- else {
- /* tag for getExecutableNode() */
- node->exec= NODE_READY|NODE_FINISHED|NODE_SKIPPED;
-
- }
- }
-
- /* last step: set the stack values for only-value nodes */
- /* just does all now, compared to a full buffer exec this is nothing */
- if(totnode) {
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->need_exec==0 && node_only_value(node)) {
- if(node->typeinfo->execfunc) {
- node_get_stack(node, thd->stack, nsin, nsout, NULL);
- node->typeinfo->execfunc(thd->rd, node, nsin, nsout);
- }
- }
- }
- }
+ bNodeTreeType *ntreetype = ntreeGetType(ntree->type);
- return totnode;
+ /* extra null pointer checks here because this is called when unlinking
+ unknown nodes on file load, so typeinfo pointers may not be set */
+ if (ntreetype && ntreetype->update_node)
+ ntreetype->update_node(ntree, node);
+ else if (node->typeinfo && node->typeinfo->updatefunc)
+ node->typeinfo->updatefunc(ntree, node);
}
-/* while executing tree, free buffers from nodes that are not needed anymore */
-static void freeExecutableNode(bNodeTree *ntree)
+int NodeTagIDChanged(bNodeTree *ntree, ID *id)
{
- /* node outputs can be freed when:
- - not a render result or image node
- - when node outputs go to nodes all being set NODE_FINISHED
- */
+ bNodeTreeType *ntreetype;
bNode *node;
- bNodeSocket *sock;
-
- /* set exec flag for finished nodes that might need freed */
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->type!=CMP_NODE_R_LAYERS)
- if(node->exec & NODE_FINISHED)
- node->exec |= NODE_FREEBUFS;
- }
- /* clear this flag for input links that are not done yet */
- for(node= ntree->nodes.first; node; node= node->next) {
- if((node->exec & NODE_FINISHED)==0) {
- for(sock= node->inputs.first; sock; sock= sock->next)
- if(sock->link && sock->link->fromnode)
- sock->link->fromnode->exec &= ~NODE_FREEBUFS;
- }
- }
- /* now we can free buffers */
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->exec & NODE_FREEBUFS) {
- for(sock= node->outputs.first; sock; sock= sock->next) {
- bNodeStack *ns= get_socket_stack(ntree->stack, sock, NULL);
- if(ns && ns->data) {
- free_compbuf(ns->data);
- ns->data= NULL;
- // printf("freed buf node %s \n", node->name);
- }
- }
- }
- }
-}
+ int change = FALSE;
-static bNode *getExecutableNode(bNodeTree *ntree)
-{
- bNode *node;
- bNodeSocket *sock;
+ if(ELEM(NULL, id, ntree))
+ return change;
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->exec==0) {
-
- /* input sockets should be ready */
- for(sock= node->inputs.first; sock; sock= sock->next) {
- if(sock->link && sock->link->fromnode)
- if((sock->link->fromnode->exec & NODE_READY)==0)
- break;
- }
- if(sock==NULL)
- return node;
- }
- }
- return NULL;
-}
-
-/* check if texture nodes need exec or end */
-static void ntree_composite_texnode(bNodeTree *ntree, int init)
-{
- bNode *node;
+ ntreetype = ntreeGetType(ntree->type);
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->type==CMP_NODE_TEXTURE && node->id) {
- Tex *tex= (Tex *)node->id;
- if(tex->nodetree && tex->use_nodes) {
- /* has internal flag to detect it only does it once */
- if(init)
- ntreeBeginExecTree(tex->nodetree);
- else
- ntreeEndExecTree(tex->nodetree);
+ if (ntreetype->update_node) {
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->id==id) {
+ change = TRUE;
+ ntreetype->update_node(ntree, node);
}
}
}
-
-}
-
-/* optimized tree execute test for compositing */
-void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview)
-{
- bNode *node;
- ListBase threads;
- ThreadData thdata;
- int totnode, curnode, rendering= 1;
-
- if(ntree==NULL) return;
-
- if(do_preview)
- ntreeInitPreview(ntree, 0, 0);
-
- ntreeBeginExecTree(ntree);
- ntree_composite_texnode(ntree, 1);
-
- /* prevent unlucky accidents */
- if(G.background)
- rd->scemode &= ~R_COMP_CROP;
-
- /* setup callerdata for thread callback */
- thdata.rd= rd;
- thdata.stack= ntree->stack;
-
- /* fixed seed, for example noise texture */
- BLI_srandom(rd->cfra);
-
- /* sets need_exec tags in nodes */
- curnode = totnode= setExecutableNodes(ntree, &thdata);
-
- BLI_init_threads(&threads, exec_composite_node, rd->threads);
-
- while(rendering) {
-
- if(BLI_available_threads(&threads)) {
- node= getExecutableNode(ntree);
- if(node) {
- if(ntree->progress && totnode)
- ntree->progress(ntree->prh, (1.0f - curnode/(float)totnode));
- if(ntree->stats_draw) {
- char str[64];
- sprintf(str, "Compositing %d %s", curnode, node->name);
- ntree->stats_draw(ntree->sdh, str);
- }
- curnode--;
-
- node->threaddata = &thdata;
- node->exec= NODE_PROCESSING;
- BLI_insert_thread(&threads, node);
- }
- else
- PIL_sleep_ms(50);
- }
- else
- PIL_sleep_ms(50);
-
- rendering= 0;
- /* test for ESC */
- if(ntree->test_break && ntree->test_break(ntree->tbh)) {
- for(node= ntree->nodes.first; node; node= node->next)
- node->exec |= NODE_READY;
- }
-
- /* check for ready ones, and if we need to continue */
+ else {
for(node= ntree->nodes.first; node; node= node->next) {
- if(node->exec & NODE_READY) {
- if((node->exec & NODE_FINISHED)==0) {
- BLI_remove_thread(&threads, node); /* this waits for running thread to finish btw */
- node->exec |= NODE_FINISHED;
-
- /* freeing unused buffers */
- if(rd->scemode & R_COMP_FREE)
- freeExecutableNode(ntree);
- }
+ if(node->id==id) {
+ change = TRUE;
+ if (node->typeinfo->updatefunc)
+ node->typeinfo->updatefunc(ntree, node);
}
- else rendering= 1;
}
}
- BLI_end_threads(&threads);
-
- ntreeEndExecTree(ntree);
+ return change;
}
-/* ********** copy composite tree entirely, to allow threaded exec ******************* */
-/* ***************** do NOT execute this in a thread! ****************** */
-
-/* returns localized tree for execution in threads */
-/* local tree then owns all compbufs (for composite) */
-bNodeTree *ntreeLocalize(bNodeTree *ntree)
-{
- bNodeTree *ltree;
- bNode *node;
- bNodeSocket *sock;
-
- bAction *action_backup= NULL, *tmpact_backup= NULL;
-
- /* Workaround for copying an action on each render!
- * set action to NULL so animdata actions dont get copied */
- AnimData *adt= BKE_animdata_from_id(&ntree->id);
-
- if(adt) {
- action_backup= adt->action;
- tmpact_backup= adt->tmpact;
-
- adt->action= NULL;
- adt->tmpact= NULL;
- }
-
- /* node copy func */
- ltree= ntreeCopyTree(ntree);
-
- if(adt) {
- AnimData *ladt= BKE_animdata_from_id(&ltree->id);
-
- adt->action= ladt->action= action_backup;
- adt->tmpact= ladt->tmpact= tmpact_backup;
-
- if(action_backup) action_backup->id.us++;
- if(tmpact_backup) tmpact_backup->id.us++;
-
- }
- /* end animdata uglyness */
-
- /* ensures only a single output node is enabled */
- ntreeSetOutput(ltree);
-
- for(node= ntree->nodes.first; node; node= node->next) {
-
- /* store new_node pointer to original */
- node->new_node->new_node= node;
-
- if(ntree->type==NTREE_COMPOSIT) {
- /* ensure new user input gets handled ok, only composites (texture nodes will break, for painting since it uses no tags) */
- node->need_exec= 0;
-
- /* move over the compbufs */
- /* right after ntreeCopyTree() oldsock pointers are valid */
-
- 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);
- else
- node->new_node->id= NULL;
- }
- }
-
- for(sock= node->outputs.first; sock; sock= sock->next) {
-
- sock->new_sock->ns.data= sock->ns.data;
- compbuf_set_node(sock->new_sock->ns.data, node->new_node);
-
- sock->ns.data= NULL;
- sock->new_sock->new_sock= sock;
- }
- }
- }
-
- return ltree;
-}
-
-static int node_exists(bNodeTree *ntree, bNode *testnode)
-{
- bNode *node= ntree->nodes.first;
- for(; node; node= node->next)
- if(node==testnode)
- return 1;
- return 0;
-}
+/* ************* node type access ********** */
-static int outsocket_exists(bNode *node, bNodeSocket *testsock)
+int nodeValid(bNodeTree *ntree, bNodeTemplate *ntemp)
{
- bNodeSocket *sock= node->outputs.first;
- for(; sock; sock= sock->next)
- if(sock==testsock)
+ bNodeType *ntype= node_get_type(ntree, ntemp->type);
+ if (ntype) {
+ if (ntype->validfunc)
+ return ntype->validfunc(ntree, ntemp);
+ else
return 1;
- return 0;
-}
-
-
-/* sync local composite with real tree */
-/* local composite is supposed to be running, be careful moving previews! */
-/* is called by jobs manager, outside threads, so it doesnt happen during draw */
-void ntreeLocalSync(bNodeTree *localtree, bNodeTree *ntree)
-{
- bNode *lnode;
-
- if(ntree->type==NTREE_COMPOSIT) {
- /* move over the compbufs and previews */
- for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) {
- if( (lnode->exec & NODE_READY) && !(lnode->exec & NODE_SKIPPED) ) {
- if(node_exists(ntree, lnode->new_node)) {
-
- if(lnode->preview && lnode->preview->rect) {
- node_free_preview(lnode->new_node);
- lnode->new_node->preview= lnode->preview;
- lnode->preview= NULL;
- }
- }
- }
- }
- }
- else if(ELEM(ntree->type, NTREE_SHADER, NTREE_TEXTURE)) {
- /* copy over contents of previews */
- for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) {
- if(node_exists(ntree, lnode->new_node)) {
- bNode *node= lnode->new_node;
-
- if(node->preview && node->preview->rect) {
- if(lnode->preview && lnode->preview->rect) {
- int xsize= node->preview->xsize;
- int ysize= node->preview->ysize;
- memcpy(node->preview->rect, lnode->preview->rect, 4*xsize + xsize*ysize*sizeof(char)*4);
- }
- }
- }
- }
}
+ else
+ return 0;
}
-/* merge local tree results back, and free local tree */
-/* we have to assume the editor already changed completely */
-void ntreeLocalMerge(bNodeTree *localtree, bNodeTree *ntree)
+const char* nodeLabel(bNode *node)
{
- bNode *lnode;
- bNodeSocket *lsock;
-
- /* move over the compbufs and previews */
- for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) {
- if(node_exists(ntree, lnode->new_node)) {
-
- if(lnode->preview && lnode->preview->rect) {
- node_free_preview(lnode->new_node);
- lnode->new_node->preview= lnode->preview;
- lnode->preview= NULL;
- }
-
- if(ELEM(lnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
- if(lnode->id && (lnode->flag & NODE_DO_OUTPUT)) {
- /* image_merge does sanity check for pointers */
- BKE_image_merge((Image *)lnode->new_node->id, (Image *)lnode->id);
- }
- }
-
- for(lsock= lnode->outputs.first; lsock; lsock= lsock->next) {
- if(outsocket_exists(lnode->new_node, lsock->new_sock)) {
- lsock->new_sock->ns.data= lsock->ns.data;
- compbuf_set_node(lsock->new_sock->ns.data, lnode->new_node);
- lsock->ns.data= NULL;
- lsock->new_sock= NULL;
- }
- }
- }
- }
- ntreeFreeTree(localtree);
- MEM_freeN(localtree);
+ if (node->label[0]!='\0')
+ return node->label;
+ else if (node->typeinfo->labelfunc)
+ return node->typeinfo->labelfunc(node);
+ else
+ return node->typeinfo->name;
}
-/* *********************************************** */
-
-/* GPU material from shader nodes */
-
-static void gpu_from_node_stack(ListBase *sockets, bNodeStack **ns, GPUNodeStack *gs)
+struct bNodeTree *nodeGroupEditGet(struct bNode *node)
{
- bNodeSocket *sock;
- int i;
-
- for (sock=sockets->first, i=0; sock; sock=sock->next, i++) {
- memset(&gs[i], 0, sizeof(gs[i]));
-
- QUATCOPY(gs[i].vec, ns[i]->vec);
- gs[i].link= ns[i]->data;
-
- if (sock->type == SOCK_VALUE)
- gs[i].type= GPU_FLOAT;
- else if (sock->type == SOCK_VECTOR)
- gs[i].type= GPU_VEC3;
- else if (sock->type == SOCK_RGBA)
- gs[i].type= GPU_VEC4;
- else
- gs[i].type= GPU_NONE;
-
- gs[i].name = "";
- gs[i].hasinput= ns[i]->hasinput && ns[i]->data;
- gs[i].hasoutput= ns[i]->hasoutput && ns[i]->data;
- gs[i].sockettype= ns[i]->sockettype;
- }
-
- gs[i].type= GPU_NONE;
+ if (node->typeinfo->group_edit_get)
+ return node->typeinfo->group_edit_get(node);
+ else
+ return NULL;
}
-static void data_from_gpu_stack(ListBase *sockets, bNodeStack **ns, GPUNodeStack *gs)
+struct bNodeTree *nodeGroupEditSet(struct bNode *node, int edit)
{
- bNodeSocket *sock;
- int i;
-
- for (sock=sockets->first, i=0; sock; sock=sock->next, i++) {
- ns[i]->data= gs[i].link;
- ns[i]->sockettype= gs[i].sockettype;
- }
+ if (node->typeinfo->group_edit_set)
+ return node->typeinfo->group_edit_set(node, edit);
+ else if (node->typeinfo->group_edit_get)
+ return node->typeinfo->group_edit_get(node);
+ else
+ return NULL;
}
-static void gpu_node_group_execute(bNodeStack *stack, GPUMaterial *mat, bNode *gnode, bNodeStack **in)
+void nodeGroupEditClear(struct bNode *node)
{
- bNode *node;
- bNodeTree *ntree= (bNodeTree *)gnode->id;
- bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
- bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
- GPUNodeStack gpuin[MAX_SOCKET+1], gpuout[MAX_SOCKET+1];
- int doit = 0;
-
- if(ntree==NULL) return;
-
- stack+= gnode->stack_index;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->typeinfo->gpufunc) {
- node_get_stack(node, stack, nsin, nsout, in);
-
- doit = 0;
-
- /* for groups, only execute outputs for edited group */
- if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) {
- if(gnode->flag & NODE_GROUP_EDIT)
- if(node->flag & NODE_DO_OUTPUT)
- doit = 1;
- }
- else
- doit = 1;
-
- if(doit) {
- gpu_from_node_stack(&node->inputs, nsin, gpuin);
- gpu_from_node_stack(&node->outputs, nsout, gpuout);
- if(node->typeinfo->gpufunc(mat, node, gpuin, gpuout))
- data_from_gpu_stack(&node->outputs, nsout, gpuout);
- }
- }
- }
+ if (node->typeinfo->group_edit_clear)
+ node->typeinfo->group_edit_clear(node);
}
-void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat)
+struct bNodeTemplate nodeMakeTemplate(struct bNode *node)
{
- bNode *node;
- bNodeStack *stack;
- bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
- bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
- GPUNodeStack gpuin[MAX_SOCKET+1], gpuout[MAX_SOCKET+1];
-
- if((ntree->init & NTREE_EXEC_INIT)==0)
- ntreeBeginExecTree(ntree);
-
- stack= ntree->stack;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->typeinfo->gpufunc) {
- node_get_stack(node, stack, nsin, nsout, NULL);
- gpu_from_node_stack(&node->inputs, nsin, gpuin);
- gpu_from_node_stack(&node->outputs, nsout, gpuout);
- if(node->typeinfo->gpufunc(mat, node, gpuin, gpuout))
- data_from_gpu_stack(&node->outputs, nsout, gpuout);
- }
- else if(node->type==NODE_GROUP && node->id) {
- node_get_stack(node, stack, nsin, nsout, NULL);
- gpu_node_group_execute(stack, mat, node, nsin);
- }
+ bNodeTemplate ntemp;
+ if (node->typeinfo->templatefunc)
+ return node->typeinfo->templatefunc(node);
+ else {
+ ntemp.type = node->type;
+ return ntemp;
}
-
- ntreeEndExecTree(ntree);
}
-/* **************** call to switch lamploop for material node ************ */
-
-void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *);
-
-void set_node_shader_lamp_loop(void (*lamp_loop_func)(ShadeInput *, ShadeResult *))
-{
- node_shader_lamp_loop= lamp_loop_func;
-}
-
-/* clumsy checking... should do dynamic outputs once */
-static void force_hidden_passes(bNode *node, int passflag)
-{
- bNodeSocket *sock;
-
- for(sock= node->outputs.first; sock; sock= sock->next)
- sock->flag &= ~SOCK_UNAVAIL;
-
- sock= BLI_findlink(&node->outputs, RRES_OUT_Z);
- if(!(passflag & SCE_PASS_Z)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_NORMAL);
- if(!(passflag & SCE_PASS_NORMAL)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_VEC);
- if(!(passflag & SCE_PASS_VECTOR)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_UV);
- if(!(passflag & SCE_PASS_UV)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_RGBA);
- if(!(passflag & SCE_PASS_RGBA)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_DIFF);
- if(!(passflag & SCE_PASS_DIFFUSE)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_SPEC);
- if(!(passflag & SCE_PASS_SPEC)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_SHADOW);
- if(!(passflag & SCE_PASS_SHADOW)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_AO);
- if(!(passflag & SCE_PASS_AO)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_REFLECT);
- if(!(passflag & SCE_PASS_REFLECT)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_REFRACT);
- if(!(passflag & SCE_PASS_REFRACT)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_INDIRECT);
- if(!(passflag & SCE_PASS_INDIRECT)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXOB);
- if(!(passflag & SCE_PASS_INDEXOB)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXMA);
- if(!(passflag & SCE_PASS_INDEXMA)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_MIST);
- if(!(passflag & SCE_PASS_MIST)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_EMIT);
- if(!(passflag & SCE_PASS_EMIT)) sock->flag |= SOCK_UNAVAIL;
- sock= BLI_findlink(&node->outputs, RRES_OUT_ENV);
- if(!(passflag & SCE_PASS_ENVIRONMENT)) sock->flag |= SOCK_UNAVAIL;
-
-}
-
-/* based on rules, force sockets hidden always */
-void ntreeCompositForceHidden(bNodeTree *ntree, Scene *curscene)
+void node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
{
- bNode *node;
+ memset(ntype, 0, sizeof(bNodeType));
- if(ntree==NULL) return;
+ ntype->type = type;
+ BLI_strncpy(ntype->name, name, sizeof(ntype->name));
+ ntype->nclass = nclass;
+ ntype->flag = flag;
- for(node= ntree->nodes.first; node; node= node->next) {
- if( node->type==CMP_NODE_R_LAYERS) {
- Scene *sce= node->id?(Scene *)node->id:curscene;
- SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
- if(srl)
- force_hidden_passes(node, srl->passflag);
- }
- else if( node->type==CMP_NODE_IMAGE) {
- Image *ima= (Image *)node->id;
- if(ima) {
- if(ima->rr) {
- ImageUser *iuser= node->storage;
- RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer);
- if(rl)
- force_hidden_passes(node, rl->passflag);
- else
- force_hidden_passes(node, 0);
- }
- else if(ima->type!=IMA_TYPE_MULTILAYER) { /* if ->rr not yet read we keep inputs */
- force_hidden_passes(node, RRES_OUT_Z);
- }
- else
- force_hidden_passes(node, 0);
- }
- else
- force_hidden_passes(node, 0);
- }
- }
-
+ /* default size values */
+ ntype->width = 140;
+ ntype->minwidth = 100;
+ ntype->maxwidth = 320;
+ ntype->height = 100;
+ ntype->minheight = 30;
+ ntype->maxheight = FLT_MAX;
}
-/* called from render pipeline, to tag render input and output */
-/* need to do all scenes, to prevent errors when you re-render 1 scene */
-void ntreeCompositTagRender(Scene *curscene)
+void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs)
{
- Scene *sce;
-
- for(sce= G.main->scene.first; sce; sce= sce->id.next) {
- if(sce->nodetree) {
- bNode *node;
-
- for(node= sce->nodetree->nodes.first; node; node= node->next) {
- if(node->id==(ID *)curscene || node->type==CMP_NODE_COMPOSITE)
- NodeTagChanged(sce->nodetree, node);
- else if(node->type==CMP_NODE_TEXTURE) /* uses scene sizex/sizey */
- NodeTagChanged(sce->nodetree, node);
- }
- }
- }
+ ntype->inputs = inputs;
+ ntype->outputs = outputs;
}
-static int node_animation_properties(bNodeTree *ntree, bNode *node)
+void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp))
{
- bNodeSocket *sock;
- const ListBase *lb;
- Link *link;
- PointerRNA ptr;
- PropertyRNA *prop;
-
- /* check to see if any of the node's properties have fcurves */
- RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr);
- lb = RNA_struct_type_properties(ptr.type);
-
- for (link=lb->first; link; link=link->next) {
- int driven, len=1, index;
- prop = (PropertyRNA *)link;
-
- if (RNA_property_array_check(prop))
- len = RNA_property_array_length(&ptr, prop);
-
- for (index=0; index<len; index++) {
- if (rna_get_fcurve(&ptr, prop, index, NULL, &driven)) {
- NodeTagChanged(ntree, node);
- return 1;
- }
- }
- }
-
- /* now check node sockets */
- for (sock = node->inputs.first; sock; sock=sock->next) {
- int driven, len=1, index;
-
- RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
- prop = RNA_struct_find_property(&ptr, "default_value");
-
- if (RNA_property_array_check(prop))
- len = RNA_property_array_length(&ptr, prop);
-
- for (index=0; index<len; index++) {
- if (rna_get_fcurve(&ptr, prop, index, NULL, &driven)) {
- NodeTagChanged(ntree, node);
- return 1;
- }
- }
- }
-
- return 0;
+ ntype->initfunc = initfunc;
}
-/* tags nodes that have animation capabilities */
-int ntreeCompositTagAnimated(bNodeTree *ntree)
+void node_type_valid(struct bNodeType *ntype, int (*validfunc)(struct bNodeTree *ntree, struct bNodeTemplate *ntemp))
{
- bNode *node;
- int tagged= 0;
-
- if(ntree==NULL) return 0;
-
- for(node= ntree->nodes.first; node; node= node->next) {
-
- tagged = node_animation_properties(ntree, node);
-
- /* otherwise always tag these node types */
- if(node->type==CMP_NODE_IMAGE) {
- Image *ima= (Image *)node->id;
- if(ima && ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
- NodeTagChanged(ntree, node);
- tagged= 1;
- }
- }
- else if(node->type==CMP_NODE_TIME) {
- NodeTagChanged(ntree, node);
- tagged= 1;
- }
- /* here was tag render layer, but this is called after a render, so re-composites fail */
- else if(node->type==NODE_GROUP) {
- if( ntreeCompositTagAnimated((bNodeTree *)node->id) ) {
- NodeTagChanged(ntree, node);
- }
- }
- }
-
- return tagged;
+ ntype->validfunc = validfunc;
}
-
-/* called from image window preview */
-void ntreeCompositTagGenerators(bNodeTree *ntree)
+void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth)
{
- bNode *node;
-
- if(ntree==NULL) return;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- if( ELEM(node->type, CMP_NODE_R_LAYERS, CMP_NODE_IMAGE))
- NodeTagChanged(ntree, node);
- }
+ ntype->width = width;
+ ntype->minwidth = minwidth;
+ if (maxwidth <= minwidth)
+ ntype->maxwidth = FLT_MAX;
+ else
+ ntype->maxwidth = maxwidth;
}
-/* XXX after render animation system gets a refresh, this call allows composite to end clean */
-void ntreeClearTags(bNodeTree *ntree)
+void node_type_storage(bNodeType *ntype, const char *storagename, void (*freestoragefunc)(struct bNode *), void (*copystoragefunc)(struct bNode *, struct bNode *))
{
- bNode *node;
-
- if(ntree==NULL) return;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- node->need_exec= 0;
- if(node->type==NODE_GROUP)
- ntreeClearTags((bNodeTree *)node->id);
- }
+ if (storagename)
+ strncpy(ntype->storagename, storagename, sizeof(ntype->storagename));
+ else
+ ntype->storagename[0] = '\0';
+ ntype->copystoragefunc = copystoragefunc;
+ ntype->freestoragefunc = freestoragefunc;
}
-
-int ntreeTexTagAnimated(bNodeTree *ntree)
+void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *))
{
- bNode *node;
-
- if(ntree==NULL) return 0;
-
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->type==TEX_NODE_CURVE_TIME) {
- NodeTagChanged(ntree, node);
- return 1;
- }
- else if(node->type==NODE_GROUP) {
- if( ntreeTexTagAnimated((bNodeTree *)node->id) ) {
- return 1;
- }
- }
- }
-
- return 0;
+ ntype->labelfunc = labelfunc;
}
-/* ************* node definition init ********** */
-
-void node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag,
- struct bNodeSocketType *inputs, struct bNodeSocketType *outputs)
+void node_type_template(struct bNodeType *ntype, struct bNodeTemplate (*templatefunc)(struct bNode *))
{
- memset(ntype, 0, sizeof(bNodeType));
-
- ntype->type = type;
- ntype->name = name;
- ntype->nclass = nclass;
- ntype->flag = flag;
-
- ntype->inputs = inputs;
- ntype->outputs = outputs;
-
- /* default size values */
- ntype->width = 140;
- ntype->minwidth = 100;
- ntype->maxwidth = 320;
+ ntype->templatefunc = templatefunc;
}
-void node_type_init(bNodeType *ntype, void (*initfunc)(struct bNode *))
+void node_type_update(struct bNodeType *ntype,
+ void (*updatefunc)(struct bNodeTree *ntree, struct bNode *node),
+ void (*verifyfunc)(struct bNodeTree *ntree, struct bNode *node, struct ID *id))
{
- ntype->initfunc = initfunc;
+ ntype->updatefunc = updatefunc;
+ ntype->verifyfunc = verifyfunc;
}
-void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth)
+void node_type_tree(struct bNodeType *ntype, void (*inittreefunc)(struct bNodeTree *), void (*updatetreefunc)(struct bNodeTree *))
{
- ntype->width = width;
- ntype->minwidth = minwidth;
- ntype->maxwidth = maxwidth;
+ ntype->inittreefunc = inittreefunc;
+ ntype->updatetreefunc = updatetreefunc;
}
-void node_type_storage(bNodeType *ntype, const char *storagename, void (*freestoragefunc)(struct bNode *), void (*copystoragefunc)(struct bNode *, struct bNode *))
+void node_type_group_edit(struct bNodeType *ntype,
+ struct bNodeTree *(*group_edit_get)(struct bNode *node),
+ struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit),
+ void (*group_edit_clear)(struct bNode *node))
{
- if (storagename)
- strncpy(ntype->storagename, storagename, sizeof(ntype->storagename));
- else
- ntype->storagename[0] = '\0';
- ntype->copystoragefunc = copystoragefunc;
- ntype->freestoragefunc = freestoragefunc;
+ ntype->group_edit_get = group_edit_get;
+ ntype->group_edit_set = group_edit_set;
+ ntype->group_edit_clear = group_edit_clear;
}
void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **))
@@ -3408,42 +1728,53 @@ void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct
ntype->execfunc = execfunc;
}
+void node_type_exec_new(struct bNodeType *ntype,
+ void *(*initexecfunc)(struct bNode *node),
+ void (*freeexecfunc)(struct bNode *node, void *nodedata),
+ void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **))
+{
+ ntype->initexecfunc = initexecfunc;
+ ntype->freeexecfunc = freeexecfunc;
+ ntype->newexecfunc = newexecfunc;
+}
+
void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out))
{
ntype->gpufunc = gpufunc;
}
-void node_type_label(struct bNodeType *ntype, const char *(*labelfunc)(struct bNode *))
+void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out))
{
- ntype->labelfunc = labelfunc;
+ ntype->gpuextfunc = gpuextfunc;
}
-static bNodeType *is_nodetype_registered(ListBase *typelist, int type, ID *id)
+
+static bNodeType *is_nodetype_registered(ListBase *typelist, int type)
{
bNodeType *ntype= typelist->first;
for(;ntype; ntype= ntype->next )
- if(ntype->type==type && ntype->id==id)
+ if(ntype->type==type)
return ntype;
return NULL;
}
-/* type can be from a static array, we make copy for duplicate types (like group) */
-void nodeRegisterType(ListBase *typelist, const bNodeType *ntype)
+void nodeRegisterType(ListBase *typelist, bNodeType *ntype)
{
- bNodeType *found= is_nodetype_registered(typelist, ntype->type, ntype->id);
+ bNodeType *found= is_nodetype_registered(typelist, ntype->type);
- if(found==NULL) {
- bNodeType *ntypen= MEM_callocN(sizeof(bNodeType), "node type");
- *ntypen= *ntype;
- BLI_addtail(typelist, ntypen);
- }
+ if(found==NULL)
+ BLI_addtail(typelist, ntype);
}
static void registerCompositNodes(ListBase *ntypelist)
{
- register_node_type_group(ntypelist);
+ register_node_type_frame(ntypelist);
+
+ register_node_type_cmp_group(ntypelist);
+// register_node_type_cmp_forloop(ntypelist);
+// register_node_type_cmp_whileloop(ntypelist);
register_node_type_cmp_rlayers(ntypelist);
register_node_type_cmp_image(ntypelist);
@@ -3519,7 +1850,11 @@ static void registerCompositNodes(ListBase *ntypelist)
static void registerShaderNodes(ListBase *ntypelist)
{
- register_node_type_group(ntypelist);
+ register_node_type_frame(ntypelist);
+
+ register_node_type_sh_group(ntypelist);
+// register_node_type_sh_forloop(ntypelist);
+// register_node_type_sh_whileloop(ntypelist);
register_node_type_sh_output(ntypelist);
register_node_type_sh_mix_rgb(ntypelist);
@@ -3548,7 +1883,11 @@ static void registerShaderNodes(ListBase *ntypelist)
static void registerTextureNodes(ListBase *ntypelist)
{
- register_node_type_group(ntypelist);
+ register_node_type_frame(ntypelist);
+
+ register_node_type_tex_group(ntypelist);
+// register_node_type_tex_forloop(ntypelist);
+// register_node_type_tex_whileloop(ntypelist);
register_node_type_tex_math(ntypelist);
register_node_type_tex_mix_rgb(ntypelist);
@@ -3589,53 +1928,47 @@ static void registerTextureNodes(ListBase *ntypelist)
register_node_type_tex_proc_distnoise(ntypelist);
}
-static void remove_dynamic_typeinfos(ListBase *list)
+static void free_dynamic_typeinfo(bNodeType *ntype)
{
- bNodeType *ntype= list->first;
- bNodeType *next= NULL;
- while(ntype) {
- next= ntype->next;
- if(ntype->type==NODE_DYNAMIC && ntype->id!=NULL) {
- BLI_remlink(list, ntype);
- if(ntype->inputs) {
- bNodeSocketType *sock= ntype->inputs;
- while(sock->type!=-1) {
- MEM_freeN((void *)sock->name);
- sock++;
- }
- MEM_freeN(ntype->inputs);
- }
- if(ntype->outputs) {
- bNodeSocketType *sock= ntype->outputs;
- while(sock->type!=-1) {
- MEM_freeN((void *)sock->name);
- sock++;
- }
- MEM_freeN(ntype->outputs);
- }
- if(ntype->name) {
- MEM_freeN((void *)ntype->name);
- }
- MEM_freeN(ntype);
+ if(ntype->type==NODE_DYNAMIC) {
+ if(ntype->inputs) {
+ MEM_freeN(ntype->inputs);
}
- ntype= next;
+ if(ntype->outputs) {
+ MEM_freeN(ntype->outputs);
+ }
+ if(ntype->name) {
+ MEM_freeN((void *)ntype->name);
+ }
+ }
+}
+
+static void free_typeinfos(ListBase *list)
+{
+ bNodeType *ntype, *next;
+ for(ntype=list->first; ntype; ntype=next) {
+ next = ntype->next;
+
+ if(ntype->type==NODE_DYNAMIC)
+ free_dynamic_typeinfo(ntype);
+
+ if(ntype->needs_free)
+ MEM_freeN(ntype);
}
}
void init_nodesystem(void)
{
- registerCompositNodes(&node_all_composit);
- registerShaderNodes(&node_all_shaders);
- registerTextureNodes(&node_all_textures);
+ registerCompositNodes(&ntreeGetType(NTREE_COMPOSIT)->node_types);
+ registerShaderNodes(&ntreeGetType(NTREE_SHADER)->node_types);
+ registerTextureNodes(&ntreeGetType(NTREE_TEXTURE)->node_types);
}
void free_nodesystem(void)
{
- /*remove_dynamic_typeinfos(&node_all_composit);*/ /* unused for now */
- BLI_freelistN(&node_all_composit);
- remove_dynamic_typeinfos(&node_all_shaders);
- BLI_freelistN(&node_all_shaders);
- BLI_freelistN(&node_all_textures);
+ free_typeinfos(&ntreeGetType(NTREE_COMPOSIT)->node_types);
+ free_typeinfos(&ntreeGetType(NTREE_SHADER)->node_types);
+ free_typeinfos(&ntreeGetType(NTREE_TEXTURE)->node_types);
}
/* called from unlink_scene, when deleting a scene goes over all scenes
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 0dc83084c90..94be1a7a7b5 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -235,6 +235,17 @@ void object_free_display(Object *ob)
freedisplist(&ob->disp);
}
+void free_sculptsession_deformMats(SculptSession *ss)
+{
+ if(ss->orig_cos) MEM_freeN(ss->orig_cos);
+ if(ss->deform_cos) MEM_freeN(ss->deform_cos);
+ if(ss->deform_imats) MEM_freeN(ss->deform_imats);
+
+ ss->orig_cos = NULL;
+ ss->deform_cos = NULL;
+ ss->deform_imats = NULL;
+}
+
void free_sculptsession(Object *ob)
{
if(ob && ob->sculpt) {
@@ -265,6 +276,7 @@ void free_sculptsession(Object *ob)
}
}
+
/* do not free object itself */
void free_object(Object *ob)
{
@@ -406,7 +418,7 @@ void unlink_object(Object *ob)
for (ct= targets.first; ct; ct= ct->next) {
if (ct->tar == ob) {
ct->tar = NULL;
- strcpy(ct->subtarget, "");
+ ct->subtarget[0]= '\0';
obt->recalc |= OB_RECALC_DATA;
}
}
@@ -436,7 +448,7 @@ void unlink_object(Object *ob)
for (ct= targets.first; ct; ct= ct->next) {
if (ct->tar == ob) {
ct->tar = NULL;
- strcpy(ct->subtarget, "");
+ ct->subtarget[0]= '\0';
obt->recalc |= OB_RECALC_DATA;
}
}
@@ -1082,6 +1094,7 @@ Object *add_only_object(int type, const char *name)
ob->state=1;
/* ob->pad3 == Contact Processing Threshold */
ob->m_contactProcessingThreshold = 1.;
+ ob->obstacleRad = 1.;
/* NT fluid sim defaults */
ob->fluidsimFlag = 0;
@@ -1297,6 +1310,37 @@ 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)
+ ) {
+ return 1;
+ }
+ else {
+ return 0;
+ }
+}
+
+//Object *object_pose_armature_get(Object *ob)
+Object *object_pose_armature_get(struct Object *ob)
+{
+ if(ob==NULL)
+ return NULL;
+
+ if(object_pose_context(ob))
+ return ob;
+
+ ob= modifiers_isDeformedByArmature(ob);
+
+ if(object_pose_context(ob))
+ return ob;
+
+ return NULL;
+}
+
static void copy_object_transform(Object *ob_tar, Object *ob_src)
{
copy_v3_v3(ob_tar->loc, ob_src->loc);
@@ -2306,7 +2350,7 @@ BoundBox *unit_boundbox(void)
BoundBox *bb;
float min[3] = {-1.0f,-1.0f,-1.0f}, max[3] = {-1.0f,-1.0f,-1.0f};
- bb= MEM_callocN(sizeof(BoundBox), "bb");
+ bb= MEM_callocN(sizeof(BoundBox), "OB-BoundBox");
boundbox_set_from_min_max(bb, min, max);
return bb;
@@ -2758,6 +2802,33 @@ void object_handle_update(Scene *scene, Object *ob)
}
}
+void object_sculpt_modifiers_changed(Object *ob)
+{
+ 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;
+ }
+
+ free_sculptsession_deformMats(ob->sculpt);
+ } else {
+ PBVHNode **nodes;
+ int n, totnode;
+
+ BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
+
+ for(n = 0; n < totnode; n++)
+ BLI_pbvh_node_mark_update(nodes[n]);
+
+ MEM_freeN(nodes);
+ }
+}
+
float give_timeoffset(Object *ob) {
if ((ob->ipoflag & OB_OFFS_PARENTADD) && ob->parent) {
return ob->sf + give_timeoffset(ob->parent);
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index d00eb6192da..ddeb42d608e 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -97,6 +97,10 @@ int paint_facesel_test(Object *ob)
return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->editflag & ME_EDIT_PAINT_MASK) && (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT)));
}
+int paint_vertsel_test(Object *ob)
+{
+ return (ob && ob->type==OB_MESH && ob->data && (((Mesh *)ob->data)->editflag & ME_EDIT_VERT_SEL) && (ob->mode & OB_MODE_WEIGHT_PAINT));
+}
void paint_init(Paint *p, const char col[3])
{
Brush *brush;
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 9478f9c6518..a64e17ae3f7 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2091,10 +2091,10 @@ void precalc_guides(ParticleSimulationData *sim, ListBase *effectors)
data = eff->guide_data + p;
VECSUB(efd.vec_to_point, state.co, eff->guide_loc);
- VECCOPY(efd.nor, eff->guide_dir);
+ copy_v3_v3(efd.nor, eff->guide_dir);
efd.distance = len_v3(efd.vec_to_point);
- VECCOPY(data->vec_to_point, efd.vec_to_point);
+ copy_v3_v3(data->vec_to_point, efd.vec_to_point);
data->strength = effector_falloff(eff, &efd, &point, weights);
}
}
@@ -2543,7 +2543,7 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle
normalize_v3(v1);
normalize_v3(v2);
- d = saacos(dot_v3v3(v1, v2)) * 180.0f/(float)M_PI;
+ d = RAD2DEGF(saacos(dot_v3v3(v1, v2)));
}
if(p_max > p_min)
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index 0d523599598..d529a6d94c9 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -396,6 +396,7 @@ void init_actuator(bActuator *act)
bObjectActuator *oa;
bRandomActuator *ra;
bSoundActuator *sa;
+ bSteeringActuator *sta;
if(act->data) MEM_freeN(act->data);
act->data= NULL;
@@ -470,6 +471,16 @@ void init_actuator(bActuator *act)
case ACT_ARMATURE:
act->data = MEM_callocN(sizeof( bArmatureActuator ), "armature act");
break;
+ case ACT_STEERING:
+ act->data = MEM_callocN(sizeof( bSteeringActuator), "steering act");
+ sta = act->data;
+ sta->acceleration = 3.f;
+ sta->turnspeed = 120.f;
+ sta->dist = 1.f;
+ sta->velocity= 3.f;
+ sta->flag = ACT_STEERING_AUTOMATICFACING;
+ sta->facingaxis = 1;
+ break;
default:
; /* this is very severe... I cannot make any memory for this */
/* logic brick... */
@@ -595,6 +606,11 @@ void set_sca_new_poins_ob(Object *ob)
bPropertyActuator *pa= act->data;
ID_NEW(pa->ob);
}
+ else if(act->type==ACT_STEERING) {
+ bSteeringActuator *sta = act->data;
+ ID_NEW(sta->navmesh);
+ ID_NEW(sta->target);
+ }
}
act= act->next;
}
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index d6003a44a7d..1454b3f0ce3 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -514,6 +514,23 @@ 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.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.agentmaxclimb = 0.9f;
+ sce->gm.recastData.agentheight = 2.0f;
+ sce->gm.recastData.agentradius = 0.6f;
+ sce->gm.recastData.edgemaxlen = 12.0f;
+ sce->gm.recastData.edgemaxerror = 1.3f;
+ sce->gm.recastData.regionminsize = 50.f;
+ sce->gm.recastData.regionmergesize = 20.f;
+ sce->gm.recastData.vertsperpoly = 6;
+ sce->gm.recastData.detailsampledist = 6.0f;
+ sce->gm.recastData.detailsamplemaxerror = 1.0f;
+
sound_create_scene(sce);
return sce;
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 50b3e32278a..ef1b75e5913 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -277,8 +277,7 @@ void BKE_area_region_free(SpaceType *st, ARegion *ar)
ar->v2d.tab_offset= NULL;
}
- if(ar)
- BLI_freelistN(&ar->panels);
+ BLI_freelistN(&ar->panels);
}
/* not area itself */
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 43747fde729..e5d74177c91 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -2132,7 +2132,7 @@ static void do_transform(Scene *scene, Sequence *seq, float UNUSED(facf0), int x
}
// Rotate
- rotate_radians = ((float)M_PI*transform->rotIni)/180.0f;
+ rotate_radians = DEG2RADF(transform->rotIni);
transform_image(x,y, ibuf1, out, scale_x, scale_y, translate_x, translate_y, rotate_radians, transform->interpolation);
}
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 9ef30bdd49b..a3237da6234 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -1260,7 +1260,7 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int
size_flags = seq->strip->proxy->build_size_flags;
/* only use proxies, if they are enabled (even if present!) */
- if (psize != IMB_PROXY_NONE && ((size_flags & psize) != psize)) {
+ if (psize == IMB_PROXY_NONE || ((size_flags & psize) != psize)) {
return NULL;
}
@@ -3603,6 +3603,7 @@ Sequence *sequencer_add_image_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
#ifdef WITH_AUDASPACE
Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo *seq_load)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C); /* only for sound */
Editing *ed= seq_give_editing(scene, TRUE);
bSound *sound;
@@ -3624,7 +3625,7 @@ Sequence *sequencer_add_sound_strip(bContext *C, ListBase *seqbasep, SeqLoadInfo
info = AUD_getInfo(sound->playback_handle);
if (info.specs.channels == AUD_CHANNELS_INVALID) {
- sound_delete(C, sound);
+ sound_delete(bmain, sound);
//if(op)
// BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
return NULL;
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index 7b04a72666d..d2d22aa213a 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -134,16 +134,6 @@ static void space_transform_invert_normal(const SpaceTransform *data, float *no)
}
/*
- * Returns the squared distance between two given points
- */
-static float squared_dist(const float *a, const float *b)
-{
- float tmp[3];
- VECSUB(tmp, a, b);
- return INPR(tmp, tmp);
-}
-
-/*
* Shrinkwrap to the nearest vertex
*
* it builds a kdtree of vertexs we can attach to and then
@@ -195,7 +185,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
//so we can initiate the "nearest.dist" with the expected value to that last hit.
//This will lead in prunning of the search tree.
if(nearest.index != -1)
- nearest.dist = squared_dist(tmp_co, nearest.co);
+ nearest.dist = len_squared_v3v3(tmp_co, nearest.co);
else
nearest.dist = FLT_MAX;
@@ -328,7 +318,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
normalize_v3(proj_axis);
//Invalid projection direction
- if(INPR(proj_axis, proj_axis) < FLT_EPSILON)
+ if(dot_v3v3(proj_axis, proj_axis) < FLT_EPSILON)
return;
}
@@ -469,7 +459,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
//so we can initiate the "nearest.dist" with the expected value to that last hit.
//This will lead in prunning of the search tree.
if(nearest.index != -1)
- nearest.dist = squared_dist(tmp_co, nearest.co);
+ nearest.dist = len_squared_v3v3(tmp_co, nearest.co);
else
nearest.dist = FLT_MAX;
diff --git a/source/blender/blenkernel/intern/sketch.c b/source/blender/blenkernel/intern/sketch.c
index 4cc5a880625..432dc9ec609 100644
--- a/source/blender/blenkernel/intern/sketch.c
+++ b/source/blender/blenkernel/intern/sketch.c
@@ -245,13 +245,13 @@ void sk_straightenStroke(SK_Stroke *stk, int start, int end, float p_start[3], f
prev = stk->points + start;
next = stk->points + end;
- VECCOPY(pt1.p, p_start);
- VECCOPY(pt1.no, prev->no);
+ copy_v3_v3(pt1.p, p_start);
+ copy_v3_v3(pt1.no, prev->no);
pt1.mode = prev->mode;
pt1.type = prev->type;
- VECCOPY(pt2.p, p_end);
- VECCOPY(pt2.no, next->no);
+ copy_v3_v3(pt2.p, p_end);
+ copy_v3_v3(pt2.no, next->no);
pt2.mode = next->mode;
pt2.type = next->type;
@@ -323,7 +323,7 @@ void sk_flattenStroke(SK_Stroke *stk, int start, int end)
total = end - start + 1;
- VECCOPY(normal, stk->points[start].no);
+ copy_v3_v3(normal, stk->points[start].no);
sub_v3_v3v3(distance, stk->points[end].p, stk->points[start].p);
project_v3_v3v3(normal, distance, normal);
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 74f4830b86c..73d0d70778f 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -1,11 +1,35 @@
+/*
+ * $Id$
+ *
+ * ***** 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/blenkernel/intern/sound.c
* \ingroup bke
*/
-/**
- * sound.c (mar-2001 nzc)
- *
- * $Id$
- */
#include <string.h>
#include <stdlib.h>
@@ -203,7 +227,7 @@ void sound_exit(void)
// XXX unused currently
#if 0
-struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source)
+struct bSound* sound_new_buffer(struct Main *bmain, struct bSound *source)
{
bSound* sound = NULL;
@@ -211,23 +235,23 @@ struct bSound* sound_new_buffer(struct bContext *C, struct bSound *source)
strcpy(name, "buf_");
strcpy(name + 4, source->id.name);
- sound = alloc_libblock(&CTX_data_main(C)->sound, ID_SO, name);
+ sound = alloc_libblock(&bmain->sound, ID_SO, name);
sound->child_sound = source;
sound->type = SOUND_TYPE_BUFFER;
- sound_load(CTX_data_main(C), sound);
+ sound_load(bmain, sound);
if(!sound->playback_handle)
{
- free_libblock(&CTX_data_main(C)->sound, sound);
+ free_libblock(&bmain->sound, sound);
sound = NULL;
}
return sound;
}
-struct bSound* sound_new_limiter(struct bContext *C, 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;
@@ -235,18 +259,18 @@ struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, floa
strcpy(name, "lim_");
strcpy(name + 4, source->id.name);
- sound = alloc_libblock(&CTX_data_main(C)->sound, ID_SO, name);
+ sound = alloc_libblock(&bmain->sound, ID_SO, name);
sound->child_sound = source;
sound->start = start;
sound->end = end;
sound->type = SOUND_TYPE_LIMITER;
- sound_load(CTX_data_main(C), sound);
+ sound_load(bmain, sound);
if(!sound->playback_handle)
{
- free_libblock(&CTX_data_main(C)->sound, sound);
+ free_libblock(&bmain->sound, sound);
sound = NULL;
}
@@ -254,13 +278,13 @@ struct bSound* sound_new_limiter(struct bContext *C, struct bSound *source, floa
}
#endif
-void sound_delete(struct bContext *C, struct bSound* sound)
+void sound_delete(struct Main *bmain, struct bSound* sound)
{
if(sound)
{
sound_free(sound);
- free_libblock(&CTX_data_main(C)->sound, sound);
+ free_libblock(&bmain->sound, sound);
}
}
@@ -538,10 +562,11 @@ void sound_stop_scene(struct Scene *scene)
}
}
-void sound_seek_scene(struct bContext *C)
+void sound_seek_scene(struct Main *bmain, struct Scene *scene)
{
- struct Scene *scene = CTX_data_scene(C);
AUD_Status status;
+ bScreen *screen;
+ int animation_playing;
AUD_lock();
@@ -560,7 +585,12 @@ void sound_seek_scene(struct bContext *C)
AUD_pause(scene->sound_scene_handle);
}
- if(scene->audio.flag & AUDIO_SCRUB && !CTX_wm_screen(C)->animtimer)
+ animation_playing = 0;
+ 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)
{
@@ -758,7 +788,7 @@ void sound_move_scene_sound(struct Scene *UNUSED(scene), void* UNUSED(handle), i
static void sound_start_play_scene(struct Scene *UNUSED(scene)) {}
void sound_play_scene(struct Scene *UNUSED(scene)) {}
void sound_stop_scene(struct Scene *UNUSED(scene)) {}
-void sound_seek_scene(struct bContext *UNUSED(C)) {}
+void sound_seek_scene(struct Main *UNUSED(bmain), struct Scene *UNUSED(scene)) {}
float sound_sync_scene(struct Scene *UNUSED(scene)) { return 0.0f; }
int sound_scene_playing(struct Scene *UNUSED(scene)) { return -1; }
int sound_read_sound_buffer(struct bSound* UNUSED(sound), float* UNUSED(buffer), int UNUSED(length), float UNUSED(start), float UNUSED(end)) { return 0; }
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index bcba812fe24..5e85e82a7fc 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -61,9 +61,7 @@
#include "BKE_scene.h"
#include "BKE_subsurf.h"
-
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
+#include "GL/glew.h"
#include "GPU_draw.h"
#include "GPU_extensions.h"
@@ -71,6 +69,8 @@
#include "CCGSubSurf.h"
+extern GLubyte stipple_quarttone[128]; /* glutil.c, bad level data */
+
static int ccgDM_getVertMapIndex(CCGSubSurf *ss, CCGVert *v);
static int ccgDM_getEdgeMapIndex(CCGSubSurf *ss, CCGEdge *e);
static int ccgDM_getFaceMapIndex(CCGSubSurf *ss, CCGFace *f);
@@ -968,8 +968,9 @@ static void ccgDM_copyFinalFaceArray(DerivedMesh *dm, MFace *mface)
for(index = 0; index < totface; index++) {
CCGFace *f = ccgdm->faceMap[index].face;
int x, y, S, numVerts = ccgSubSurf_getFaceNumVerts(f);
- int flag = (faceFlags)? faceFlags[index*2]: ME_SMOOTH;
- int mat_nr = (faceFlags)? faceFlags[index*2+1]: 0;
+ /* keep types in sync with MFace, avoid many conversions */
+ char flag = (faceFlags)? faceFlags[index*2]: ME_SMOOTH;
+ short mat_nr = (faceFlags)? faceFlags[index*2+1]: 0;
for(S = 0; S < numVerts; S++) {
for(y = 0; y < gridSize - 1; y++) {
@@ -1374,11 +1375,10 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, v
CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
GPUVertexAttribs gattribs;
DMVertexAttribs attribs= {{{NULL}}};
- MTFace *tf = dm->getFaceDataArray(dm, CD_MTFACE);
+ /* MTFace *tf = dm->getFaceDataArray(dm, CD_MTFACE); */ /* UNUSED */
int gridSize = ccgSubSurf_getGridSize(ss);
int gridFaces = gridSize - 1;
int edgeSize = ccgSubSurf_getEdgeSize(ss);
- int transp, orig_transp, new_transp;
char *faceFlags = ccgdm->faceFlags;
int a, b, i, doDraw, numVerts, matnr, new_matnr, totface;
@@ -1386,8 +1386,6 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, v
doDraw = 0;
matnr = -1;
- transp = GPU_get_material_blend_mode();
- orig_transp = transp;
#define PASSATTRIB(dx, dy, vert) { \
if(attribs.totorco) { \
@@ -1439,18 +1437,6 @@ static void ccgDM_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, v
continue;
}
- if(tf) {
- new_transp = tf[i].transp;
-
- if(new_transp != transp) {
- if(new_transp == GPU_BLEND_SOLID && orig_transp != GPU_BLEND_SOLID)
- GPU_set_material_blend_mode(orig_transp);
- else
- GPU_set_material_blend_mode(new_transp);
- transp = new_transp;
- }
- }
-
glShadeModel(drawSmooth? GL_SMOOTH: GL_FLAT);
for (S=0; S<numVerts; S++) {
DMGridData *faceGridData = ccgSubSurf_getFaceGridDataArray(ss, f, S);
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 493baebd197..38165182d83 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -766,7 +766,9 @@ Tex *copy_texture(Tex *tex)
if(tex->preview) texn->preview = BKE_previewimg_copy(tex->preview);
if(tex->nodetree) {
- ntreeEndExecTree(tex->nodetree);
+ if (tex->nodetree->execdata) {
+ ntreeTexEndExecTree(tex->nodetree->execdata, 1);
+ }
texn->nodetree= ntreeCopyTree(tex->nodetree);
}
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 72fe1c19884..8aeef0d84b1 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -345,7 +345,7 @@ static int unit_as_string(char *str, int len_max, double value, int prec, bUnitC
/* Convert to a string */
{
- len= BLI_snprintf(str, len_max, "%.*lf", prec, value_conv);
+ len= BLI_snprintf(str, len_max, "%.*f", prec, value_conv);
if(len >= len_max)
len= len_max;
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index 59c01348c07..21d28ca3185 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -53,6 +53,7 @@ int BLI_exists(const char *file);
int BLI_copy_fileops(const char *file, const char *to);
int BLI_rename(const char *from, const char *to);
int BLI_gzip(const char *from, const char *to);
+char *BLI_ungzip_to_mem(const char *from_file, int *size_r);
int BLI_delete(const char *file, int dir, int recursive);
int BLI_move(const char *file, const char *to);
int BLI_touch(const char *file);
diff --git a/source/blender/blenlib/BLI_math_inline.h b/source/blender/blenlib/BLI_math_inline.h
index 0f8493e25a6..4309e6122df 100644
--- a/source/blender/blenlib/BLI_math_inline.h
+++ b/source/blender/blenlib/BLI_math_inline.h
@@ -45,7 +45,12 @@ extern "C" {
#define MALWAYS_INLINE MINLINE
#else
#define MINLINE static inline
+#if (defined(__APPLE__) && defined(__ppc__))
+/* static inline __attribute__ here breaks osx ppc gcc42 build */
#define MALWAYS_INLINE static __attribute__((always_inline))
+#else
+#define MALWAYS_INLINE static inline __attribute__((always_inline))
+#endif
#endif
#else
#define MINLINE
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index d8719f399ae..d6a8f0fb925 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -66,6 +66,9 @@ void swap_m4m4(float A[4][4], float B[4][4]);
void add_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]);
void add_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]);
+void sub_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]);
+void sub_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]);
+
void mul_m3_m3m3(float R[3][3], float A[3][3], float B[3][3]);
void mul_m4_m4m4(float R[4][4], float A[4][4], float B[4][4]);
void mul_m4_m3m4(float R[4][4], float A[3][3], float B[4][4]);
@@ -80,7 +83,7 @@ void mul_serie_m4(float R[4][4],
float M5[4][4], float M6[4][4], float M7[4][4], float M8[4][4]);
void mul_m4_v3(float M[4][4], float r[3]);
-void mul_v3_m4v3(float r[3], float M[4][4], float v[3]);
+void mul_v3_m4v3(float r[3], float M[4][4], const float v[3]);
void mul_mat3_m4_v3(float M[4][4], float r[3]);
void mul_m4_v4(float M[4][4], float r[4]);
void mul_v4_m4v4(float r[4], float M[4][4], float v[4]);
diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h
index ef20408a37e..d7ca03243df 100644
--- a/source/blender/blenlib/BLI_math_rotation.h
+++ b/source/blender/blenlib/BLI_math_rotation.h
@@ -102,6 +102,8 @@ void quat_to_axis_angle(float axis[3], float *angle, const float q[4]);
void mat3_to_axis_angle(float axis[3], float *angle, float M[3][3]);
void mat4_to_axis_angle(float axis[3], float *angle, float M[4][4]);
+void single_axis_angle_to_mat3(float R[3][3], const char axis, const float angle);
+
/****************************** Vector/Rotation ******************************/
/* old axis angle code */
/* TODO: the following calls should probably be depreceated sometime */
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index c8b598a1e85..a807a395b78 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -56,6 +56,12 @@ MINLINE void swap_v2_v2(float a[2], float b[2]);
MINLINE void swap_v3_v3(float a[3], float b[3]);
MINLINE void swap_v4_v4(float a[4], float b[4]);
+/* short */
+MINLINE void copy_v2_v2_short(short r[2], const short a[2]);
+MINLINE void copy_v3_v3_short(short r[3], const short a[3]);
+MINLINE void copy_v4_v4_short(short r[4], const short a[4]);
+
+
/********************************* Arithmetic ********************************/
MINLINE void add_v3_fl(float r[3], float f);
@@ -124,6 +130,7 @@ void interp_v3_v3v3v3(float p[3], const float v1[3], const float v2[3], const fl
void interp_v3_v3v3v3v3(float p[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3], const float w[4]);
void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t);
void interp_v4_v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float w[3]);
+void interp_v4_v4v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float v4[4], const float w[4]);
void mid_v3_v3v3(float r[3], const float a[3], const float b[3]);
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index 4a0c2ab9482..c53ce9dced5 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -139,12 +139,15 @@ size_t BLI_strnlen(const char *str, size_t maxlen);
void BLI_timestr(double _time, char *str); /* time var is global */
-int BLI_utf8_invalid_byte(const char *str, int length);
-int BLI_utf8_invalid_strip(char *str, int length);
-
void BLI_ascii_strtolower(char *str, int len);
void BLI_ascii_strtoupper(char *str, int len);
+
+/* string_utf8.c - may move these into their own header some day - campbell */
+char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy);
+int BLI_utf8_invalid_byte(const char *str, int length);
+int BLI_utf8_invalid_strip(char *str, int length);
+
#ifdef __cplusplus
}
#endif
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 1a1f7be2471..456ee72c4e0 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -35,11 +35,11 @@
*/
#ifndef FALSE
-#define FALSE 0
+# define FALSE 0
#endif
#ifndef TRUE
-#define TRUE 1
+# define TRUE 1
#endif
@@ -94,7 +94,7 @@
/* some math and copy defines */
#ifndef SWAP
-#define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
+# define SWAP(type, a, b) { type sw_ap; sw_ap=(a); (a)=(b); (b)=sw_ap; }
#endif
#define ABS(a) ( (a)<0 ? (-(a)) : (a) )
@@ -176,6 +176,12 @@
/* useful for debugging */
#define AT __FILE__ ":" STRINGIFY(__LINE__)
+/* so we can use __func__ everywhere */
+#if defined(_MSC_VER)
+# define __func__ __FUNCTION__
+#endif
+
+
/* UNUSED macro, for function argument */
#ifdef __GNUC__
# define UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
diff --git a/source/blender/blenlib/BLI_voxel.h b/source/blender/blenlib/BLI_voxel.h
index 41f8bfab729..8dd95a897ae 100644
--- a/source/blender/blenlib/BLI_voxel.h
+++ b/source/blender/blenlib/BLI_voxel.h
@@ -36,9 +36,9 @@
#define V_I(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, int *res, float *co);
-float voxel_sample_trilinear(float *data, int *res, float *co);
-float voxel_sample_triquadratic(float *data, int *res, float *co);
-float voxel_sample_tricubic(float *data, int *res, float *co, int bspline);
+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);
#endif /* BLI_VOXEL_H */
diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt
index b4fc983008c..aa822731474 100644
--- a/source/blender/blenlib/CMakeLists.txt
+++ b/source/blender/blenlib/CMakeLists.txt
@@ -80,6 +80,7 @@ set(SRC
intern/scanfill.c
intern/storage.c
intern/string.c
+ intern/string_utf8.c
intern/threads.c
intern/time.c
intern/uvproject.c
diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c
index dcbe043f0d0..eae4f918a67 100644
--- a/source/blender/blenlib/intern/BLI_kdopbvh.c
+++ b/source/blender/blenlib/intern/BLI_kdopbvh.c
@@ -408,7 +408,7 @@ static void create_kdop_hull(BVHTree *tree, BVHNode *node, float *co, int numpoi
// for all Axes.
for (i = tree->start_axis; i < tree->stop_axis; i++)
{
- newminmax = INPR(&co[k * 3], KDOP_AXES[i]);
+ newminmax = dot_v3v3(&co[k * 3], KDOP_AXES[i]);
if (newminmax < bv[2 * i])
bv[2 * i] = newminmax;
if (newminmax > bv[(2 * i) + 1])
@@ -1193,17 +1193,6 @@ BVHTreeOverlap *BLI_bvhtree_overlap(BVHTree *tree1, BVHTree *tree2, unsigned int
return overlap;
}
-
-/*
- * Nearest neighbour - BLI_bvhtree_find_nearest
- */
-static float squared_dist(const float *a, const float *b)
-{
- float tmp[3];
- VECSUB(tmp, a, b);
- return INPR(tmp, tmp);
-}
-
//Determines the nearest point of the given node BV. Returns the squared distance to that point.
static float calc_nearest_point(const float *proj, BVHNode *node, float *nearest)
{
@@ -1226,7 +1215,7 @@ static float calc_nearest_point(const float *proj, BVHNode *node, float *nearest
VECCOPY(nearest, data->co);
for(i = data->tree->start_axis; i != data->tree->stop_axis; i++, bv+=2)
{
- float proj = INPR( nearest, KDOP_AXES[i]);
+ float proj = dot_v3v3( nearest, KDOP_AXES[i]);
float dl = bv[0] - proj;
float du = bv[1] - proj;
@@ -1240,7 +1229,7 @@ static float calc_nearest_point(const float *proj, BVHNode *node, float *nearest
}
}
*/
- return squared_dist(proj, nearest);
+ return len_squared_v3v3(proj, nearest);
}
@@ -1404,7 +1393,7 @@ int BLI_bvhtree_find_nearest(BVHTree *tree, const float *co, BVHTreeNearest *nea
for(i = data.tree->start_axis; i != data.tree->stop_axis; i++)
{
- data.proj[i] = INPR(data.co, KDOP_AXES[i]);
+ data.proj[i] = dot_v3v3(data.co, KDOP_AXES[i]);
}
if(nearest)
@@ -1596,7 +1585,7 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float
for(i=0; i<3; i++)
{
- data.ray_dot_axis[i] = INPR( data.ray.direction, KDOP_AXES[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)
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 3299752646b..9ccd7fbe121 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -52,6 +52,8 @@
#include <sys/param.h>
#endif
+#include "MEM_guardedalloc.h"
+
#include "BLI_blenlib.h"
#include "BKE_utildefines.h"
@@ -104,6 +106,49 @@ int BLI_gzip(const char *from, const char *to) {
return rval;
}
+/* gzip the file in from_file and write it to memery to_mem, at most size bytes.
+ return the unziped size
+ */
+char *BLI_ungzip_to_mem(const char *from_file, int *size_r)
+{
+ gzFile gzfile;
+ int readsize, size, alloc_size=0;
+ char *mem= NULL;
+ const int chunk_size= 512*1024;
+
+ size= 0;
+
+ gzfile = gzopen( from_file, "rb" );
+
+ for(;;) {
+ if(mem==NULL) {
+ mem= MEM_callocN(chunk_size, "BLI_ungzip_to_mem");
+ alloc_size= chunk_size;
+ } else {
+ mem= MEM_reallocN(mem, size+chunk_size);
+ alloc_size+= chunk_size;
+ }
+
+ readsize= gzread(gzfile, mem+size, chunk_size);
+ if(readsize>0) {
+ size+= readsize;
+ }
+ else break;
+ }
+
+ if(size==0) {
+ MEM_freeN(mem);
+ mem= NULL;
+ }
+ else if(alloc_size!=size)
+ mem= MEM_reallocN(mem, size);
+
+ *size_r= size;
+
+ return mem;
+}
+
+
/* return 1 when file can be written */
int BLI_is_writable(const char *filename)
{
diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c
index 2e26f4bd9c9..8b9cddcc1d1 100644
--- a/source/blender/blenlib/intern/graph.c
+++ b/source/blender/blenlib/intern/graph.c
@@ -591,7 +591,7 @@ static void testRadialSymmetry(BGraph *graph, BNode* root_node, RadialArc* ring,
node1 = BLI_otherNode(ring[i].arc, root_node);
node2 = BLI_otherNode(ring[j].arc, root_node);
- VECCOPY(p, node2->p);
+ copy_v3_v3(p, node2->p);
BLI_mirrorAlongAxis(p, root_node->p, normal);
/* check if it's within limit before continuing */
@@ -605,7 +605,7 @@ static void testRadialSymmetry(BGraph *graph, BNode* root_node, RadialArc* ring,
if (symmetric)
{
/* mark node as symmetric physically */
- VECCOPY(root_node->symmetry_axis, axis);
+ copy_v3_v3(root_node->symmetry_axis, axis);
root_node->symmetry_flag |= SYM_PHYSICAL;
root_node->symmetry_flag |= SYM_RADIAL;
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index 3c79a77707a..20c503de2c3 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -306,7 +306,7 @@ void mul_serie_m4(float answ[][4], float m1[][4],
}
}
-void mul_m4_v3(float mat[][4], float *vec)
+void mul_m4_v3(float mat[][4], float vec[3])
{
float x,y;
@@ -317,7 +317,7 @@ void mul_m4_v3(float mat[][4], float *vec)
vec[2]=x*mat[0][2] + y*mat[1][2] + mat[2][2]*vec[2] + mat[3][2];
}
-void mul_v3_m4v3(float *in, float mat[][4], float *vec)
+void mul_v3_m4v3(float in[3], float mat[][4], const float vec[3])
{
float x,y;
@@ -329,7 +329,7 @@ void mul_v3_m4v3(float *in, float mat[][4], float *vec)
}
/* same as mul_m4_v3() but doesnt apply translation component */
-void mul_mat3_m4_v3(float mat[][4], float *vec)
+void mul_mat3_m4_v3(float mat[][4], float vec[3])
{
float x,y;
@@ -384,7 +384,7 @@ void mul_m3_v3(float M[3][3], float r[3])
copy_v3_v3(r, tmp);
}
-void mul_transposed_m3_v3(float mat[][3], float *vec)
+void mul_transposed_m3_v3(float mat[][3], float vec[3])
{
float x,y;
@@ -422,7 +422,7 @@ void mul_mat3_m4_fl(float m[4][4], float f)
m[i][j] *= f;
}
-void mul_m3_v3_double(float mat[][3], double *vec)
+void mul_m3_v3_double(float mat[][3], double vec[3])
{
double x,y;
@@ -451,6 +451,24 @@ void add_m4_m4m4(float m1[][4], float m2[][4], float m3[][4])
m1[i][j]= m2[i][j] + m3[i][j];
}
+void sub_m3_m3m3(float m1[][3], float m2[][3], float m3[][3])
+{
+ int i, j;
+
+ for(i=0;i<3;i++)
+ for(j=0;j<3;j++)
+ m1[i][j]= m2[i][j] - m3[i][j];
+}
+
+void sub_m4_m4m4(float m1[][4], float m2[][4], float m3[][4])
+{
+ int i, j;
+
+ for(i=0;i<4;i++)
+ for(j=0;j<4;j++)
+ m1[i][j]= m2[i][j] - m3[i][j];
+}
+
int invert_m3(float m[3][3])
{
float tmp[3][3];
@@ -961,14 +979,14 @@ void size_to_mat4(float mat[][4], const float size[3])
copy_m4_m3(mat, tmat);
}
-void mat3_to_size(float *size, float mat[][3])
+void mat3_to_size(float size[3], float mat[][3])
{
size[0]= len_v3(mat[0]);
size[1]= len_v3(mat[1]);
size[2]= len_v3(mat[2]);
}
-void mat4_to_size(float *size, float mat[][4])
+void mat4_to_size(float size[3], float mat[][4])
{
size[0]= len_v3(mat[0]);
size[1]= len_v3(mat[1]);
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index 6800b59c2c7..ef286e1d102 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -771,6 +771,52 @@ void mat4_to_axis_angle(float axis[3], float *angle,float mat[4][4])
quat_to_axis_angle(axis, angle,q);
}
+
+
+void single_axis_angle_to_mat3(float mat[3][3], const char axis, const float angle)
+{
+ const float angle_cos= cosf(angle);
+ const float angle_sin= sinf(angle);
+
+ switch(axis) {
+ case 'X': /* rotation around X */
+ mat[0][0] = 1.0f;
+ mat[0][1] = 0.0f;
+ mat[0][2] = 0.0f;
+ mat[1][0] = 0.0f;
+ mat[1][1] = angle_cos;
+ mat[1][2] = angle_sin;
+ mat[2][0] = 0.0f;
+ mat[2][1] = -angle_sin;
+ mat[2][2] = angle_cos;
+ break;
+ case 'Y': /* rotation around Y */
+ mat[0][0] = angle_cos;
+ mat[0][1] = 0.0f;
+ mat[0][2] = -angle_sin;
+ mat[1][0] = 0.0f;
+ mat[1][1] = 1.0f;
+ mat[1][2] = 0.0f;
+ mat[2][0] = angle_sin;
+ mat[2][1] = 0.0f;
+ mat[2][2] = angle_cos;
+ break;
+ case 'Z': /* rotation around Z */
+ mat[0][0] = angle_cos;
+ mat[0][1] = angle_sin;
+ mat[0][2] = 0.0f;
+ mat[1][0] = -angle_sin;
+ mat[1][1] = angle_cos;
+ mat[1][2] = 0.0f;
+ mat[2][0] = 0.0f;
+ mat[2][1] = 0.0f;
+ mat[2][2] = 1.0f;
+ break;
+ default:
+ assert("invalid axis");
+ }
+}
+
/****************************** Vector/Rotation ******************************/
/* TODO: the following calls should probably be depreceated sometime */
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index 15d671e38d7..7dbceff46e4 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -96,6 +96,14 @@ void interp_v4_v4v4v4(float p[4], const float v1[4], const float v2[4], const fl
p[3] = v1[3]*w[0] + v2[3]*w[1] + v3[3]*w[2];
}
+void interp_v4_v4v4v4v4(float p[4], const float v1[4], const float v2[4], const float v3[4], const float v4[4], const float w[4])
+{
+ p[0] = v1[0]*w[0] + v2[0]*w[1] + v3[0]*w[2] + v4[0]*w[3];
+ p[1] = v1[1]*w[0] + v2[1]*w[1] + v3[1]*w[2] + v4[1]*w[3];
+ p[2] = v1[2]*w[0] + v2[2]*w[1] + v3[2]*w[2] + v4[2]*w[3];
+ p[3] = v1[3]*w[0] + v2[3]*w[1] + v3[3]*w[2] + v4[3]*w[3];
+}
+
void mid_v3_v3v3(float v[3], const float v1[3], const float v2[3])
{
v[0]= 0.5f*(v1[0] + v2[0]);
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index 28708af7486..13623d9a93a 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -79,6 +79,28 @@ MINLINE void copy_v4_v4(float r[4], const float a[4])
r[3]= a[3];
}
+/* short */
+MINLINE void copy_v2_v2_short(short r[2], const short a[2])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+}
+
+MINLINE void copy_v3_v3_short(short r[3], const short a[3])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+ r[2]= a[2];
+}
+
+MINLINE void copy_v4_v4_short(short r[4], const short a[4])
+{
+ r[0]= a[0];
+ r[1]= a[1];
+ r[2]= a[2];
+ r[3]= a[3];
+}
+
MINLINE void swap_v2_v2(float a[2], float b[2])
{
SWAP(float, a[0], b[0]);
diff --git a/source/blender/blenlib/intern/noise.c b/source/blender/blenlib/intern/noise.c
index 9bc666dc971..9efe8dc9739 100644
--- a/source/blender/blenlib/intern/noise.c
+++ b/source/blender/blenlib/intern/noise.c
@@ -263,13 +263,21 @@ static float newPerlinU(float x, float y, float z)
static float orgBlenderNoise(float x, float y, float z)
{
register float cn1, cn2, cn3, cn4, cn5, cn6, i, *h;
- float ox, oy, oz, jx, jy, jz;
+ float fx, fy, fz, ox, oy, oz, jx, jy, jz;
float n= 0.5;
int ix, iy, iz, b00, b01, b10, b11, b20, b21;
- ox= (x- (ix= (int)floor(x)) );
- oy= (y- (iy= (int)floor(y)) );
- oz= (z- (iz= (int)floor(z)) );
+ fx= floor(x);
+ fy= floor(y);
+ fz= floor(z);
+
+ ox= x- fx;
+ oy= y- fy;
+ oz= z- fz;
+
+ ix= (int)fx;
+ iy= (int)fy;
+ iz= (int)fz;
jx= ox-1;
jy= oy-1;
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c
index c4ed44f0cdb..8315161aeda 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -1,8 +1,4 @@
-/* util.c
- *
- * various string, file, list operations.
- *
- *
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -129,7 +125,7 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen)
while(len < maxlen) {
switch(*src) {
case '\0':
- break;
+ goto escape_finish;
case '\\':
case '"':
@@ -154,6 +150,8 @@ size_t BLI_strescape(char *dst, const char *src, const size_t maxlen)
len++;
}
+escape_finish:
+
*dst= '\0';
return len;
@@ -397,116 +395,6 @@ size_t BLI_strnlen(const char *str, size_t maxlen)
return end ? (size_t) (end - str) : maxlen;
}
-/* from libswish3, originally called u8_isvalid(),
- * modified to return the index of the bad character (byte index not utf).
- * http://svn.swish-e.org/libswish3/trunk/src/libswish3/utf8.c r3044 - campbell */
-
-/* based on the valid_utf8 routine from the PCRE library by Philip Hazel
-
- length is in bytes, since without knowing whether the string is valid
- 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
-};
-
-int BLI_utf8_invalid_byte(const char *str, int length)
-{
- const unsigned char *p, *pend = (unsigned char*)str + length;
- unsigned char c;
- int ab;
-
- for (p = (unsigned char*)str; p < pend; p++) {
- c = *p;
- if (c < 128)
- continue;
- if ((c & 0xc0) != 0xc0)
- goto utf8_error;
- ab = trailingBytesForUTF8[c];
- if (length < ab)
- goto utf8_error;
- length -= ab;
-
- p++;
- /* Check top bits in the second byte */
- if ((*p & 0xc0) != 0x80)
- goto utf8_error;
-
- /* Check for overlong sequences for each different length */
- switch (ab) {
- /* Check for xx00 000x */
- case 1:
- if ((c & 0x3e) == 0) goto utf8_error;
- continue; /* We know there aren't any more bytes to check */
-
- /* Check for 1110 0000, xx0x xxxx */
- case 2:
- if (c == 0xe0 && (*p & 0x20) == 0) goto utf8_error;
- break;
-
- /* Check for 1111 0000, xx00 xxxx */
- case 3:
- if (c == 0xf0 && (*p & 0x30) == 0) goto utf8_error;
- break;
-
- /* Check for 1111 1000, xx00 0xxx */
- case 4:
- if (c == 0xf8 && (*p & 0x38) == 0) goto utf8_error;
- break;
-
- /* Check for leading 0xfe or 0xff,
- and then for 1111 1100, xx00 00xx */
- case 5:
- if (c == 0xfe || c == 0xff ||
- (c == 0xfc && (*p & 0x3c) == 0)) goto utf8_error;
- break;
- }
-
- /* Check for valid bytes after the 2nd, if any; all must start 10 */
- while (--ab > 0) {
- if ((*(p+1) & 0xc0) != 0x80) goto utf8_error;
- p++; /* do this after so we get usable offset - campbell */
- }
- }
-
- return -1;
-
-utf8_error:
-
- return (int)((char *)p - (char *)str) - 1;
-}
-
-int BLI_utf8_invalid_strip(char *str, int length)
-{
- int bad_char, tot= 0;
-
- while((bad_char= BLI_utf8_invalid_byte(str, length)) != -1) {
- str += bad_char;
- length -= bad_char;
-
- if(length == 0) {
- /* last character bad, strip it */
- *str= '\0';
- tot++;
- break;
- }
- else {
- /* strip, keep looking */
- memmove(str, str + 1, length);
- tot++;
- }
- }
-
- return tot;
-}
-
void BLI_ascii_strtolower(char *str, int len)
{
int i;
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
new file mode 100644
index 00000000000..961a41690f7
--- /dev/null
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -0,0 +1,185 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Campbell Barton.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+ /** \file blender/blenlib/intern/string_utf8.c
+ * \ingroup bli
+ */
+
+#include <string.h>
+
+#include "BLI_string.h"
+
+/* from libswish3, originally called u8_isvalid(),
+ * modified to return the index of the bad character (byte index not utf).
+ * http://svn.swish-e.org/libswish3/trunk/src/libswish3/utf8.c r3044 - campbell */
+
+/* based on the valid_utf8 routine from the PCRE library by Philip Hazel
+
+ length is in bytes, since without knowing whether the string is valid
+ 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
+};
+
+int BLI_utf8_invalid_byte(const char *str, int length)
+{
+ const unsigned char *p, *pend = (unsigned char*)str + length;
+ unsigned char c;
+ int ab;
+
+ for (p = (unsigned char*)str; p < pend; p++) {
+ c = *p;
+ if (c < 128)
+ continue;
+ if ((c & 0xc0) != 0xc0)
+ goto utf8_error;
+ ab = trailingBytesForUTF8[c];
+ if (length < ab)
+ goto utf8_error;
+ length -= ab;
+
+ p++;
+ /* Check top bits in the second byte */
+ if ((*p & 0xc0) != 0x80)
+ goto utf8_error;
+
+ /* Check for overlong sequences for each different length */
+ switch (ab) {
+ /* Check for xx00 000x */
+ case 1:
+ if ((c & 0x3e) == 0) goto utf8_error;
+ continue; /* We know there aren't any more bytes to check */
+
+ /* Check for 1110 0000, xx0x xxxx */
+ case 2:
+ if (c == 0xe0 && (*p & 0x20) == 0) goto utf8_error;
+ break;
+
+ /* Check for 1111 0000, xx00 xxxx */
+ case 3:
+ if (c == 0xf0 && (*p & 0x30) == 0) goto utf8_error;
+ break;
+
+ /* Check for 1111 1000, xx00 0xxx */
+ case 4:
+ if (c == 0xf8 && (*p & 0x38) == 0) goto utf8_error;
+ break;
+
+ /* Check for leading 0xfe or 0xff,
+ and then for 1111 1100, xx00 00xx */
+ case 5:
+ if (c == 0xfe || c == 0xff ||
+ (c == 0xfc && (*p & 0x3c) == 0)) goto utf8_error;
+ break;
+ }
+
+ /* Check for valid bytes after the 2nd, if any; all must start 10 */
+ while (--ab > 0) {
+ if ((*(p+1) & 0xc0) != 0x80) goto utf8_error;
+ p++; /* do this after so we get usable offset - campbell */
+ }
+ }
+
+ return -1;
+
+utf8_error:
+
+ return (int)((char *)p - (char *)str) - 1;
+}
+
+int BLI_utf8_invalid_strip(char *str, int length)
+{
+ int bad_char, tot= 0;
+
+ while((bad_char= BLI_utf8_invalid_byte(str, length)) != -1) {
+ str += bad_char;
+ length -= bad_char;
+
+ if(length == 0) {
+ /* last character bad, strip it */
+ *str= '\0';
+ tot++;
+ break;
+ }
+ else {
+ /* strip, keep looking */
+ memmove(str, str + 1, length);
+ tot++;
+ }
+ }
+
+ return tot;
+}
+
+
+/* compatible with BLI_strncpy, but esnure no partial utf8 chars */
+
+/* array copied from glib's gutf8.c,
+ * 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
+};
+
+char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy)
+{
+ char *dst_r= dst;
+ size_t utf8_size;
+
+ /* note: currently we dont attempt to deal with invalid utf8 chars */
+
+ while(*src != '\0' && (utf8_size= utf8_skip_data[*src]) < maxncpy) {
+ maxncpy -= utf8_size;
+ switch(utf8_size) {
+ case 6: *dst ++ = *src ++;
+ case 5: *dst ++ = *src ++;
+ case 4: *dst ++ = *src ++;
+ case 3: *dst ++ = *src ++;
+ case 2: *dst ++ = *src ++;
+ case 1: *dst ++ = *src ++;
+ }
+ }
+ *dst= '\0';
+ return dst_r;
+}
+
diff --git a/source/blender/blenlib/intern/voxel.c b/source/blender/blenlib/intern/voxel.c
index d11386ff606..6d912be71d3 100644
--- a/source/blender/blenlib/intern/voxel.c
+++ b/source/blender/blenlib/intern/voxel.c
@@ -36,7 +36,7 @@
-BM_INLINE float D(float *data, int *res, int x, int y, int z)
+BM_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);
@@ -46,7 +46,7 @@ BM_INLINE float D(float *data, int *res, int x, int y, int z)
/* *** nearest neighbour *** */
/* input coordinates must be in bounding box 0.0 - 1.0 */
-float voxel_sample_nearest(float *data, int *res, float *co)
+float voxel_sample_nearest(float *data, const int res[3], const float co[3])
{
int xi, yi, zi;
@@ -71,7 +71,7 @@ BM_INLINE int _clamp(int a, int b, int c)
return (a < b) ? b : ((a > c) ? c : a);
}
-float voxel_sample_trilinear(float *data, int *res, float *co)
+float voxel_sample_trilinear(float *data, const int res[3], const float co[3])
{
if (data) {
@@ -103,7 +103,7 @@ float voxel_sample_trilinear(float *data, int *res, float *co)
}
-float voxel_sample_triquadratic(float *data, int *res, float *co)
+float voxel_sample_triquadratic(float *data, const int res[3], const float co[3])
{
if (data) {
@@ -133,7 +133,7 @@ float voxel_sample_triquadratic(float *data, int *res, float *co)
return 0.f;
}
-float voxel_sample_tricubic(float *data, int *res, float *co, int bspline)
+float voxel_sample_tricubic(float *data, const int res[3], const float co[3], int bspline)
{
if (data) {
diff --git a/source/blender/blenloader/BLO_sys_types.h b/source/blender/blenloader/BLO_sys_types.h
index 2114fc34bf1..4b3902dca43 100644
--- a/source/blender/blenloader/BLO_sys_types.h
+++ b/source/blender/blenloader/BLO_sys_types.h
@@ -93,7 +93,8 @@ typedef unsigned long uintptr_t;
#include <inttypes.h>
#elif defined(FREE_WINDOWS)
-
+/* define htoln here, there must be a syntax error in winsock2.h in MinGW */
+unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
#include <stdint.h>
#else
@@ -105,8 +106,14 @@ typedef unsigned long uintptr_t;
#ifdef _WIN32
+#ifndef FREE_WINDOWS
+#ifndef htonl
#define htonl(x) correctByteOrder(x)
+#endif
+#ifndef ntohl
#define ntohl(x) correctByteOrder(x)
+#endif
+#endif
#elif defined (__FreeBSD__) || defined (__OpenBSD__)
#include <sys/param.h>
#elif defined (__APPLE__)
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 4088481c844..ab00a8e90dd 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -30,6 +30,7 @@ set(INC
../blenlib
../makesdna
../makesrna
+ ../nodes
../render/extern/include
../../../intern/guardedalloc
)
diff --git a/source/blender/blenloader/SConscript b/source/blender/blenloader/SConscript
index be9908d84e6..d5d2df3ea35 100644
--- a/source/blender/blenloader/SConscript
+++ b/source/blender/blenloader/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('intern/*.c')
incs = '. #/intern/guardedalloc ../blenlib ../blenkernel'
incs += ' ../makesdna ../editors/include'
-incs += ' ../render/extern/include ../makesrna'
+incs += ' ../render/extern/include ../makesrna ../nodes'
incs += ' ' + env['BF_ZLIB_INC']
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 9271ae424c9..b8d52ad7477 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -135,6 +135,8 @@
#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
@@ -237,6 +239,7 @@ typedef struct OldNewMap {
/* local prototypes */
static void *read_struct(FileData *fd, BHead *bh, const char *blockname);
static void direct_link_modifiers(FileData *fd, ListBase *lb);
+static void convert_tface_mt(FileData *fd, Main *main);
static OldNewMap *oldnewmap_new(void)
{
@@ -2053,10 +2056,21 @@ static void lib_link_nodetree(FileData *fd, Main *main)
}
}
+static void lib_nodetree_init_types_cb(void *UNUSED(data), ID *UNUSED(id), bNodeTree *ntree)
+{
+ bNode *node;
+
+ ntreeInitTypes(ntree);
+
+ /* XXX could be replaced by do_versions for new nodes */
+ for (node=ntree->nodes.first; node; node=node->next)
+ node_verify_socket_templates(ntree, node);
+}
+
/* updates group node socket own_index so that
* external links to/from the group node are preserved.
*/
-static void lib_node_do_versions_group(bNode *gnode)
+static void lib_node_do_versions_group_indices(bNode *gnode)
{
bNodeTree *ngroup= (bNodeTree*)gnode->id;
bNode *intnode;
@@ -2089,92 +2103,101 @@ static void lib_node_do_versions_group(bNode *gnode)
}
/* updates external links for all group nodes in a tree */
-static void lib_nodetree_do_versions_group(bNodeTree *ntree)
+static void lib_nodetree_do_versions_group_indices_cb(void *UNUSED(data), ID *UNUSED(id), bNodeTree *ntree)
{
bNode *node;
for (node=ntree->nodes.first; node; node=node->next) {
if (node->type==NODE_GROUP) {
bNodeTree *ngroup= (bNodeTree*)node->id;
- if (ngroup && (ngroup->flag & NTREE_DO_VERSIONS))
- lib_node_do_versions_group(node);
+ if (ngroup && (ngroup->flag & NTREE_DO_VERSIONS_GROUP_EXPOSE))
+ lib_node_do_versions_group_indices(node);
}
}
}
+/* make an update call for the tree */
+static void lib_nodetree_do_versions_update_cb(void *UNUSED(data), ID *UNUSED(id), bNodeTree *ntree)
+{
+ if (ntree->update)
+ ntreeUpdateTree(ntree);
+}
+
/* verify types for nodes and groups, all data has to be read */
/* open = 0: appending/linking, open = 1: open new file (need to clean out dynamic
* typedefs*/
static void lib_verify_nodetree(Main *main, int UNUSED(open))
{
- Scene *sce;
- Material *ma;
- Tex *tx;
bNodeTree *ntree;
-
+ int i;
+ bNodeTreeType *ntreetype;
+
/* this crashes blender on undo/redo
if(open==1) {
reinit_nodesystem();
}*/
- /* now create the own typeinfo structs an verify nodes */
- /* here we still assume no groups in groups */
- for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) {
- ntreeVerifyTypes(ntree); /* internal nodes, no groups! */
+ /* set node->typeinfo pointers */
+ for (i=0; i < NUM_NTREE_TYPES; ++i) {
+ ntreetype= ntreeGetType(i);
+ if (ntreetype && ntreetype->foreach_nodetree)
+ ntreetype->foreach_nodetree(main, NULL, lib_nodetree_init_types_cb);
}
+ for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next)
+ lib_nodetree_init_types_cb(NULL, NULL, ntree);
{
- /*int has_old_groups=0;*/ /*UNUSED*/
+ int has_old_groups=0;
/* XXX this should actually be part of do_versions, but since we need
* finished library linking, it is not possible there. Instead in do_versions
* we have set the NTREE_DO_VERSIONS flag, so at this point we can do the
* actual group node updates.
*/
for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) {
- if (ntree->flag & NTREE_DO_VERSIONS) {
+ if (ntree->flag & NTREE_DO_VERSIONS_GROUP_EXPOSE) {
/* this adds copies and links from all unlinked internal sockets to group inputs/outputs. */
- nodeGroupExposeAllSockets(ntree);
- /*has_old_groups = 1;*/ /*UNUSED*/
+ node_group_expose_all_sockets(ntree);
+ has_old_groups = 1;
}
}
- /* now verify all types in material trees, groups are set OK now */
- for(ma= main->mat.first; ma; ma= ma->id.next) {
- if(ma->nodetree)
- lib_nodetree_do_versions_group(ma->nodetree);
- }
- /* and scene trees */
- for(sce= main->scene.first; sce; sce= sce->id.next) {
- if(sce->nodetree)
- lib_nodetree_do_versions_group(sce->nodetree);
- }
- /* and texture trees */
- for(tx= main->tex.first; tx; tx= tx->id.next) {
- if(tx->nodetree)
- lib_nodetree_do_versions_group(tx->nodetree);
+
+ if (has_old_groups) {
+ for (i=0; i < NUM_NTREE_TYPES; ++i) {
+ ntreetype= ntreeGetType(i);
+ if (ntreetype && ntreetype->foreach_nodetree)
+ ntreetype->foreach_nodetree(main, NULL, lib_nodetree_do_versions_group_indices_cb);
+ }
}
for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next)
- ntree->flag &= ~NTREE_DO_VERSIONS;
- }
-
- /* now verify all types in material trees, groups are set OK now */
- for(ma= main->mat.first; ma; ma= ma->id.next) {
- if(ma->nodetree)
- ntreeVerifyTypes(ma->nodetree);
+ ntree->flag &= ~NTREE_DO_VERSIONS_GROUP_EXPOSE;
}
- /* and scene trees */
- for(sce= main->scene.first; sce; sce= sce->id.next) {
- if(sce->nodetree)
- ntreeVerifyTypes(sce->nodetree);
+
+ /* verify all group user nodes */
+ for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next) {
+ ntreeVerifyNodes(main, &ntree->id);
}
- /* and texture trees */
- for(tx= main->tex.first; tx; tx= tx->id.next) {
- if(tx->nodetree)
- ntreeVerifyTypes(tx->nodetree);
+
+ /* make update calls where necessary */
+ {
+ for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next)
+ if (ntree->update)
+ ntreeUpdateTree(ntree);
+ for (i=0; i < NUM_NTREE_TYPES; ++i) {
+ ntreetype= ntreeGetType(i);
+ if (ntreetype && ntreetype->foreach_nodetree)
+ ntreetype->foreach_nodetree(main, NULL, lib_nodetree_do_versions_update_cb);
+ }
}
}
-
+static void direct_link_node_socket(FileData *fd, bNodeSocket *sock)
+{
+ sock->link= newdataadr(fd, sock->link);
+ sock->storage= newdataadr(fd, sock->storage);
+ sock->default_value= newdataadr(fd, sock->default_value);
+ sock->cache= NULL;
+}
/* ntree itself has been read! */
static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
@@ -2186,6 +2209,7 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
ntree->init= 0; /* to set callbacks and force setting types */
ntree->progress= NULL;
+ ntree->execdata= NULL;
ntree->adt= newdataadr(fd, ntree->adt);
direct_link_animdata(fd, ntree->adt);
@@ -2195,12 +2219,15 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
if(node->type == NODE_DYNAMIC) {
node->custom1= 0;
node->custom1= BSET(node->custom1, NODE_DYNAMIC_LOADED);
- node->typeinfo= NULL;
}
+
+ node->typeinfo= NULL;
+
+ link_list(fd, &node->inputs);
+ link_list(fd, &node->outputs);
node->storage= newdataadr(fd, node->storage);
if(node->storage) {
-
/* could be handlerized at some point */
if(ntree->type==NTREE_SHADER && (node->type==SH_NODE_CURVE_VEC || node->type==SH_NODE_CURVE_RGB))
direct_link_curvemapping(fd, node->storage);
@@ -2217,8 +2244,6 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
((ImageUser *)node->storage)->ok= 1;
}
}
- link_list(fd, &node->inputs);
- link_list(fd, &node->outputs);
}
link_list(fd, &ntree->links);
@@ -2228,15 +2253,19 @@ static void direct_link_nodetree(FileData *fd, bNodeTree *ntree)
/* and we connect the rest */
for(node= ntree->nodes.first; node; node= node->next) {
+ node->parent = newdataadr(fd, node->parent);
node->preview= newimaadr(fd, node->preview);
node->lasty= 0;
+
for(sock= node->inputs.first; sock; sock= sock->next)
- sock->link= newdataadr(fd, sock->link);
+ direct_link_node_socket(fd, sock);
for(sock= node->outputs.first; sock; sock= sock->next)
- sock->ns.data= NULL;
+ direct_link_node_socket(fd, sock);
}
+ for(sock= ntree->inputs.first; sock; sock= sock->next)
+ direct_link_node_socket(fd, sock);
for(sock= ntree->outputs.first; sock; sock= sock->next)
- sock->link= newdataadr(fd, sock->link);
+ direct_link_node_socket(fd, sock);
for(link= ntree->links.first; link; link= link->next) {
link->fromnode= newdataadr(fd, link->fromnode);
@@ -3451,6 +3480,9 @@ static void lib_link_mesh(FileData *fd, Main *main)
}
me= me->id.next;
}
+
+ /* convert texface options to material */
+ convert_tface_mt(fd, main);
}
static void direct_link_dverts(FileData *fd, int count, MDeformVert *mdverts)
@@ -3869,6 +3901,11 @@ static void lib_link_object(FileData *fd, Main *main)
arma->target= newlibadr(fd, ob->id.lib, arma->target);
arma->subtarget= newlibadr(fd, ob->id.lib, arma->subtarget);
}
+ else if(act->type==ACT_STEERING) {
+ bSteeringActuator *steeringa = act->data;
+ steeringa->target = newlibadr(fd, ob->id.lib, steeringa->target);
+ steeringa->navmesh = newlibadr(fd, ob->id.lib, steeringa->navmesh);
+ }
act= act->next;
}
@@ -3935,7 +3972,6 @@ static void direct_link_pose(FileData *fd, bPose *pose)
direct_link_motionpath(fd, pchan->mpath);
pchan->iktree.first= pchan->iktree.last= NULL;
- pchan->path= NULL;
/* incase this value changes in future, clamp else we get undefined behavior */
CLAMP(pchan->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);
@@ -3997,8 +4033,10 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
FluidsimModifierData *fluidmd = (FluidsimModifierData*) md;
fluidmd->fss= newdataadr(fd, fluidmd->fss);
- fluidmd->fss->fmd= fluidmd;
- fluidmd->fss->meshVelocities = NULL;
+ if(fluidmd->fss) {
+ fluidmd->fss->fmd= fluidmd;
+ fluidmd->fss->meshVelocities = NULL;
+ }
}
else if (md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
@@ -4196,6 +4234,13 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
if(tmd->curfalloff)
direct_link_curvemapping(fd, tmd->curfalloff);
}
+ else if (md->type==eModifierType_WeightVGEdit) {
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+
+ wmd->cmap_curve = newdataadr(fd, wmd->cmap_curve);
+ if(wmd->cmap_curve)
+ direct_link_curvemapping(fd, wmd->cmap_curve);
+ }
}
}
@@ -4995,15 +5040,22 @@ static void lib_link_screen(FileData *fd, Main *main)
SpaceNode *snode= (SpaceNode *)sl;
snode->id= newlibadr(fd, sc->id.lib, snode->id);
+ snode->edittree= NULL;
- /* internal data, a bit patchy */
- if(snode->id) {
- if(GS(snode->id->name)==ID_MA)
- snode->nodetree= ((Material *)snode->id)->nodetree;
- else if(GS(snode->id->name)==ID_SCE)
- snode->nodetree= ((Scene *)snode->id)->nodetree;
- else if(GS(snode->id->name)==ID_TE)
- snode->nodetree= ((Tex *)snode->id)->nodetree;
+ if (ELEM3(snode->treetype, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE)) {
+ /* internal data, a bit patchy */
+ snode->nodetree= NULL;
+ if(snode->id) {
+ if(GS(snode->id->name)==ID_MA)
+ snode->nodetree= ((Material *)snode->id)->nodetree;
+ else if(GS(snode->id->name)==ID_SCE)
+ snode->nodetree= ((Scene *)snode->id)->nodetree;
+ else if(GS(snode->id->name)==ID_TE)
+ snode->nodetree= ((Tex *)snode->id)->nodetree;
+ }
+ }
+ else {
+ snode->nodetree= newlibadr_us(fd, sc->id.lib, snode->nodetree);
}
snode->linkdrag.first = snode->linkdrag.last = NULL;
@@ -5223,15 +5275,19 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
snode->id= restore_pointer_by_name(newmain, snode->id, 1);
snode->edittree= NULL;
- if(snode->id==NULL)
+ if (ELEM3(snode->treetype, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE)) {
snode->nodetree= NULL;
+ if(snode->id) {
+ if(GS(snode->id->name)==ID_MA)
+ snode->nodetree= ((Material *)snode->id)->nodetree;
+ else if(GS(snode->id->name)==ID_SCE)
+ snode->nodetree= ((Scene *)snode->id)->nodetree;
+ else if(GS(snode->id->name)==ID_TE)
+ snode->nodetree= ((Tex *)snode->id)->nodetree;
+ }
+ }
else {
- if(GS(snode->id->name)==ID_MA)
- snode->nodetree= ((Material *)snode->id)->nodetree;
- else if(GS(snode->id->name)==ID_SCE)
- snode->nodetree= ((Scene *)snode->id)->nodetree;
- else if(GS(snode->id->name)==ID_TE)
- snode->nodetree= ((Tex *)snode->id)->nodetree;
+ snode->nodetree= restore_pointer_by_name(newmain, &snode->nodetree->id, 1);
}
}
}
@@ -5460,7 +5516,6 @@ static void direct_link_screen(FileData *fd, bScreen *sc)
snode->gpd= newdataadr(fd, snode->gpd);
direct_link_gpencil(fd, snode->gpd);
}
- snode->nodetree= snode->edittree= NULL;
}
else if(sl->spacetype==SPACE_TIME) {
SpaceTime *stime= (SpaceTime *)sl;
@@ -6345,7 +6400,7 @@ static void alphasort_version_246(FileData *fd, Library *lib, Mesh *me)
/* 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[(int)mf->mat_nr]);
+ ma= newlibadr(fd, lib, me->mat[mf->mat_nr]);
texalpha = 0;
/* we can't read from this if it comes from a library,
@@ -6969,6 +7024,83 @@ static void do_version_bone_roll_256(Bone *bone)
do_version_bone_roll_256(child);
}
+static void do_versions_socket_default_value(bNodeSocket *sock)
+{
+ bNodeSocketValueFloat *valfloat;
+ bNodeSocketValueVector *valvector;
+ bNodeSocketValueRGBA *valrgba;
+
+ if (sock->default_value)
+ return;
+
+ switch (sock->type) {
+ case SOCK_FLOAT:
+ valfloat = sock->default_value = MEM_callocN(sizeof(bNodeSocketValueFloat), "default socket value");
+ valfloat->value = sock->ns.vec[0];
+ valfloat->min = sock->ns.min;
+ valfloat->max = sock->ns.max;
+ valfloat->subtype = PROP_NONE;
+ break;
+ case SOCK_VECTOR:
+ valvector = sock->default_value = MEM_callocN(sizeof(bNodeSocketValueVector), "default socket value");
+ copy_v3_v3(valvector->value, sock->ns.vec);
+ valvector->min = sock->ns.min;
+ valvector->max = sock->ns.max;
+ valvector->subtype = PROP_NONE;
+ break;
+ case SOCK_RGBA:
+ valrgba = sock->default_value = MEM_callocN(sizeof(bNodeSocketValueRGBA), "default socket value");
+ copy_v4_v4(valrgba->value, sock->ns.vec);
+ break;
+ }
+}
+
+static void do_versions_nodetree_default_value(bNodeTree *ntree)
+{
+ bNode *node;
+ bNodeSocket *sock;
+ for (node=ntree->nodes.first; node; node=node->next) {
+ for (sock=node->inputs.first; sock; sock=sock->next)
+ do_versions_socket_default_value(sock);
+ for (sock=node->outputs.first; sock; sock=sock->next)
+ do_versions_socket_default_value(sock);
+ }
+ for (sock=ntree->inputs.first; sock; sock=sock->next)
+ do_versions_socket_default_value(sock);
+ for (sock=ntree->outputs.first; sock; sock=sock->next)
+ do_versions_socket_default_value(sock);
+}
+
+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;
+
+ /* this is a delayed do_version (so it can create new materials) */
+ if (main->versionfile < 259 || (main->versionfile == 259 && main->subversionfile < 3)) {
+
+ //XXX hack, material.c uses G.main all over the place, instead of main
+ // temporarily set G.main to the current main
+ gmain = G.main;
+ G.main = main;
+
+ if(!(do_version_tface(main, 1))) {
+ BKE_report(fd->reports, RPT_ERROR, "Texface conversion problem. Error in console");
+ }
+
+ //XXX hack, material.c uses G.main allover the place, instead of main
+ G.main = gmain;
+ }
+}
+
static void do_versions(FileData *fd, Library *lib, Main *main)
{
/* WATCH IT!!!: pointers from libdata have not been converted */
@@ -9164,7 +9296,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
simasel->prv_w = 96;
simasel->flag = 7; /* ??? elubie */
strcpy (simasel->dir, U.textudir); /* TON */
- strcpy (simasel->file, "");
+ simasel->file[0]= '\0';
simasel->returnfunc = NULL;
simasel->title[0] = 0;
@@ -9394,7 +9526,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* clear old targets to avoid problems */
data->tar = NULL;
- strcpy(data->subtarget, "");
+ data->subtarget[0]= '\0';
}
}
else if (con->type == CONSTRAINT_TYPE_LOCLIKE) {
@@ -9424,7 +9556,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* clear old targets to avoid problems */
data->tar = NULL;
- strcpy(data->subtarget, "");
+ data->subtarget[0]= '\0';
}
}
else if (con->type == CONSTRAINT_TYPE_LOCLIKE) {
@@ -11552,6 +11684,23 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
+ // 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 < 256) {
bScreen *sc;
ScrArea *sa;
@@ -11620,7 +11769,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
* 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;
+ ntree->flag |= NTREE_DO_VERSIONS_GROUP_EXPOSE;
}
}
@@ -11745,10 +11894,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
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);
@@ -11899,12 +12048,99 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
+ 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;
+ }
+ }
+
/* put compatibility code here until next subversion bump */
{
}
+ //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 = 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 = 50.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;
+ }
+ }
+
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
@@ -12026,7 +12262,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
BlendFileData *bfd;
bfd= MEM_callocN(sizeof(BlendFileData), "blendfiledata");
- bfd->main= MEM_callocN(sizeof(Main), "main");
+ bfd->main= MEM_callocN(sizeof(Main), "readfile_Main");
BLI_addtail(&fd->mainlist, bfd->main);
bfd->main->versionfile= fd->fileversion;
@@ -12809,6 +13045,11 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
bArmatureActuator *arma= act->data;
expand_doit(fd, mainvar, arma->target);
}
+ else if(act->type==ACT_STEERING) {
+ bSteeringActuator *sta= act->data;
+ expand_doit(fd, mainvar, sta->target);
+ expand_doit(fd, mainvar, sta->navmesh);
+ }
act= act->next;
}
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index ec2b2b2bf19..ebed582ab7b 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -136,6 +136,7 @@ Any case: direct data is ALWAYS after the lib block
#include "BLI_blenlib.h"
#include "BLI_linklist.h"
#include "BLI_bpath.h"
+#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BKE_action.h"
@@ -643,6 +644,46 @@ static void write_curvemapping(WriteData *wd, CurveMapping *cumap)
writestruct(wd, DATA, "CurveMapPoint", cumap->cm[a].totpoint, cumap->cm[a].curve);
}
+static void write_node_socket(WriteData *wd, bNodeSocket *sock)
+{
+ bNodeSocketType *stype= ntreeGetSocketType(sock->type);
+
+ /* forward compatibility code, so older blenders still open */
+ sock->stack_type = 1;
+
+ if(sock->default_value) {
+ bNodeSocketValueFloat *valfloat;
+ bNodeSocketValueVector *valvector;
+ bNodeSocketValueRGBA *valrgba;
+
+ switch (sock->type) {
+ case SOCK_FLOAT:
+ valfloat = sock->default_value;
+ sock->ns.vec[0] = valfloat->value;
+ sock->ns.min = valfloat->min;
+ sock->ns.max = valfloat->max;
+ break;
+ case SOCK_VECTOR:
+ valvector = sock->default_value;
+ copy_v3_v3(sock->ns.vec, valvector->value);
+ sock->ns.min = valvector->min;
+ sock->ns.max = valvector->max;
+ break;
+ case SOCK_RGBA:
+ valrgba = sock->default_value;
+ copy_v4_v4(sock->ns.vec, valrgba->value);
+ sock->ns.min = 0.0f;
+ sock->ns.max = 1.0f;
+ break;
+ }
+ }
+
+ /* actual socket writing */
+ writestruct(wd, DATA, "bNodeSocket", 1, sock);
+ if (sock->default_value)
+ writestruct(wd, DATA, stype->value_structname, 1, sock->default_value);
+}
+
/* this is only direct data, tree itself should have been written */
static void write_nodetree(WriteData *wd, bNodeTree *ntree)
{
@@ -658,6 +699,12 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
writestruct(wd, DATA, "bNode", 1, node);
for(node= ntree->nodes.first; node; node= node->next) {
+ for(sock= node->inputs.first; sock; sock= sock->next)
+ write_node_socket(wd, sock);
+ for(sock= node->outputs.first; sock; sock= sock->next)
+ write_node_socket(wd, sock);
+
+
if(node->storage && node->type!=NODE_DYNAMIC) {
/* could be handlerized at some point, now only 1 exception still */
if(ntree->type==NTREE_SHADER && (node->type==SH_NODE_CURVE_VEC || node->type==SH_NODE_CURVE_RGB))
@@ -666,13 +713,9 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
write_curvemapping(wd, node->storage);
else if(ntree->type==NTREE_TEXTURE && (node->type==TEX_NODE_CURVE_RGB || node->type==TEX_NODE_CURVE_TIME) )
write_curvemapping(wd, node->storage);
- else
+ else
writestruct(wd, DATA, node->typeinfo->storagename, 1, node->storage);
}
- for(sock= node->inputs.first; sock; sock= sock->next)
- writestruct(wd, DATA, "bNodeSocket", 1, sock);
- for(sock= node->outputs.first; sock; sock= sock->next)
- writestruct(wd, DATA, "bNodeSocket", 1, sock);
}
for(link= ntree->links.first; link; link= link->next)
@@ -680,9 +723,9 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
/* external sockets */
for(sock= ntree->inputs.first; sock; sock= sock->next)
- writestruct(wd, DATA, "bNodeSocket", 1, sock);
+ write_node_socket(wd, sock);
for(sock= ntree->outputs.first; sock; sock= sock->next)
- writestruct(wd, DATA, "bNodeSocket", 1, sock);
+ write_node_socket(wd, sock);
}
static void current_screen_compat(Main *mainvar, bScreen **screen)
@@ -934,7 +977,7 @@ static void write_particlesystems(WriteData *wd, ListBase *particles)
writestruct(wd, DATA, "ClothSimSettings", 1, psys->clmd->sim_parms);
writestruct(wd, DATA, "ClothCollSettings", 1, psys->clmd->coll_parms);
}
-
+
write_pointcaches(wd, &psys->ptcaches);
}
}
@@ -1104,6 +1147,9 @@ static void write_actuators(WriteData *wd, ListBase *lb)
case ACT_ARMATURE:
writestruct(wd, DATA, "bArmatureActuator", 1, act->data);
break;
+ case ACT_STEERING:
+ writestruct(wd, DATA, "bSteeringActuator", 1, act->data);
+ break;
default:
; /* error: don't know how to write this file */
}
@@ -1335,6 +1381,12 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
write_curvemapping(wd, tmd->curfalloff);
}
}
+ else if (md->type==eModifierType_WeightVGEdit) {
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+
+ if (wmd->cmap_curve)
+ write_curvemapping(wd, wmd->cmap_curve);
+ }
}
}
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 4c20d1cf6c1..ae568e69936 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -58,7 +58,7 @@ void AnimationExporter::operator() (Object *ob)
{
FCurve *fcu;
char * transformName ;
- bool isMatAnim = false;
+ /* bool isMatAnim = false; */ /* UNUSED */
//Export transform animations
if(ob->adt && ob->adt->action)
@@ -125,7 +125,7 @@ void AnimationExporter::operator() (Object *ob)
if (!ma) continue;
if(ma->adt && ma->adt->action)
{
- isMatAnim = true;
+ /* isMatAnim = true; */
fcu = (FCurve*)ma->adt->action->curves.first;
while (fcu) {
transformName = extract_transform_name( fcu->rna_path );
@@ -577,7 +577,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman
case COLLADASW::InputSemantic::OUTPUT:
*length = 1;
if (rotation) {
- values[0] = (bezt->vec[1][1]) * 180.0f/M_PI;
+ values[0] = RAD2DEGF(bezt->vec[1][1]);
}
else {
values[0] = bezt->vec[1][1];
@@ -593,7 +593,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman
values[1] = 0;
}
else if (rotation) {
- values[1] = (bezt->vec[0][1]) * 180.0f/M_PI;
+ values[1] = RAD2DEGF(bezt->vec[0][1]);
} else {
values[1] = bezt->vec[0][1];
}
@@ -608,7 +608,7 @@ void AnimationExporter::get_source_values(BezTriple *bezt, COLLADASW::InputSeman
values[1] = 0;
}
else if (rotation) {
- values[1] = (bezt->vec[2][1]) * 180.0f/M_PI;
+ values[1] = RAD2DEGF(bezt->vec[2][1]);
} else {
values[1] = bezt->vec[2][1];
}
@@ -643,6 +643,8 @@ std::string AnimationExporter::create_source_from_fcurve(COLLADASW::InputSemanti
case COLLADASW::InputSemantic::OUT_TANGENT:
source.setAccessorStride(2);
break;
+ default:
+ break;
}
@@ -686,7 +688,7 @@ std::string AnimationExporter::create_source_from_array(COLLADASW::InputSemantic
// val = convert_time(val);
//else
if (is_rot)
- val *= 180.0f / M_PI;
+ val = RAD2DEGF(val);
source.appendValues(val);
}
@@ -913,7 +915,7 @@ std::string AnimationExporter::get_light_param_sid(char *rna_path, int tm_type,
}
if (tm_name.size()) {
- if (axis_name != "")
+ if (axis_name[0])
return tm_name + "." + std::string(axis_name);
else
return tm_name;
@@ -962,7 +964,7 @@ std::string AnimationExporter::get_camera_param_sid(char *rna_path, int tm_type,
}
if (tm_name.size()) {
- if (axis_name != "")
+ if (axis_name[0])
return tm_name + "." + std::string(axis_name);
else
return tm_name;
@@ -1041,7 +1043,7 @@ std::string AnimationExporter::get_transform_sid(char *rna_path, int tm_type, co
if (is_rotation)
return tm_name + std::string(axis_name) + ".ANGLE";
else
- if (axis_name != "")
+ if (axis_name[0])
return tm_name + "." + std::string(axis_name);
else
return tm_name;
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp
index 29c356ed8f0..a176b6eb4cd 100644
--- a/source/blender/collada/AnimationImporter.cpp
+++ b/source/blender/collada/AnimationImporter.cpp
@@ -90,12 +90,6 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
COLLADAFW::FloatOrDoubleArray& input = curve->getInputValues();
COLLADAFW::FloatOrDoubleArray& output = curve->getOutputValues();
- if( curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER ||
- curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_STEP ) {
- COLLADAFW::FloatOrDoubleArray& intan = curve->getInTangentValues();
- COLLADAFW::FloatOrDoubleArray& outtan = curve->getOutTangentValues();
- }
-
float fps = (float)FPS;
size_t dim = curve->getOutDimension();
unsigned int i;
@@ -176,9 +170,9 @@ void AnimationImporter::fcurve_deg_to_rad(FCurve *cu)
{
for (unsigned int i = 0; i < cu->totvert; i++) {
// TODO convert handles too
- cu->bezt[i].vec[1][1] *= M_PI / 180.0f;
- cu->bezt[i].vec[0][1] *= M_PI / 180.0f;
- cu->bezt[i].vec[2][1] *= M_PI / 180.0f;
+ cu->bezt[i].vec[1][1] *= DEG2RADF(1.0f);
+ cu->bezt[i].vec[0][1] *= DEG2RADF(1.0f);
+ cu->bezt[i].vec[2][1] *= DEG2RADF(1.0f);
}
}
@@ -572,7 +566,7 @@ 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 ,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));
@@ -615,7 +609,7 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list
}
-void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type)
+void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type)
{
char rna_path[100];
if (animlist_map.find(listid) == animlist_map.end()) return ;
@@ -747,7 +741,7 @@ void AnimationImporter::apply_matrix_curves( Object * ob, std::vector<FCurve*>&
mat4_to_quat(rot, mat);
/*for ( int i = 0 ; i < 4 ; i ++ )
{
- rot[i] = rot[i] * (180 / M_PI);
+ rot[i] = RAD2DEGF(rot[i]);
}*/
copy_v3_v3(loc, mat[3]);
mat4_to_size(scale, mat);
@@ -803,7 +797,6 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
}
bAction * act;
- bActionGroup *grp = NULL;
if ( (animType->transform) != 0 )
{
diff --git a/source/blender/collada/AnimationImporter.h b/source/blender/collada/AnimationImporter.h
index ed9a2171c87..9e8f7b42069 100644
--- a/source/blender/collada/AnimationImporter.h
+++ b/source/blender/collada/AnimationImporter.h
@@ -159,8 +159,8 @@ public:
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 ,char * anim_type);
- void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type);
+ 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);
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp
index de01c000373..431c67833f1 100644
--- a/source/blender/collada/ArmatureExporter.cpp
+++ b/source/blender/collada/ArmatureExporter.cpp
@@ -49,7 +49,7 @@
// XXX exporter writes wrong data for shared armatures. A separate
// controller should be written for each armature-mesh binding how do
// we make controller ids then?
-ArmatureExporter::ArmatureExporter(COLLADASW::StreamWriter *sw) : COLLADASW::LibraryControllers(sw) {}
+ArmatureExporter::ArmatureExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings) : COLLADASW::LibraryControllers(sw), export_settings(export_settings) {}
// write bone nodes
void ArmatureExporter::add_armature_bones(Object *ob_arm, Scene *sce)
@@ -90,14 +90,14 @@ void ArmatureExporter::add_instance_controller(Object *ob)
ins.add();
}
-void ArmatureExporter::export_controllers(Scene *sce, bool export_selected)
+void ArmatureExporter::export_controllers(Scene *sce)
{
scene = sce;
openLibrary();
GeometryFunctor gf;
- gf.forEachMeshObjectInScene<ArmatureExporter>(sce, *this, export_selected);
+ gf.forEachMeshObjectInScene<ArmatureExporter>(sce, *this, this->export_settings->selected);
closeLibrary();
}
diff --git a/source/blender/collada/ArmatureExporter.h b/source/blender/collada/ArmatureExporter.h
index b3441c797e8..554a8a7cfe6 100644
--- a/source/blender/collada/ArmatureExporter.h
+++ b/source/blender/collada/ArmatureExporter.h
@@ -47,16 +47,15 @@
#include "TransformWriter.h"
#include "InstanceWriter.h"
+#include "ExportSettings.h"
+
// XXX exporter writes wrong data for shared armatures. A separate
// controller should be written for each armature-mesh binding how do
// we make controller ids then?
class ArmatureExporter: public COLLADASW::LibraryControllers, protected TransformWriter, protected InstanceWriter
{
-private:
- Scene *scene;
-
public:
- ArmatureExporter(COLLADASW::StreamWriter *sw);
+ ArmatureExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
// write bone nodes
void add_armature_bones(Object *ob_arm, Scene *sce);
@@ -65,13 +64,14 @@ public:
void add_instance_controller(Object *ob);
- void export_controllers(Scene *sce, bool export_selected);
+ void export_controllers(Scene *sce);
void operator()(Object *ob);
private:
-
+ Scene *scene;
UnitConverter converter;
+ const ExportSettings *export_settings;
#if 0
std::vector<Object*> written_armatures;
@@ -119,25 +119,4 @@ private:
Object *ob_arm, ListBase *defbase);
};
-/*
-struct GeometryFunctor {
- // f should have
- // void operator()(Object* ob)
- template<class Functor>
- void forEachMeshObjectInScene(Scene *sce, Functor &f)
- {
-
- Base *base= (Base*) sce->base.first;
- while(base) {
- Object *ob = base->object;
-
- if (ob->type == OB_MESH && ob->data) {
- f(ob);
- }
- base= base->next;
-
- }
- }
-};*/
-
#endif
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 27aee133557..ae25d343d36 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -95,8 +95,6 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p
EditBone *bone = ED_armature_edit_bone_add((bArmature*)ob_arm->data, (char*)bc_get_joint_name(node));
totbone++;
- bPoseChannel *pchan = get_pose_channel(ob_arm->pose, (char*)bc_get_joint_name(node));
-
if (parent) bone->parent = parent;
float angle = 0;
@@ -280,8 +278,6 @@ void ArmatureImporter::add_leaf_bone(float mat[][4], EditBone *bone, COLLADAFW:
copy_m4_m4(leaf.mat, mat);
BLI_strncpy(leaf.name, bone->name, sizeof(leaf.name));
- float vec[3];
-
TagsMap::iterator etit;
ExtraTags *et = 0;
etit = uid_tags_map.find(node->getUniqueId().toAscii());
@@ -579,9 +575,8 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node
float mat[4][4];
float obmat[4][4];
- bArmature * arm = (bArmature * ) ob_arm-> data ;
float ax[3];
- float angle = NULL;
+ float angle = 0.0f;
// object-space
get_node_mat(obmat, root_node, NULL, NULL);
diff --git a/source/blender/collada/CMakeLists.txt b/source/blender/collada/CMakeLists.txt
index ffe3d5f4f85..2ee34091fc9 100644
--- a/source/blender/collada/CMakeLists.txt
+++ b/source/blender/collada/CMakeLists.txt
@@ -51,6 +51,8 @@ set(SRC
DocumentExporter.cpp
DocumentImporter.cpp
EffectExporter.cpp
+ ErrorHandler.cpp
+ ExportSettings.cpp
ExtraHandler.cpp
ExtraTags.cpp
GeometryExporter.cpp
@@ -60,6 +62,7 @@ set(SRC
MaterialExporter.cpp
MeshImporter.cpp
SkinInfo.cpp
+ SceneExporter.cpp
TransformReader.cpp
TransformWriter.cpp
collada.cpp
@@ -74,6 +77,8 @@ set(SRC
DocumentExporter.h
DocumentImporter.h
EffectExporter.h
+ ErrorHandler.h
+ ExportSettings.h
ExtraHandler.h
ExtraTags.h
GeometryExporter.h
@@ -83,6 +88,7 @@ set(SRC
MaterialExporter.h
MeshImporter.h
SkinInfo.h
+ SceneExporter.h
TransformReader.h
TransformWriter.h
collada.h
diff --git a/source/blender/collada/CameraExporter.cpp b/source/blender/collada/CameraExporter.cpp
index a935f45c403..006d4c0ed23 100644
--- a/source/blender/collada/CameraExporter.cpp
+++ b/source/blender/collada/CameraExporter.cpp
@@ -39,7 +39,7 @@
#include "collada_internal.h"
-CamerasExporter::CamerasExporter(COLLADASW::StreamWriter *sw): COLLADASW::LibraryCameras(sw){}
+CamerasExporter::CamerasExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings): COLLADASW::LibraryCameras(sw), export_settings(export_settings) {}
template<class Functor>
void forEachCameraObjectInScene(Scene *sce, Functor &f, bool export_selected)
@@ -56,11 +56,11 @@ void forEachCameraObjectInScene(Scene *sce, Functor &f, bool export_selected)
}
}
-void CamerasExporter::exportCameras(Scene *sce, bool export_selected)
+void CamerasExporter::exportCameras(Scene *sce)
{
openLibrary();
- forEachCameraObjectInScene(sce, *this, export_selected);
+ forEachCameraObjectInScene(sce, *this, this->export_settings->selected);
closeLibrary();
}
@@ -73,7 +73,7 @@ void CamerasExporter::operator()(Object *ob, Scene *sce)
if (cam->type == CAM_PERSP) {
COLLADASW::PerspectiveOptic persp(mSW);
- persp.setXFov(lens_to_angle(cam->lens)*(180.0f/M_PI),"xfov");
+ persp.setXFov(RAD2DEGF(lens_to_angle(cam->lens)), "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");
diff --git a/source/blender/collada/CameraExporter.h b/source/blender/collada/CameraExporter.h
index 999a6ddd3e5..8d08fe23f80 100644
--- a/source/blender/collada/CameraExporter.h
+++ b/source/blender/collada/CameraExporter.h
@@ -36,12 +36,16 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "ExportSettings.h"
+
class CamerasExporter: COLLADASW::LibraryCameras
{
public:
- CamerasExporter(COLLADASW::StreamWriter *sw);
- void exportCameras(Scene *sce, bool export_selected);
+ CamerasExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
+ void exportCameras(Scene *sce);
void operator()(Object *ob, Scene *sce);
+private:
+ const ExportSettings *export_settings;
};
#endif
diff --git a/source/blender/collada/DocumentExporter.cpp b/source/blender/collada/DocumentExporter.cpp
index 6e780889d16..d562e51b922 100644
--- a/source/blender/collada/DocumentExporter.cpp
+++ b/source/blender/collada/DocumentExporter.cpp
@@ -34,6 +34,7 @@ extern "C"
{
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
+#include "DNA_group_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_mesh_types.h"
#include "DNA_image_types.h"
@@ -104,15 +105,18 @@ extern char build_rev[];
#include "COLLADASWConstants.h"
#include "COLLADASWLibraryControllers.h"
#include "COLLADASWInstanceController.h"
+#include "COLLADASWInstanceNode.h"
#include "COLLADASWBaseInputElement.h"
#include "collada_internal.h"
#include "DocumentExporter.h"
+#include "ExportSettings.h"
// can probably go after refactor is complete
#include "InstanceWriter.h"
#include "TransformWriter.h"
+#include "SceneExporter.h"
#include "ArmatureExporter.h"
#include "AnimationExporter.h"
#include "CameraExporter.h"
@@ -142,170 +146,13 @@ char *bc_CustomData_get_active_layer_name(const CustomData *data, int type)
return data->layers[layer_index].name;
}
-
-/*
- Utilities to avoid code duplication.
- Definition can take some time to understand, but they should be useful.
-*/
-
-
-template<class Functor>
-void forEachObjectInScene(Scene *sce, Functor &f)
-{
- Base *base= (Base*) sce->base.first;
- while(base) {
- Object *ob = base->object;
-
- f(ob);
-
- base= base->next;
- }
-}
-
-
-
-class SceneExporter: COLLADASW::LibraryVisualScenes, protected TransformWriter, protected InstanceWriter
-{
- ArmatureExporter *arm_exporter;
-public:
- SceneExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm) : COLLADASW::LibraryVisualScenes(sw),
- arm_exporter(arm) {}
-
- void exportScene(Scene *sce, bool export_selected) {
- // <library_visual_scenes> <visual_scene>
- std::string id_naming = id_name(sce);
- openVisualScene(translate_id(id_naming), id_naming);
-
- // write <node>s
- //forEachMeshObjectInScene(sce, *this);
- //forEachCameraObjectInScene(sce, *this);
- //forEachLampObjectInScene(sce, *this);
- exportHierarchy(sce, export_selected);
-
- // </visual_scene> </library_visual_scenes>
- closeVisualScene();
-
- closeLibrary();
- }
-
- void exportHierarchy(Scene *sce, bool export_selected)
- {
- Base *base= (Base*) sce->base.first;
- while(base) {
- Object *ob = base->object;
-
- if (!ob->parent) {
- if(sce->lay & ob->lay) {
- switch(ob->type) {
- case OB_MESH:
- case OB_CAMERA:
- case OB_LAMP:
- case OB_ARMATURE:
- case OB_EMPTY:
- if (export_selected && !(ob->flag & SELECT)) {
- break;
- }
- // write nodes....
- writeNodes(ob, sce);
- break;
- }
- }
- }
-
- base= base->next;
- }
- }
-
-
- // called for each object
- //void operator()(Object *ob) {
- void writeNodes(Object *ob, Scene *sce)
- {
- COLLADASW::Node node(mSW);
- node.setNodeId(translate_id(id_name(ob)));
- node.setType(COLLADASW::Node::NODE);
-
- node.start();
-
- bool is_skinned_mesh = arm_exporter->is_skinned_mesh(ob);
-
- if (ob->type == OB_MESH && is_skinned_mesh)
- // for skinned mesh we write obmat in <bind_shape_matrix>
- TransformWriter::add_node_transform_identity(node);
- else
- TransformWriter::add_node_transform_ob(node, ob);
-
- // <instance_geometry>
- if (ob->type == OB_MESH) {
- if (is_skinned_mesh) {
- arm_exporter->add_instance_controller(ob);
- }
- else {
- COLLADASW::InstanceGeometry instGeom(mSW);
- instGeom.setUrl(COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_geometry_id(ob)));
-
- InstanceWriter::add_material_bindings(instGeom.getBindMaterial(), ob);
-
- instGeom.add();
- }
- }
-
- // <instance_controller>
- else if (ob->type == OB_ARMATURE) {
- arm_exporter->add_armature_bones(ob, sce);
-
- // XXX this looks unstable...
- node.end();
- }
-
- // <instance_camera>
- else if (ob->type == OB_CAMERA) {
- COLLADASW::InstanceCamera instCam(mSW, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_camera_id(ob)));
- instCam.add();
- }
-
- // <instance_light>
- else if (ob->type == OB_LAMP) {
- COLLADASW::InstanceLight instLa(mSW, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_light_id(ob)));
- instLa.add();
- }
-
- // empty object
- else if (ob->type == OB_EMPTY) {
- }
-
- // write nodes for child objects
- Base *b = (Base*) sce->base.first;
- while(b) {
- // cob - child object
- Object *cob = b->object;
-
- if (cob->parent == ob) {
- switch(cob->type) {
- case OB_MESH:
- case OB_CAMERA:
- case OB_LAMP:
- case OB_EMPTY:
- case OB_ARMATURE:
- // write node...
- writeNodes(cob, sce);
- break;
- }
- }
-
- b = b->next;
- }
-
- if (ob->type != OB_ARMATURE)
- node.end();
- }
-};
+DocumentExporter::DocumentExporter(const ExportSettings *export_settings) : export_settings(export_settings) {}
// TODO: it would be better to instantiate animations rather than create a new one per object
// COLLADA allows this through multiple <channel>s in <animation>.
// For this to work, we need to know objects that use a certain action.
-void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename, bool selected)
+void DocumentExporter::exportCurrentScene(Scene *sce)
{
PointerRNA sceneptr, unit_settings;
PropertyRNA *system; /* unused , *scale; */
@@ -313,7 +160,7 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename, bool
clear_global_id_map();
COLLADABU::NativeString native_filename =
- COLLADABU::NativeString(std::string(filename));
+ COLLADABU::NativeString(std::string(this->export_settings->filepath));
COLLADASW::StreamWriter sw(native_filename);
// open <collada>
@@ -383,32 +230,32 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename, bool
// <library_cameras>
if(has_object_type(sce, OB_CAMERA)) {
- CamerasExporter ce(&sw);
- ce.exportCameras(sce, selected);
+ CamerasExporter ce(&sw, this->export_settings);
+ ce.exportCameras(sce);
}
// <library_lights>
if(has_object_type(sce, OB_LAMP)) {
- LightsExporter le(&sw);
- le.exportLights(sce, selected);
+ LightsExporter le(&sw, this->export_settings);
+ le.exportLights(sce);
}
// <library_images>
- ImagesExporter ie(&sw, filename);
- ie.exportImages(sce, selected);
+ ImagesExporter ie(&sw, this->export_settings);
+ ie.exportImages(sce);
// <library_effects>
- EffectsExporter ee(&sw);
- ee.exportEffects(sce, selected);
+ EffectsExporter ee(&sw, this->export_settings);
+ ee.exportEffects(sce);
// <library_materials>
- MaterialsExporter me(&sw);
- me.exportMaterials(sce, selected);
+ MaterialsExporter me(&sw, this->export_settings);
+ me.exportMaterials(sce);
// <library_geometries>
if(has_object_type(sce, OB_MESH)) {
- GeometryExporter ge(&sw);
- ge.exportGeom(sce, selected);
+ GeometryExporter ge(&sw, this->export_settings);
+ ge.exportGeom(sce);
}
// <library_animations>
@@ -416,14 +263,14 @@ void DocumentExporter::exportCurrentScene(Scene *sce, const char* filename, bool
ae.exportAnimations(sce);
// <library_controllers>
- ArmatureExporter arm_exporter(&sw);
+ ArmatureExporter arm_exporter(&sw, this->export_settings);
if(has_object_type(sce, OB_ARMATURE)) {
- arm_exporter.export_controllers(sce, selected);
+ arm_exporter.export_controllers(sce);
}
// <library_visual_scenes>
- SceneExporter se(&sw, &arm_exporter);
- se.exportScene(sce, selected);
+ SceneExporter se(&sw, &arm_exporter, this->export_settings);
+ se.exportScene(sce);
// <scene>
std::string scene_name(translate_id(id_name(sce)));
diff --git a/source/blender/collada/DocumentExporter.h b/source/blender/collada/DocumentExporter.h
index 923313c4ed9..83724505efa 100644
--- a/source/blender/collada/DocumentExporter.h
+++ b/source/blender/collada/DocumentExporter.h
@@ -29,13 +29,18 @@
#ifndef __DOCUMENTEXPORTER_H__
#define __DOCUMENTEXPORTER_H__
+#include "ExportSettings.h"
+
struct Scene;
class DocumentExporter
{
public:
- void exportCurrentScene(Scene *sce, const char* filename, bool selected);
+ DocumentExporter(const ExportSettings *export_settings);
+ void exportCurrentScene(Scene *sce);
void exportScenes(const char* filename);
+private:
+ const ExportSettings *export_settings;
};
#endif
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 1a91e185bac..2387c9a1465 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -76,6 +76,7 @@
#include "MEM_guardedalloc.h"
#include "ExtraHandler.h"
+#include "ErrorHandler.h"
#include "DocumentImporter.h"
#include "TransformReader.h"
@@ -113,17 +114,19 @@ DocumentImporter::~DocumentImporter()
bool DocumentImporter::import()
{
- /** TODO Add error handler (implement COLLADASaxFWL::IErrorHandler */
- COLLADASaxFWL::Loader loader;
+ ErrorHandler errorHandler;
+ COLLADASaxFWL::Loader loader(&errorHandler);
COLLADAFW::Root root(&loader, this);
ExtraHandler *ehandler = new ExtraHandler(this, &(this->anim_importer));
loader.registerExtraDataCallbackHandler(ehandler);
-
if (!root.loadDocument(mFilename))
return false;
+ if(errorHandler.hasError())
+ return false;
+
/** TODO set up scene graph and such here */
mImportStage = Controller;
@@ -240,15 +243,15 @@ void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node, COLLADAFW
root_map[node->getUniqueId()] = root_map[par->getUniqueId()];
}
- COLLADAFW::Transformation::TransformationType types[] = {
+ /*COLLADAFW::Transformation::TransformationType types[] = {
COLLADAFW::Transformation::ROTATE,
COLLADAFW::Transformation::SCALE,
COLLADAFW::Transformation::TRANSLATE,
COLLADAFW::Transformation::MATRIX
};
+ Object *ob;*/
unsigned int i;
- Object *ob;
//for (i = 0; i < 4; i++)
//ob =
@@ -813,7 +816,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
double aspect = camera->getAspectRatio().getValue();
double xfov = aspect*yfov;
// xfov is in degrees, cam->lens is in millimiters
- cam->lens = angle_to_lens((float)xfov*(M_PI/180.0f));
+ cam->lens = angle_to_lens(DEG2RADF(xfov));;
}
break;
}
@@ -834,7 +837,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
{
double x = camera->getXFov().getValue();
// x is in degrees, cam->lens is in millimiters
- cam->lens = angle_to_lens((float)x*(M_PI/180.0f));
+ cam->lens = angle_to_lens(DEG2RADF(x));
}
break;
}
@@ -851,7 +854,7 @@ bool DocumentImporter::writeCamera( const COLLADAFW::Camera* camera )
{
double yfov = camera->getYFov().getValue();
// yfov is in degrees, cam->lens is in millimiters
- cam->lens = angle_to_lens((float)yfov*(M_PI/180.0f));
+ cam->lens = angle_to_lens(DEG2RADF(yfov));
}
break;
}
diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp
index 355e384d000..6863e26a3ce 100644
--- a/source/blender/collada/EffectExporter.cpp
+++ b/source/blender/collada/EffectExporter.cpp
@@ -37,6 +37,7 @@
#include "DNA_mesh_types.h"
#include "DNA_texture_types.h"
+#include "DNA_world_types.h"
#include "BKE_customdata.h"
@@ -55,7 +56,7 @@ static std::string getActiveUVLayerName(Object *ob)
return "";
}
-EffectsExporter::EffectsExporter(COLLADASW::StreamWriter *sw) : COLLADASW::LibraryEffects(sw){}
+EffectsExporter::EffectsExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings) : COLLADASW::LibraryEffects(sw), export_settings(export_settings) {}
bool EffectsExporter::hasEffects(Scene *sce)
{
@@ -78,12 +79,13 @@ bool EffectsExporter::hasEffects(Scene *sce)
return false;
}
-void EffectsExporter::exportEffects(Scene *sce, bool export_selected)
+void EffectsExporter::exportEffects(Scene *sce)
{
if(hasEffects(sce)) {
+ this->scene = sce;
openLibrary();
MaterialFunctor mf;
- mf.forEachMaterialInScene<EffectsExporter>(sce, *this, export_selected);
+ mf.forEachMaterialInScene<EffectsExporter>(sce, *this, this->export_settings->selected);
closeLibrary();
}
@@ -175,7 +177,12 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
ep.setDiffuse(cot, false , "diffuse");
// ambient
- cot = getcol(ma->ambr, ma->ambg, ma->ambb, 1.0f);
+ /* ma->ambX is calculated only on render, so lets do it here manually and not rely on ma->ambX. */
+ if(this->scene->world)
+ cot = getcol(this->scene->world->ambr*ma->amb, this->scene->world->ambg*ma->amb, this->scene->world->ambb*ma->amb, 1.0f);
+ else
+ cot = getcol(ma->amb, ma->amb, ma->amb, 1.0f);
+
ep.setAmbient(cot, false , "ambient");
// reflective, reflectivity
diff --git a/source/blender/collada/EffectExporter.h b/source/blender/collada/EffectExporter.h
index 86143ae4d07..25d7ed15bc3 100644
--- a/source/blender/collada/EffectExporter.h
+++ b/source/blender/collada/EffectExporter.h
@@ -43,11 +43,13 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "ExportSettings.h"
+
class EffectsExporter: COLLADASW::LibraryEffects
{
public:
- EffectsExporter(COLLADASW::StreamWriter *sw);
- void exportEffects(Scene *sce, bool export_selected);
+ EffectsExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
+ void exportEffects(Scene *sce);
void operator()(Material *ma, Object *ob);
@@ -66,6 +68,10 @@ private:
void writePhong(COLLADASW::EffectProfile &ep, Material *ma);
bool hasEffects(Scene *sce);
+
+ const ExportSettings *export_settings;
+
+ Scene *scene;
};
#endif
diff --git a/source/blender/collada/ErrorHandler.cpp b/source/blender/collada/ErrorHandler.cpp
new file mode 100644
index 00000000000..61c03ed673c
--- /dev/null
+++ b/source/blender/collada/ErrorHandler.cpp
@@ -0,0 +1,89 @@
+/*
+ * $Id$
+ *
+ * ***** 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): Nathan Letwory.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/collada/ErrorHandler.cpp
+ * \ingroup collada
+ */
+#include "ErrorHandler.h"
+#include <iostream>
+
+#include "COLLADASaxFWLIError.h"
+#include "COLLADASaxFWLSaxParserError.h"
+#include "COLLADASaxFWLSaxFWLError.h"
+
+#include "GeneratedSaxParserParserError.h"
+
+#include <string.h>
+
+//--------------------------------------------------------------------
+ErrorHandler::ErrorHandler() : mError(false)
+{
+}
+
+//--------------------------------------------------------------------
+ErrorHandler::~ErrorHandler()
+{
+}
+
+//--------------------------------------------------------------------
+bool ErrorHandler::handleError( const COLLADASaxFWL::IError* error )
+{
+ mError = true;
+
+ 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 )
+ {
+ 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)))
+ {
+ mError = false;
+ }
+ }
+
+ 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 )
+ {
+ COLLADASaxFWL::SaxFWLError* saxFWLError = (COLLADASaxFWL::SaxFWLError*) error;
+ std::cout << "Sax FWL Error: " << saxFWLError->getErrorMessage() << std::endl;
+ }
+ return false;
+}
diff --git a/source/blender/collada/ErrorHandler.h b/source/blender/collada/ErrorHandler.h
new file mode 100644
index 00000000000..4064abb89f6
--- /dev/null
+++ b/source/blender/collada/ErrorHandler.h
@@ -0,0 +1,58 @@
+/*
+ * $Id$
+ *
+ * ***** 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): Nathan Letwory.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/collada/ErrorHandler.h
+ * \ingroup collada
+ */
+
+#include <string>
+#include <map>
+#include <vector>
+#include <algorithm> // sort()
+
+#include "COLLADASaxFWLIErrorHandler.h"
+
+/** \brief Handler class for parser errors
+ */
+class ErrorHandler : public COLLADASaxFWL::IErrorHandler
+{
+public:
+ /** Constructor. */
+ ErrorHandler();
+
+ /** Destructor. */
+ virtual ~ErrorHandler();
+ /** handle any error thrown by the parser. */
+ bool virtual handleError(const COLLADASaxFWL::IError* error);
+ /** True if there was an error during parsing. */
+ bool hasError() { return mError; }
+private:
+ /** Disable default copy ctor. */
+ ErrorHandler( const ErrorHandler& pre );
+ /** Disable default assignment operator. */
+ const ErrorHandler& operator= ( const ErrorHandler& pre );
+ /** Hold error status. */
+ bool mError;
+};
+
diff --git a/source/blender/collada/ExportSettings.cpp b/source/blender/collada/ExportSettings.cpp
new file mode 100644
index 00000000000..19f1c05ddcf
--- /dev/null
+++ b/source/blender/collada/ExportSettings.cpp
@@ -0,0 +1,29 @@
+/*
+ * $Id$
+ *
+ * ***** 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): Chingiz Dyussenov, Arystanbek Dyussenov, Jan Diederich, Tod Liverseed.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/collada/ExportSettings.cpp
+ * \ingroup collada
+ */
+
+#include "ExportSettings.h"
diff --git a/source/blender/collada/ExportSettings.h b/source/blender/collada/ExportSettings.h
new file mode 100644
index 00000000000..2636ca88a23
--- /dev/null
+++ b/source/blender/collada/ExportSettings.h
@@ -0,0 +1,39 @@
+/*
+ * $Id$
+ *
+ * ***** 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): Chingiz Dyussenov, Arystanbek Dyussenov.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file ExportSettings.h
+ * \ingroup collada
+ */
+
+#ifndef __EXPORTSETTINGS_H__
+#define __EXPORTSETTINGS_H__
+
+struct ExportSettings
+{
+ public:
+ bool selected;
+ char *filepath;
+};
+
+#endif
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp
index b724844b1ec..4892955fd3c 100644
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@ -44,16 +44,16 @@
#include "collada_internal.h"
// TODO: optimize UV sets by making indexed list with duplicates removed
-GeometryExporter::GeometryExporter(COLLADASW::StreamWriter *sw) : COLLADASW::LibraryGeometries(sw) {}
+GeometryExporter::GeometryExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings) : COLLADASW::LibraryGeometries(sw), export_settings(export_settings) {}
-void GeometryExporter::exportGeom(Scene *sce, bool export_selected)
+void GeometryExporter::exportGeom(Scene *sce)
{
openLibrary();
mScene = sce;
GeometryFunctor gf;
- gf.forEachMeshObjectInScene<GeometryExporter>(sce, *this, export_selected);
+ gf.forEachMeshObjectInScene<GeometryExporter>(sce, *this, this->export_settings->selected);
closeLibrary();
}
@@ -129,7 +129,7 @@ void GeometryExporter::operator()(Object *ob)
}
// powerful because it handles both cases when there is material and when there's not
-void GeometryExporter::createPolylist(int material_index,
+void GeometryExporter::createPolylist(short material_index,
bool has_uvs,
bool has_color,
Object *ob,
diff --git a/source/blender/collada/GeometryExporter.h b/source/blender/collada/GeometryExporter.h
index d9d265a66fc..532a439eba7 100644
--- a/source/blender/collada/GeometryExporter.h
+++ b/source/blender/collada/GeometryExporter.h
@@ -42,6 +42,8 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "ExportSettings.h"
+
// TODO: optimize UV sets by making indexed list with duplicates removed
class GeometryExporter : COLLADASW::LibraryGeometries
{
@@ -58,14 +60,14 @@ class GeometryExporter : COLLADASW::LibraryGeometries
Scene *mScene;
public:
- GeometryExporter(COLLADASW::StreamWriter *sw);
+ GeometryExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
- void exportGeom(Scene *sce, bool export_selected);
+ void exportGeom(Scene *sce);
void operator()(Object *ob);
// powerful because it handles both cases when there is material and when there's not
- void createPolylist(int material_index,
+ void createPolylist(short material_index,
bool has_uvs,
bool has_color,
Object *ob,
@@ -96,6 +98,8 @@ public:
/* int getTriCount(MFace *faces, int totface);*/
private:
std::set<std::string> exportedGeometry;
+
+ const ExportSettings *export_settings;
};
struct GeometryFunctor {
diff --git a/source/blender/collada/ImageExporter.cpp b/source/blender/collada/ImageExporter.cpp
index 8e426e9dba8..747f3c783d7 100644
--- a/source/blender/collada/ImageExporter.cpp
+++ b/source/blender/collada/ImageExporter.cpp
@@ -43,7 +43,7 @@
#include "BLI_path_util.h"
#include "BLI_string.h"
-ImagesExporter::ImagesExporter(COLLADASW::StreamWriter *sw, const char* filename) : COLLADASW::LibraryImages(sw), mfilename(filename)
+ImagesExporter::ImagesExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings) : COLLADASW::LibraryImages(sw), export_settings(export_settings)
{}
bool ImagesExporter::hasImages(Scene *sce)
@@ -71,12 +71,12 @@ bool ImagesExporter::hasImages(Scene *sce)
return false;
}
-void ImagesExporter::exportImages(Scene *sce, bool export_selected)
+void ImagesExporter::exportImages(Scene *sce)
{
if(hasImages(sce)) {
openLibrary();
MaterialFunctor mf;
- mf.forEachMaterialInScene<ImagesExporter>(sce, *this, export_selected);
+ mf.forEachMaterialInScene<ImagesExporter>(sce, *this, this->export_settings->selected);
closeLibrary();
}
@@ -97,7 +97,7 @@ void ImagesExporter::operator()(Material *ma, Object *ob)
char src[FILE_MAX];
char dir[FILE_MAX];
- BLI_split_dirfile(mfilename, dir, NULL);
+ BLI_split_dirfile(this->export_settings->filepath, dir, NULL);
BKE_rebase_path(abs, sizeof(abs), rel, sizeof(rel), G.main->name, image->name, dir);
diff --git a/source/blender/collada/ImageExporter.h b/source/blender/collada/ImageExporter.h
index 6b81c099259..9e5767fd9d3 100644
--- a/source/blender/collada/ImageExporter.h
+++ b/source/blender/collada/ImageExporter.h
@@ -40,17 +40,19 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "ExportSettings.h"
+
class ImagesExporter: COLLADASW::LibraryImages
{
- const char *mfilename;
- std::vector<std::string> mImages; // contains list of written images, to avoid duplicates
public:
- ImagesExporter(COLLADASW::StreamWriter *sw, const char* filename);
+ ImagesExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
- void exportImages(Scene *sce, bool export_selected);
+ void exportImages(Scene *sce);
void operator()(Material *ma, Object *ob);
private:
+ std::vector<std::string> mImages; // contains list of written images, to avoid duplicates
bool hasImages(Scene *sce);
+ const ExportSettings *export_settings;
};
#endif
diff --git a/source/blender/collada/LightExporter.cpp b/source/blender/collada/LightExporter.cpp
index 31ade5604a7..3d5814cb6db 100644
--- a/source/blender/collada/LightExporter.cpp
+++ b/source/blender/collada/LightExporter.cpp
@@ -52,13 +52,13 @@ void forEachLampObjectInScene(Scene *sce, Functor &f, bool export_selected)
}
}
-LightsExporter::LightsExporter(COLLADASW::StreamWriter *sw): COLLADASW::LibraryLights(sw){}
+LightsExporter::LightsExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings): COLLADASW::LibraryLights(sw), export_settings(export_settings) {}
-void LightsExporter::exportLights(Scene *sce, bool export_selected)
+void LightsExporter::exportLights(Scene *sce)
{
openLibrary();
- forEachLampObjectInScene(sce, *this, export_selected);
+ forEachLampObjectInScene(sce, *this, this->export_settings->selected);
closeLibrary();
}
diff --git a/source/blender/collada/LightExporter.h b/source/blender/collada/LightExporter.h
index 2ae1a19fdb1..6c52ed2b76d 100644
--- a/source/blender/collada/LightExporter.h
+++ b/source/blender/collada/LightExporter.h
@@ -37,14 +37,17 @@
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
+#include "ExportSettings.h"
+
class LightsExporter: COLLADASW::LibraryLights
{
public:
- LightsExporter(COLLADASW::StreamWriter *sw);
- void exportLights(Scene *sce, bool export_selected);
+ LightsExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
+ void exportLights(Scene *sce);
void operator()(Object *ob);
private:
bool exportBlenderProfile(COLLADASW::Light &cla, Lamp *la);
+ const ExportSettings *export_settings;
};
#endif
diff --git a/source/blender/collada/MaterialExporter.cpp b/source/blender/collada/MaterialExporter.cpp
index 9d29177578d..37c1a6f6b68 100644
--- a/source/blender/collada/MaterialExporter.cpp
+++ b/source/blender/collada/MaterialExporter.cpp
@@ -33,15 +33,15 @@
#include "COLLADABUUtils.h"
#include "collada_internal.h"
-MaterialsExporter::MaterialsExporter(COLLADASW::StreamWriter *sw): COLLADASW::LibraryMaterials(sw){}
+MaterialsExporter::MaterialsExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings): COLLADASW::LibraryMaterials(sw), export_settings(export_settings) {}
-void MaterialsExporter::exportMaterials(Scene *sce, bool export_selected)
+void MaterialsExporter::exportMaterials(Scene *sce)
{
if(hasMaterials(sce)) {
openLibrary();
MaterialFunctor mf;
- mf.forEachMaterialInScene<MaterialsExporter>(sce, *this, export_selected);
+ mf.forEachMaterialInScene<MaterialsExporter>(sce, *this, this->export_settings->selected);
closeLibrary();
}
diff --git a/source/blender/collada/MaterialExporter.h b/source/blender/collada/MaterialExporter.h
index c080e4b0596..97a1e27358f 100644
--- a/source/blender/collada/MaterialExporter.h
+++ b/source/blender/collada/MaterialExporter.h
@@ -44,16 +44,18 @@
#include "GeometryExporter.h"
#include "collada_internal.h"
+#include "ExportSettings.h"
class MaterialsExporter: COLLADASW::LibraryMaterials
{
public:
- MaterialsExporter(COLLADASW::StreamWriter *sw);
- void exportMaterials(Scene *sce, bool export_selected);
+ MaterialsExporter(COLLADASW::StreamWriter *sw, const ExportSettings *export_settings);
+ void exportMaterials(Scene *sce);
void operator()(Material *ma, Object *ob);
private:
bool hasMaterials(Scene *sce);
+ const ExportSettings *export_settings;
};
// used in forEachMaterialInScene
diff --git a/source/blender/collada/MeshImporter.cpp b/source/blender/collada/MeshImporter.cpp
index 15bd9c48f12..2f5d9e54e50 100644
--- a/source/blender/collada/MeshImporter.cpp
+++ b/source/blender/collada/MeshImporter.cpp
@@ -778,7 +778,7 @@ MTFace *MeshImporter::assign_material_to_geom(COLLADAFW::MaterialBinding cmateri
std::map<COLLADAFW::UniqueId, Material*>& uid_material_map,
Object *ob, const COLLADAFW::UniqueId *geom_uid,
MTex **color_texture, char *layername, MTFace *texture_face,
- std::map<Material*, TexIndexTextureArrayMap>& material_texture_mapping_map, int mat_index)
+ std::map<Material*, TexIndexTextureArrayMap>& material_texture_mapping_map, short mat_index)
{
Mesh *me = (Mesh*)ob->data;
const COLLADAFW::UniqueId& ma_uid = cmaterial.getReferencedMaterial();
diff --git a/source/blender/collada/MeshImporter.h b/source/blender/collada/MeshImporter.h
index 88ee0e46c33..208ba4d65c0 100644
--- a/source/blender/collada/MeshImporter.h
+++ b/source/blender/collada/MeshImporter.h
@@ -141,7 +141,7 @@ public:
std::map<COLLADAFW::UniqueId, Material*>& uid_material_map,
Object *ob, const COLLADAFW::UniqueId *geom_uid,
MTex **color_texture, char *layername, MTFace *texture_face,
- std::map<Material*, TexIndexTextureArrayMap>& material_texture_mapping_map, int mat_index);
+ std::map<Material*, TexIndexTextureArrayMap>& material_texture_mapping_map, short mat_index);
Object *create_mesh_object(COLLADAFW::Node *node, COLLADAFW::InstanceGeometry *geom,
diff --git a/source/blender/collada/SceneExporter.cpp b/source/blender/collada/SceneExporter.cpp
new file mode 100644
index 00000000000..a561d18c6e3
--- /dev/null
+++ b/source/blender/collada/SceneExporter.cpp
@@ -0,0 +1,161 @@
+/*
+ * $Id$
+ *
+ * ***** 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): Chingiz Dyussenov, Arystanbek Dyussenov, Jan Diederich, Tod Liverseed.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/collada/SceneExporter.cpp
+ * \ingroup collada
+ */
+
+#include "SceneExporter.h"
+
+SceneExporter::SceneExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm, const ExportSettings *export_settings)
+ : COLLADASW::LibraryVisualScenes(sw), arm_exporter(arm), export_settings(export_settings)
+{}
+
+void SceneExporter::exportScene(Scene *sce)
+{
+ // <library_visual_scenes> <visual_scene>
+ std::string id_naming = id_name(sce);
+ openVisualScene(translate_id(id_naming), id_naming);
+ exportHierarchy(sce);
+ closeVisualScene();
+ closeLibrary();
+}
+
+void SceneExporter::exportHierarchy(Scene *sce)
+{
+ Base *base= (Base*) sce->base.first;
+ while(base) {
+ Object *ob = base->object;
+
+ if (!ob->parent) {
+ if(sce->lay & ob->lay) {
+ switch(ob->type) {
+ case OB_MESH:
+ case OB_CAMERA:
+ case OB_LAMP:
+ case OB_ARMATURE:
+ case OB_EMPTY:
+ if (this->export_settings->selected && !(ob->flag & SELECT)) {
+ break;
+ }
+ // write nodes....
+ writeNodes(ob, sce);
+ break;
+ }
+ }
+ }
+
+ base= base->next;
+ }
+}
+
+void SceneExporter::writeNodes(Object *ob, Scene *sce)
+{
+ COLLADASW::Node node(mSW);
+ node.setNodeId(translate_id(id_name(ob)));
+ node.setType(COLLADASW::Node::NODE);
+
+ node.start();
+
+ bool is_skinned_mesh = arm_exporter->is_skinned_mesh(ob);
+
+ if (ob->type == OB_MESH && is_skinned_mesh)
+ // for skinned mesh we write obmat in <bind_shape_matrix>
+ TransformWriter::add_node_transform_identity(node);
+ else
+ TransformWriter::add_node_transform_ob(node, ob);
+
+ // <instance_geometry>
+ if (ob->type == OB_MESH) {
+ if (is_skinned_mesh) {
+ arm_exporter->add_instance_controller(ob);
+ }
+ else {
+ COLLADASW::InstanceGeometry instGeom(mSW);
+ instGeom.setUrl(COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_geometry_id(ob)));
+
+ InstanceWriter::add_material_bindings(instGeom.getBindMaterial(), ob);
+
+ instGeom.add();
+ }
+ }
+
+ // <instance_controller>
+ else if (ob->type == OB_ARMATURE) {
+ arm_exporter->add_armature_bones(ob, sce);
+
+ // XXX this looks unstable...
+ node.end();
+ }
+
+ // <instance_camera>
+ else if (ob->type == OB_CAMERA) {
+ COLLADASW::InstanceCamera instCam(mSW, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_camera_id(ob)));
+ instCam.add();
+ }
+
+ // <instance_light>
+ else if (ob->type == OB_LAMP) {
+ COLLADASW::InstanceLight instLa(mSW, COLLADASW::URI(COLLADABU::Utils::EMPTY_STRING, get_light_id(ob)));
+ instLa.add();
+ }
+
+ // empty object
+ else if (ob->type == OB_EMPTY) { // TODO: handle groups (OB_DUPLIGROUP
+ if((ob->transflag & OB_DUPLIGROUP) == OB_DUPLIGROUP && ob->dup_group) {
+ GroupObject *go = NULL;
+ Group *gr = ob->dup_group;
+ /* printf("group detected '%s'\n", gr->id.name+2); */
+ for(go = (GroupObject*)(gr->gobject.first); go; go=go->next) {
+ printf("\t%s\n", go->ob->id.name);
+ }
+ }
+ }
+
+ // write nodes for child objects
+ Base *b = (Base*) sce->base.first;
+ while(b) {
+ // cob - child object
+ Object *cob = b->object;
+
+ if (cob->parent == ob) {
+ switch(cob->type) {
+ case OB_MESH:
+ case OB_CAMERA:
+ case OB_LAMP:
+ case OB_EMPTY:
+ case OB_ARMATURE:
+ // write node...
+ writeNodes(cob, sce);
+ break;
+ }
+ }
+
+ b = b->next;
+ }
+
+ if (ob->type != OB_ARMATURE)
+ node.end();
+}
+
diff --git a/source/blender/collada/SceneExporter.h b/source/blender/collada/SceneExporter.h
new file mode 100644
index 00000000000..919cba61ec0
--- /dev/null
+++ b/source/blender/collada/SceneExporter.h
@@ -0,0 +1,109 @@
+/*
+ * $Id$
+ *
+ * ***** 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): Chingiz Dyussenov, Arystanbek Dyussenov.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file SceneExporter.h
+ * \ingroup collada
+ */
+
+#ifndef __SCENEEXPORTER_H__
+#define __SCENEEXPORTER_H__
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <math.h>
+
+extern "C" {
+#include "DNA_scene_types.h"
+#include "DNA_object_types.h"
+#include "DNA_group_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_mesh_types.h"
+#include "DNA_image_types.h"
+#include "DNA_material_types.h"
+#include "DNA_texture_types.h"
+#include "DNA_anim_types.h"
+#include "DNA_action_types.h"
+#include "DNA_curve_types.h"
+#include "DNA_armature_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_userdef_types.h"
+
+#include "BKE_DerivedMesh.h"
+#include "BKE_fcurve.h"
+#include "BKE_animsys.h"
+#include "BLI_path_util.h"
+#include "BLI_fileops.h"
+#include "ED_keyframing.h"
+}
+
+#include "COLLADASWAsset.h"
+#include "COLLADASWLibraryVisualScenes.h"
+#include "COLLADASWNode.h"
+#include "COLLADASWSource.h"
+#include "COLLADASWInstanceGeometry.h"
+#include "COLLADASWInputList.h"
+#include "COLLADASWPrimitves.h"
+#include "COLLADASWVertices.h"
+#include "COLLADASWLibraryAnimations.h"
+#include "COLLADASWLibraryImages.h"
+#include "COLLADASWLibraryEffects.h"
+#include "COLLADASWImage.h"
+#include "COLLADASWEffectProfile.h"
+#include "COLLADASWColorOrTexture.h"
+#include "COLLADASWParamTemplate.h"
+#include "COLLADASWParamBase.h"
+#include "COLLADASWSurfaceInitOption.h"
+#include "COLLADASWSampler.h"
+#include "COLLADASWScene.h"
+#include "COLLADASWTechnique.h"
+#include "COLLADASWTexture.h"
+#include "COLLADASWLibraryMaterials.h"
+#include "COLLADASWBindMaterial.h"
+#include "COLLADASWInstanceCamera.h"
+#include "COLLADASWInstanceLight.h"
+#include "COLLADASWConstants.h"
+#include "COLLADASWLibraryControllers.h"
+#include "COLLADASWInstanceController.h"
+#include "COLLADASWInstanceNode.h"
+#include "COLLADASWBaseInputElement.h"
+
+#include "ArmatureExporter.h"
+
+#include "ExportSettings.h"
+
+class SceneExporter: COLLADASW::LibraryVisualScenes, protected TransformWriter, protected InstanceWriter
+{
+public:
+ SceneExporter(COLLADASW::StreamWriter *sw, ArmatureExporter *arm, const ExportSettings *export_settings);
+ void exportScene(Scene *sce);
+
+private:
+ void exportHierarchy(Scene *sce);
+ void writeNodes(Object *ob, Scene *sce);
+
+ ArmatureExporter *arm_exporter;
+ const ExportSettings *export_settings;
+};
+
+#endif
diff --git a/source/blender/collada/TransformReader.cpp b/source/blender/collada/TransformReader.cpp
index 0fd0c85aa09..fa14a548850 100644
--- a/source/blender/collada/TransformReader.cpp
+++ b/source/blender/collada/TransformReader.cpp
@@ -37,7 +37,6 @@ void TransformReader::get_node_mat(float mat[][4], COLLADAFW::Node *node, std::m
{
float cur[4][4];
float copy[4][4];
- float eul[3];
unit_m4(mat);
@@ -83,8 +82,8 @@ void TransformReader::dae_rotate_to_mat4(COLLADAFW::Transformation *tm, float m[
{
COLLADAFW::Rotate *ro = (COLLADAFW::Rotate*)tm;
COLLADABU::Math::Vector3& axis = ro->getRotationAxis();
- float angle = (float)(ro->getRotationAngle() * M_PI / 180.0f);
- float ax[] = {axis[0], axis[1], axis[2]};
+ const float angle = (float)DEG2RAD(ro->getRotationAngle());
+ const float ax[] = {axis[0], axis[1], axis[2]};
// float quat[4];
// axis_angle_to_quat(quat, axis, angle);
// quat_to_mat4(m, quat);
diff --git a/source/blender/collada/TransformWriter.cpp b/source/blender/collada/TransformWriter.cpp
index 88ed112c3fe..34d13a2184d 100644
--- a/source/blender/collada/TransformWriter.cpp
+++ b/source/blender/collada/TransformWriter.cpp
@@ -107,9 +107,9 @@ void TransformWriter::add_transform(COLLADASW::Node& node, float loc[3], float r
/*node.addRotateZ("rotationZ", COLLADABU::Math::Utils::radToDegF(rot[2]));
node.addRotateY("rotationY", COLLADABU::Math::Utils::radToDegF(rot[1]));
node.addRotateX("rotationX", COLLADABU::Math::Utils::radToDegF(rot[0]));*/
- node.addRotateZ("rotationZ", rot[2] * 180.0f/M_PI);
- node.addRotateY("rotationY", (rot[1]* 180.0f/M_PI));
- node.addRotateX("rotationX", (rot[0]* 180.0f/M_PI));
+ node.addRotateZ("rotationZ", RAD2DEGF(rot[2]));
+ node.addRotateY("rotationY", RAD2DEGF(rot[1]));
+ node.addRotateX("rotationX", RAD2DEGF(rot[0]));
node.addScale("scale", scale[0], scale[1], scale[2]);
}
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index c15e608c360..8059b1cf3ff 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -30,6 +30,7 @@
/* COLLADABU_ASSERT, may be able to remove later */
#include "COLLADABUPlatform.h"
+#include "ExportSettings.h"
#include "DocumentExporter.h"
#include "DocumentImporter.h"
@@ -46,14 +47,17 @@ extern "C"
int collada_import(bContext *C, const char *filepath)
{
DocumentImporter imp (C, filepath);
- imp.import();
+ if(imp.import()) return 1;
- return 1;
+ return 0;
}
int collada_export(Scene *sce, const char *filepath, int selected)
{
- DocumentExporter exp;
+ ExportSettings export_settings;
+
+ export_settings.selected = selected != 0;
+ export_settings.filepath = (char *)filepath;
/* annoying, collada crashes if file cant be created! [#27162] */
if(!BLI_exist(filepath)) {
@@ -64,7 +68,8 @@ extern "C"
}
/* end! */
- exp.exportCurrentScene(sce, filepath, selected);
+ DocumentExporter exporter(&export_settings);
+ exporter.exportCurrentScene(sce);
return 1;
}
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index bdc654ff25a..373d351fb6c 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -121,7 +121,7 @@ static void acf_generic_root_backdrop(bAnimContext *ac, bAnimListElem *ale, floa
glColor3fv(color);
/* rounded corners on LHS only - top only when expanded, but bottom too when collapsed */
- uiSetRoundBox((expanded)? (1):(1|8));
+ 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);
}
@@ -401,7 +401,7 @@ static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float ymi
* - top and bottom
* - special hack: make the top a bit higher, since we are first...
*/
- uiSetRoundBox((1|8));
+ uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT);
uiDrawBox(GL_POLYGON, 0, yminc-2, v2d->cur.xmax+EXTRA_SCROLL_PAD, ymaxc, 8);
}
@@ -756,7 +756,7 @@ static void acf_group_backdrop(bAnimContext *ac, bAnimListElem *ale, float yminc
glColor3fv(color);
/* rounded corners on LHS only - top only when expanded, but bottom too when collapsed */
- uiSetRoundBox((expanded)? (1):(1|8));
+ 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);
}
@@ -3069,21 +3069,21 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
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.";
+ 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.";
+ tooltip= "NLA Track is the only one evaluated for the AnimData block it belongs to";
break;
/* --- */
@@ -3092,7 +3092,7 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
// 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.";
+ tooltip= "Editability of keyframes for this channel";
break;
case ACHANNEL_SETTING_MUTE: /* muted speaker */
@@ -3100,9 +3100,9 @@ static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChan
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:
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index 70974386917..d2b1fcc4abd 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -404,9 +404,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 M_PI / 180.0; /* degrees to radians */
+ return DEG2RADF(1.0f); /* degrees to radians */
else
- return 180.0 / M_PI; /* radians to degrees */
+ return RAD2DEGF(1.0f); /* radians to degrees */
}
}
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index bb710a32794..bd5935c893c 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -893,7 +893,7 @@ static size_t skip_fcurve_selected_data (bDopeSheet *ads, FCurve *fcu, ID *owner
*/
static short skip_fcurve_with_name (bDopeSheet *ads, FCurve *fcu, ID *owner_id)
{
- bAnimListElem ale_dummy = {0};
+ bAnimListElem ale_dummy = {NULL};
bAnimChannelType *acf;
/* create a dummy wrapper for the F-Curve */
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index eaba8343f4d..aa61afbac78 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -41,6 +41,7 @@
#include "BKE_context.h"
#include "BKE_global.h"
+#include "BKE_main.h"
#include "BKE_sound.h"
#include "UI_view2d.h"
@@ -76,6 +77,7 @@ 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);
/* set the new frame number */
@@ -84,7 +86,7 @@ static void change_frame_apply(bContext *C, wmOperator *op)
SUBFRA = 0.f;
/* do updates */
- sound_seek_scene(C);
+ sound_seek_scene(bmain, scene);
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
}
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index 6ebe488d2c8..e8f3fc28d74 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -364,7 +364,7 @@ short ANIM_paste_driver (ReportList *reports, ID *id, const char rna_path[], int
/* if the buffer is empty, cannot paste... */
if (channeldriver_copypaste_buf == NULL) {
- BKE_report(reports, RPT_ERROR, "Paste Driver: No Driver to paste.");
+ BKE_report(reports, RPT_ERROR, "Paste Driver: No Driver to paste");
return 0;
}
@@ -527,7 +527,7 @@ void ANIM_OT_driver_button_add (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array.");
+ RNA_def_boolean(ot->srna, "all", 1, "All", "Create drivers for all elements of the array");
}
/* Remove Driver Button Operator ------------------------ */
@@ -579,7 +579,7 @@ void ANIM_OT_driver_button_remove (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array.");
+ RNA_def_boolean(ot->srna, "all", 1, "All", "Delete drivers for all elements of the array");
}
/* Copy Driver Button Operator ------------------------ */
diff --git a/source/blender/editors/animation/fmodifier_ui.c b/source/blender/editors/animation/fmodifier_ui.c
index 928584966d9..77c67fc4af0 100644
--- a/source/blender/editors/animation/fmodifier_ui.c
+++ b/source/blender/editors/animation/fmodifier_ui.c
@@ -648,7 +648,7 @@ void ANIM_uiTemplate_fmodifier_draw (uiLayout *layout, ID *id, ListBase *modifie
uiBlockSetEmboss(block, UI_EMBOSSN);
/* 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, "Delete F-Curve Modifier.");
+ 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, "Delete F-Curve Modifier");
uiButSetFunc(but, delete_fmodifier_cb, modifiers, fcm);
uiBlockSetEmboss(block, UI_EMBOSS);
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 2305848e7b3..fa619e4cf44 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -204,8 +204,8 @@ static short ob_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, Object *o
int filter;
int ret=0;
- bAnimListElem dummychan = {0};
- Base dummybase = {0};
+ bAnimListElem dummychan = {NULL};
+ Base dummybase = {NULL};
if (ob == NULL)
return 0;
@@ -249,7 +249,7 @@ static short scene_keyframes_loop(KeyframeEditData *ked, bDopeSheet *ads, Scene
int filter;
int ret=0;
- bAnimListElem dummychan = {0};
+ bAnimListElem dummychan = {NULL};
if (sce == NULL)
return 0;
diff --git a/source/blender/editors/animation/keyframes_general.c b/source/blender/editors/animation/keyframes_general.c
index 3d3311b35eb..0f4546968ba 100644
--- a/source/blender/editors/animation/keyframes_general.c
+++ b/source/blender/editors/animation/keyframes_general.c
@@ -753,7 +753,7 @@ EnumPropertyItem keyframe_paste_merge_items[] = {
{KEYFRAME_PASTE_MERGE_MIX, "MIX", 0, "Mix", "Overlay existing with new keys"},
{KEYFRAME_PASTE_MERGE_OVER, "OVER_ALL", 0, "Overwrite All", "Replace all keys"},
{KEYFRAME_PASTE_MERGE_OVER_RANGE, "OVER_RANGE", 0, "Overwrite Range", "Overwrite keys in pasted range"},
- {KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL, "OVER_RANGE_ALL", 0, "Overwrite Entire Range", "Overwrite keys in pasted range, using the range of all copied keys."},
+ {KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL, "OVER_RANGE_ALL", 0, "Overwrite Entire Range", "Overwrite keys in pasted range, using the range of all copied keys"},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 53c9fc4d82c..58e1549c0ed 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -531,7 +531,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
bConstraint *con= NULL;
short searchtype= VISUALKEY_NONE;
short has_parent = FALSE;
- char *identifier= NULL;
+ const char *identifier= NULL;
/* validate data */
// TODO: this check is probably not needed, but it won't hurt
@@ -548,7 +548,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
Object *ob= (Object *)ptr->data;
con= ob->constraints.first;
- identifier= (char *)RNA_property_identifier(prop);
+ identifier= RNA_property_identifier(prop);
has_parent= (ob->parent != NULL);
}
else if (ptr->type == &RNA_PoseBone) {
@@ -556,7 +556,7 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
bPoseChannel *pchan= (bPoseChannel *)ptr->data;
con= pchan->constraints.first;
- identifier= (char *)RNA_property_identifier(prop);
+ identifier= RNA_property_identifier(prop);
has_parent= (pchan->parent != NULL);
}
@@ -565,12 +565,18 @@ static short visualkey_can_use (PointerRNA *ptr, PropertyRNA *prop)
return 0;
/* location or rotation identifiers only... */
- if (strstr(identifier, "location"))
+ if(identifier == NULL) {
+ printf("%s failed: NULL identifier\n", __func__);
+ return 0;
+ }
+ else if (strstr(identifier, "location")) {
searchtype= VISUALKEY_LOC;
- else if (strstr(identifier, "rotation"))
+ }
+ else if (strstr(identifier, "rotation")) {
searchtype= VISUALKEY_ROT;
+ }
else {
- printf("visualkey_can_use() failed: identifier - '%s' \n", identifier);
+ printf("%s failed: identifier - '%s' \n", __func__, identifier);
return 0;
}
@@ -757,7 +763,7 @@ 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.",
+ "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;
}
@@ -1454,7 +1460,7 @@ static int insert_key_button_exec (bContext *C, wmOperator *op)
else {
if (G.f & G_DEBUG)
printf("Button Insert-Key: no path to property \n");
- BKE_report(op->reports, RPT_WARNING, "Failed to resolve path to property. Try using a Keying Set instead.");
+ BKE_report(op->reports, RPT_WARNING, "Failed to resolve path to property. Try using a Keying Set instead");
}
}
else if (G.f & G_DEBUG) {
@@ -1492,7 +1498,7 @@ void ANIM_OT_keyframe_insert_button (wmOperatorType *ot)
ot->flag= OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array.");
+ RNA_def_boolean(ot->srna, "all", 1, "All", "Insert a keyframe for all element of the array");
}
/* Delete Key Button Operator ------------------------ */
@@ -1564,7 +1570,7 @@ void ANIM_OT_keyframe_delete_button (wmOperatorType *ot)
ot->flag= OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array.");
+ RNA_def_boolean(ot->srna, "all", 1, "All", "Delete keyfames from all elements of the array");
}
/* ******************************************* */
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index dcd1c3abbde..7c2f969e187 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -382,7 +382,7 @@ void ANIM_OT_keyingset_button_add (wmOperatorType *ot)
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.");
+ RNA_def_boolean(ot->srna, "all", 1, "All", "Add all elements of the array to a Keying Set");
}
/* Remove from KeyingSet Button Operator ------------------------ */
diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt
index 9a44525611a..7ecbdc9ebe5 100644
--- a/source/blender/editors/armature/CMakeLists.txt
+++ b/source/blender/editors/armature/CMakeLists.txt
@@ -21,6 +21,7 @@
set(INC
../include
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
diff --git a/source/blender/editors/armature/SConscript b/source/blender/editors/armature/SConscript
index b7f9a263bc1..ded82b3dfb7 100644
--- a/source/blender/editors/armature/SConscript
+++ b/source/blender/editors/armature/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('*.c')
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf ../../blenloader'
+incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf ../../blenloader'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../gpu ../../makesrna #/intern/opennl/extern'
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index eaaaa12eca1..566ff09c366 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -361,7 +361,7 @@ static void fix_bonelist_roll (ListBase *bonelist, ListBase *editbonelist)
print_m4("premat", premat);
print_m4("postmat", postmat);
print_m4("difmat", difmat);
- printf ("Roll = %f\n", (-atan2(difmat[2][0], difmat[2][2]) * (180.0/M_PI)));
+ printf ("Roll = %f\n", RAD2DEGF(-atan2(difmat[2][0], difmat[2][2])));
#endif
curBone->roll = (float)-atan2(difmat[2][0], difmat[2][2]);
@@ -643,7 +643,7 @@ static void applyarmature_fix_boneparents (Scene *scene, Object *armob)
static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
{
Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C)); // must be active object, not edit-object
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C)); // must be active object, not edit-object
bArmature *arm= get_armature(ob);
bPose *pose;
bPoseChannel *pchan;
@@ -653,7 +653,7 @@ static int apply_armature_pose2bones_exec (bContext *C, wmOperator *op)
if (ob->type!=OB_ARMATURE)
return OPERATOR_CANCELLED;
if (object_data_is_libdata(ob)) {
- BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature."); //error_libdata();
+ BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); //error_libdata();
return OPERATOR_CANCELLED;
}
@@ -745,7 +745,7 @@ void POSE_OT_armature_apply (wmOperatorType *ot)
/* set the current pose as the restpose */
static int pose_visual_transform_apply_exec (bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C)); // must be active object, not edit-object
+ Object *ob= 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)
@@ -782,7 +782,7 @@ void POSE_OT_visual_transform_apply (wmOperatorType *ot)
/* identifiers */
ot->name= "Apply Visual Transform to Pose";
ot->idname= "POSE_OT_visual_transform_apply";
- ot->description= "Apply final constrained position of pose bones to their transform.";
+ ot->description= "Apply final constrained position of pose bones to their transform";
/* callbacks */
ot->exec= pose_visual_transform_apply_exec;
@@ -1480,7 +1480,7 @@ void POSE_OT_select_linked(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
}
/* **************** END Posemode stuff ********************** */
@@ -1574,7 +1574,7 @@ void ARMATURE_OT_select_linked(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties s*/
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
}
/* does bones and points */
@@ -2115,8 +2115,8 @@ void ARMATURE_OT_calculate_roll(wmOperatorType *ot)
/* properties */
ot->prop= RNA_def_enum(ot->srna, "type", prop_calc_roll_types, 0, "Type", "");
- RNA_def_boolean(ot->srna, "axis_flip", 0, "Flip Axis", "Negate the alignment axis.");
- RNA_def_boolean(ot->srna, "axis_only", 0, "Shortest Rotation", "Ignore the axis direction, use the shortest rotation to align.");
+ RNA_def_boolean(ot->srna, "axis_flip", 0, "Flip Axis", "Negate the alignment axis");
+ RNA_def_boolean(ot->srna, "axis_only", 0, "Shortest Rotation", "Ignore the axis direction, use the shortest rotation to align");
}
/* **************** undo for armatures ************** */
@@ -3196,7 +3196,7 @@ void ARMATURE_OT_hide(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
}
static int armature_reveal_exec(bContext *C, wmOperator *UNUSED(op))
@@ -4290,10 +4290,15 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
/* if the bone cannot be affected, don't do anything */
if ((nearBone) && !(nearBone->flag & BONE_UNSELECTABLE)) {
+ 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 */
- if (!(extend) || (base != scene->basact)) {
+ /* 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 pradictable behavior in weight paint mode - campbell */
+ if (!(extend) || ((ob_act && 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;
@@ -4324,7 +4329,7 @@ int ED_do_pose_selectbuffer(Scene *scene, Base *base, unsigned int *buffer, shor
}
/* in weightpaint we select the associated vertex group too */
- if (OBACT && OBACT->mode & OB_MODE_WEIGHT_PAINT) {
+ if (ob_act && ob_act->mode & OB_MODE_WEIGHT_PAINT) {
if (nearBone == arm->act_bone) {
ED_vgroup_select_by_name(OBACT, nearBone->name);
DAG_id_tag_update(&OBACT->id, OB_RECALC_DATA);
@@ -4886,7 +4891,7 @@ static int pose_clear_transform_generic_exec(bContext *C, wmOperator *op,
void (*clear_func)(bPoseChannel*), const char default_ksName[])
{
Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
short autokey = 0;
/* sanity checks */
@@ -5061,6 +5066,10 @@ void POSE_OT_select_inverse(wmOperatorType *ot)
static int pose_de_select_all_exec(bContext *C, wmOperator *op)
{
int action = RNA_enum_get(op->ptr, "action");
+
+ Object *ob = NULL;
+ 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;
@@ -5091,6 +5100,11 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_OBJECT|ND_BONE_SELECT, NULL);
+ if(multipaint) {
+ ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ }
+
return OPERATOR_FINISHED;
}
@@ -5113,7 +5127,7 @@ void POSE_OT_select_all(wmOperatorType *ot)
static int pose_select_parent_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bPoseChannel *pchan,*parent;
/* Determine if there is an active bone */
@@ -5189,7 +5203,7 @@ 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= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bArmature *arm= ob->data;
if(RNA_boolean_get(op->ptr, "unselected"))
@@ -5238,7 +5252,7 @@ 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= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bArmature *arm= ob->data;
bone_looper(ob, arm->bonebase.first, NULL, show_pose_bone_cb);
@@ -5534,7 +5548,7 @@ void ARMATURE_OT_autoside_names (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* settings */
- ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with.");
+ ot->prop= RNA_def_enum(ot->srna, "type", axis_items, 0, "Axis", "Axis tag names with");
}
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 97f85b92b32..bcd9d746a44 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -409,10 +409,10 @@ static ReebNode *sk_pointToNode(SK_Point *pt, float imat[][4], float tmat[][3])
ReebNode *node;
node = MEM_callocN(sizeof(ReebNode), "reeb node");
- VECCOPY(node->p, pt->p);
+ copy_v3_v3(node->p, pt->p);
mul_m4_v3(imat, node->p);
- VECCOPY(node->no, pt->no);
+ copy_v3_v3(node->no, pt->no);
mul_m3_v3(tmat, node->no);
return node;
@@ -432,10 +432,10 @@ static ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3])
for (i = 0; i < arc->bcount; i++)
{
- VECCOPY(arc->buckets[i].p, stk->points[i + 1].p);
+ copy_v3_v3(arc->buckets[i].p, stk->points[i + 1].p);
mul_m4_v3(imat, arc->buckets[i].p);
- VECCOPY(arc->buckets[i].no, stk->points[i + 1].no);
+ copy_v3_v3(arc->buckets[i].no, stk->points[i + 1].no);
mul_m3_v3(tmat, arc->buckets[i].no);
}
@@ -1802,8 +1802,8 @@ void sk_applyCutGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSED
pt.type = PT_EXACT;
pt.mode = PT_PROJECT; /* take mode from neighbouring points */
- VECCOPY(pt.p, isect->p);
- VECCOPY(pt.no, isect->stroke->points[isect->before].no);
+ copy_v3_v3(pt.p, isect->p);
+ copy_v3_v3(pt.no, isect->stroke->points[isect->before].no);
sk_insertStrokePoint(isect->stroke, &pt, isect->after);
}
@@ -1844,8 +1844,8 @@ void sk_applyTrimGesture(bContext *UNUSED(C), SK_Gesture *gest, SK_Sketch *UNUSE
pt.type = PT_EXACT;
pt.mode = PT_PROJECT; /* take mode from neighbouring points */
- VECCOPY(pt.p, isect->p);
- VECCOPY(pt.no, isect->stroke->points[isect->before].no);
+ copy_v3_v3(pt.p, isect->p);
+ copy_v3_v3(pt.no, isect->stroke->points[isect->before].no);
sub_v3_v3v3(stroke_dir, isect->stroke->points[isect->after].p, isect->stroke->points[isect->before].p);
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index b99605e65c1..6c721660e9c 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -518,7 +518,7 @@ static float heat_source_distance(LaplacianSystem *sys, int vertex, int source)
dist= normalize_v3(d);
/* if the vertex normal does not point along the bone, increase distance */
- cosine= INPR(d, sys->heat.vnors[vertex]);
+ cosine= dot_v3v3(d, sys->heat.vnors[vertex]);
return dist/(0.5f*(cosine + 1.001f));
}
@@ -657,22 +657,41 @@ void heat_bone_weighting(Object *ob, Mesh *me, float (*verts)[3], int numsource,
int *vertsflipped = NULL, *mask= NULL;
int a, totface, j, bbone, firstsegment, lastsegment;
+ MVert *mvert = me->mvert;
+ int use_vert_sel= FALSE;
+ int use_face_sel= FALSE;
+
*err_str= NULL;
/* count triangles and create mask */
- if(me->editflag & ME_EDIT_PAINT_MASK)
+ 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");
+ }
for(totface=0, a=0, mface=me->mface; a<me->totface; a++, mface++) {
totface++;
if(mface->v4) totface++;
- if(mask && (mface->flag & ME_FACE_SEL)) {
- mask[mface->v1]= 1;
- mask[mface->v2]= 1;
- mask[mface->v3]= 1;
- if(mface->v4)
- mask[mface->v4]= 1;
+ /* (added selectedVerts content for vertex mask, they used to just equal 1) */
+ if(use_vert_sel) {
+ mask[mface->v1]= (mvert[mface->v1].flag & SELECT) != 0;
+ mask[mface->v2]= (mvert[mface->v2].flag & SELECT) != 0;
+ mask[mface->v3]= (mvert[mface->v3].flag & SELECT) != 0;
+ if(mface->v4) {
+ mask[mface->v4]= (mvert[mface->v4].flag & SELECT) != 0;
+ }
+ }
+ else {
+ if(use_face_sel) {
+ mask[mface->v1]= 1;
+ mask[mface->v2]= 1;
+ mask[mface->v3]= 1;
+ if(mface->v4) {
+ mask[mface->v4]= 1;
+ }
+ }
}
}
@@ -936,7 +955,7 @@ void rigid_deform_iteration()
}
else {
if(!sys->rigid.thrownerror) {
- error("RigidDeform: failed to find solution.");
+ error("RigidDeform: failed to find solution");
sys->rigid.thrownerror= 1;
}
break;
@@ -1120,7 +1139,7 @@ static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
cross_v3_v3v3(pvec, dir, edge2);
/* if determinant is near zero, ray lies in plane of triangle */
- det = INPR(edge1, pvec);
+ det = dot_v3v3(edge1, pvec);
if (det == 0.0f)
return 0;
@@ -1130,7 +1149,7 @@ static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
sub_v3_v3v3(tvec, orig, vert0);
/* calculate U parameter and test bounds */
- u = INPR(tvec, pvec) * inv_det;
+ u = dot_v3v3(tvec, pvec) * inv_det;
if (u < -EPSILON || u > 1.0f+EPSILON)
return 0;
@@ -1138,7 +1157,7 @@ static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
cross_v3_v3v3(qvec, tvec, edge1);
/* calculate V parameter and test bounds */
- v = INPR(dir, qvec) * inv_det;
+ v = dot_v3v3(dir, qvec) * inv_det;
if (v < -EPSILON || u + v > 1.0f+EPSILON)
return 0;
@@ -1153,10 +1172,10 @@ static int meshdeform_tri_intersect(float orig[3], float end[3], float vert0[3],
/* check if it is within the length of the line segment */
sub_v3_v3v3(isectdir, isectco, orig);
- if(INPR(dir, isectdir) < -EPSILON)
+ if(dot_v3v3(dir, isectdir) < -EPSILON)
return 0;
- if(INPR(dir, dir) + EPSILON < INPR(isectdir, isectdir))
+ if(dot_v3v3(dir, dir) + EPSILON < dot_v3v3(isectdir, isectdir))
return 0;
return 1;
@@ -1202,7 +1221,7 @@ static int meshdeform_intersect(MeshDeformBind *mdb, MeshDeformIsect *isec)
if(len < isec->labda) {
isec->labda= len;
isec->face = mface;
- isec->isect= (INPR(isec->vec, nor) <= 0.0f);
+ isec->isect= (dot_v3v3(isec->vec, nor) <= 0.0f);
is= 1;
}
}
@@ -1693,7 +1712,7 @@ static void meshdeform_matrix_solve(MeshDeformBind *mdb)
}
}
else {
- error("Mesh Deform: failed to find solution.");
+ error("Mesh Deform: failed to find solution");
break;
}
diff --git a/source/blender/editors/armature/poseSlide.c b/source/blender/editors/armature/poseSlide.c
index b0ff60455cf..0497c0507dc 100644
--- a/source/blender/editors/armature/poseSlide.c
+++ b/source/blender/editors/armature/poseSlide.c
@@ -51,6 +51,7 @@
#include "BKE_fcurve.h"
#include "BKE_context.h"
+#include "BKE_object.h"
#include "BKE_report.h"
#include "RNA_access.h"
@@ -129,7 +130,7 @@ static int pose_slide_init (bContext *C, wmOperator *op, short mode)
/* get info from context */
pso->scene= CTX_data_scene(C);
- pso->ob= ED_object_pose_armature(CTX_data_active_object(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() */
@@ -599,7 +600,7 @@ static int pose_slide_invoke_common (bContext *C, wmOperator *op, tPoseSlideOp *
}
}
else {
- BKE_report(op->reports, RPT_ERROR, "No keyframes to slide between.");
+ BKE_report(op->reports, RPT_ERROR, "No keyframes to slide between");
pose_slide_exit(op);
return OPERATOR_CANCELLED;
}
@@ -717,8 +718,8 @@ 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)
{
- 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);
+ 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);
RNA_def_float_percentage(ot->srna, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Weighting factor for the sliding operation", 0.3, 0.7);
}
@@ -1164,7 +1165,7 @@ static void pose_propagate_fcurve (wmOperator *op, Object *ob, FCurve *fcu,
static int pose_propagate_exec (bContext *C, wmOperator *op)
{
Scene *scene = CTX_data_scene(C);
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bAction *act= (ob && ob->adt)? ob->adt->action : NULL;
ListBase pflinks = {NULL, NULL};
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index 864eaa3bdbd..8a7d837d2a8 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -43,6 +43,8 @@
#include "BLI_dlrbTree.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "DNA_anim_types.h"
#include "DNA_armature_types.h"
#include "DNA_object_types.h"
@@ -54,6 +56,7 @@
#include "BKE_depsgraph.h"
#include "BKE_idprop.h"
#include "BKE_library.h"
+#include "BKE_object.h"
#include "BKE_context.h"
#include "BKE_report.h"
@@ -170,7 +173,7 @@ static Object *get_poselib_object (bContext *C)
if (sa && (sa->spacetype == SPACE_BUTS))
return CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- return ED_object_pose_armature(CTX_data_active_object(C));
+ return object_pose_armature_get(CTX_data_active_object(C));
}
/* Poll callback for operators that require existing PoseLib data (with poses) to work */
@@ -406,15 +409,15 @@ static int poselib_add_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_DEFAULT);
/* add new (adds to the first unoccupied frame) */
- uiItemIntO(layout, "Add New", ICON_NONE, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib));
+ uiItemIntO(layout, UI_translate_do_iface(N_("Add New")), ICON_NONE, "POSELIB_OT_pose_add", "frame", poselib_get_free_index(ob->poselib));
/* check if we have any choices to add a new pose in any other way */
if ((ob->poselib) && (ob->poselib->markers.first)) {
/* add new (on current frame) */
- uiItemIntO(layout, "Add New (Current Frame)", ICON_NONE, "POSELIB_OT_pose_add", "frame", CFRA);
+ uiItemIntO(layout, UI_translate_do_iface(N_("Add New (Current Frame)")), ICON_NONE, "POSELIB_OT_pose_add", "frame", CFRA);
/* replace existing - submenu */
- uiItemMenuF(layout, "Replace Existing...", 0, poselib_add_menu_invoke__replacemenu, NULL);
+ uiItemMenuF(layout, UI_translate_do_iface(N_("Replace Existing...")), 0, poselib_add_menu_invoke__replacemenu, NULL);
}
uiPupMenuEnd(C, pup);
@@ -632,7 +635,7 @@ static int poselib_rename_invoke (bContext *C, wmOperator *op, wmEvent *evt)
static int poselib_rename_exec (bContext *C, wmOperator *op)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bAction *act= (ob) ? ob->poselib : NULL;
TimeMarker *marker;
char newname[64];
@@ -1438,9 +1441,7 @@ static void poselib_preview_init_data (bContext *C, wmOperator *op)
pld->pose->flag &= ~POSE_DO_UNLOCK;
/* clear strings + search */
- strcpy(pld->headerstr, "");
- strcpy(pld->searchstr, "");
- strcpy(pld->searchold, "");
+ pld->headerstr[0]= pld->searchstr[0]= pld->searchold[0]= '\0';
pld->search_cursor= 0;
}
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 3911be02fe7..4405f395843 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -58,6 +58,7 @@
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
#include "BKE_modifier.h"
+#include "BKE_object.h"
#include "BKE_report.h"
@@ -78,36 +79,6 @@
#include "armature_intern.h"
-static int object_pose_context(Object *ob)
-{
- if( (ob) &&
- (ob->type == OB_ARMATURE) &&
- (ob->pose) &&
- (ob->mode & OB_MODE_POSE)
- ) {
- return 1;
- }
- else {
- return 0;
- }
-}
-
-Object *ED_object_pose_armature(Object *ob)
-{
- if(ob==NULL)
- return NULL;
-
- if(object_pose_context(ob))
- return ob;
-
- ob= modifiers_isDeformedByArmature(ob);
-
- if(object_pose_context(ob))
- return ob;
-
- return NULL;
-}
-
/* This function is used to process the necessary updates for */
void ED_armature_enter_posemode(bContext *C, Base *base)
{
@@ -238,7 +209,7 @@ static int pose_calculate_paths_exec (bContext *C, wmOperator *UNUSED(op))
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= object_pose_armature_get(CTX_data_active_object(C));
if (ELEM(NULL, ob, ob->pose))
return OPERATOR_CANCELLED;
@@ -314,7 +285,7 @@ static int pose_clear_paths_exec (bContext *C, wmOperator *UNUSED(op))
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object */
if ELEM(NULL, ob, ob->pose)
@@ -348,7 +319,7 @@ void POSE_OT_paths_clear (wmOperatorType *ot)
static int pose_select_constraint_target_exec(bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bConstraint *con;
int found= 0;
@@ -408,7 +379,7 @@ void POSE_OT_select_constraint_target(wmOperatorType *ot)
static int pose_select_hierarchy_exec(bContext *C, wmOperator *op)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= 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");
@@ -646,7 +617,7 @@ static int pose_select_same_keyingset(bContext *C, Object *ob, short extend)
static int pose_select_grouped_exec (bContext *C, wmOperator *op)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
short extend= RNA_boolean_get(op->ptr, "extend");
short changed = 0;
@@ -702,7 +673,7 @@ void POSE_OT_select_grouped (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
}
@@ -713,7 +684,7 @@ void POSE_OT_select_grouped (wmOperatorType *ot)
static int pose_bone_flip_active_exec (bContext *C, wmOperator *UNUSED(op))
{
Object *ob_act= CTX_data_active_object(C);
- Object *ob= ED_object_pose_armature(ob_act);
+ Object *ob= object_pose_armature_get(ob_act);
if(ob && (ob->mode & OB_MODE_POSE)) {
bArmature *arm= ob->data;
@@ -751,7 +722,7 @@ void POSE_OT_select_flip_active(wmOperatorType *ot)
/* identifiers */
ot->name= "Flip Selected Active Bone";
ot->idname= "POSE_OT_select_flip_active";
- ot->description= "Activate the bone with a flipped name.";
+ ot->description= "Activate the bone with a flipped name";
/* api callbacks */
ot->exec= pose_bone_flip_active_exec;
@@ -1135,7 +1106,7 @@ static bPoseChannel *pose_bone_do_paste (Object *ob, bPoseChannel *chan, short s
static int pose_copy_exec (bContext *C, wmOperator *op)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
/* sanity checking */
if ELEM(NULL, ob, ob->pose) {
@@ -1173,7 +1144,7 @@ void POSE_OT_copy (wmOperatorType *ot)
static int pose_paste_exec (bContext *C, wmOperator *op)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= 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");
@@ -1272,7 +1243,7 @@ static int pose_group_add_exec (bContext *C, wmOperator *UNUSED(op))
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object */
if (ob == NULL)
@@ -1312,7 +1283,7 @@ static int pose_group_remove_exec (bContext *C, wmOperator *UNUSED(op))
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= object_pose_armature_get(CTX_data_active_object(C));
/* only continue if there's an object */
if (ob == NULL)
@@ -1360,7 +1331,7 @@ static int pose_groups_menu_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= 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))
@@ -1409,7 +1380,7 @@ static int pose_group_assign_exec (bContext *C, wmOperator *op)
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= 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))
@@ -1472,7 +1443,7 @@ static int pose_group_unassign_exec (bContext *C, wmOperator *UNUSED(op))
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= 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))
@@ -1707,7 +1678,7 @@ static int pose_group_select_exec (bContext *C, wmOperator *UNUSED(op))
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= 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))
@@ -1745,7 +1716,7 @@ static int pose_group_deselect_exec (bContext *C, wmOperator *UNUSED(op))
if (sa->spacetype == SPACE_BUTS)
ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
else
- ob= ED_object_pose_armature(CTX_data_active_object(C));
+ ob= 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))
@@ -1778,7 +1749,7 @@ void POSE_OT_group_deselect (wmOperatorType *ot)
static int pose_flip_names_exec (bContext *C, wmOperator *UNUSED(op))
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bArmature *arm;
/* paranoia checks */
@@ -1823,7 +1794,7 @@ void POSE_OT_flip_names (wmOperatorType *ot)
static int pose_autoside_names_exec (bContext *C, wmOperator *op)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bArmature *arm;
char newname[32];
short axis= RNA_enum_get(op->ptr, "axis");
@@ -1873,7 +1844,7 @@ void POSE_OT_autoside_names (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* settings */
- ot->prop= RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with.");
+ ot->prop= RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Axis tag names with");
}
/* ********************************************** */
@@ -1927,7 +1898,7 @@ static int pose_armature_layers_showall_poll (bContext *C)
static int pose_armature_layers_showall_exec (bContext *C, wmOperator *op)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= 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;
@@ -1979,7 +1950,7 @@ 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)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= 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... */
@@ -2000,7 +1971,7 @@ 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)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= 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... */
@@ -2090,7 +2061,7 @@ static int pose_bone_layers_invoke (bContext *C, wmOperator *op, wmEvent *evt)
/* Set the visible layers for the active armature (edit and pose modes) */
static int pose_bone_layers_exec (bContext *C, wmOperator *op)
{
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= 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... */
@@ -2213,7 +2184,7 @@ void ARMATURE_OT_bone_layers (wmOperatorType *ot)
static int pose_flip_quats_exec (bContext *C, wmOperator *UNUSED(op))
{
Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, "LocRotScale");
/* loop through all selected pchans, flipping and keying (as needed) */
diff --git a/source/blender/editors/curve/curve_ops.c b/source/blender/editors/curve/curve_ops.c
index 1c9ad8fe247..6b85523ac82 100644
--- a/source/blender/editors/curve/curve_ops.c
+++ b/source/blender/editors/curve/curve_ops.c
@@ -53,7 +53,6 @@
#include "curve_intern.h"
-
/************************* registration ****************************/
void ED_operatortypes_curve(void)
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index 210f36ca074..84df77bb120 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -117,7 +117,7 @@ static float nurbcircle[8][2]= {
{0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0}
};
-ListBase *curve_get_editcurve(Object *ob)
+ListBase *object_editcurve_get(Object *ob)
{
if(ob && ELEM(ob->type, OB_CURVE, OB_SURF)) {
Curve *cu= ob->data;
@@ -134,7 +134,7 @@ static void set_actNurb(Object *obedit, Nurb *nu)
if(nu==NULL)
cu->actnu = -1;
else {
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
cu->actnu = BLI_findindex(nurbs, nu);
}
}
@@ -142,7 +142,7 @@ static void set_actNurb(Object *obedit, Nurb *nu)
static Nurb *get_actNurb(Object *obedit)
{
Curve *cu= obedit->data;
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
return BLI_findlink(nurbs, cu->actnu);
}
@@ -268,7 +268,7 @@ static int isNurbsel_count(Curve *cu, Nurb *nu)
void printknots(Object *obedit)
{
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
int a, num;
@@ -302,11 +302,6 @@ static CVKeyIndex *init_cvKeyIndex(void *cv, int key_index, int nu_index, int pt
return cvIndex;
}
-static void free_cvKeyIndex(CVKeyIndex *pointIndex)
-{
- MEM_freeN(pointIndex);
-}
-
static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
{
Nurb *nu= editnurb->nurbs.first;
@@ -358,15 +353,6 @@ static void init_editNurb_keyIndex(EditNurb *editnurb, ListBase *origBase)
editnurb->keyindex= gh;
}
-static void free_editNurb_keyIndex(EditNurb *editnurb)
-{
- if (!editnurb->keyindex) {
- return;
- }
- BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)free_cvKeyIndex);
- editnurb->keyindex= NULL;
-}
-
static CVKeyIndex *getCVKeyIndex(EditNurb *editnurb, void *cv)
{
return BLI_ghash_lookup(editnurb->keyindex, cv);
@@ -411,7 +397,7 @@ static void keyIndex_delCV(EditNurb *editnurb, void *cv)
return;
}
- BLI_ghash_remove(editnurb->keyindex, cv, NULL, (GHashValFreeFP)free_cvKeyIndex);
+ BLI_ghash_remove(editnurb->keyindex, cv, NULL, (GHashValFreeFP)MEM_freeN);
}
static void keyIndex_delBezt(EditNurb *editnurb, BezTriple *bezt)
@@ -437,7 +423,7 @@ static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu)
a= nu->pntsu;
while (a--) {
- BLI_ghash_remove(editnurb->keyindex, bezt, NULL, (GHashValFreeFP)free_cvKeyIndex);
+ BLI_ghash_remove(editnurb->keyindex, bezt, NULL, (GHashValFreeFP)MEM_freeN);
++bezt;
}
} else {
@@ -445,7 +431,7 @@ static void keyIndex_delNurb(EditNurb *editnurb, Nurb *nu)
a= nu->pntsu * nu->pntsv;
while (a--) {
- BLI_ghash_remove(editnurb->keyindex, bp, NULL, (GHashValFreeFP)free_cvKeyIndex);
+ BLI_ghash_remove(editnurb->keyindex, bp, NULL, (GHashValFreeFP)MEM_freeN);
++bp;
}
}
@@ -1198,7 +1184,7 @@ int ED_curve_updateAnimPaths(Object *obedit)
/* load editNurb in object */
void load_editNurb(Object *obedit)
{
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
if(obedit==NULL) return;
@@ -1251,7 +1237,7 @@ void make_editNurb(Object *obedit)
if(editnurb) {
freeNurblist(&editnurb->nurbs);
- free_editNurb_keyIndex(editnurb);
+ free_curve_editNurb_keyIndex(editnurb);
editnurb->keyindex= NULL;
} else {
editnurb= MEM_callocN(sizeof(EditNurb), "editnurb");
@@ -1283,16 +1269,6 @@ void make_editNurb(Object *obedit)
}
}
-void free_curve_editNurb (Curve *cu)
-{
- if(cu->editnurb) {
- freeNurblist(&cu->editnurb->nurbs);
- free_editNurb_keyIndex(cu->editnurb);
- MEM_freeN(cu->editnurb);
- cu->editnurb= NULL;
- }
-}
-
void free_editNurb(Object *obedit)
{
Curve *cu= obedit->data;
@@ -1302,7 +1278,7 @@ void free_editNurb(Object *obedit)
void CU_deselect_all(Object *obedit)
{
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
if (editnurb) {
selectend_nurb(obedit, FIRST, 0, DESELECT); /* set first control points as unselected */
@@ -1312,7 +1288,7 @@ void CU_deselect_all(Object *obedit)
void CU_select_all(Object *obedit)
{
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
if (editnurb) {
selectend_nurb(obedit, FIRST, 0, SELECT); /* set first control points as unselected */
@@ -1322,7 +1298,7 @@ void CU_select_all(Object *obedit)
void CU_select_swap(Object *obedit)
{
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
if (editnurb) {
Curve *cu= obedit->data;
@@ -1378,7 +1354,7 @@ static int separate_exec(bContext *C, wmOperator *op)
oldedit= oldcu->editnurb;
if(oldcu->key) {
- BKE_report(op->reports, RPT_ERROR, "Can't separate a curve with vertex keys.");
+ BKE_report(op->reports, RPT_ERROR, "Can't separate a curve with vertex keys");
return OPERATOR_CANCELLED;
}
@@ -1397,7 +1373,7 @@ static int separate_exec(bContext *C, wmOperator *op)
make_editNurb(newob);
newedit= newcu->editnurb;
freeNurblist(&newedit->nurbs);
- free_editNurb_keyIndex(newedit);
+ free_curve_editNurb_keyIndex(newedit);
/* 3. move over parts from old object */
for(nu= oldedit->nurbs.first; nu; nu=nu1) {
@@ -1588,7 +1564,7 @@ static int deleteflagNurb(bContext *C, wmOperator *UNUSED(op), int flag)
{
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu, *next;
BPoint *bp, *bpn, *newbp;
int a, b, newu, newv, sel;
@@ -1835,7 +1811,7 @@ static short extrudeflagNurb(EditNurb *editnurb, int flag)
static void adduplicateflagNurb(Object *obedit, short flag)
{
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu, *newnu;
BezTriple *bezt, *bezt1;
BPoint *bp, *bp1;
@@ -2051,7 +2027,7 @@ void CURVE_OT_switch_direction(wmOperatorType *ot)
static int set_goal_weight_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
@@ -2103,7 +2079,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
@@ -2155,7 +2131,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt, *beztOrig;
BPoint *bp, *bpOrig;
@@ -2228,7 +2204,7 @@ void CURVE_OT_smooth(wmOperatorType *ot)
static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
@@ -2461,7 +2437,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -2603,7 +2579,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
int action = RNA_enum_get(op->ptr, "action");
if (action == SEL_TOGGLE) {
@@ -2652,7 +2628,7 @@ static int hide_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -2717,7 +2693,7 @@ void CURVE_OT_hide(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
}
/********************** reveal operator *********************/
@@ -2725,7 +2701,7 @@ void CURVE_OT_hide(wmOperatorType *ot)
static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -2783,7 +2759,7 @@ static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -3542,7 +3518,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
int changed=0, type= RNA_enum_get(op->ptr, "type");
@@ -3606,7 +3582,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
sethandlesNurb(editnurb, RNA_enum_get(op->ptr, "type"));
@@ -3928,7 +3904,7 @@ static void merge_2_nurb(wmOperator *op, ListBase *editnurb, Nurb *nu1, Nurb *nu
static int merge_nurb(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
NurbSort *nus1, *nus2;
int ok= 1;
@@ -3936,7 +3912,7 @@ static int merge_nurb(bContext *C, wmOperator *op)
if(nsortbase.first == nsortbase.last) {
BLI_freelistN(&nsortbase);
- BKE_report(op->reports, RPT_ERROR, "Too few selections to merge.");
+ BKE_report(op->reports, RPT_ERROR, "Too few selections to merge");
return OPERATOR_CANCELLED;
}
@@ -3984,7 +3960,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *nubase= object_editcurve_get(obedit);
Nurb *nu, *nu1=NULL, *nu2=NULL;
BPoint *bp;
float *fp, offset;
@@ -4180,7 +4156,7 @@ int mouse_nurb(bContext *C, const int mval[2], int extend)
{
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
ViewContext vc;
Nurb *nu;
BezTriple *bezt=NULL;
@@ -4264,7 +4240,7 @@ 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= curve_get_editcurve(obedit);
+ 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 bmat[3][3], rotmat[3][3], scalemat1[3][3], scalemat2[3][3];
@@ -4716,7 +4692,7 @@ void CURVE_OT_vertex_add(wmOperatorType *ot)
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);
+ RNA_def_float_vector_xyz(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Location to add new vertex at", -1e4, 1e4);
}
/***************** extrude operator **********************/
@@ -4786,7 +4762,7 @@ static int toggle_cyclic_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
@@ -4863,7 +4839,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
uiPopupMenu *pup;
uiLayout *layout;
Nurb *nu;
@@ -4906,7 +4882,7 @@ void CURVE_OT_cyclic_toggle(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to make surface cyclic in.");
+ RNA_def_enum(ot->srna, "direction", direction_items, 0, "Direction", "Direction to make surface cyclic in");
}
/***************** select linked operator ******************/
@@ -5041,7 +5017,7 @@ void CURVE_OT_select_linked_pick(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked control points rather than selecting them.");
+ RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked control points rather than selecting them");
}
/***************** select row operator **********************/
@@ -5050,7 +5026,7 @@ static int select_row_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
static BPoint *last= NULL;
static int direction=0;
Nurb *nu;
@@ -5124,7 +5100,7 @@ void CURVE_OT_select_row(wmOperatorType *ot)
static int select_next_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
select_adjacent_cp(editnurb, 1, 0, SELECT);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
@@ -5151,7 +5127,7 @@ void CURVE_OT_select_next(wmOperatorType *ot)
static int select_previous_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
select_adjacent_cp(editnurb, -1, 0, SELECT);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
@@ -5178,7 +5154,7 @@ void CURVE_OT_select_previous(wmOperatorType *ot)
static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp, *tempbp;
int a;
@@ -5266,7 +5242,7 @@ void CURVE_OT_select_more(wmOperatorType *ot)
static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -5458,7 +5434,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
if(!RNA_boolean_get(op->ptr, "extend"))
CU_deselect_all(obedit);
@@ -5484,8 +5460,8 @@ void CURVE_OT_select_random(wmOperatorType *ot)
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);
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first.");
+ RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly", 0.f, 100.0f);
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first");
}
/********************* every nth number of point *******************/
@@ -5550,7 +5526,7 @@ static void select_nth_bp(Nurb *nu, BPoint *bp, int nth)
int CU_select_nth(Object *obedit, int nth)
{
Curve *cu= (Curve*)obedit->data;
- ListBase *nubase= ED_curve_editnurbs(cu);
+ ListBase *nubase= curve_editnurbs(cu);
Nurb *nu;
int ok=0;
@@ -6016,7 +5992,7 @@ void CURVE_OT_delete(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Which elements to delete.");
+ RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Which elements to delete");
}
/********************** shade smooth/flat operator *********************/
@@ -6024,7 +6000,7 @@ void CURVE_OT_delete(wmOperatorType *ot)
static int shade_smooth_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
int clear= (strcmp(op->idname, "CURVE_OT_shade_flat") == 0);
@@ -6196,7 +6172,7 @@ 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= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
View3D *v3d= CTX_wm_view3d(C);
RegionView3D *rv3d= ED_view3d_context_rv3d(C);
Nurb *nu = NULL;
@@ -6612,7 +6588,7 @@ 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= curve_get_editcurve(obedit);
+ editnurb= object_editcurve_get(obedit);
BLI_addtail(editnurb, nu);
/* userdef */
@@ -6895,7 +6871,7 @@ static int clear_tilt_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *obedit= CTX_data_edit_object(C);
Curve *cu= obedit->data;
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
@@ -6965,7 +6941,7 @@ static void undoCurve_to_editCurve(void *ucu, void *obe)
Curve *cu= (Curve*)obedit->data;
UndoCurve *undoCurve= ucu;
ListBase *undobase= &undoCurve->nubase;
- ListBase *editbase= ED_curve_editnurbs(cu);
+ ListBase *editbase= curve_editnurbs(cu);
Nurb *nu, *newnu;
EditNurb *editnurb= cu->editnurb;
void *lastsel= NULL;
@@ -6974,7 +6950,7 @@ static void undoCurve_to_editCurve(void *ucu, void *obe)
freeNurblist(editbase);
if (undoCurve->undoIndex) {
- BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)free_cvKeyIndex);
+ BLI_ghash_free(editnurb->keyindex, NULL, (GHashValFreeFP)MEM_freeN);
editnurb->keyindex= dupli_keyIndexHash(undoCurve->undoIndex);
}
@@ -7013,7 +6989,7 @@ static void *editCurve_to_undoCurve(void *obe)
{
Object *obedit= obe;
Curve *cu= (Curve*)obedit->data;
- ListBase *nubase= ED_curve_editnurbs(cu);
+ ListBase *nubase= curve_editnurbs(cu);
UndoCurve *undoCurve;
EditNurb *editnurb= cu->editnurb, tmpEditnurb;
Nurb *nu, *newnu;
@@ -7062,7 +7038,7 @@ static void free_undoCurve(void *ucv)
freeNurblist(&undoCurve->nubase);
if(undoCurve->undoIndex)
- BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)free_cvKeyIndex);
+ BLI_ghash_free(undoCurve->undoIndex, NULL, (GHashValFreeFP)MEM_freeN);
free_fcurves(&undoCurve->fcurves);
free_fcurves(&undoCurve->drivers);
@@ -7082,15 +7058,6 @@ void undo_push_curve(bContext *C, const char *name)
undo_editmode_push(C, name, get_data, free_undoCurve, undoCurve_to_editCurve, editCurve_to_undoCurve, NULL);
}
-/* Get list of nurbs from editnurbs structure */
-ListBase *ED_curve_editnurbs(Curve *cu)
-{
- if (cu->editnurb) {
- return &cu->editnurb->nurbs;
- }
-
- return NULL;
-}
void ED_curve_beztcpy(EditNurb *editnurb, BezTriple *dst, BezTriple *src, int count)
{
memcpy(dst, src, count*sizeof(BezTriple));
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 6c95df53d39..fcac070f84e 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -346,7 +346,7 @@ static int paste_file(bContext *C, ReportList *reports, const char *filename)
if(!fp) {
if(reports)
- BKE_reportf(reports, RPT_ERROR, "Failed to open file %s.", filename);
+ BKE_reportf(reports, RPT_ERROR, "Failed to open file %s", filename);
return OPERATOR_CANCELLED;
}
@@ -662,8 +662,8 @@ void FONT_OT_style_set(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to.");
- RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear style rather than setting it.");
+ RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to");
+ RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear style rather than setting it");
}
/******************* toggle style operator ********************/
@@ -700,7 +700,7 @@ void FONT_OT_style_toggle(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to.");
+ RNA_def_enum(ot->srna, "style", style_items, CU_CHINFO_BOLD, "Style", "Style to set selection to");
}
/******************* copy text operator ********************/
@@ -799,7 +799,7 @@ static int paste_selection(Object *obedit, ReportList *reports)
}
}
else
- BKE_report(reports, RPT_WARNING, "Text too long.");
+ BKE_report(reports, RPT_WARNING, "Text too long");
return 0;
}
@@ -968,7 +968,7 @@ void FONT_OT_move(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to.");
+ RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
}
/******************* move select operator ********************/
@@ -995,7 +995,7 @@ void FONT_OT_move_select(wmOperatorType *ot)
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.");
+ RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection");
}
/************************* change spacing **********************/
@@ -1037,7 +1037,7 @@ void FONT_OT_change_spacing(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increasing character spacing with.", -20, 20);
+ RNA_def_int(ot->srna, "delta", 1, -20, 20, "Delta", "Amount to decrease or increasing character spacing with", -20, 20);
}
/************************* change character **********************/
@@ -1082,7 +1082,7 @@ void FONT_OT_change_character(wmOperatorType *ot)
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);
+ RNA_def_int(ot->srna, "delta", 1, -255, 255, "Delta", "Number to increase or decrease character code with", -255, 255);
}
/******************* line break operator ********************/
@@ -1215,7 +1215,7 @@ void FONT_OT_delete(wmOperatorType *ot)
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.");
+ RNA_def_enum(ot->srna, "type", delete_type_items, DEL_ALL, "Type", "Which part of the text to delete");
}
/*********************** insert text operator *************************/
@@ -1365,8 +1365,8 @@ void FONT_OT_text_insert(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");
- RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input.");
+ RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
+ RNA_def_boolean(ot->srna, "accent", 0, "Accent mode", "Next typed character will strike through previous, for special character input");
}
@@ -1445,9 +1445,7 @@ void FONT_OT_textbox_remove(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The current text box.", 0, INT_MAX);
-
-
+ RNA_def_int(ot->srna, "index", 0, 0, INT_MAX, "Index", "The current text box", 0, INT_MAX);
}
@@ -1584,7 +1582,7 @@ void FONT_OT_case_set(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case.");
+ RNA_def_enum(ot->srna, "case", case_items, CASE_LOWER, "Case", "Lower or upper case");
}
/********************** toggle case operator *********************/
diff --git a/source/blender/editors/datafiles/blenderbuttons.c b/source/blender/editors/datafiles/blenderbuttons.c
index bad9dd60a0f..8f1507e12e0 100644
--- a/source/blender/editors/datafiles/blenderbuttons.c
+++ b/source/blender/editors/datafiles/blenderbuttons.c
@@ -1,6 +1,6 @@
/* DataToC output of file <blenderbuttons> */
-int datatoc_blenderbuttons_size= 199229;
+int datatoc_blenderbuttons_size= 200029;
char datatoc_blenderbuttons[]= {
137, 80, 78, 71, 13, 10, 26, 10, 0, 0, 0, 13, 73, 72, 68, 82, 0, 0, 2, 90, 0, 0, 2,128, 8, 6, 0, 0, 0,
68,254,214,163, 0, 0, 0, 4,103, 65, 77, 65, 0, 0,177,142,124,251, 81,147, 0, 0, 0, 32, 99, 72, 82, 77, 0, 0,135, 15,
@@ -1794,4439 +1794,4464 @@ char datatoc_blenderbuttons[]= {
32,186,133, 52, 59, 16, 74,122,168,231, 9,113,226,196, 62,144, 62,109,218, 7,169, 83,166,184, 55,168, 79,215,167, 33,183, 87,
9, 17, 56, 36,248,113,191,116,226,220,247,249,159,117,125, 47,211,157,154,133, 82, 95, 76,159, 44,254,113,216,109,221, 2,216,
218, 1,122,158,104,190, 6,205,202, 41,130,195, 1,135, 3, 14, 7, 28, 14, 56, 28,136,222, 28,208,195, 34,175, 13, 71, 80,184,
-138, 44, 32,239,255, 99,239, 42,192,170,104,186,240,181, 11, 36, 20,164, 68, 5, 68, 16,196,110, 68,236,238,238,248,236,238,238,
-238, 46,236,238,238,238, 22,187,187, 21, 49, 80, 16,131, 58,255,121, 87, 46,255,229,122, 99, 47, 94, 3,157,125,158,121,246,222,
-221,217,179, 51,239,156,221,121,247,156, 51, 51,202, 74, 49, 97,202,239,226,226,178, 41,103,206,156,145,179,103,207,166,245,235,
-215,211,130, 5, 11, 34,167, 78,157, 74,227,198,141,147,210,196,137, 19,163,198,142, 29, 27,225,227,227, 19,105,107,107,251,146,
-173, 94, 21,245,128,146, 63,155,173,217,166,252, 30,153, 34, 95, 45,174, 71,116,178, 17,209,234,194,145, 81,243, 92, 40,114,144,
- 29,125, 30,151,149,162,134,102,140,122, 62,181, 80, 68,181, 2, 46,145,105,210,164,121,201,100, 79,159,204,191,166, 29, 68, 69,
- 4, 2, 2, 1,129,128, 64, 64, 32,240,175, 34,160,137,139,196, 35, 44, 84,231,209,146, 87,108,118, 25, 38,128, 43,144,137,214,
-144, 50,101,202,220,175, 94,189,122, 40, 72,214,164, 73,147, 64,176, 36,210,117,240,224,193,112,118, 39,126,102,247,225,157,153,
- 51,103,122, 64,114,133, 10, 21, 48, 93,131,198,205,194, 50, 77, 2,211,100,137,237, 60, 61,178, 15,105, 80,204,235,254,192,106,
-110,161, 97,139,115, 83,212, 32, 71,138,156,238, 68,145,107, 75, 70,210,173,241,225,163, 90,150,252,156, 41, 99,166, 59,179, 23,
-172,150,100,150, 42,163, 93,166,188,218,136, 92, 2, 1,129,128, 64, 64, 32, 32, 16, 16, 8, 8, 4,126, 26, 2,134,207,163,229,
-237,237, 13,162,149, 48,123,246,236,166,246,246,246, 5, 57,157,158, 60,121, 50,136, 86,196,156, 57,115,104,233,210,165, 17, 77,
-155, 54,253,192,115,107,109,103,235,151, 37,138,238,228,228,164, 51,104, 61, 95,193, 66, 9, 82,166, 72,158,208,221,221,211,212,
- 42,109,218,130,214,105,211,156, 14,155,228, 69, 52,212, 33,130,230,231, 34, 90, 91, 46, 98,124,157,252, 31,146, 36, 73,186,157,
-197, 73, 50,211,219,219,137, 64,248,159,166, 23, 66,176, 64, 64, 32, 32, 16, 16, 8, 8, 4, 4, 2, 70, 64, 32,238,243,104,177,
-251, 46, 37,187,239,202, 86,174, 92,249, 14, 7,193,211,202,149, 43,105,222,188,121,145,179,102,205,162,158, 61,123,222,224, 81,
-130,117, 81,192,106,213,170,201, 38, 68, 38, 38,169, 83,166, 76,150,164,108,143,146,174,119,162,198,185, 81,228,246,186,244,126,
-101,189,200,200,197,249,105, 71,215,162, 55,120,218, 8, 73,102,245, 74, 21,101,203, 52, 2, 72, 66,132, 64, 64, 32, 32, 16, 16,
- 8, 8, 4, 4, 2, 2,129, 95,139, 64,242,228,201, 29, 56,246,106, 34, 7,192,135,143, 26, 53, 42, 50,107,214,172,143, 61, 61,
- 61, 23,119,233,210, 37,140,255,135,193,210, 85,183,110, 93, 43,148,138, 99,181,212,137,145,198,137,215, 18, 38, 76,224, 96,105,
-154,114,226,179, 1,121,194, 31,141, 40, 20,233,230,146,233,113, 14, 23,199,197,235,186, 23, 14,123, 54, 34,111,152,163,165, 9,
-203,172, 35,201, 44, 84,168,160, 44,153, 63,136,202,191, 60, 65,156,168,251, 15, 42,143,218,229, 2, 79,129,167,177, 16, 16,186,
-100, 44, 36,191,201, 17,120,254,249,120, 26,183,132,191, 94,154,238,169, 29,180,149,135,103,131,111,144, 59,119,238,179, 76,166,
-190, 56, 58, 58,190,230,249,179,250,180,111,223,222,153, 71, 34,222,202,145, 35, 71, 16, 79,241,240,136,137, 88, 29, 45,215,107,
- 84,108,147,148,201, 26,148,204,106,119,118, 80,133,220, 95, 28,172,211,188,182,181,181,239,211,190, 99,103,103, 91,235,180,183,
-242,120, 56, 5, 85,245,180,127,196, 83, 63, 24, 36,243, 7,241, 20, 15,224, 15, 2, 40,200, 70, 12, 2, 66,151,132, 46, 25, 11,
- 1,161, 75,198, 66, 82, 16,173,248,162, 75,198,109,241, 95, 43, 77,125,141, 67,121,107, 30,114,236,149, 3,187, 14, 71, 91, 91,
- 91,175, 53, 53, 53, 61, 87,179,102,205,188, 40, 55, 47, 38,157,208,205,205,205,135,151,225, 57,205, 22,173,219,188,140,206, 33,
- 3,136,150,131,137,137,233,104, 51, 51,243,181, 44,255, 92,133,170, 13, 36,153,109, 58,116, 74,152, 49,147,179, 15,199,124,157,
- 78,103,149,230,118,226,196,137, 13,145,249,163,112,198, 23, 37, 20,229,252,209,150,142,125,189,192, 83,224,105, 44, 4,132, 46,
- 25, 11, 73, 65,138,254,101, 93, 50,174, 22,253, 90,105,113, 38, 90,214,108,209,178,228,152, 41,151, 61,123,246, 36, 87, 45,243,
-127,255,253,151,160,104,209,162, 38,108,205,170,237,236,236,156,134,147,166,120, 42, 77, 10, 99,205,196,204,146,151,218,113, 57,
-114,236,114, 44,153,245, 90,117, 78,144,215,187,184,137,105,106,179,218,108, 49, 75, 99,103,155, 73,174,204, 31,133,243, 95, 86,
-108, 81,247, 31,213, 30, 65,222,148, 8, 8, 93, 18,186,100, 44, 4,132, 46, 25, 11,201,248, 69, 92,141, 91,235, 95, 47, 45,110,
-174,195, 31, 44,167,120, 88,126, 16, 64,181,203, 5,158, 2, 79, 99, 33, 32,116,201, 88, 72,198,175,142, 76,180,187,104,119, 99,
- 33,240, 51,116,201, 88,101,251,167,228,252,140,134, 16, 50,141,171, 66, 2, 79,129,167,177, 16, 16,186,100, 44, 36, 5,121, 19,
-186,244,111,234,146,113,107,253,107,165,233,116, 29, 66,161, 53, 37, 67,138,168, 77,134,174,227,250,228, 11,153,154,219, 37,174,
-237, 37,240, 20,120,202,213, 1,241,108,106, 71, 64, 46,134,170,249, 4,158, 2, 79, 77, 8,252,203,186,164,196, 35,174,253,153,
-190,103,234,119,156,143, 91,140,150, 17, 74, 42,190, 74,140, 0,162,138, 8,129,167,192,211, 88, 8, 8, 93, 50, 22,146,194,250,
- 36,116, 73,232,146,113, 17,136,159,210,148, 75,240,232, 94, 92,250, 39,212, 77, 60,128,198, 5, 85,224, 41,240,252, 14, 1, 90,
-171, 72, 68,115,220, 51,211,108, 55, 95,154,155,221,149,134, 40,180, 46,131, 37,151,180, 75, 50,167,121, 58,211,252, 44,133,105,
- 78,142,204,198,144, 25,199,166, 19, 58, 31, 71,224,180, 92, 38,240, 20,120, 26, 11, 1, 73,151,108, 11,183,171,110, 87,164,227,
- 43,123,239,246,175, 44, 92,138,125, 72,103,151, 49,194, 88, 55, 16,114,228, 33, 32, 30,106,121, 56,201,205, 37,240,148,139,148,
-188,124,127, 5,158, 52, 35,171, 7,205,201,186,149,252,220,253, 57,173,162, 89,158, 94, 50,170,175,179,238,209, 50, 55, 73, 50,
-103,103, 93, 78,179,221, 61,127, 84,166,140,235, 53,101,249, 43,218,232, 79,174,123,199, 14,109,169,184, 79, 78,114,206, 96, 77,
-101, 74,230,160,206,157,218,147,129,229, 21,109,100, 32, 96,122,178,199, 43, 60,109, 11,181,127,211,100,252, 25,106, 59,235,166,
-148, 90, 79,187, 66, 60, 61,211, 94,174, 99, 3, 78, 41,141, 11,141,144, 38,235, 37,201,211, 58, 4,112,198,168, 20, 41, 82,108,
-224, 61, 76,109,134,110,241, 74, 9, 13,173,220,223,244, 0,254, 1,117,183,139,214,179,168,104,189, 83, 47,146, 46, 93, 50,229,
-151,197, 32,158,218,228, 32,175,142,240, 10,137,231,120, 59,136, 99, 44,196, 84, 71,221,126,169,126,210, 82,175, 84, 52, 43, 75,
-207, 47,211,221, 46,236,108,103,243,244,227, 84,215,139, 52,199,173, 47, 45,200,162,171,140, 40,190,214,114, 74, 50,231,120,116,
-251, 52,205,237,194,178,230,142,207, 66,166,176,204, 89,238,189,127, 68,166, 10, 94, 22, 73,147, 38,221,197,255,173,100,234,199,
- 47,197, 83,102,153,100,189,235,126, 64,150,242,210, 95, 82,247, 74,229, 10,211,231, 15, 7,105,213,146,158,244,226,193, 28, 42,
- 93, 34,215, 15, 17, 45, 15,133, 34,111,222,196,137,123,100, 85, 40, 74,112, 69,226,186,140,218, 47,169,123,124,105,163, 63,185,
-156,177, 44, 90,206, 69,163,210,217,102, 32, 44,209,215,164, 73, 19,202,144, 33,195, 71, 46,123,109, 35,148, 95,136, 48,176,211,
-161,215,175, 95,211,218,181,107, 35,120,142,174, 80,238,184,250,242,245, 73, 13, 64, 49, 94, 63,128, 60,241,235, 9, 94,172, 59,
-128,235, 30,192,251,243,202,122,107, 59,174,134, 75,188,174,187, 74, 93,220,120, 18,220, 71, 60, 25,238, 45,213,250, 89,231,168,
- 94,216,213,187,241,224,180,158, 85,125, 53,232,131, 33,117, 79, 10,189,130,126, 65,207,158, 61,123,134,142, 67, 83,231,161, 77,
-102, 81,158,140,247,137,191,191,127,248,167, 79,159,162, 2, 47,174,160,160, 75, 75,232,205, 57, 63,186,184,103,118,184,133,133,
-249, 99,150, 87, 84,139,206, 26, 82, 78,185,106,175,157, 20,249,177,123,111, 78,214, 93,231,250,166,191, 61,191, 65,154,240,195,
- 93,236,239, 51, 73,218,203,228, 43,139, 30,225,218,101,194,101, 56, 39,235,142, 19, 61, 29,239,180,169,146, 39, 98, 71, 7,199,
- 7, 44,115, 15,205,112,115,141,171, 76,229,117, 9, 19, 38,236,199,109, 19,201,100,107,164,204,202,255, 82, 60,101,150,233,175,
- 34, 90,181,170, 21,163,207,239, 15,208,246, 13,131,152,104,205,166,178, 37,127,140,104,229, 74,152,176,107, 88,141, 26, 95,150,
-228,200,177,153,201, 86, 21, 45,100, 11, 4,172, 19, 47,233,182,147,247,245,126,240,121, 87,189,124,172,187,187,251, 51, 62,208,
- 57, 14, 50, 53,190,151,242,228,201, 83,184,120,241,226,131,115,229,202, 21,151,247,146, 70,153, 63,250, 28,197, 65, 79,127,213,
-115,212, 33,103,206,156,145,221,187,119,167,117,235,214,209,182,109,219, 40, 91,182,108, 95,185,188,246,113, 40,115,124,187, 36,
-119,116,129,149,177, 90,134, 27,146,106, 57, 41,188,235, 59, 43, 14,215,113, 82, 4,215,117, 86,132, 52,114, 86, 28,171,233, 36,
-125,177,232,218, 52, 53, 46, 97,123,245,234, 21,125,252,248,145,122,247,238,253,133,173, 14,120, 48,202,202, 68, 53,150, 76,158,
-252,244, 28, 91, 29,158,240,203, 59, 86, 89,248,216, 57,182, 64,224,120, 73, 85,185,188, 64,182, 68,116,120, 31, 67,114,248,124,
-140, 76,204,128,143,243,216,171, 94, 7, 57,124,236, 41, 95,167,126,188, 4, 31,123,162,126, 92, 85,166,170, 28,116,224, 31, 62,
-124,160,144,144, 16, 98,178,241, 92,121, 14,199,223,191,127, 79,193,193,193,177,142,171, 97,162,243, 97, 1, 6,168, 51,234,174,
- 86,118,233,184,122,157,162,243,124, 39, 83, 5, 59,109,152,198,165,221,149, 69,114, 43, 83,166,204,235,136,136, 8,114,113,113,
-121,165, 90, 78,119,223,255,134,159,190, 29,242,161, 69,239,217,107,172, 61,170,101, 55,164,238, 42,121,203, 66,159,160, 87,208,
- 47,144,172, 23, 47, 94, 24, 66,180, 74, 85,173, 90, 53, 40, 44, 44, 44, 42, 50, 50, 50,138,219, 35,234,192, 16,103, 10, 91,108,
- 65,161,107,114,210,219, 99, 67,153,112,205,137, 42, 83, 44,111,144,150, 54,254, 85, 47, 52, 5,173,245, 72, 74,115,179, 54,143,
-156,237,126,126,113,163,180, 65, 1,107,219,210,164,234, 22, 33, 97, 51,221,206,211,172,172,109,104, 81,198, 88, 19, 2,203,193,
- 83,146, 57, 43, 75, 51,200, 28, 90,211,249,253,218,149, 75,168, 91, 5,167,143,223,100,186,181,138,139, 76,149,251,178, 97, 49,
-201,155,169, 83,167, 18, 19,173, 15,124, 60,153,140,103,254,151,225, 41,163, 44,134,190,235, 98,229,207,111,175,112, 40,145, 57,
-209,153,220,118, 10,111,153,247,146, 83,247,108,209,207,187, 91, 92,101, 42,137, 86,213,138,121,168, 92,169,156, 63,236, 58,100,
-139, 86, 89,144,172,168, 90,181, 34,181,144, 45,144,172, 62, 99,198,140,241,231,103,204,159, 39,187, 62,204,255,213,227, 10,229,
-212, 93,189,202, 83, 88, 38,225,221,226,228,228,244,222, 64,153, 90,223, 75,165, 75,151, 30,254,224,193,131, 15,131, 6, 13, 90,
-195,164,203,144,247,146, 86,153,122,218, 42, 46,117,215,215,252,191, 82,166, 3, 23,166, 55,247,137,239, 65,180,186,118,237,138,
-247,111, 45,125, 5,212,119,158,105, 67, 50, 78,197, 57, 85,228, 84,146, 83,254,232,223,249,120,143,132,227,165,212,246,249, 32,
- 87,229,124, 1, 45, 50,112,173,234,245,170, 50,113, 92,245,127,172,223, 42,229, 86,142, 58, 84,223,127,203, 2, 48, 84,247,234,
- 21,174,235,164, 24,210,177,176, 67,232,245,173, 43, 40,228,201,125,122,119,227, 2, 93,152, 59,138, 58,230,179, 14,109,224,172,
- 24,171, 15, 32,181,243, 18,209, 58,126,252, 56, 93,189,122, 85, 34, 28,183,111,223,166, 2, 5, 10,124,226, 23,198,126,206,235,
-100,136, 60,110,204,128,253,251,247, 19,119,222,239,153, 72, 76, 80, 62, 92, 32, 75,184, 7,142,115,158, 41,124, 60, 17,228,242,
- 50, 66,175,112,127, 85,146,163,122, 63,238,100,223,225, 60, 44, 78,209,199, 19,225,122, 94,223, 49,228,236,217,179,196,132, 72,
-121, 60, 33,223, 99, 66,135, 14, 29, 66,216,242,161,122, 92,103,241,217,138,243,132, 95, 46,180,117,235, 86, 74,151, 46, 93, 44,
-162,133,227,155, 55,111,214, 69,180,180,201, 78,200,117, 31,223,168, 81,163,224,135, 15, 31, 18,207,214, 31, 83, 70, 96,194, 38,
-220,224,199,143, 31,147,149,149,149,242,184,206, 50,226,250, 19, 39, 78, 80,141, 26, 53, 62,168, 98,138,227, 39, 79,158, 84, 30,
- 31,175,225, 69,246,157, 92, 94,162,169, 53,234,137,100, 97, 97, 49,210,206,206,238,101, 96, 96,160,164, 3, 74,162,165,180,100,
-165,203, 86,165,235,156,181, 39, 79, 31,185,242, 38, 48, 71,233,182,227,205,115, 84, 53, 55, 64, 23,156,160, 63,190,190,190,159,
-158, 60,121, 34,145,248, 75,151, 46, 73,122,118,231,206, 29,109, 68, 75, 93,124,106,174,239,179, 47, 95,190, 68, 33,113, 57, 35,
-249,131, 32,242,198, 4, 59,162,133, 73, 98, 82,208,230,202,244,242,200,232, 40, 51,211, 84, 79, 89, 64,106, 3,202,104,212,172,
- 52,211, 51, 61, 98,178,174, 13,202,112,227,200,152,114,225,244,240, 0,173,104,102, 29,126,184,171,195, 93,142,171, 90, 79,126,
- 30,142,134,222, 80,146, 57,219, 99,197,165,254, 25,110, 78, 31,218, 41,252,209,163, 71,212,163, 73,185,136, 61, 29, 29,238,177,
-149,107,109, 92,100,170,148,161,126,245,234,213, 67,160,139,188, 48,253,199, 68,137, 18,253,103,104,249,226,107,126,144,172, 82,
-110,201,158, 93, 90,222, 35,170,114,182, 84,111, 12, 32, 91,186,170,156,141,159,171,215,139, 23, 47, 38,126, 71,225,163, 69, 46,
-217,138, 37, 19, 68,235,211,251,253, 84,173, 82,126,157, 46,195, 58,117,234, 16, 91,118,168, 99,199,142,250, 92,139, 9, 96,201,
-210, 66,182, 36,146, 53,110,220, 56,255,240,240,112,255, 69,139, 22,249, 87,169, 82,197,159,143,245,248,193,182,157, 58,118,236,
- 88, 98,153,196, 50,137,101,162,140,211,180,201,148,243, 94, 82, 90,178,120,173,223,174,155, 54,109, 58,125,243,230,205,192, 74,
-149, 42,141,231, 53,126, 53,190,151,228,200,252,193, 58,254,148,203,249,157,231,154, 61,123,246,101,252, 76, 62,102,107,212, 87,
- 15, 15,143,207,188,196,222, 67,182, 68, 45,230,144, 9,131,250, 99,149, 2, 22,244,246,246,142, 60,124,248, 48,241, 51,143,182,
- 80, 90,123,116,214, 65, 23, 23, 1,177,234,211,167, 15, 60, 96,132, 61,136, 17,126, 71, 19,164,152,223,202, 99, 42,231, 36,242,
-165,252,175, 73, 6,206,105,184, 78,186, 70,211, 61, 84,229,169, 84, 72,221,146, 21,123,186, 7, 84,142,147, 47,167,195,234, 40,
-212,118, 86, 20,102,146,245,233, 83,224, 11,186, 50,170, 11, 29, 44,158,158,142, 23,179,165, 91,221,170,211,139,229, 83,168, 93,
- 46,203,208, 90,206,138,226, 6,104,128,212,201,130,156, 32,157, 63,127,158,248,107,129, 96,205, 89,189,122,117, 36,119,230,159,
-184,113,199,176, 60, 89, 65,116, 32, 84,144,199, 29, 35,141, 28, 57,242,115,180,165,202, 6, 68, 9,199,131,130,130,136,191,114,
- 62,243,255, 75, 44,211,158,201,198,147,251,247,239,147,141,141, 77, 12,201, 81, 45, 59,136, 20, 63, 80, 74,226,228,192,255,175,
-108,217,178, 37, 12,178,158, 62,125, 74, 76,148, 64, 86,108,184,156, 23, 24, 47,233,248,243,231,207,149,199,245,194, 0,162,197,
-238, 40,226, 37,141, 98,149, 65,121,124,231,206,157,177, 8,152, 94,129, 92, 22,174,155, 63, 99,247, 21, 68,237,202,149, 43, 74,
-146,104,195,196,230, 60,187,206,164,227, 55,110,220,144, 77, 6, 51,101,202, 36,145, 81,124, 25,206,153, 51,231,139, 18, 83,229,
-241,175, 95,191,194, 7,255,133,177,199, 11,210, 70, 87, 25, 25,239,231,200,143,118, 96, 50, 29, 2,226, 3,139, 30, 54,200,195,
-181, 74, 75, 86,243, 94, 51,215, 56,229,111, 48,106,247,153,103, 79,231,111, 58,231,111,149,173,106, 57, 25,245, 79, 9,125, 97,
- 2,247,249,232,209,163,145,108,137, 34,116,228,208, 43,165,142, 93,190,124, 89, 22,209, 66,252,213,233,211,167,195, 96,201, 98,
-247,182, 68,178, 56, 69,168, 19, 45,144,174,215, 59, 91,210,246,185,157,191,178,101, 6, 49, 91,191,124,147, 70, 5,250,185, 87,
- 69,176,250,226, 70, 86,175,131,207,175, 36,218,219,153,238, 13,119,166, 65,229, 82, 7, 71, 73,129,241, 89,107,209, 16,223,196,
-114, 11, 39,201,156,235, 81, 25, 50,199,214,206,248,230,130,255, 89,194,139,114,214,148,113,212,177,148,195, 71, 73,230,108,143,
- 26,134,200, 84,189, 55,183,211,237, 99,199,142,209,145, 35, 71,104,232,208,161,196,196, 24, 46,216, 31,218, 36, 11,220,108,183,
-140, 52,143, 71, 92, 46,200, 98, 71,135,228,215,247,135,110,108,192,197, 32, 89,165,221,146, 61,125,125, 97, 19,209,219, 59,244,
-114,130, 39,149,115, 79,242,163,100, 11, 36, 43, 16, 31, 86, 47, 95,190,164, 73,147, 38, 17, 63,143,113, 34, 91, 18,209, 10,218,
-167,147,104,241, 7, 40, 77,158, 60, 89, 34, 50, 5, 11, 22,212, 71,180,128,206,119,100,203, 93,161,168,202,199,251,142, 31, 63,
- 62,134,100,205,156, 57,211,159,159, 79,127,142,229,217, 97, 0,164,234, 89,167,177,204, 24,146,197, 50, 9,207,124,198,140, 25,
-159,104,147, 41,231,189,164,180,100, 13, 24, 48, 96, 13, 47, 55, 55,234,194,133, 11, 79,183,111,223,238,207,196, 75,227,123, 73,
-142,204, 31,168,163,116, 41,191, 54, 19,115,130,101, 7,137,191,254, 8,196, 21, 9,207,121, 18, 78,146, 65, 65,206,198, 31,230,
-169, 10, 23, 46,236,223,176, 97,195, 80,144,117,232, 18, 62, 78,129,229,224,193,131,105,225,194,133,248,168,254,200,239,237,211,
-181,106,213, 74, 33, 71,102,116, 30, 79, 88, 20, 97, 52, 88,177, 98, 5,172,215,219,229, 94,171,139,139,168,145, 27,137, 96, 1,
-146,111,176,252,159, 72,169,254,215,246, 91, 27, 73,211, 36, 71,253,152,134,251,161,122,250, 23,144,142,174,156,198,135,167,190,
-147,226,192,213,141,139,232,218,184, 30,180,215, 43, 49, 29,201,153,132,206,228, 78, 66,151,242, 38,165,199,173,139,209,233, 14,
- 21,169,137, 75,130,147,114,129,140, 46,164,100,205, 82, 77,215,175, 95,151, 8, 11, 58,201,206,157, 59,127,102,151,224,107,206,
- 91, 77,159, 92, 37,161, 58,112,224, 0,193, 82,194,164, 40,138,173, 85, 47,153,165, 7, 1,125, 88,102,240, 85,206, 4, 38,138,
-191, 56, 16, 23,245, 22,247,225,223, 26,137, 22,136, 20,136, 31, 95,255, 62, 75,150, 44,111, 80,158,168,168, 40, 73, 9,209,233,
- 48,233, 8, 98,182,255, 10,199,177, 97,143,123,168, 88,145,116, 22,153,243, 61, 1,233, 64,103,195,228, 32,166, 12, 56,254,238,
-221, 59, 66, 61,180,145, 64,117,193,112, 21,114,140,195, 43,148, 13, 68,243,212,169, 83,180, 99,199, 14,148, 61,136,191, 74, 94,
-161,222, 32, 57, 32, 29, 7, 15, 30,148, 93, 70, 54,229, 75, 68,235,220,185,115,146,101, 8,245,227,178, 6,240,250,147,239,113,
- 28,150, 61,148, 21,247,115,116,116, 12, 80,119,219,170,150, 19, 86, 52,148, 1,109,131, 47, 77,101,155,131,252,241,181, 18,209,
-178,242,170, 82,115,246,218, 19,167, 14, 95,122,253,202, 38,103,141, 65,131,166,109,218,141,223,214, 94, 85,218,233,105,255,106,
-236, 18,125, 61, 99,198, 12,190,197, 87,122,243,230,141, 68, 40,213,117, 11,255,163, 31, 72,157,226,184,227, 63,196,245,141, 66,
- 82,146, 44, 16, 46, 77, 68,235,227, 10, 55,122,184,181,125, 20,235,159,182,197,207,245,169,238, 15,157,167,121,158,233,120, 36,
-224,172,135,195,157,174,173,238,148,235, 43,189,188, 64, 52, 47, 7,177,197,137,134, 86,176, 8, 63,221,203,241, 22, 19,166,121,
-180,200, 67, 39, 17, 86, 45,132, 36,115,142,251,140,123,195,156,174,141,104, 91,249, 43,220,251,235,215,175, 39,238, 92,168, 69,
-197, 92,225,199,186,167,191,205, 86, 45, 63, 67,100,170,200,247,225,175,230, 96, 85,153,172, 79, 33,124,190,116, 92,129,128, 27,
-147,230,121, 20,151,172,119,115,220,143,112, 28,217, 18, 38,151,249,201, 47, 55, 58,156, 63, 98, 83,146,172, 55, 23,191,145, 44,
- 90,226, 77,180, 32, 15,189,152, 86,128,202,101, 77, 30, 87,178,149,141,223, 17, 18,201, 10, 8, 8,144,218,103,239,222,189,180,
- 96,193, 2,124, 76, 25, 76,182,190, 17,173,189, 84,181,178,102,139,150, 42,201, 66,231, 91,177, 98, 69,226,206,217, 96,178, 53,
-210,205,237,122,155,122,245,238,241,179,234,207, 31,197,146, 37, 11, 36, 43,127,254,252,167,184,177,226, 26, 48, 61, 99,194,132,
- 9,132, 15, 44,150, 41, 89,178, 64,178, 88, 38,226,130,218,107, 83, 2, 57,239, 37,142,201,170,185,113,227,198, 83,252, 78,121,
-149, 47, 95,190, 65,179,103,207,222,141,223, 76,180, 52,190,151,228,200,140,171, 82,130, 80,113, 74,193,201,140,147, 37,167, 52,
-156,204,153,200, 88,112,251,152,179, 92,179,232,132, 65, 48,186, 66, 6,164, 34,176,245, 42, 61,215, 41,104,195,134, 13, 82, 63,
-134,120, 42, 38,146,196,158, 27,140, 24,164, 33, 67,134, 72,250,132,143, 98, 63, 63, 63, 98, 43,222, 91, 38,174,114,222, 37,201,
-185,255,185,177,106,213, 42, 98,236,200,193,193, 33,144,111,151, 49,186,222, 3,248,227, 31,109, 93, 85, 27, 14,186,184,136, 42,
-177,194,251, 92, 6, 1,210, 73,192,148, 50,180,145, 46, 77,231, 85,239,171,242, 27,213, 81, 90,179,180, 55,177, 46, 22, 89,207,
- 73,241,246,205,165,211,116,188,164, 35, 29,207,149,132,206,229, 73, 74, 87,243, 37,165, 59, 5,147,209,211, 18,150,244,162,103,
- 53,226,216, 45,188, 48,229,110, 82,195,194,157,163, 41,129,228,224,229,129, 47, 95, 14,156,141,212, 39, 20,196, 8,242, 64, 80,
-216,162, 65,247,238,221, 35,182, 74, 80,223,190,125,191,226, 56,172, 26, 96,233, 56,142, 7,144, 77,214, 97,232,144, 89, 1, 52,
- 18, 45, 16, 38,196,245,240, 87, 76, 24,172,108,176,234,160,156, 74,235,219,192,129, 3,191, 42,143,163,172,144, 9, 43,146, 92,
-183, 28, 44,106,168, 31, 72,138, 42,217, 83, 30,135,197, 71,149,128,233,170, 63,202, 10,235, 24,136, 27,234, 12,204, 64,138,250,
-245,235,247,245,243,231,207,210, 67,114,241,226,197,152,178,203, 45, 35, 92,122,192,238,204,153, 51, 18,169, 66,140,211,221,187,
-119,241, 34,147, 48,197,189,144,128, 19, 94,246, 42,110,214,239,138,139,246, 65, 30,180, 79,255,254,253,165, 61, 72, 31,202,204,
-245,148,136, 86,198,140,190,201,139,212,232, 61,235,236,157,208,143, 37,235,245, 91, 80,165,197,240, 37,248,157,175, 82, 39, 54,
-253, 15,209, 58, 39, 20,244, 3,109, 25, 26, 26, 42,145,105,109, 58, 37,215,117,152, 44, 89,178, 64, 16, 64, 38,145,146, 37, 11,
-137, 99,180, 34,203,228, 52, 35, 15,135, 36,177, 82,165,188, 22,244, 96, 83, 43,140,158,197,139,228,151,110,220,195, 37,160,249,
-153,125,152,244,156, 89,217,196,250,229,139,125, 19,216, 23, 63, 82, 34, 89, 52, 47, 59, 29,237,239, 69,125,202, 88,190,103,242,
-113,142, 45, 80, 28,211,160,127,228,151, 36,115,158,107, 17,200,156,217,192, 49,224,240,190, 93, 18, 65,135,139, 27,174,249,217,
-147, 71, 81,219,226, 54,193, 76,100,206,242,125,138,201,145,169, 10, 10,127, 56,237,227, 23,111,148,170, 76,188,204, 89,119, 78,
-196, 5, 60,137,100, 77,151, 72,214,150, 43,253, 51,156, 31, 81,209,252,205,157,161,153,206,114,157,215,144,159,151, 49,200, 86,
- 49,182,192,221,231,178, 21,137, 75,249,112,141, 68,178,220,147, 61,121, 27,139,100,229, 38, 90,234, 67,180,186, 28,189,152, 87,
-158,202,121,164, 52,148,108,129,100, 73, 31, 87,170, 36, 11,207, 62,222, 81,232, 48,249,153, 51,136,108,129,104,133, 6,237,161,
-170, 26, 92,135,213,170, 85,147, 44, 89, 32, 50,243,231,207, 39, 38, 27,210, 59,143,221, 66,114,136, 22, 96, 72, 0, 75, 22, 72,
- 86,100,173, 90,180,167,101,203,160, 22,181,106,221,227,227,131, 57,181,103,178,141, 17,168,113, 33, 89,176,226,204,156, 56,113,
-162, 84,182, 17, 35, 70,160, 60, 11, 56,141, 98,153,120,183,107, 37, 89, 40,148,156,247, 18,147,139,228,245,235,215,159,197,239,
-150,143, 28,126,177,160,109,219,182, 75,240,155, 93, 97,211, 56, 68,225,187,247,146, 28,153,113,209, 37,182, 92,150,228,144,141,
-108,209, 36, 43, 29,239,211,115,202,192,237,144,137, 61, 11, 78,108,153,202,196,239,210,244, 44, 27,157,125, 58, 46,159, 45,147,
- 37,157,122,203, 22,196, 11,120,182,149, 27, 8, 52, 98, 39,249,195, 21,207,100, 44,162, 5, 61,131,149,208,214,214,246,184,140,
-242,183,238,209,163, 7, 29, 58,116,136,224,130,228,252,202,169,102,204, 75,149, 42, 37,121,133,162, 73,112, 30, 77,178,226, 98,
-209, 2, 81, 82, 39, 93,234,228, 73,223,121, 46,139, 68,202, 52,229,147,113, 76, 6, 44,156, 69,151, 95, 20, 68,235,197,129,205,
-228, 95,210,158, 46,176, 21,235, 70,254,100,116,159, 73,214, 51,239,228,244,182,132, 57, 5,182, 44, 68, 13, 92, 12, 39, 90,176,
- 4,233, 74,236, 19,151, 69,180, 64, 54,148,132, 10,164, 2,164, 7,100,101,216,176, 97, 18, 41, 0,193,194, 75, 9,247,130,181,
- 99,250,244,233, 97,176,210,176, 53, 69, 35,209, 98,107, 88, 0,172, 47,236,110, 12, 67,126, 92,127,235,214, 45, 41,142, 12,137,
- 31,232,175,176,190, 65, 30, 92,144, 72, 32, 92,252, 48,200,138,127, 2,161,130, 69, 13, 95, 15,234, 68, 11, 74, 8, 43,146, 54,
-107,155,122,107,130,224, 32, 63,136, 36, 94,126,176,220, 92,187,118, 77,170, 59,254,163,220, 32, 25, 32, 73, 40, 39,234, 38, 71,
- 35, 92, 93, 93, 37,162, 5, 23, 42,228, 33,225, 30,236,158,144, 48, 85, 61, 14,194,165, 18,183,246,157,120,148, 17,237,129, 47,
- 28,126, 33,192, 61, 44, 37,148, 11, 29, 6, 46,248, 17,162,133,122,233,211, 37,156,199,131,164,175,238, 28,168, 29, 8, 2,200,
- 86,193, 40,118,199, 68, 48,126, 97,247,110,223, 14,219, 98,109, 77,119,231,207,143, 98,124, 63, 49,174,161,124, 60,148,227,192,
- 66, 57, 79,216,111, 33, 90,179,178, 89, 48,193, 24, 25, 56, 62,243,229, 41,245, 28, 62, 71, 5, 92,102, 75, 73, 97,137,100,209,
-242, 98, 20,190,166, 26,213,205,107, 22,113, 99,136,211, 53,182,242,140,227,209,130,105,244,213,157, 32,115,142,199,240, 87,227,
- 50, 95,238, 81, 43,207,103,140, 12,134,117, 20,150, 18,180,159, 63,235, 89,105, 47,171,200,171, 3, 51, 94,231,124, 99,228,200,
- 84,185,167, 11, 63, 31,161,234, 50,161,187,252,133,139,225,223, 28,210, 35,127,163,105, 46,201, 36,178,199, 36,235,234,192, 12,
-254,195, 42, 89,135, 94, 89,208,130,218,123,167, 12,189, 54, 56,211, 57, 38, 91,107,105, 78,182,130, 63, 96,217,242,101,203,245,
-199,121,243,230, 17,183, 47, 62, 34,125,228,151,238,255, 57, 75,102, 78,180,253,216,140,102, 81, 49,150,172,249, 57,185,157,138,
- 16,173, 42, 75,180,190, 6,209,214, 38,116,126, 74, 85,242,113, 78, 18,107, 80,136,174,123, 49, 97,189, 10, 43,132, 38,146,133,
-247, 18,222, 69,232, 48,185,211, 87, 29,236,163, 85,228,132,241,227,168,100,177,156, 20,250,110, 15, 21,243,201, 74,252,255,157,
- 50, 51, 98,107,148, 36, 11,174, 94,144, 46,188, 7,184,163, 36,140, 42,211,131, 73, 25,126,246,151,113,231,122,154,177,220,209,
-190, 97,195,123, 32, 89, 32, 91, 35,178,100,185, 17,237, 70, 52,116,234,135,122, 8, 87, 40, 89,178,100, 24, 6, 32,193, 93, 10,
- 75,118, 52,201,154,203,229,145, 45, 79,206,123,201, 80,162, 37, 71,102, 92,244,136,251, 56,215, 46, 93,186,180,224,186,122,242,
-235,215,129, 83,102,254, 24,244,226, 15,214,236, 83,166, 76,241,106,208,160, 65, 54, 38, 53,120,134, 50, 55,110,220,216,158,223,
-223, 24, 0,150, 73,215,189,216,157,199,131, 51,221,185,171,251, 22, 47,139, 15, 32,124,248,168, 38,244,167, 48, 42,160,205, 57,
-204,227, 37,203,115,145, 81,254, 9,120,110,160,131,156,119, 43, 39,204,191, 39,197,177,178, 78, 94,192,125,208,167, 70, 27, 58,
-172,212,229,233,137,209,210, 21,135,165,245, 28,238, 17, 23,162,165,188,230,219,229,177, 73,152,154, 60,101, 53,244,187, 15,181,
- 1,216,208, 89,113,224,212,152,174,244,176,107, 21,186, 85, 32, 25, 61, 42,148,156, 94, 22, 73, 78, 65, 69, 83,208,231,234, 25,
-233, 84, 25, 59,106, 22, 7,215, 33, 94, 20,154, 18, 26,183, 66,133, 10,161,114, 93,135, 32, 15,170,132,106,229,202,149, 81,252,
- 82,127,201, 74, 31,132,227,176,120,192,205,197, 49, 81, 81,252,165, 19,192,164,224, 45,172, 84,108, 6,213, 72,180, 64,152,160,
- 92,124,253,123,254,253,138, 9, 95, 20, 44, 55, 32, 71,176,236, 64, 46,228,243,151, 35,220, 75,146, 75, 12, 29, 8,147, 6, 89,
- 36,134,175,229, 62,250, 9,225,165,168,106, 85,195,113, 16, 2, 16, 69,109,214, 54,245, 54,130,203, 14,101, 65,157,113, 45,228,
-162,172,234,101, 68,249,128,131,220, 50,178,203, 84, 34, 90,168, 51,200, 31, 19, 35, 9, 83,198, 76,114, 29, 42,143,175, 89,179,
- 70, 58,174,203,117,136,193, 10,240,255,195,252, 92,175, 94, 61,201,125,200,100, 87,178,146, 48,233,148, 58, 24,107,207, 42,213,
-226,234, 58,132,158, 64, 95,160, 55,218,116, 10,199,241,176,232,123, 73,240,215,220, 97, 30,156, 17,197, 41,146,191, 92,195,153,
-100,132,178,229,241, 19, 72,214, 70, 83, 83,186,191,112, 97, 20,119,100,159,152,184,135,114,219,127,102, 43,194, 23,126,121, 28,
-214, 39,215,216,231,153,232,100,101, 50,113,116,125, 11,155, 39, 55, 86,245,136,162,139,115,153,100,121, 17, 45, 99, 67, 19, 58,
-240, 29, 45,105,105,247, 98,212,171, 76,154,183,236, 94, 60, 65,115,115,228,208, 87, 6,118, 27,186,195,253,182,172,185,195,211,
- 45,107,151, 68,129,164,239,222,189, 91,178, 18,195, 82, 2,114, 61,110,112,119,234, 90,218,230, 29, 91,189,142,211, 76, 15,189,
- 50,149,247,100, 75,225, 92,118,239,134,227, 67,101,215,174, 93, 49, 50,241, 33,195,150,231, 8,238, 60, 87,234, 43,159,242,252,
-183,152, 44, 79, 95,182,172,109,185, 49, 40,147,255,136,202, 86,161,161,215,183, 17, 93,156, 71, 87, 6,102,162,134,185, 83,126,
-185,208, 47,195,121, 41,112,127,166,103,161, 56,144, 45, 31,144, 44,148, 21,207, 59,190,228, 89,199, 64, 6,139,202, 45,163, 50,
- 95, 1, 27, 69,198, 82,174,137, 94, 92, 28,224,244,205,173, 11, 50,188,178, 12,183, 81,117,162, 45,141, 40, 96, 69, 35,170,144,
-205, 52,168,160, 99,236, 17,211,122,238,147,139,201,233,107,148, 11, 36, 88,105,201, 82,146, 44, 60, 87,252, 78,124,195, 50,178,
-233, 43,239,164,137, 19,252, 27,215, 47, 75, 79,238,109, 99,162,181,155,174,249, 79,167,234,149,114, 82, 49,223,162,232, 88, 9,
-193,229, 32, 50, 60,218,142,234,214,173, 75,173, 90,181,146,226,179,120, 68,175,190,103,169, 12, 15, 18,242,231,231,200,159, 95,
- 23,254, 28,214, 32, 37, 88,178, 64,178,116,140, 70,212, 85,228,122,112,107, 97, 84, 54, 54,132, 74,168,144,172, 57,124,161,108,
-146,133,155,200,121, 47,177,139,176,154, 33,174, 67, 57, 50,245,181,137,150,243, 9,248, 93,233,205,248, 55,225,119, 60, 43, 16,
- 21,228,247, 83, 33,142,129,202,207,109, 84,128, 7, 39, 20,229,143,216,162,124, 62, 23,187, 4, 75,243,199, 65,126, 57,120,240,
-187, 59, 63,187, 71,223,189,125,251,150, 96,201,199,199, 63,222,211, 32, 74, 32, 87,240,138,128, 20,113,120,202, 27, 14,171, 80,
- 31,109,169,173, 42,173,249, 67, 95,122,103, 96, 95,187,118,109,242,241,241, 33, 47, 47,175, 80, 38,174, 95,152, 8, 74,109,135,
- 65, 85,108, 49,198,164,166,178, 55,174,183,214,145,133,186,206,225, 6, 50,175,213, 54,178,208,144, 81,135,202,229,119,148,123,
-121,245, 67, 48,124,155, 92, 22,159, 94, 76,233, 73, 1,205, 10,208,235, 18, 22,244,161,164, 25,125,173,150,158,130,170, 58,210,
-127,153, 19,124,140, 75, 48, 60, 44, 7,170, 9,164,133,221,117,225,172, 36, 6, 5,195,131, 24,225,193, 3,225,225, 97,164, 31,
- 89, 33,241, 37,103,195,102, 78,233, 56,204,202,252, 53,246,145,243, 93,226,227,246, 76,182,158,224,184, 54,162, 5, 50, 2,119,
- 92, 52, 41,201,200,196,236, 26,187,226, 66,148, 83, 47, 68, 31,183,193,125,216, 68,202,198,177,143,146, 66,226,126,114, 16,229,
-235, 37, 66, 5, 5,142, 54,113, 75,151,225, 56,220, 95,120,193,203, 37, 90,209,247, 67, 89,252,187,117,235, 38,149, 17,163, 56,
- 85,203,216,171, 87,175,143, 80,108,144, 75,185,101, 68, 12, 26, 48,130,235,145,191, 92, 99, 48, 85, 59, 30,130,251,162,232,186,
-234,205, 15,232,115,124,221,192,223, 15, 83, 50,130, 35,209, 73, 96, 66,187,232,120, 18,133,123,209,230, 3, 49,173,195,143, 4,
-195, 67,111,160, 63,208, 35,117,221,194,127, 60,107,250,218,135, 9,227, 16,142,195,251,202, 88, 69,241,139,224, 51,187, 57, 67,
-217,154, 19, 10, 75, 22, 72, 22, 44, 91,111, 3, 3,195,152,104,134,114,187,127, 97,189,248,192, 47,139, 33,250,228, 26,251, 60,
- 7,172,231, 69,192,250,200, 74,230,239, 31,174,233,194, 22,146,114, 76,178,124,191,117,224, 76,178,232, 96,111, 58, 56,185, 49,
- 21,205,156, 60,252,219,204,238, 30,101,244,149, 65, 41,179,103,121,135, 15, 59,183,172,147, 76,255,136, 73,132,235, 24, 22, 77,
- 88,133,215,175, 88, 72, 62,174,169,190,201,156,227, 33,119, 58, 22, 5, 19,173,151,176, 98, 66, 38,146, 82, 38,172, 47,208, 7,
- 38, 50, 49, 86, 20,189,229,156,204,129,239,179,179,174,187, 57, 36,211,185, 17,149,162, 73,214,149,165, 68,115,217,179,194,241,
- 79,231,199,120,179, 59, 46, 69,216,153,222, 25, 46, 72, 49, 91,179, 93, 13,153,191,167, 8, 72, 22, 72, 38, 2,204,149, 36,115,
-249,242,229, 8,220, 7,217, 42,166,175,124,234,231, 99,200,214, 80, 54, 70,172,228,193, 79,235,170, 49,201,106, 72,175, 86, 52,
-164,138, 94,169,223, 25, 72,178,148,226, 37,178,133,114,161, 67, 83,146, 44,184,228,229,146, 44, 8,170, 84,161, 36, 61,123,176,
-139,214,175, 26, 69, 69, 11,187,209,146,249,157,200,255,248, 48,170, 94,165,156,100, 25,131, 37, 28,238,126,144, 44, 67,234, 13,
- 75, 22, 72, 22, 63, 63,254,229,203,151,247,231,143, 92,127,126,102,252, 25,195, 29,176,100,233,153,250, 65,227,173, 96,201, 2,
-201, 66,232, 1,203,148, 6, 19,225,131, 15, 83,251,240, 5, 6,145, 44,220, 64,206,123,137,131,225, 7, 98, 90, 7,185,193,240,
-122,100,222, 49, 4, 67, 13,121, 81, 71,215,204,153, 51, 87,103,178, 82,133, 45, 89,149,249,217,169,206,239,214, 42, 76,176, 74,
- 51, 97, 42,206, 58, 81,129,243,200,177, 58,197,136,231,247,102, 62,238,135,174,177, 60,132,180, 68, 74, 44,150, 55,254,200,136,
- 24, 61,122,244, 35,118, 73, 94,102, 75,127, 78, 3,202,158,148,223,137,199,184, 63,146,200, 26,222, 27,104, 39,124,232,163,253,
-208, 23, 33,230, 25, 27,199,211, 69,161, 41, 12,144,253,167,103,141,187, 69, 11, 53,107,232,162, 24,210,198, 43,117,232,137, 70,
- 5,233,101,171, 34, 20, 80,215,131,142,249,166,145, 72, 86,147, 56, 78,239, 0, 50,163, 76, 48,133, 51, 9,248,200, 47, 57,131,
-167,119, 0,121, 0, 33,224,192,190,183,252,146,137,153,222, 1,193,219, 32, 65,252, 5,246,150, 73,214, 20,174,134, 52, 26, 67,
- 31,209,130, 60, 53, 82,146,132,173, 22,179,121,228,197, 91, 88, 70, 32, 55,186,181, 19,226,126,108, 70, 87, 63,174, 83, 25, 88,
-254, 19, 88,137,144, 84,221,151, 56, 14,162,133,164, 74,192,100,106, 22,202, 50, 94, 67, 89,226, 84, 70,246,223, 75,100,147, 71,
-164,196,194, 20,199, 65, 42,163,143,203,154,222,129, 59,209,214,252, 48, 63, 71,226, 7,112, 36, 70, 26,178, 37,140,248,193, 86,
- 14, 73,135, 69,171,144,107,225,166,253,172, 61,171,118,255,145,233, 29,160, 63,208, 35,232,147,170,126,225, 55,227, 40,167,179,
- 72,205,229,125, 10,171, 22,183,117, 56, 72, 22,187,183, 66,217,202, 24, 10, 75,214,155, 87,175,194,248,248, 39, 38,180, 95,216,
-130,246,133, 95,172,191,101,122, 7,154,235,230, 10,183,217, 93, 14, 90,239, 92, 52,213,231,203, 35,216, 37, 37,145,172, 22, 28,
-172,216,139,206,248,181,162,194, 78,201, 35,143,247,224,128,248, 57,238, 27,229, 76,201, 32,173,145, 56, 59,235,142,219, 67,157,
-174, 53,241, 33,197,177,186, 0, 0,255,244, 73, 68, 65, 84,177,255, 60,127,214, 20, 41, 14, 15, 22, 86,124, 20,236,216,180,134,
- 10,187,164,250, 38,147,239, 45, 71,166,138,238,122,115,219,135,192,213,131,216, 68,165, 76, 30,184,130,142, 50,148,243,201, 26,
-181, 44,197,145,205,246,172, 22, 49,203,253,104,255,210,166,193,111,182,245, 34,186,188,248, 27,201, 90,196,211,227,172,225, 15,
-207,173, 77,233,212,148, 90,228,237,148, 52, 92, 10,144,247,243,148, 29,108,207, 29,202, 7,232, 14, 58, 6, 12, 86,129,107, 19,
- 86, 55,124, 24, 33,224,156,207, 35,230, 68,246, 40, 78,101,253, 37,178,149, 37,233,139,139, 76, 2,105,115,125, 10,100,146, 85,
-201, 43,245,219, 56,146,172, 24,178,197, 46,165,215, 40, 23, 72, 17, 72, 49,166,122,224,147,122, 45, 89, 74, 1,149,202,115,172,
-216,215,139, 84,188,168, 23, 7, 59,123,145,175,119, 22,122,118,119, 26,229,207,147, 73,138,197,194,251, 14,150, 45,153,239,160,
-152,108,112, 23,194,146,197,150,102,124,136,237,226,255,254,236,226, 87, 6,189,235,154,250, 65,235,173,224, 46, 68,231,204, 50,
- 81,158,231,136,247, 65,216, 64,116,188,143,161, 69, 84,200,121, 47,177, 69,171, 80,137, 18, 37,250,241,190,187,156,233, 29,244,
-200,148,229,202,149, 81, 17,244, 99,248,120,128, 75, 46,111,116,226,169,203,164, 99,178, 71, 28,170,221, 7,215, 53,101,253,158,
-207,125,221, 65,254, 0, 62,192, 83,175,192, 21,219,136,147,156,117, 83,213,139,141,107, 90,115,218,195,253,210, 29,182,100,125,
- 42, 91,182,172, 68,144, 97,149, 4,209, 66, 31, 0,139, 87,230,180,105, 35,166, 40, 20,175,217, 36,217, 76, 70,221,255,254, 44,
-152,176,148, 93,132,135,121,222,172, 96, 4,191, 55,207,156,224,135, 38, 44, 5,216,248,114,228,121, 89, 62,178,203, 38,206, 19,
-150,178, 85,229, 28,220,110,234,238, 43,149,227,177, 38, 44,229,188, 39, 64,150, 88, 1, 52, 78, 88,138,235,112, 30,123,213, 86,
-101,197,171,192,199,158,169, 31,143,118,223, 61, 81, 63,206,215,106,156, 32, 14,132, 10, 47,114, 88,224,152,184,196,184, 47,149,
- 4, 12, 95,210,218,226,199,180,201, 84,150, 83, 91, 89,116,148, 17,151,126, 87, 78, 25,152,254,208,132,165,108,177,123,133, 32,
- 86, 30,157, 18,123,194,210,104,203,214,143, 78, 88, 10,125,130, 94, 65,191,160,103, 72, 92, 79, 77, 29,134,166, 54, 42,151, 55,
-111,222, 55, 24,109,200, 95, 96, 17,108,170,255,194, 47,244, 79, 28, 7, 18,198,109,246,153, 73,216, 87,254, 82,251,194, 58,130,
- 32,120, 77,195,188,127,250,196,128,146,251,204,207,195,155, 45, 54,219,111, 12,206,120,189,105, 1,147, 47,254, 19, 43, 72, 36,
-235,212,236, 22, 84,200, 41,217, 55, 66,228,151,117, 39, 45,116, 43,138,152, 38, 13,111,168, 88,229,148,100, 34,192,158,175,185,
- 54, 40,227,245,234,121,172,191,174, 92,236, 39,197,210,109, 89,183,130, 10, 58, 71,147, 44,204, 16,143, 0,123, 25, 50,213,238,
- 41,145, 45, 88, 54, 33, 19, 35,146,100,146,172,152,114,170, 18,173,190,165, 76,131, 90, 20, 72,241,165,126,174,100, 95,171,102,
- 75, 26, 86,198, 53,105, 68,225,140,137, 35,115,218, 37,140,242,176, 86, 80, 25,247,148, 95,162, 71, 34,106,178,188,105,108, 35,
-182,188, 97,186, 9,165,174,124,183,231,242,163,205,181, 17, 45,157,237, 46,145, 45,183,228, 47,246, 15, 43, 65,149,115,164,126,
- 35,147,100,233,211,165, 92,252,172,190,134, 59, 30,163, 16,185,108,114, 72, 86,140,204, 42,149,202,208,163,187, 59,104,227,154,
-209, 76,182, 60,104,217,130,206,116,250,200, 96,170, 88,190, 56,129,200, 32,228,128,137,134, 28,162, 21,171,156, 74,139, 22,187,
-158,253, 65,178,150, 45, 91,230,207, 46, 78, 88,180,150, 69,235,196,119,100, 11,147,156,170,233, 75, 44,153, 74,139, 22,220,217,
- 40, 27,203,148,220,166, 44, 19,100, 78,238,166, 11, 79, 55,109,239, 37,165,101, 43, 46, 19,150,170,200, 52,196,162,165,175,221,
-229,214, 87, 53,223,239,150,137,143, 88,127,132,120, 32,148,199,203,198,134, 70, 37, 74, 68, 79,147, 38,165,231,156,102, 43, 20,
-111,227, 82,169, 63,236, 26,117,183,225,143, 89,184, 12,168,156,166,198,149, 92,109,236,118,251,202, 86,142, 80, 14,202,251,167,
-150,224,225, 23,227, 9,184,246,144, 84,201,158,234,241,104,247,167, 38,152,127,247,195, 34,183,233,245,149,211,141,219,253, 17,
-127, 65,197, 94,130,135, 45, 91,153,189,155, 12,176,201, 86,165,188, 62, 98,160,167, 32, 44, 62,105, 95,232, 23,244, 12,238, 84,
- 3,136, 22, 68,151,230, 23,248,179, 37, 75,150,124, 98, 87,110, 56,199, 48, 68,176,117, 39,156, 45, 28, 95, 57, 88, 52, 24,231,
-144, 71, 75, 25,244,213, 93, 46,134, 58, 95,146,209, 1,225, 18,217,186, 60, 32,227,141,202, 94,169,194,230,118, 43, 67,133, 50,
-169,145, 44,237,179,195,127, 87, 78, 73,102, 52,217,186,208, 63,195,141,226,110,166, 17,163, 7,116,101,146,149, 50,218, 58, 22,
- 77,178, 12,144,169, 78,182, 24,187, 96,204,209, 35,147,100,125,247, 33, 64,243,221, 51, 48, 25, 92,246,141, 68,233, 73,179,121,
-122,139, 25,238, 25,126, 80,151,228,182,151,222,118, 7,217, 42,233,150,252,170, 76,146,245, 93,221,181, 20, 36, 23, 91, 32,174,
-203, 36, 89,177,100,206,152, 49,157, 26,214, 45, 77,119,175,111,160,144, 55, 59,232,252,201, 73, 84,163, 74,110,246, 2,240,160,
- 77,142,213, 65, 92, 30,123, 10, 12, 38, 90,124,147, 50,109,218,180,145,172, 88,108, 13,149, 72, 22, 7,210,131, 16,169,186,176,
- 99,200, 22,150,235,193,178, 61,186,136, 22,159,171,199, 50, 37, 43, 22, 44,172, 32, 89, 8,206,199,113,185, 13,196,249,244,181,
-145,198,247, 18, 44, 91,252,225, 54,128, 39, 48,141,203,123, 73,163, 76, 61,101,214, 87, 78, 3,170, 28,147,245,119,203, 52,225,
-193, 21, 88,109, 3,150,173,200,169, 10, 69,208,220, 4, 9, 2,144,252, 20,138, 64, 97,209,138, 75,147,254,255,154,239, 26,151,
- 59, 63,105, 81,105,182,102,136, 69,165, 13,199,246,119, 63, 44,114, 75,252,167,148,211, 46, 90,207, 48, 13,131,166, 24, 58, 93,
-229,180, 96, 11,198, 48,142,123, 56,206,164,237, 13, 18,119,104,199,249,171,108, 24,131, 96,161, 3,136, 95, 86,119, 85,178,117,
-174,111,134,155,213,115,154,124,142,101,201,138,203, 18, 60, 42,100,235,116,159, 12, 55,171,229,178,248, 38, 83,105,201,138,131,
- 76,117,178,197, 22, 71, 76,155, 32,203, 93,168,222, 57, 74,150,183,133,174, 78,210,100,173,115,220,235,104, 77,179,221, 42,194,
-189, 73, 67, 60, 52,173,163,250,203,218, 72,238, 3,243,187, 72,251,172, 89, 51,169, 90, 85,158,102,162, 84,126,202,238,229,198,
-147, 85,142,147,226,160,224,222, 69,108, 22, 2,225,101,212, 65, 19,158,101,248,217, 91,134, 57,178,162, 45, 89,154,226, 4, 65,
-182, 74, 96, 1,106, 44, 68,173,135,104,225,116, 61,150, 9, 23,228,215,104, 75,150, 33, 36, 75, 46,113,149, 81,221, 88, 89,132,
- 46,201, 68,140,167,227,153,204, 19,153, 34,166,174,190,204, 75, 68, 54,153, 8, 8, 37,148, 9,148,204,108, 2, 79,153, 64,201,
-204, 38, 23, 79,229,236,203,114,196,202,149, 41, 71,150, 50,143, 86,153,255, 39, 91,152, 63, 10, 65,234, 89, 55, 73,238, 66,221,
-132, 72,103,167, 19, 99,217,146,226,187, 32,211,125,155,228, 46,252, 1,153,134, 84, 86, 70,135, 11,255, 94, 2, 26,162, 72,168,
- 53,233, 14,144,254,165,109,100,236,186,255,128, 60,157,237,206,115, 4, 18, 91,109,136,103, 65, 39,118,159, 19,254,203,188,151,
-192, 83, 38, 80, 50,179,253,203,120,202,132, 72,100, 83, 69,224, 95, 86, 24, 81,119,227, 62, 11, 2, 79, 45,120, 74, 86, 30,105,
-141, 66,158,246, 0,203,209,104,142,159, 82,191, 90, 39,158, 49, 50,231,120,150,162, 69,198,145, 25, 71,117, 16,237, 30, 71,224,
-180, 92, 38,240, 20,120, 26, 11,129,159,161, 75,198, 42,219,239,144,163, 30,147,245, 91, 99,180,126, 20,128,159,209,184, 66,230,
-143,182, 74,236,235, 5,158, 2, 79, 99, 33, 32,116,201, 88, 72,126,147, 35,240, 20,120, 26, 11,129,159,161, 75,198, 42,219,239,
-144,163, 36, 86,234,251,152, 7, 15,128,169, 39, 67, 10,170,233,122,125,199,244,201,215,119,125, 92,202,252, 55,200,196,232,156,
-186,156,218,114,194,138,247,189,163,147, 62, 60, 17,200,105,104,253,245,201, 52, 84,158,156, 7, 83,200, 52,172,157, 68, 27,105,
- 71, 64,232,146,208, 37,185, 58, 32,158,163, 95,251, 28, 41,239,166,173,125,244,181,199,159,120,254,143, 26,117,248,163, 0,201,
-233,172, 13,189, 71,124,145, 41,123,146, 72, 3, 0,136, 47,117, 23,229, 52,160, 81,101,100, 21,120,202, 0,201,128, 44, 2, 79,
- 3,192,146,145, 85,224, 41, 3, 36, 3,178,196, 23, 60, 13,168,146,200,170,202, 86,141,141, 70,124, 81,152,159, 81,206,106,198,
- 6, 51,218,202,101,108,177, 63,163,238, 66,166,113, 91, 73,224, 41,240, 52, 22, 2, 66,151,140,133,228, 55, 57,255, 50,158,198,
- 69,242,215, 74,203, 29,125, 59, 44,238, 13,235, 22,246,191,100,211,169, 48, 41,211,102,177, 75,105,227, 94, 62,149,181, 91, 15,
- 36,252,198, 49, 61, 37,147,165,132,166,246,110,105, 76,236,179, 31,192, 94, 70, 77,245,202,244,114, 51,171, 81,186, 72,250, 77,
-217,220, 77,171,202,144, 23,235, 97, 49, 55,207,104,110,235,156,171,165, 69,250,108,211,109,156,115,247,176,180,116,145, 22,217,
-140,195,214, 66,215, 53,188, 38,104,130,220,173,252, 19, 22,236,122, 50,113,165, 33,254, 73,124,135, 28, 74,140,255,181,106,173,
-213,181, 68,133,198,186,163, 29, 82, 89,103,105,144,206, 37,239,228, 12,217,124, 79,102, 45, 92,253,173, 91,161,234,111,173,156,
-242,249,167, 78,159,107, 50,206,233,104, 43, 93,120, 98,106, 4, 44,233,144,137,215,191,178, 54, 0, 3,189,109,100,128, 44,101,
- 86, 33, 51, 14,160,233,184, 68,224, 41,240, 52, 22, 2, 66,151,140,133,228, 55, 57,241, 5, 79,227,214,250,215, 74,211, 25,163,
-165,177, 40, 25, 61,139,156,117,207, 91,230, 13, 82,150, 60,165,223,100,206, 93,250,141,173, 75,222,221,202,204, 86,153,114,239,
-182,203, 90,252,141,141,123,241, 55,214,110,197,222,164,113, 45,246,198, 44, 99,129,179,106,194,180, 54,174,137,181, 91,245, 42,
- 13, 58,172,152,191,122,247,133,115, 55, 94,134, 32,225, 55,142,225,220,143,190,204, 77,236,115,206, 42, 86,245,191, 48, 19,251,
- 28, 51,101, 96,173, 87, 9,139,123, 59, 28,166, 87, 83,169,132,119,250,125, 50,228,197, 82,108,144,172,182, 93,251,207,126,240,
-240,169, 95,241, 26,109,103,153,164,115,155, 99,106,151,109,180,137,141,155,175, 66, 49,196,144, 37, 14,212, 39,245,147,138, 2,
-130,229,210,113,103, 34,243, 12, 5,173,146,154,164,237,152, 36,165,197,137,164,169, 44, 79,164,176, 76,223, 37, 67,190,250,182,
- 37,123,251,107,154, 25, 92, 43,217, 48,179,243, 44,229,154,167, 92,240,160, 89,123,195,199,174,188, 66, 99,215,220,226,116,155,
- 58,141,217, 72, 30,217,243,210,188,205, 23,169,201,144, 77,225,246,158, 37,131, 83,113, 94, 13,120,104,196,179,108,133, 58,165,
-221, 61,114,156, 78,109,102,209,199, 60,141, 85, 47, 7, 71,167,128,180,105,211,221,229,235,211,199,232,149,149,149, 9,255, 22,
-115, 31,197, 6, 85,175,126,202,212, 73,213,108, 66,102, 28, 64,251,209,247,146,129,183, 20,109,100, 32, 96,122,178, 11, 60,255,
-124, 60,141, 91,194, 95, 43, 77,221,146,165,127,212, 33, 8,214,251,143, 97,180,112,215, 61, 41, 61, 13, 12,165, 70,157,198, 96,
- 94,149,155, 72, 85, 90, 12,161,203,247,223,209,172,205, 55,105,230,166, 27,116,234,122, 32, 89,100,246,197,170,241,122, 95,230,
- 41,108, 60,242, 53,235, 56,120,195,245,199,193, 17,155,246,249,223,237, 58, 96,226, 14, 36,252,198, 49,156, 67, 30, 45, 24,233,
-125, 88, 82,216,187, 56,228, 45, 94, 51,248,213,187, 79, 17, 89,243,149, 15,194,127,185, 15, 32,207,202,222,153,151, 87, 25,140,
-196,179,183,199, 36,239,124,246,183, 65,180,138, 22,180, 63, 99,105,239, 30,108,149, 41, 87, 80,122,247, 2,199,204, 28, 60,180,
- 89,153, 98,202,105,225,152,109,218,237, 59,247,252,214,239,187,232,215, 98,200, 42,191, 43,119,158,249, 93,186,249,208,143,137,
-224,204,111,100, 75,246,214, 75, 61,167,131, 67,193, 68,137,146,153,148, 75,156,220,100,141, 75,241, 78, 97, 43, 15, 61,163,187,
-207, 67,232,234,163, 15, 52,118,253,125,202, 88,184,105,120,242,212, 54,152, 28, 22, 51,153,107, 34,117,223,225,233,228, 85,244,
-213,204,205,223,200,149, 50, 41, 73,214,201, 75, 15,105,230,214,251,210,241, 62,243, 46,144, 69,134, 60,207,101, 19,173,242, 53,
-206,251, 45,219, 23,190,233,228, 43, 26,186,224, 60,149,173,214,156,114, 21, 40,254,149, 39,178, 59,152,209, 45,247, 1,207, 2,
-229,222,219,103,112,125,111,102, 97,117,222,220,220, 18,228, 75,117,185, 19,189,237, 46, 27,197,255,103, 20, 50,227, 0,154, 32,
- 27, 26, 17, 16,186, 36,116,201, 88, 8,252,203,186,100, 44, 12,227,135, 28, 16,173, 72, 94, 35,174,231,140, 99, 82,218,116,228,
- 30,157,189,254,146,202,213,235, 70,197,107,117,161, 45,199,238,211,194,109,215,168,227,164,131,212, 97,226, 1, 58,224,255, 88,
- 54,209, 50,177,113,111,127,236,210,227,183, 19,231,174, 59,145,210,218,173,117,170,116,110,217,144,240,123,204,204,149,254, 7,
-253,239,133,152,216,100, 29, 18, 87,162,101,234,144,107,211,225,179,183,191,250,223,126, 27,226,183,246,232, 91, 19,135,156,235,
-229, 18, 45, 16, 44, 94, 38, 96, 2,175, 95, 26, 43,141, 25,209,123,110, 41,239,244, 91, 29,237, 82, 14, 57,123,206,159, 62,125,
-254, 66,183,239, 62,164,255, 58,244,254,200,150,190, 19,169,172, 60,108,180,145, 76, 88,180,234,183,232, 62,187,110, 79, 63,137,
-100,177,108,191,167, 1,239,252,134,204,217,234, 7,203,150, 1, 26,129, 17,134,170, 91, 45, 43, 59,167, 81, 99, 87, 95, 59,123,
-231,105, 16,221,123, 30, 76, 23,239,190,165, 19,215, 95,211,209,171,175,233,212,205,183,116,229,193, 7, 58,116,229, 13,149, 24,
-116,129, 82,152,219,191,228,139,107,104, 43,167,242,184,147,151, 79,196,214, 83, 47,117,146, 44, 16,173, 65, 11,207,145,101,134,
-220, 95,229, 18,173, 76,206,110,251,195, 34, 34,233,244,205, 32, 26,207,215,247,156,176,141, 90,246,154, 21,213,223,239,216,167,
-174,227,183,209,200,101, 87,169,126,155,129, 84,178, 92, 29, 42, 92,188,202,185,202,205,198,154,178,108,165,117,235, 95,126,249,
-136,186, 27,240,144,200,200, 42,240,148, 1,146, 1, 89, 4,158, 6,128, 37, 35,235,191,140,167, 12,120,254,216, 44,186, 71, 29,
-110,219,182,237,187, 25,128, 65,180,194,194, 35,169, 98,183, 53, 82,234, 51,251, 36, 29,191,246,134,110, 63, 13,161,139,247,130,
-104,225,158,135, 84,177,207, 78, 42,213, 97, 5,149,108,191,156, 86,239,189,166,137,104,197, 66,100,194,232,148,185, 39, 79, 54,
- 27, 95,163, 78,222,245, 55,158,132, 80,171,142,149,246,140, 25, 99, 62, 13,199,205,205,115,152, 91, 59,231, 89,154,171,104,149,
- 47, 56,103,155,185,192,167, 84, 14, 57, 23,224,184, 33,176,166, 76,151,181, 74,195, 54,253,131,111, 63,253,240, 57, 79,219, 61,
-103, 78, 93,127, 19,144,187,120,221,128,148,233,178, 84,145, 35, 7, 86, 44,144, 44, 94,220,121,194,179,103,207, 38,240,186, 90,
- 19,120,205,175, 9,237, 90,213, 30, 86,162,176,195, 46,123,187,228,195,158, 61,127, 69, 97,225, 68,225, 17, 68, 97, 17, 81,180,
- 96,249,166,136,180,153,114,157,102,249, 26, 99,161, 16,163,101,102,239,217, 63,181,125,142, 89, 32, 90, 1,111,131,253, 22,111,
- 61,237, 87,169,195, 12, 67,137,150,122, 21,122,125, 13,139,232, 61,114,212,152,243, 13, 27, 55,127,188,104,245,206, 7,135,206,
-191,160, 93,103,159,115,122, 65,135, 46, 5,210,249,187, 65,244, 48, 32,148,130, 63, 69,208,222, 11,175, 41, 65,130, 4, 88, 2,
- 65,231,102,231, 90,240,107,208,135, 16,122,250,250, 51,109, 59,249,156,170, 55,233, 65,115,215, 29,167,169, 27,110,210,240,197,
-254, 52, 98,193,113, 26, 61,127, 63,181, 29, 48,135, 82, 59,228,248,162, 79, 30,159, 79,206, 9,211, 75,236, 10, 9, 13,139, 60,
-116,249, 13,237, 62,253,138,106,254, 55,144,134,173,184, 17, 58,118, 53, 44,103,108, 65, 91,125,139, 70,175,186, 65, 85,235,180,
-163,106,245, 58, 82,131, 46, 83,125,248, 26, 93,110, 79, 25,183, 22, 89, 4, 2, 2, 1,129,128, 64, 32, 62, 32,160,137,139,196,
-135,114,203, 42,163, 54,162,117,253,126, 32, 57, 87,153, 66, 67,230,159,160, 5,187, 31,209,196,245,119,104,224,226,235,212, 97,
-198, 69,106, 48,230, 12,149, 31,112,156, 60, 27,173,160,244,229, 39,208,208,185,135,200,194,229, 59,215, 97,172,251,131,100, 49,
-137,161, 97,195, 93,159,207,156,211, 84,218,227, 63,142,179, 21,101,231,164,217, 43,162,124,203,215,167,139,119,222, 80,145,178,
-117,169,239,152,133, 81, 22, 78, 5,118,202,170, 4,103, 74,237,224, 97,105,153, 41,207,235, 71, 1, 31,194,218, 76, 61,123,203,
-173,249,158, 3, 61,230, 93, 59,190,114,239,141,235, 76, 8, 94,224,188, 62, 89, 74,162,245,228,201, 19,137,100, 93,191,126,125,
-194,229,203,151, 39, 84, 46,235,113, 25,174, 67,159, 2,246,103,223,188, 11,166,175, 76,180,222, 4,135,211, 77, 38,133, 32, 50,
-101,107,182, 12, 53,181,211,234, 70, 84,152,218,101, 31,123,228,236,117,191,254, 51,182,250,141, 91,188,223,175,106,151, 89,126,
-214,158,229, 99,185, 14, 77,237, 92,221, 56,223, 35, 83,251, 28, 1, 49,201,193,235,156,142, 50,247,138,136,140,234,117,234,236,
-249, 49,199,206, 92, 90, 60, 99,238,210, 83, 13,154,182,126,186,100,211,241,107,135, 46,189, 12, 63,123,235, 45, 29,190,242,154,
- 6, 47,191, 67,101, 6,158,163, 73,155, 30,128, 80,107, 90,243, 47,214, 45,108, 92, 11,182, 47, 83,179, 77,196,131,231, 31, 36,
- 43,217,231,175, 17,244,234,109, 40, 93,187,247,138,246,156,184, 69,147,151,236,167,250,221,166,147,121,166, 2,225, 38,118,185,
-218,235,195,148,207,207,109,209,174,247,132,249,203,247, 69, 46,222,249,136, 86, 29,120, 65, 61, 7,207,160, 78, 67,151,208, 24,
- 38, 87,146,123,114,237, 55, 55,229,168,149,215,169, 85,239,153, 84,182, 78,123, 74,150,220, 68,172,137, 37, 3, 92,145, 69, 32,
- 32, 16, 16, 8,252, 13, 8,196,115,162,165,106,209,250,126, 80,159,166,202, 41,131,225,139, 84,108,250,245,210,253,247, 52,127,
-247, 67,234, 61,109, 47, 85,107, 55,129, 74, 55, 27, 77, 21,187,175,101,162,117,140, 42, 13, 62, 65,233,243,212,250,154,134,227,
-179, 52, 4,195,199,180,125,149, 42,118,233,219,182,180,159, 56,110,172,227,201,250,245, 77,194, 64,176,176,199,127, 28,207,150,
-191,200,135,160, 79, 68, 83,230, 44,167,210,213,154,210,196,153, 75, 8,255,237,220,125,130,228, 42,144,137, 67,142,149,227,231,
-239, 8, 62,125,243,109, 72,206,182, 7, 46,229,238,116,236, 84,129, 30,167,246, 45, 57,240,226, 66,189,206, 83,206,153,218,122,
- 46,209, 39, 75, 73,180,238,222,189, 43,145,172, 75,151, 46, 77, 56,123,246, 44,136,214, 5, 16, 45,223, 66,246,167, 64,180,158,
-191,253, 66, 23,238,189,167,157,231, 2,104,235,233, 23, 52,111,253,113,118,163,229, 57,166, 77, 62, 92,132,251, 79, 94,242,115,
-171, 60,216,143,221,162,179,213,131,225, 65,178, 92,115,151,122,213,125,212, 50,234, 55,121,163,148, 58, 12, 95, 73, 32, 92,186,
-136, 22,188,187, 39, 78,157,233,125,232,232,233, 1,187, 15,156, 28,113,240,228,213,137, 67, 71,142,191,215,178, 93,215,119,205,
- 38, 93, 36,239,142, 59,168,104,183, 3, 84,188,207, 73, 26,181,230,190, 44,162,133,251, 49,217,234, 80,172, 74,203,136,173,199,
- 31, 82,229,222,219,169, 76,167, 53, 84,180,197, 2,202, 81,115, 60, 21,170, 59,138, 76,211,231, 7,201,234,160, 15, 79, 62,159,
-146,131,223,215,158,188,254, 38,242,230,195, 47,180,230, 40,187, 36,153, 92,117, 27,187,153, 70, 51,169,194,111,137,104, 97,207,
-233,192,197,215,116,254,230, 27,154,178,250,124, 4, 95,187,152, 83, 42, 25,247, 16, 89, 4, 2, 2, 1,129,128, 64, 32,158, 35,
- 16,207,137,150, 42,250, 74,210,245,255, 99,186, 42,231,198, 46,196,251, 47, 62,210,226,189,143,168, 73,207,153,236,130, 10, 39,
- 4,201, 23,174, 55,146,202,245, 63, 70,117, 70,158, 38,171, 44,197,212,131,224,191,107,238,170, 85,173,254,139,138,250,186,169,
- 77,235,244,215, 65,178,148, 27,254,227,120,190,194,217, 62,188, 11,137,160,251, 1, 95, 40,224, 67, 4,157,186,245,129,230,237,
-122, 68,169, 51,228,215,107,129,193,205, 82, 90,101,205,153, 41, 71,233,160,240, 8,166, 30,188,213, 29,123,254,106,161,238,167,
-143, 21,233,125,126,119,141,209, 55,182,173, 60,250,234,180,181, 75,193,103,200,167, 75, 23,149, 68,235,234,213,171, 18,201, 58,
-125,250,244,132, 99,199,142, 77,104,214,168,242,240, 82, 69,210,111,113,205,100,218,242, 42, 91,118, 78,221,124, 71,155, 78,190,
-160, 57, 59, 30,208,104,118,123, 45,222,117,131, 82,219,101, 11,214, 38,219,196,214,211, 29,228,138,211, 88,144, 42,213,124, 74,
-146,213,121,248, 98,202, 83,125, 16,165, 78,159,231,173, 92,139, 22, 87,181,199,233,211,103,122,158, 56,121,166,247,209,227,167,
-251,237, 63,124,114,240,156,249, 75,252,138, 21, 47,254,178, 64,171,117, 84,184,195,182, 24,162, 53, 96,233, 29,217, 68, 75, 73,
-182, 74,212,238,252,117,208,252,179,228,211,118, 53,229,105,178,128,218,141,222, 70,182,217, 43,127, 54,113,144, 69,178, 20,123,
- 79, 93,171, 84,189,110, 51,122,244,234, 11, 69,113,211,140, 93,116, 61, 98,196,178,171, 81,202, 32,251,213,135, 3,104,192,196,
- 85, 84,177, 81, 31,234, 63,251, 8, 15,176, 8,165, 7, 79,131,163,250, 15,155,250,202,198,214,225, 10,151, 3,211, 65,136, 77,
- 32, 32, 16, 16, 8, 8, 4,254,114, 4,254, 2,162,165, 36, 88,154, 45, 90,168,160,166, 74,130,104, 29,185,240,152,182,159,122,
- 70, 61,167,236,162,202, 45,199, 72, 68,171, 64,237, 33, 84,182,223, 49,170, 49,236,164, 44,162, 37, 89,180, 90,219, 79, 28, 59,
-214,241, 68,131,250, 41, 67, 65,134,176,199,127, 28,119,203, 85,232,117,224,251,175,180,100,223, 99,234,238,119,153, 74,245, 57,
- 74,213, 89,182, 92,162,101,234,144, 99,238,186,221,231, 37,185, 87, 30, 6, 7, 23,238,121,230,100,145, 62,231, 15,148, 29,118,
-109, 87,197, 81,119,214,141,220, 16,176,189,126,207,185, 7, 77,108, 60,102,232,210, 85,107,107,107, 41, 70,235,194,133, 11, 49,
- 36,235,192,129, 3, 19,154, 54,172, 52, 12,243,104,185, 56,165,108,190,243,212, 35, 90,115,228, 25, 77,221,116,143,250, 45,188,
- 70,109,167, 93,160, 49, 43, 46, 16,147, 40,141, 68, 11, 68,202,193,173,224,163, 12, 30,222, 1,142, 89,189, 3,108, 93, 10, 60,
- 82,146, 45, 85,146,149,175,246, 72, 50,203, 88,240,101,170,116,238, 37,101, 62, 79,189, 64,180,206,156, 57,211,227,244,153, 51,
- 61, 65,184,142,157, 56,217,103,193,194,197,211,138, 21, 43,246,188, 64,171,181,177,136, 86,215,121, 55, 13, 34, 90, 40, 3,202,
-204,238, 73,122,196,238,209, 49, 76, 40,145,216,101, 40,139,252,226,250,165, 75,247, 88,151,173, 84,139, 46, 63, 12,149,136, 22,
- 6, 88,244,155,190,155,122, 77,219, 47, 89,176, 14, 94,124, 71,247,158,125,160, 5, 27, 78, 83,183,225, 11,169, 82,227,158,212,
-178,243,136, 75, 30, 94,121, 67, 43, 84,175,175, 30,252, 47, 19, 22,145, 77, 32, 32, 16, 16, 8, 8, 4,226, 27, 2, 74, 30,242,
- 23, 17, 46,121, 77,144, 37, 79,153, 55,115, 55,250,211,190,115, 79,104,218,150,123, 84,169,229,232, 24,162, 85,134,137, 86, 21,
-118, 29,202,177,104,225,110, 19, 39,126,139,209, 2,185,130, 37, 11,123,252,199,113,103,175,162, 1,175,130,190,208,162,189,143,
-169,235,156,203, 84,162,247, 17,170, 54,244,132, 1, 68, 43,215,229,123,207,222,127, 25,178,252,214, 35,239,158,103,207, 20,235,
-127,241, 72,253,137,183, 14,182,153,251,112,111,251,249,207,182, 14, 92, 29,184,126,216,210,243,187, 76,236, 60, 79,233,170,121,
-218,180,105, 37,162,117,234,212,169, 9, 71,142, 28,153,176,127,255,254, 9, 59,119,238,156, 80,177,180,155, 20,163,229, 91,200,
-225,232,220, 45, 55,104, 28,199, 20,129, 16, 34, 86,173,241,184,179, 84,175,223, 90,118,167,229, 62,174, 73, 54, 72,214, 81,255,
-187, 84,181,118, 83, 42, 95,189, 17,237, 56,126,135,172,157,243, 75,100,203,211,187,202,199,119,239,222, 17, 72,150,117,182,170,
- 47, 82,217,100,157, 40,175,101,164, 92, 49, 68, 11,100,235,228,169, 83,189, 54,111,219, 53,114,230,220,197,243,152,104, 61, 83,
- 39, 90,109,103, 94,143, 19,209, 10, 10, 9,163,105,155,239, 81,225, 58,131,169, 66,203,241, 6, 17, 45, 46, 99, 34,207,236,121,
-214, 84,172, 86,159,150,110,216, 79,119, 94,124,165,106, 28, 4,223,118,232, 42, 26,190,236,114,212,136, 13,247,194,190,124, 13,
-143, 2,153,219,115,246, 13,205,216,120,155, 58, 14, 91, 70, 57,243, 20,190,228,233,153, 35,187, 1, 88,136,172, 2, 1,129,128,
- 64, 64, 32, 32, 16,248, 93, 8,232,142,209,210, 85, 42, 16,173,189,231,158,209,240, 5, 71,105,235,169,231,212,168,199, 76, 58,
-121,241, 62, 21,174,251,205,117, 88,190,255,113,217, 68, 11,163, 11, 65,170, 96,193,130,187, 16,123,252,199,113, 16,173,128,119,
- 95,120, 52,227, 35,234, 60,251, 18, 21,235,117,132, 42, 51,137,147,107,209, 50,177,203, 22,244,241,115,120,120,133, 33,254,254,
- 62,189,207, 31,169, 53,254,214,161, 78, 11, 30, 29, 30,182,238,229,161, 49,155, 3,119,143,216,244,102,253,146, 67, 65, 27,153,
-200,232,180,198, 40,137,214,161, 67,135, 36,146,181,125,251,246, 9, 91,182,108,153, 80,169, 76, 86, 41, 70,203,167,128,221,133,
- 1, 11,252,165, 1, 1, 53,135,159,162,226, 61,143, 80,219,169,231,201, 37,127,173,143, 60,179, 61, 22,122,254,110,203,144,173,
-232,251,151, 92,183,179,183,223,209,225,203,175,201,143,221,141, 14, 30, 69,191,122,121,215,248, 60,126,229, 57,106,200,100,205,
-207,207,143, 82,217,120,240,132,175,185,147, 24,160, 37,189, 34, 34, 34,122, 28, 58,124,180,223,170,117,155, 39,204, 89,176,124,
-222,210,149,235,167,174,219,176,121,148, 38,162,213,116,210,149, 56, 17, 45,140,172,124,244, 42, 84, 10, 88, 31,188,244,186,161,
- 68, 75, 89, 29, 15,235,116,118,151, 23,111,187, 65,220, 78,210,232, 66,144, 85,101,140,214,202,189,247,162,252,118, 60,166,241,
-235,238, 80,179,206, 19,169,126,251,145,145,124,225, 42, 78, 24,177, 40, 54,129,128, 64, 64, 32, 32, 16, 16, 8,252,157, 8,128,
-104,157,186,241,150,134, 45, 62, 71, 61,166, 31,166, 81,139, 79, 80,171, 33, 43,169,217,232,131, 84,166,239, 33, 42,221,247, 8,
- 89,241,172,240,134,212, 30,110, 68,196,108, 97,175,188, 14, 68, 11,100,100,254,174,135,212,105,214, 37,242,237,113,152, 42, 14,
- 58, 46,159,104,217,231,188,120,229,254,155,247, 29,253,110,249, 23, 27,112,101, 79,179,233, 15,246, 13, 89,243,242,224,156,125,
-239,142, 47, 60, 20,124,104,222,193,144,205,163, 87, 92, 88,205,129,232,178, 44, 90,123,247,238,149, 72,214,166, 77,155, 38,172,
- 89,179,102, 66,221,154, 37,135,151, 40,228,176, 59,189,109,202,225, 45,199, 29,161, 90, 35, 78,179,219,244,148, 68,178, 10,215,
- 29, 26,193,203,253,156,231,186,104,156,222, 33,189, 71,209,144,199,129,159, 36,130, 53,134, 3,191,123,207,191, 74,117, 59, 78,
-164, 25, 91,239, 81,237, 17,167,168,230,144,163,228,156,167,210,135,228,233, 92,157, 12,193,145,111,215,231,248,153,139,211,215,
-108,220, 57,111,253,166,237,227,142, 30, 59,222, 7,150, 45, 46,123,127, 85,162, 5, 44, 43, 15, 59, 79,149,134,158, 7,209,122,
-106,200, 61,224, 58,132, 75,119,106,180, 69,171, 84,179,177,100,102,128,235, 80,245, 94,102,230,230,179, 6,141, 91, 16,241, 33,
- 52,130, 94,188,249, 66, 37,171,183,165,166,189,231,208,198, 19,129,244,224,229, 23, 26,191, 65, 26,117,248,161,223,244,189,212,
-151, 19, 95, 59,132, 83, 65, 67,202, 43,242, 10, 4, 4, 2, 2, 1,129,128, 64,224, 55, 32,160, 58, 51,252,247,193,240,186, 10,
- 4,162,133,249,179,102,111,127, 64, 3, 23, 93,164, 22, 99, 14, 81,221,161, 7,168,202,128, 3, 84,178,215, 33, 42,214,243, 48,
- 97,249, 29, 45, 50,100, 79,188,230,236,229, 19,240,252,237,103,154,187,243, 33,117,152,121,145,124,186, 31,150, 70, 53,106,176,
-104,105,148,105,106,231, 53,110,248,244,117,143,246, 95,126,247,160,196,224,235,155, 90,207,121,180,109,196,166,192,221, 11, 15,
-189, 63,180,252,216,199,221,219,206,127,217, 86,186, 78,207, 77,169,108,179,142,210, 80,214, 24,153,176,104,125,250,244,233,187,
- 9, 75,135, 12,232, 60, 23,193,240, 14,118,201,135,246,159,186,141,250,205, 61, 67,117,250,174,161,204, 5,106,127,228,248,176,
-115, 41,210,184,218,171,201,141,145,153, 62,171,207,135, 11,119,222,209,148, 77,119,169, 23,147,172,150, 83,206, 75,214, 48,184,
- 71, 43, 14, 60, 78,121, 42,118, 12,229,224,247,166, 50, 20, 67, 61,102,169,129,155,135,215,192, 93,187,118,247, 12, 12, 12,236,
-193,243,125,245,224, 17,146, 49, 68,171, 96,235,117, 84,178,255, 89,170, 62,242, 2,121, 86, 25, 78, 73, 83, 89,132,242, 61, 26,
-107, 43,167,166,251,131,104,125,229,249,212, 16,163, 5,139, 86,143,185,151, 57,142, 76,111,140,150,182,118, 47, 95,161,106, 93,
- 10,120, 31, 78, 23,238,190,167, 66, 62, 37, 49,175,215,190,250,109,187, 70,134,126,137, 36,184, 15,119,159,125,205,247,249, 54,
- 2,177, 92,253, 30,215,185, 76,206,209,229,194,204,246,198,222,100,235,167, 1, 55, 22, 50, 13, 0, 75, 70, 86,129,167, 12,144,
- 12,200, 34,240, 52, 0, 44, 25, 89, 5,158, 50, 64,250, 71,178,168,175,117, 40,191,218, 88,231, 16, 46,189,192,247, 95,232, 49,
- 47,195,115,235,105, 48,249,223, 9,226, 97,248,175,104,227,241,103, 52, 97,221,109,163, 16, 45,167,108, 62, 1,207,120,130,204,
-121, 76,180,218,179, 91,206,135,173, 48,101,250, 29, 37,211,239, 71, 29,106, 84,236,180,105,179,152,154,167,207,249,120,215,201,
-251, 55,183,156, 11, 58, 63,116, 77,192,214,145,155,223,108, 92,124,244,227,182, 93,151,191,236,158,184,234,244, 2,182,102,221,
- 67, 62, 93, 68,203,220,220,188,179,165,165,229, 96, 36,254, 29,147, 10,231,181,187, 39, 45,193, 83,192,254, 84, 74,235, 44, 31,
- 77,108,179, 5, 35, 38,139,221,133,237, 88,158, 38, 75, 86, 76, 57, 51,228, 40,115,114,214,234,163, 28,232,255,136,218, 77,191,
- 72,245, 70,159,145,220,162,181,216,154, 85,160,214,224,175,150, 78, 5, 22,202,108, 17, 77,193,225,176, 10,118, 45, 88,176, 80,
-143, 93,187,118,245,120,244,232, 81,143,195,135, 15,247, 47, 81,162,196,179, 58, 99, 46, 81,222,166, 11, 41, 85,218, 76,152, 42,
- 1,131, 0, 52, 45,226,172,243, 69, 1,162,245,236,205, 39,154,181,237, 1, 21,169, 59,148,124, 27,141,249, 17,162,149,128,163,
-210,174,149,173, 88,147,106, 55,108, 73, 35,167,204,135, 27, 55,121,242,148, 41,231,148, 46, 91, 35,232,216,197,231,210,144,209,
-115, 55,131,105,239,185,247,228, 85,168, 28,102,157, 87, 90,249,196, 11, 77,166,146,200,204, 38,240,148, 9,148,204,108, 2, 79,
-153, 64,201,204, 38,240,148, 9,148,204,108,241, 5, 79,153,213,249, 35,179,233,158, 25, 94, 87,145, 29, 61,138,156,197,130,210,
-206, 57, 75,189,201,152,163,212, 27,199,108, 37,223, 56,120,150,120,163,186,160, 52,143, 66, 83, 95, 76, 90, 41, 82,118,227,102,
-244, 40,188,165,207,200, 25, 17,235,246, 95,163,217,219,238, 81,195, 33, 59,201,185,100,143,112,211,244,249, 54,170,149, 79,171,
-204,148, 54,174,121, 83,219,103,127,216,113,224,236,147,235, 15,221, 62,120,236, 70,240,206,149,123,111,174,171,213,178,255, 70,
-158, 76,244, 30,206,107,169,171,222,114, 98, 49,105, 16, 45, 44, 46, 45,179,137, 99,100,166, 76,235,110,235,224, 81,252, 75,239,
- 41,219,104,210,250, 91,236, 58,188, 66,181, 6,239, 33,143, 82,109, 63,155,165,207,189, 66, 11, 81,211,116,155, 70, 58,238,157,
-141,207,245,100,130,213,131, 93,157,253,139, 23, 47,241, 44,141, 83,193, 40, 62,182,134,147,139,142,235,116,214, 61,189,123,193,
-211, 43,182, 30, 15,127,243,225, 43,173,229,145,150,101,218,250,133,153,101,200,135, 89,240,117,109,186,100, 38,226, 11, 91,114,
-170,172, 42, 32, 81,226,196,125,236,236, 29,111,180,237, 61, 53,124,214,234, 83, 84,172,108,109,114,203, 89,100,165, 74, 30,189,
-109, 36,179, 93, 84,179, 9,153,113, 0, 45,174,186, 20,199, 91,137, 54,138, 35,112,113,125,215,197,225,118,162,141,226, 0,154,
-120,142,140, 11,218,191, 44, 77,246, 3,104,105,233,146,218, 38,115,190,105,118,110,133, 47, 88,100,202, 19,104,158,169,144, 63,
- 91,140, 38, 40,236,114,167,148, 75,180,144, 15, 22, 43, 14, 42, 31,147,202, 46,219,105, 4,190, 35, 38, 11,238, 66, 45,150, 44,
-165,104,189,229,244,202, 98, 86, 19,174, 67, 47, 55, 51,245,181, 2,181,181,111, 44,153, 38,233,156,173,205, 51,230, 91, 98,233,
- 84, 48,192, 44, 67,254,183,188, 30, 35, 91,198,220,171,242,197, 26,227,186,180, 8,197, 50, 54,250, 54, 44, 91,211, 51, 58,105,
- 35,150,178,201,134,149,149,135, 9, 47,201,115,218,198,181, 80, 0,207, 67, 22, 96,153, 41,255,105, 28,211, 83, 8,189,120,106,
-185, 62, 35, 31,199,218,143, 32,135,234,147,161,198, 85,166,174,162, 10,153,250,180,201,176,243, 2, 79,195,240,210,151, 91,224,
-169, 15, 33,195,206, 11, 60, 13,195, 75, 95,238,159,129,167,190,123,254,201,231,149,174, 67,101, 25,213,255,255,180,178,255,140,
-134, 16, 50,141,219, 92, 2, 79,129,167,177, 16, 16,186,100, 44, 36,191,201, 17,120, 10, 60,141,133, 64,124,209, 37, 99,213,247,
-119,200, 81,143,209, 18, 68, 75,173, 21,226,139, 18,138,114, 26,247,241, 17,120, 10, 60,141,133,128,208, 37, 99, 33, 41, 72,230,
-191,172, 75,198,213,162, 95, 43, 77,103,140, 22, 26, 85, 83, 50,164,136,218,100,232, 58,174, 79,190,144,169,185, 93, 84,113,129,
- 43,177, 26, 39,245,145,132,154,176, 45,171,165,157,255,180, 54, 66,192,191,161,109, 47,116, 73, 59, 2,134, 98, 41,231, 37, 47,
-100, 26,166,163, 66, 63,133,126,106, 66,224, 95,126,142,148,120, 24,131,127,232,123,190,254,250,243,114, 94,218,134,130, 32,100,
- 26,138,152,238,252, 2, 79,129,167,177, 16, 16,186,100, 44, 36,133, 85, 71,232,210,191,169, 75,198,173,245,175,149, 22,247, 81,
-135, 63, 88, 78,241,176,252, 32,128,106,151, 11, 60, 5,158,198, 66, 64,232,146,177,144, 20,164, 40, 94,234, 18, 6, 72,233, 25,
- 36, 21, 75, 67, 82, 89,121,216, 32,137,119,114, 12, 2, 63,163,221,141,251, 84,254, 30,105, 70,139,205, 74,146, 48,113,178,158,
-169, 82,167,189,110, 98,158,246,153,142,186,252,140,134,248,211,100, 38,112,203,100,210,177,116, 81,167, 77,238,206, 41,171,170,
- 96,161,183,156,169,172,221, 22,217,102, 46,240,216, 36,157, 91, 71, 13,163, 43,181,153,154, 53,194,141, 81,141,166,142,121,143,
-167,118,200, 38,103,100,162,170, 12,189,229,228,204,201, 61, 61, 61, 11, 33,225,183, 12,221,213, 43, 51, 85, 58,183,250,233, 93,
- 11, 30, 73,231,146,139, 23,250,206, 82,203, 24, 50, 85,101,240, 58,146,105, 77, 29,243,172,231,137, 96,223,153,218,229,248, 96,
-154, 62,207,225,212, 86, 30,234,211, 92,124, 87, 78,199, 42,163,178, 14, 93,121,101, 37,246,154,202,100, 89,110, 90,234,193,171,
-110,143, 76, 91,121,172,166,249,216,112,137,222,186,203,168,171,122,150,191, 74,166,163,119,125, 11, 59,223,238,105,101,226, 16,
- 83,119, 94, 51,244,106,166,108, 62,175,236,179, 20,184, 34,243, 90, 69,122,247, 66,231, 51,122,122, 7,164,119, 43,116,206,144,
-103, 83,174,252,191, 81,102, 10,107,231, 66, 41, 44, 51,108, 79,110,153, 97, 71,242, 52,206,197,101, 96,161, 83, 63,237,236,236,
- 82,102,205,154,181, 92,193,130, 5, 91,151, 44, 89,178, 75,174, 92,185, 90,101,204,152,177, 12,203, 77,252,187,250, 14,126,255,
-244, 53,177,117,251,130,132,223,250,234,104,146,206,125, 4,191,167, 35,191, 37,247, 17,127, 74,187, 39,183,113,203,200,229,159,
-148,218,214,243, 76,202,116, 89, 98, 77,153, 35,135, 16,242,124,145,101,172,173,173,171, 41, 19,254,235,195,226, 39,215,221,128,
-219,255,113, 89,141,106,209, 74,148, 36,121,170,211, 77,219,245,250, 20, 16,248,142,250,140, 94, 64,201, 77, 44,174,105,169,242,
-111,239, 32,172,156,243,159,179,201, 92, 40, 64, 53,225,152, 28, 37,148,211,140,238,153, 82,182, 88, 62,187,237,195,168,119, 27,
-169, 68,225,244,155, 13, 81, 66,126, 64, 46, 29,189,252,130,134, 79, 89, 78, 25,179,249, 4,241,116, 15, 3,205, 28,179, 89, 24,
-250,242, 49,179,118,113, 78,227, 92,240, 89,213,238,203, 35, 29,188,202, 6,242, 87, 87, 14, 57,101,143,206,163,171,141,172, 51,
-103,206, 92,209,205,205,173, 41,175,197,216, 10, 9,191,113,140,175,213, 52,249,169,242,182, 58,219, 61,149,181,123,163,249, 75,
-215,242, 50, 60,161, 60, 57,233, 43,170,213,114, 16,201, 32, 91,178,117,201,194,194,201,204, 34, 99,158,231, 67,102,237,140, 56,
-115,243, 13,237,191, 16, 64,221, 39,239,140, 74,231, 82,224,173, 26,217,250, 78,166, 67,201, 94, 43,253,182, 93, 14,194, 94, 19,
-134, 94,181, 39,214,152,185,229,198, 5,236,229,232,188, 69, 38,239,221,214,238, 37,111,217,120,148,190,101,231, 89,250,150,131,
- 87,153, 91, 25,178,151,189,149, 41, 71,217, 91, 14, 89,125,118,203,108, 39,217,117,151, 41, 15,217, 98,201,228, 21, 24, 94,166,
-118, 42, 28,110,238,236, 29,158,198,165, 72,184, 85,230, 34,225,214, 89,124,194,109,220,124,194,109,179, 20,145,187,196,150,190,
-114,154,123,185, 90, 20,105,215,188,242,221,172, 69,155,190,116, 44,218,101, 94, 6,159,110, 57,245,148, 57, 70,102,230,156,197,
-159,223,124,250,145, 50,122, 22,249,154, 46, 91,213,195,114,146, 75,142, 18, 95,191, 93,227,173,186,198,169, 30,253,116, 43,205,
- 83,195,188,226,169, 97,222,225,153, 52, 77,235,230,202,101,212, 55, 13,203,119, 50, 83,166,115,255,143, 59,230, 57,114, 19,242,
-255,200,123, 41,113,114,179,146, 41, 82, 91,109,247,204, 87,242,165,185,149,227,214,196,201,205,125, 53, 96,171,175,141, 20, 41,
- 44, 50,108, 58,126,245,117,212,233, 91,239,201,194,193, 77,142,142,234,148,201,196,170,193,137, 19, 39, 6,243, 92,196, 82, 10,
- 15, 15, 31,188, 98,197,138,193,252, 46,209, 53, 85,142,190,114, 58, 48, 57, 40,156, 62,125,250, 58, 72,248,205,117,117,144,163,
- 75, 38, 54, 46, 86,220, 38,225, 23,238,188, 34, 36, 19, 27,183,200, 12, 69, 58,140,119, 42,209,119,168,166,148,222,187,253, 68,
- 38, 87, 81, 87, 31,190, 35, 36,190, 54, 66,197,178,165,175,156, 6, 60,146, 49, 89,245,202, 76,145,206,189, 64,170,116,238,107,
- 75,214,238, 20, 57,127,211, 57, 58,115, 35,144,204, 29,178,157, 48,180,239, 0,193,122,248,240, 97,175,199,143, 31,247,189,127,
-255,126, 23,252, 55,160,192,223,149,211,222,173,208, 9, 7, 55,239,167,214, 46,121, 7,177,156,132, 26,100, 37, 50,119,204, 61,
-200, 60, 83,254,167,169, 51,228,213, 85, 94, 3,138,241, 23,102,101, 75, 86,247, 38,109,123,126,186,124,255, 61,213,233,183,129,
- 82,153, 89, 5, 26,218,184, 63, 8,139, 94, 37, 84,149, 15,130,117,233, 65, 48,221,125, 30, 42,165, 11,247, 62, 16,142,233,123,
-161,177, 34, 28,226, 25,219, 3,210, 68, 39,115,199, 92, 31,210, 58, 23, 12,176, 66,226,249,164, 48,167,148, 71,209,250, 43, 64,
-174, 64,178,150,204,108,243,196,197, 49, 69, 23, 21,185,122,203, 9,162,117,140,151, 55,218,127,241, 53,157,190,241,134,166, 46,
-220, 66, 30,249,202,126, 74,101,227, 54, 81,195,146, 62,223,117,142, 56,144,210, 54, 75, 30,107, 87,239,215,109, 39, 30,162,166,
-147,175,208,220,109,183,169, 65,219, 65,239,139, 86,104,248, 46,131,135,207,115, 71,207,162,123, 76,108, 51,187, 27,208, 70,137,
- 76, 77, 77,179,240, 87,104,221,242,229,203, 55, 59,120,240, 96, 43,126, 57,198, 74, 56,134,115,200,131,188, 44, 27,147,144,170,
-110, 58,235,238,146,189,232,153,247, 31,191, 80,238, 50,255, 81,142, 82, 45,104,214,166,235,100,106,239,113, 64,206, 75, 82,142,
-238,152, 56,228,156,214,117,244,234,240, 61,254, 1, 84,129,151,113,170,197,203, 29, 45,216,253,144,250, 76,221, 30,101,229,156,
-239,176,166, 54,130, 5, 11,228,170,124,189,206, 20,240,246, 35, 97,143,255,170,150, 45,151,114, 29, 83,231,171,209,251,197,230,
-163,183, 35,177,199,127,125, 29, 25, 72,214,254, 11,252, 66,191, 23, 68, 87, 30,188,167,235,143, 63,208,237,103, 33,116,137,159,
- 31,215, 60,229,110,201,169, 15,231,209,167, 75,137,240, 53,107,146, 46,203, 38,164,232, 47, 91,245, 54, 81,191, 85, 44,153,102,
- 78, 69,194,143, 94,125, 77,183,159,134,208,189, 23, 31,233, 97,192, 71,122,194, 43, 65, 28,185,242,154, 92,242, 86,196,202, 2,
-114, 54,109,229,180, 46,239,157,174,226,161, 25,190, 51,190, 28,173,113,124,241,152,154,175,151,173,223, 77,147,150, 29, 11,207,
- 91, 99,232, 71, 71,159,174,251,211, 23,233,172,237, 75, 58, 70, 38,172, 83, 25, 60,125, 62,102,204, 81,142,174, 60,124, 79, 55,
- 24,203,203,140,233,249,187, 65,210,130,237,167,111,189,165, 51, 82,122, 71,231,120,245,138,179,188,207, 94,164, 26,225, 26, 67,
- 44, 90, 32, 89, 71,175,190,163,189, 23,222, 80,105, 94,219,179, 80,181,238,148, 46,139,247, 3,198,181,138, 1,207,145, 2, 4,
-235, 93, 72, 24, 77, 95,121,132,113,124, 67, 7, 47,189,166,125, 23, 2,233,217,235, 79, 52,118,209, 1,218,118,250, 37,109, 62,
-249,130, 87,216,120, 78, 55,158, 4,163, 3,159, 99,200,115,164,154, 55,113,242,212,131, 74,214,236, 64, 83,215, 94,160,213,135,
-159,209,218, 67, 15,169,101,247, 17,148, 56,133, 89, 15, 67,101,166, 48,119,216,166, 36, 90,230,118,174,251,101, 52,188, 78,253,
-172, 84,169, 82, 87,144, 43, 37,209,250,252,249,243,224, 83,167, 78, 13, 54, 49, 49, 25, 96, 8,158,209,121, 83,241,123,167, 14,
-127,244,117,122,246,236, 89,247,200,200, 72, 41,225,247,188,121,243, 58,225, 28,231, 75,165, 69,174, 84, 78,188, 91,249,221, 27,
- 5, 2,142,148,202,198,157,166,175, 57,187,111,221,177,231,219, 52,165,153, 27,252,247, 34, 79, 76,126,190, 22,147, 80, 71,223,
-227,187,186,179, 85,168, 84,186,116,233,170,104, 74, 22,118,174, 99,204, 51,228,123,195,125,203,107, 75,103, 78, 25,114, 95,215,
-247, 14, 81, 61,207,229,206,102,238,232,117,188, 69,175, 41,180,231,204, 35, 38,126,239,105,210,210,195,148,179,120,195, 48, 19,
-107,195,137, 43,136,213,147, 39, 79,250,157, 59,119,174, 30, 19,173,110, 63, 74,180, 28,179, 22, 14,184,197,186, 60,125,225,166,
- 79, 25,189,138,189,180,203, 82,228,137,141,171,247,147,116,156,172, 92, 10, 63,201,224, 85,226,101,203,254,115, 63, 13, 88,124,
- 85,246, 58,198, 50,244,239, 79,201, 98, 52,151,161,130,191,152,206,222,123,248,132,154, 12,223,245, 29,201, 50, 49,179,192,194,
-202,178, 59, 92,213,140,166,214,110,133,216,252,185,196,204, 33,251, 6,115,199, 28,219, 83,219,123,205, 74,153, 54, 11, 22,105,
-212,217, 65,232, 67, 24,164, 10,228,106,244,218, 7, 49, 73, 14,209,178,200,152,255,249,142, 51, 47,232, 60,175, 81,120,252,218,
-107, 98, 75, 17,191, 40, 3,233,218,163, 15,116,238,246, 91,170,221,170,223,135,114,165,188,246,187,101, 74,181,184,132,119,198,
-221, 25,236, 82,140,227,178, 40, 31, 62, 20, 75, 95,231,168, 0,209,218,199,157,240,250, 99,207,105,203,169,151,180,251,220, 75,
-218,121,252, 46,205, 94,190,155,242,151,168, 25,206, 95, 44, 11, 82,216,121, 56,170,212, 49,150,204, 84,182, 94,101,237, 60,138,
-191,235, 48,237, 20,149,234,127,142,215, 53,244,167,158, 11,239,210,214, 51,111,248,197,253,137,158,188,254, 74,135,206,221,167,
-220,190,213,223,192,234,165,235,229,163, 60,151, 41, 83,166,218,157, 58,117,106,198, 95, 56, 18,185, 90,184,124,205,168, 34,101,
-106, 93,115,202, 86, 36, 56,147,167,119,112,193, 18, 53,174,225, 24,206, 33, 79,251,246,237,155,216,218,218,170,127,153,234,172,
-123, 38, 47,159, 51, 47,217,154,149,163,100,115,202, 86,188, 57, 13, 89,116,222, 80,162,149,192,193,193, 33, 5,151, 89,213,202,
-128,223, 82,226,201, 96,239,236, 56,245,136,170, 15, 59, 41,173,153, 89,103,228,105,234,191,248, 26,109, 56,246,148,210,100,204,
-245, 65, 19,158,112, 23,194,146, 5,146,133, 13,123,252,199,113,184, 9, 97,193, 42, 84,179,251,139,254, 99,231, 83,200,167,175,
-212,111,204,124, 42,204,255,113, 28,238, 68,109,109,100,203,150,172,139, 76,178, 58,240,178, 82,189, 23, 92,165,225, 43,111,210,
-228,141,119,105, 30, 47,158,238,150,175,252, 15, 17, 45,232, 6,127,141, 15, 53,179,247,124,214,166,219, 48, 58,118,238, 86,212,
-177, 11,119,162, 58,246,155, 64, 22,142,217,159,227,156,154,254,104,125, 54,205,217,138,117,155,151,215,194,210, 80,141,198,158,
-149,150,193,234,183,232, 26, 47,181, 21, 72, 89,242,199,153,104, 89,182,169,234,210,232,210,210, 82,139,190, 30,169,126,242,244,
-252,226,115, 27,148,118,172,105,151,183,233,113, 44,223, 53,107,219,125,218,118,234, 5,205, 90,127, 46,202,183,241,120,178,203,
-215,252,134,117,142,218, 85,117,189, 67, 28, 10,214, 74, 97,237, 89,245,206,146,157, 87, 37, 28,155, 79,244,151, 22,161,239,207,
-101, 29,205,235, 99, 78,223,114,143, 22,237,125, 44, 61, 83, 83, 87, 30, 35,135,156, 53,143, 42,124,125,213, 93, 84,186, 45, 90,
- 76,180,246,156,127, 45,189, 47, 90,143,219, 71, 67,151,223,160,126,243, 47, 82,241,122,253, 73,203, 90,169, 26,159,119, 16, 39,
-144, 44,126,206,207, 41,173, 90,248, 13,146,165,126,108,240,156,189,113, 38, 90, 76,178, 6,148,169,223,135, 70, 46, 62, 75,195,
-103,239,164,218,255,245,166,133,155,207,209,145,235, 33,212,107,132, 31,177,165,171,132, 38,253, 52,181,205, 90,196,187, 76,173,
-199,117,155,119,161,218, 77,187, 80,205, 38,157,169, 70,227,206, 84,186,106, 19, 42, 84,162, 42, 21, 40, 94,133,138, 85,106, 68,
-229,235,118,160,114,117,218, 83,153, 90,237, 40, 87,177, 90, 33,176,166, 24,242,158,103,119, 97,135,231,207,159, 15,222,182,109,
-219,224,241,227,199, 15,110,220,184,241, 96,254, 80, 27,204,207,112,103, 29,239,111, 77,109,100,150, 35, 71,142,118,111,223,190,
-237,206,143,104, 76,250,242,229, 75,247,224,224,224,238,188, 70,109,119, 38, 13,221,189,188,188,176, 44,154,153,174,190, 35,181,
-141,251,172,116, 46,121, 8,201, 42, 75,137,123,174,101, 7, 76,210,149,172,220, 74,222,177,116,204, 65,150,233,179,115, 59,101,
-153,172,237,121,199,113,144,149, 7, 15, 30,244,132,149, 72,153,216,106,212,183,231,192,209,203,178, 23,173,251,105,215,217,103,
-116,146, 63,172, 55,159,124, 78,105,157,242, 7,201,237,227,120,185,183, 10,165,107,180, 9, 63,125,237, 57, 93,231,126,104,210,
-234,243,228, 90,176,214, 39,246, 6, 12, 75,101,237,153, 78, 79, 95,168, 81,231,213,136, 86, 87, 99, 16, 45,188, 63, 95,240,186,
-197,225, 17, 81,244,241,115, 56, 61,229, 15,139,187,207, 67,164,229,251, 78,223,124, 75,243,249,163,119, 11, 63,247, 26,214, 49,
-214, 89, 5, 22,155,143, 83, 69,236,145, 81,245,191,202,111,233,188,218,255,252,252,191, 64,244,181,165,162,247,200,135,164,252,
-175,237, 56,242,224,250, 84, 42, 50,203,241,111, 75, 13,133,213,238, 58,100,229, 39,213, 11,212,255,171, 11,179, 72,107,247, 60,
- 32,232, 11, 53, 30,182,139, 76,204,173, 99,172, 89,233,108, 29,222, 44, 91,181,158,204, 44,210, 60,210,211,224,177, 78,163, 35,
- 48,181,247, 90, 95,169, 78,235,144,157, 71, 46,135, 60,124,254,238,235,189, 39,175,191,108,220,123, 58,164,114,157, 86,159,204,
-210,123, 97, 17,104, 77, 38, 72, 89,183,145,233, 58,252, 78, 22,207,128,254,252,228,141,183,188, 0,180, 63,181,152,236, 79,233,
-189,202, 72, 86, 9,188,208,235,182, 31,250,126,217,236,246,207, 96,201,242, 45,232,176,159,191, 92, 90,178, 0,172, 57,104,208,
- 6,162,181,149,191,106,151, 31,120, 66,171, 14, 61,166,134, 93,167,211,138,237,231,190,125,173, 63, 9,161, 37, 27,143,225,133,
-188, 79,147,208, 20, 54,174,249,108,220, 75,124,232, 56,227, 60,249,244, 62, 67,197,251,157,163,150,211,111,208,152,245,143,105,
-221,137,183,180,195,255,189,148,182,159,123, 71,139,183, 95, 37,254,170,224, 78,221, 35,169,190, 2,242,131,214,136,191,110, 90,
-221,187,119,175,105,253,255, 58,173, 42, 86,190,238,231,171,183, 30, 80, 96,208, 39,122,248, 34,152,214,237,241,167,108,133, 43,
-125,174,218,160,205,202, 75,151, 46,213,222,190,125,123,171, 52,105,210,232, 90, 26,232,187, 91,194,117, 56,114,202, 98, 58,116,
- 41,128,102,109,190, 65,185,203,181,151,227, 58,140, 37,167,111,223,190,105,216,245,224,154, 42, 85, 42,188, 96, 98, 72, 22,255,
- 78,100,230,152,251,193,130,237,215,169, 53, 47,222, 93,119,212,105,234, 50,231, 50, 77,219,124,143,182,158,124, 74, 86,153,114,
-191,211,132,129, 46,139, 22, 98,178,224, 46,220,124,244, 86, 36, 72, 22, 54,236,183,240,127, 28,199,121,109,184,218,103, 43,115,
-235,234,195, 15, 18,105,201, 89,162, 73, 64,230,220,229,110,185,230, 45,127, 11, 36, 43,147, 87, 49, 57,110, 25,141,162, 89, 47,
-250, 20, 41, 87, 55,114,229,166,125,244,228, 85,112, 20,214, 9,189,200, 86,178, 11,247,222,211,253,151, 31,233,214,147, 15, 81,
-123, 79,221,161, 42, 13,187, 69,154, 88,103, 29,162,175,221, 45, 51,251,132,227,101,216, 96,204, 25, 94,143,243, 2,245, 97, 82,
- 8,226,178,157,245,211,173, 64, 69,178,200,144,251,189,101,198,220,239,211,100,212,248, 5,174, 81,124,154, 12,217, 46, 56,101,
- 43,252,165,118,133,220, 7,243,228,176, 65,236, 96, 26,100,116, 44,218,117,219,234,195, 79,165, 69,202,167,242, 66,235, 19, 87,
-158,165,165,171,215,209,241,109, 19,168,124,181,122,193,209,237,169,181,200,105,189,170,231,202, 81,182, 67,196,254,243, 47,169,
-223,194,107, 82, 89, 71, 48,129,157,186,233, 30, 91, 46, 31,209, 26, 94, 42,106,233,174,235,228, 90,164,241, 11,155,156,181,172,
-244,213, 93,253, 60,235,103, 41,182,106,189, 97,215, 97, 8,199,247,221,112, 43, 84,237, 83,135, 49, 91,104, 20,227, 81,180, 86,
-143, 40,254, 0, 42, 41, 71, 38,200, 21, 44, 89,170,150, 42,252,134, 37, 75,253,216,138,131, 79, 53, 17, 45,173,183, 73,146, 34,
-117,135,116, 14, 46, 47,125,203,213,142,114,203, 95,153,106,117,154, 73,255,245,157, 67, 41,204,173,151, 38, 75,102,230,108,153,
- 46,227,234,165,219, 47,208, 94, 38,140,105,237,156, 52, 90,165,184, 12,126,247,158, 6,241, 26,182,159,217,138, 25, 42, 89,108,
-174, 60, 12,150, 44,132,123, 79,223,167, 29,252,209,119,144,215,180,221,123, 62,144,118,156, 13,144,172,111,171, 15, 61, 97, 23,
-149,215, 82,109, 5,115,200,234,187,219, 41, 23,187,198, 57,101,100,247,120,134,236,101,110, 57,121, 20,185, 3,107, 22,200,214,
-190,125,251, 6, 79,159, 62,125,240,212,169, 83, 7, 91,103,202,115,215,138, 45,190, 86,110, 37,110,165,205, 82,226, 22,220,236,
-186,112,229, 15,186, 70,234, 36, 11,228,234,213,171, 87,221,215,109,218, 54,188, 76,181,198,254,153,115, 22,123,239,204,235,230,
-166, 78,231,178, 85, 95, 27,165, 47,216,114,206,148,229,199, 15, 58,149,236,141,213, 40,116,110,200, 51,115,221,185,253,233,189,
-219,204,212,151, 87, 73, 94,252,253,253,235, 43, 83,147,214,221, 38,123,250,212,254,184,255,252, 11, 26,179,230,150,180,222,237,
-110,182,184,179,151, 68, 19,209,250,238, 22,112,119,102, 47, 82,249,253,221,103,252, 78, 63,243,146, 26, 14,221, 75,182, 57,171,
- 31, 81,112,252,155,190,242,232, 58,175, 70,180, 12,117, 29,126, 39, 26, 22, 45,188, 31,209,167,205,222,254,128, 38,111,184, 67,
-227,120, 61,100,124,232,182,152,124, 94, 90,223,183,108,191, 99,180,234,240, 19,141, 68, 75, 23, 31, 1, 49,226, 27, 66,124, 12,
- 65, 82,249, 47,157,211,244,191, 79,159, 62,125, 85,175, 85,230, 83,230, 85,221,171,202, 80,254,142,190,190, 2,246, 56, 86,168,
- 80,161,149, 44, 15,225, 4,234,155,118,139, 22, 42,166,172,156,234,111, 45,141,227,146,202, 44,237,219,207, 95, 35,165,175,188,
-142,227,182, 83,106,203,116,175,210,217,218,191, 57,127,241, 10,237, 57,253,144, 44,210, 88,107,139,215,250, 78,164,169,117,150,
-194,108, 97, 8, 90,188,225, 80,208,215,240,200,200, 59, 47,190,188,223,116,234,221,227,101,135, 95,223,223,123,233,253,179, 43,
-247,223,125,168,223,186,239, 7, 83, 27,207,158,218,148,197, 60, 83,222,115, 74,247,158,180,103,215,158,101,166,124,234, 49, 88,
- 6,235, 34,136,214,158,243, 1,212,102,218, 5,169,227,113,204, 94,134,142,177,107,101,208,210,235, 1,101,138,103,221, 31,237,
- 46,124, 86,180,112,182,141,220,217,119, 49,248, 6,124, 1,136, 22, 58, 5, 48,252,206,163,215,209,188,181,135,232,209,171, 80,
-254, 90, 9,150, 92, 31,199,174,190, 1,209,186,164, 73,182,169,189, 91,154,116,174, 62, 1, 29,166,159,165,241, 27, 30,210,210,
-131, 47,104,255, 37,182,190,241,130,204,135,174, 6, 75, 36,107, 61, 19,174,241, 27,159,210,192,229,247,169, 76,171,105,225,158,
-190,141,162,210,100,200,187, 65,207,131,215,232,244,233,211,173, 6, 12, 29, 61,170,104,217,218,159, 63,126, 14,163, 7, 1,161,
-236, 70, 9,164,101,252,240, 44,219,255,132,214, 31,121, 76,206,185,202,124,238,210,107,192,168,184, 16, 45,220,223,171, 80,133,
-208, 43,247, 63, 80,219, 62,227,241,133,168, 26, 92, 42, 7,202,132,107,215,174, 53,227,175, 68,155,150, 45, 91,230,229,151, 69,
- 65,190, 40, 25,167,132, 22, 22, 22,217, 10,150,172,177,161,118,251,241, 97, 75,247, 63,166,145,171,110,210,204,173,220,105,156,
- 9,160,254,227, 23,135, 57,184, 21, 88,175,235, 6,202, 24,173,244,165,250,108, 28,186,234,230,168, 66,109, 54, 90,195, 98, 5,
-203, 85,254,154,189, 99, 89,180, 96,225,194,113, 29,129,241, 10,214,155, 91, 55,217,148, 62,102,205,109,202, 44,223, 85,168, 23,
- 3,214,139,155,159,190,240,215, 98,224, 39, 58,113,253, 45,173, 61,250,140, 95, 94, 79,217, 42,250,138,206,178,238,236, 97,146,
-213,168,221, 0,178,117, 45, 64, 38,182,158,186, 6,172, 72,247, 74,235,234, 19,254,128, 9, 90,155,169, 23,168,215,252,171,140,
- 27,172, 67,247,105,211,137,231, 84,173,113, 87, 58,122,238, 14,161, 30,105, 51,229,121,175,183,112,209, 25, 50,229,174, 68,103,
-174, 60,162, 49,179, 55,144,117,150, 98, 31,249,131,106, 84,106, 7, 15, 75,118, 21,174, 93,188,247, 17,245,245, 59, 69, 67,166,
-173,161, 93, 27,167,211,217, 61, 83,104,205,218,149,228, 80,160,101,172, 15, 63,109,247,178,202, 86,173, 79,235,193,203,165,242,
-225, 93, 52,105,195, 93,154,203, 11,210,175, 60,244,148, 54, 30,125, 76,249, 43,119, 12, 75,155,173,106,110,185,101,213,149, 15,
- 3, 77,204,236,178,237,234, 49,101, 23,141, 89,117,141, 73,103,174,131,114,228,130, 76,193, 93,168, 78,170, 64, 88,212,143,225,
-185,210,224, 58,212,120, 27,246, 42, 76,237, 61,210,143, 14, 94, 9,146,172, 86,120,238,219,244,153, 74,201, 76,211,194, 13, 21,
-253, 81,106,153,186, 66,157,150, 81, 56, 95,188, 66,189,143,154, 4,165,180,115,207, 85,168,116,237, 15,213, 27,119,162,170, 13,
- 59, 81,229, 6, 29,169, 82,253, 14,212,115,248, 28, 58,204, 4,177,219,176,185, 84,154,173, 88, 37,107,182,163, 18, 53,218, 82,
-177,106,109, 40, 71,209,154, 47,248,121,213, 26, 32,239,204, 31, 18,112, 55, 35, 36, 2,214,208,157,231, 2, 40, 75,222,114, 95,
- 90,119,238,187,127,235,206, 61,147,247,236,217, 51,164, 91,143,190, 83, 11, 20,171,124, 56,173,107,177,175,189, 23, 92,161, 78,
- 51, 47, 82,227,113,103, 41, 13,147, 45,109,184,114,112,126,161, 66,149,218, 29,174,213,110,244,233, 70, 29,199, 30, 29, 55,115,
-213,162,179, 23,174, 13, 5,201,106,223,117,224, 90,175,130,229, 67, 71,206,216, 16,181,242,224, 99,184,187,163,216, 2,255, 36,
- 85, 26, 71,157,243, 11,130, 60,109, 58, 25,184, 77, 73,180, 82,218,184,109,192,251, 86, 53,225, 24,202,164,158, 87,207, 59, 52,
-198, 29, 7,151, 92,163, 86, 93, 39,129,100,237,139, 38, 89,181,217,194,222,120,252, 89,218,202, 86, 29, 14, 67,145, 69,180,216,
-109, 61, 96,237,206,147,146,107,188,187,223,101,202, 94,177, 79,148,165, 75, 57, 7,124,180,226, 99,156,211, 35,236,217,186, 85,
- 83,161,248,206,130,171,181,184,170, 68,235,238,221,187, 18,209,130,247,195,196,206,179,147, 69,166, 2,171, 45,157,242, 95, 79,
-147, 41,255,203, 52, 50,251,212,244, 42, 68,107,252,252,157,100,229,148,135, 86, 30,124, 66,157,103, 95,162, 30, 19, 54,241,251,
- 35,183,244, 1,135, 80, 14, 77, 22, 45, 93,124, 68, 73,150,184, 50, 18,217,194, 94,245,183,210, 82,165,126, 76,219,127,109,249,
-245,201,137, 62,111, 47,231, 29, 16,147, 71,149,100,225,160, 14,139,150,155,181, 93,198,183, 39,207,156,167,231,111, 62,211, 56,
-254, 26,157,176,254, 14, 77, 90,113,138,110,221,185, 39, 61, 88, 77,218,246,121,147, 60,121,114, 93,126,247,152,251,194,252,156,
-206, 37,239,251,227,151,158,190, 15, 8, 10,251,180,224, 64,224,221,118,115, 31,249, 43, 83,131, 17,135,175, 14,156,190, 35, 96,
-195,158,115, 33,214, 46,249,159,107,171, 20,200, 21,220, 16,136,131, 57,192, 95, 95,120,241, 34,150,202, 32, 16, 52,100,182,204,
-152, 55,192, 33, 91, 25,201,146, 5,146,101,102,239, 69, 69,202,215,250,244,127,119, 97,166,125,121,178, 59,109,157, 48, 97, 66,
- 31,182,232,200,153, 48,244,187,187,224,129, 94,194,110,142, 25, 76, 4, 42,252, 55,138, 30,189,248, 32, 97,123,139,227,100,240,
- 85,137,175, 73,109, 68, 11,194, 76,109,189,138,152,101,204,119, 43,107,129, 74,111,242,151,172,243,186,100,149, 38,111,186,246,
- 29, 21,188,118,235,145,175,254,119,217,180,188,249, 41,117,152,115,155,202, 13, 60, 67, 85, 6, 29,167,145,107,238,145, 91,193,
-170,176,232,104,181, 16,194,162, 5,162,149,207,183,242,181, 43, 55,239, 75,241, 58, 91,217,173,233,183,227, 1, 13, 94,118,131,
- 90,177,149,168,251,220, 43,212,124,232, 6,114,201, 89,250, 90, 92,137, 22, 91, 5,214,108, 57,114,147,252,214, 29,101, 34,144,
-245, 40, 2,216, 13,104,179, 4,236, 30,176,222,185,115,167, 3,187, 13, 92, 23, 46, 92, 88, 20,241, 16,124,189, 13, 7,222,214,
-254,240, 33,164,157,115,142, 18, 79,107,183, 29,249,117,198, 26,142,207, 98, 55, 74,167, 1, 83,190,178,155,224, 57, 70, 35,234,
-186,143,114,212, 97,238,102, 51,250, 78,218,120,237,144, 79,187, 5, 49,109,139,152,172,130, 76,174, 96,217,202, 95,179,151,182,
- 24,173, 88,226, 17,244,126,239,249, 71,201, 77,150,133, 45, 89, 82,187,217,231,184, 99,234,144,243, 61, 82,234,244, 57,223,155,
-165,207,245,158, 99, 0,223, 91,112,178,204,144, 75, 83,204,134, 6,221,113,191, 1,179, 60,172, 13, 27, 56,198, 7,164,242,208,
-229, 55,180,102,207, 69,170,220,168, 51,217,187, 21,164,230,221,198,208,198, 35,247, 40, 77,134, 92,119,245, 97,107,237, 86, 52,
- 28, 36,191,231,188, 43, 52,124,197, 77,201, 2,184,120,223, 99,126,158, 94,144,111,245, 14,212,105,210,126,201, 45,199, 47,206,
-247,250,100, 41,207,103,247,173, 75,123,142,223,160,113, 11,246,209,135,144, 79,180,106,203, 65,114,206, 83, 41,220,194,165,216,
-189,126,227,151,210,210,197,211,232,196,142, 9, 52,103,254, 60, 26, 54,247, 0,173, 59,252,152, 28,125,186,200, 34, 90, 10,197,
-144,132,233,178, 87, 61, 49,127,203, 37, 90,194,229,196,215, 51, 62, 4, 64, 98,170,180, 24, 73,236, 94, 52,200,202,170,175, 78,
-201,211,185, 58,149,170,219,157, 23,188,127, 64, 30,133,171,201,234, 28, 65,156,246,243, 7,138, 58,169, 66, 76,150,250,177,197,
-252, 30,144, 67,180,146,166,178,232,219,111,236, 66,137, 96,141,153,189,137,106,183, 27, 39,197,232,108, 61, 19, 72,245,219, 14,
-162,196,169, 82, 99, 98, 98, 5,220,137,195,166,173,166, 67, 87,222,147,125, 38,143,139,250,234,167, 60,159,210, 42,107,206,250,
-237, 6,179,181,229, 21,135, 71, 12, 36,144, 49,185,215, 34, 31,136, 22, 98,228,134,177, 14, 13, 88,124, 93, 34,237,173,122, 78,
-254,208,177,247,232,176,252,165,234,132,166,207, 90,228,179,123,193,234,161,222,181,250,134,123,149,235, 30, 82,186,239, 81,242,
-237,113, 88,242, 26,232, 34, 90, 25,178,149, 58,188,241,200,221,215, 91, 78, 61,127,189,108,223,253,103, 99, 23, 31,185,219,162,
-199,180, 11, 5,203,255, 23, 88,187, 89,247,175,187,206, 60,149, 98,211,166,178,222, 78,231, 52,112,198,182, 72, 91,183, 66,123,
-117,149, 93,157, 60,225, 93,123,232, 82, 96, 24,199,253,133, 31,191,254,230, 43,235,210, 39,229,251, 55,174, 68, 43,134,100,249,
-127,179,100, 33,140,161,201,248,115,212,106,234,121, 90,199, 31, 71, 28,235, 43, 71,151, 18, 58,123,249, 62,123,254, 58,148, 22,
-236,121, 36, 97,154,217,167, 21,247,139,121, 63,150,169,211,133,250, 79, 90, 35,245,125,179, 87, 29,150,220,188,230, 14,158, 47,
- 56, 94,171,186,156,118, 83, 37, 90, 23, 46, 93,234,110,145, 62,251, 86,119,238, 35, 6, 76,219, 18, 53,127,203,121,218,118, 18,
-239,128,231,132,216,100, 57,242, 64,180, 34,163, 72,250, 32, 79,147, 33, 59,250, 47,142, 65,126, 37,185,247, 45, 29,191,253, 95,
-186,255, 17,191, 95,238,234,180,104,169,243, 18,220, 91,221, 42,165,233,191,156, 60, 16,245, 77,156,100, 25,139,177,146,105, 58,
-142, 99,234, 22,173,232,255,218, 62, 54, 84,221,135,255,135, 76,150,235, 48,105, 82,119, 43,187,140, 65, 23,175,220,164, 65, 75,
-174, 83,169,222, 71, 37, 51, 61, 94, 58, 75, 25,208, 85,187,175, 80,131,150,221,223,165, 50, 49,185,196,146, 97, 89,208,185,165,
-180,113,205,155,206, 57,239,251,221,167,238,191,187,253,236,243,251, 65,171,159, 93, 81, 37, 89,197,155, 79, 61,107,106,231,241,
-150, 89,245,114, 43,231,188,103, 83, 59,120,221,211, 38, 16, 68,107,253,177,103, 84,159, 77,177,141,248,171,168,233,132,115, 70,
- 33, 90,105,156, 11, 60, 63,116,249, 91, 76,150, 63,147,158,146, 85, 27,135,170,186, 11,203,150, 45,219,167,115,231,206,189, 17,
- 24,206,202, 42,135,104, 37,102, 50, 48,130,205,223, 15,120,104,243, 27,236, 45,211,101,120, 53,115,203, 29, 26,191,238, 14,249,
-214, 29,200, 36,235,147,228,219,190,207,228,230,216,149, 0,218,118,226,177, 78,162,165, 17, 19, 23,151,100,214,206,249,122,181,
-239, 55, 41,120,244,186,135, 84,126, 16, 72,214, 49, 38, 89,247,169, 68,211,241, 81, 28,104,223, 68, 87,227, 40,137, 86,134,172,
-133,131, 3,222,134, 74, 46, 3,144,132,129,220,238, 45, 38,249, 83,249, 1,199,201,187,219, 33,234, 48,237, 52,241, 87, 78,112,
- 92,137, 22,143,226,169,211,182,239,100,201, 12,222,111,210, 58, 74,151, 57,255, 67,254, 26, 43,166, 79,119, 84,206, 39,202,150,
- 45,155, 27,147,194,172, 97, 97, 97,121,207,159, 63, 95,150,135,144,215,186,118,237, 90,147,136,136,136,166,193,193, 31,155,212,
-110,210, 97, 19, 91,206, 30,241,180, 0,143,109,156,243,204,150, 77,230, 60,134, 36, 45,221,118,214,174, 37,123,110,188,193, 94,
-193,255,149,247,149, 49,234, 48, 86, 21,208,241, 32, 0, 30,166,116,247,252, 21,191, 17, 45, 59,175,143,208, 89, 4,159,159, 98,
-247,244, 57, 14,228,198,135,194, 42,182,198,192, 61, 39, 7, 3,126, 97, 93,123,255, 49, 76, 34, 22,120, 6, 65,180,182, 28,189,
- 73, 78, 94,197,168,195,128,233,180,149,117, 7, 68,169,239,194,171,100,106,151, 77,235,243,163,188,151,141,123,177,112,148, 19,
- 86, 43,238,100,216, 50, 22, 32,197, 81,128, 40,148,170,221,137,250,205, 62, 44,221,131, 93,175,159,248, 26,233,101,146, 36, 73,
- 18,157,100,198,171,104, 29,186,251,228, 29,109, 58,116,139,220, 42, 12,163,142, 35,215,210,167,207, 95,105,231,193,179,228,154,
-187, 20,205,156, 51,157,186,140,223, 66,195,151, 94,150,226,173, 96,141,114,244,233,252, 89, 78,253,145,199,214,189,122,134, 60,
- 21, 59,125,218,121,246, 5,173,224,175,102, 16,206,142,195,150,144,149,103,213, 41,114,101,200,205,135, 24,210,154,173,135, 17,
- 8,145, 75,222,114,178, 58, 29, 16,167, 61, 76, 88,212,227,177,214, 29,125,254,221, 49,184, 60,245, 17, 45, 14,108,239,211,109,
-200,116,137,100,245, 27,179,144, 92,114,151,142,104, 60, 96, 13,199, 77,213,161,206,163, 86,210,108,118,195,155,167,203,184, 23,
- 1,240,237,122,143,255,150,143, 73, 89,162,228,169, 27,202,174,167,157,199,162, 5,155,207, 75, 4,123,198,218,179,100,106,227,
-177, 72,238,181,200, 7,125,199,192, 4, 85,162,213,162,231,212,183, 15,217, 42,126,250,230, 59, 66,168,196,204,173,247,248, 99,
-237, 50, 57, 23,235, 20, 44,151,104,241,168,236, 79,111, 63,124, 9,175,209,127,199,253,174,115, 46, 94,239, 53,101,215, 67,239,
- 42,157,190, 44, 88,119, 52,242, 48, 62, 48,216, 51,128,143,131, 1,236,162,130,245, 4,239,213,180, 46,133, 53, 90,242,148,245,
-209, 68,180,240,190,111,203, 94,140, 62,252,220,192,197, 27, 87,162,245,232,209,163,126,234,150, 44,132, 49,128,100,181,102,146,
-133, 50,226,121, 79,151, 89, 63,209, 74,153,206,173,210,164,185,107,233,193,203, 80, 26,203,150,113,132, 33,120,215,232, 67, 13,
- 58, 79,166,175,225, 17, 82,106,220,109, 26, 29,189, 22, 36,165, 45, 71,239,163,220,143,229,180, 27,136, 22,202, 58,100,196,184,
- 62, 5, 75,213, 9, 26, 48,117, 99, 4, 2,236,151,236,123, 36, 89,158,122, 51, 14, 93,217,130,134,193, 95,114,228,129,104,177,
-119, 74,122, 87,108, 59,245,132, 14, 92,120, 33,213,179, 35, 91, 45,103,109,185, 69,203,247,221,151,140, 52, 32,157,218, 44, 90,
-170,247, 81,229, 39,106,174,195,239, 72,146, 62, 75, 20,203,141,177,132, 69,231,149, 98,190, 52, 28,215, 42, 91, 45,191, 58, 36,
-218, 23,149,214, 71,180,146, 38, 53,201,106,101,151,233,195,133,203, 55,184,179,189, 70,133,187, 28,166, 41, 27,239,211,136,249,
- 7, 57, 30,203,234,141,185, 69,218,231,150,105,211, 93, 75,153,210,100, 40,223, 85,111, 12, 80, 74, 91,183,220,214, 78,121,223,
-175, 63,112,227,205,249, 7, 31,223, 12, 88,249,236,178, 42,201,106, 61,251,238,121,144, 44,196, 32,201,105, 88, 54,111,190,203,
- 93,127, 6,229,174, 63,157,114,214,157, 74, 57,106, 79, 38, 91,207,210, 31, 49, 50, 16,137, 71,119,124,128,146, 72,137, 3,227,
-145,120,228,153, 94,215, 98, 90, 38, 90, 8, 98,198, 87, 25,167,151,170,238,194,252,185, 50,111,232,216,177, 99,111, 30,162,220,
- 10,214, 31, 25, 68, 43,145,141,141,205,249, 25, 51,102,124,102, 11,140, 20,227,195,163,112,104,198,204,153,145,217,243, 21,165,
- 97,203,174, 81,233, 38, 35,233,238,211,247,244,136, 71,123,157,187,241,146,182, 30,187, 71,203,119,223, 52,156,104, 69,131,102,
-231, 86,228,116,243,209, 7,169,218, 16, 88,178,152,100, 53,155, 16,165, 97,248,248,119, 16, 43,137,150,163,123,161, 96,196, 3,
-192, 29,131, 7,187,217,196,115,146,111, 61,123,155,189,148,163,237, 62,250,111,252,241, 31, 34, 90,124,227, 4, 38,118, 30, 43,
-155,117,159, 44,117, 94, 99,151,251,147,167,119,205, 8, 13,129,182,186,212, 32,153,187,187,123,129,139, 23, 47, 22,102, 60,125,
- 24,214, 26,156, 26,113,170,195,169, 89, 72, 72, 72,107, 38, 95, 24,133,132,216, 32,125,195,243,165,251,100,244,109,154, 60,107,
-161, 74,157, 90,246, 28, 67, 39,174, 60, 38,236,179, 22,168, 50,213,186, 68,103, 41,216, 20,110, 66,196,100,169, 5,192,107, 45,
-163,163,135,239,110,196, 99,121, 48,201,114,142,142,201, 98, 23,218, 71,184,161, 75,244, 62, 66, 85,135,156,148,220, 38, 8, 62,
- 95,205,113, 11, 28, 3,245, 94,142,222,243,139,244,234,235, 15, 95,152, 96, 60,165, 57,209,177, 16,187,216,109,120,224,242,107,
- 90,200,120, 54,103, 11, 65,193,206, 7,249,195,227, 44, 91, 12,189,238,235,147,201, 35, 87,131,156,243, 86,138,116,205, 95, 57,
-210,189, 96, 21,170,197, 1,213,197,107,119,165,178,245,187, 83,133, 38,125,104,212,162,227,180,133, 73, 29,207, 97,245,137,221,
- 53,210, 64, 8,150,169,115,148, 77,182, 34,181,233, 21,199,115, 34,222,208,169,244, 32, 41, 5,127,138,164,136, 72,162, 44, 5,
-170, 83,251, 41, 39,153, 8, 94,147, 92,127,136,215, 90,196, 95,235,236, 86,212, 24, 67,135,242, 59, 58, 58,150,224,246,172,146,
- 33, 67,134, 24, 66,206,150,171,134, 29,135, 47, 99,203,222, 43, 26,189, 96, 63,217,228,224,184, 21,149,224,119, 38,227, 5,139,
- 23, 47, 94,154, 45,160,249,245, 97,160,227,124, 2,142,215, 90, 59,105,249, 49,140, 78,131,171,123,158, 28, 89, 32, 78,207,216,
- 66, 61,102,225, 1, 9,187,141, 76, 94,120, 84, 27,147,217, 16, 26, 52,107,175,100,129,131,238,131,100, 33, 72, 88, 23,209, 98,
- 75, 85,153,230,157,135, 74,228,105,208,164,229,148,220, 52,205,210,180,233,221,207,119,157,180,135,154,246, 91, 72, 57,153,108,
-245,153,113,136,156, 60, 10,126,238,208,119,130,148,111,244,236,141,148,202,194,102,137, 92,221,135,139,212,167, 82,243, 48,148,
-113,225,142, 91, 82,103, 89,160,108,179, 48, 28,151, 83, 95,228,209, 68,180,154,247,152,242,246,230,147,143,180,147, 63,218, 96,
-189,135,235,171,218,208,147,148,169,104,167, 15,178,137, 86, 86,239,207, 97, 97, 17,212,170,215,228,136,226, 53,186,133, 55,239,
- 58, 46,226,228,149,167,146,139,115, 45,147, 44, 88, 91, 7,240,199, 32, 44,238,245, 70,159,150,222,169,150,153, 10,134,234, 42,
-183, 38,162,133,143, 31, 12, 90,129,171, 31, 31, 49,113, 37, 90,189, 7,143, 89, 6,119,225, 94,182,100,141, 93,123, 75,138, 21,
-133, 17, 0,174,121,144, 44,220, 99,249,129,199, 76,180, 10,233,181,104,153,217,103,219,247,224,121, 16,215,245,181,228, 69,130,
-177,227,191, 97,155,168,207,132, 13, 84,164, 70, 15, 41,141, 95,184, 95, 34, 89,139,246, 62,101,108, 79,161,220,178,136, 17,136,
-214,181, 27, 55, 6,218,185,249, 4, 30,191,252,156, 71,197,190,162, 14, 76,138,240,190, 71,200, 76, 55,110, 43,196, 37,115, 57,
-101,201, 3,209, 10,253, 18, 33, 89,153,209,214, 74, 98, 8,153, 32,153,136,209, 42,213,231, 40,135,224, 92,251, 33,162,133,118,
- 85, 39, 94, 56,244,237,240,255, 45, 85,248,175, 41, 70, 43,250,218,239,172,100,170, 50,148,178, 84,247, 42,242, 52,197,105,106,
- 39, 90,186, 20, 49,169,137,165,135,181,157, 83,240,249, 75, 32, 27,255, 39, 89,227,151,159,230, 88, 44,155, 39,124,173,250, 4,
-144, 58,159, 71,204,239,148,150, 59,146, 69, 91, 47, 4, 30,187, 30, 28,208,111,197,211, 88, 36, 11,132,171,197,228,171, 23, 17,
-132, 42,247,193, 70, 76, 22,124,221, 24,193, 1,146,181,243,236, 75,118, 99,190,254,246, 85,206,193,134,238,149, 70, 72,199, 16,
- 55,128,135, 8, 67,254,229, 40, 13,136, 22, 58,195, 58,109,250, 7,171,187, 11, 59,116,232,208, 7, 36,107,215,174, 93,173,174,
- 92,185,210,138, 73,148, 78,139, 22,159, 31, 50,123,246,236, 79, 18,195, 82,219,166, 78,155, 65,101,234,117,163,134,253, 86,208,
-132, 5,187, 56, 62,235, 45, 29, 60,247,128, 24, 35, 90,176,245,114,156,137, 22,191,180, 71,150,107, 53,153, 70,174,190, 79, 37,
-101,146, 44, 96,174, 36, 90, 57,188, 43, 94, 91,181,227, 28,205,219,249, 64,138, 39,192,195,225,217,106, 15,101,110,182,139, 74,
-177,185,191, 84,187, 69, 6,185, 14,121, 62,162,170,108, 77,219,205, 86,171,218,170,109,203,195,166,123,229, 41,213, 40,124,232,
-226,115,212,125,234, 65, 30,106,157, 85,111, 16,171,202,245, 32, 79, 38,236, 46, 44,195, 4,182, 36,147,173,178,108,205,170,204,
- 16,215,227,255,173,243,230,205, 11,146,133, 78, 66, 25, 44,175, 85,173,138, 52, 91,107,229,211,118,126,147, 82,173,103,237, 1,
-185, 90,181,237,168,212, 82,216,227,127,169, 54, 51,247,122,183,153,223, 60,127,139,149,233,210,149, 30,159,170,247,194, 75, 3,
-236, 42, 13,137, 83, 32,170,169,125,246,143,176,100,161,179, 1,182,120, 9, 33,168,123, 25,119,108, 28,195,240, 94,142,238,243,
-139,244,202,139,183,159,164,209,139, 19, 57,224,116, 8,187,117,123,240, 75,177, 1,143, 24, 44,223,255, 56,249,246, 60, 66, 5,
- 58, 31, 96, 75,239,105, 98, 23,243, 3, 57, 50,149,121, 16,248,126,204,255, 46,117,158,124,144,250,207, 57, 74, 99,150,156,164,
- 57,235,207,179,107,242,181, 68,180, 56, 62,174, 21, 44,185,156, 95, 39,209,242, 40, 92,147,102,240,168, 59, 16,172,219,207, 48,
- 93,196,103,233,247, 48, 30, 25,151, 57,127, 85, 42,221,218,239,101, 71,142, 49, 68,160, 44,220,149,112,255,177,235, 80,107, 60,
- 25, 91,132, 65,160,203,242, 60,110,245,237,237,237,107, 49,241,170,137,228,144,181,200, 71,247,124,101, 41,189,167,111,132,179,
- 91,142, 38,174,174,174, 85,145,178,100,201, 82,197,219,219,187, 22,174, 97,162, 85,201, 16, 12, 84,242, 38,100,139,194,244, 46,
- 67,231, 74, 22,142, 70, 29, 71, 18, 79, 52, 44,107, 82, 71, 16, 39,144, 44,117,139, 22, 72,150,250,177, 30, 83,118,234, 36, 90,
-169,211,216,239,219,193,214,223, 9, 11,119, 83, 10,179,116,152,227, 45, 97,162, 20,169,235, 54,238, 49,139,134, 46,190, 64, 77,
-122, 76,161,156, 69, 42, 72,150, 46, 37,201, 50,181, 72,183, 12,249,228,214, 59,165,181,219,160, 33, 51,183,113, 39,249,144, 99,
-177,106,179,199,226, 46,117, 29,191,137,112, 92,174, 12, 16, 45,188,103,143,115, 40, 9, 70,105,239, 98,203,104,155,190,211, 63,
- 32,208, 94,157,104,101, 46,222, 57, 4, 3, 25, 58,205, 66, 39,172, 59, 70,203, 37, 71,177, 7,175, 2,223, 18,115, 45,122, 23,
- 18,206,225, 21, 31,233, 8,199,176,194,253,134, 14, 29, 22,119, 88,138,240,225,130,206,188,254,224,237,148,214,181,200, 35, 93,
-229,214, 68,180,164,233, 54,216, 85, 6, 82,140,129, 32,113, 33, 90, 22,118,153,199,178, 53,247,211, 94,255,231, 18,201, 66,224,
-187, 68,178,216, 82,214, 37,154,100, 33, 12, 3,100,196,214, 85, 55,209, 66,188, 84,167,190, 99,233,109,240, 87,201,106, 59,133,
- 7,143,224,195,164,187,223,121,126, 46,143,211,154,253,119,164,105, 67, 22,237,123, 74, 53,134,157, 34,231,218, 75, 40, 83,197,
- 9, 6, 17,173, 86,157, 7,158, 28, 52,125, 75, 56, 70, 66, 98,196,113, 75, 14, 90,111, 59,229, 52,249,214, 31,248, 41,115,222,
-202,129, 54,174,133, 94,165,115,249,110,238, 73,141,208,166,207,234,253,242, 67,104,184, 84, 55,187, 92,181,164,126, 23, 31, 83,
- 24,117, 13,162,101,147,163,166,100,205,130, 69, 19,115,247,201,213, 43,228,227,231, 56,174,163, 14,113, 29, 70, 14,170,142, 50,
- 84, 31,185,168,111, 52,162,234,121,200, 75,162,165,236,154, 93,135,218, 42,154,202,194,218,139, 73, 86,136,255,165,107,177, 72,
-214,184,101,167,163,204, 44,172, 97,150,116, 51, 4,164, 84,214, 89,188,210,112, 39, 50,101,197,241,128, 93, 23,130,158,245, 89,
-246,244,146,170, 37,235,255,191, 31,250,219,184,249, 6,154,103,200, 53,201,202,202,195, 68,223, 61, 16,143, 5,146,245, 31,187,
-181,178,215,154,200,174,174,151, 82,199,133,175, 6,176,113,215, 10, 67, 37,162,133,151,249,224,165,215, 37, 37,149, 67,180,172,
- 92, 10, 60,175,223, 33,246,232, 66,184, 11, 97,201, 90,182,108, 89, 43,184,204, 96,205,226,128,236, 86,252,210,215, 73,180,224,
- 38,132, 5, 75,125, 11, 8, 8,160, 27, 55,110,144,139, 91,118, 30, 57,117, 89,154,179,103,212,156, 29, 60,197,195,109, 58,124,
-254, 17, 45,221,113, 37, 78, 68,203,196,198,189,125,137,250,253,104,148,228, 46, 28, 7, 75, 86, 11,125, 56, 42,207, 43,137, 22,
-130,225,179, 22,168,240,121,229,129,135,252,144, 92,160,220,237,247,145, 87,235,189, 18,201,170, 55,242, 56,217,184, 21,251,100,
- 72, 48,188, 91,158, 82, 33, 59, 78, 61,164,226, 85,154,134, 33,144, 95,181, 60, 60,108,185,124,181,150, 35,216,221,112,131,156,
-115, 87,254, 34,183,172,209,249, 18,164, 78,157,218,165, 71,143, 30,149,152,100, 41,135,236, 54, 27, 51,102, 76, 67, 62,158, 89,
- 14,201,130, 28, 4,190, 35, 38, 11,238, 66, 88,178, 84, 55,252,199,113,156, 71, 62,107,223, 94, 85,253,182, 93,125,108, 93,162,
-111, 85, 3,203, 42,101, 79,205, 68, 11,238, 66,188,120, 96, 82,135,197, 16, 95,208, 75,224,154,147, 25, 3,197, 29,192,229,199,
-175, 62, 74, 95,242, 32, 41,189,230, 95,145, 94,228, 85,249,101, 91,182,223,113,242,225,184,151,130, 93, 14, 82,205,225, 39, 65,
-180, 30, 26, 82, 78,184, 47, 49,242, 21,178, 97,213, 64,231, 3,146,133, 17,141, 14, 76,180, 64,178,174, 95,191,174,151,104,101,
- 45, 84,131, 38, 46, 62, 32,145, 43,140,102,195,200, 54,252,238, 63,117, 43,185,228,171, 66, 60, 97,105,163,204, 37,123,109,168,
-208,126,254,155,222,243,206,115, 64,251,109, 16,173, 59,218,202,202,243, 46,213,228,121,219,154,176,235,189, 25,200,147, 50, 97,
-164, 25, 58,242,172,249, 74, 7,169, 30, 15, 13, 13, 45,151, 51,103,206,198,152,208,210,202,202, 74,138, 93, 50, 96, 75,128, 56,
- 23, 30, 69,117,115, 0,199,147,161, 51, 27, 48, 97, 57,187, 97, 61, 22,203,149, 1,162,133,105, 91,190, 11,124,103, 75,150,250,
-177,153,236,158,215,101,209, 42, 84,162, 90,200,246,179,175,169,100,181,102, 81, 10, 11, 11,101, 60, 99,130,164,169,210,220,105,
-218,125, 2, 15,134,120,193,214,204,247, 18,201, 26, 50,121, 5,153,154,167,219,198,229,148, 77,178, 20, 30, 30, 73, 93,243,150,
-123,139,169, 49, 58, 14, 91,134,247,206,149, 86, 3,151, 72, 22,148,140, 57,203,190,197,121, 57,245,214, 52,234,176, 94,243, 46,
-111, 64,140, 98,136, 22,119,178,248,200,176,203, 83,247,173,220, 81,135,105, 29, 61,198,174,222,184, 35,242, 75, 88,148, 68,218,
-143,130,100,177,229, 13, 3, 93,120,128,146,100, 41,130,204, 66, 93, 15, 82, 51, 38, 53, 5,234, 12,137,100, 66, 60, 65, 87,153,
-213,137, 22,227,127,138, 71, 84, 94, 69, 98, 43,210, 85, 83, 91,207,171, 56, 6, 25,134,196,104,153,103,200, 19,180,251, 44,147,
-172,232,209,133,176, 14,193, 29,137,209,207, 32,150,248, 40,194,243, 14,107,166,157, 30,162,149, 42, 93,150, 53,151,110, 61,145,
-226,118, 17,247, 4, 82,137,129, 42,189, 57, 78,171, 45, 91,156,218, 77,191, 72,181,134, 30,167, 92, 77,151, 83,166, 50,131,201,
-185,220, 80,202,215, 98,141,108,162,149,198, 42,125,251, 6,109, 6,132,194, 93, 56,132,251, 70,224,216,116,248, 78,178,247, 40,
-254, 42,141, 99,238, 78, 90,230,115,212, 10,107, 6,143, 34,151,159, 4, 4,211, 26,142,151, 59,126,229, 21,147,173,154,223, 82,
-206,111,105,210,186,155,210,115,222,116,204, 49, 50,203, 88,224,178, 28,157,250,171,243,164, 48,179,122,118,241,242, 53,201,239,
-141,152, 44,184, 11,199, 45, 59, 21,153,218, 92,154,190,193, 32,146, 5,160, 96,185,104, 63,124,213,177,237,231,223,239,235,185,
-248,169, 95,139, 25, 15,166,105, 75,213, 7,238, 95,148, 62,103,149,219,252, 82,251,194,113, 90,161,252, 69, 53, 88, 27,216,150,
- 78, 5,131,114,214,153, 44,145, 44,175, 26,227,201,179,250, 88,202, 90,117,180,100,201,114,173, 56,140, 50,179,226, 57,149, 25,
- 68,142,165,250,147, 67,241, 62,100, 87,180, 55,241, 53,122, 45,102,158, 69,235, 77, 43,171, 50,186, 80,233, 46, 84, 37, 89, 60,
- 5, 66,171,119,239,222,181,226,175,106,157, 68,139,207,191, 86, 39, 89, 76,208,136, 59, 44,226,216, 34,114,118,205, 74, 93,249,
- 33,236, 49,247, 18,213,233,185,148,138, 53, 24, 78,190,245,134, 80,197, 86, 19, 13, 38, 90, 76,178,218, 21,175,215, 87, 34, 89,
-190,181,123, 49,201,114,195,212, 19,178, 55, 4,246, 31, 59,118, 76, 34,145,229,106, 54,219,152, 41,103,153,207, 13, 7,109,164,
-142, 51,206, 82,139,137,167,168, 76,135,165, 18,201,242,173,208, 96, 35,200,230,166, 77,155, 90,153,155,155,235,141, 81,203,144,
-173,232, 3, 4,216,206, 91,189,143,167,114,112, 63,100, 98,157,165, 45,220,132, 41,173,179,180,193,104,153,161, 51, 55, 73,132,
-222,198,173,232, 11,217,133,253,150, 81,178, 86, 97,233,136,171, 87,175, 86,135,219,240,206,157, 59,205,162, 59, 86,116, 52,122,
-173, 89, 16,130,209,133,170, 22,173,149, 91,191, 89,180, 86,170, 88,180, 10,180,240,107,107, 87,114, 80,179, 18, 53, 90, 71, 96,
-158, 45,236,173,139,245,169, 97,229, 59, 68,239, 7,129,106,157,120,174,184,143, 8, 94, 85,206,255, 4,243, 58,226,224, 16,199,
-101, 45,147,104,113, 7,176,113,217,166,195,210, 68,183, 51,183,221,147,190, 24,225,130,172,204, 95,244,165,217,197, 91,157, 9,
- 23,166,106,240,110,189,146,173,132,110,250, 38,131,141, 5,185,101,198, 92,152, 51,232,163,165, 99,206,143,105, 50,228,248,194,
-241,109, 95,210, 57,231,230,125,238, 47, 60,154,235, 21, 72, 22,220,135,124,145, 78,139, 22,200, 20, 2,236, 49, 77,138,210,117,
-248,224,229, 39,122,255, 49,156,156,242, 84,150,130,222,157, 11,181,177, 78,239,221,185,157, 99,129,102, 39,218,116,104,255, 57,
-127,241,170,120,191,232,218,146,177,142, 86,245,241,241,105, 16, 24, 24, 88, 30,196,202, 51,127,153, 59,174, 57,139,189,243,200,
- 95,230,174,146,104,177, 14, 87, 98, 55, 99, 3,182, 38, 23,101, 97,218,190, 62, 99,238,243,109, 74, 7,247,215, 60, 79,214, 71,
- 27,231,188,215, 10,149,170, 23,212,101,208, 84, 58,114,249, 37,143,244, 10,162,225, 83, 87, 82,106,123,207,213,124,129,108,242,
- 2,226, 4,203,200,119,129,239,252,181,175,126, 12,164, 86, 23,209, 74,239,146,253,210, 26, 30, 85,218,109,212, 82, 74,154,210,
-124,160, 66, 97,101,146, 40,185,217,156, 10,141, 7, 80,145,186,131,201,187, 92, 67,170, 92,175, 13,121,230,241, 9, 77,146,194,
- 12, 4, 67,118, 57,165,247, 51, 47,137,213,180,199, 52,201,170, 8,107, 12, 58, 88,207, 34,181, 63,129,196, 87,110, 45, 89, 72,
-234, 25,248, 92,198,100,119,116,203,247, 96,198,226, 77, 17,235, 15,223,147,136, 81, 71,142,239, 44,220,104, 74,184,153,131, 33,
-150, 86,143,164,188,252, 82,200,131,167,129, 18,233,192, 60,105,120,102, 6, 47,101,114,192, 36, 6,115,230, 33,118,180, 10,207,
- 3, 87,103,224, 14,178,200,148,159,227,179,116,147, 67,199, 34,237,167,205,221,116,101,175,220,233, 29,144, 23,215,232,195,129,
- 71,172, 7,157,226,231, 18,113,195,152,231, 13,132, 8,239,119,196, 75, 42, 73, 22, 44, 83, 32, 90,246, 89,116, 91,180,152,104,
- 5,222,120,204, 35, 75,121, 4,231,114,254,232,153,182,233, 54, 13,229,152,198,182, 19,143, 82,165,110,107, 40,111,189,169,148,
-165,194, 16,202, 85,119, 26, 85,233,187,147, 26,141, 60, 68,158, 37,219,176, 21, 50,139,222,105, 40, 80,143,212,214, 78, 51,166,
- 46,217, 27, 9,107, 25, 62,248,186,206, 58, 79,118,238, 62,175, 77,237,178, 96, 34,106,131, 55,158, 25,126,194,214,253,231,162,
-240,204,207,224, 81,203, 7,120, 10,150,157,103,158,211,166,227, 79,121, 18,221, 71,210, 59, 30,152, 20,107, 49, 39,202, 52,125,
- 94,157, 68,216,224,155,199,199, 11, 82,166,182,146,230,195,176,206, 86,149,149,250, 37,141, 89,124, 50,210, 52,181, 5, 92, 16,
-134,144,172, 88,147,164, 53,155,121,191, 94,203,185,247, 27, 52,152,126,175,142,156, 84,109,228,153,198,149, 7, 30,108,174,200,
-152, 81,117,125,189, 88, 50, 97,209,210,228, 46,132,217, 26, 67, 97, 17,152,121,152,131,218, 65,178,120, 68,137,100,206,102, 83,
-168,174,153,225, 99,214, 46,252, 54, 25,105,166,125,133,242,185,111, 27, 49, 98, 68, 31, 30,154,220, 10, 36,132,201, 17,230,153,
-146, 72, 22, 67,164,141,104,197,148, 19, 22, 45,101,108, 22,207, 98, 76, 60,140,150, 88, 22,173, 89,179,134, 86,175, 94, 77, 60,
- 61, 70,120,161,154,253,169,205,164,147,146, 21, 14, 95, 43, 3, 88,233,241, 80,170,141, 58,212, 57,209,162, 68,178,234,114, 60,
-141, 68,178,122,131,100,201,153,169, 54,150, 76, 76,143,192, 86,173,134, 3, 7, 14,108,174,156,230,193, 53, 79,217,107, 60,177,
- 94, 48,130,223, 49,210, 16,150,172,173, 91,183,182,234,210,165, 75, 11,228,197, 53,106, 58,254, 93, 57, 65,150,123,140, 94, 41,
-141, 96, 92,189,251, 34,245,103,235, 64,237,214, 3,169,199,232, 37, 52,107,237,105,105, 64, 64,217,246,243, 81, 95,109,115,218,
-232,170,187,228, 66,244,240,240,168,193,109, 82, 15, 35, 15,241,159,147, 62,146,245,157, 76,196,104,185, 23,170,210, 91, 53, 70,
-203,163, 64,213, 89,136,209,234,179,232,210, 64, 88,178, 98, 79,106,122,245, 49,142,171,212, 95,239, 68,181, 32, 90,107,142,240,
-139,135, 19, 94,112,136,213, 89,206,123, 96,147,206, 89,227,168,190,239,100,154,155,231, 48,103, 43,241,216,130,165,235,125,157,
-185,234, 8, 45,228,225,210,173,185,195,105,204, 86,178,174,126, 87,168,206,224,221,228,144,187,122, 56,235,192, 52, 45, 35, 45,
-245,150, 51,186, 78,173, 94,191,126,221, 10,238,194, 35, 71,142, 72,150, 44,252,135,222,107, 32, 90,177,100,154, 59,230, 57,246,
- 95,143, 73,116,154,167,120,192,244, 37,217,171,141,146,230,106,122,253, 33,140, 50,230,170,168, 28, 93,152,190,115, 93,151,255,
-110,175,171,184,243,226,202, 26, 55, 42,150,247,157,173, 70, 18, 52,149, 51, 1, 19,105, 31,182, 36, 55,225,185,220, 96,197,140,
-177,110,225,119,183,110,221,106,241,232,231,166,201,146, 37,211, 22,218,240,157, 76, 38, 89,129, 40,219,101, 94, 69, 2,147,140,
- 34,142,234, 58,119,112,139,214, 29,160,194,101,235, 73,147, 66,234, 25, 54,255,157, 76, 16, 39, 88, 93,212, 73,213, 66,142, 69,
- 83, 63,134,142, 87, 3,209,138,145,137,128,118, 96,233,183,253, 30, 53,235, 53,141, 50,102, 45, 16, 89,179,205, 72, 26,188,208,
-159, 42,180, 24, 75, 73, 77,211,140, 97,220,226,188, 14, 41,123, 27, 78, 77, 88,125,133,227,188, 14,224, 67, 8,109,160,192,190,
-205,152, 93,212,117, 6,135,138,100,200, 45, 89,118,180,108, 58,117,201,219,199,183, 79,185, 26, 77, 47,123,230, 43, 19,152,209,
-211, 39,152,173, 30,175,178,228, 42,118,201,193, 49, 99, 31, 67,100,166,178,204, 84, 58, 79,209,234, 97, 39, 47, 63,150, 92,147,
- 32,167, 93,230, 92,146,220,227, 53,121,245,135,230,108, 57,130,222,167,115,243, 13, 75,153, 86, 90, 38, 76,125,139, 41,103,244,
-218,133, 81,166, 54,238, 81,105,221,202, 92,215,182,252,142,242, 56,242, 32, 47,183, 17, 39,221,107, 29,166,225, 73, 72,183,157,
-126,193, 83,202,188,148, 70,236,225, 57,199, 64,143,101, 28,147,181,148, 73, 54, 70,154, 99,160, 10,220,107,246, 89, 10,235,156,
-176, 20,177, 86,131,102,238,162,255, 6,174,164,122,189,150, 80,181,206, 11,168, 66,187,185, 84,169,227, 2,106, 60,120, 35,245,
-152,113,156, 70,172,184, 74, 29, 38,236,166, 92,101,219, 18,123, 7,142,105,153,231, 77, 99, 27,113, 40,207,129,117,251,175, 74,
-243,217, 97, 46,186,178, 77,134,125,181,114,202,215, 91, 38,103,249,254, 61,207,147,140, 59,229,240,125,113,228,194, 35,105, 38,
-130,149, 60,239, 26, 62, 36,225, 81, 66,194,116, 30,245,135,236, 98, 34, 92,224,185,150, 9,201,101,222,250, 47,201,150, 52,185,
-201,157,117, 59, 79, 71, 96,126,154, 81, 11,143,133,165, 52, 53, 67, 64,173, 33, 36, 11, 72,200,125,153, 27,130,218,119, 68,235,
- 59,119, 33, 91,178, 48,164, 84,213, 93,104,231,219, 75, 34, 89,227,121,242, 52, 93, 68, 75,117,237,194,162, 5, 29,246,240,215,
-115,147, 20, 41, 82,116,102,171, 77, 35, 36, 76,206, 9,247, 26, 38,207,227, 23,189,148,216,154, 18, 43,238, 40,186, 50, 49,229,
- 68,140, 22, 79,210,247, 25,238, 67, 94,230,128,120, 90, 2,226, 24, 47,218,184,113, 35,241, 60, 80, 97, 28,123, 50, 10,238, 61,
- 94,159,239, 73,161, 90,253,169,237,228,147,108,221,226,151, 30,127, 1,201, 37, 90,248,226, 44, 86,183, 79, 20, 72, 86,177, 58,
-125,162,152,216,180,150, 9,170,166, 54, 74,202,117, 46,192,117,108, 48,113,226, 68,137,112, 33,193,130,133, 52,116,232,208,150,
-209,245,198, 34,211,154, 92, 10, 26,100,230, 78,194, 38,121,158,223,106, 2,245,243, 59, 38,197, 26,204,224,209, 71,195,216, 92,
-221,100,196, 62, 42, 92,111, 4,153,219,103,223,174,224, 81,147,134,190,204,217, 61,148, 33,119,238,220,197, 56, 46,167, 3, 47,
-193,177,128,247,237,248, 88, 81,142,209,114,138, 38, 91, 6,117, 16, 32, 91,136,213,130,187, 16,123,252,135, 0,196,102,193,109,
-168,180,104,149,132, 69,139,221,135,106,177, 90,122,117,222, 60,125,206, 59, 8,122, 71, 66, 76, 22,220,133,176,100,129,100,217,
-184,228,189,174,171,131, 80, 63,151,194,206, 51, 61,187, 72, 22, 23,174,216, 34,178,223,172,253,212,107,206, 25,242, 42,211,142,
- 39,213,204,178, 90,199,106, 0,134, 60,155,173,120,121,147,239, 72,150, 28,162, 5, 98,194, 86,233, 22,102, 78,133, 95, 55,237,
- 58,158,142, 95,184, 79,205, 7, 44,163, 78,163,214, 81,134, 28,229,169, 78,113,199, 90,215, 87,150, 93, 22,114,176,218,161, 69,
- 3,242, 12, 73,149, 42, 41, 8,187,186,245, 73, 43,158,236, 70,116,227, 4,235,101,115,190,174, 21, 63, 71,205, 57, 46,171, 65,
-202,148,210,226,238,186,172,140, 26,137, 22, 72,214,166,147,175,216, 82,217,145,154,119, 26,136,213, 25, 62,160, 83, 85,119,117,
-203,213, 79, 16, 39,140,134, 83,143,199, 66, 92,157,250, 49,196,217,233, 34, 90,208,227, 36,169, 44, 23,213,109, 63,138,198,174,
-188, 66,195,150, 92,160, 1,243,207, 81,213, 54,227, 56,102,203, 6,171, 82,200,221, 52,226,233,229, 83,251, 29,222,141, 69,106,
-116,229, 24,180, 44, 94, 16,134,125,222, 10, 29,168, 35, 15,205,119,201, 87, 19, 46,125,109, 3, 74,116,234, 60, 15, 70,232,192,
-250, 50,152,223,125,210,236,240,252, 78, 25,220,175, 95,191,193, 60,168,161,131,142, 66,107,148,105,194,139, 92,219,185,121,127,
-236, 60,116,110,228,180,213,103,120,218, 25, 38, 8, 43,174, 81,131,193,219,168, 80,221,225,145,220,129,127,100, 66,166,173, 60,
-210,113,172, 83,200, 88,243,232,186,111,107, 23,242, 12,249, 81,179, 55, 92,216,171,109, 9, 30,156, 67, 30,185,107, 29, 90,100,
-200,115,215,214,205,231,173, 67,214,162,111, 29, 60,124,222,166,247, 40,250, 45,121,126,219,243,178,104,156,124,222,102,224,189,
- 93,230,252,154,166, 94,137, 41, 63,136,214, 67, 30,109,136,201,132, 47,222,125, 75,135, 47, 62,167,205, 60,101, 11, 62, 78, 91,
-246,155, 67,121, 74, 55, 33,158,212,251, 30, 44, 88,188, 18,132,175,161,120,242, 7,244,163, 67, 23, 49,245,196,109,142,245,188,
-203,171, 64, 84,250, 96,128,187, 80, 35,206, 92,230,108,182,174, 5,159, 53,236, 52,230,227,180, 53,231,249, 35, 16, 19,151,222,
-162, 54,227, 15, 80,158, 42, 61, 66,204, 29,243, 62, 67, 30,185, 10, 27,143,243,201, 49,116, 40,220,146, 36, 77,126, 61,121, 10,
-147,123, 73,147, 37,199, 36,164,134,146, 44, 67, 94,230,134, 96, 25,171,113,211, 56,229, 59,167, 28, 97,168, 28, 93,200, 35, 13,
-131, 49,186, 16,177, 88,202, 4,119, 33, 8, 22,146,134,192,190, 24,153,170,107, 23,102,176, 77, 62,156, 11,102,240,140,239,209,
-149, 81, 45,167, 52,234,144,227,134, 62,159, 57,115,134,120,129, 85, 90,186,116, 41,181,110,221, 58,140,143, 95,224,252,209, 75,
-132,228, 78,162, 36, 92,133,107, 13,160,118, 83,164,209, 35,151, 84,192,209,250, 66,195, 36,138, 35, 86,221, 37,144, 45,184,227,
- 12, 0, 84,215, 75, 50, 37, 91, 6,124, 57, 38,166, 46,207, 85,213,108,242,228,201,173, 92, 92, 92, 26,153,153,153, 97,196,133,
-174, 64,112,173, 50, 49,217, 33,147,128, 49, 14,158, 37, 46,122, 22,111,250,209,222,179,228,101,118,219,140,131,235, 70, 79,153,
- 53,158,103,235,149, 11,147,172, 1,156,214,242,239, 75,188,191,197,251, 83,188,159,203,169,157,167,167,167,174,246,211,122, 79,
-184, 17,165,121,180,120,175, 94,174,116,197,122, 87,129,101, 11,123, 13,101,214, 87, 15, 3,154, 38, 38,171, 94,153,120,113,241,
-124,100,235, 77,109,178,110,193,244, 41, 50,110,162, 87, 38,100, 68, 79,225,160, 26,224, 25,243,155,117, 67,125,122, 7, 45, 50,
-255, 79,184, 42,183,154, 64,237,135,175,161, 98,101, 42,208,231, 67,213,143,109,155,224, 61,193,197, 62, 5, 38,156,197,146, 74,
-154, 54,125,229,196, 96, 7, 88,216, 16,131,133, 41, 39,114,240, 94,223, 8,211,239,137,214, 55,215, 97, 32, 99,248, 46,149,149,
- 91,159,232,165,139,244,201, 81, 45,239,119, 50, 65,156,224,230, 26, 48,115,143,100,189,128, 37, 11, 36, 11,107, 50,118,155,180,
- 67,178,200,224,131, 3, 36, 11, 86,121, 61, 68, 11,247, 74,144, 36,185,121,211,204,185, 74,222, 41, 84,177,101,120,166,236,197,
- 46, 37, 74, 97,166,107, 97,102,217,120,178,245,106, 96,150,252, 85, 63,152,218,103,155,168,122, 17, 38,202,204,152,171,202,123,
- 19,123,143,184,172, 75, 40,137,202,151, 47, 95, 53, 14,185, 24,200,225, 18,131,121, 2,207,193, 11, 22, 44, 24, 92,161, 66,133,
-129, 28, 59, 87, 85,135,158,234,104,119,151,100,230,118, 94, 83,121,164,236, 61,126,215,127,102,114,245,217, 42,179,247,253,212,
-118,217,102, 40, 28, 10,106,211, 35,220, 74,146,137,117, 10,249,121,249,255, 90,135, 60,183, 19,143,128,244,211,182, 4, 15,206,
- 97,254, 39,185,107, 29,202,120,246,244,101,137,169, 59, 66, 44,248, 3,245, 41,223,255, 14,226, 50, 57,157,230,116,136, 63,164,
-215, 33, 22, 87,207,199,148, 78,253,196, 73, 94, 57, 37, 8, 6, 8,184, 97, 49, 93,147, 93,150, 66,239,245, 21, 78,229,188,142,
- 54,242, 77,108,153, 33,231,127,182,110, 69,246,112, 95,124,215,202, 69, 74,123,120,106, 27, 94, 56, 93,254,132,170, 6,148,229,
- 79,204,138, 37, 4,101,145,173, 31, 45,188,190,151,100, 92,228,255, 84,153,238,206, 41,171,150, 46,234,180,201,197, 49, 21,204,
-218,170,107, 23, 26, 90, 86,245,114,130,108, 13, 97, 43,209,125, 38, 46,129,112, 39,226, 63, 11,213,176,248,111, 12,225,194,108,
-191, 43,228, 40, 54, 70, 66,165,117,202,115,144,227,113,154, 26, 88, 80, 57,120,154,115,167, 90, 34, 58,238,201, 92,134,124, 57,
- 50,101,136,137,149, 69,171, 76,165, 69,139,247,245, 56,181,229, 84,131,147, 79, 92, 45, 90,184, 43, 70, 33, 42,103,134, 87, 47,
-168, 67,173, 73, 41,250, 46,214, 58,234,240,151,214,221, 80, 16,229,232,210,207,147, 25, 77,184, 50, 21, 14,168, 81, 62,215,125,
-159,236,214,165,249, 94,154, 22,230,214,219, 65,168,102, 72,154, 52, 41,230,137,106, 21,189,151, 83,252, 95,210, 70,152, 78, 5,
-228, 73,110,210, 48,253,202, 47, 41,167, 28,192,244,228,209, 87,206, 68,217,179,103, 47,198,207, 99, 83,254, 8,106,207, 46,254,
-166,188,166,170,143,230,119, 95,204,157,244,201,140, 75,177,255, 79, 96,120,189, 66, 94,183, 48, 10, 73,109,237, 66,141,114,145,
- 71, 75,254,159, 90,206,184, 84, 82,203, 53, 26,203,105,229,148,247,182, 45, 79, 49,129,209,143, 76,178,130,108,156,243,221, 54,
-224,158, 63,163,238, 6,220, 94,100, 85, 34,240, 51, 26, 66,200, 52,174,126, 9, 60, 5,158,198, 66,192, 16, 93,146, 27,172,109,
-136, 76,185,245, 16, 50,229, 34, 37, 47, 95,188,196, 19, 86, 75, 29,139,174,127, 87,115, 45,249,227,101,221,229, 53,171,222, 92,
- 63,163,238,122,111,250, 7,103,208,100,249,255, 37,197,253, 25, 13, 33,100, 26,183,233, 4,158, 2, 79, 99, 33, 32,116,201, 88,
- 72,126,147, 35,240, 20,120, 26, 11,129,248,162, 75,198,170,239, 31, 39, 7, 13,160, 41, 25, 82, 80,109, 50,116, 29,215, 39, 95,
-200,212,220, 46,113,109, 47,129,167,192, 83,174, 14,136,103, 83, 59, 2,114, 49, 84,205, 39,240, 20,120,106, 66,224, 95,214, 37,
- 37, 30,113,237,207,244, 61, 83,191,227,188,186, 69, 11, 49, 90,191,100,139, 47, 44, 90,148,211,184,234, 32,240, 20,120, 26, 11,
- 1,161, 75,198, 66, 82, 88,201,132, 46,253,249,186,100,220, 18,254, 94,105,191, 36, 16, 94,152,190,141,223,200,226, 69, 97, 92,
- 76, 5,158, 2, 79, 99, 33, 32,116,201, 88, 72, 10, 66,248, 47,235,146,113,181,232,247, 74, 19, 68, 75, 13,255,127, 89,177, 69,
-221,141,251, 48, 10, 60, 5,158,198, 66, 64,232,146,177,144, 20,228, 45,190,232,146,113, 91,252,215, 74, 19,174, 67, 61,120,199,
- 23, 37, 20,229, 52,238,131, 35,240, 20,120, 26, 11, 1,161, 75,198, 66, 82,144,162,127, 89,151,140,171, 69,255,136,180,127, 89,
- 97, 68,221,141,171,228, 2, 79,129,167,177, 16, 16,186,100, 44, 36, 5, 41, 18,186,100, 92, 93,138,207,210,148,174, 66,229, 68,
-165,194,117, 40, 92,135, 49, 8,136, 23,133,113, 31,109,129,167,192,211, 88, 8, 8, 93, 50, 22,146,130, 16,198, 23, 93, 50,110,
-139,255, 90,105,234,196, 42,246,127, 94,127, 74,185,192,171, 66,245,247,175, 45,163,184,155, 64, 64, 32, 32, 16, 16, 8, 8, 4,
- 4, 2,255, 42, 2,241,156,139,168, 90,178, 64,178, 98, 79,239,128,202, 41, 43, 40,136,214,191,170,226,162,222, 2, 1,129,128,
- 64, 64, 32, 32, 16,248,125, 8,252,213, 92, 68,149,100, 9,162,245,251,148, 76,220, 89, 32, 32, 16, 16, 8, 8, 4, 4, 2,255,
- 42, 2,127, 53, 23,137,231,230,186,127, 85, 39, 69,189, 5, 2, 2, 1,129,128, 64, 64, 32,240,215, 32,240, 87,115,145,191,186,
-114,127,141, 10,138,138, 8, 4, 4, 2, 2, 1,129,128, 64,224,239, 69, 32,158,115, 17,221, 49, 90,127,111,179,137,154, 9, 4,
- 4, 2, 2, 1,129,128, 64, 64, 32, 32, 16,248,233, 8,232, 30,117,248,211,111, 47,110, 32, 16, 16, 8, 8, 4, 4, 2, 2, 1,
-129,128, 64,224,239, 69, 64,125,102,248, 95, 54,143,214,223, 11,169,168,153, 64, 64, 32, 32, 16, 16, 8, 8, 4, 4, 2, 2,129,
-223,140, 64,124,153, 36, 77,148,211,184,138, 34,240, 20,120, 26, 11, 1,161, 75,198, 66,242,155, 28,129,167,192,211, 88, 8,252,
- 12, 93, 50, 86,217,126,135, 28,101,140, 22,238,253,253, 60, 90, 63,177, 68, 63,163, 33,132, 76,227, 54,152,192, 83,224,105, 44,
- 4,132, 46, 25, 11, 73, 65,138,132, 46,253,155,186,100,220, 90,255, 90,105, 74, 87,161,250,254,167,151, 66, 60, 44,198,133, 88,
-224, 41,240, 52, 22, 2, 66,151,140,133,164, 32, 69, 66,151,132, 46, 25, 23,129,248, 41,237,183, 5,195,139, 7,208,184, 10, 35,
-240, 20,120, 26, 11, 1,161, 75,198, 66, 82, 16, 45,161, 75, 66,151,140,139,128,144,102, 16, 2,226, 1, 52, 8, 46,189,153, 5,
-158,122, 33, 50, 40,131,192,211, 32,184,244,102, 22,120,234,133,200,160, 12, 2, 79,131,224,210,155, 89,224,169, 23, 34,131, 50,
-252, 12, 60, 13, 42,128,200, 44,190,242,126,134, 18, 10,153,198,125,178, 4,158, 2, 79, 99, 33, 32,116,201, 88, 72,138,190,227,
- 95,214, 37,227,106,209, 31, 36, 13,141,170, 41, 25, 82, 68,109, 50,116, 29,215, 39, 95,200,212,220, 46,113,109, 47,129,167,192,
- 83,174, 14,136,103, 83, 59, 2,114, 49, 84,205, 39,240, 20,120,106, 66,224, 95,214, 37, 37, 30,113,237,207,244, 61, 83,191,227,
-188,114,212,161,234, 12,241,191,164, 28,255, 50, 51, 23,117, 55,174,138, 9, 60, 5,158,198, 66, 64,232,146,177,144, 20,214, 39,
-161, 75,198,213,165,248, 44,237,151,143, 54, 84,101,171,198, 6, 78, 40,182,113, 17, 21,120, 10, 60,141,133,128,208, 37, 99, 33,
- 41, 8,140,208,165,127, 83,151,140, 91,235, 95, 43,237,183,205, 12, 47, 30, 22,227, 54,180,192, 83,224,105, 44, 4,132, 46, 25,
- 11, 73, 65,138,132, 46, 9, 93, 50, 46, 2, 66,154, 65, 8,136, 7,208, 32,184,244,102, 22,120,234,133,200,160, 12, 2, 79,131,
-224,210,155, 89,224,169, 23, 34,131, 50, 8, 60, 13,130, 75,111,102,129,167, 94,136, 12,202,240, 51,240, 52,168, 0,127, 88,102,
- 49,143,150,158, 6,249, 25, 10, 35,100, 26,247, 41, 16,120, 10, 60,141,133,128,208, 37, 99, 33, 41,172,121, 66,151,140,171, 75,
-241, 89,154,152, 25, 94, 16, 45,173, 8,136, 23,133,113, 31,109,129,167,192,211, 88, 8, 8, 93, 50, 22,146,130, 16,198, 23, 93,
- 50,110,139,255, 90,105,250, 99,180,182,109,219, 70,191,182, 76,226,110, 2, 1,129,128, 64, 64, 32, 32, 16, 16, 8, 8, 4,254,
-143,192, 95,203, 69,148, 21,251,107, 43, 40,180, 88, 32, 32, 16, 16, 8, 8, 4, 4, 2, 2,129, 63, 26,129,120,206, 69, 84,231,
-207,130,117, 11,255,191,103,144,130,104,253,209, 58, 40, 10, 39, 16, 16, 8, 8, 4, 4, 2, 2,129,191, 22,129,120, 78,180,116,
- 7,195,199,243,202,253,181, 74, 39, 42, 38, 16, 16, 8, 8, 4, 4, 2, 2,129,127, 5,129,120,206, 69, 68,140,214,191,162,168,
-162,158, 2, 1,129,128, 64, 64, 32, 32, 16,136,175, 8, 8,207, 90,124,109, 57, 81,110,129,128, 64, 64, 32, 32, 16, 16, 8, 8,
- 4, 4, 2, 63, 15, 1,253, 22,173,159,119,111, 33, 89, 32, 32, 16, 16, 8, 8, 4, 4, 2, 2, 1,129,192, 63,129,128,122,172,
-214, 63, 81,105, 81, 73,129,128, 64, 64, 32, 32, 16, 16, 8, 8, 4, 4, 2, 63, 27,129,223, 66,178,226,203, 36,105,162,156,198,
- 85, 63,129,167,192,211, 88, 8, 8, 93, 50, 22,146,223,228, 8, 60, 5,158,198, 66,224,103,232,146,177,202,246, 59,228,252, 54,
-215,225,207,104, 8, 33,211,184, 42, 36,240, 20,120, 26, 11, 1,161, 75,198, 66, 82,144, 34,161, 75,255,166, 46, 25,183,214,255,
-136, 52,241,176, 24,183,161, 5,158, 2, 79, 99, 33, 32,116,201, 88, 72, 10, 82, 36,116, 73,232,146,113, 17,136,159,210,196,162,
-210,122,218, 77,188, 40,140,171,216, 2, 79,129,167,177, 16, 16,186,100, 44, 36, 5, 33, 20,186,244,231,235,146,113, 75,248,107,
-165,137, 69,165, 5,209,210,138,128,120,249, 24,247, 97, 20,120, 10, 60,141,133,128,208, 37, 99, 33, 41, 72,102,124,209, 37,227,
-182,248,175,149, 38, 98,180, 4,209, 18, 68, 75, 3, 2,241,229,229, 35,202,105,220, 23,166,192, 83,224,105, 44, 4,132, 46, 25,
- 11,201,191, 92, 14, 20, 69, 83, 50,164,218,218,100,232, 58,174, 79,190,144,169,185, 93,226,218, 94, 2, 79,129,167, 92, 29, 16,
-207,166,118, 4,228, 98,168,154, 79,224, 41,240,212,132,192,191,172, 75, 74, 60,226,218,159,233,123,166,254,132,243,191,108,170,
- 7,193,246,141,219,220, 2, 79,129,167,177, 16, 16,186,100, 44, 36,133, 91, 74,232,146,208, 37,227, 34,240,119, 72, 19, 68, 75,
-173, 29,197,139,194,184,138, 45,240, 20,120, 26, 11, 1,161, 75,198, 66, 82, 16, 66,161, 75,127,190, 46, 25,183,132,191, 86,154,
-136,209,210,131,183,120, 0,141,171,144, 2, 79,129,167,177, 16, 16,186,100, 44, 36, 5,209, 18,186,244,231,235,146,113, 75,248,
-143, 72, 19,138,109,220,134, 22,120, 10, 60,141,133,128,208, 37, 99, 33, 41, 8,140,208, 37,161, 75,198, 69, 32,126, 74,179,227,
- 98,195,170,165,220,231,254, 85,213, 16, 15,160,113,145, 22,120, 10, 60,141,133,128,208, 37, 99, 33, 41,136,150,208, 37,161, 75,
-198, 69, 32,126, 74, 19,243,104, 9,215,161, 86, 4,196, 75,210,184, 15,181,192, 83,224,105, 44, 4,132, 46, 25, 11, 73, 65,134,
-227,139, 46, 25,183,197,127,173, 52,221, 49, 90,219,182,109,163,232,228,251,107,203, 37,238, 38, 16, 16, 8, 8, 4, 4, 2, 2,
- 1,129,128, 64, 64,161,248,171,185, 8, 42,135, 70, 86,238, 69,131, 11, 4, 4, 2, 2, 1,129,128, 64, 64, 32, 32, 16,248,149,
- 8,252,213, 92,228,175,102,145,191, 82, 75,196,189, 4, 2, 2, 1,129,128, 64, 64, 32, 32, 16,136, 19, 2,127, 53, 23, 17,150,
-172, 56,233,132,184, 72, 32, 32, 16, 16, 8, 8, 4, 4, 2, 2, 1, 35, 33, 16,207,185,136,250,168,195,216, 19,150,198,243,202,
- 25,169,137,133, 24,129,128, 64, 64, 32, 32, 16, 16, 8, 8, 4,126, 23, 2,241,156,139,168,143, 58,252, 93, 48,138,251, 10, 4,
- 4, 2, 2, 1,129,128, 64, 64, 32, 32, 16,248,235, 16,248,109, 51,195,255,117, 72,138, 10, 9, 4, 4, 2, 2, 1,129,128, 64,
- 64, 32, 32, 16, 16, 8, 8, 4, 4, 2, 2, 1,129,128, 64, 64, 32, 32, 16, 16, 8,252, 58, 4, 84,173, 90,191,236,174,241,101,
-146, 52, 81, 78,227,170,132,192, 83,224,105, 44, 4,132, 46, 25, 11,201,111,114, 4,158, 2, 79, 99, 33,240, 51,116,201, 88,101,
-251, 29,114, 98, 7,191,127, 91,142,231,151,108, 63,163, 33,132, 76,227, 54,157,192, 83,224,105, 44, 4,132, 46, 25, 11, 73, 65,
-138,132, 46,253,155,186,100,220, 90,255, 90,105,130,104,233,193, 91, 60,212,198, 85, 72,129,167,192,211, 88, 8, 8, 93, 50, 22,
-146,130,188, 9, 93,250,243,117,201,184, 37,252,245,210,132,235, 80, 7,230,226, 1, 52,174, 66, 10, 60, 5,158,198, 66, 64,232,
-146,177,144, 20, 68, 75,232,210,159,175, 75,198, 45,225, 63, 34, 77, 40,182,113, 27, 90,224, 41,240, 52, 22, 2, 66,151,140,133,
-164, 32, 48, 66,151,132, 46, 25, 23,129,248, 41,237,151,197,100,169,195, 35, 30, 64,227, 42,140,192, 83,224,105, 44, 4,132, 46,
- 25, 11, 73, 65,180,132, 46, 9, 93, 50, 46, 2,241, 83,154,206, 9, 75,241,144,104, 74,134, 84, 85,155, 12, 93,199,245,201, 23,
- 50, 53,183, 75, 92,219, 75,224, 41,240,148,171, 3,226,217,212,142,128, 92, 12, 85,243, 9, 60, 5,158,154, 16,248,151,117, 73,
-137, 71, 92,251, 51,125,207,212,239, 56,255,219, 38, 44, 21, 95, 58,198,109,110,129,167,192,211, 88, 8, 8, 93, 50, 22,146,194,
-162, 37,116, 73,232,146,113, 17, 16,210, 12, 66, 64, 60,128, 6,193,165, 55,179,192, 83, 47, 68, 6,101, 16,120, 26, 4,151,222,
-204, 2, 79,189, 16, 25,148, 65,224,105, 16, 92,122, 51, 11, 60,245, 66,100, 80,134,159,129,167, 65, 5,248, 27, 51, 91, 39, 78,
-156,184, 95,202,148, 41,103,113,242,227,223, 19,184,146,150,122, 42,250, 93, 67,152,152,152,116,178,181,181,189,193,233,105,134,
- 12, 25,118,164, 78,157,170,139, 75,114, 69, 81,150,147, 68, 38,104,186, 26, 55, 33,203,112,231,212,133,203,120, 61, 69,138, 20,
- 15,249,247, 50,252,231,100,165, 67,190, 94,133, 25,110,175,168,121,165,115,213, 77,216,171,201,169,104, 99, 99,115,148,143,149,
- 81, 59,174, 87,166,182,242,212, 75,165, 40, 85,203, 68,241, 24, 9,191, 85,242, 25, 36, 51,117,234,212,141,236,236,236, 78,166,
- 77,155,246, 25,239,143, 51, 30,181, 52,220, 83,151,204,116, 92,183,241,142,142,142,183,236,237,237,167,240,181, 88,157, 92,206,
-102, 80, 57,229, 8,228, 60,122,101,250, 36, 87,248, 20, 76,174, 8, 44,148, 76, 17,236,157, 76, 49,139,247,165, 75, 43, 20,169,
-226,216,238, 69,248,186,117,102,102,102, 23, 88,215,183,241,239, 26,156,160, 95, 53,240, 31,199,113,158, 19,242,169,110,122,203,
- 25, 45,103, 60,239,159,113, 26, 21,253,191, 35,227, 28,156, 35, 71,142,135,156, 22,185,186,186, 54,150,219,238,169, 82,165, 42,
-205,215,174,231,231,233, 97,161, 66,133,222, 58, 56, 56,220, 76,159, 62,253,226,228,201,147, 23,139, 99,221,101, 54,201,119,217,
-228,212,221, 80,217, 66,166,161,136,233,206, 47,240, 20,120, 26, 11,129,159,161, 75,198, 42, 91,188,147, 83,153, 75, 60,154,211,
-244, 75,151, 46,249, 19,145,148,240,155,143,205,226, 52, 70, 71, 39, 24,171, 33,184,195, 31, 58, 98,196,136,207, 47, 94,188,160,
-192,192, 64,186,117,235, 22, 77, 30,208, 59,170,108,154,196,228, 98,109, 25,202,100,224,110,198,244,233, 87,101, 51, 77,216,155,
-101,102,214,130,148,182,198,181,100,114,117,122,192,128, 1, 33, 71,143, 30, 13,249,250,245,107, 72, 84, 84, 84,200,243,231,207,
- 67,246,237,219, 23,226,237,237, 29,194,242,186,114, 74,164, 65,174, 94,133, 25,102,175, 56, 76, 11, 6, 18,246,170,215,103,205,
-154,245, 26,223,135,106,214,172,249,133,143, 59,200,237, 28, 53,213,141, 47, 78,145,205, 76, 97, 81,203, 84, 17, 16,177,120, 56,
-209,204, 30, 4,178, 21, 23,153,233,210,165,219,220,169, 83,167, 15,207,158, 61,163, 47, 95,190,208,227,199,143,169,117,235,214,
-239,249,248,114,181,123,107,171,123,218,236,217,179, 7,156, 60,121, 50, 42, 40, 40,136, 14, 29, 58, 20,229,229,229, 21,192,215,
-202, 33, 91,177,100,242, 61,231, 50, 81,219, 97, 72,226,107,230,203, 44,103, 76,182, 2,201, 21,143,195,252, 15, 18,157,221, 67,
- 91,106, 22,162,201,121,211, 83,141, 52,201,130,138, 36, 83,116,244, 85, 40, 18, 27,208,238,181,125,125,125, 63, 94,190,124, 57,
-242,205,155, 55,116,237,218,181,168,150, 45, 91,126,230,235,175, 98,143,255, 56,142,243,200,199,199, 91, 24,208, 70, 32,107, 11,
-135, 12, 25,194,143, 17, 17, 63, 15,196,196,138, 74,148, 40, 65, 33, 33, 33, 56,244,144,211,162,136,136,136,166,114,100,154,155,
-155, 55,226,118, 14, 9, 13, 13,149,228, 97,131, 62,162,205,166, 79,159,254,145, 63,104,118,176, 28, 77, 31, 25,122,117, 62, 14,
-111, 42, 33, 51, 14,160,233,184, 68,224, 41,240, 52, 22, 2,241, 69,151,140, 85,223,223, 33, 7,125,163,106,156,150,156,190, 82,
- 42,103,253,222,189,123, 43, 73,213,206, 34, 69,138,156,105,218,180,169, 63, 18,255, 62,196,231,119,159, 59,119,206,191, 87,175,
- 94, 32, 93,245,245,116,100,150,133, 11, 23, 14,122,249,242, 37,101,201,146,133, 50,101,202, 68,248,141,237,108,237, 60,180,223,
- 67, 65, 79,142,236,164, 61, 27,215, 81, 75,187,196,228, 99,103, 30,110,103,107,251,198,202,202,106, 36,203, 77,160,167,211,169,
-238,225,225, 17,124,245,234,213,144,219,183,111,135, 12, 29, 58, 52,132, 59,174, 16, 38, 10, 33, 53,106,212, 8,153, 54,109, 90,
- 72, 88, 88, 88,200,252,249,243, 67,216, 18,113,149,101,169,147, 45,189, 74,168,141,104,177,117, 99, 42,147, 78,186,123,247, 46,
-177, 92, 88, 41,148,155,186, 76,115, 11, 11,139,114,150,150,150, 93,177,231, 76,230,200,152, 69,161, 48,205,105,174,200,208, 49,
-167, 75,214,109,245, 75,101,158, 94, 42, 95,158, 90,169, 19, 6,133,207,232, 65, 84, 51, 67,156,136, 22, 58,223, 46, 93,186, 4,
-131, 96,161, 3, 70, 7,142,125,112,112, 48,213,175, 95,255, 3, 91,182,170,235,235,196, 25,247,225, 71,142, 28,137, 64, 27,241,
-158,118,236,216, 65, 51,103,206,140, 98, 2, 52, 73,134, 6,199,170, 59,119,246,123,247,236,217,227,127,254,252,121,255,211,167,
- 79,251,135,135,135,251,115,123, 72,105,219,182,109,254, 27, 54,108,240, 95,189,122,181, 63,147, 99, 41,113,185,253,157,157,157,
-119,169,221, 71,111, 27,229, 79,174,120,242,245,232, 22,162, 73,237,233,253,216,182, 20,212,173, 2,189,106, 93,148,102,229, 75,
- 79, 69, 83, 42,182,170,233, 17,196,107,148,153, 36, 73,146,195, 15, 31, 62,140,234,219,183,239, 87, 79, 79,207,247,205,155, 55,
-255, 12, 44,177, 97,143,255, 56,142,243, 15, 30, 60,136, 98, 29,216,167, 15, 79,149,243, 99,148, 36,235,240,225,195, 49,228, 8,
- 63,208, 78,172,183,146, 69,203,201,201,169,129, 62,153,166,166,166, 85,251,244,233, 35,177, 51,245,141, 49,150,218, 27,229,227,
-103,237, 57,203, 74,107, 40,158, 50,218, 89, 61,139,222, 54, 18, 50, 13, 66, 64,224,105, 16, 92,122, 51, 11, 60,245, 66,100, 80,
-134,159,129,167, 65, 5,248,195, 50,199,105,102,248, 82, 32, 80,176, 94,245,239,223, 31, 68, 10,150,173,164,156, 76,163, 19, 44,
- 4,245,248, 69, 47,229, 1, 33,139,206,163, 90,119,213,134,168,188,118,237,218,176, 41, 83,166, 16,187,163,136, 59, 95,154, 58,
-117,170,244,245,253,114,219,114,137,104, 93,239,215, 68,234, 47,110,141,236, 32,253,191, 55,123, 24, 53,108,216, 48,148, 93, 35,
-170, 36, 78,189,113,211,228,201,147, 39,248,211,167, 79, 33,139, 23, 47, 14,225,188,103,185, 0,158,156,146, 68,119,172, 40,111,
- 99,238, 24, 63, 92,185,114, 37,100,229,202,149,176,108, 13,149,217,233,192,170, 86,156,221,157, 53,250, 56, 36,185, 13,139, 86,
- 31, 27,197,101, 62,230,197,201, 58, 90,134, 61,215, 93, 42, 55,187,111,142,104,233, 28,205,153,244,245,102, 18, 56,152, 59,192,
-193, 76, 56, 6,187,185,185,245,173,226,108, 87,104, 83,253,210,185,223, 15,107,155,155, 38,118,203, 62,161,124,254, 82,171,234,
- 22,171,223,204,201,234,104,243,116, 41, 66,235,152, 39, 10,142,139,235,144, 93, 71,167, 97,193, 82,146, 43,116,184,176,108,221,
-191,127,159,216,218, 71,108, 57,220,175,175, 19,231,246,185, 6, 25,179, 39, 79,166,154, 94, 89,169,168, 69,106,242,181, 76, 77,
-121, 77, 83,124,244, 80, 40,242,234, 81,240,239,136,214,133, 11, 23,160, 31, 82, 98,107,144,148,222,189,123, 23,115, 12,199,223,
-191,127, 47, 37,144, 45, 23, 23, 23,131,137,150,119, 10,133,119,129, 20,138,183,133,146, 43, 62, 85,118,176,122,222,214,217, 42,
-242, 84,253, 66,244,174,125, 9,154,146,219,129, 96,217,146,217,238,149,147, 37, 75,134, 15,137, 30,156, 64,202,155,148, 43, 87,
- 78, 50, 25, 97,143,255,209,199,187, 68,147, 44, 16,103,229,166,235,229,147,144, 93,130, 31, 33, 7,150, 44,190,224, 4,254,195,
-162,133, 4,215, 97,180,108,117,120, 53,202,204,156, 57,243, 45,214,251, 24, 2, 8, 43, 22, 91,112,233,222,189,123,196, 31, 29,
-116,246,236, 89, 98,194, 72,107,214,172,137,100,114,191, 93,102,221,245, 52,173,206,211, 63,227,197, 43,100,254, 72,139,124,127,
-173,192, 83,224,105, 44, 4,126,134, 46, 25,171,108,191, 67,142,254, 81,135,108, 89,192,139, 95,117, 27, 11,107, 21,136, 20, 31,
-212, 53, 17, 87, 43, 16,177,104, 87, 34, 92,140, 26, 55,238,252,231,195, 85,216,164, 73, 19,114,119,119,151, 18, 91,198,136, 59,
- 86, 10,185,115, 69, 34, 86,103,235,228,149, 58,141,224,235,231,165,255,254, 13, 11,211,197,139, 23,137,227, 77,246,232, 64,109,
-235,241,227,199, 3,151, 47, 95,254,146,243, 32, 30, 11, 4,171, 32,167,169,236, 74, 92,200,123,184, 11, 51,113,178,100, 75,218,
- 91, 38, 31, 33,236,230, 3,217,202,160, 67,166, 47,151,239, 46, 91,192,232,213,171, 87,244,246,237, 91, 26,231,237, 70, 32, 90,
- 35,242,102,138,154, 61,123,246,151, 30, 61,122,124, 76,147, 38, 13, 98,119,236, 89, 94, 4,202, 93,180,104, 81,184,214,190,219,
- 96,193, 2,201,250,252,249,243, 96,238, 12, 7,179,188,193, 91, 54,109, 26, 92,214,203,173, 9, 72, 22,200, 86,121, 7,203, 26,
-147,202,228,107,243,172,111,139,154,253, 11,123, 94,255, 60,166,243,193,218,206, 54,170, 22, 50,217,138, 99,109,109,253, 2,150,
- 23,190,224,187, 4,203, 27,187,112, 85,221,145, 26,229,114,221,250,119,169, 87, 55,178,122, 38, 7,186, 59,101, 0,133,239, 93,
- 73,225, 59, 22,211,157,177,221,168,138,173,213,135,130, 73, 19,246,145, 91, 32, 88,180, 96,201,226,252, 49, 68, 11, 36, 75, 19,
-209,250,240,225,131, 68,180,152,128,168, 19, 45,185,183,139,201, 87, 48,153,194,197, 55,101,162,179,231,155,248, 80, 96,219, 18,
- 84,206, 60, 9, 98,246,226,186,213,227, 11, 65,190, 26, 26, 40, 0,174,194, 49, 74, 66, 53,118,236, 88, 73,199,241,159,143,227,
- 92, 92, 55,115,118, 91,223,111,209,162, 69, 4, 91,115, 95,177,107, 60,232,204,153, 51, 4, 43, 25,172,143,235,214,173, 35,254,
-176,144, 8, 54,158,187,138, 21, 43, 6,241,141,124,227,122, 51,113,157, 64, 64, 32, 32, 16,248, 21, 8,104,224, 34,191,226,182,
- 63,255, 30,202,138,169, 84,208,156,239, 58,141,211, 78, 78,232, 96,176, 37,200,158, 72, 81,187, 68,202,196, 23,145,240, 27,199,
-162,207, 85,225, 61, 92, 51, 83, 57,217,106, 42, 49,199,231,220, 65, 92, 11,199,180, 80,193,130, 5,165, 84,172, 88, 49, 41,150,
- 36,232,246, 21,218,149, 85, 65, 71,171,101,151,172, 48,175,174,250,211, 86,119, 5, 29,168,226, 69, 1, 1, 1,196,238,170,251,
- 90, 80,200, 89,167, 78,157, 27,236,114,185,198, 86, 26,116,226,201, 56, 45,251,239,191,255, 66, 78,156, 56,113, 56, 50, 50,114,
- 60,127,217,183,225,216,162,118,124,156, 13, 49,138,242, 99,198,140, 9,225,122,130,104,193, 42,161,105,243,226, 78, 41, 20,174,
- 23,144, 21,118,105, 17, 44, 86, 61,179,164,137, 2,209, 26,144,205, 54,114,198,140, 25,193,155, 54,109,122,183,108,217,178, 64,
- 38, 87, 79,149, 22, 45, 38,147, 8,138,255,110,131,187,144,201,131, 68,178, 64,184, 56,222, 73, 74, 54,105,210,244,134,219,208,
- 61,133,162,192,178, 26,197, 90,177, 85,171,105,187, 92,206,253, 87,213, 46,249,246,253,176,118, 55,189, 82, 72, 65,252, 6,111,
- 92,142, 83, 79,159, 62, 37,190, 39,193,226,193,228,133,128,253,235,215,175,165,142, 88,205,162,165, 81,190,147, 66,225, 93, 41,
-189, 77, 84,248,158, 21, 68, 19,218, 18,181,202, 79,212, 50, 31,209,176,134, 20, 48,115, 0,229,178,179,249, 98,150, 58,245, 59,
- 38,145,115, 89,128,171,174, 66,130,104,193, 93,168,180,100,113,222, 24,210,197,152, 72, 86, 44, 16, 44,110,103,127,118,153,249,
-207,155, 55,207, 40, 68, 11,101,242, 78,169,200, 61, 58,159, 51,189,239, 89,133, 58, 56, 89, 82, 62, 83, 69, 26, 29,101, 45,193,
-110,195,181, 76, 50, 65,236,219,115, 50,193, 30,255,113,156,127,151, 48,184, 49,152,100, 41, 93,133, 74,247, 30,254,179, 28,196,
- 54, 42,183,118, 76,126,183, 37, 76,152,112, 30, 31,168,192,169, 28,183, 81, 73, 61,247,106,182,112,225,194,107,115,230,204,185,
-198,249, 10,113,114,129,107,158,173,186, 52,113,226, 68, 98,253,151, 62, 98,110,222,188, 73, 28,103, 71, 11, 22, 44, 32,118,155,
-163,173,196, 38, 16, 16, 8, 8, 4,254, 72, 4, 52,112,145, 63,178,156, 90, 10,165,219,117,168, 94, 57,118,191, 77,241,231,141,
-221, 25,123, 89,160,244,213, 13, 98, 53,196, 39,215,199,224,229, 19,233,253,220, 33,212, 59,119,150,143,209,100, 11,167, 19,230,
-205,155,247, 56,174,225,145, 78, 24, 69,245,221,198, 68,235, 54, 58,251,234,213,171,195,253, 66,229,203,151, 39,142,159,146,172,
- 69, 79, 46,156,161,117, 89, 20,180,189,172,155,228,250,184,123,250, 24,173,116, 85,208,230, 50,110,146, 27,132, 59,224,123, 90,
- 42,214,141, 3,221, 15,143, 26, 53,234, 0,159,175,197, 41, 47, 91,204, 16, 24, 28, 50,108,216,176, 93,101, 93,157, 22,213,181,
- 72,242,186,126,218,228,175,220,147, 40,166,240,249, 84,124,239, 16,182,164,132, 36, 72,144, 64,163,197,132,173, 96,199, 17, 43,
-195,174, 46, 88,210,174, 68,203,117, 30,106,167, 56, 34,185, 14,109, 21,151,248, 88,103,118, 87,222,226, 14,237, 25,239,195,208,
-145, 61,122,244, 8,157,167, 70,139, 30, 44, 90,156,103, 16,187,113, 6,179,181, 97,240,132, 9, 19,198,178, 5, 98, 39,199, 65,
-157, 74,107,158,122,200,152, 82,121, 59,211,132,238,173, 64,182, 60, 83, 40, 38,220,235,221,148, 14,182,168,250,213, 61,165,212,
-233, 26,188,241,104,195,186,173, 90,181, 10, 6,222, 76,236, 36,119, 33,226,172,224, 74, 98,220,131,217, 45, 6, 55,176,206,173,
- 72,138,196,155,110, 77,238, 79, 52,177, 29, 81, 3,247,152,244,185,174, 27,141,110,255, 31,157,226, 58,131, 36,115,236, 85, 20,
-143,118,131,203,139,195,205, 52,111, 32, 90,136,199,210,230, 46,100,215,230, 65, 38, 90,219, 56, 46,107, 35,235,220, 70, 38, 5,
-219,216, 45,134, 17,125, 63,188,249, 36, 85,100, 27, 93,208,149,222, 15,168, 71,157,178, 88,235, 34, 90,181,235,214,173, 27,200,
- 49,105,193, 92, 47,196,245,189,227, 88,182,123,216,227, 63,142,227, 60, 23, 72,117, 52,160,222,242, 41, 93,133,176,100,193, 61,
- 24,109,201,130, 46,194,245,222,145,255, 31,235,208,161,131, 63,127, 20,248,179,238,251, 51,137,223,202, 46,245,193, 76,202, 42,
-233, 17,190,144,243, 95,171, 92,185, 50,136, 86, 70,228,101,139,237,235,145, 35, 71,210,174, 93,187,136,131,233, 9,100, 27,109,
- 14, 11,215,129, 3, 7,136, 99,186,144, 87,108, 2, 1,129,128, 64,224,143, 68,224, 47, 33, 90,154,103,136, 87,175, 28,127, 93,
- 47, 69,220, 21, 19, 33, 88, 30, 16,151,165,128, 21,235,195,210,241, 68, 93, 74,210,135,214,222,116,177,107, 77,194,177,232,214,
- 74, 90,171, 86, 45, 41, 86, 11,215,106,106, 65, 38, 90,115, 16, 55,130,142,128, 3,178,165,196, 4, 73, 10,136,191,114,120, 31,
- 45,114, 81,208,154, 18,174,116,253,250,117, 58,189,117, 29,205,115, 86,208,250, 90,222,196, 68, 10, 22, 24,109,174,195, 9, 76,
-112,214,214,174, 93,123, 21,223, 19, 49, 83, 11,248,127, 72,199,142, 29, 97,177,106, 92,195, 68,241,130, 78,237, 32,154,209,141,
-170,154, 36,120,197,199,146,176,155, 5,193,195, 33,220,233, 60,208, 84, 78, 38, 98, 82,212, 51,143,228,138,226,243,169,149,121,
- 52, 4,195,155, 51, 41,219,199, 1,209,146,161,130, 93, 56, 32, 90,176, 44,104,218,204, 57,230,168, 55, 19,136,193,227,121, 99,
-203,195, 3,182, 44, 61,101, 66,120,241,228,137, 19,103, 61,178,184, 30, 7,217,114, 75,165,200, 86,204,198,100,119,212,132,238,
- 52,190,100, 30,114, 53,253, 46,128,249, 59,217, 5,146, 36,106, 81, 44, 69,226,243, 62,201, 19,190,224,189,127,190, 36,137,254,
- 67, 38, 38,167,107, 27, 55,110, 28, 12,146,133, 96,125, 14, 56,167,170, 85,171, 6,243,113,184, 83,245,110,133,146, 37,122,250,
-105,243, 92,162, 54,133, 98, 72,214,215,122,110,116,184,154, 23, 93,187,122, 69,178,150,192,218,136,246, 99, 43, 74, 20, 7,224,
-171,143, 18,140,185,135,146,104,105,112, 23,158, 6,193,226,180,148, 93, 92,179,178,101,203, 54, 41, 95,190,124,147,198,141, 27,
- 55,139,241,154,174,183,144,250, 51, 36, 44,146, 92,177,248,104,235,138,244,126,196,127, 84, 57, 77, 10, 76,167,160,113, 99,114,
-186,135, 73,127, 8,199, 78,189,109,208,160,193,107,140, 90,133,158, 96,143,255, 56,142,243,172, 55, 91,244,223,246,255, 57,212,
- 98,178, 84,173, 88,221,217,178, 21, 51,138, 23,131, 1, 56,126,209,159,113,216,202,247, 29, 60,104,208, 32, 93, 68, 43, 21,147,
-182,203, 92,182,107, 40,119,244,221,152,243,231,249,138,231, 7, 27, 62, 22, 16,147, 7,130,197,110,117,201,146,201, 49, 96, 26,
- 93,219,134,212, 71,228, 21, 8, 8, 4, 4, 2, 63, 11,129,191,128,104,169,199,105,197,134, 74,213, 47,170, 36, 90, 32, 79,156,
- 43,134,104,189,155,210,131,222,181, 40, 72,231,107,122,209,198, 90,133, 98, 17, 45,144, 50, 93, 68,139,229,148,247,243,243, 11,
-223,189,123, 55,181,107,215, 78, 74,108, 13,145, 44, 86,187, 38, 15,167,233, 78, 10, 90,215,166, 22, 33,206,100,231,232,190,180,
-186, 70, 33, 58,188,100, 14,241, 23,251,231,164, 73,147, 86,211,212,176,108,153,153,202,150,128, 25,185,115,231,158,194,231, 19,
-113,103,255, 12,125, 12, 7,190,131,104, 37,172,110,162,120, 69, 51,186, 75,163,247,170,164, 82,160,147,177,172, 80,161, 66, 8,
- 19, 4,156, 95,160, 73, 38,187, 87, 46,179,245, 69,234,160,248, 55,172, 94, 8,252, 78,218,207, 86,113,236,194,224,150,212,203,
- 70,113,134,255,151,102,119,224, 78, 4,243,243,253,105,243,230,205,176,126,125,229,227,170, 35,197,212,197, 75,163, 14,217, 13,
-181,133,131,225,239,124,252,248,241, 34,220,102, 32, 31,107, 86,175, 62, 11,203, 22, 95,144,160, 75,110,215, 16,154,216,157,154,
-184,165,215, 27, 79, 84, 52, 89,162,109, 83, 74,228, 14, 14,153, 55,148,232,240, 6, 10,153,214,147, 38,120,103,253,224,155, 34,
-209,102,220,156,203, 95,139,203,117,152, 99,182,158,114, 39,123,144, 73,130, 94, 75, 22,174, 75,148, 40, 81,197, 92,153, 50,134,
- 62, 95, 48,154,168,117, 65,137,104,189,175,157,133,238, 86,118,166, 89, 77,170,196,144, 44,196, 0,161, 13,145, 88, 54,172, 61,
- 26, 55, 16, 45,140, 46,228,147, 82, 82,113, 23,110, 99, 18, 61,143,221,133,163,121,112, 64, 31,206,211,153, 7, 76,116,222,184,
-113, 99, 31, 30, 41,215,255, 71, 30,230,252,169, 20,233,138,166, 76,176, 97,101,189, 18,193, 33,211,123, 69,109,111, 84,138,188,
-147, 43,134,235,144, 89,137,219, 6,150,209,206,156, 74, 49,121, 15,132, 46, 97,143,255,156,218,114,251, 29,228,189,161, 86,198,
- 49, 8,124, 87,137,203,146,138, 0, 75, 22,158, 23, 38,149,254,172,175,103,217,109, 56,152, 15,215,227,253, 88,198, 4,174,110,
-173, 22, 66, 62,231,203, 4,255,204,254,253,251, 47,241,111,224,212,165,109,219,182,215,150, 44, 89, 18,200,100,245, 51, 95,255,
-130, 45,130,111, 97,197, 68, 98,247,162,180,231,231, 67,111,108,222,143, 96, 46,174, 21, 8, 8, 4, 4, 2, 63,138,192, 95, 27,
-163,165, 4, 70, 89, 65,118,153,140, 99,203,144, 63,199, 81,157,230,115, 49,174,195,238,158,153, 66, 78,182, 44, 67,235,171,228,
-161, 6,182,166,177, 92,135,249,243,231, 63,200,174, 49,127,182,242,204,212, 2,180, 25,143,188,251, 0, 87, 33,187, 71,164, 17,
-135,248,141, 88,146, 21, 45,107,208,162,138,121,104,215,234,165, 52,127,230,116,106,235,155,135,202,228,206, 22,238,152, 62,253,
-107,238,220,208,233,104,220,120, 52,224, 32, 38, 58, 3,115,229,202,213,143, 51, 36, 98,119,224, 14,118, 67,133,148, 44, 89, 18,
- 68, 42,117,233, 20,138, 58, 53, 77, 19,188,130,101,171,214,183,137, 63,135,115, 92,149, 50, 70,171,141, 22,177, 69,216,253, 24,
-142,142, 17, 49, 77, 28,211,133, 0,254,168,254, 21,125,195,167,246,104, 71,115,123,119, 34, 14,134,151,130,140, 49, 98,114,238,
-220,185,196, 65,201, 97,163, 71,143,190,194,214, 34,196,168,233,220,152,196,110,135, 27, 13, 4,235,206,157, 59,254, 28,171,229,
-207, 29,166, 63,119,130,251,172, 45, 44, 86, 58,217,217, 80,143,146,133, 40, 75,170, 68,171,117, 9, 42,152, 36, 81,227,105,165,
-243, 6,211,145,141, 60,132,173,145, 20,244, 78, 11,134, 83,248,252,193, 52, 60,143,203,251, 60,137, 18, 53,210, 87, 22, 45,231,
-203,249,248,248,132, 28, 59,118,140,154, 84, 42, 75,111,122,215,162,128, 26,153,233, 74, 5, 39, 58, 80,194,145, 70,123,103,166,
-227,199,143, 73, 1,214, 32,152,171, 86,173, 34,158,187, 76,175, 69,139,201, 83, 12,209, 66, 76, 22,220,133,156,150,130,100,177,
-203,171, 51,147,141,134,147, 39, 79,174,202, 86,206,170,140,121, 67, 38,134,114, 86, 66, 79,207,238,215,201,156,158,112,154,206,
- 1,122, 46,133,146, 40,242, 22, 74,161,232, 85, 63, 99,218,195, 55, 70,119,189, 30,186,116,204,227,203,253,255,123, 91,209, 42,
-197,173,220, 10, 69, 74, 3, 48, 65,108, 34,136,151, 46,242, 44, 71, 92, 98,184, 12,177, 97,175,188,128,127, 75, 31, 38,216, 43,
-159, 49, 57,194,162,243,180, 96, 11,216, 10, 38, 87,235,249,255, 44,222, 95,226, 24,184,107,108,121,131,107,208, 57, 58,143, 11,
- 15,232,120,203, 3, 90,104,214,172, 89,196, 49,133,196,207, 53,136,162,216, 4, 2, 2, 1,129,192, 31,141, 64, 60, 37, 91,220,
-197, 72,155,114, 62, 45,189,243,104, 57,114,102, 4,206,238,230,132, 64,119,108,186,130,225,209, 41,193,250,131, 96, 94, 27,109,
- 45,200, 36,163, 39, 72, 12, 98, 71,224,114,194,200,168,174,255, 53,137, 44,157,217, 62, 42,179,189,205, 71,182,188,220,178,179,
- 74,179, 40, 87, 42,105,164, 96,122, 25,154,208,132,131,125, 91,177, 76,184,203,112,223,255,184,227, 15,217,187,119,111, 8, 91,
-101, 48, 34, 16, 83, 59, 96, 67, 60, 76, 99,182,142,133,112,128,123, 8, 58, 32,254,175,171,211,173,197,129,250,239,118,238,220,
- 41, 89,172,212, 55, 76,182, 10, 43, 14, 70,122,177,156, 70, 76,236, 14,241,200,199, 67, 60,183, 24, 58, 62,157, 27, 19,130,190,
- 60,146,242, 28, 72,233,246,237,219,253, 87,172, 88,225,223,166, 77,155,203,220,225,126,226,120,170, 40,196,214, 92,228,248, 48,
-119, 55, 55,140, 74,203,168, 77, 24,187,109,207,124,152, 63,156, 62,143,104, 74,159,171, 57, 74, 68, 43,120, 82, 79, 10,232, 80,
-138,110,181, 47, 79,197, 83, 36, 58,169,175, 44,154,206,179, 85, 7,115,163, 73,115, 48,193, 98,213,152,201,214,201, 22,165,136,
- 3,222,104,169,175, 19, 77, 42,147,131,202,250,250, 72,157, 55,220,145,108, 89,137,226, 58,233,141,209,226, 41, 6, 36,162,197,
-237, 34, 5,190,179,252,173, 79,158, 60,153,201,109,209,155,173, 48, 13,152,172,150, 40,238,148,177,119,201,212,201,111,149, 50,
- 75,113,215,205, 52, 21,230,235, 82,157, 63, 45, 86,113,205, 25,155,204, 46, 46,193,236, 18,139,194,160, 5,118,145, 70,121,184,
-101,249, 60,177, 78,185,245, 15,230,143, 89,255,121,231,146,221,161,155,231, 30, 95,219,172,210,165, 98,169, 18, 46, 41,100, 18,
- 51, 29, 71, 92, 96,193, 53,208,241, 77,156,148,163, 14, 49,152, 98,179,202,127, 77,114,165,201, 73, 53, 88,180, 18,170, 17, 45,
-131,202,196, 49,148,221,182,108,217, 50,132, 99,227,198,113,220,216,124,182, 16,110,103,146,117,137,133, 96,226, 84, 96,134,213,
- 17, 42,179, 53, 51,144,173,167,152,108, 22, 19,234, 6,179,101,216,208, 17,147, 6,149, 75,100, 22, 8, 8, 4, 4, 2,255, 48,
- 2,234,177, 89,114,140, 5,138,145,152,178, 33,122, 14,173,182, 58,192,107,133, 41, 32, 48, 21, 4,231, 81,141, 65,209,120, 9,
-207, 59,180, 17,110, 67,158, 75, 43,132, 45, 64, 27,147, 36, 74,212,194,145, 71,134,113,230,184, 12,117,247, 97, 11, 85, 85,182,
-144, 85,228,235, 11,112, 74,194, 35,238,158, 51,137, 11, 97,226, 35,205, 6,207, 36,224, 21, 38, 46,229,192,245, 16,254,234, 15,
-233,214,173, 27,172, 93,114, 92,104, 41, 56, 95,123,118, 79,110,228,184,174, 75, 3,170,148, 8, 31,215,169, 5, 53,113,181,198,
-245, 51, 56,193,210,102,129,123,178,139,117, 63,199,198,236,230,251,248,201, 80, 50,123, 38, 22, 7,152, 16,158,195, 68,157, 61,
-123,246, 60,199, 4,244, 41, 72, 22, 79,255, 64,108,233,146,130,204,153,132, 69, 50,233,209, 26,167,228,147, 60,209, 11,218,179,
- 92,227, 20, 14, 79,250, 55, 36,239,100, 9,181,198, 35,233, 42, 35, 91, 9,223, 34,136, 30, 68, 24,110,221,245,235,215, 83,185,
-194,249,105,117,155, 26,180,252,191,170, 52,190, 92,126, 42,144, 58,197, 71,219,212,166,231, 56, 62,232,149,220, 81,135,152,132,
- 84, 57,186,144, 9,128, 63, 19,172, 13,140,215, 36, 38, 12,157, 97,201, 2,201, 26, 85,182,240,167,208,125,107, 41,120,205, 12,
-234,147, 39,203,103,149,193, 22,223, 21,217, 33,109,154,101,135,121,182,122, 37, 9, 6, 65,221,180,113, 35,213, 41, 95,250,210,
-251, 93, 43,231, 29, 29,220, 97, 85,183, 60, 89, 54,241,220, 90, 32, 72, 90, 9,155, 82,112,110,142,135, 43,106,150,112,102,133,
- 12,105, 94,248,152, 39,156, 81, 48,117,172,229,165,234,176,213,237, 30,223,235, 5, 19, 66, 12,204, 88,142,189,202,255,102, 90,
- 48,141, 25,113,168, 50,210, 16,122, 62,136, 99, 21, 37,139, 22, 92,136,184, 54,167,137,194,202,215, 60,225,188, 42, 46, 54,111,
-176,199,127, 77, 50, 51, 38, 85,184,249, 88,167, 58, 90,213,213, 46,184,152,131,249,145,229,139, 22,140, 99,119, 56,226,227,160,
- 43,195, 89,151,142,214,171, 87,239,218,210,165, 75,175,177,206,135, 97, 48, 4, 79,176,250,145, 7,169,232,114,155,202, 80, 91,
-145, 69, 32, 32, 16, 16, 8, 8, 4,116, 32,160,110,201,146, 69,180, 42, 99, 18, 82,116, 6,209,115,105,105,114, 69, 85, 1, 17,
- 67,158,232,217,225,213, 39, 48,211, 52,161,217, 16,158, 97,156,248,197, 15,235, 87, 92, 54, 85,153,182,213,170, 85, 43,200, 22,
-146,124, 76,220,242,177, 48, 88,174, 28,153, 92,221, 99, 75, 81, 8, 38, 49, 69,156, 13,119,194, 33, 76, 4, 67,216, 74, 5,146,
-164,252,234, 87,189,183,222,137,215, 16,163,117,118,192,127,132,189, 90,161, 27,242, 48,251,157, 28,120,188,149, 99,162,122,169,
-156,211, 37,211,145,173,119,131, 96, 61,226,178,246,227,253, 11,196,133,129,100,193, 37, 7, 11, 4, 70, 50,242,241,167,106,247,
-138,145, 89, 50,101,226, 83,239,198,181,167,168,133, 35,233,235,180,190, 18,225, 10,154,220,135, 94,207, 26, 74,103, 91,150,165,
- 98, 41, 18,157,144, 9,110,172,114,130, 56,177,155, 47,138,221,154, 4,243, 45, 19, 62, 12, 12, 32, 55,123,187, 47, 5,147, 37,
- 12,240, 73,158,120,119, 92, 38, 44, 5,209,130, 37,139,131,180,253,153,184,250,179,171,121, 3,187,166, 39, 33, 38, 11,238, 66,
- 88,178, 64,178,168,103,121,162,246, 69,232,110,139, 98,170, 49,128,168, 74,236, 73, 80,109,108,158, 42,103,107,231,120, 55, 41,
- 6, 9,113,117,182, 86, 86, 31,138,166, 76,212,138,227,177,124,189,121, 57, 35, 61, 24,196,200, 44,110,158,112,209,169, 89,163,
- 35, 63,237, 92, 74, 43,155,148,143, 40,102,145, 80,213, 5,190, 26,164,138,173, 66, 15,176,103,242,249, 4,123,142, 75,148,254,
-243, 61, 48, 24, 67,185,197,200, 84, 11,132,199, 32, 4,144,172,246,202, 32,120,236,249,191, 52,137, 42,147,171,197,167,253,198,
- 71,125,217,190,152,214, 54,175, 24,137,255,154,100, 22,183, 72,188,245,252,194,201,244,117,247,114,218,216,169, 65,100, 17, 91,
-179,195, 76, 2,199,119,238,220,121, 3,235,204,101,182,192, 94, 99,130,124,141,151,223,185,198,235, 30, 30, 99,226,117,137, 63,
- 22, 52,185,223,245,234,188, 76,253, 49,232, 57, 18, 50, 13, 66, 64,180,145, 65,112,233,205, 44,240,212, 11,145, 65, 25,126, 6,
-158, 6, 21,224,111,201, 92, 31, 4, 42,218, 90,181,157, 45, 49, 59,121, 84,158, 63, 18,207, 77,133, 89,208,183,194,234, 53,112,
-224, 64,116, 24,250,150,224, 81, 98, 98, 76,162, 5,153,249,184,131,205,192,100, 7,174, 70,204,216,142, 13,132,171, 51, 91,207,
-142,243,232,181, 16,142, 27,195, 60, 92,152, 13, 94,155,207, 84,175,194,104, 89,130,167, 60,143, 14,219,206, 4, 98, 51,119,154,
-112, 27,170, 6, 48,235,149,169, 4, 4,150, 43, 30, 4, 16,137, 41, 34, 64,108, 96, 69, 98,242,161,201,162, 21, 35, 51,127,210,
- 68,117, 71,230,203,252,254,243,180,110,244,166,141, 47, 37, 77,148,136, 2,103, 12,166,203,141, 10, 82, 27, 71,179,247,121, 19,
- 37,170, 35, 83, 9,213,203,233,202, 86,193, 80,158,214, 32,106,235,214,173,196, 36, 27,211,107, 96,157, 63, 95,153,242,144, 45,
- 54, 41,226, 96,120, 38,189,210,210, 58, 72,108,133,132,203,116,235,164, 73,147,102,178,251,184, 55,199,183, 53,128,187,240,253,
-156, 65, 20,217,170, 0, 61,175,153,133, 14,120, 91,235, 36, 90, 76, 84, 39,176,219, 48, 18, 46, 78,142,113, 35,158,241,159,184,
- 13,162,172,211,166,157, 19,151,114, 86,114,182,126,255,101,245,100,162, 90, 25,233,121,101, 39,242, 49, 75,136, 81,170,202,141,
-215,166, 86,108,228, 52, 87,205,146,133,185,230,112, 92,117, 65,241,152,186, 99,129,104, 38, 98, 88, 82, 7, 3, 27,148,203, 62,
- 45,226, 99, 91,185,236,152,119, 14,238,121,201,146, 91,201,201, 58,232,243,154,169,210,253,159, 85,202, 72,222,169, 19,188, 83,
-185,127,140,204, 42,110, 14,161, 97,107,145, 47, 19, 61,235, 84,158, 74, 90,165,120,199,241, 90, 67,121,238,177, 21, 76,136,207,
- 50,233, 58,207,215, 97, 13,210,186,209,207,129, 54, 56,100,235,103, 92,240, 52,224, 26,125, 89, 69, 57,245, 33,100,216,121,129,
-167, 97,120,233,203, 45,240,212,135,208,191,115, 94,125,196,161,222, 24, 45, 85,104,160, 72,112, 9,206,230,120,168,152,225,232,
-248,205,199,208,169, 97,238, 40,109,174, 56, 77, 74, 56, 32,218,162, 37,199,205,166,169,137,212,101,166,224, 81,135, 41,217,117,
-135,209,145,154, 42,166,215,109,196,215,233,125, 88, 52, 17, 45,238,212,166,176, 59,114, 3,143,234, 90,203,177, 71,234, 65,211,
-122,101,170, 84, 46, 35, 91, 63,222, 49,249,136,130, 21,137,131,203, 35,121,228, 24, 58,218,140,106, 0,196,146,201,163, 14,215,
-245,200,234,240,225, 92, 35,182, 0,117,174, 66, 71, 27, 22,163, 86, 14,166, 31,138,166, 72,180,198, 0,221,214, 84, 78, 87, 14,
-206, 95,200, 4,245, 3, 91,233, 48,151, 90, 97, 3,228, 33,107, 44,153, 24,197,138,145,135,170,137, 45,144, 27,152, 44,205, 96,
-139,222, 0,182,162,181,118, 73,145,108,114,103, 55,251,207,151,170,121,208, 62, 38, 89, 13,173,146,169,187, 14,213,203,105,199,
- 36,250, 13,147, 54,137, 16, 34, 86,140, 71, 42,126,208,128,153,174,162,255,223,162,101,145,104,205,186, 26, 5,163, 2, 42, 58,
-208,152,172,169,163,138, 91, 38, 90,164,229, 66,196, 57,109,230,164,109,194,219, 24,153, 60,242,111, 14,147,170, 69, 28,163, 5,
- 89,202, 15,145,210,188, 22,231, 96, 62, 62, 24,123, 62, 94, 22,247, 41,106,158,112,217,242,170,121, 35,159, 87,176,167,209, 89,
- 77, 35,241, 95,229,254, 49, 50, 75,166, 73,188,105,115,139,138, 81, 47, 90,120,211, 32, 87,147,200,130,105,146,239,103,139, 21,
- 70, 74,194,226,156,159, 19, 38,237,149,179, 25,162,159,114,228,125,215,238,114, 47,210,147, 79,148,211, 72, 64, 70,139, 17,120,
- 10, 60,141,133,192,207,208, 37, 99,149,237, 79,144, 35,203,117,168, 94, 80, 91,182,188, 44,228, 73, 37,215,102,204,152,113, 45,
- 15,231, 71,176, 50,130,230,101,117,100, 42,153, 92, 56, 62,229, 3,119,228, 57,227,136,132,166,198, 77,199,178, 28, 56,169, 47,
-156, 43,247, 22,122, 21,102,152,157,162,195,237, 94,117, 46, 98,175, 34, 52, 63, 91, 56, 64, 52, 53, 13,249,215, 43, 83,173,112,
- 25, 97,217,130,187, 48, 58, 54, 43,163,134,194,127, 39,147, 45, 87, 13, 56,240,253, 68,225,100, 9, 95, 22, 79,145,248,120,190,
- 68,137, 52, 89, 22, 13,109, 35,185,184,105,203,103,104,221, 33, 71,215, 96, 11,109,157,184, 52,234,144,241,122,142, 81,135,156,
- 73, 19,102,178,234,158, 51,165,194,174,132, 69,162, 77,133, 83, 39,248, 88,194, 60,209,250,188,169,180, 15,234, 48, 64,231,115,
-179,149,173, 41,147,170,166, 60,143, 92,173,232,235, 64,252,179, 99,158, 44, 62, 94, 73, 57, 3, 60,166,163, 40,102,145,104,133,
-183, 89,130, 32,236,241, 95,229, 62, 49,120,162,156,197,153, 20, 34, 31,199,148,173,200,144, 92, 90, 94, 42, 46, 91, 92,218, 72,
-223,125,132, 76,125, 8, 25,118, 94,224,105, 24, 94,250,114, 11, 60,245, 33,100,216,249,159,129,167, 97, 37,248,179,115,199,137,
-104,197,165, 74, 63,163, 33,132,204,184,180,132,246,107, 4,158, 2, 79, 99, 33, 32,116,201, 88, 72,126,147, 35,240, 20,120, 26,
- 11,129,248,162, 75,198,170,239,239,144,243, 67,174,195, 31, 41,112,124,105, 92, 81,206, 31,105,229,239,175, 21,120, 10, 60,141,
-133,128,208, 37, 99, 33, 41,200,155,208,165, 63, 95,151,140, 91,194, 63, 72, 26,148, 79, 83, 50,164,136,218,100,232, 58,174, 79,
-190,144,169,185, 93,226,218, 94, 2, 79,129,167, 92, 29, 16,207,166,110, 11,176, 92, 28,149,249, 4,158, 2, 79, 77, 8, 24,170,
- 71,114,136, 98,124,145,169,196, 35,174,253,153,190,103,234,159, 58, 47, 71, 49, 12, 5, 68,200, 52, 20, 49,221,249, 5,158, 2,
- 79, 99, 33, 32,116,201, 88, 72, 10,235,147,208,165,127, 83,151,140, 91,235,127, 68,154,120, 88,140,219,208, 2, 79,129,167,177,
- 16, 16,186,100, 44, 36, 5, 41, 18,186, 36,116,201,184, 8,196, 79,105,134, 45,193,147, 56,255,136, 0, 69,238, 33,132,132,223,
- 60, 27,102, 66, 93,137, 39,173,194, 60, 67, 88,176,246,113,244,111, 85,179,160,244,155,229,236,101,121,254, 72,248,173, 87,166,
- 90,126, 21,220, 99, 30,106,150,145, 72, 67, 89, 19,225,184,156,164, 73,230,207, 40,103,124,145,105, 68,221,142,119, 47,222, 36,
- 5,254,175,243,248,173, 79,127,212,243,107,210, 37,213, 60,169,138,140,121,157,163,222,194,190,186,146,137,207,216,215,202,231,
- 78,186,246,255, 91, 12,158,134, 62,155,233,237,236, 74,243,200,198,199, 72,248,253,171,116,222, 0, 93,202,203,121,183,112, 58,
-172,146,166,104, 42,167, 1, 50,245,101,141,119,250,169,175, 66, 6,156, 23,117, 55, 0, 44, 25, 89, 5,158, 50, 64,250, 71,178,
- 24,184, 4, 15, 19, 44,255,199, 68,135,111, 19, 19,173,225,228, 92,205,111,149,122,202, 80,118,244,198,212,246,217,239, 91, 88,
-103, 12,226,151,120,204, 82, 40,209,132,235, 59,162, 5,130,197, 50,253,143,220, 33,137,108,241,188, 16, 22,201,147, 38, 29, 97,
-105,105,121,146,103,137, 15, 65,146,126,243, 49,156, 83,207,175,141,104,161, 99, 82,150, 53, 81,190,225,228, 94,205,175,171,107,
-149,217,125, 82,218,102,223,149, 32,113,242,125, 60,185, 86,213, 33, 10, 69, 82, 77, 29,167,198,151,185,106, 57,115,244,185,192,
-196,177, 84,170, 20, 41,122, 57,216,219,111,231,122, 62,228,249,159, 30, 89,241,194,208, 73, 19, 39,238,133,115, 10,206,163, 90,
- 47,189, 50, 89,126, 45, 46, 15,207, 94,217,192,204,212,116, 1,215,249, 22, 18,126,227, 24,206,201,169,187,122, 30,125,196, 85,
-150, 76,227, 61, 13,241,239,229,195,122,116,255, 53,209,245, 23, 68,201, 11,141,162,236, 13,150,172, 70,114, 43,217,229,176,125,
-250, 76, 95,144,178, 20,239,116, 88,121, 60, 69,225,209, 49,249, 37,114,164,129, 20,225,184, 82,102,190, 22,171,105,253,217,240,
-161, 72, 45,123, 77, 94,227,228,236, 26,130,132,223,202,227,200,163,204,175, 75,166,254,103,115,236, 6,179, 76,222, 87,147, 91,
- 58, 61,227,249,217, 98, 22,235, 4,217,146,163,159, 60, 79,138, 37,207,162, 58, 48,113,162, 68,251,120,169,164,119, 88, 27, 52,
- 73,226,196,123,113, 12,231,140,172, 75,203,212,215, 18,141, 38, 92,223,191, 67,254,101,253, 20,117, 55, 6, 2,241,239,189,100,
-140, 90,127,147, 17, 95,234,110,188, 26,255,122, 73, 6, 46,193,195, 29, 4, 72,214,144,109, 68, 37,187,108,163,181,231,162,182,
-171,166, 90, 45, 6, 95,245,242,202, 30,137, 25,185,177, 46, 30,207,106, 30,243,174,212, 69,180, 64,178, 88,166,191,194,169,214,
- 29, 94, 83,239,205,236,217,179,195,121,233, 26,194, 82, 42, 95,191,126, 37,204,140,206, 51, 92,135,227, 28,242,196,228,135, 37,
- 76, 67, 71, 6,242,132, 14, 73, 89,214, 28,141,151,199,116,102,174,110,158,111,120,109, 61,194, 2,201,197,139, 23,127,205,157,
-196, 48,158,152, 40,147, 42,225,210,214,233,224,190,255, 77, 56,117,221,220,218,241,107,135, 14, 29, 62, 40,103, 73,231,217,188,
-233,216,177, 99,196,235,243,209,240,225,195,163, 42, 86,172, 24,156,204, 36,205,215,217,107, 79, 93,151,234,165,165,156, 56, 30,
- 83, 23,247,150,215,121,141,192,219, 77,155, 54,253,180,107,215, 46,105, 61, 65, 36,252,230, 53,233, 62,225,156,130,243,232,171,
-123, 44,153, 44, 63,185, 66, 81,196, 54, 93, 58, 63,158,213,253, 36,147,193, 39, 72,248,141, 99, 56,167,158, 95, 99,221,141,167,
-152,241,229,161,254,127, 57, 89,143, 64,178,214,242,148,188,149,250,236,137,209,249, 76,206,174, 95,121, 82, 90,194, 50, 63, 14,
-233, 51, 68,172, 61, 19, 33, 61, 11,200,163,204,175,139, 20, 41,243, 36, 45, 56,146, 60, 42,141, 27,106,238,152,119,175,105,106,
-179, 8,229, 3,147,218,204, 44, 2,199,112,142,173, 88,178,100,234,122, 54,155,117,159,122,161,100,169, 50, 97, 88, 66, 9,207,
-212,217,179,103, 99,158, 77, 93, 68, 43, 70,223,156,235,220,225,124, 47,120,253, 73,186,192,139,155,223,189,123,151,120, 1,116,
-105,207,171, 47, 16,175, 83,249, 66,193,121,244,234,167,124, 93,202,193, 89,159, 55,107,213,137,214,239, 60, 38,149, 85, 16,173,
- 24,240,226,223,115, 36,191,221,245,229, 20,117,215,135,144, 97,231,227, 11,158,134,213,234,207,201,109,248,156, 89,112, 79, 36,
- 45, 48, 82, 34, 89,169,139,142, 15, 82,181,102,153,187,148,188,200, 36, 65, 90,248, 24, 11, 15,131,116, 96,193, 92, 94, 36,153,
-152, 36,124,214,235, 58,116,174,119, 59,139,187,103,196,147, 39, 79, 8, 11,222,226,229, 61, 97,194, 4,226,181,217,104,243,230,
-205,132,227, 72,174,110, 30, 17, 10,206,171,116, 53,106, 35, 90, 40, 43,172,110, 32, 89,169,138,140, 13,114,171, 54,167, 7, 44,
- 90, 9,147,154,188,128,188,167, 79,159, 18, 22, 28,126,245,234, 21,241, 36,145, 81,137,147,165,157,172, 36, 91,154,100, 42,221,
-124,105, 29,178,134,158, 63,127,158, 22, 47, 94, 76, 5, 10, 20, 32,158,133,156,120,141, 62,226,133,170,137, 23,145, 38, 94,118,
- 72, 90,143,208,207,207,143,146,154, 57,132,234, 42,103,140,235,208,181,233, 77,171,116,182, 17, 71,143, 30,141,177, 0,170,127,
-205, 31, 60,120, 48, 10,121, 20,156, 87,150,204, 44,205,111,164,117,112,251,192, 11, 9,191, 67,231,202,107, 9,198,136, 68, 27,
-161,179,100, 66,248, 22,121, 20,156, 87,151, 76, 35,234,108,124,121,168, 99,202,169,234,230, 75, 93,116,220, 91,165,229,202,206,
- 33,195, 87,144, 44,124, 80,240,178, 72,100,150, 62,247, 29,156, 51, 45, 58,246,141, 62, 55,159,170,204,196,110,141,223, 41, 9,
- 12,158, 21,229,134,231, 71, 73, 96,144, 71,159, 76, 93,207,166,165,123,165, 51, 88,117, 1,235,102, 98,129,114,172,153,137,103,
-179,110,221,186, 81,252,108,190,211,235, 58,100, 2, 85,164,136, 79, 20,244, 26,122,195,207, 11,241,250,142, 84,187,118,109,169,
-238,120,150,144,202,149, 43, 31, 5,178,101, 4, 93,194,242, 67, 11,251, 14, 30, 75, 55,159,126, 36,144, 45, 65,180, 98, 61,133,
-241,238, 57,250,151,223, 33,162,238, 70, 68, 32,254,137, 82, 90,179,180,151, 28,203,190, 68, 39, 95,228,130, 27, 10,228, 10, 95,
-238,216, 43,221, 82,102,108, 17,202,149, 43, 87, 56, 58,112, 88,177,218,181,107,247,113,234,212,169, 7,121,125,190,117, 17, 97,
- 97,243,237,237,236, 38, 32,175,166, 59,225,120, 70,133,194, 60, 85,170, 84,129,143, 31, 63,166, 29, 59,118, 72,157,192,242,229,
-203,105,231,206,157,180,111,223, 62,105,143, 78,136,215, 79,148, 22, 87,102,203, 86, 32,174,209, 33, 83,138,197, 2,185,130,251,
- 5,110, 67,252,183, 84, 40,178,114, 57, 35,121, 29, 61,226, 37, 90,104,201,146, 37,146,204,215,175, 95, 83,226,228, 38,129, 26,
-136, 86, 76,145,149,117,101,107, 80, 32,234,233,232,232, 72,188,196, 9,177,133,136,220,220,220,136, 23, 66,166,242,229,203, 83,
-131, 6, 13, 36,178,133, 60, 41, 82,164,136,137, 99,211, 86,119,142,146, 75,201,245,121,236,239,143, 85,140, 52,111,188, 30,160,
- 84,198,221,187,119,163,238,143,113,141, 46, 60, 83, 42, 20,121,178,103,207, 30,136,107,208,185, 2,215, 43, 87,174,208,141, 27,
- 55,164,223,144,167,220,128, 39,147,197, 64, 92,163, 77,102,252,211,109,227,149, 88, 91, 76, 86, 6, 27,155,242,188,116,208, 39,
-172, 63,249,236,217, 51,137,120,179,130,143, 84,207,175,165,221, 37,253,228, 53,113,202, 20, 41, 82, 36, 82, 73, 96,176,126,100,
-217,178,101,153,176,148,163,193,131, 7,199, 16, 24,214,171, 72,228,213,167,159,154,158, 77,115,133, 34, 67,165, 74,149, 62, 65,
- 15, 96, 33,229,117, 73,159,178, 43,186,161,137, 66,225,201, 15,117,114,165, 94,107,211, 79,184, 4, 65, 4, 81,198, 13, 27, 54,
- 16,175,254, 16,200,215, 55,227,103,222, 25, 9,191,121, 85,136, 64,156, 7,233,204,144, 33,195, 11, 92,243, 3,186, 20,139,100,
-129,108,113,217, 56, 96, 65,178,104, 97,217, 39,177, 9, 4, 4, 2,255, 24, 2,234, 92,228,175,170, 62, 42,135, 10, 41,247,218,
-136, 86,146, 68,137, 86,193, 93,248,226,197, 11,106,213,170,213,135,195, 7, 15, 46,188,124,241,226,220, 27,215,174,205,141,140,
-136,152,171,143,104,165, 76,158,124, 48,127,113,135,195,242, 2,146, 5,178,197, 11, 66, 75,238,184,211,167, 79, 19, 44, 72, 32,
- 68,123,246,236,145,238, 49,108,216,176, 48, 92,163,143,104,193,130, 5,162,133,125, 18,133,162,109,190,124,249, 66, 97,205,194,
- 23, 61,200,219,198,141, 27,165, 69,135,209, 81,154, 89,166,123,167,175, 35,195,253,152, 96,189,129, 37, 12, 46,147,158, 61,123,
- 82,141, 26, 53, 36,146, 85,166, 76, 25,234,221,187, 55, 45, 93,186, 84,178,188,193, 53,201,107, 2,190,210,215,145, 37, 75,156,
-184,103,215,174, 93,191,232, 34, 89,207,159, 63, 39, 94,179, 81, 74,205,154, 53,251,130,107,180,213, 61,141, 66, 97,207,107, 45,
- 62,135,219, 21,214,139, 5, 11, 22,208,148, 41, 83,104,236,216,177, 52,126,252,120,154, 49, 99,134, 84,103, 88,242,148, 27,240,
-229, 5,162, 95,226,218,191, 74,129,141, 80, 25,109, 68, 11,199, 57,130, 60, 85,242,100,201,142,240,250,158,146,117,116,204,152,
- 49,196,150,219, 30,170,215,104, 35, 90,110, 10, 69, 26,117, 2,195, 58,218,220, 74,161,112, 65,194,111,117, 2,131,107, 32, 91,
- 27, 41,210, 68,180,152,181, 76,132, 27,158, 23, 56, 39, 39, 39,167,187, 30, 10,133,137, 82, 39, 85,247,218,100, 34,254, 10,250,
- 3, 75, 22, 72, 22,151,205, 70,253,122, 28, 3, 89,135,133, 15,207, 20,174, 49,144,104,169, 6,190,191, 84,186, 11,163, 73,214,
- 66, 46, 27,214,106,196, 26,143,202,197,225,141,208,178, 66,132, 64, 64, 32, 16, 95, 16, 80,231, 34,241,165,220,209,229,212,237,
- 62,148,107,209,226, 78,250, 94, 96, 96, 32,193, 82,196,132,105, 47, 72, 22,119, 62,115,249, 11,122, 46, 91,180,244, 18, 45, 94,
- 92,248, 24, 72, 22, 44, 76,176,100,129, 8, 29, 63,126, 92,178,142,225, 5,127,245,234, 85,201,157,136, 61, 58, 53,124, 61,227,
- 26, 57, 68,107,194,178,243,147,204,173, 51,222, 91,188,120, 17,199,148, 60,160,139, 23, 47, 74,196, 13, 49, 42, 32,114,167, 78,
-157, 34,116, 68,201, 76,173, 31,202, 33, 90,188, 54, 93, 12, 67, 65,140, 78,112,112,176, 20, 75,134, 4,242, 2, 11, 17, 91,242,
- 36,151,167, 28,139, 22, 7,208, 31, 6,153,212,180,129, 40,129, 88,130, 96, 1, 15, 88,247, 56, 86,141,112,141,182,186,115,128,
-126,103,198, 77,138,245, 9, 13, 13, 37,196,212, 48,145,163,106,213,170,125, 42, 84,168, 80, 48, 91, 76, 62,182,105,211,230, 19,
-119,136,146,155, 18,241,106,192,184, 69,139, 22,225, 41,146, 37,235, 22,207, 20,248,167, 23, 87, 23,209,194, 57,182, 46,154,153,
-165, 78,237,143,118, 71,123,177, 59, 46, 50,218, 58, 40, 89,173,180, 17, 45, 38,100,131, 84, 9, 76, 6,133,194, 86,253, 94, 56,
-166, 74, 96,112,141,161, 68,139,215, 14, 61,134,114,193, 26,197,133,169,174,137,100,233,120,142, 18,114,224,251, 94, 60, 51,176,
-176,193,122,165,237,122,156,131,206, 67,231, 16, 32,111, 32,209,250, 46,240, 29,100,139,177, 3,201,210,104, 9,255,233, 13, 47,
-110, 32, 16, 16, 8,252, 49, 8,196,115,139,150,250, 18, 60,177,137,151, 92,139,150,151,151,215, 23,188,204,209,113, 28, 62,116,
-104,217,109, 38, 89, 15,152,100, 61,127,250, 84, 22,209, 98, 66, 18,140, 23, 52,187, 27, 37,171,213,137, 19, 39, 36, 34,132, 23,
- 60, 72, 6, 72, 22, 2,111,225,246,194,111, 88,120,112,141, 62,162,101,159,191,237,228, 60,121,243,125,129,203, 12,132, 8, 95,
-245,111,223,190,145, 44, 88,215,174, 93,147,228,177,187, 35,138, 93,157,100,233, 82,122,181, 28,162,197, 86,136, 0, 85, 82, 4,
- 23, 33,130,245, 81, 86,148, 29,113, 53,108,113, 35, 94, 32,155,120,196,164, 94,215, 33, 91,189, 62,104,114, 27,170,146, 44,224,
-129,182, 88,177, 98, 5,245,235,215, 15,114,181,214,157,131,146,143,226, 90,229,118,228,200, 17, 88,214,194,185, 35,172,204,173,
-155, 4, 9,191, 19, 37, 74, 20, 14,194, 10, 12,224, 70,133, 92,238,148,207,252, 49, 79,214, 31, 82, 16,125, 68, 11,231, 93, 20,
- 10, 43, 94,192,250, 30, 98, 19, 17,171,196,196,235,194,144,232, 17,173, 90,137,150, 10,129,129,245, 74,219,125,112, 78,141,192,
- 24,100,209, 98, 55,228, 7, 60, 91,136,171,226,149,213,237, 12, 37, 90, 24, 89, 8,151, 35,226, 15,205,216, 85,168,237,122,156,
- 67,140, 38,182, 28, 57,114,192, 58,108, 8, 65,202,193, 56,169, 7,190,191, 20, 36,235, 15,121, 8, 68, 49, 4, 2,191, 25,129,
-191,222,162, 5,124,245,185, 14, 57,238, 67, 34, 90, 8,184,101, 11,209,178, 71, 15, 30, 72, 36,139, 99,132,100, 19, 45,196, 13,
-205,157, 59,151, 48,130, 15,110,183,203,151, 47, 75, 36, 11, 46, 58, 16, 25,144, 43,116,100, 32, 73, 72,114,136, 86, 10,139,140,
-231,231,204,153, 67, 15, 30, 60,224, 24,167, 64,201,122,131, 78, 7, 9, 22, 40,196, 45,101,113,243,252, 84,177, 94,151,173,112,
- 47,198,133,104, 33, 14, 10,164, 13,174, 78,184,228, 96, 65, 66,172, 13,130,132,229, 16, 45,206,243, 17,238, 22,144, 40,200,194,
-134,178,161,174,168, 63, 72, 22, 44,100, 32,177,136,223, 97,139, 9,228,126,212,214,145,169, 19, 45,200,227,178, 69,149, 44, 89,
- 50, 16,174, 31, 36,252,102,153, 81,112,113, 2,239, 78,157, 58, 17, 91,185,200,204,204,236,236,111,126,158,254,184,219,203, 33,
- 90,200,195, 35, 56,125,216,173, 27, 5, 29,131, 30, 51, 65,106,170,203,162,165, 74, 96,224, 42,212,118, 31,156, 83, 35, 48, 6,
- 17, 45,214,153, 15, 24, 8,209,191,127,255, 56, 17,173,172, 89,179,190, 3, 25, 71,224,187, 1, 68, 43,200, 0,162, 37, 39,240,
-253,143,211, 11, 81, 32,129,128, 64,224,215, 33, 16,207,137,150, 97, 64,225,229,169, 41, 14,196,202,202,234, 30, 72, 2, 98,171,
-214,174, 93,187,151,221, 93,115,223, 50,201, 10, 9, 14,150, 21,163, 5, 55, 32, 8, 21,226,166, 16,235, 5,146, 5, 23, 33,190,
-164,241,146,135,251, 12,129,182, 72,176, 74,193,181, 40,199,117,152, 52,101,234,119,176, 22,193, 85,136, 4,194, 21, 20,244, 78,
-114,241,116,239,222, 61,146,223,240,211, 50,149, 24, 58, 76, 25,199,101, 76,162, 53,122,244,104, 89, 68,139, 45, 33, 39, 80, 70,
-212, 21,164, 16,113, 94, 45, 91,182,164,250,245,235, 83,245,234,213,165,216, 47, 95, 95, 95, 41, 64,186, 71,143, 30,152, 62,130,
-112,141,182,142, 12,174, 67,118, 69,198, 76, 19,160,201, 37,137, 88, 26, 88, 8,225,234,229,152, 58,106,221,186, 53,238, 17,145,
- 44, 73,146,174,134,105,196,223,159, 91, 46,209, 66, 62,214,167,249,112,119,195,130,202,191,215,234, 34, 90,170, 4,198, 0,162,
- 5, 2, 99, 16,209,226, 81,133,199, 64,254, 96,181,140,139,235,144,221,128,251,224, 90,135, 62, 27,224, 58,220, 39,147,104,137,
-192,247,191,255, 17, 18, 53, 20, 8,252,235, 8,232,118, 29,170,163,163,141,104,113, 48,252,106,140,136, 67,140, 18,187,204, 62,
- 60,127,246,108, 33, 72, 86,216,151, 47,115, 41, 50, 82,111,140, 22, 2,219, 49,119, 86, 64, 64, 0,109,218,180, 73,178,228,224,
-229, 14,139, 11,142,189,125,251, 86, 34, 88,232, 48, 16,116,220,177, 99,199,175,114,130,225, 19, 39, 51,121,141,248, 35, 36, 37,
-217,130, 53, 12,163, 2,121,194,210,186,232,180, 84, 3,230,127, 7,209,226,122, 12, 27, 58,116,104, 24, 8, 17,230, 55, 66,125,
-209, 81,243, 84, 15,146,187, 16, 49,107, 60, 95, 23,113, 30, 26, 55,110, 28, 8, 24, 6, 2, 12,211,214,145, 41,131,225, 65,166,
- 96, 25,131, 53, 3,216,193,197,137,246, 65, 92,218,172, 89,179,136,231, 1, 35,158,250,129, 26, 55,110,140, 0,123, 76,193, 17,
- 40,130,225,191,127, 31, 24, 66,180,120,100, 96, 57, 76, 73, 2,156,217,178, 40,141, 98,213,230, 58, 84, 37, 48, 6,184, 14, 65,
- 96, 12, 34, 90, 8,134,135,238, 67,239,185, 76,113, 10,134,199,136, 74, 88,148, 17,156,175, 45, 24, 62,115,230,204,114,131,225,
- 85, 3,223, 31,139,192,247,127,189, 15, 18,245, 23, 8, 8, 4, 98, 33,160,141,104,177, 75, 33,147,167,167,103, 24,172, 90, 8,
- 10,102, 23, 98, 8,199, 6, 29,124,250,248,177,193,211, 59,224,122,144, 12, 4,199, 43, 45, 89,239,222,189,147, 8, 67,100,100,
-164, 20, 32,143,169, 32, 50,202,152,222, 33, 65,226, 20,251, 17, 8,206, 22,178, 40,144, 23, 16, 46, 16, 25,158, 34, 33,192,143,
- 99,149,208,105, 97,234, 7, 88,180, 48, 21,132, 76,162,245, 82,213, 74,164,201,117,136,192,225,232, 24,173,151,202,152, 22, 45,
- 29,110, 66, 12,133,231,250,188,129,251, 17,132, 18,150, 60,184, 11, 97, 29, 4,201, 66,124, 14, 72, 22,226,190, 16,103,131,188,
-186,134,207,227,126, 8,198,230,185,189, 94,131,176, 34,102, 8,120,178,165, 81, 34,108, 3, 6, 12,160, 46, 93,186, 72,174, 66,
-140,154,108,212,168, 17, 98,179,130,196,244, 14,154, 31,118, 85,162,149,209,214,182, 12, 15,252,120,198, 22,220, 23,248,173, 78,
-194, 48,241, 45, 15, 42,144, 72, 73,177, 98,197, 34,135, 96, 54,127, 13, 27,174, 67, 96,187, 42,129,201,160, 37, 24, 94,149,192,
-196, 41, 24,158,167,119,224,137,121, 67, 49, 88, 5,122,197, 51,194, 63, 49,116,122, 7, 76, 70,138,103, 17, 3, 71, 80, 30,245,
-233, 29,112, 12,100, 14, 31, 66, 50,166,119, 16,129,239,162, 95, 17, 8, 8, 4, 4, 2,218, 16, 80, 78, 2,250,109,194,210,113,
-223, 77, 88,138,169, 14,240, 53, 15, 98,132,233, 24, 64, 20, 96,149,145, 59, 97,105,230, 44,238, 17,112,161,193, 69,168, 12,126,
- 71, 7,129,152, 42,108, 8,144,183,182,177,147, 53, 97, 41, 58, 51, 30, 19,158,154, 59,167,161, 60, 82, 48,148, 45,102,146, 76,
-116,130,152,180, 20,150, 44,144, 43, 76,102,138, 73, 77, 49,185,105,244,250,141,170, 22,131,152,137, 1,149,147,139,102,240,244,
-125,143, 78, 69,185,161,174, 32,113,112,103, 34,214, 10,211, 59, 32, 33,120, 56,165,181,199,123, 89,147,139,242, 36,143,246, 60,
-187, 56,226,165, 32,139, 39, 39,165,213,171, 87, 19,202, 60,113,226, 68,201,146, 5,151, 98, 90,107, 27,174,187,238, 9, 33, 99,
- 38, 65,229, 73, 72,211,216,185, 6,151, 46, 93,250,195,154, 53,107,164, 57,184,224,154, 69,155,128, 4,242,108,243,176, 80,132,
-152, 88, 58,132,136, 9, 75,191,211,248,152,118, 87, 37, 83, 24, 8,161,156,244,147,221,183,225,108, 45, 26,158, 66,161,240,102,
-130,229, 4,146,197,255, 23,128,204,194, 18,203,243,171, 61, 86,179, 62,197,146,137,169, 26,212, 9,140,250,244, 14,234, 4, 70,
-195,244, 14,170,250, 41, 77,208,171,233,217,196,132,165,136,209,130,238,195, 21, 15,253,196, 0, 16,204,251, 38,119,194,210,242,
-229, 43, 68, 65,215, 97, 41, 5,249, 71,220, 24, 18,126,227, 24, 72, 86,197,138,149,228, 76, 88,138, 41, 26, 48, 31,214, 97, 78,
-210,132,110,188,127,198,201,144,224,121, 52,152,152,180,211,184, 93,149,192, 83,224,105, 44, 4,126,134, 46, 25,171,108,241, 64,
-142,202,250,129,218,150,224,113,205,226, 22,137,201, 69, 17, 15, 5, 75, 10, 72, 18,220, 86, 92, 59,253,235,169,241,140,239,152,
-140,116,196,136, 17, 97, 8,136, 7,105, 67,130,156,206,157, 59,127,133, 37, 11,179,194,235, 91, 67, 80,221,210,192, 22, 32,123,
-126,139,207,205,147, 39, 79, 36, 2,203,205, 44,172, 95, 43,215,145, 3,201,194,146, 66, 88,190, 4,179,111,107,235, 28,149,235,
-184,109, 56,254,252,146, 77, 6,247, 79, 60, 39, 85, 8, 58, 84,184,229,208,209,192, 82,134, 41, 24,120,228,100, 84,137, 18, 37,
- 62,164,176,176,255,180,251,236,243, 75,202, 53, 28, 85, 90, 87,117,121,151,255,175,243,200, 75, 11,193, 90,197, 29, 96,216,162,
- 69,139,164, 9, 90,177,135,117,140, 93,124,168,187,180,252,144,190,186,171,175, 55, 23,189, 4,207, 92,182,196,156,179,176,176,
-120,201, 29,107, 0, 91,176, 46,240,126,145,114, 9, 30,189, 50,141,167,154, 63,227, 1,252,169, 50, 85,117,137, 49,124,167, 28,
- 13, 10,178, 13, 50, 12, 2,220,176, 97, 67,170, 83,167,142, 20,243, 6,189,143,158,188,116,186, 46,162,133,115,152,132,180, 66,
-133, 10,145,250, 8, 12, 79, 56,170,109,194, 82, 85, 93,138, 89,219, 83,211,179,137, 37,120,242, 21, 40, 20, 6,178, 13,183, 60,
-150,118, 82, 62,155,178,214, 58,100,130, 15,107, 21, 62, 38,148, 31, 62,202, 41, 68,112, 12,231,240, 17, 96,160, 46, 29,142, 38,
- 90, 32, 93,134,110, 63,181,221, 13, 45,140,142,252,162,156, 70, 4, 83, 16,108,227,130, 25,143,240, 52,122,197,127,161, 64,158,
- 5, 72,218,212,215, 60,212, 82, 4,149,245, 3,177, 20,143,198, 69,165, 75,255,127, 81,105,235,116,233,162, 64,178, 16,236,173,
-139,104,169,174,143,150,145, 93,130,136,191, 66,176, 59, 70, 22, 34,225, 55,142,225,156,156,181,249,180,197,213, 88,240,108,216,
-188,160,244,206,148,233, 60,247,193,162, 5,183, 33, 22,156, 6,201,194,130,188,250,136,214,255,203, 57,232, 60,147, 20, 95, 94,
-240,185,183,131,157,221, 46,107,107,235, 7, 92,198, 7,105, 45, 45,119,165, 72,154,180, 55,206, 41,114, 15, 58,175,119,221, 55,
-213,181, 14,163, 23,212,214, 86,119,229,130,218,134,202, 84,186, 46,181,237,229,224,105, 68,133,140,119,157,142,170, 46,217, 91,
- 89,213,100,125,252,196,196, 71,114,195,130, 84,193, 53, 11, 43, 17, 70,198, 98, 20, 43,130,198,153,208,222,194,148, 15,250,136,
-150,146,108,233, 35, 48,170,179,194,235,248, 16,136, 89,219, 83,235,179, 89,246,255,139, 74, 59,164,119,140, 84, 62,155,178,214,
- 58,100,253, 84, 46, 42,141,248, 50,158,194, 33, 8,211, 56,168, 47, 42,173, 87, 63, 99, 43,211,150,104,162, 21,151, 25,223,227,
-157, 46,253,203,207,145,168,187, 81, 16,248,151,117,222, 40, 0,254, 38, 33,202,121,179,212,247,154,139, 3,215,154,114,205,181,
-104, 55, 91, 66, 93, 29,121,244,250,134,176,100, 61,214,187,214, 33,191,200,225,246,210, 71, 12, 98, 92, 99,209,249, 85, 74,170,
-209,221,163,141,116, 41,143,107,168,147, 78,215,161,210, 21,104,140,114,170,215,229, 79,149,105, 68,229,140,119, 47, 10, 77,250,
- 3, 11, 41,235,115, 55, 38, 25, 39,153, 36,189,134,165,148,227,160, 48,229,200, 61,118,255,117,130,203, 90,121,157, 28,253,132,
- 75, 16,241, 87,234, 4, 6,199,148,238, 66,213,114,104,146,105,232,179,137,245, 13, 65,176,144,244,174,117,104,196,103, 83, 77,
-151, 16, 24, 31,215, 25,223,227,157, 46,253,203,207,145,168,187, 81, 16,248,151,117,222, 40, 0,254, 38, 33,234,150, 44,195, 23,
-154,142, 99,193,255,101,133, 17,117,143,163,210,104,185,236, 79,192, 19,228,220, 76, 79,181,254,132,114,202, 65, 94,148, 83, 14,
- 74,242,243, 8, 60,229, 99, 37, 39,167,192, 83, 14, 74,242,243,196, 23, 60,229,215, 72,228,140, 65, 32,190, 52,174, 40,167,113,
-149, 86,224, 41,240, 52, 22, 2, 66,151,140,133,228, 55, 57, 2, 79,129,167,177, 16,248, 25,186,100,172,178,253, 14, 57, 74,139,
-150,234,124, 90,177,200, 16, 0, 83, 79,134, 20, 84,211,245,250,142,233,147,175,239,250,184,148, 89,200,252,190,157,117, 97, 34,
-218, 72, 59, 2, 66,151,132, 46,201,213,129, 63,241, 57,170, 26,135,119,190,220,250, 34, 31,175,197,174,232,173,175,226, 26,202,
- 32,231, 30,250,196,202,145, 97,104,127, 39,100, 26,247,121, 87,182,161, 54, 92,245,181,241,159,120, 94, 94,108,214, 79, 40,249,
-207, 96,188, 66,166,113, 27, 74,224, 41,240, 52, 22, 2, 66,151,140,133,164,176, 62, 9, 93,250, 55,117,201,184,181,254,181,210,
-116, 90,180,126,102, 81,196,195, 98, 92,116, 5,158, 2, 79, 99, 33, 32,116, 73, 13,201, 33, 67, 20, 9,121, 76,114, 2,162, 33,
-188, 95,155,136,168, 22, 39, 69, 2,153,128,107,196,179, 86, 45,205, 51,252,119,108, 96,153, 90,134, 92,209, 70, 50, 64, 50, 32,
-139,192,211, 0,176,100,100,253, 25,120,202,184,173,200,162,142,192,207,104,136,191, 73,102, 6, 91, 91,219,221,156,246, 48,112,
- 60,105,184,222,237,111,170,187,222,202,170,101,248,109,117,231, 73, 75, 75,242, 66,220, 37,101, 22,248,183,149, 83,102,249,148,
-217, 98,202,233,153, 89, 81,221, 35,139, 98, 96, 76,114, 85, 52,214, 38,203,131,207,169,230,197,181, 42,121,229,212, 61, 97,249,
- 82,142,179,145,248, 58, 57,147,151,202,145,169, 94, 92, 55,158,138,229, 17,143,180,124,198,115,162, 85,210, 80,151, 24,153, 60,
-225,112, 34,164,250, 53,211, 12,232,220, 58,235,199,206,173, 61,190,182,104,226, 24,208,176,150,229,173, 38,245,173,118,182,110,
- 98,219,183,117,115,251,236,202,124,234,123, 93,117,207,230,170, 40, 95,167,186,231,156,220, 94, 41,122, 28, 58,228,155,152,158,
-214, 74,113,239,132,179,117,203, 70,105, 54,245,232,148, 59,178,113,157, 52,155,155, 55, 79,107,170,163,221,226, 82,119,125,106,
-240, 75,101,142,226, 54, 30,154, 36,137,199,176, 68,137,170, 12, 75,156,184,254,112, 78,195, 18, 38,172,203,251,188, 19, 20,138,
- 56,213,157,101,166, 25,162, 80, 20, 31,153, 60,121, 83,150,217,135,101,245, 30,149, 60,121,147,161, 10, 69,177,209, 10, 5,207,
-238,163,117,211, 90,247,248, 38, 19,245, 69,189,255,212,186,235, 83, 66,113, 62, 26, 1, 83, 83,211,115,220,185, 96,210,203,152,
-100,105,105, 25,128,196, 29,143,148,120, 78,169,152,196,203,149,224,220, 57, 3, 59, 71,140,224,130, 95,243, 72,116,194,239, 31,
- 25,213,101,150, 52,105,210,225, 92,142,147,201,147, 39, 15, 65,194,111, 28,211, 35, 87,215,203,135, 71,223, 43,234, 51, 30,243,
- 25,143, 7, 60, 1,232, 67,254,189, 0,199, 56,225,156,182, 77,151,204,148,220, 1, 76,230, 5,135, 95,241, 34,192,215,121, 82,
-201, 40, 55, 55,183, 87,140,225,100, 22,198,171,228,196, 73,102, 92,117, 87, 87, 57, 51, 51, 9, 60,235,232,232,120, 62, 26, 63,
- 51,252,230,178,159,229,255,153,227, 80, 78, 19,190,166, 20,227,215,143, 59,193, 61,209,203,220, 60, 99, 93,218,195,109,212, 15,
-231, 56, 33,143,166,237,151,118, 16, 42, 5, 72,205,229,124,201,186,254,146,143,253,149, 86, 8, 16, 39, 10,187,177, 82,153,240,
- 95, 91,219,234,201,171,183,141, 74,248,218, 85,245,155,209,194, 15, 9,191,101, 40,173, 94,153,106, 50,220,120,229,138,183,159,
- 62,125,146, 86,174,168, 89,179,102, 48, 63,183,220,255,198,218,190, 35, 90,109,155,101,126, 27,246,233, 41,133,127,126, 46,165,
-175,161, 79,232,254,237, 3,180,101,221, 48, 26, 49,168, 44, 53,170,105,121,178, 65,173,116,217,228, 18, 45, 15, 23, 69,165,254,
-253,170,251, 69, 70, 92,241,171, 83,211,115,230,180,105,249, 83,223,189,144,211,234,244,190,236,222,125,187, 23,138,194, 61, 14,
-238,153, 65,205,234, 90,157,213, 65,182, 12,173,187, 12, 56,127, 89, 48,124,130,193,201,146,101, 28,154, 56,113,219,225, 73,146,
- 84, 25,109, 97,225, 49, 58, 93,186,140, 72, 99,211,166,117, 30,150, 36, 73, 89,233, 92,226,196,185, 12,120,222, 19,140, 72,156,
-184,208,172,172, 89,251,190,187,125,187,111,248,231,207, 3,121,126,182,193, 72,248,141, 99,179,220,220,250, 14, 81, 40, 10, 8,
-153,223, 33,160, 73,151,126, 6,158,114,116, 80,228, 81, 34, 0,146,133,117, 7,149, 91, 84, 84, 20,133,135,135, 75, 11, 24,227,
- 37,134, 89,210,149, 11, 25, 99, 89, 14, 44,167,195, 95,145, 1,218, 94,104, 42,199,241, 21,139, 70, 95,193,235,196,133, 97,230,
-109, 44, 32, 13,185,123,246,236,161,220,185,115,135,241,185,149,156, 16, 76,169,233,139, 87,219,203,167, 44,207, 54,255, 6,139,
- 86, 99, 70,108,200,195,226,205,152, 96,114,222,188,121,225, 56,199,242,202, 26,240, 0, 34,171, 23, 19,171,219,188, 4,201, 39,
-204, 2,142, 9, 89,177, 6, 35,150,204,225,165,109, 62,225, 28,242, 24, 32, 51, 1,147,140,166, 14, 14, 14,207,231,206,157,251,
- 5, 56,158, 62,125,250, 38,176,195, 90,138, 51,102,204,248,130,115,200,195, 50, 53,185, 44,190,171, 59,151,225,156,146, 12,235,
- 35,194, 6,146,225, 92, 78, 78, 78,119,121,145,226, 72, 94,160, 58,140,137,198, 22,164,187,119,239, 70,240,242, 65,145, 88,184,
-152,203,104,200, 75, 50, 7, 19,170, 71,188, 80,120, 8, 79, 2, 26,133,153,251,177, 20, 17, 22,191,198,242, 77,188, 92, 80, 20,
- 79, 16,250,145,201, 49,230, 99,203,161, 1, 83, 93,157, 78, 97, 38, 67,115, 24,187,147,188, 36,206, 19, 36,252,198, 49,150, 83,
- 88,199, 83,173,183, 35, 99, 89, 75, 22, 44, 88, 16, 49,106,212,168,112,198,122,137,140, 55,132, 94,153, 50,100,168,103,249,169,
- 50,149,228,105,249,226, 33, 43, 59,183, 43,187,146,255,227,195, 68,147,254, 37,192, 57,228, 65, 94, 16, 51, 53, 82,246, 93, 57,
- 43,148, 76, 63,190,106, 5,231, 69,101,138,219,181,200,159,223, 50,117,149, 10,206,171, 66,222,110, 25,130,132,223, 56,134,115,
-200,131,188, 6,182,187, 27,183,243, 35, 47, 47,175,215,188,252,214,149, 36, 73,146,180, 5,201,194,123,233,234,213,171,210, 58,
-162,208,175,252,249,243, 7, 39, 75,150, 76,213,178,245, 29,209,106, 80,195,114, 16, 91,153, 34, 64,170,166,140,173, 67, 11,253,
-218,209,209,131,243, 40,240,197, 37,137,120, 93,191,180,149,122,118,206, 19, 86,175,134,249,208, 86,173,114, 39, 81, 18, 46,149,
-242,254,223, 66,232,166,240, 85,146, 44,236,179,103, 77, 56, 58, 95,174,196,253, 75, 23, 75, 62,106,202,200, 92,147,122,118,200,
-116, 31, 36, 75,149,108,105,113, 37,254,212,118,143,131, 30,106,187, 68,189,156, 9,152, 72,101,103, 43, 86,157, 89,233,211, 91,
- 76,180,183, 55, 31,147, 42,149,215,168,164, 73, 11, 33,141, 76,149, 42,247, 36, 75, 75,219, 53, 5, 10,164, 96,178, 85,150,201,
-150,143,140,118,135,204,166,254, 51,102,244,230,197,112, 7, 7,223,189,219,247,230,228,201,221, 14, 85,173,218,249, 88,221,186,
-157, 30, 47, 89,210,249,243,211,167,125,248,220,160, 99, 35, 71,246, 30,153, 52,105, 67, 33, 51, 22, 2,154,218,200,216,120, 26,
- 81,165,226,165, 40,101, 48,188,106,172,150,238,138,160,243, 6,201,194, 18, 49,235,215,175,167,205,155, 55, 75, 47,174,189,123,
-247, 74,107,244,225, 5,198, 36, 65, 34, 31,188,152,179,180, 6,154, 12,162, 85,131, 45, 36, 47,177,148, 7, 72,134,166, 13,132,
- 14,179,112,243,210, 55,152,121, 27, 86,132, 26,106, 37,213,244,242, 41,238,238,238, 30,138,165,114,110,223,190, 77, 11, 23, 46,
-164, 9, 19, 38, 72,235,179,161,220, 56,142,196, 86,163, 80,150, 85, 92,198, 3,136, 44,121,185,163, 14,229, 69,179,163,130,131,
-131,165,122, 42, 55, 16, 66, 44,197,195, 56, 68, 33, 15,242,202,144,153,135,235,126,189,125,251,246,239,177,156, 15, 54,158,113,
-252, 57,207, 54, 30, 5,162,133,132,197,166, 81,206, 14, 29, 58,124, 96,185,215, 89,102, 30,125,117, 71, 59,129,244, 98,123,249,
-242,165, 84,111, 44, 31,131,181,250,128, 35,254,131,112,130,204,202, 37,195,188, 12, 80,169,156, 57,115, 62,129, 69, 64,185,241,
-146, 67, 15,185,253, 95, 65, 14,202,136,245, 40,179,100,201,242,132,137,145, 38,151,218,119,109,196,132,229, 2, 48,196,114, 67,
-220,241,145,139,139, 11,241,130,216,228,237,237, 45,173, 23,137, 69,176,177, 24, 50,147, 98,226, 78,241,130, 12, 60,145, 37, 39,
-172,107,188,116,209, 59, 44, 78,174,250, 97,128,217,208,177,184,120,197,138, 21,223, 70, 91,224,114,202,148,169,154, 45, 87,201,
-146, 37, 25,134,119,132,197,192, 89,199,222,241, 73,109,228, 82,121, 93,188,235, 28,149, 68, 11, 4,234,250,181, 93,126,227,198,
-180, 26, 91,194, 55, 81,205,119,239, 60, 28,233,139,135, 11, 18,126,227, 24,206, 33, 15,242,202, 33, 90, 32, 80,161, 65, 91,134,
-236,218, 58, 96, 90,215,142, 37, 55, 28,223, 63,125,253,215,144,163,203,145,240, 27,199,112, 14,121,144,215,128, 54,226,199,217,
-237, 37,150, 9,194, 34,244, 88, 43,149,151,244,250,204,207,235,215,139, 23, 47,210,138, 21, 43,104,248,240,225,212,189,123,119,
- 26, 56,112, 32, 37, 74,148, 8,235, 44,126,215, 70,170, 22,170,201,147,171,154, 47,243,107,152,107,193,172, 74,229, 22,204, 40,
-210,115, 64, 55,151, 21,109,155,217,221, 26,218,191, 36, 61,190,119,140, 62,135, 60,162, 5,115,218, 18,200,150, 78,162,149, 69,
-209, 63, 52,244,156,223,187,119,103,253,110, 50, 86,183,174,237,154,119,243,218,230, 37, 55, 46,175,218,112,241,212,204,131,247,
-207,183,155,210,173,173,211, 19, 25,100, 43,222,233, 18, 0, 30,150, 52,169, 51,187,244,106,172,169, 89, 51, 41,147, 42,247, 17,
- 73,146,248,140, 54, 49,201, 52,195,214,214,122,138,133,133,213,248, 84,169,236, 71, 36, 79,158, 23,132,235,224,128, 1,137,153,
-108,149, 28,158, 40, 81, 62, 93,239, 58,150, 87,240,162,159, 95, 47,110,235,193, 23, 6, 13,234,190,167,104,209,182, 15,199,141,
-171, 19,188,123,119, 21,164,103,179,102,213,186,216,188,121,211,231, 75,150,180,139,252,250,117,192,225, 65,131,122, 14, 83, 40,
-120, 78, 97,237,100, 67,155,204, 7,171, 86,213,108, 88,186,244,184,244,105,210,156,115, 76,157,250, 66,235,178,101,231, 7,189,
-126, 61,228, 71,100, 26,179,156,219,124,124,218, 47,110,222,188,253,213, 37, 75,164,250, 27,179,238, 63, 82,206,120, 73,141,140,
- 91,104,245, 9, 74, 99,255,103,139,130, 47,172, 10,156,134, 40,239,171, 36, 90,114, 72, 22, 22, 72, 6,209,226, 14, 77,221,162,
-165, 94,141, 39, 32, 82,120, 49,234,219, 64, 22,176, 96, 53, 11,120,162, 7,139,212, 88, 27, 17,203,163,128, 8, 14, 25, 50, 68,
- 90, 80, 25,107,189,237,219,183, 79,218,131, 44, 66,214,173, 91,183, 8,107, 44,178, 60,125, 46,160,228,156,239,177,146, 92,129,
- 80,190,120,241, 34,166,200,176,152,193,194, 5, 43, 20, 22,113, 70, 94,150,201, 43,242,104,223,216,154,243,130,203,112,134,133,
- 28,102, 66,112,148, 45, 67,167,230,207,159,127,108,210,164, 73,151, 6, 13, 26,116,157, 45, 61,119, 26, 55,110,252,160,122,245,
-234, 79,217,221,241,138, 23, 2,126,199,238,180, 15,250,244, 64,217, 78, 32,148, 88, 76, 27,196, 10, 27,136, 48, 48, 1, 97,197,
-134, 54, 66,121,101,180,145,130, 23, 57,190, 3, 34, 12, 82, 5,204,128, 35,200, 26,136, 12,234,142, 58,115,217,165,181, 41,217,
-162,112, 71, 95, 25,113,158,243, 5,130,252,240, 12,235, 32, 82, 88,140, 25,196,151, 10, 22, 44, 40, 45,122, 92,191,126,125, 98,
- 28, 36, 61,226,153,215,245,233, 17, 68,230,202,158, 61,123, 32,234, 4, 82,137,186, 98,105, 28,212, 19,191, 85,137, 60,234,192,
-196, 14,237,174,143, 36,169, 86, 37, 33,151,241, 22, 8, 53, 8, 44,116, 0, 36,145,203,118,139, 51,201,137, 45,146, 3,203, 31,
-145, 71, 37,238,106, 56,136,212,189, 91, 75,134,109, 89, 87,115,248,158, 53, 30,195, 95,223, 44,212, 29, 9,191,113, 12,231,144,
-199,195, 77, 49,137,175, 83,183,104,125, 87, 31, 88,171, 64,164,190, 4,237,159, 17,248,116,243,186,161,253,138, 62,108, 84, 59,
-237, 39, 36,252,198, 49,156, 67, 30,228,149, 9,136, 11,147,252, 64,180, 43,116, 10, 27,116, 19, 31, 42, 76,180, 62,181,109,219,
-246, 67,159, 62,125,168, 73,147, 38, 84,185,114,101,170, 82,165, 10,222, 35,143, 52,201, 86, 37, 90,135, 22, 13, 73,254,250,201,
- 42,187, 15,129,203, 92,194,131,250,251,132,191,239, 83, 58, 34,104,100,227,173,171,106, 76,106,211,204,225,213,222,237,147,233,
-203,199,199,212,171, 75,190, 48,165, 27, 81,147,204,172,174,138, 18, 74,139,214,192,126, 53,252,114,120, 36, 28, 91, 36,127,226,
-161, 21,203,166,152, 58,126,104,169, 49,145,111,102,182,123,255,176,223, 24, 77,100, 75, 79,204,150, 76,120,126, 95,182,193, 10,
- 69, 82,184, 4,231,187,186,154,130,100, 77,177,177,241, 98,243, 98,169,136, 75,151,204,170,151, 44, 25,203, 74, 58, 48, 97, 66,
-251, 33, 73,146,228, 91, 85,173,154,116,205, 88,133,194, 90, 83,201,185, 83,178,156,234,226,210, 23,150,172, 11, 3, 7,118, 99,
- 95,107, 83,150, 89, 65, 83,122, 50,113, 98,157, 87,171, 87,183, 98, 87, 98,223, 9,233,210,245,209, 22,179,165, 73,230,200,206,
-157,187,122,102,206,188,195, 35,107,214,208, 37, 75,150, 72,174,103,188, 83,241, 14,117,113,118,254,236, 83,164,200,233,122,102,
-102, 51, 13,145,137, 50,114,221, 43,114,221,167,101,118,114,186,110,146, 42,213, 39, 36, 87, 71,199, 91, 13,138, 23, 95,246, 53,
- 52,180,159, 33,229,108,155, 39,207,184,180,105,210,188,203,226,234,250,133,189, 78, 17,233,216,139, 84,181,120,241,105, 47, 14,
- 28,168,134,186,191, 94,187, 54, 78,117, 71, 57,223,156, 56, 81,165,126,185,114,227, 11,229,204,185, 62,155,187,251, 21, 7,123,
-251,215,182,214,214,111,221, 50,101,186, 93,161,124,249,163,197, 82,165, 90,205, 15,104,186,159,169, 93,154,184,200,207,188,159,
-145,101,171,143, 58,196,255,255,111, 32, 89,234, 55, 68, 7, 14, 82,180,101,203,150, 24, 75,214,161, 67,135, 98, 44, 89,112,249,
-193,146,133,142,141, 73,131,180,232,178,140, 78, 92,178,146,193, 26,130,245,227, 64,166,212, 55, 44, 46,189, 97,195, 6, 26, 54,
-108,152,228, 82,226,114,233,236,116,217,162, 50,104,230,204,153,225,176,104,128,100,129,108, 29, 56,112, 32, 86, 57, 65,178, 96,
-133, 2, 89, 98,185, 97,184, 70, 23,192,137, 19, 39,238,209,181,107,215, 47,202,178,173, 93,187, 86, 34, 29,202, 13, 47,245, 78,
-157, 58,209,245,235,215,165,212,172, 89,179, 47,184, 70,151, 76,142, 73,146,234,174,220,152,176,220,228,197,137,223,178, 11,237,
- 43, 72,145,122, 98,215,228, 59, 46, 39,220,157, 58, 55,184, 11, 81, 47,224,137, 47,121, 16, 45,148, 15, 56, 2, 19,188, 36,128,
- 51,218, 7,132, 65, 87, 27,241,154,118, 67,152,240,156,106,213,170,213, 19,184,137,177,224, 55,116, 0,184, 66,214,243,231,207,
- 37,226,138, 61, 58,178,173, 91,183, 82,185,114,229,158,176,187,247,104,198,140, 25,249,221,165,125,227,216,174, 55,192, 16, 47,
- 46, 88, 24, 26, 52,104, 64,190,190,190, 82, 71, 8,249, 32,244, 40, 31, 92,179, 41, 83,166,124,165,167,218,182,220,209, 62,135,
-123, 24,117, 99,215, 30, 77,153, 50,133,198,142, 29, 43,213,151, 93,176,180,114,229, 74, 9, 3,229, 6,125, 69,172, 21,203,181,
-213,135, 41,206, 51,174, 93,217, 69, 44,153, 93,129, 45,200, 37, 22,104,102, 82,248,145, 93, 84, 93,229,200,136,135,121, 18,192,
-106, 5, 66,245,228, 90,147, 37,147, 71,151, 56,212,172,161,231, 27, 36,252,198, 49,156, 67, 30,174,155,172,209,120,112, 13,194,
-106, 5, 66,213,163,131,203,231,135, 55,198,208,167,119, 75,233,193,197,106,228, 55, 33,125, 84,227,218, 86,161, 56,135, 60,200,
- 43, 7, 51, 55,183, 12,187, 78, 31,108, 78,103,143, 13,167,173, 27,199,209,254,253,187,165, 16, 1,188,143,240,110,225,103, 41,
-132, 45,165, 31,121, 33,111, 88, 52,161, 79,120,135,240, 42, 71,223,111,170, 68,107,231,206,105,201, 2,238, 45,181,126,255,106,
-133, 83,216,251,177,121,194,223,246, 42,117,225, 72,243,198, 95,223,204,236, 21,244,112,104,103,144,173,199,247,142, 18, 91,168,
-168, 97, 77,203, 19,184, 86, 91,121, 99, 98,180, 34,175,248,213,171,237, 57,239,208, 78,123,135, 99, 7, 51,231,127,251, 96,104,
-169,153,227,106, 76,218,183,185,231,166,103,215,123,207, 82, 39, 91,141,235,166, 57, 32, 23, 91, 57, 88,253,234, 60, 76,152,178,
-115, 76, 86, 5,184, 11, 97,201,226, 14, 60,207,238,185,115, 19,140,225,216, 91,182,116,185, 35,141,228,245, 65,149,229, 26,156,
- 52,105,214, 17, 9, 18,100,226,192,246,124, 67, 18, 38,212,104,193,227, 23, 75,241,119, 55,111,246, 13,126,240,160,223, 62,182,
-100,129, 20,164,183,183,191, 99,109,101, 21,196, 68, 67, 74,182,233,210, 5,217,217,218, 74,201, 62, 93,186,247, 25, 28, 29,131,
- 29,237,237,131,109, 45, 45,241, 97,244,221,166, 46,211, 43,115,230,109,120,127,220,187,119, 79,122,231,169,111,120,119, 65,183,
-122,246,236, 73,105, 20,138, 13,114,100,162,156, 92,247, 70, 25, 29, 28,110, 85,171, 86,237,243,169, 83,167, 36,175, 2, 18,126,
- 87,173, 82,229, 75, 22, 23,151, 71, 27, 70,143,230, 1,175, 10, 77,238, 83,133,106, 57,119,176, 37, 11, 36, 11,122,174,220,208,
-255,182,110,221,250,115, 26, 75,203,119, 51,251,247,111,247,100,196,136,122, 97,143, 31,119,186,189,118,109, 55, 57, 50,149,120,
-162,172,217,178,100, 57,212,190,109,219,215,220,255, 70,193,200, 0,239, 16, 92,240,120,247,241,123, 53,202,199,219, 59,200, 50,
- 81,162,184,172, 87, 42, 91, 13, 53,113, 17,217, 23,255,233, 25, 85, 88,164,175,178,172,232,192,209,217, 42,221,133,186, 72, 22,
- 58, 79,184,215,216, 2,160,207, 18, 33,145, 13,116,166,202,164,116,249, 64,193,253,252,252,168, 91,183,110,212,187,119,111,169,
- 51, 6,225,226,242,232,148,137,133,168, 33, 3, 95, 32,176,100,161,156,199,143, 31,151,228,195,117, 4, 69, 81, 42,204,205,155,
- 55,233,228,201,147,132,107,116,181, 9,159, 63, 4, 11,134,114, 67, 71,174,220,208,177,131,216,128, 40,224, 62,176,246,192,221,
-133,107,116,201, 84, 37, 90,236,234, 11,230,114, 4,128, 8,240,195,125, 67,157,100, 49, 25,252,196,238,176,144,232, 14, 66,167,
-250,160,157,198,141, 27, 39, 17, 12,164,206,157, 59,199,252,198,255, 22, 45, 90, 72, 4,100,204,152, 49,210, 66,200,186,218,136,
- 73,214, 89, 88, 27,217,114,243, 22, 47,155,165, 75,151, 82,151, 46, 93, 36,153,176, 52,129, 96,193, 45,219,163, 71, 15,233, 56,
-176,110,217,178,229,107,232, 72,190,124,249, 78,233, 42, 40,199,208,196,176, 30,232, 21,244, 5, 68, 9, 9, 56,192, 58,129,184,
- 45,184,123,245, 89,180,248,124, 39,110, 95,137,249,194,117, 52,121,242,100, 98, 98, 76,252, 50,251, 84,168, 80,161,224,178,101,
-203,126,108,211,166,205, 39,118, 81, 75,111, 76,148, 29, 68,139,177, 8,103,107,154, 28,146,100,205,110,205,215, 74,114, 13,162,
- 5,146,133,186, 67, 23,248, 75, 18,214, 49,141, 95,223,127,250,179,174,175,124,112, 17,194,122, 5, 98,213,185,157,111,248,245,
-203,123, 8, 9,191,113, 12,231,144, 71,159, 28, 62,159, 16,193,238,136,195,130,139, 16,214, 43,144, 44,138,226,102,227, 20, 22,
-178,135,238,159,243,166, 73,195,210, 69,225, 28,242, 32,239,255,216,187, 10,240, 40,146, 38,186,184,187,187,133,224,238,238,122,
- 56,135,235,161,135, 30,118,216,113,184, 31,110,119,184,187, 19, 36,184,123,112,119,135, 96, 65, 66, 32, 89, 32,245,191, 55,151,
-201,191,217,236,238,204, 38,129,131,187,153,239,235,111,172,167,166,187,186,167,251, 77, 85,117, 85,128,129,188, 67,137, 97,169,
-226,153, 47, 92, 56, 82, 95, 94, 61, 91, 47,222, 94, 59,101,255,238, 41, 50,110,236, 64,165,141,214,175, 95, 47,248,129, 17,124,
- 19,239,242,230,205,251,222, 17,200, 98, 29, 44,129,214,204,153,237, 34,221, 57, 51, 63,174,215,227, 85,169, 95,220,157,152,165,
- 77,211,116, 99,255,154,246,243,222,187, 55, 54, 30,122,255,100,106,111, 74,182, 6,245, 45,173,216, 86, 77,249,163,145,112, 53,
-162, 35, 62, 96,213, 97, 21, 26,194, 23,202, 23,163,239,147,211, 46,137, 14,236,118,201,219,180,126,202, 63,102,205,232,190,231,
-238,141,205,135,183,175,239,181,193, 90,178,213,191,103,209,207, 45, 91, 58,150,142,235,224,253, 63,150, 5,118, 89,117, 71,199,
-143,159, 9, 54, 89,185, 71,199,138,149, 6,210,156, 42, 67,194,133,139, 79,128, 5,105, 87,108, 37, 69,137,226, 50, 61, 91,182,
- 84,248, 52, 19, 78,202,144, 33,246,176,168, 81, 75, 15, 9, 31, 62, 46, 64,218,207,182, 10,206, 21,118, 52,118,191,246,231,159,
- 61,239, 64,106, 67, 80, 64,144,165,154, 76,112,172,162,196,157, 82,108,107,187,225,228,137, 18,189,214, 67, 51,102,244,232, 15,
- 56, 86,112,108,167,132,220,122,227,143, 42, 77,102,248, 99, 13,213,197, 99, 61, 52, 41,201, 34,200,194, 15,219,103, 91,224,141,
-227, 32,126, 16, 63,103,202,144,225,238,208,168, 81,109,217,148,153, 44,235,190,160, 77,155, 78,148,100, 5, 43, 28, 46, 0, 4,
-250, 99,108,255,208,186, 74,149,209,111,247,239,111,245,242,252,249,238,163,162, 70,109,162,167,156,170,100, 16,224,244, 37,235,
- 78, 77, 5,199,226, 0, 45,151,114, 12, 73,177, 98, 46, 19, 67,135,150, 37, 52,157,207, 22, 22, 9, 13,189,175,252,172,165, 71,
-120,245, 56,120, 17, 44,209, 36, 39,112, 78,130,180,201, 82,193, 11,193, 7, 39, 44, 85, 69, 67, 73, 22,255, 36, 97, 48,173,116,
-240,144, 0, 45, 21,112, 97,194, 22,216, 47, 41, 19,166, 10,180, 40,149,208, 2, 90,152,116,223,114,178,133, 13,145, 34,181,162,
-157, 15,255, 60, 40,221,225, 71, 65,144, 69, 32, 72,117, 18,143, 9, 22,248,140,163, 6,192,224,252,134,117,227,198, 15, 4, 18,
- 51,229, 88, 5, 89,164, 11,245,158, 34,209,161, 45,200,248,241,227, 5,210, 39,135, 52, 85,160, 69, 32, 3,144,117,138, 42, 15,
-130,141, 25, 51,102,220,231, 4,161,130, 45,170, 0, 51,100,200,240,108,200,144, 33,234,159,184,195,190,194,213,159,170,100,144,
- 3, 15,193, 21, 7, 29,110, 28, 28, 8,178,248, 65,115, 99,123, 58,106, 35, 24, 21,175, 0,120,252, 76,112, 10, 9,211, 83,126,
- 88,180,125, 33, 93,238,217,214, 4,171,236, 7,148,116,226,239,238, 25, 37,104, 0,197, 52,142, 95,174, 23,104,178, 44,172, 63,
-233,177,157,216,110, 4, 49,172, 51,140,226,201, 75,135,224, 26,239, 58, 96, 41, 13,229, 32,128, 54,251,136,247,211,224,153, 82,
- 6,166,234,176,203,249, 72, 96,205,182,199,234, 78,233,223,191,191, 64, 82,123, 92,235,227,131, 45,221, 22, 72, 28, 3,127,107,
- 85,137, 22, 65, 32, 19,164,141,159, 33,193,220,162, 69,231,123,188, 79,123, 44,170, 10, 41,197, 34,192, 82, 55, 30,243, 26,239,
- 49,143, 86,221,232,190,129, 43, 11,105,244, 78,123, 44,170, 10, 41,201, 10, 4, 90, 62,199,228,205,221, 31,100,211,162,212,194,
-123,204,195,188,124, 38,192,245,131,221, 87, 64, 50, 57,252,216,158, 22,254,119, 47, 15, 82,128, 22,211,213, 11, 43,165,103,143,
- 22,202,183,202,239,145, 63,109, 80, 45,251, 97, 97, 9,188, 8,216,223,172, 87, 17, 30, 57, 50, 33,218,253,171,115,147, 87,175,
-152,226,183,169,147, 58,110,189,113,101,253,238,153,211, 59,238,185,116,172, 77, 83,170, 17,105,179, 69,169,214,222, 29, 51,164,
- 93,243, 36,125,181,252,108,185,184,152,162,120,120,180,139,116,203, 35, 95,156,138,101, 35, 14,152, 50,161,245,246,107, 23, 55,
-236, 34,216, 90, 56,163,233, 8,121,241,103,135, 91,167, 58, 79,234,223, 61,227,149, 95,127,201,247,185,109,203, 4, 27,180,120,
-251, 45,223,167, 10,112, 70,234,212,241, 96,255, 84,246,242,136, 17,233,168, 46,132, 17,123, 14, 0, 44,101, 53, 53,250, 83,184,
-207, 31, 63,142, 58,189, 96,193, 88, 92, 83, 0,245,136, 8, 17, 42, 96, 86,138,132,103,122,226, 90,176,149,220,116, 97,128,231,
- 6, 29,172, 87,239, 23,218, 16, 17, 24, 80,138,197,190, 73, 96, 77, 41, 59,181, 24,252,241,229,216, 79,137, 15,127,220,248,131,
-149, 34,113, 98,155,227,178, 53, 77, 21,104, 81,146,195, 57,142, 38, 18,156,211,248, 19, 79,147, 1,206, 73,170, 29, 41, 42,194,
- 31,173, 96,155, 53, 77,170, 11, 33, 85,253, 96, 11,100,113,140, 38,168,227, 24, 88,177, 98, 69,191, 34, 17, 35,174,214,162, 73,
-155, 44,170, 11,109, 1, 45,190,131,194,138,140, 46, 46,126,109, 43, 86,156,224,235,233,217, 13, 43, 52,109,106, 89,108,241,147,
- 60, 77,151, 54,237, 43,206, 21, 44, 19,121,192,197, 74, 76, 60,230, 28, 74,155,223,104,145, 34,189,255, 26,253,239, 59,151,108,
-217, 14, 38,173, 34, 87,162, 73,149,137,156,192,249,135,160, 7,100, 81, 34, 65,176, 19, 26,160, 69,201,139, 53,208, 98, 7,215,
- 3,180, 88, 78,172,226, 83, 58, 5,213, 93,252,208, 8,134, 84, 32, 72,112, 69,181, 20, 1, 33,147, 22,208,194, 68,255,142,157,
-139,127,198,180, 1,162, 52,136, 32,133, 52, 72,151, 96,142,106, 9,170,171,168,154,160, 20,142,207,232, 1, 26, 0,123, 39, 8,
- 96, 8,178,152, 56, 32, 64, 13,247,144, 64,139,127, 18,217,179,103,127,214,180,105, 83, 26,246,234, 6, 90,252, 11,225, 32, 67,
- 48, 68,233, 22, 55,138,148,105,179, 66, 41, 22, 55,182, 17,193,137, 70, 27, 69,115,117,117, 29, 15,233,212,110,172, 56, 92, 12,
-247, 19,247, 88,127,218, 42,112, 96, 96,226, 66, 6,246,137,116,233,210,221,197,132,183, 20,160,112, 55,128,201,120,212, 61,154,
-158,250,171,131, 4,233,210,192,156, 3, 36, 1, 53,165, 82, 84, 71, 98,117,159,211, 64,139, 52, 65,199, 31,134,235,207,160,194,
- 84, 18,143,241, 39,230, 79,195,125,246, 11,170,122, 33,229,162, 52,138,174, 41,236,110, 0, 80,101, 49,168,190,165, 52,139,245,
- 37,207,200, 75,130,106,130,121,182, 53, 39,114,216,124,189, 2, 17, 91, 11, 43,190,198, 56,244,197,222,241, 37,129, 22,213,133,
-148,100,153, 1,178,252,158,247, 81, 36, 90, 33, 1, 90,236,107, 37,139,101,120,114,238,112, 35, 57,184,107,144,188,120,118, 86,
-233, 86, 23,207, 44,149, 38,141,107, 43,128, 26, 54,143,202, 79, 27, 36,205, 92,192, 96,119,179, 6, 90,131, 7,215,139, 92,164,
- 64,140, 95, 38,142,239,184,225,234,165, 45,155,166, 78,236,184,181,109,139,244, 99,168, 70,252,248,178,111, 69, 26,200,187,111,
- 26, 39,158, 15, 79, 73,139,198, 9,183,210,185,169, 86, 99, 64, 53, 30, 62,127,174, 72,157, 39,252,209,102,237,229,243,171, 55,
- 79,158,208,106,123,211, 31, 83,254,241, 20,106,196,145,191,151, 30,229,113,100,218,238, 73, 99,242,140,219,179, 49, 91, 49,250,
-217,210,162,247, 45,223, 7,208,234, 50, 39, 83,166, 88, 0, 77,229,159, 44, 93,170,168,195,160, 66,204, 61,217,100,138,130, 38,
-202,130, 84,146, 96,107, 80,196,136,249, 87,253,253, 67,100, 26, 18, 33, 66, 57,222,199,179,157,177,236, 52,134,117,253, 84, 96,
-112,180,121,243, 46,111,119,238, 84,128, 22, 85,133, 4, 23,150, 32, 75, 29,251, 57,166,170, 90,150,148, 73,146, 56, 4, 90, 42,
- 77, 75,160, 69,176,165, 38, 10, 0,216,151, 40,197, 39,208,162, 6, 67, 11,104,169, 52,105,147,197, 31, 61,235,141,227, 10,231,
- 36,206, 83, 28,183, 57,207,165,141, 27,247,142, 35,160,165,210, 76,145, 44,217, 67,254, 8, 91,110,228, 3,127, 92, 9,220, 40,
-184,128,180,207,119,229,220,185, 35,180,128,150, 37, 63, 85,160,197,113,143, 99, 30,231, 38, 2, 77,210, 85,199, 63,214, 63,102,
-228,200, 14, 5, 10,161,237,155,182,176, 72,104,105,126,229,231,109,131, 44,123,133, 32,208,162, 36, 67, 85,195,169,146, 44, 74,
- 52, 44, 1, 12, 39,112, 78,196, 4, 34,152,112,157, 86, 29,170, 18, 45, 91, 64,139,127,165, 90, 64,139,106, 64,150,135, 31,220,
-174, 93,187,148,206,203, 50, 18,221, 83,146,193,206,167,234,197, 41,225, 33, 72,208, 82, 29,162,238,135,249,161,113,146,254,235,
-175,191,248,199, 65, 21,153, 98,176, 13, 99,117,129,106, 74,160, 10,163,125,146,242,167,195,213, 77,124, 70, 11,104,160,227, 62,
-130,116,196, 91, 5, 89,234, 30,117,191, 79,177, 52,140,119, 95, 87,168, 80,225, 61,108,164, 20,192,161, 71,117, 72, 95,102,252,
-211, 96, 93,249,247, 69,160,197,122, 18,100, 17, 24,146, 14, 63, 28, 38, 2, 82, 29,109,100, 89,141,130,112,193,113,147,109, 76,
-241, 49, 63, 52,184,102,144,252,249,243,223, 68, 38,235, 85, 66, 14,251,179,181,141,154, 61,160, 69, 96,168, 37,209,162,234, 16,
- 82, 53,155,127,118,234, 0,196,190, 75, 73, 20,193, 50,249, 9, 59, 6,218,132,125,130,125, 85, 55, 7, 5,141, 12,144,118, 95,
- 85,107,114,208,225, 32,198, 63, 60, 14,176,116,235, 65, 27, 13,172, 10, 85, 6,222, 0, 87, 20,145,191,242,135,252, 69, 95,247,
- 37, 85,135,180,201, 34,184,162, 36,139,251, 93,107, 92, 66,164, 58, 12, 96, 64,225,230, 13,178,249,238,222, 62, 81,222,191,123,
-174,128, 45, 74,182, 86, 47, 31,130,239,178,162, 64,245,174, 0, 45,172,132,166,187, 24, 93, 64, 11,253, 35, 98,246, 76,225, 59,
-140, 29,213,126,197,149,139, 91,215, 16,108, 81,178,245,226,238,244, 44,138,205, 22, 12,228,185, 26,113,234,184,198,138,250,176,
- 67,203,244, 55,233, 65,222, 22,241,192, 5, 6,112,240,154, 35,179,169,253, 31,163,219, 45,191,124, 97,203, 74,130,173,138,165,
- 35,254,118,120,111,198,220, 71, 14,184, 22,172, 86, 41,218,164, 43,231, 87,174, 46, 87, 42,242,136,135, 87, 50, 39,160, 83,211,
- 47,218,192, 95,152, 56,236,179,154,195,103, 86,202, 81,209,162, 21,165, 19, 80,190,110, 80,180,104, 41,161, 30, 76,165,190,154,
- 54, 90, 84, 31,242,188, 87,154, 52,145, 71, 68,138, 84,145,146, 44, 74,180,108, 21, 79, 85,159, 61, 92,182,172,219,147,217,179,
-127, 84,129, 22, 1,139, 42,201, 34,200,162,166, 69, 5, 89, 28,247, 57, 6, 0,104,189,214, 67, 83, 47,208,162,198, 65, 75,117,
-168,150,147, 70,239,156,123, 44, 55,254, 20,171, 32,139,101,167,109, 42,199,168,232, 81,163,126,208, 83,206, 86,181,107,143,248,
-177,110,221,191, 85, 22,216, 84,144,165,218, 40,210, 92, 6,192,205, 63, 9,126, 48,134, 68,141,218, 76, 15, 77, 85,117, 72,137,
-150, 74,151,146, 45,206,171,156, 83,185,240,137, 99, 63,231, 18,168, 14,109,242,243, 11,119,171,239,133,188, 62,213,161,101,109,
- 56,129, 19,209, 18, 8,105,129, 44,230, 99, 7,210, 49,137,123,114,242,178,180,209,114, 4,180,168,166,209, 2, 90, 52,108,167,
-239, 44, 74,137, 40, 70,166,196,137, 98, 95,130, 36, 94, 35,224, 32,240,160, 24,153,239,198,223,137,159,150, 49, 60,238, 67,139,
- 53, 68, 81,212,243, 99,230,196,202,191, 8, 74,156,136,184,249, 7, 82,162, 68, 9, 69,213, 69, 96, 3, 0, 70, 3,123, 56, 38,
-182,191,209,173, 5,192,223, 85,107,144,197,115,168,206,204, 80, 69,190,131, 4,233, 57, 65, 1, 19, 1,135, 94,160,197, 50, 80,
- 69,200, 4,195,124,229, 89,126, 20, 84,195,193,110, 73, 1,130, 44,235,160, 65,131,244,180, 81,144, 74, 64,194,118,149, 82, 64,
-130, 56, 46, 42,160, 17, 39,164, 93, 54, 13, 76, 29,213, 63, 44,129, 22,222,163, 24,195,115, 32, 37,192, 87,237, 50,248,247, 69,
- 80, 72,233, 32, 84,178, 74,187,113,194,197,106, 78,133, 47,240,131, 69,145,191, 93, 99,120, 76,202, 67, 1,120, 63, 90,175,138,
-101, 95, 34, 16,166, 45,222,111,191,253,166,172,102,163, 13, 33,164,153,190,104,119,172, 34,255,215,108, 95,212, 24,158,134,239,
-180,201,162, 20,139,137,199,206, 24,195, 91,131,151,161, 67, 58,221,122,120,207, 67, 8,182, 78, 28, 26, 17,168, 70,236,208,174,
-166,212,170, 85, 75, 26, 52,104,192, 54,119,184,160, 36, 91,198, 8, 45,179,186,134, 31,196, 61, 65,214,152,145, 4, 68, 91,151,
- 19,108, 81,178, 69, 53,162,215,227, 69,169,105, 32,255,230,217, 28, 23,186,126, 24, 57,184,170, 2,180,186,254,156,249,153, 93,
-160, 21,224, 4, 22,174, 51,102,128,214,178,203,231,183, 45, 35,216,202,159, 59, 82, 39,170, 17,111,192,102,107,255,134,228,169,
-138, 23,142, 56,248,242,133, 13, 11, 11,230,142,216,223,195,173,122,116,123,244,190,151, 30, 6, 27,173,146, 35,163, 71, 47, 57,
- 50,118,236,180, 0, 80,217,213,114, 15,139, 18, 37, 29,165, 88,131, 34, 69,202, 11, 3,120, 87, 85,109,136, 21,124,105, 7,199,
-137,147, 67, 49,148,143, 16,161,134,173,122, 14,166, 49, 60,156,145,126,120,252,184,239,185,118,237, 90, 16, 24,208,232,157, 63,
-142, 20, 4,168, 32, 75, 53, 19, 33,200,226,184,207,159,203,148,201,146,217,148,104, 90,211,212, 11,180, 40,125,199,159, 21, 87,
-153, 7,219,130,209,180, 2, 90, 4, 47, 44, 27,133, 1, 4, 89, 43, 87,174, 84,126,228,153, 0,180,232, 38, 72,147, 38,237,190,
- 82, 36, 77,250,152,174,133, 56, 63,113, 94,227, 79, 54,105,170,243, 19,205,125,202,149, 45,235,135,213, 31, 54,231, 36, 91,252,
- 84, 37, 90,142,128, 22, 53, 59,209, 35, 71,118, 40, 33,254, 94,250,233, 55, 83, 78, 2, 45, 2, 20, 34,100,254, 41,168, 82, 34,
- 34,103, 34,114,170,169, 40,201,226, 36,199,201,142,147, 19, 39, 83,141, 10, 60, 96,231, 39, 13,126, 28,150,128,203, 82,162,213,
-175, 95,191, 64,176, 0,122, 15, 52,104, 6,186,119,224,223, 12, 59, 27, 65,129, 42,201, 82,203,200,242,241,125,116, 5, 1,122,
- 90,171,155,226, 34,223, 11,170,182,248,193,210,237, 0,109,124,104,244, 77,131,251,222,189,123, 43,170, 67,174,140, 36,120, 97,
- 94,208,140,235,168,156, 24,240, 31,195,144,250, 60,254, 94,206,192,142,228, 60,158,189, 12,131,242,235, 0, 0,119, 0,134, 30,
- 98,194,246,131, 90,239, 41, 84,113, 79,203,150, 45,251,162, 92,185,114,175, 32,125,177,105, 11, 96,249, 30, 58, 33, 85,109,178,
-200, 91,130, 44, 75,155, 44,150, 81,181, 17,224, 94, 71, 27, 5,169, 6,140,194,175, 82, 50, 68, 0,203, 54,163, 61,212,151, 4,
- 90, 4,139, 90, 18,173,128, 2,230,165,193, 58,203, 69,137, 30,219,157,171, 67, 41,113,227,223, 23, 13,248,169, 42,164, 4,170,
- 89,179,102,180,205,162,170,207,161,123, 7,128,225,123,150,171, 75,213, 65,135,253,157,245,166, 75, 15, 2, 86, 74,199, 96,167,
- 37,112,205,193,182,183, 57,232,126, 51, 31,178,142,130,132,200,189, 3, 28,151, 42,161,120, 28,132,235,225,171,195,210,189,131,
-234,239, 75, 5, 47, 87, 46,110, 95, 53,116, 72,199, 91, 13,127,204,228,123,230, 96, 3,185,123,121,176, 60,123, 48, 79,230,253,
-213, 94, 10, 23, 46, 76, 55, 34, 52, 90,182,185,218, 80,101, 11, 65,214,103,243,197,229,217, 51,153,254, 82, 65, 22,247, 4, 93,
- 84, 35,210,102,235,214,173,153,113, 60,111,254,153,152,174, 31, 22,207,107,144,119, 80,191, 50, 10,208,234,217, 37, 15, 36, 11,
-182, 87, 95,170,101,157, 58,190,169, 2,178, 8,182, 40,217, 90,133,149,138, 80, 55, 70,164,129,124,163,250, 57,254,162,235, 7,
-250,217,202,145, 41,252,104, 24,206, 43,225,122, 80, 54, 93, 43, 58,117, 52,237, 87,207, 2, 23, 13,177,104,167, 53,191, 84,169,
-168,195,163, 69, 43,164, 74,181, 88, 16,170, 10,103,194, 22, 75, 45, 20,236, 13,162, 65, 45, 88, 20,190,181,162, 2,100,213, 1,
-216,202,104, 7,108,252,237,222, 65,100,224,147,197,139, 59, 60,156, 60,185,126,138,228,201, 95,113,238,177, 4, 89,156, 87, 84,
-144,197,159, 48,142,131,200,103,115, 12, 5,216, 8, 66, 51, 86,212,168,143,248,189,115,174,179,167, 58,228, 88,202,159, 45, 52,
- 14,157, 53,219, 2, 69, 65,104,210,133, 3,127, 76,185,177, 44,212, 48,144, 62,127,218, 8,178,104, 79, 72, 27, 87,142, 41, 9,
-227,199, 63,166,135, 38,235,190,120,212,168, 54, 73,147, 36,121,207,159,127,210,180, 4, 89,156,159,184, 96,135, 63,218,113, 17,
-201, 68, 47,205, 79, 1, 54, 90,142,128, 22,237,127,163, 70,137,162, 57, 39,125,245, 78,247,109,189,208, 82,170,165, 93, 50, 78,
-224, 4, 90,122, 64,150, 58, 57,217,152,196,173,151,235, 54,135,132,228, 61,151,139, 18,168, 17,188,209,120,145, 0,136, 64,139,
- 18, 8, 46,245,167,132, 6, 30,158, 57,137, 17,229, 91,199, 93,179,233,176, 20, 18, 14, 31,170, 11, 41,170, 85,141,223,249, 14,
-218,142,113,227,123, 96, 83, 68, 59, 42,189, 14, 75, 43, 65, 61,248,142, 19, 44,197,167,180,205, 89,177, 98,133,162, 62,162, 33,
- 60, 85,134, 76,224, 19,203, 88,201, 6, 71,173,203,153, 31, 14, 88, 47, 1, 84,189,161, 33, 57,121,160,174,236,128,104,214, 31,
-134,187,175,225,129, 94,177, 7,128, 67,207, 55,152, 36,116, 57, 44,101, 59,241, 35, 38, 47,217, 94,252,192,184,177,238, 4, 94,
-228, 39, 55, 39,218, 40, 72, 85,224,164,243, 42,255, 20,105,180, 78,219, 52,242, 2,246, 89, 90, 18,173, 96,109,132,190,241,196,
- 82,132,110, 75,117, 72,208, 26, 96,163, 69, 55, 12,214,155,173,118,207,131,250,159,130,106,247, 13, 7, 46,242,148, 42,100, 14,
- 54,180,113, 35, 24, 2,112,245,134,159,179,179, 32,166,233,176, 20,237,189,215,150, 35, 93, 74, 70, 89,119, 46,124, 32,144,229,
-138, 75,130,111, 14,146,160,109,189,218,244,187,115, 50,249,189, 56, 44,181, 7, 94,208,182,133,243,229, 74,250,196,125, 93, 77,
-127,174, 70, 92, 60,171,146,192, 8,158,192,218, 30,200, 10,108, 35, 21,104, 77, 29,215, 84,145,100,169, 32,139,106, 68,218,111,
- 13, 30, 92, 58, 34, 87, 35,174, 90, 53, 56, 50,221, 63,140, 30, 93, 62, 78,183,142, 57,124, 25,162,167, 91,199,156,159, 24,136,
- 58,160,163, 6,105,119,181,172,103,142,207, 93, 70,176, 69,112,168,130, 82, 6,154, 38,168,250, 12,215, 15,244,179, 69,167,166,
-170,223,173,250, 88,165, 72, 3,122, 91, 52,181, 71,109, 93, 57,190,120,255,132, 10,176, 36,220, 53,148,156, 92,169, 82, 20, 24,
-194, 23, 35,128,162, 13,150, 90, 58, 74,179,144, 82, 18,100, 17,108,241, 62,129, 22,126, 44, 45,237,221,130,148,147,206, 69, 79,
- 78,157,218, 27,136,101,192,243,149, 43,219,210,133,131, 58, 63,113,124, 34,200, 34,232,224,143,177, 10,178, 56,222, 88,205, 73,
-118,105,102, 73,149,234, 56,213,130,212,204,240,123,231,120, 71,192, 69,147, 17,142,253,212,174, 80, 74, 94,169, 82, 37,106, 89,
- 24,185, 68,221,236,210,108, 84,186,244, 18,186,112,224, 79, 62, 37,237, 4, 70, 4, 89,252, 33, 36,200,162,166,129,115, 93,193,
- 2, 5,124, 25,213, 64, 15, 77,214,253, 17, 28,181,246,168, 95,255,119,248, 36,244,227, 15, 38,203,202,185,132,227, 19,233,114,
- 12,101,121, 49,135,124, 2, 77,213,230,205, 33, 63, 73, 51, 93,154, 52, 14, 85,135,180, 77, 5, 77, 75, 97,202,151,232, 75,186,
- 58,241, 55,154,201,177,195, 82, 91,133,230, 4,206, 78, 75,209, 36, 59, 52, 19,213, 92,236,196,156,140, 40,197, 98,167,180, 92,
- 81,161, 3,104,241, 85, 52,246,156, 6, 71,149,159,184,218,142, 31, 8, 85, 82,148, 18,177, 33, 9,184,240,110,118,144,105, 1,
-121,245, 76,184,204, 83,150,206, 72, 49,193,154,249,151,195,142,205,196,142, 8,233,134, 95,128, 36,203,158,241,178,189, 14, 83,
-153,210,170,142, 29, 59,154, 41,197, 96, 7,230, 4, 75, 7,136, 13, 27, 54, 36, 77,103,195,250,132,195, 51, 45, 81,191, 71, 48,
-252,246, 35,104, 33, 56,128, 42,202,147,160, 0, 82, 50, 63,212,225, 17, 86,203,181, 68,125,116,133,224,161, 55,126,213, 6,141,
-245, 37,192, 80,253, 75,177,157,168,226, 10, 65, 27, 5,242, 28,206, 75,111,112,128,160,115, 81, 24,202, 43, 64, 38, 32,252,142,
-163,190, 30,140,159, 80,139,110,162, 10, 90,221, 40,105,164,145, 37,109,230,104, 96, 79,112, 68,169, 97,253,250,245, 57, 73,110,
-178, 65,220,209, 71,205, 16, 60, 51,145, 78, 50,154, 0,164,135,140,207,121, 26,134,239,243, 64, 71,119, 8, 30, 24,194,151,199,
-251,223,170, 18, 65,181,172,228, 47,203,206,246,162, 84,147,131, 26, 93,143, 0,132,190, 6,125,107,207,248, 95, 98,240,249,162,
- 52,191,151, 16, 60,142,192, 11,218, 33, 26, 28,252, 14,207,158, 37,209,133, 68,137, 98,108,195,185,163,149,145,193,128,214,217,
- 99,115,150, 19,108, 81,178, 69, 53,162,189, 32,210, 1, 1,168,251,119,106,229,250,162, 73,221, 4,191,217,155, 28,173, 99, 66,
- 90,123,209,103,192,105, 21, 92,209,131, 60, 99, 34,242,156, 46, 33,236,209, 12,163,201,229,139,246,165,128, 50,134,163,155, 7,
-216, 86, 21,220,221,191,127, 68,170, 10,105,240,142, 84,134,225,118,224, 5,190, 50,212,138, 57, 9,190,168, 82,132, 93, 87,163,
- 0, 32,102, 57,230, 89,151, 83, 9,193,179,111,240,224,222,159, 63,124,232, 79, 63, 89,156,155, 44, 65, 22,199, 20, 75,144,165,
- 5,180, 56,198,170, 52,189, 95,190,252,189,113,237,218,107,115,229,204,233, 67, 41, 20,199, 78,154,160,112,145, 14,109,168, 8,
-184,226,197,142,237,141,103,186, 34, 5, 74,229,112,108,183,156, 31,125,124,126,115, 73,159,254, 1, 0,154,178, 40,135,116, 57,
-214,113,225, 22,231, 58, 74,239, 97, 38,226,143,241,138,177,100,117,215,157,126,178,222, 29, 56,208,178,239,143, 63, 14,133,225,
-251,123,168, 30,253,105, 67,170, 74,178, 40, 0,224, 15, 54,180, 82, 92, 33,152, 38,160, 77, 28,242,147, 52,179,184,186, 62, 87,
-125, 15,242,199,156,130, 11, 2, 67, 2, 56, 74,239, 73, 19,223,152,165, 52,239, 75,244,165, 48,234,230,255, 8, 25,231,129, 22,
- 3, 68,115, 18,103,162,147, 75, 38,174, 88, 83, 19,237,177,152, 8,174,212, 4, 0,225, 76, 80,105, 14,132,171,160, 34,243,231,
-228, 77, 21, 15, 86,114,249,227,218, 74,189,131,164, 13, 86,198,166,253, 21,141,221,185,178,144,137,199, 1, 54, 89,142,212,133,
-142, 58, 76,156, 0,154,135,208,201,222, 51,129,230,161, 0,154,142, 2, 96, 59,162, 25, 29, 64, 96, 34, 64,204, 51,124,116,254,
-240,201,245, 16,124,125,134,191, 5,167,131, 74,195, 8, 95,105,167, 47,212, 70, 38, 56, 49,117, 35,184,164, 58,150,106, 58, 74,
- 29, 1,184,220, 52,186,177,173,186, 39, 2, 64,187, 8,187,177,119, 84, 69,114,144,228,160,200,191, 71,130, 97, 12,104,254,165,
- 74,149,122, 3, 32,122, 17,180, 19, 57, 9,180, 66,250, 85, 5, 43, 39,192, 86,105,168, 70,159,192, 47,155, 15,255,144, 9,186,
- 84, 63, 61,148,148, 82, 26, 9,207,227,222, 1, 65,166, 75,255, 83,229, 12,105,133,109, 77,226,223, 75, 80,105, 45,240,226, 4,
- 79,130, 1, 45,170, 15,213, 68, 41,151, 35,160,101,121,207, 46,208,130, 74, 85, 81,173, 90, 38, 43, 53,171,234,212,148,225,122,
- 8,178,120,110, 85,135, 47, 49,145,125, 45,154,225, 0,172,202, 3, 68,181, 26, 30, 51,102, 54, 26,187, 83,122,133,189, 18, 52,
- 94,149, 98, 13, 13, 31,190,126,175, 8, 17,184, 0, 32,133,142,186, 43, 65,144, 39,166, 78,221, 47, 77,202,148,111, 9,172, 40,
- 0,160, 10,145,154, 11,254, 96, 90,171,254, 29, 73,180, 84, 80,168,210,188,185,113, 99,207,115,187,119,255, 86,181, 98,197,157,
-176,193,253,200,159, 64,130,161, 52,169, 82,125,132,116, 96, 62,242,219,154, 67,108,241, 51,176,156,235,199,143, 31,154, 49, 67,
-134, 7, 88, 56,101, 86,195,217,209, 4,129,106,200, 98, 69,139,210,187,187,135,179,117,103, 57, 95, 94,186,212,211,247,249,243,
- 30,155, 87,174, 28,138,149,136,207,138, 23, 43,102,230, 79, 54, 37, 89, 84, 69,210,142, 20, 63,172,148, 62,169,139, 53, 28,150,
-147, 52, 7,255,250,235,226, 2,144,174,209,221, 14,199, 62,106, 68, 8,188, 8,226, 96,155,250, 1,115,205, 19, 8, 1,106,218,
-235,243, 78,124,127,255,230,172,206,169, 14,195,136, 19,122, 62,234, 2,120, 23, 37, 24, 76, 60,214,218,244,208,212,162, 97,125,
-255,159,162,153, 6,157,119, 59,140,222,221, 81, 32,245,207,195, 81,217,255,137,114, 70,196,199, 55, 11,158,221, 47, 1, 40, 93,
-202,145, 35,199, 44, 20, 48,152,175, 27, 29,131, 36,179,240,163, 47,137, 1,160, 55,212,116, 91, 81,247,123,144, 64,221, 3,168,
-223, 10, 0,219,155,247, 44, 6,134,127,178,141, 88,206, 42, 40,227, 90,252, 76, 92,192, 96,253, 16, 64,246, 33,202,121, 1, 0,
-153, 94,161, 41,117,176,231, 21,252,159,104, 35,103,251, 59,243, 7,150, 51,123, 70, 83, 29, 71,128,192,146,184,133, 61,151, 2,
- 34,248,172,147, 3,111,120,250,201, 10,240,149,165,233, 26,193,178,156,214,239,214, 99, 35,102,135, 49,129,117, 87,141,225, 9,
-174,212,164, 37,209,210, 3,180,244, 54, 72,118, 4,160,134, 20,237, 55,134,237,177,241,204,119,215,151,172,235, 0, 96,149, 20,
-206, 72,107, 66,245,215,139, 14, 73, 33, 65,106,131,227, 62, 86, 54, 89,186,164,247, 42,109,218,125, 37,135,199,247,148,137, 19,
-191, 65,242, 78,149, 36,137,119,234,164, 73,223,208,240,157, 54, 89, 14,126,254,237,242,147, 52, 7, 67, 43, 2,149,103, 75,148,
-175,111,135,136, 17, 71,164, 14, 23,110, 59,254,248,214,192,176, 51,139,131,246,212,164,137, 21,151, 63, 21,142, 18,101, 99,122,
-140,119, 49,162, 69,251,128,244, 62, 41,132, 18, 16, 4,116, 6, 93,167,235,206,114,114, 37, 38,221, 94, 48,177,204, 57, 76,166,
-129,176,201,186, 73,117, 33,126, 2, 63, 16,100, 81, 66,175,231,219,180,172,123,139,136, 17,199,101,136, 28,249, 68,170,248,241,
-111, 39, 73,144,224, 25,104, 62, 68, 57,143,128,206,159, 72, 25,117,142,243,122,187,191,145, 47,140, 56,240,221, 15, 20,161,224,
-131, 81,247, 80, 48,239,223, 56,233,132,130, 29, 70, 95, 10, 5,243,140,190, 20,132, 3,255, 88, 95, 98, 24, 30, 75,227,120,141,
- 38,253,199,202,233,100, 87,251,214,202, 73,155, 44,254,180, 91,255, 8,126,107,229,116,146,205,223,101,118,231,124,106,133,162,
-138,223, 75,227, 26,229, 12, 69, 35, 27, 19,217,183, 49,145, 57,217,132, 70,159,119,146, 97, 6, 48,176,203, 1,163, 47, 25,125,
- 41,108, 57,240,239,160, 22, 4,104,241, 35,177,149,156,169,170, 61, 26,142,174,107,209, 55,104,218,110,151,144,182,151,193, 79,
-131,159,122,251,128,241,109,218,231,128, 94, 30, 90,230, 51,248,105,240,211, 22, 7,254,203,125, 73,229, 71, 72,231, 51,173,111,
-234,159,184,239,188,195,210, 48, 42,165,241,167, 19, 70,140, 12, 32, 99,240,211,224,103, 88,113,192,232, 75, 97,197,201,191,233,
- 24,252, 52,248, 25, 86, 28,248, 47,247,165,176,226,225,127,138,206,247,220, 97,146,162,165,152,244,108,182,242,126,207,117,215,
- 83,103, 71,121,254,109,117,119,166, 47,124,141,186,167, 4,243,153,244,110,204,155,220, 42,243,215, 40,167,222,242,253,151,250,
-146, 51, 60, 49,218,200, 25,110,105,231, 53,248,169,205, 35,103,114,124, 9,126, 58,243,126, 35,111, 0, 7,108, 53,132,222, 73,
-203, 94, 62, 61,141,171,247, 29,106, 67, 89,211, 28, 21, 46,156,233, 51, 19, 50, 32, 74,132,195,205, 94, 94, 61,229,180, 38,156,
- 2, 46, 50,186,194,169,235, 18,184,123,224,138,148, 36, 78, 78,142,153,224, 30, 97, 50,157,104, 50,241, 24,207,103,210, 40,191,
-222,114,114,117, 76,123,184,181,216,195, 85,120, 88,221,178, 7,231, 63, 35, 57,181,106,198,162, 44, 92,201,195,240, 53,195,144,
-114,235,248, 98, 2,203,153, 36, 71,173,149,137,115,212, 58,139,116, 62, 97,206, 26,153,184,231, 57,175,235,160, 99,153, 69, 79,
-221,157,233, 11,164,173,135,166,147,197, 12, 66,211,217,242, 76, 64, 3,249,219,232,203, 95,186,156,206,214,209, 94,126,163,156,
- 97,197,201,191,233, 24,252, 52,248, 25, 86, 28,248, 18,125, 41,172,202,246,253,210,193,114,247, 31, 49,201,238, 68,218,193, 99,
- 29, 53, 9, 41,128,113, 52,153,104, 53,174,229,179,227,116,148,209,122,240, 73,202, 73, 73,117, 86,137, 99,127, 44,237,159,130,
- 58,143,178, 78,188,206,251, 22,121, 9,204, 84, 41,152, 86, 57,173,139,150, 20,161, 98, 86,193, 55,140, 27, 66,234,184,193, 17,
-159, 27, 2, 58,175, 64, 38, 75, 73,132, 93,154, 88,130,219,184, 80,225, 98, 30,251, 14, 30,187,118,245,250,157, 71, 23,175,220,
-186,179,105,219,174, 19, 57,115,229, 62,206,123, 14,248, 96, 77, 83, 1, 84, 88, 26,188, 7, 75,132, 31,112,143,243, 14,240,159,
-178, 17,177,174,238,192,121,169, 39,226,139,189,218,183,111,223,195,214,173, 91, 95, 15, 23, 46, 28,221,114, 88, 47,211,183,166,
-105, 75, 2, 51, 16,206,106,183, 33,100,134, 59,220, 91,140,176, 42,159,173,252,129, 52, 9,170,158,190, 54, 11, 19,142,149,125,
-192,241, 89,157,237,173,102,211,106,163, 96,125, 1, 64,211,210, 13,199,215,150,100, 6, 43, 15, 42,162,198,110, 44,128,227,169,
- 1,137,199,220,146, 69,139, 26, 53,172,250,167, 30,214,106,241, 83, 15, 13,235, 60, 6,205,144,112,205,254, 51, 6, 63, 13,126,
-134, 21, 7,190, 68, 95, 10,171,178,253, 19,116,242, 5,188,148,115, 54,237,181,172,181, 8,250,202,196, 16, 37,112, 14,231,193,
-132, 99, 78,192, 90,155,101, 67, 4,155, 36,224,172,116, 71,245,234,213,221, 44, 19,175, 57, 0, 47,124,159,163,198, 85,222, 97,
- 54,251, 42,216,135,116, 16,218,102, 45, 0, 82,215,148, 41, 83,198,119, 80, 88,187,229, 12, 31, 62,156,255,166, 77,155,118, 32,
- 28,131,155,117,226,117,222,119, 6,104,181, 52,153,162, 54,140, 26,181,116,115,128,159, 38,145, 34,117, 98,106, 17, 45, 90,163,
- 44,113,227, 78,120,112,239,222, 22, 4, 70,118, 67,108, 61, 55,132, 85,112, 3,253, 77,144,112,117,178, 40,183,189,186,103, 46,
- 82,180,248,201, 55,111,189, 63,220,191,115,207,235,247,174,253,119,244,236, 49,120,253,244,121,171,182, 28, 58,126,238,104,214,
-172, 57,142,130,134,102, 56, 18,228, 33, 96,218,128, 16, 51,183, 16,244,244, 33,130,116,191,132, 87,224, 59,112,182,247, 8, 78,
- 75,223, 34, 88,169, 95,255,254,253,205,244,148, 15,167,157,102,120, 55,246,131,135,252,115,120,134,222,146, 45, 55,203,114, 6,
- 2,223,240,225,195,143, 71,124,194,152, 76, 0,112,195, 85,160, 5,201,219, 88,245, 58,243,216,145, 38, 6,151,104,229,172,245,
- 94, 1, 88,216, 91, 74,180,208, 55,135,210, 7,150,157,100, 25, 4, 90,107,160, 8,210,103,209, 79,165, 70,141, 26, 39,208,159,
-122, 3,120,254,165, 85, 78, 59,253, 45, 51, 28,204,222,133, 15,177, 32, 97,140, 18,231,174, 83, 44,107,201,230,131, 18,102,175,
- 85,218,198,115,106, 57,131,148, 7,125,143, 81, 20,250, 5,228,159, 9,135,178, 30, 76, 56, 71, 72, 57,172,165,143, 19,167, 30,
-128, 86,160, 55,254, 0,169, 86, 72,127, 4,180,190,117,173,111, 83,207,243,182,242,104,181, 81, 72,232, 26, 52, 67,194, 53,251,
-207, 24,252, 52,248, 25,182, 28,248, 62,169,169,171, 12,173,247,206,213, 6, 19,215, 17,130, 44,132, 32, 33,208,162, 19, 51,173,
-205, 26,192, 4,130, 18,123, 0, 70, 3,188,104, 13,230,156,136,252, 85,160,165,190, 3, 94,190,221, 74,150, 44,201,137,183,136,
-157, 2,219,146,188,249,243,121, 72, 91, 46, 91, 72,178, 86, 16,108,225,124,133,122,141,247,153,143,239, 5,109, 75, 53, 99,176,
-193,167, 30,194,130, 52,141, 18,165,253,222,217,179, 91,123, 63,125,218, 30, 51, 96,103,166,219,151, 46,117,249,185,101,203, 19,
-240, 74,124,238,218,185,115,187, 17, 87,207, 13,225, 20,220, 0,114,220,160, 66,164, 71, 98,117,179, 57,160, 65, 77, 56, 99,247,
-190,195, 87,238,223,185,255,242,218,217, 11,143, 7,119,252,117,211,144,190, 35,214,252, 62, 98,234,194, 69, 43,182,174, 90,184,
-124,237, 70,230,209, 81,247,174,136,235,117, 3,113, 3,253, 16, 26,194,140,112, 52,230,198,141, 27,155,225, 21,216,236,230,230,
-246, 1,161, 29,204, 51,103,206, 52, 35,230,163,185, 83,167, 78,230, 58,117,234,152,225,233,253, 38,226,116,217,139, 8, 96, 13,
- 12,252,225,236,113, 47, 2,105,187, 35,150,165,123,133, 10, 21,220,203,151, 47,239, 94,171, 86, 45,119, 72,243,220, 17, 7,114,
-175, 51,192, 85,149,108,113,111, 89, 55, 2, 44,132,139,122, 12, 32,247, 24,222,220, 31,195, 19,253, 99,132,147, 80, 18,239,105,
-241,211,138, 79,163,170, 87,175,230, 79,144,133,128,213, 94,240, 18,239,129, 96,227,231, 92, 93, 51,134, 4,192,100, 70,172,180,
-231,244, 94,141, 40, 8, 79, 45,223,147,171,124,235, 97,175,222,120,191,233, 53,244,207,149,137,179,213,206,101, 85, 6,107,224,
-202,190,201, 88,142, 79, 16, 94,202, 3,125,177, 22,242,207,189,113,227,134, 7, 19,142,231, 64,218,154, 24,158,246,247,160,141,
- 60,195,135, 11,167,252,116,104,245, 79,173,143, 89,199,125, 99,194,213,193, 36, 39,178, 24,252,116,130, 89, 58,178, 26,252,212,
-193, 36, 39,178,124, 9,126, 58,241,250,111, 46,171,181, 36, 43,168, 31, 45, 76,162,162, 38, 71, 69,199,128,190, 14,225, 82, 60,
- 48, 17,115,112, 95,231,108, 53, 33,173,152,198, 1,159,147, 41, 66,187,220, 40, 91,182,172,155,173,196,123, 42,120,225, 51, 78,
-190,103, 52,223,193,132, 50, 94,255,249,231,159,221, 32,157,113, 67,224,106,170,226,214, 34, 16,167,170,106,113, 72,150,106, 65,
-130, 62, 2, 42, 53, 35,143, 3,128, 86,144,107,204,199,252,142, 8,214,133, 87,221,158, 89,179,254,236,243,252,121,251, 15, 15,
- 30,180,185,191,122,117,195, 91, 83,167,214,117,255,253,247,230, 13, 43, 87, 94,125, 17, 34, 44,196,148, 56,183,113,254,252,243,
-115,166, 77,219,133,128,197,110,189,122,245,218, 4, 47,191,109,180,234, 15, 16,117,240,226,229,155,247,127,235,210,111,219,152,
- 30, 3,182,252, 57,106,178,219,156, 89, 75, 54,204, 91,234,182, 98,233, 26,247, 69,199, 78, 93, 36,208, 58,168, 69, 7,222,217,
- 79, 34,252,194, 99, 0, 33, 51, 66,226,152, 17, 42,194,140,201,220,204,240, 17,144, 96,249, 33, 14,165, 25, 49,254,204, 5, 11,
- 22, 52, 3, 48,153,193, 79, 51, 0,217, 27,208,126,107,135,182, 2,124, 85, 68,194, 54, 69, 28,202,189,144,216,185,223,187,119,
-207,253,244,233,211,238, 8,246,237,142,128,216, 74,130,196,204, 17,208, 10,246, 10, 71, 64, 11,161, 57, 30,163,189,174,218,144,
-106, 89, 74,180,180, 88, 98,130, 36, 52, 39,130,124,159,131, 36,239, 28, 98,125,121, 64,178,231,129,120,101,231,106,212,168,110,
- 15,104, 5,210,196,187,219,163, 95, 60, 98,130, 7,252, 17, 12,172,205, 96,223,220, 84,160,165, 74,178,146,228,168,217,125,243,
-206, 35,199, 30, 63,125,241,172, 64,149, 14,127,196,205, 93, 43,174,189,194,193, 62,206, 5, 65,212, 55,157, 59,119,206,227,225,
-195,135, 30,136,195,233, 1, 73,155, 7, 64,171,146, 16, 51,211, 3,224,213, 3,223,180, 34,225, 2,224, 58, 14,169, 97, 78,205,
-202, 26, 25, 12, 14, 24, 28, 48, 56,240, 15,114, 64, 47, 22,249, 7,139, 24,186, 87,179,130, 90, 20, 48, 81,204,130,132, 0, 88,
-195,131, 64,139,161, 88,156,222, 0, 28,126,135,202,105, 7,130,243,186,165, 75,151,206,218, 54,199,196,107,188,199, 60,204,235,
-244, 11,254,126, 64,181,157,137,128, 16, 42,249, 16,252,119, 46,130, 55,187,173, 89,179,134,210,168, 95,245,208,180, 7,170,108,
- 1, 45,235,107,214,244, 17,192, 44, 58, 37, 89, 4, 89, 94, 39, 78, 52, 29,215,160, 65,199,140,105,211, 94, 73,139,104,233,133,
- 10, 22,124,245,107,143, 30,247,111,157, 63,127,234,198,165, 75,167,142, 29, 58,116,118, 34, 38,245,161, 67,134,108,197, 36,207,
- 40,241, 9,180,202, 11, 91,170,205,231, 47,221,184, 49,122,236, 95,155,110,223,184,125,119,197,226, 53, 91,183,238,216,191,229,
-233,139, 87,119,247, 30, 58,189,230,216,201,243,171,153, 71,139, 14, 84, 90,222,144,162,121, 83, 82,133,189, 25,161,119,204,152,
-192,205,144, 6,154,139, 23, 47,238,219,168, 81, 35,115,215,174, 93,205,144, 70,153, 49,121,155, 11, 23, 46,108,134,234,240, 58,
-212,128,103,237,209,134,138,109,174, 10,174, 17,219,241,118,203,150, 45,221,155, 55,111,238,142, 24, 98,238,144,190,184,195,238,
-203, 29,177, 30,221, 33, 57,115, 7,125,119,196, 25,188, 29, 0,148, 53, 23, 34, 56, 2, 90, 80,193, 90, 75,175,180,170,111,125,
- 63, 60,128, 82,115,252, 8, 28,155, 51,103,142, 7, 2, 94,123,252,249,231,159, 30, 0,192, 30,136, 37,230,129, 64,174, 94,148,
-116, 57, 90, 48,193,224,225,176,183, 19,148, 69,192, 43,111,216,182, 41,177,217,184,161,159, 43, 18, 45, 85,146,213,115,240,244,
-149, 46, 69,154,140,188,121,247,225,131,237,251, 79,122, 36,202, 81,203, 50,184,112,176,178, 83, 98, 69, 53, 59, 37, 88, 8, 88,
-235, 1,233,157, 7,191, 77,158, 95,189,122,213, 3,192, 85, 1, 89,195,134, 13,227,183, 90,195,217,202, 27,249, 13, 14, 24, 28,
- 48, 56,240, 79,112, 64, 15, 22,249, 39,202,165,227,157,170, 68,203,126,188, 67, 61,149, 11, 11,160,197, 9,162, 98,197,138,235,
- 9, 78, 16, 17,221,141, 18, 3,181, 2, 60,230, 53,222, 99, 30,230,213, 81, 57,205, 44, 0, 91, 89, 84,186,249,242,229, 91,168,
-249, 0, 50,132, 37,208,106, 26, 53,106,137,189,127,253,213,218,252,248,113,219,209,245,235,119, 74,148, 48,161, 15,162,162,251,
- 33, 8,170, 25,129, 59,205,199,142, 30,245,107,215,166,205,203,189, 91,182,120,204,152, 60,217,163, 84,222,188, 71, 51, 37, 78,
-188, 24,197, 72,167,167,172, 48,208,238,191,122,221,230, 51, 71, 78,156, 63, 61,111,201,134,117,222,239, 62,188,241,245,245,123,
-123,254,202,205,221,215,110, 61,216,245,215,236,121,155,152, 71,139, 22,212,160,231,160,102,125, 8, 21,158,153,210, 43, 72, 70,
- 8,176,204,144,232,152, 33,101,124, 67,208, 5,117,159,114, 45,127,254,252,102, 76,244,102,128,216, 3,160,139,144,102,246, 55,
-188, 59, 45,128, 94, 38,213, 14, 11,237,156, 3, 42, 47, 69,138,213,165, 75, 23,119,158,171,247,184,103,126, 80,211,116, 95,224,
- 8,104, 97, 81, 65,136,129, 22,250, 75,154, 12, 25, 50, 44,156, 53,107,166, 7, 36,112, 30, 0,254,138,116, 8, 54,107, 30, 75,
-150, 44, 81,142, 65,159, 0,134, 11, 1,236,186, 0, 1,208,242, 36,208,162, 20,107,254,252,249,130,133, 4, 74,250,252,249,179,
- 32,118,164, 2,180, 18,229,172,249,163,219,206,195, 71, 31,121, 62,127,154, 52, 79,221,129,211,230,175,119,231,113,226,156, 53,
- 59,106,181, 23,128,160, 43,128,224, 74,216,204,121, 64,226,232, 49,105,210, 36, 5, 96,225, 39,197, 3,253,221, 3,192,245,120,
-218,180,105,127,209,162, 99,220, 55, 56, 96,112,192,224,192,183,194, 1, 61, 88,228, 91, 41,171, 85, 57,180,109,179,244, 84, 46,
- 44,128, 22, 11,134,137,181, 29, 36, 2,110,187,118,237,114,131, 10,101,130, 90, 88, 30,243, 26,239, 49, 79, 88, 49, 19,147, 77,
- 90, 72, 81, 20, 0, 7,144,176, 74, 15, 93, 11,160, 21,104,143, 69,219, 44,107, 27, 45,139,107,118,221, 64, 52,143, 25,179,129,
-215,189,123,237, 61, 55,111,110,152, 33,117,234, 27,219,221,221,253, 62,126,252,104,126,239,227, 99,134,205,155,249,197,243,231,
-230, 85,176,139,106,222,168,209,157, 38,213,171, 47, 56,184,114,101,171,102, 49, 99,194,164, 75,247, 22, 51, 81,146,164,123, 47,
- 92,190,126,227,196,233, 75,251, 87,173,221,178,103,207,254,195,199, 31, 63,121,126,252,252,165,171, 71, 96,120,189, 15,148, 98,
-233,160, 54,168,105,211,166,103, 1,130, 20,181, 96,209,162, 69, 21,144, 69, 27, 45,168,206,104, 8,239, 11,213,153,239,143, 63,
-254,232, 11,208,117, 15,234,171, 35, 88,117,120, 2,116,163,232,160, 29,152, 5,193,169,123, 34, 34,188, 59, 64,135,251,214,173,
- 91,221,121,238,204,243,106, 94, 71, 64,235,229,203,151,214,170, 67, 93, 42, 67,130,253,210,165, 75, 31, 57,118,236,152, 7, 84,
-156,138,106,238,214,173,155, 30,231,207,159,243,128, 10, 90,145, 24, 1, 60, 41, 82, 45,180,125, 67, 71,229, 6,223, 61, 33,101,
- 18, 60, 39,224,161,178, 7,192, 86, 36, 92,120, 86, 1, 90,105,211,150,142, 90,169,113,159, 25,111,222,250,188,171,213,178,255,
-220,166,157,135, 45,228,113,137, 90, 93,161,138, 30,172, 39,232,178, 9,224, 52, 50,232, 21,131,180, 80,145, 98, 65, 58,232,129,
-122,100,196,247, 20, 27,215,163, 3, 56,182,163, 36, 23, 18,226,144,173,130, 9, 73,227, 24,207, 24, 28, 48, 56, 96,112, 32, 4,
- 28,208,131, 69, 66, 64,246,107, 60, 18,122,137, 22, 37, 13,144,120,248,162,180, 84, 49, 10,143, 57,144,135,164,244,176, 87,137,
- 3,192,179, 22,246, 57,110,152,212, 9,170, 10, 49,241,152,215,120,143,121, 66, 66,219,214, 51,248,243,111, 49,109,218, 52, 55,
-216, 31,185,225,120,128, 30,186, 42,208,178,181,218,208,214, 53, 75, 91, 46,107,250,141, 35, 69,234, 0, 49, 70,167, 7,243,231,
-215, 65, 52,116, 31, 74,178, 8,178,124, 33,205,186,127,239,158,249,224,129, 3,102,216, 39,153,243,231,205,251,226,236,138, 21,
-117,222, 92,191,222,136,207,232, 41,167, 69,158,180,165,203, 86, 56,253,232,201,243, 43,219,247, 30,217,116,236,228,185,173, 94,
-175,222,156, 41, 83,182, 2,141,163, 51,234,164, 21, 5,192,233, 88,213,170, 85, 79, 96,210,190,135,189,185, 72,145, 34, 31, 96,
-231,102,182, 76,241,227,199, 55, 67, 37,120, 11, 52, 9, 46,163,233,164,173,100, 3,230,141, 11,251,174,205,176, 47,114, 63,120,
-240,160, 98,163, 85,179,102,205,205,188,238, 12, 29,230,213, 2, 90, 48, 90,127, 12, 48,247,248,252,249,243,186,165, 91, 0, 37,
-147,168, 30,132, 77, 31, 64,213,117, 5,104, 61,125,250,212,227,249,243,231, 30,102,179, 89, 81,207, 1,132, 30, 70,127,109,130,
- 34,216,242, 33, 22, 88,141,184,113,227,210, 21,134, 44, 95,190, 92, 0, 96, 5,139, 8,148,116,253,250,117,193, 34,135, 48, 3,
- 90,232,211,245,193, 83, 20,249,184, 7,237,182, 86,173, 90,229,129,111,104, 19,250,100, 99,168,127,183, 82,229,185,122,245,106,
- 15, 72,209, 28, 74, 30,157,229,191,145,223,224,128,193, 1,131, 3, 97,205,129,239, 24,104,133,142, 21,152,124, 74,194,137,230,
- 14, 2, 44,117,227, 49, 36, 30,116, 94, 25,162,149, 7,160,217, 12,170, 14, 55, 24,215,187, 65,253, 52,131,137,199,188,198,123,
-161, 43,241,255,159,198,132, 88, 21,147,220, 38, 2,184,223,127,255,157,171,248,202,232,161, 29,150, 18,173, 64,160,181,104, 81,
-157,120,113,227,250,188,123,247,206,204, 4,131,112, 51,164, 91,230,101,203,150,153,231,205,157,107,206,156, 41,211, 83,223, 19,
- 39, 42,123, 94,184,208, 0,110, 31,232, 12,212,169, 13, 70,233,235,175,223,184,115,228,212,185,107, 43,174,222,188,183,226,214,
-221,123,187,120,205, 41, 34,112, 63,129,252, 35, 9,164, 0, 20, 40,201, 50, 67,250,100,222,191,127,191, 25, 64, 85, 89,113, 8,
-154, 15, 45,104,198,130,161,245,194,216,177, 99, 15,215,243, 30,180,109,147, 69,139, 22, 41, 0, 11, 43,240,220,143, 28, 57,226,
- 14, 9,166, 59,175,235,121,222, 50,143, 35,160, 5, 96, 20, 34,137, 22,192,200, 30, 44,110, 80,212,131, 76, 4, 47, 4, 91, 80,
-247,121,140, 29, 59,246, 36, 93, 71, 64, 37,168, 43, 98, 0,120,226,137, 5, 5,130,149,154, 2, 53,158,162, 62,156, 58,117,170,
- 64,106, 75,183, 12, 10,208, 74,156,189,102,237,144,170, 14,249, 60, 37,191,144,150, 41, 0, 11,160,206, 3,139, 24, 20,117, 39,
-248,234, 49,106,212, 40, 69, 10,199, 5, 44, 1, 18,184,159,156,229,177,145,223,224,128,193, 1,131, 3, 6, 7,190, 32, 7, 48,
-233,196,195,196, 50,146,171,154, 96, 76, 78,201, 72, 16,160,197,191,251, 63,254,248,195, 3,170,159, 9,206,218, 83, 33,127, 12,
-252,109,175, 32, 0,130,171,128, 29, 76, 60,230, 53,222, 11, 65,181,130, 56,143, 68,185,115, 99,133,225, 48,216,174, 40, 82, 50,
-186, 75,128, 1,242,120,168,133, 34,234,161, 29,150, 54, 90, 84, 3,122, 61,124,216,238,245,254,253, 13,168, 58,132,132,195,239,
-197,139, 23,102, 72,116,204,203, 1,178, 80, 54, 51,120,236,155, 61, 83,166,227,159,110,222,172,114,108,209,162,134, 80, 55,234,
-113, 8, 27,164, 42, 89, 93, 83, 95,110, 80,183,210,135, 26, 63,148,244, 46, 89, 44,231,171,178,165,243,189,203,146, 49,213,101,
- 61,245,181,204, 3,224,180, 19,233, 30,128,194, 43,216,251,152,177,250, 81, 81, 31, 14, 24, 48,192, 12,201,136, 25, 32,225, 25,
-239, 51, 1, 32,121, 2,152,248, 34, 47,129,184,195, 13,246,113,145,138, 21, 43,182,138, 32, 11,128,154,224,234, 47, 72,143,220,
-247,238,221,235, 14, 99,241, 85,188,175, 69, 67, 47,208,130, 93,148,110, 41,150, 37, 77,244,155, 93, 4, 88,170, 93, 22,143,209,
- 86, 30,112,237, 64, 85, 97, 77,103,202, 7,254, 60,154, 60,121,178,160,125, 5, 18,225, 15, 88, 96, 32,211,167, 79,151, 25, 51,
-102, 8,164,130, 10,208,202, 81,166,213,239,116,235,224,172, 49, 60,159,165,202, 16, 42,220,195, 4, 89, 88, 13,234, 1,187,185,
-109, 84, 17, 2,192, 30,223,176, 97,131, 7,250,151, 98, 87,134, 60,199,168, 62,196, 35, 17,156, 41,191,145,215,224,128,193, 1,
-131, 3, 6, 7,190, 32, 7, 0,178,234, 67, 53,120, 28,147,171, 7, 38, 8, 15,252,153,123,192, 1,162,153, 96,139, 9,170, 61,
- 51, 85, 42,244,171,133, 63,116,143,188,121,243,158,160,138,206,153, 34, 97,240,175,139,201, 65,113,229,192,196, 99, 94,115,134,
- 70, 64, 94,213, 41,166, 63,188,160, 31,129,225,246, 18, 26,191,195,254, 71,177,203,162,205, 23, 64,214, 56,218,171,232,165, 29,
-150, 64,171, 81,196,136,197,183, 79,157,218,218,236,229,213,110, 74,199,142,237,227,199,139,231, 51,113,194, 4, 63,247,109,219,
-204,115,102,207, 54,183,105,221,218, 15, 42, 69,239,245, 83,166, 52,250,228,233, 89, 99, 66,141, 26, 45, 26, 68,138, 84, 88,111,
- 89,153, 15,146,141,210,237,219, 54, 21,111,111, 47,121,246,244,158,108, 90, 55, 93, 22,204, 25, 36, 69, 10,102, 23,222,115,134,
- 22, 36, 86, 15, 32, 17, 49,195,159,151, 25,252, 83, 86, 30,210, 65,105,223,190,125, 21, 80, 8, 73,137, 98,196,207, 4,208,100,
-134, 1,182, 89, 15,208,130, 52,177, 52, 92, 36, 40, 82, 44,128,129,141,224,113, 66,238,105,175,213,187,119,111,119,189,210, 70,
-181, 46,142, 36, 90,232,155, 33, 2, 90, 40,211,140,206,157, 59, 19,164,156,164,157,214,182,109,219, 20,105, 22,236,209,246, 57,
- 11, 84,160, 94,111,143,254,248,136, 9, 6,254, 35,184,210, 16,174, 81, 4, 32, 83,192, 47, 85,162, 85, 52,107,137,150,253, 19,
-103,175,213, 83,175,123, 7,181,254, 40, 83, 44, 72,202, 60,206,158, 61,235,129,213,159, 30,176,193, 82, 92,151,224, 71, 37, 61,
- 86,120,206, 64,187,185, 99,255, 23,207,157,105,127, 35,175,193, 1,131, 3, 6, 7, 12, 14, 56,205, 1,213,174, 92,191,103,120,
-122,126,135,131, 71, 15,216,147,120, 64,162, 65, 95, 60, 39, 49, 9,245, 38, 88, 1, 0,139,130,125, 87,122,201, 62,117,234,148,
- 98,187, 2,187, 35, 91,222,226, 29,170, 21, 49, 1,165,178,242, 2, 79,160,148, 74,163,122,214, 52,131, 57,197, 84, 61,185,207,
-155, 55,207, 13,101,220, 8,240,246, 11,108,128,168, 18,179,183, 5, 43,103, 24, 0,173, 64,154, 45,161,142,163,123,135,151, 15,
- 30,180,125,127,235, 86,163,191,122,245,106,237,146, 54,237,181, 4,241,227,191,131,193,180,119,166, 12, 25, 46,172,154, 60,185,
-177,239,189,123,213,206,172, 88, 81, 15,171, 20,219,116,177,109, 96,238,144,159,174, 46,169,101,234,132, 1, 50,126,116, 47,233,
-217,249, 71, 37,185,164, 79,169,229,182, 35, 24, 77,128,130, 11, 52,214, 70,242,166,147, 82, 26,196,247,236,217, 83, 1, 90, 19,
- 38, 76, 48, 67, 42,101,222,184,113,163,146,134, 14, 29,106,134,219, 12,107,160,101,179,156,232, 55, 19, 1,202,221,161, 42,117,
- 7,109, 84, 81, 89,221,217, 5,224,205, 29, 52,220,121,223,153, 54,114, 4,180, 60, 61, 61,245, 0,173, 96,229,164,221, 33,250,
- 75,183, 60,121,242, 28,229, 15, 6,127, 38, 8,180,112,109,139,206,207,206, 81, 27,101, 6,232,125, 10, 41,161, 96, 21,102, 16,
-135,165,170,100, 75,135,195,210,192, 98, 16,104, 17, 96, 81, 85, 8,231,178, 4,131,122, 22, 60,168,207,135, 72,229,239,228,183,
-169,147,101, 14,179, 25,229, 12, 11, 46,254,159,134,193, 79,131,159, 97,197,129, 47,209,151,194,170,108,255, 4, 29,231, 61,195,
- 99, 2,220, 65,144, 5,251, 18, 15,252,137, 31, 7,240,178,246, 86,205, 73, 50, 51,239, 17,100, 5,248,214,218,105, 85, 59,173,
-134, 8,226,208, 50,192,123,181,150,253,139, 38,208,130, 31,168, 29, 48,226,166, 39,248,159,117,170, 52, 29, 1,173,144,174, 58,
- 12, 66, 19,193, 6,211,119, 78,155,246,231,103,215,175,255,244,201,203,171,137,239,165, 75, 53,124, 78,159,174,226,123,241, 98,
- 37,185,123,183, 10, 37, 89, 4, 89, 45,227,197,251,185,142,201,100, 25, 79,207,146,165,118,249, 25, 40,209,122,251, 82,158,122,
-222,149,141,107,167,201,252,217, 3,245, 72,180,236,210, 4,232,189, 71,160, 5,117,151, 25,182, 69,102,248,190, 50, 67, 34,101,
- 6,104,125, 6,213,215, 19, 38, 72, 62,159,119,239,222, 93, 23,208,170, 92,185,242, 42,216,122, 41, 94,224,161,214, 85, 92, 87,
-112,223,160, 65, 3,119,168,186,220,161,214,117,195, 37,123, 6,230,129,229, 12, 12, 42,173, 29,130, 71,107,165,161,221,186,115,
-133, 30,250,207,112,248, 12, 59, 9, 99,122, 2, 45,119,157, 95,174, 86,159,207, 12,199,176,119,225, 77, 63,104, 8,158,236, 53,
-139,102, 41,217, 98, 64,210, 28, 53,171,218,120,143, 77,154, 42,208, 58,122,244,168, 7,140,225, 13,160,165,179,129,144, 77,171,
-141,244, 83, 50, 0, 12, 57, 96,240, 51, 36, 61,198,254, 51,255,101,126,134, 45, 39,191, 46, 53,107,255, 89,218,158, 19, 2, 2,
- 72,239, 0,152,218,141, 99,187,174, 6, 52, 2, 77,235,233, 48,142, 2, 72,219, 98,147, 45,154,129,170, 67, 24,113,207, 15,240,
-254,238,140, 61,138, 93,160, 21,138, 85,135,193,104,194, 23, 64,218,102, 81,163,182, 93,214,189,251, 79,151,119,236,104,134,213,
-133,141,159, 95,188,216,240,248,226,197,141,168, 46,164, 36,203, 1,200,210, 28,208, 92, 50,164,116,175, 92,161,176,116,110, 95,
- 87, 73, 60,230,181, 80, 72, 33,242, 64,141,120, 31,128,234, 49, 84,197,143, 97, 28,255, 24, 42,175,199,148,120, 89,208, 76, 1,
- 91,164, 3,144,208, 88, 58,176,181,217,238, 0,131,141, 33, 25, 93, 11,112, 22,164, 3,162,143, 53, 42, 81,162,196, 26,216,250,
- 57,114,151, 16, 72,243, 43, 6,149, 54,209, 7, 27,210, 4,164, 30, 58,191, 89, 61,125, 94, 39,169,192,108, 54,105, 82, 74, 75,
-251, 43, 26,193, 99,229,230, 73, 13,169,173,245, 59,191, 90, 57,157,173,172,147, 63,107, 33, 33,255, 95,174,123,197,144, 48, 44,
- 20, 99, 72, 72, 95,247, 95,110,163,255,114,221, 29,246, 23, 24,137, 23, 68,170, 22,144,120,172,158, 91, 30, 87,176,200,195,188,
-234,121, 65, 18,183,120, 38,240,186,141,107,234, 59, 44,105, 21, 66, 62,167, 92, 25,133,180,243, 59,251,156,222, 14, 19,196,144,
- 61,132, 31,181, 51, 52, 52, 39, 29,128,130,182, 84, 31,234, 77,204,175,103,130,160, 74, 16, 54, 91, 69,154, 69,139, 86,143,171,
- 17,185,186,144,134,239,180,201,178,163, 46,180, 36,171,139,159,174,174,174,138, 29,157,206,198,210, 69, 83, 39, 45, 53,219, 23,
-165, 25, 40,209,202, 81,235,124,194,156, 53, 50, 1,120,157,183, 12, 42,237, 68, 89,191,104, 57,157, 40,135, 86, 86,187,229,132,
- 68,185, 19,226, 48, 30,195, 15, 79, 55, 45, 34,122,250,167,147, 52, 52,191,163, 80,210,227,227,223,125, 27,133,130, 7, 95,162,
-238, 6,208, 10, 69,131,216,120,244, 75,180,209,127,153,166,221,214, 81,193, 80,192,220,198,133,121, 10, 24,250, 27, 59, 5, 61,
- 86,243,168,247, 44,246,204, 28,248,140,222,103,153, 15,166, 51,253,240,108, 89, 39,186,143,182, 68,203, 9, 98,142,178,254,151,
- 59,140, 81,247, 48,234, 68, 1,100, 12,126,218,225,167,222,149,180, 6,208, 10,228,128,209,151,140,111, 51,172, 56, 96,244,165,
-176,226,164, 6, 29, 71,160,202, 17,232,178, 2, 86,193,128,150, 13, 48, 22, 8,220,108,129,178,175, 84, 93,167, 94, 99,116, 66,
-167,216,165,153,217,224,167, 38,139,156,202, 96,240,211, 41,118,105,102, 54,248,169,201, 34,167, 50, 24,252,116,138, 93,154,153,
- 13,126,106,178,200,169, 12, 95,130,159,118, 11,240,165,128,150, 74,215, 18,112, 89, 75,186, 44, 36, 90,142,234,108,189,218, 48,
-136, 68,139, 15,218, 74,206,112,220, 30, 13, 71,215,181,232, 27, 52,109,183, 75, 72,219,203,224,167,193, 79,189,125,192,248, 54,
-237,115, 64, 47, 15, 45,243, 25,252, 52,248,105,139, 3,255,229,190,164,242, 67,247,124, 22, 22, 64,203,150,138,209,209, 53, 39,
- 37, 90,206,175, 58,212, 26, 25,116,222,255, 18,136,215,160,169,147,249, 58,179, 25,252,212,201, 40,157,217, 12,126,234,100,148,
-206,108, 6, 63,117, 50, 74,103, 54,131,159, 58, 25,165, 51,155,193, 79,157,140, 10,109, 54, 59, 54, 90, 85,104, 59, 69,137,147,
-133,212,169,188, 45, 80,166,230, 9,137,141,150,181,250,209, 78, 93, 44, 37, 88,234, 10,196,208, 86, 91,215,243, 70, 39,212,197,
- 38,221,153, 12,126,234,102,149,174,140, 6, 63,117,177, 73,119, 38,131,159,186, 89,165, 43,163,193, 79, 93,108,210,157,201,224,
-167,110, 86,233,202,248, 37,248,233,240,197, 54, 86, 29, 70,193, 53,174, 6,180, 92,137, 24,201,206,106, 68,235,149,132,206,172,
- 58, 12,178,114, 81, 23,119,190, 98,166, 47,209, 16, 95,133,102,158,100,225,135,213, 42,152,204,157,169,102,129,164,238, 53,242,
- 37, 86, 82,181,188,137,148,244, 67,158,132,219,148,148, 43,254,182,170, 57,227,109,203,149,196, 52,204,138,175, 78,149, 51,115,
- 10, 83,130, 82, 46,209, 22,151,200, 16,245,110, 64, 90,144, 35,142, 41,158, 51, 52,179, 38, 53,101,203,151,220,180, 32, 79, 50,
-211, 89, 38, 30,243,154, 70,123,235, 45,103,184, 28,137, 77,237,243,167,141,177,183,124,158, 84,143,242,166,137,186, 39,123, 98,
- 19,227, 49,218,242,123,165, 73,211, 37,190,169, 72,250,120, 38, 55,164, 45,153, 18,152,244,172,228,208,164, 25,130,126,109,208,
- 12, 1,211, 28, 60, 98,240,211,224,103, 88,113,224,139,246, 37, 76,196, 17, 66,147, 44, 42, 25, 88, 78,208, 11, 23,154,100,139,
-102, 88, 49, 19,116,190, 40, 63,195,176,156, 6, 41, 76,172, 29,178, 39, 49, 61, 69,242,228,177, 14,142, 4,105,220,236,201, 77,
- 21, 10,164,138,112, 15,233, 33,104, 52,200,150,200,148,212, 86,226, 61,230, 65,186,207,103,156, 1, 27, 57, 82,154,170,228, 73,
- 30,254, 69,174,100,225,222,128,206, 20,148,179, 66,145,148,166,104,206,130, 13, 2, 44, 46, 61,216, 61,163,171,248, 28,153, 42,
-239, 14, 78,148,119,251,199,242,146,236,156,208, 76,188,183, 15,144,183,219,250,200,219, 45, 61,149,107, 85,114,196,217,234, 76,
- 57, 45,243, 18,100, 85,206,157,228,209,131,147,110,254,254,175,238,200,167,231,215,228,194,230, 41,159,202,101,141,251,192, 10,
-108,217,253, 88,114, 39, 55,181,169, 89, 44,203,181,125, 59,183,221,188,126,249,146,231,213,115,167, 30,238, 93,191,232, 66,237,
- 34,105,175,240,158, 19,147, 99, 56, 2,168,220,169,163,236, 41,154, 41,193,195, 92, 41, 35, 41,128, 42,103,138,136, 27,183, 47,
-159,246,192,252,242,206,235, 15,119,142,188,125,123,235,200,179,217, 35,186,220,206,153, 60, 2,157,140,134,119,182,238, 0, 88,
-235,205,110,237,252,101, 91, 7,201,154, 44,162,150,175, 47,146,183, 89,247,108, 73, 76,141, 81,190,191,180, 18,243,217,224,129,
-174,193, 39,107, 18,211,220,108,137, 77,135, 65,163, 27,222,147,196,217,190,164,227, 59,209,202,162,171,156, 90, 68,156,109, 35,
- 39,233,217,109,163, 16,208,177,124,196,168,123, 40, 25,104,180,123, 32, 7, 44, 65, 81, 48,160, 21, 46, 92,184,253,122,193,151,
- 94,160,133,124, 69,245,130, 47, 3,104,133,109, 71,255,110,169, 1,184,188,148,183,247, 69, 94,221, 20, 28,191,208, 81,145, 32,
-131, 36,128,211, 99,121,255, 92,228,237, 35,153,213,167,166, 76,237, 81, 83, 38,118,169, 34,227, 58,148,151, 49,109, 75,201,136,
-159,138,200,208,166,249,101, 72,131,236, 34, 62,207, 68,188,110, 74,254,148, 17, 30, 59, 51, 80,228, 77, 17,254,133,255,173,157,
- 34,151, 87,203,210, 46,121,101, 84,131,140, 82, 54, 83,244,103, 40,111,107, 27,128, 64, 37, 29,108, 48, 39,208,218,253,103, 87,
-249,169,124,250,251,170, 36,171, 69,153, 52,247, 8,178,154,149, 76,113,143,146, 44,166, 38,197,146,221,221, 49,162, 90,168,128,
- 22, 37, 89,247,142,172,242,255,124,103,183,152, 55,183,151,247, 27,219,200,155,115, 27,100,215,140,206,159, 75,103,140,186, 64,
-235, 3,204,146,196,148,189,118,241,108, 87,222,190,126,237,251,248,222,181, 55,243, 71,214,245,152, 63,176,238, 81,247, 89, 3,
- 61, 46,238, 91,119,185,102,161, 84,151,153,199, 78,123, 89,214, 61, 60,192,196, 38,183,249,227,238,191,127,122,237,213,187,155,
- 7,223, 62, 63,187,245,241,200,174,117, 60, 55,204, 27,227,253,225,210, 70,191, 7,127, 86, 50, 95, 27,147,223,124,225,143, 18,
-230,219,155,134,250, 77,238,211,244, 26,120,219,213,153, 54, 98,222, 52,113, 77,110, 42,208,202,156, 36,162,117, 68, 1, 91, 69,
-181, 57,225, 18, 96,153,111,237,145, 15, 7, 70,203,251,189,195,228,253,174,223,197,103,123, 95,241,217,218, 67,124,220,186,200,
-187,141,237,229,221,186, 86,194,124, 33, 5, 90,120,246,225,147,107, 39,252,207,236,219,240,177,121,181,130, 79, 1,186,230,103,
-251, 91, 10,103, 13, 48,245,128,141,204, 25, 18, 70,184,155, 58, 94,132, 32,158,225,203,101,142, 90,172, 89,129,104,131, 74,102,
-140, 94, 58,164,229,212,241, 61, 26, 0,230,111, 14, 24,224,205,201,206,162,145,253,187,227,167, 45, 64, 69,160,133,122,242,191,
- 89, 83,218,229, 12,208, 66, 94,170,172, 52,165, 93, 26,227,252,175,184,127, 45, 32,241,216,217,205, 86, 27, 49,220, 29,157,120,
- 50,105,133,190,211, 61, 38, 59, 91,176,127, 81,126,107,191, 89, 33,243,163,133, 9,245,189,188,185, 43, 50, 43, 7,129,214,123,
- 29, 12, 10,210,184,249, 83, 69,120, 37, 31,188, 68, 94, 94,147,103,251,167,139, 92, 93, 39,114, 97,177,200,169,191, 68,142, 77,
- 16, 57, 56, 84,100, 79, 95,121,182,164, 33,192,220,109,145, 19, 83, 36,119,138,240, 94, 86,239,113,248, 81, 43, 64,235,210,106,
-145,181,245,228,233,130,218, 34, 27, 26,203,251,229,181,101, 82,243, 44, 44,243, 10, 59,101, 14, 70,147,234, 66,159, 35,211,132,
- 32, 75,125,134,170, 66,239, 29,191, 11, 1,150,122,141,146,172, 55,235,218, 73,165, 28,177, 67, 44,209,130,170,240,222,167, 39,
-103,197,188,165,131,248, 46,173, 42, 79,102,148,150, 19, 19,235,200,233,213, 35,133,106, 68,141, 15,208, 4, 21,225,146,189,219,
- 54,223,124,114,239,234,155,135, 55, 14,120,109, 25, 83,230,204,246, 17,165, 78,109, 31, 88,242,240,209,191,186, 28,223, 55,247,
-183,195,204,163, 85,119, 2,166,237, 75, 38,221,243,185,182,195,239,214,244,202,230,179,195,114,155, 61, 70, 22, 51, 95, 94,209,
-199,252,228,204, 22,223, 59,211,202,154, 31,187,143, 50, 63,243, 88,109, 62, 61,185,150,121,119,191, 92,230,211,171,134,222,203,
-157, 42,242, 73,123,109,228,154,200, 84,162,235,143,133, 30, 77,233, 89, 71, 38,247,168, 37, 19,187,213,148, 9, 93,171,201,144,
-182,149,164,103,211,178,210,173, 81, 41, 25,208,162,140,140,110, 87, 86, 70,182, 41, 45, 35, 90,151,148,246, 85,179,190,131,106,
-209, 58,168,182, 93,137, 22,128,207,165,143,247,143,202,251, 29,253,132,199,150,210, 45,158,251,158,158, 31, 26,160, 21, 14,224,
-243,222,145, 73,117,252, 31,157,113,247,255,128, 16, 71, 79,110,158,243,159, 58,176,253, 59, 72,186,156, 5,111,153,187,149,138,
-242, 92, 62,249, 74,145,180, 17,131,196, 58,108, 87, 52,250, 48,255, 87,183,223, 28,234,158,120,101,169,140,209,172,195, 93,125,
-119, 19,153,142,177, 65,111, 22,163,238,122, 57,165, 47,159,193,207,191,209,148, 61,137,150, 98, 84,173, 5,182,156, 1, 90,119,
-239,222,205,163, 7,108,217, 27,231,225, 12,187, 84, 64,153, 20,237, 9,143,225,168,216, 91, 77,136,132,226,109,145, 30, 4,228,
-183,238, 13, 65,218,189, 90,181,106, 41,144,161, 20,200, 41,137,199,246, 18,162,130, 20, 15,200,239,144,166,190,238,247,175,206,
- 21, 54,171, 14, 49, 17,123,220,157, 93, 83,174, 14, 78, 75,208,226,225, 44,203,178, 37, 53,245,153,223,167,154,120,252,213, 66,
-246,140,107, 40,125, 26, 20,146, 94, 63,230,149,238,181,114, 74,151, 31, 50, 75,199, 74, 46,210,190, 92, 26, 89,223, 43,191, 60,
-155, 93, 81, 6,212, 72, 37,217,147,154,156, 66,239, 80, 53, 86,204,157, 60,252,171,156, 73,195,189, 47, 8, 9, 90,243, 98, 73,
- 62,159,155, 88, 89,100, 93,125, 25,217, 48,163, 96,210,108,171,167,220, 10,208, 58, 52, 41, 24,208,122,235,222, 47, 24,208,122,
-189,186,149, 45,160,165,231, 53, 38, 72,154, 10, 15,109, 83,241,245,199, 59,251,196,103, 65, 5,121, 50,189,180, 28, 28, 82, 76,
- 86,245, 45, 35,155, 38,117,182, 6, 90, 54,105,194, 30,235,226,205, 11,167,159,172, 30, 83,243,204,222,113,165, 47,120,140, 43,
-126,233,194, 31,133, 47,157, 29, 86,232,236,153, 81,101,142, 93,223, 56,234, 4,243,104, 21,168, 96,250,216, 30,190,207,111,190,
-185, 54,169,172,249,129,251, 88,243,147, 99, 43,204,135,199, 84, 54,111,233,153,213,124, 96,124,125,191,115,195,243,152,159,122,
-172, 49,231,207, 28,209,188,119,112, 81,243,250,142,233,204,251, 38, 53,123, 83, 40,125,236,183,246,104,103,140,111,154,249,241,
-214, 46,145,187,123, 68,110,239, 16,185,185, 85,228,250, 38,145, 43,107,197,231,204, 82,241,241, 88, 40,254,103,231,139,156,153,
- 13,192,253,167,200,201, 41,242,233,200, 56,201,158, 44,194, 34,173,242,170,247, 9,172, 62,222, 61, 32, 62, 91,126, 9, 6,168,
- 84,213,162, 29,213,161,230, 43,114, 38, 52,213,104, 93, 36,214,203,243, 67, 50,251, 31,235,159,209,127, 95,255,156,254, 87,183,
- 78,241,127,121,247,130,228, 72, 26,142,210, 86,123,177, 25, 77, 89,147, 70,104,159, 49, 81,132, 71, 76, 41,226,134, 31,145, 37,
- 73,132, 39,159, 31,159, 82, 6, 75, 21,104,169,146,172, 50,174, 81,187,251,174,109,124,236,243,195,227,207,186,150,138,254, 71,
-105,215,168,113, 53, 11,103,100, 48, 56,240,141,115, 32, 78,156, 56, 25,114,231,206,189, 48, 91,182,108,119, 17,168,221, 23,123,
-223, 44, 89,178,220,225, 53,222,251,167,138,239, 8,104,157, 61,123, 86, 19,108,217, 42,183, 45,169, 21,242, 21,125,244,232, 81,
-158, 43, 87,174,184,106,129, 45,123,188, 0,160,186,127,240,224, 65, 89,177, 98,133,146,174, 94,189,170,140, 33,182,182, 91,183,
-110, 9, 66,156,221,215,226, 43,194,157,149,220,180,105, 83,169, 85,171, 86, 41, 9,229, 11, 4, 93, 42,248, 82,247, 7, 14, 28,
- 40,197,252, 90, 52,141,251, 38,203, 88,135,193, 87, 29,186,185,185, 5,134,107,177, 60,182,102, 28, 37, 66,178,182,190,200, 20,
- 0, 32,251,210, 33,135,252,206,157, 44,226,190, 23,135,102,138,207,137,217, 82, 34, 83,236,123,153, 18,154,146,171,118, 90, 60,
- 46,146, 46,202, 93,175, 69,181,228,230,244, 74,146, 35, 73,184,125,161,109,188, 28, 9, 76,153, 1,188,206, 92,153,242,131,124,
- 88, 81, 79, 10,166,138,120, 89, 15, 77, 74,178,222, 29, 24, 39, 52,124, 87,243, 83,146,245,118,235,175, 66,227,119,245, 26, 37,
- 89,175, 87, 54,151,138,217, 98, 89, 75,180, 28,190,166,180,201, 20, 49,103, 18, 83,141,226,233,163,220,127,122,114,181,188, 63,
- 62, 83,238,207,252, 65, 14, 13, 43, 46,171,250,148,150,185,191, 53,148, 9,237, 74,124, 42,229, 18,213, 50,134,160, 77,154,121,
-147,155, 14,223, 56,115,248,209,238, 73, 77,207,189,188,188,253,213,237,241,249,110, 61, 26,159,235,238,187, 75,110,111,238, 76,
- 46,115,246,198,210,238,135,152, 71,171,222, 21,243,166,241,126,117,101,231,251,227, 3,115,152,159,157,219,102,206, 7, 64,181,
-185, 87,110,243,178, 54,169,205,243, 91,166,244, 61,220, 63,155,249,248,132, 90,230,245, 61,114,153, 87,255,156,214,188,184,117,
- 90,243,134,225,245,110,231, 76, 17,233,156, 61,218, 46, 9, 77,121, 59,213,206,235,253, 71,167,202, 50,182, 99, 37, 25,243,115,
- 5, 69,122,181,125,114, 59,145,179,243,100,251,196, 86, 50,172,101, 81, 25,210,188,176, 12,110, 86, 72, 6, 53, 41, 32,173,202,
-103,120,146, 65,159,129,188,242, 90, 5,104, 65,125,248,110, 67, 59,123,146, 43,173,170, 7,187,143,182,137, 1,112, 54,186, 77,
-209,216,207,111,142,202,249,209,115, 98, 46,255, 59, 99,179,251, 95, 30,150,197,255, 68,127, 87,255, 23, 87,246, 75,225,116,209,
-159,228, 51,153, 34,217, 29, 32, 19, 68,120,228,239,247, 86,252, 95, 92,147, 70,121, 35,123,155,183,119, 23, 72,173,148,241, 49,
-127,170,191, 37, 90,170, 36,235,192, 47, 9, 87,214,205, 29,109,228,167,235,110, 15,252, 54,255,236, 1,224, 85,197,233, 66, 27,
- 15, 24, 28,248, 70, 56,128, 32,231,209, 16,191,244, 88,147, 38, 77,222, 45, 92,184, 80,238,220,185, 35, 23, 46, 92,144,113,227,
-198, 9, 2,211,203,188,121,243, 4,193,228,223, 21, 46, 92,248, 24,243, 58, 83,108,124, 62, 17,145,184,218,140,137, 43,204,248,
-179,195, 20, 17,137,223,163,102,156, 91, 71, 64, 11,160, 67, 32,133,114, 8,182,108,149, 87, 11,104, 61,124,248,208, 33,216,178,
-199, 3, 4,184,247, 36,255,174, 93,187, 38,151, 47, 95, 22,196,223,149,117,235,214, 41, 60,156, 51,103,142, 44, 91,182, 76,178,
-230, 43,163,148,247,216,177, 99,130,120,180,158, 58,248, 89,234,193,131, 7,165,110,220,184,161,128,172,211,167, 79,151,218,177,
- 99, 71, 41,130, 47,208, 86,246,153, 11,148, 81,164, 92,188,199,189, 14,154,161,206,162, 23,139,132,250, 69,255, 4, 1,189,149,
- 11, 11,160,133,149,107, 69, 70,182, 45,173,168, 11, 87, 14,174, 43, 0, 89, 45,212, 58,243,120, 70,235, 28,138,218,239,151, 74,
- 41,132,121,195,130, 31,144,138,149, 30,209, 56,155,200,166,230,210,184, 80,130,207, 46, 46, 38,205,192,144, 10,208,218, 55, 90,
-154,151, 74,117, 79, 93, 93,216,180, 68,242,123,111,221,186, 11,237,178,168, 50,100,106, 88, 56,225,221,215,203, 27,235, 6, 90,
- 5, 82, 71,106, 87,218, 53,154, 71,181,252,201,159, 47, 24,218,210,231,249, 89, 55,241,189,180, 94, 30,206,173, 35, 23,230,253,
- 44,123,103,116,146, 69, 3, 27,202,224, 38,249, 62, 21, 79, 31,245, 46,192,103, 44, 45, 30,228, 78,102, 26,185,119,205,156, 27,
-119,247, 45,122,112,117, 76,254,171, 31,159, 93, 53,127,126,118,249,211,171, 9,153, 31, 62, 95,218,226,250,230, 33, 53, 14, 50,
-143, 22,157, 66,233,227,156,127,118,113,231,139,189,191,229, 49, 31,158, 88,223,188,186, 71, 62,243,162,159, 82,154,103, 54, 73,
-106, 30, 83, 59,225, 91,247,238, 25,205, 27, 58,165, 55, 47,111,155,218,188,160,101, 74,243,210,238,133,205, 29,170,186, 30, 7,
-208, 25,164, 69,219,242,190, 75, 34, 83,158,217,191,194,108,225,228, 52,153,217,163,146, 16,140, 57,243,188,117, 94,197, 78,235,
-198, 14,121,183,186,105, 32,208, 10,141, 36, 11, 42,193, 66,249,211, 70, 62,177,103,242, 79,239,125,183,247,242,127, 63,167,168,
-255,135, 89,249,253,223,253,153,207,255,217,228,220,254,143, 23,254,232,255,236,172,155, 63, 36, 90, 4,237,118, 37, 90,233, 18,
- 68,240, 36,208,162, 20,235,225,164,124,242,241,228,116, 37,201,231,143,146, 43,197,223, 64, 11,128,234, 71, 72,178,142,126,126,
-112,228,105,133, 44, 81, 7,222,155,144,215,157,199,184,222, 49, 52, 60, 49,158, 53, 56,240, 79,113, 0, 18,171,100, 69,138, 20,
-121,177,118,237, 90,229,167,130,123, 74,137,186,117,235,166,128, 1, 2,173,153, 51,103,202,155, 55,111,100,238,220,185,146, 47,
- 95,190, 23, 80,125, 37,211, 42,111, 0,144,137,134,125,108,164,248, 72, 9,144,226,109,222,188, 57,222, 15, 63,252,192, 21,218,
-113,144,226, 34,113,204,140,234,136,158, 35,160,117,251,246,109,121,242,228,137,188,126,253,218, 46,216,178, 69,219, 30,208,122,
-246,236, 89, 30,130,172,231,207,159,187,190,125,251,214, 46,216,178, 87,222,184,113,227, 62,135, 84, 73, 0,126,196, 23,252, 27,
- 53,106,148, 28, 63,126, 92,222,189,123, 39,222,222,222, 10,232,250,229,151, 95,100,232,208,161, 10, 63,163, 71,143,174,199,126,
-186,212,137, 19, 39, 20, 64,245, 17, 32,106,198,140, 25, 10,160,250,240,225, 67, 41,208, 84,174,255,254,251,239,165, 70,142, 28,
- 89, 10, 64,206, 0, 90, 90,157,243,239,251,142,109,180,190, 38,208, 98,105, 0,168, 54,221, 89,219, 71, 62,236, 30, 36,229, 51,
-199,121,152, 45,155, 41, 50, 83,169, 12, 81, 31,188, 91, 90, 91, 46, 76, 40, 71, 0,182, 73, 95,221,180,115,101, 77,100,170, 55,
-179, 3,130,123,111,105, 43,181,242,196,243,115, 36,133, 80,169, 81,146,197, 65, 98,231,248,166, 88, 97,216, 95,222,110,237, 45,
-111, 55,119, 87, 6,142, 29,195,127,144,215,107,219,200,235, 85, 45,132, 32,139, 91,197,172, 49, 52, 37, 90,144, 94,237, 88, 51,
-185,183,207,251,251,167,228,243,203, 91, 98,190,189, 87,124, 14, 79,146,135,243,106,203,213, 21,125,101,199,232, 31,165,117,233,
-148,175,138,195, 46,171,100,198,168, 51, 97,167, 20, 91,187,118, 38, 19,193, 88,137, 76,113,206, 63, 62,189,237,169,231,218,238,
- 15, 47, 15,204,240,236,214,208, 52,111,189,151,212,125,252,112, 93,175,107, 69,211, 69, 57,175,135, 22, 1,211,210,241, 61,174,
-156,156,215,213,188,242,231,244,230,249, 45,146,155,255,108,156,220,124,104,114, 35,243,254, 9, 13,253, 14, 76,106,228,123,116,
-106, 83,191, 13,131,170,250,173,232, 95,233, 94,199, 42, 25,143,102, 79, 26,238,132, 30,224,106, 89,143,204,137, 35,204,127,186,
-117,160,200,145,177,226,185,177,183,240, 92, 79, 61,237,229, 81,128,214,181,173,226,189, 12,192, 61,192, 70,139,251, 15,224,173,
- 29, 35,120,187,175,203,145,200, 84,181, 97,209, 20, 79,159,236,153,242,233,227,141,237,242,233,218,102,249,120,126,137,124, 60,
- 56,202,223,119, 89,117,127,243,129, 17,254, 31,110,237,247,159,252, 75,245, 55,120,199,239,142,202, 13,131,119,207, 79, 80,147,
-250,109,104, 41,251, 58,199, 81,246,126, 27, 91, 41, 18, 46,168, 17, 21,160, 85, 36,109,148,168, 99,170,199,156,225,255,250,222,
-187,169,117, 99,206, 93,222, 44,214, 66, 30,247,175, 16, 99, 74,162,152, 49,109, 25,219,135,134, 85,198,179, 6, 7,190, 56, 7,
-210,166, 77,123,132,160, 64,221, 22, 44, 88, 32,152,200, 37,102,204,152, 74,178, 4, 90,158,158,158,138, 84, 6, 65,209,143, 56,
- 42, 88,177, 98,197,106,156, 58,117, 42, 31,104,198, 65, 74,130,148, 10, 41,205,185,115,231,210,129,118,250,102,205,154,165, 3,
-141,148,160,193, 48, 40, 73, 90,181,106,149, 28,239, 42,109,143,166, 35,160, 5, 85,159,120,121,121, 9, 64,135, 82, 5,208,224,
- 46,136, 77,151, 51, 64,235,213,171, 87,121, 84,144,229,235,235,235, 10, 90, 54,193,150,189,178,198,138, 21,235, 85,159, 62,125,
-164,108,217,178,146, 55,111, 94, 89,188,120,177,220,188,121, 83, 56,111,147,207,144, 68, 73,211,166, 77, 37,113,226,196,210,168,
- 81, 35,137, 28, 57,178, 93, 83, 14,139,119,148,250,245,215, 95, 75,149, 41, 83,166, 84,129, 2, 5, 20, 48, 69,233, 22, 1, 22,
- 19,165, 91,224,105,169,164, 73,147,150, 2, 77, 3,104,233,251,106, 66, 15,180,208, 99, 35,230, 72,106,218,239,183,172,154,248,
- 78, 72, 73,219,169,131, 4, 71,250,222, 31, 52, 87,142, 36,166, 28,221,107,100,245,167,225,251,170,190,101,169,134,252,133,105,
- 81,167,220,138, 52,171, 77,201, 36,254,204, 19, 18,218,214,207,176,140,160,189,231,206,194, 22,242,112, 73,115, 78,196,154,128,
-136, 52, 8,180, 8,178,212, 21,134, 84, 23, 42, 43, 12,135, 87,147, 70, 69,146,220,165,202,144,234,194, 6, 5,227,223,117, 31,
- 80, 76, 19,104, 81,146,181,110,122,255,247,254,239,189,196,236,241, 23, 12,244,107,201,187,133, 21,229,209,236,106,144,100,181,
-149,173, 99, 26, 9,128,216,189,144, 74,241, 0, 76, 93, 58,215,204,115,219,251,194,134,231,183,199,228,190,125,111,108,246,187,
-239, 15, 79,125,248,115,133,116,215,179, 39, 51,101,209,195, 75, 2,166,156,201, 35,158,156,218,187,193,217,157, 19, 91, 61, 92,
-214,171,148,239,140,182,185,239,117,168,156,209,108,153,202,103,139,103,134,186,240, 22,164, 70,163,116,184,206, 8,242,234, 12,
- 73, 76,137,127,253, 49,183, 89, 14, 13,199,234, 64, 4, 67,223,251,155,116,171,145,217,204,235,122,202,104, 43,143, 2,180,174,
-108,148,183, 11,171,200,219,121,229,228,205,236,146,242,230,175, 34,242,102,122, 62,167,129, 22,104,237, 60,212, 47,179,175,223,
-182,110,254, 31,207,204, 3,208,114,147, 79,247, 14,201,167,251, 71,228,179,215,109,185,127, 98,227,199,154,133, 83, 61, 65,159,
- 26, 94, 58,173,227,191,230,100,113,194,123, 82, 93,248,226,175, 98, 50,165,118, 52,121, 57,179,184,146, 62, 93, 92, 38,174,137,
- 13,160, 21,210,246, 54,158,251,230, 57,224, 2, 91,172, 39,144,228, 40, 64,229,204,153, 51, 10,184,178, 76, 39, 79,158, 84, 36,
- 70,151, 46, 93,146,140, 25, 51,210,214,209,197, 81,173,160, 14,115,129,212,166,181,159,159, 31, 84, 30,146, 18, 41, 35,192, 80,
-206, 61,123,246,228, 26, 63,126,124, 46,168, 40,115,224,157, 89, 65, 35, 99,195,134, 13, 83,101,202,148,137,171,130,211,135, 4,
-104,189,120,241, 66,124,124,124, 36, 81,162, 68,231,184, 18, 81, 77,150, 96,203, 89,160, 69, 73, 22, 65, 22, 64, 83,113, 60, 91,
- 84, 77,150, 82, 48, 61, 64, 43,103,206,156,138,141,214,180,185, 43,165, 74,163,174, 82,180,100, 5, 5,120,253,241,199, 31, 2,
- 21, 99,136,129, 22,213,135, 83,102,204, 43, 85,239,167, 46,165, 10, 20, 41, 81,106,209,162, 69,165,198,142, 29, 91, 10, 52, 13,
-160,165,255,115, 83, 99, 29,170,246, 89, 60,255,255, 6,100, 92,154,232, 56, 32, 1, 83, 5,221, 32, 17,202, 83,193, 53,202,197,
- 53,221,178,227,111,252,164,200,155, 75,114,121,203, 56,169, 93, 44,237, 77,216,178, 88,175, 14,211, 85, 44, 76,104, 75, 78, 79,
-253, 81,249,203,175,144, 37,198, 11, 38,191,149,117,229,216,200, 82,156, 28,237,173,144,211, 69, 91,205,164,216,217, 36, 54,109,
-220, 50,188,150,178,154,113,118,231, 98, 4,117,116,243,160,185, 41, 43, 12,225, 43, 43,216, 10,195,181,109,131, 24,190, 83,146,
-229,181,176, 58,234, 16,125,139, 35,162, 88, 73,118,202,215,243,138,152,177, 2,206,188,186,174,124, 88, 92, 25, 6,255,229,229,
-228,200,146,178,111, 70, 71,249,181,102,102, 31, 0,162,218,154, 5,115,144, 1, 6,239,123, 31, 31, 93,118,237,233,252,122,103,
- 95, 44,172,123,250,233,238, 41,167,121,205, 25,154, 4, 78, 4, 80,185, 83, 69,185,157, 47,117, 20,191,170,185, 18,124,184,191,
-123,134,249,245,201,197,102,175, 67, 51,204, 94,238,131,205,165, 51, 68,126,168,210,164, 52,173,100,134, 72, 11,203,102,140, 60,
- 92,207,123, 32, 89, 27,120,110, 78, 43,249,188,187,175,180, 46,155, 86, 62,109,239, 38,167,166,212, 21, 94,215,243,188,173, 60,
- 4, 90,126, 23,215,202,155, 57,165,130, 72,180,222,239, 29,238, 20,208,162,164, 51,119,242,112,143,223,253,149, 95, 81, 21, 50,
-153,221, 1,184,174,172,151, 79,175, 31,250, 79,234,223,230, 45, 0,237,106, 7,174, 50,130, 20, 47,113,172,240,158,143, 38,231,
-151,219, 99,115,200,248, 26,209, 20,245,225,213,225,153,196,111,125, 51,129, 90, 81,145,104,149,202, 24,181,182,161, 58, 12,105,
-203, 27,207,125,171, 28,128,186, 43, 55, 36, 37, 47, 94,190,124, 41,159, 63,127, 86,192,214,172, 89,179,148,196, 99, 74,139,104,
-119, 4,224,240, 44, 70,140, 24,214,171,108,109, 85, 43, 92,242,228,201,139,183,110,221,186, 5,158,195,234, 38, 41, 2,201, 83,
- 81,168, 37, 11,143, 25, 51,166,112,151, 46, 93, 20, 9, 76,187,118,237,242,102,207,158,189, 98,180,104,209, 56, 47,217, 85,235,
- 59,146,104, 21, 47, 94, 92, 41, 51,129,150,173,124,188,102,171,128,150,160, 73, 61, 70,190,162, 0,109,121, 50,100,200, 80,150,
-146, 44, 2, 45, 91,249,120,205, 94, 91, 82,162,213,187,119,111, 69,162, 69,160,181,124,249,114,249,177,227, 88,169, 94,167,141,
-148,201,156, 85, 58,214,174, 33,238,238,238, 2,158,135, 24,104, 81,162, 85,166,118,219, 82,213, 27,117, 40, 21, 51,110,220, 82,
-213,171, 87, 47,181,117,235,214, 82,160,249,181,129,150, 67, 44,242,173,246,247, 80,149,139, 18, 14, 0,147,145, 61,170,166,252,
-116,124, 84, 25, 57,212,215, 85, 62, 61, 61,174, 0,173,151, 48,102,127,119,251,136,204, 26,217,213, 63,119,138,136,147, 8,106,
-156,121, 25, 38,199, 12, 77,139, 37,249, 40,235, 26,202,186,158, 5,148, 68,105, 86,163, 66,241, 63,242,158, 51,180,172,243, 18,
- 44, 80, 66, 86, 33, 91,220, 23,123, 38, 54, 21, 74, 79,246,142,171,175, 24,215,235, 81, 27,146, 30,129, 22, 29,146, 90, 26,190,
-211, 38,235,245,234,159,130, 3,173,249, 85, 53,129, 22,236,173, 30,251,191,123, 42,190,107,155, 41, 46, 28,188,102,151, 21,143,
- 81,165,100, 45,234,189,113,114, 55, 41,157, 41,198,243,210,127, 27,115,134,116, 11, 87,194, 37,218,245, 54,213,242,125,104, 82,
-214,213,187, 90,238,120,175,234, 20, 74,254, 14,106,200,235,206, 18, 44,149, 62,210, 78,164,123, 21,179, 69,244, 58,180,176,167,
-249,200,228, 26,230, 23, 83,243,153, 95, 78,201,107,254,176,123,160,185, 70,142,104,207, 74,164,139,116,143,169, 74,142,184,158,
-231,215, 13,247, 45,155, 49,210, 14,173,247,192, 69,125,228,186, 5,147,121,201,174, 94,178,111, 76, 13,113, 73, 96, 58,191,123,
-120, 37, 17,183, 86, 82, 45, 87,188,151,188,175, 69,195, 46,208,186,176, 82,222,252, 89, 48, 84, 54, 90,245, 96, 68, 11, 73,234,
- 99,159,217,133,252, 63,204, 41, 18, 8,182, 62, 30,159,230,191,104,112,115,111,244, 75,167, 86,192,198,139, 30,254,209,229,161,
- 25,229,254,132, 60, 82,222, 53,210,135,103, 51,138,200,245,145, 89,228,198,168,172,146, 50,238,223, 64,171, 85,225,232,191,211,
-173,131, 97, 12, 31,146,150, 55,158,249,150, 57, 0, 91,161,252, 88,173,118, 17,210,150,251,176,121,250,172,170, 18,121, 12, 59,
-163,251, 0, 78,231, 35, 69,138,132, 33, 89,247, 70, 48,226, 10, 9, 88, 93,168,202,106, 77,154, 52,169, 6, 36, 47,117, 38, 79,
-158, 92, 19, 0,171, 34,128, 93, 57,184, 34,168,198, 60,142, 64, 22,223,102, 15,104,241, 86,248,240,225,135,252,157,197,182,218,
-208, 89,160, 5, 90,106,153,232, 79,203,105, 27, 45, 75,160, 69,213,225,244,233,211,165, 74,237,102, 82, 39,127, 65,233,158, 63,
-187,204,109,221, 68,142, 30, 61,170,168,101, 67,170, 58,164,141, 86,153, 10, 85, 74,197, 77,152,180, 20,232, 40,160,245,200,145,
- 35,202,241,215, 84, 29,234,238, 9,223,102, 70,199,171, 14,237, 76, 94, 29, 10,166, 50,249,205,109,157, 81,246, 14, 45, 43,251,
- 59,198,146, 73,213, 76, 82, 42,189,233, 66,217,172,177, 79,172, 28,221, 92, 62, 97,217,254,141,253, 75,100,215,130,129, 82, 62,
-103,162,143, 4, 55,206,212, 63,107, 98,211,159,187, 7, 22,147,147, 3,179,201,241, 1, 89,133,199,188,230, 12, 13,230,165,247,
-120,172, 44,124, 9,111,240,239, 75,101,140,229,217,169,122,214,207, 27, 70, 53, 17,191,163,147,224,139,107,146, 28,152,218, 66,
-114, 39,143,112, 4,210,136,152,122,105, 43, 43, 12,183,244,178,177,194,176,105, 16,195,119, 74,178,188,230, 86,148,242,153,162,
-106, 74,180,188, 47,194,240,125,255,112,241,154, 83, 86, 78,141, 41, 45,107,186,229,145,185,189,170,202,244, 95,127, 20, 26,200,
-235, 45,155,173,124,248,251, 74,218,178, 86, 9,241,125,227, 41,111, 31, 95,149, 51, 75,251,162,222, 92, 13, 25, 71,224, 87,165,
-180, 51,180, 33,177,122,240,233,242, 26,243,167, 75,107,204,114,125,179,217,173, 91, 74,243,149,225,174,230, 23, 19,179,155,125,
-220,126, 54,111,153,219,214, 44, 15,246, 43,233,206,142,137,102, 57, 60,194,172, 7,104,101, 76,104,106, 68, 85,177,108,235, 40,
- 63,149, 78,249,222, 53,129, 41, 69,139, 18,201,223, 19,108, 47,238,156, 71,112,223,150,247,118,205,162, 83,162,229,123,118,169,
-188,158,146,221, 41, 9,150, 45,194,144,222,238,159,219, 50,237,219,183,203,126,252,236,187,170,158,255,135,185, 69,252,205, 23,
- 86,250, 23, 73, 23,245,113,190,120,138,177,173,238, 45, 78,244,240,237, 99, 71, 11,255,136, 41, 86,212,240, 35,184,210,208,107,
- 86, 9,185, 52,196, 69, 32,237, 82, 37, 90, 69,155, 22,136,222, 31,146,173,158,134,123, 7,221,172, 53, 50,126, 63, 28,160,244,
-167, 25, 0,213, 28,128,160,189, 76, 60,230, 53, 36,205,213,129,118,170,201,231,232, 7,138, 78,152, 11, 4, 36, 30,243,154, 46,
-154, 14, 36, 90,138, 45, 22,232,132, 25,208,178,144,110,133, 8,104,193, 13,198, 11,218,104,149, 43, 87, 78,138, 22, 45,202,213,
-154, 50, 31, 70,239,189,106, 87,147, 69,173, 26,201,181, 67, 7,100,200,144, 33,130,124,210,184,113, 99,129, 52,207,218,247,164,
- 45, 54, 6,218,104, 97,225,130, 2,166,176,138,177, 84,149, 42, 85,148,227,243,231,207,151,130,113,253, 87,151,104,125, 63,221,
-218, 97, 73,245, 59, 42, 5,104,122,254,122,247, 72,121,189, 99,136, 44,106, 28, 75,234,101, 55,249, 98, 66,235,201,191,126,188,
-130, 97, 90, 58,180,254, 33,247,187,195,139,127, 23,185,127, 80,228,222, 62, 91,222,226, 29, 58,199,163, 59,135, 6, 5,226,249,
- 11, 36, 61,226,117, 67,120,204,107, 26,204, 14, 70,179,184, 75,172,151,242,236,130,200,195, 35,114,123,211, 48,145, 75, 43, 68,
-206, 47,146,107,107,126,147,206,213,179,124,134,250,112,129,134, 49,120, 48,154, 10,208,114,235, 38,141,139, 38, 85, 86, 24,210,
- 38,139, 43, 12, 95, 45,111, 36,180,203,162,202,144, 32,171,110,190, 56,119, 94,206, 42, 99, 11,104, 5,245,138, 15, 27,173,105,
- 61,106,194,187,250, 38,185,182,164,147,108,234, 95, 66,230,247,169, 46,127, 13,237, 36,221,106,101,247,161, 13,151,142, 78,230,
-136,159,225,178, 39, 13, 47, 11,198,252, 34,179,135,182,151,225,109,203, 43, 9,117, 23,216, 46, 56,146, 20, 5,163, 89, 52, 77,
-196, 11, 53,243,198,127,218,168,116,124,239,173, 83, 91,152, 39, 52, 77,104,126,252, 71, 86, 5,104,189, 91, 86,199, 60,182, 97,
- 34,243,251,201, 25,149,180,179,103, 38,179, 44, 41,107, 13,180,108,150, 51, 95,170,200, 71,223,173,105, 46, 55,255,170, 37,112,
-223,160, 0,106,238,175, 79,173, 36,222, 75,107, 73,222,148,145,142, 58,224,129, 67,135,165,190,167, 23,202,171,241,233, 21,213,
-161, 19, 62,179,130,209,204,153,194,148, 18, 96,255,175, 74, 89, 99,120,238, 30, 81,229,131,239,190,225,254,230, 51,139,252,233,
-180, 84, 71,251, 48,139,163, 54,202, 12,255, 96, 79,207, 15, 76, 39, 9, 99,254, 13,180,212, 77,149,108,253,237,176, 52,170,225,
-176,244,255,172, 49, 28,108,234,236,120, 58,179, 25,252,252, 27, 69,233,241,254,110, 23,108, 89,240, 58,144,159,246, 84,130, 86,
-118, 88,118,193,150, 45,154,188, 6,137,214,185, 53,107,214,200,225,195,135,133,171, 15,103,207,158, 45,131, 6, 13,146,237,219,
-183, 11, 86, 14, 42,234, 88,216,165, 9,108,213,100,244,232,209, 4, 90,182,220,237, 4,105,247,136, 17, 35, 22,193,115,138,212,
-138,126,178, 8,178, 8,172,104, 4,207,213,136, 60, 39,224,154, 48, 97, 66,169,126,253,250,149, 98,126, 27,253,235, 75,244, 37,
-157,221,248,155,205,166,103, 30,255,127,225, 25,207,144, 32,235,110, 47,147,228, 75,105,242,131, 74, 37,152, 97, 97, 46, 72, 36,
- 48,121,250, 18,100,201,137,201, 4, 90, 65, 38, 15,141, 73, 71,121, 25,194,242,188, 38,200,226,243, 56,126,163,131,125,193, 26,
-183, 88,250,232, 94,242,240,152, 66, 99,113,207,114, 50,183, 95, 29,120, 23,207,252,137,182, 94,112, 56,153, 41, 36, 52,169, 50,
-228, 87,182, 99,120, 85,121,189,166,149,208, 87, 22, 65, 22, 55,247,223,138,138,215,252, 31,196,107,110, 37,121, 9, 21, 32, 55,
- 27, 18,173,224,128, 16,171, 14, 71,254, 84,204,251,196,194, 95,229,192,210, 81, 50,119, 80, 11,233, 94, 59,167, 15, 87, 35,234,
- 40,163,195, 73,156, 82,171,110, 77, 43,136,239,107, 72,180, 30, 93,149,211, 75,122,203,254,201,205, 40,125,211,146,104,217,253,
- 88,138, 67, 53,120,104,106, 3,243,139,149,173,204,239, 86, 53, 50,191, 93, 84,213,236, 51,187,132,185,109,241,216,207,170,102,
-137,242,132,169, 94,158,168,207,143,246, 72,162, 11,104, 65,122,229, 37,235, 27,201,192, 58, 25, 36, 93, 60, 83, 78, 86,136,251,
- 1,181,210, 43,106, 99, 56,151,197,234,101,187,118, 21, 54,203, 73,105,214,251, 61, 67,228,213,216,212,242,106,116, 82,241, 26,
-145,192, 25,169,150,221,186,103, 77,110,202, 3,218,235,126, 42,149,234,249,197,197, 93,204, 0,112,143, 66,219, 70, 1,207,103,
-142, 30, 57,220,221,168,145,194, 5, 9,193, 3,112, 5,201, 86,180, 1,112,235, 80,245, 43, 13,104, 95, 98,144, 52,104,234,236,
- 36, 58,179, 25,252,212,201, 40,157,217, 44, 65,209,119, 3,180, 80,183,194, 4, 91,241,227,199,127,130,228, 9,187, 41, 79, 44,
- 14,120, 1,213,236,155, 40, 81,162,120, 3, 88,189,134,138,239, 5,242, 60,193, 53,130, 44, 91,118,211,214,125, 41, 97, 0,120,
-114,232, 21, 30,180, 84,144,149,240, 43,141, 75, 58,155,242,155,204, 22, 50,213,161, 18, 60,154, 65,164, 29, 4,144,230,189,128,
-124,182, 2, 77,107, 14, 20, 1,129,166, 95, 0,100,189, 96, 64,104, 29,236, 11, 70,147, 52, 16, 72,154,170,195, 55,240, 62, 63,
-158, 43,247,244,184, 51,176,247, 7,193,235,185,146,152,134,169,190,178,212, 21,134, 92,101, 72, 73,150, 42,205, 34,184, 82, 19,
-243, 91,149,221,102,221, 41,185,162, 97, 60,109,182,184,215, 41,201, 82, 73, 59,228, 39,192,128,123,233,116, 38, 74, 31,149,196,
- 99, 94,211,224,169,125,176,129, 69, 16, 37, 51, 68,185, 95, 33,115,244,199, 21, 50, 69,123, 92,222, 53,234,227,114, 25,163, 60,
-166,196, 75,165, 73,176, 93, 60, 93,196, 3,165, 92, 34, 89, 58, 86,181, 73, 19,210,202,223, 27, 20, 74,248, 38,107,226,240,227,
- 45,203,148, 49,129,105, 0,174,191,206,146, 36,252, 0, 7,101,181, 43,209,178, 14, 40, 29, 26,137,150,245,251, 65,187, 34,210,
-118,244,241,121, 58,250,166, 67, 48,172,243,121, 91,217, 52,191,163, 16,208, 54,104,134,128,105,206,246,207, 80,190,194,104,163,
- 80, 50,208,222,152,172, 71,162,165,170, 16,105,179,101,157,223,214,220,161, 71,162, 21, 96,244,174,216,108, 89,231,119, 52, 31,
-133, 1, 27,190,151,190, 20, 6, 85,253,239,145,248, 94, 26,247, 95, 85, 78, 87, 87, 87,197,247,139,206,238,246,175,170,187,206,
- 58,235, 2,174, 78,210, 50,104, 26,193,154, 67,216,101,236, 62,102,124,155, 97,203, 81,167, 36, 90,142,192, 88,104,128,150,142,
- 85,135,255,229,118, 15,219, 22,255,186,212, 28,251,209,250,130,101,249, 47,119, 24,163,238, 97,219,177, 12,126, 26,252, 12, 43,
- 14, 24,125, 41,172, 56,249, 55, 29,131,159, 6, 63,195,150, 3,223, 39,181,176, 9, 42, 29,130,186, 27, 31, 96, 8,152,230,224,
- 17,131,159, 6, 63,195,138, 3, 70, 95, 10, 43, 78, 26, 96,195,232, 75, 70, 95, 10, 91, 14,124,159,212, 28,218,104,241, 35,177,
-149,156,169,170, 61, 26,142,174,107,209, 55,104,218,110,151,144,182,151,193, 79,131,159,122,251,128,241,109,218,231,128, 94, 30,
- 90,230, 51,248,105,240,211, 22, 7,254,203,125, 73,229, 71, 72,231, 51,173,111,234, 63,117,223,248,211, 9,219,230, 54,248,105,
-240, 51,172, 56, 96,244,165,176,226,164, 33,209, 50,250,146,209,151,194,150, 3,223, 39, 53,195, 70, 75,163,221,140,129, 34,108,
- 59,182,193, 79,131,159, 97,197, 1,163, 47,133, 21, 39, 13, 64,104,244,165,111,191, 47,133,109, 9,191, 46, 53, 3,104, 25, 64,
-203, 46, 7,140,193, 39,108, 63, 70,131,159, 6, 63,195,138, 3, 70, 95, 10, 43, 78, 26, 32,243,123,233, 75, 97,219,226, 95,151,
-154,227,160,210, 95,176, 44,223, 75,227, 26,229, 12,219, 78, 96,240,211,224,103, 88,113,192,232, 75, 97,197, 73, 3,108, 24,125,
-233,219,239, 75, 97, 91,194,255, 8, 53,163, 99,135,109, 67, 27,252, 52,248, 25, 86, 28, 48,250, 82, 88,113,210, 0, 48, 70, 95,
- 50,250, 82,216,114,224,251,164,230,188,103,248, 48,170,167,241, 1,134, 17, 35, 3,200, 24,252, 52,248, 25, 86, 28, 48,250, 82,
- 88,113,210, 0, 90, 70, 95, 50,250, 82,216,114,192,160,102,112,192,224,128,193, 1,131, 3, 6, 7, 12, 14, 24, 28, 48, 56, 96,
-112,192, 1, 7,130, 26,199,187,185,185, 41,225, 90,212,189,193, 58,131, 3, 6, 7, 12, 14, 24, 28, 48, 56, 96,112,192,224,192,
-215,228,192,191, 12,139, 24, 64,235,107,118, 30,227, 93, 6, 7, 12, 14, 24, 28, 48, 56, 96,112,192,224,128, 99, 14,124,231, 64,
-203,177,141,214,119, 94, 57,163,239, 26, 28, 48, 56, 96,112,192,224,128,193, 1,131, 3,223, 57, 7,254,213, 88, 4,149, 43,205,
- 10,114,255,157,183,147, 81,124,131, 3, 6, 7, 12, 14, 24, 28, 48, 56, 96,112,224, 59,228,192,191, 30,139, 24,246, 89,223, 97,
-175, 52,138,108,112,192,224,128,193, 1,131, 3, 6, 7,254, 69, 28, 48,176,200,191,168, 49,141,170, 24, 28, 48, 56, 96,112,192,
-224,128,193, 1,131, 3, 6, 7,194,136, 3,255, 88, 8,158, 48, 42,191, 65,198,224,128,193, 1,131, 3, 6, 7, 12, 14, 24, 28,
- 48, 56,240,205,114, 64, 5, 90,214,251, 47, 94, 96,195,145, 93,216,178,216,224,167,193,207,176,226,128,209,151,194,138,147,127,
-211, 49,248,105,240, 51,172, 56,240, 95,238, 75, 97,197,195,127,130,142,225, 25, 94,131,235,255,229,142,109,212, 61,108, 63, 73,
-131,159, 6, 63,195,138, 3, 70, 95, 10, 43, 78, 26, 96,248,123,233, 75, 97,219,226,255, 17,106,223, 75,227, 26,229, 12,219, 14,
-105,240,211,224,103, 88,113,192,232, 75, 97,197, 73, 3,108, 24,125,233,219,239, 75, 97, 91,194,175, 75,141, 18,173,234, 1,175,
-228,222,218,102,235,139,149,198,232,216, 97,203, 90,131,159, 6, 63,195,138, 3, 70, 95, 10, 43, 78, 26, 0,198,232, 75, 70, 95,
- 10, 91, 14,124,191,212,146, 7, 0, 44,238,191,218,102,124,128, 97,203,106,131,159, 6, 63,195,138, 3, 70, 95, 10, 43, 78, 26,
- 64,203,232, 75, 70, 95, 10, 91, 14,124,159,212, 12, 27, 45,141,118, 51, 6,138,176,237,216, 6, 63, 13,126,134, 21, 7,140,190,
- 20, 86,156, 52, 0,161,209,151,190,253,190, 20,182, 37,252,134,168,177,243,217, 74,206, 20,209, 30, 13, 71,215,181,232, 27, 52,
-109,183, 75, 72,219,203,224,167,193, 79,189,125,192,248, 54,237,115, 64, 47, 15, 45,243, 25,252, 52,248,105,139, 3,255,229,190,
-164,242, 35,164,243,153,214, 55,245, 79,220, 55, 36, 90,134, 68,203, 46, 7,140,191,188,176,253, 36, 13,126, 26,252, 12, 43, 14,
- 24,125, 41,172, 56,105, 72,243,190,151,190, 20,182, 45,254,111,165,150,207,100,138,110, 81,183,239,165,113,141,114,106,119,200,
-164,200,194,164,103, 51,248,169,135, 75,250,243, 24,252,212,207, 43, 61, 57, 13,126,234,225,146,254, 60, 6, 63,245,243, 74, 79,
-206,255, 50, 63,245,240,231,123,201,243,101, 86, 29,102, 51,153,218, 76,204,153,248, 83, 78,147, 41, 70, 0, 39,236,118,152,196,
-137, 19,207, 76,151, 46,157, 15,246, 79,147, 36, 73,242, 68, 77, 56,127,130,244,216, 34, 29,176,226,170, 77,154, 81,162, 68,153,
-148, 38, 77,154,119,241,227,199,127,154, 32, 65, 2,207,132, 9, 19,122, 38, 74,148, 72, 73,160,165, 36,188, 67, 73,184,119, 82,
- 15,205, 80,182,230,151,253, 88, 68, 34, 36, 74,146,196, 35,121,242,228,158,206,166, 36, 73,147, 30,113, 18, 12,143, 10, 23,206,
-244,153, 9,207,141,210,193,151, 47, 91,119, 29, 5,208,153, 37,176,156, 98, 50, 69,208,147,114,152, 76,241, 34,153, 76, 29,194,
-135, 15,127, 57, 74,248,240,157,212,103,156,228,103,144,226,249, 30, 51,101,244, 59,106,170,111, 62,102,106,199, 61,207,255,193,
-254, 89, 55, 82,164, 72,139,241,141,108, 64, 25,186, 33, 37,225,158,231,188,142,227,186, 14,120,235,176,221, 75,230, 49,245,169,
- 80, 40,210,181,226,121, 76,173, 72,163,116, 62, 83, 66, 28,207,169, 80, 40,226,245, 18,185, 77,109,236,208,117, 68, 51, 28,158,
- 9, 31,144,120,172,119, 11,164,185, 10,237,174, 55, 53,138, 31, 63,219, 79,153,211, 61,105,151,203,229,112,189, 36, 73,210,241,
-185,208,180,187,142,194,126,245,239, 8,227,101, 75,140,145,143, 48, 94, 62,194, 56,218, 82, 71, 25,153, 69, 79, 57,127, 67,190,
-113, 1,137,199, 90,155, 22,205,187, 32,128,207, 79, 73, 60,214,179,105,209,212, 67,195, 58,207,191,129,230,159,235,214,173,147,
-215,175, 95,203,160, 65,131, 4,109,127, 27,149, 36, 72,136,162,193, 16,235,186,135,148, 78, 72,248,254, 61, 60, 19,246, 64, 43,
-187,201,244,195, 31,149, 11,127,254, 56,127,152,191,214,224,131,143,121,110,243,230,205,205,130,237,202,149, 43,226,231,231, 39,
- 31, 63,126,148, 79,159, 62, 41,137,199,106, 74,153, 50,229, 67, 43,142, 6,235,216,152,244, 38,255,248,227,143,111, 73,239,228,
-201,147,242,254,253,123,241,245,245, 85,232,126,248,240, 65, 57,183, 76, 73,147, 38,245,116, 68, 51, 78,156, 56, 39, 1,216, 60,
-153, 8,218, 84,224, 70,240,102, 9,224, 44, 65, 28,242,232, 5,111,149,241,238,125, 58, 18,243,217,255,168, 1,180, 8,176, 88,
-103,103,183, 84,169, 82,221,215,106, 35,139,251, 73, 9,176,212,119,224,216, 63,106,212,168,105, 44,239,227,216, 90,210,165, 57,
-248,164, 72,145,226, 71,148,127, 39,210, 14, 30,235,248,106,130,208,140, 29, 59,246, 73,242, 63, 89,178,100, 79,213, 4, 90, 79,
- 45, 19,232, 62, 85, 19,219, 28,237,105,183,141, 28,129,172,189, 38, 83,196,168, 38, 83,185,136, 17, 34,184,129,206,155,115,231,
-206, 41,252, 64,191,123, 24, 90,160, 69, 80,229,115,208,244,219,243, 61, 81,143,121,223, 30,253,154,123,158, 91,129, 45, 77,126,
-234,224,159,158, 9,162, 5,182, 51,158,158,158, 15, 95,189,122,245,248,175,191,254,186, 26, 45, 90,180,131,220,243,156,215,121,
- 31,132, 58,218,121,159,221,114, 22,205, 99, 42,210,186,110,114,159, 51,235,155,249,148, 43, 24,241,116,241,156,166,234, 21,139,
- 70,126, 56,173,111, 54,159,253,179, 75,248,148,205, 31,254,188,147, 52,195, 69,140, 24,177, 24,126,174, 90, 97, 98,104, 30,144,
-154, 97,175, 36,244, 9, 37,161,205,235, 59,250,142,244,130,172,212,209,162, 21,171,159, 33,141,207,221,161,131,229, 92,183, 46,
-210,202, 37,245, 27,130, 45, 39,190,163, 16, 52,145, 46, 0,227, 44, 93,135,125,137, 32,139, 99,175,217,108, 22,140,117,143,116,
- 18,215,211, 63,199,225,147, 81, 18,104, 50,105,109, 90, 52, 3,135, 61, 16, 34,216,210,179, 57,162, 25, 45, 98,248,240, 61, 99,
- 68,137,178, 35,106,196,136, 79,153,120,140,107,189, 64, 56,154, 3,226, 90,229,212, 83, 46, 61,223,102, 72,232, 88, 62,227,168,
-156,177,240,205,220,154, 52,105,146,248,248,248, 40,137,199,188, 6, 2,177,156,168,123, 72,233,132,182,110,223,202,243, 95,214,
- 70, 11,146,172, 2,191,228,113,253, 96, 94, 49,233,179, 95,221,180,150,157, 62, 88,227, 18,100,213,172, 90, 53,240, 35,201,151,
- 41,147,244,111,222, 92, 70,119,234, 40, 19,123,116, 85,210,164,238,191,200,140,222,191,202,147, 39, 79, 68, 7,208, 26, 91,183,
-110,221, 23, 42,193, 86,173, 90,201,150, 45, 91,228,216,177, 99,114,225,194, 5,185,118,237,154,220,190,125, 91, 30, 62,124, 40,
- 79,159, 62, 21, 76, 24,162, 5,180, 8,176, 8,204,212,205,223,223, 95, 1,128, 28,124, 8,224,120,143,157,241,221,187,119, 74,
-226,159, 0, 37,101, 86,173,109,175, 99,239, 99,126,150,231,193,131, 7,114,255,254,125,185,119,239,158,220,189,123, 87,238,220,
-185,163,148,245,214,173, 91,228,225, 62, 71, 19,132,201, 2,104, 13, 31, 54, 84,134, 14,234, 45, 35,135,245, 86,246,253,251,245,
-149,190,125,131,167,169, 83,167,202,231,207,159,201,211, 16, 3,173,234,213,171, 75,141, 26, 53, 78, 0,208,244,142, 16, 33,194,
- 95,118, 36, 93,154,131, 15, 0,208, 94,111,111,111, 15, 38, 28,239,209,241,165, 4,161,201, 54,122,244,232,145,188,124,249, 82,
-188,188,188,148,196,182,101, 34,127,153,222,188,121,163, 36,222, 3, 72, 16,188,199, 46,104,183, 5,180, 32,202, 73,143,129,118,
- 84,193,130, 5, 95,142, 26, 53,234,125,173, 90,181,164, 78,157, 58,114,234,212, 41, 25, 59,118,236,199,112,225,194,249,160,239,
-199,231,179, 14, 38,220,254,184,119, 29,233, 26,210,175,214,245,164, 4,139,224,234,232,198, 70, 74,119,227,158,231,188,238,128,
-166, 14,118,105,102, 9,214, 70,248,193, 88, 15, 94, 61, 66,221, 46,255,244,211, 79,103,241,163,242, 24, 69,122,204, 61,207,121,
-157,247, 99,198,140,185,214, 14,117,187,237, 94, 50,175,105,215,174,197, 63,249, 28, 89,213,218, 7,146,173,135,245,203,199,126,
-125,120,113, 77,159, 67,139, 42,251,180,171,147,208, 7, 18,173,110, 78,208,164,244,170, 88,163, 70,141, 90,160,124,237, 46, 93,
-186,212,142,123,244,237,118,248, 70,219,225,219, 84, 18,250, 86, 59,130, 45, 71,223,145, 30,160, 21,211,100,202,150, 46, 93, 74,
-159, 73, 93, 59,136,249,143,209,226,221,188,129, 28,206,154, 94,218,166, 79,124,248,107,183,145,102,171,106,103,112,248,109, 82,
-146,197,126,200, 49, 41, 91,182,108,175,240,157, 61, 70,210,250, 51,215,252,222, 81,172,111, 25,104, 21,138, 18, 49,226,131,149,
-139,166,127,186,119,235,172,248,125,120, 34,231,206, 30,147, 75,231, 14,203,210,217,147, 63,242, 30,202, 95,200,137,254,169,221,
- 10,142,115,232,225,167,179,239,176, 73, 51, 89,177,142,117,146,151,232,242, 52, 69,241, 78, 79,227,185,148,121,147, 36,121,218,
- 79,148,106,113,252,164,148, 11, 47,249, 83, 15,208, 74, 86,184, 99,157,100,197, 58, 63, 77, 86,180,211,211, 56, 25,202,188, 73,
-236, 28, 29,103,235,242,223,203,143,137,198,165, 97,234, 36, 94,239,151, 79,252,228,215, 60,151,120,149,138,102, 23,104, 81, 93,
-136, 63, 98, 63, 75, 9, 76,151,122,245,196, 99,225,108,121,176,101,181,120,237,223, 36, 94,251,144,246,184,201,238,233,147,229,
-241,227,199,154, 64, 43,117,234,212,138, 36, 75,221,126,255,253,119,217,185,115,167,156, 62,125, 58, 24,200,226,132, 75, 96,132,
-193,215, 33, 40,226, 36, 78,122, 59,118,236,144, 61,123,246,200,254,253,251,229,240,225,195,114,252,248,113,101,146, 61,123,246,
-172, 92,188,120, 81,174, 94,189, 42, 55,110,220, 16, 12,232,206, 0, 45, 74,170, 94,191,125,251, 86, 25,204,120,140,180,207, 34,
-189,126,246,236,153, 83, 64,139,224,202,251,254, 66,241,189,241,179,188,185, 59, 95,158, 60,188, 33,107,214,109,144, 22,237,186,
- 73,185, 31, 26,200,224,225, 99, 20, 0, 7,201,132, 2, 22,157, 4, 90,236,212,163,170, 87,175,230, 79,144, 53,101,202, 20, 47,
- 0, 79, 15,212,255,156,171,107,198, 64,190, 7,168, 21, 85,201,150,230, 64, 1,208,115,132, 32,107,243,230,205, 4, 90,150,170,
- 76,123, 31, 81, 48,160, 69,144,229,230,230, 38,160,161,128,235,109,219,182,201,246,237,219,101,215,174, 93,210,117,198, 57,105,
- 53,241,130, 52,232,179, 84, 14, 29, 58,164,128,118, 72,242, 52,129, 86,105,147, 41,102, 36,147,169,121,228, 72,145,206,164, 77,
-155,246, 77,249,242,229, 63,169,149,132,244,196, 31,234,179,151,144,100,221,137, 28, 62,124,111,136, 51,146, 56,146,104,161,111,
- 22, 71,222, 32,127,222, 80,151,123,171, 9,244,188,251,181, 77,224,235,121,113,152,191,101, 31,126,125, 99,164, 55,213,136,255,
-192, 36,222, 0, 82,140, 77,120,111, 31,164, 6, 77,155, 54, 61, 67,160,197, 61,207,145,122, 64,114,235,134,189, 45, 41, 17,139,
-107,179,221, 1,162,126,232,209, 42,167,207,141,253,131,124,102,143,172,236, 83,190,112, 36,159,125, 75,154,248,156,223,216,194,
-167,121,245, 4,222, 37,115,155, 90,232, 25,204, 3,242, 16,100, 21,174, 87,175, 94, 51,130, 43,166,165, 75,151,182, 67,155,183,
- 59,127,254,124,187,155, 55,111,182,195,119,213, 14, 63, 50,237,240, 99, 21,106,160, 69,144,149, 50,117, 66,239,179,103, 61,240,
- 99,116, 75, 38,212,171, 38, 47, 74,230,151,203,133,115, 73,203, 84,137,159,252, 3,109, 20,218, 73,198,209,183,153, 25,154, 1,
- 47,254, 84, 2,188, 10,199, 33,142,151,241,226,197,211,146,108, 5,161, 9, 41, 40,199, 87, 69,173, 23,112,204, 50,255, 14,243,
-142,177, 76, 60, 14,168,132, 35,117,162, 37,205,187, 42, 61,236,121,204,205,214, 53, 45,222,216,170,123,193, 66, 5,115,191,125,
-120,239,146, 92,188,176, 75,222,190,218, 46, 31, 63,236,147, 78, 29,235,201,175,189,218,200, 59,239,219,242,232,238, 69,201,145,
- 45,243, 91, 16,183, 5,182, 52,199, 58,173, 66,217,184,255,213,104, 2, 24,189,104,241,199,113,233, 48,227,138,146,218, 79, 57,
- 47,105,114,148,145, 33, 67,134, 40, 67, 82,142, 28, 57,104, 46,146,192, 78, 29, 2,203,153,180, 72,199, 23,149,250, 31,148, 26,
-195,206, 42,169,218,224,147,146, 36, 83,169,191,233,152, 61,165, 81,141, 12,159, 79, 47, 54,213,248,120,212, 84,154,201,124,196,
- 84, 80,142, 41,102, 9,129, 27,198,242,210,142,206, 67,192,199,175,253,136,234,172,212, 82,178,245,119, 25, 56, 81, 89, 85, 78,
-175, 24,214,148,199,100, 74, 84, 46,110,140, 59,175,230,141,252,104,238, 90, 78, 94, 3,100, 93, 40, 24,217,238,243,180,201,178,
-156, 80,120, 60,174, 75,103, 57,191,124,129,120,238, 92, 19,120,139,128,107,207,140, 73,246,128, 86, 16,230,209, 38,139,224,167,
- 67,135, 14, 50,120,240, 96,153, 63,127,190, 28, 57,114, 68, 81, 73, 18, 92, 80,106, 68, 73,150, 10,178,168, 78,164,202,205, 81,
- 11, 80, 85,200,194, 16,100,237,219,183, 79,126,251,237, 55,233,211,167,143,120,120,120, 4, 3, 89,148, 66,113, 48,178, 33,209,
-114,244,138,125,148,180,176,124,200,180,207, 42,163,170, 90,180,165, 58,252,127, 86, 11,137,214,136,161,191,202,251,107,237,254,
-150,180, 93,109, 43,119,241, 87,214,177,251,128, 64,126,166,203, 82, 64, 46, 95,190, 44, 51,102,204, 80, 36,114, 86, 64, 75,179,
- 51, 34,127,206, 66,133, 10,157,235,223,191,255, 57,240,216, 99,224,192,129, 30,248,219, 57, 87,163, 70,117,123, 64, 75,147, 38,
-218, 96,221,193,131, 7, 61, 86,173, 90, 69, 59,179,117,154, 15, 88,101, 32, 24,102,155,214,175, 95, 95, 8, 0,173, 83,139,241,
- 23,228,194, 93,111,201, 95,189, 23, 37,112,138, 4,209,134, 68, 43,144, 42, 86,112,228, 11, 23,215,245, 80,212, 4,233,223,141,
- 31, 63,254,211,243,231,207,165, 90,181,106, 28,104, 4, 82,210,247,224,193,171, 8,225,195,207,103, 62, 91,210, 47, 91,229,119,
-117,117,189, 77,176,190, 98,197, 10, 37, 17,152, 91,111,159, 95,172,148, 87, 30, 37, 20, 73, 22, 55,238, 15, 45,136,229,107, 37,
-209,114,150, 61, 97,149,255, 39, 16, 34,240,106, 29, 26,130, 37,242,152,214, 28,223, 50,200,231,206,209,241, 62,221, 91,102,243,
- 25,222,163,176,207,213,157, 61,124, 86, 76,170, 78,233,214,141, 82,121, 76,123, 43, 23,139,242, 4,199,122,222, 19, 30,128,185,
-165, 10,178,184, 7,111,219,225,103,168, 29,190,249,118,248, 30, 3, 65, 22,218,176, 29,218,220,150, 68, 43,176, 58,142, 36, 90,
- 4, 89,201, 83,197,242,158,239, 86, 75,254, 90,216, 77,246,238,223, 41, 11, 22,204,148, 49,141,234, 72,171,236,174,239,105,179,
- 21, 26,190,124, 99,207,102,134,102,224, 37,199, 71,142, 75, 28, 43,220,221,221,101,237,218,181, 18, 55,110, 92, 45,160,101, 93,
-149, 32, 63, 23, 1, 55,105, 75, 23, 49, 32,241,152,155, 94, 41,151, 45,122, 97,193,190, 40,209, 34, 71,190,251,248,193, 21,217,
-177,253, 47,121,241,236, 28,222,243, 89, 62,127,122, 40, 13, 26, 84,150, 10,229,139, 74,223, 62, 63,195,252,228,129,220,190,118,
- 65, 2, 36, 91,142,212,136, 97, 81,166,175, 74,195, 90,162,149, 56,105,234, 79, 61,122,244, 80,132, 20, 27, 54,108,224,252, 52,
- 77, 79,129,172, 37, 90,137,146,165,254,212,171, 87, 47,185,115,253,152, 28,217,214, 79, 22, 12, 54,157,121,186,195,180, 64, 77,
- 47,119,155,198,249, 28, 49,213,178, 4, 91, 42, 22, 81, 1,151, 53, 54,209, 83,142,127, 56,143,250,115, 28, 92, 2,108, 81, 57,
- 5, 32,233,173, 92, 38,232,110,243, 70,137,124,235,193,196,222,102,243,160, 70,242,182,116, 52,185, 84, 40,138,127,167, 68,225,
- 63, 89,173, 60, 12,172, 59, 13,223,175, 95,191, 46, 69,179,103,151, 95, 27, 55,150,137, 93,187,202,166,177, 99,228,230,250,229,
-242,106,255,198,192,143,233,149, 19, 64,139,160,136, 0,131,210, 12, 74, 50,142, 30, 61,170, 72,155,172, 65, 22,165, 78, 28, 68,
-168, 6,212, 3,180,152,143,146, 44,170,219,154, 52,105, 34,157, 59,119, 86,244,214,150,146, 44,130, 44, 2, 57, 2, 45, 27,234,
- 72, 71,109,174,168, 15,241,247,109, 79,114,165,221, 95, 44,128, 22, 37, 90, 79,175,254, 41,111, 47,181,146, 39,151,167,203,213,
- 75, 30,210,170, 67, 47,153,115,192, 79,218,206,125, 41, 41, 50,228, 84, 36,124,211,167, 79, 87,192,152, 19, 64, 43, 60, 38,170,
-230,101,203,150, 61, 54,103,206, 28,143,197,139, 23,123,252,249,231,159, 30,227,198,141,243,192,159,138, 7, 36,100, 94,148,116,
- 57, 97, 36, 31, 88, 47,180,193, 44,240, 15,216,213,131, 64,107,150,118,133,131,230, 32,208,162,154,208,222, 70,160,117,229,193,
- 59, 5,104, 81,197, 72, 21, 45,222, 99,119,194,128, 26,240,213,144, 25,110, 18,221,181,182,204, 93,176, 84, 86,175, 94,253, 9,
-170, 81, 47,216,101, 29,137,108, 50,253, 88, 15,118, 26,142,236,184,108,149,159,246,124,108, 99,130,126, 74, 8,168,202, 62,115,
-230,140,108,221,186, 85, 22, 45, 90,164, 72, 24, 87, 47, 25, 37,103,221, 27,203,193,197,201,228,209,185,193,114,111, 79, 46, 25,
-218, 33,178,183, 13,131,120,103, 89,244,205,228,135, 68,235,216,221,211,115,125,238,159,250,203,167,126,149, 36, 62, 7,214,244,
- 80,164, 91, 35, 1,184,126,105,230,226,115, 98, 77, 75,159, 83,107,155,250,148, 43, 16,254,148,142, 66,135,199,196,223,140,234,
- 66, 74,178,152, 32,209,108,135,159, 45, 69,154,165, 74,178, 8,178,240,141,133, 24,104,169, 32,107,193,230,218,178,104,123, 5,
- 25, 51, 47,155, 52,105, 83, 92,198,141, 31, 35, 80, 35,190,167,205,150,149, 49,188,142,162,127, 91, 89, 32,217,111,143, 31, 68,
- 46, 60,186,164,130, 44,154, 45,172, 92,185,146,246, 89, 79, 41,201, 2,175, 31, 67,165,172,165, 58,212, 3,180,108, 85, 62, 44,
-128, 86,164, 24,209, 76, 61,210, 38, 13,119,192, 37,121,220,135,105, 99, 68, 56, 16, 35, 98,248, 30,120, 25, 4,211,142, 55, 72,
-155, 59,109, 94, 55,247,227, 71,191, 75,242,209,239, 6, 52, 12,151,164, 71,247,166,210,188, 89, 13,121,247,246, 12,210,101,252,
-160, 95,147,130,133, 11, 73,245,154,117,165, 75,135,142,159, 2,108,182,180, 72,127,111,247,105, 91,117,119,192,128, 1, 50,111,
-222, 60, 89,190,124,185, 34,180,112, 77,152,240,211, 36,147,233,217, 95, 38, 83, 29,157, 21, 82,232,224, 71, 92,233, 67, 27, 55,
-110,148, 57,147,219,203,212,190,209,223,220,113, 51, 29,191,189,209,164,152,248,112,255, 96,171,233, 8,193, 22, 37, 91, 42,237,
-144, 98, 17,157,101,251, 26,217,180, 37, 90,214,149,212, 42,149,107,164, 40,183, 79,245,105,233,255,113, 98, 87,121, 87, 54, 6,
- 68,233, 81, 62, 53,143, 27, 78,240,139,215,205,222,179, 0, 35, 79, 8,118,126,255,233, 39, 57, 3,201,211,133,197,139,229,230,
-170,149,242,204,221, 77, 81, 23,234, 84, 29, 6, 33,207,201,140,224,129, 70,240, 48, 82, 86,164, 6, 28, 44, 8,128,104,151, 67,
-169,135, 37,200, 98, 67,107, 1, 45,210,164,248,156,234,194,214,173, 91, 43, 19, 34, 39, 71,168, 61, 3,213,133, 42,200,162, 74,
-138,246, 90,206, 2, 45,130, 4,254, 53,160, 50,251, 2, 42,164, 79,146,165,214,222, 2,104,245,235,219, 71, 46,158,131, 77,193,
-249,195,114,238,244, 97, 57,125,202, 67, 26,183,236, 36,179,247,251, 73,155, 57, 47, 37,113,170, 76, 74, 93,166, 77,155,166,240,
- 2,224,201,210, 70,203,102,115, 97, 16, 78,147, 33, 67,134,133,179,102,205,244, 0,111, 61,160,154,243, 64, 31,241, 88,191,126,
-189,199,146, 37, 75,148, 99,240,150, 32,137, 18, 15,189,110, 31,194, 12,104, 17, 96,147,135,252,235,166,186,144,234,226,221,187,
-119,203,222,189,123, 21,128, 92,183,231, 18, 41, 92,187,143, 20,171,221, 75, 81, 43,178,189,208, 70,142,128,214,155,131,151, 94,
- 73,197,214,127,124, 12,151,184,160, 55, 84,131,191,165, 52,153, 82,232, 89,137,104,101,163, 21, 88, 71,150,145,192, 31, 60, 19,
-228, 17,128, 2, 25, 62,124,184,242,167, 72, 9, 27,141,142,249,227,177,120,206, 32,153, 61,182,146,108,152, 83, 77,118,174,106,
- 47,121,178, 68,127,174,245,253,125,225,251,181, 64,127, 61, 38,216,243, 48, 56,119,199, 49, 87, 9, 2,123,152, 90,241,156,215,
-121, 31,137,249, 52,183, 74, 69,162,221,244,188,178,198,231,241,133, 37, 62,141,171,167,240,185,123, 98,154, 34,221,234,213, 58,
-167,207,153,230, 80, 30, 47, 0, 0,255,244, 73, 68, 65, 84, 45, 61,124,230,140,168,228, 83,183, 92,236, 55, 26, 42, 68,245, 61,
-225,192,215,166,180,199,130,196,185, 29,164,162, 10,200, 2, 31,219, 65,157,168,168, 11, 85,144, 69, 59,173,144, 72,180, 8,178,
- 82,164,137,245,214, 18,100,117, 31,146, 91,186,247,253, 81, 82,167, 75,230,205,251,170, 36, 76,179,242,223,112, 6, 74,225,217,
- 7,185,113,207,113,147,146, 87,140,127, 84,137,102, 14,105,209,109,169, 14,237,168, 19,245,174, 68,188,139,178, 40,170, 72, 36,
- 30,171,155, 75,250, 84,177,111,239, 94, 51,232,179,247,195, 29,226,239,121,252,229,155, 3, 27,100,243,176,110,159,211,198,143,
- 69, 67,110, 23, 71,117,136, 30, 37,202,150,151,207,174,201, 71,223,253,224,128, 63,212,133,245,165, 94,189, 74, 82,174,108, 17,
- 49,251,210, 36,228,182, 60,127,113, 71,186,255,250,171,196, 77,156, 74,250,255, 54, 88,104, 32, 31, 82,190,124,195,207, 77, 35,
- 48,130,234, 93, 40,205,202,157, 48,161, 76,136, 24, 81, 30, 71,142, 44,247, 34, 69,146, 25, 38,211, 11,157,101, 87,232, 80,123,
- 66,105, 22,250,215,221,158, 77, 76,227, 30,110, 51, 45, 38,184, 90, 53, 26,150,197,216,184,231, 57,165, 91, 84, 35,170,180,137,
- 65, 40,205,178,220,235,124,239,183,159,205,186, 98,214,122, 82, 91, 53,136,158, 56,211,207,107,155, 85,245,255,136, 9,226,125,
-133,184,114,185, 96, 20,223, 58,177, 28,131, 44,210,193,164,252,152, 0,230,143, 78,157,228, 17, 38, 27, 79, 48,246, 57, 38,193,
-231, 91,183,200,139,237, 91,228,229,206,205, 74,226,241,174, 41,118,109,180,130, 20,137,160,136, 18, 37,118, 18,123, 32,139,234,
- 50, 74,168,212, 77, 15,208,162, 45, 19,165,100,101,202,148, 81,108,179, 40,201, 34,208,226, 68,174,130, 44, 78,162,156, 56,249,
- 7, 0,123,158,167, 78,180,246, 62, 2, 64, 74, 58,240,204,107,164,125,220,211, 38, 45,224, 88,155,148, 5,208,234,221,187,183,
- 82,198, 3, 7, 14,200,236,217,179,149,191,145,194, 37, 42,200,164, 45,207,164, 53,128, 86,162,148,174, 10, 8,161,116,142, 42,
- 75, 45,160, 69, 85, 97,233,210,165,143, 96, 65,129, 7,164, 65, 30, 0, 5, 30,183,110,221,244, 56,127,254,156, 7,232,120,192,
- 46,205, 3,128, 89,145,106,129,151, 13,181, 11, 27, 60, 71,104, 37, 90, 42,208,162,106, 78, 5, 89,170, 61, 29, 38, 95,217,127,
-224,160,172, 91,191, 81, 54,110,114, 83, 64, 50, 39, 17, 13,137,214, 7, 2,173, 81,171,160,206, 77, 94,154, 43, 10, 63, 67,162,
-165,153,144,207,215, 17,208,226,192, 67,163, 82,168, 72,105,223,166,128,190, 23, 47, 94, 40,234,109,254,241, 17, 0, 19, 40,246,
-235,215, 79,126,249,229, 23,101,121, 53,140,205, 29,170,182, 67,194,111, 39,158,105, 91,161, 66,133, 7,144,190,153, 89, 78, 12,
-154, 31, 59,117,234,196,190,125,142,123,158,243, 58,239, 51, 31,174,247,212,162, 93,183, 66,146, 87,207,111,185,251, 60,189,186,
-193,167, 83,179, 28, 62, 15,207, 45, 80,164, 91,221,127,202,233,115,251,240,104,159,159,234,164,242, 73,146,208,196,126,164,170,
-148, 28,146, 36,208,162,202,144, 54, 89, 84, 23,170,118, 89, 4, 90, 76,148,100, 17,100,225,187,119, 26,104,169, 32,107,161,133,
- 36,171,219,224, 92, 0, 89,117, 37,131,107,114, 47, 75,144,245,189, 75,180,184,106,151,227, 28,165,174,252, 73,229,248, 64, 73,
- 22,152, 31, 4,100, 97,194,108, 11, 53,248, 35,252,124,253,162,213,214, 14,238,135,181,250, 47, 82,234,228,209,110,190,186,179,
-201, 95,110,195, 14,232, 80, 90,145,185,241,246, 73,219,204, 34,179,123,201,147, 21,147,252, 83,199,137,118, 19,229,177, 43,217,
-194,202, 66, 79, 26,190,127,244, 61, 32, 39, 79,236, 14, 4, 89,185,114,101,145,183,111,111,203,179,231,119,228,222,163,123,178,
-121,199, 30,137, 20, 43,169, 52,111,211, 69,184, 26, 49, 20, 60,248, 22, 31, 77,144, 51,103, 78,197, 14,149,246, 84,112, 95,227,
- 59, 35, 92,184,167,179,194,133,243,100,130, 52,235,169, 78,137, 86, 16, 58,168, 40, 23,204, 68, 38,144, 34,160,178,165,121,176,
- 6, 90,100,142,179, 2,159,111,145,161,118,203,228, 76,229, 98, 39,205,242,195,176, 63,166,190,121,112,225,156,220,171,152, 68,
- 78, 23,140,242,177,114,116,109,144,101, 9,180,112, 44, 13,203,149, 83, 18, 85,136, 10,216, 66,218, 48,122,180,114,141,251, 93,
-147,245, 1, 45, 14, 22, 52, 44, 39,104,225,100, 74, 21, 17, 37, 89, 52,148,166,244,198, 26,100,233,149,104,209,174, 11, 43,173,
-148,213,123,170,186,112,226,196,137,138, 84,136,210, 50, 74, 36, 8,112,184,186, 17, 18, 30,105,220,184,241,123, 39, 26,125, 31,
-203, 71,117, 18,105, 83,165, 68,160,200,193, 46,164, 64,139, 82, 28,168,245, 20, 53, 25, 93, 90,204,153, 51, 87, 26,116,153, 32,
-173,102,191,128, 68,203, 85,153,224, 57,209, 83, 10,164, 5,180, 48,160, 78,162,122, 16,224, 13,160,234,186, 2,180,192, 15, 15,
- 72, 10, 60, 48, 48,123, 80,229, 7, 0,122, 24,128,172, 9,202,235,140,255, 34,133, 69, 88,205, 20, 51,122,244,232,190,236, 7,
- 76, 60,118,113,113,137,237, 4,255, 76, 4, 90, 84,191, 82, 93, 76, 16,105, 9,178, 8, 94, 8,130,217, 54, 39, 78,156, 80,108,
-235,184,104, 1, 18,173,199,246,222, 1,192,228,185,124,255, 19, 5,104,165, 41,210, 66, 49,178,231,214, 21,234,109,218,255,169,
- 27, 86,186, 9,212, 44,129,231, 4, 99,142,128, 22,255,236, 0, 90,165, 88,177, 98, 92,197,165, 44,128, 88, 3,187,151,186, 77,
- 59, 72,222, 34,229, 96,255,213, 90, 1, 91, 20,183, 67, 77,163,216,154,253,147, 64, 11,198,254,251,177, 2,246, 51,192,250,139,
- 92,185,114,221,253,249,231,159, 61,249, 13,113,227,158,231,188,206,251,232, 7,159, 33,225,218,110,135,167,148,128,209, 55,214,
-254, 50,133,226,122, 95, 63,179,206,231,234,201,229, 62,149,139,199,240,185,120,104,166,207,249,253, 83,124,234,148, 79,224,115,
-110,215, 8,159,234,165,226,248, 84,170, 84,233,121,228,200,145, 47, 32,127,117,173,126, 64,160, 69,144, 53,115,230,204,118,248,
- 62, 21,112,101,157, 8,178, 40,245,114, 70,162,101, 27,100,229, 84, 64,150, 75,166, 20,193, 64,214,247, 14,180, 0,170,218, 35,
- 61,198, 68,251,138,146,121, 46, 42, 65, 31, 12, 38,237,110,216,176,225,189,128, 5, 63, 55,180,218,230,107, 1,173,240,225, 77,
- 29, 87,108,236,254,230,243,227,169, 15,100,111,108, 81, 18,129, 86,227,100,194,244,124,198,140,155, 99, 91, 14,246, 10,111, 10,
-111,207, 21,137,137, 64,235,226,133,227,138, 36,235,230,245,173, 80, 21,158,147,183,175,177, 8,224,249, 85,137,151, 48,137, 68,
-139,157, 72,162,199, 77, 38,197,202,213,144,131, 30,215,229,216,233,235,255, 70,160,197, 38,155, 98,229, 71,235, 14,174,233,241,
-163,101,221,220,214,116,110, 59, 35,209, 10, 0, 90,251, 44,247,161,232,111,223,231,163,249, 50,101, 24, 86,174,104,129, 71, 21,
- 42,215, 54,251,153, 63,249, 95,186,231, 45, 67,218,247,120, 91, 50, 90, 68,255,140,145,162, 77,209, 83, 43, 85,162,165, 78,176,
- 90,123, 59,171, 14,131,188,138, 64,139, 19,174, 53,200, 34,248,226,196, 64,119, 6,214,155,150, 68, 11,171,193,252, 48,153, 72,
-207,158, 61,149, 73, 90, 93, 93, 72, 48,131,137, 70, 89,193, 70,224, 66,155, 45,190,135, 9, 19,176, 83, 64,139, 82, 1,130, 43,
- 84,230,117, 0,184,122, 77, 0, 23, 82,160, 69,169,200,176, 97,195,148, 58,115, 35,128,139, 22, 61,166,164,118,201, 46,229, 43,
-215, 84,116,230, 44, 47,223,171, 5,180,176, 90,110,207,166, 77,155, 20,245, 32, 19, 1, 23,193, 22,120,233,129, 37,254, 39,241,
-252, 80,240,221,105,117, 33, 27, 14, 32,174,100,246,236,217, 41,126, 15,242,135, 91,180,104,209, 61,104, 23,221,171,109, 8,180,
- 40,157,163,180,138,146,199, 78,211,206, 11,237,178,106,117,155,175, 72, 29,185,136,129,146, 45,130, 24,130, 45,170,232, 28, 1,
- 45,216,104,221,164, 36, 43,117,225,102, 98, 74,144, 91,224,231, 77,145,102,114,213, 32, 19,143,173,207,169, 86,198,189, 79,122,
-129, 86,150, 44, 89, 20, 41, 86,157,102, 93,164,243,128,105,146,191, 64, 41,201,149, 36,145, 12,235,219,155, 54, 97, 18, 35, 70,
- 12,197, 0,255,159, 4, 90,104,151,102, 88, 25,198,193,110, 48, 82, 66,164, 94, 88, 76,240,144,141,197, 61,207, 3,174, 15, 0,
-200, 98,190,198,182,190,125, 0,208,213,191,254,250,235, 11,168,157, 95,158, 59,117,228,197,212, 81,237, 95, 79, 28,214,234,205,
-238,173,203,189,212,227,101,115, 71,188, 26,217,175,254,155,205,107,103,121,225, 91,127, 14, 53,240, 11, 0,189,115, 90, 99, 9,
-236, 64, 20,160, 5,233,173, 77,160, 5, 96,208,142,137, 82, 47,189, 64, 11,206,130, 50,165, 72, 27,235,237,194, 45,117, 2,109,
-178,186, 13,118, 12,178,190,119,160,165,242,153,246,142, 4, 82,203,150, 45, 19,168,133,173,129, 86, 52,244,219,103,148,124,225,
-155,240,194,247,123, 21, 60,237,224,168,141,190,134,234, 48, 97, 82,211,182,187,175,150,200, 69,113,149, 91,207, 34,157,242, 63,
- 16,251, 38,129,214,171, 58,121,110,110,206, 59,230,212,150,114,243,100,239,136,205, 18, 47, 98,236,109,246,202, 74,213,225,161,
-253,238,210,180,105, 77,153, 63,111,180,248,190,191, 9,183, 6,183,196,243,233, 29,137, 24, 53,142, 68,140,145, 80, 34,199, 78,
- 38,211,231,173,149, 3,167,110,203,150,173, 7,255,173,170,195, 24,248,166,110,218,240,163, 69,137,160,234,124, 92,235,179,228,
-253, 96,116,150,207,233, 33,211,250, 69,127,117,119,179,233,152,150,141,150,158, 23,124,227,121,172,109, 25,157,179,109,116,205,
-144,178, 74,187, 70,181,223,220,187,224, 33, 91,255,250, 67,186,255, 62,201,255,175, 77,151,223, 36,207, 82,234, 89,172, 68,174,
-197,245, 86,158,170, 27,170, 14,171,148,171, 43,253,126, 25, 27, 44,109,221,184, 87,152,120,239,167, 70, 93,117,173, 58,164,199,
-119, 2, 45, 74,178, 8,128, 40, 41,114, 4,178,244, 72,180, 8,222, 56,137,219, 50,124,167,116,131, 54, 55,148,102,209,176,153,
-246, 97,180,111,176,225, 50,194, 17, 91,246,113, 85, 27,221, 68, 88, 0,171, 16,219,104, 97, 66, 83,202, 68, 96, 72,251, 31,234,
-200, 33, 97, 19, 72,137,148, 85,152,115,231,206,149, 89,179,102, 9, 86,211, 41, 75,182,181,128, 22,238,239, 34,192, 82,237,178,
-120, 12,128,230, 1,137, 24, 85,133, 53,245,182,183,101, 62,128,183,120,160, 59,178,125,251,246, 30,152, 80, 61,172,129, 22,165,
-100,127,252,241,135, 7, 86,148, 77,128,170, 34,177,214, 59, 84,160,133,229,232,194,100,105,252, 78,176,162, 94,231,190, 65,131,
- 6,138, 61, 28, 13,127,237,209, 37, 88,194, 36,239, 57, 25,146, 84, 0, 50,182, 39,249,196,133, 3,130,178, 11,192, 55,140,160,
-211, 73,250,244,233, 21,190,102,204,152, 81, 32,133,225,242,117,250,226,176,244,163, 21,248, 10,150,209, 90,162, 69, 27,152,252,
- 37,171, 73,129,194, 21,164,140,171,171, 52,112, 77, 43,221,127,168,168, 72,220, 32,209,249, 22,128,150, 45, 22,117,193,197,253,
- 72,186, 85, 71,197,139, 23,191, 5,233, 41, 62,163, 55,111,160,218,127,131,254,243,146, 96,202, 86, 2, 40,126,142,190,251, 28,
-125,227, 5,192,230, 21,173,182, 39,208,194,183,211, 14,134,187,237,176, 34, 56,136, 52,203, 18,100, 57, 3,180,210,165, 77,181,
-227,233,139, 91,175,220,143,254,234, 67,195,247, 95, 6,229,112, 40,201,250, 55,216,104,169,124,134,209,123,123, 26,189,195, 9,
-240,163, 88,177, 98,181,176,224,127, 84,244,251,147, 24, 91,253, 57,206,113,156,165,230, 0,252,191,167,209, 70,122,213,132,129,
-198,240, 0,247, 19, 28,208, 12, 70, 47, 94, 34,211,157, 87,159,183,200,105,137, 38, 30, 98, 18, 15,255,112, 47, 70,174,104,183,
-106, 97,222,153, 47,214,230,154, 38,235,243,255, 41,231, 38, 29,150, 56, 17, 98, 81, 58, 99,115,163, 49,252,148,241, 35, 62,253,
-214,255, 87,169, 85,187,138,188,122,125, 91,158,120,222,149,219, 15,238, 73, 36, 5,100, 37,151, 2, 37,171,203,222,147,183,100,
- 63,128,214,224, 65,163, 63,254,219,140,225,147, 23,239,210, 40, 69,137, 46,207, 28,248,209,210, 37, 68, 73, 82,164, 75,163,100,
-197,186, 60,179,246,163,245,230,197,117, 57,180,165,143, 44, 28, 98, 58,173,181,234, 80,235,187,255, 14,238, 91,175, 58,212, 15,
-180, 56, 65, 22,200,150,233,201,185, 93,110,178,127,209, 20,153,219,185,174, 20,200,145,237, 69,178, 44, 37,174, 57, 3,178,200,
- 36, 76, 92,143,248,103,212,172,105, 47,153, 61,107,127,176,180,119,207, 21, 97,226,189, 1,191,205,114, 10,104, 89,130, 44,170,
-206,108, 73,178,244,218,104, 17,104,209,238, 75,149,100, 89, 26,190, 19, 28,193, 86, 69,177,203,226,224,163,119, 37,163, 85, 39,
-217, 71,213, 36,221, 82, 88, 0, 45,231,250,145,133,141, 22,129,214,194,133, 11, 21, 27,139,170,112, 6, 75,128, 64,233, 9,125,
-138, 17, 56, 76,152, 48, 65,160, 10, 20, 0, 25, 5,140, 2, 44, 57, 52,134,199,253, 25, 88,101,233, 1,137,208, 73,218,105, 65,
- 98,164, 72,179, 50,101,202,180, 15,133,180, 9, 42, 28, 21, 30,125,168, 62,192,201,113,172,106,241,128, 65,184,199,130, 5, 11,
- 60,240,231,108, 38,216, 98,194, 64,111,166,106,146,126,181,160, 10,244,200,155, 55,239, 9,212,193,114,192, 15, 70,158,182,121,
- 4,212,106, 4,129,230,227,206,201,217,155,175,148, 85,134, 4,221,106,148, 1,117,207, 9,130, 97,158,180,128, 22, 87,221,148,
- 42, 85, 74,202, 65,133, 93,177, 98, 69,133,159,116, 15, 65, 71,165,252,227,227, 10,212,102,205,154, 5,170,149, 1, 12, 60,245,
- 0, 45, 72,236,132, 82, 82,184,200,144, 22, 45,127,146,220, 41,146, 75,125,215, 52, 50,186, 76, 97, 89, 58,102,164,162,170, 4,
-208,251,167,128, 22,213,191, 84,177,208,192,189,125, 64, 27, 91,158,235,178,157,178,228,109,225,194,133,111, 2, 99,189,133, 90,
-252, 5, 86, 0,191,180, 5,184, 84,128, 5, 23, 29,207,241, 3,243, 18, 46, 84, 94,130, 7,150, 78, 64,109, 54, 23,129, 22, 85,
-131,214,134,239,214, 32, 75, 47,208,130,203,142, 60,232,151, 55,222,120,221,149, 7, 55,247,200,244,185,117,223, 59, 82, 23, 90,
-186,132,112,238,163,253, 62,114, 99,252,251, 9, 63, 27, 55, 1,190, 20,245, 48,165,228, 80,211,154,185,106, 28, 63, 32, 87,240,
- 29,105, 77, 32, 95, 28,104,197, 77,104,114,187,254,114,146, 92, 16,151,207,139,222,103, 56, 16,255,234,236, 23,166,181,251,247,
-133,107,241,234, 69,221,202,135, 14,108, 46, 63,255,243,246,222,107, 36,118,132, 24,244,251,102,111,139, 2,169,214,221,251,183,
- 46,194,232,253,150,212,111,216, 80,162,199, 73, 44, 49,226,165,144,163,103,111,202,190, 19,215,100,245,182,227,146, 36, 99, 17,
-201, 95,170,134, 68,141, 28,153,139,105,254,101,238, 29, 58,189,252,105,156,199,255,253,104, 77,187, 40,233,243, 84, 10,244,163,
- 69,251, 45,212,217,158, 31,173, 64,190, 38, 45,218,233,101,229,223, 14, 7,250,209,170, 62,228,148, 36,203, 86,193, 41, 63, 90,
-223,199,215,225,176,148,206,123,134,135,113,119,212,236, 25,211,118,205,147,217,229,225,130,145,125, 63,239,248,115,164, 2,178,
-152,114,103, 74,103, 87, 50, 96, 85,140, 32,170, 32,250, 49, 34, 8,178, 7,180,182,110, 57, 47, 76, 26, 64, 43, 8, 77,174,156,
-161,244,137, 42, 49, 78,188, 90, 32,203,142, 68, 43, 8, 77, 74,201, 8,180, 40,101,176, 4, 89,148, 6,209,136,157,239, 81, 65,
-150, 10,232,108,168, 35,237,169,193, 20,135,165, 4, 90, 92, 41,201, 99, 36,199, 62,179,254,207,212,255,211,180, 0, 90, 4, 80,
-148, 86, 49,241,216, 58,141, 25, 51, 70,152, 84, 27, 46, 43,160, 21,172,156,180,151,194,128,218, 45, 79,158, 60, 71, 9,140, 8,
-130, 8,180,112,109,139,206,143,193,186,221,247,192,224,214, 3,234, 59, 15, 72,120, 60, 0,100, 78,210,179, 60, 82,116,188, 43,
- 10,246, 93,233,109, 30, 46, 40, 20, 27, 48, 12,236,182,188,197, 7,161,169, 2, 45, 85, 61,216,184,223, 50, 41,250, 99, 63, 41,
-221,160,175,178, 18,145,210, 70,130, 98,170,103, 41,153,180, 3,180, 2,105,170, 18, 45,184,177, 16,184,179, 80, 64, 86,149, 42,
- 85, 20,155, 41,130, 84,218,231,209,198,141, 96,150, 62,134,218,180,105, 35, 4,184, 54,128, 86, 32, 77, 72,180,158,140,134,189,
- 33, 85,142, 4, 90, 5, 10, 20, 16, 0, 16,197,120,127, 96,207, 30,210,185,114, 57, 89, 8,144, 69,233, 38, 28,163, 10, 66, 27,
- 41, 11, 46,160, 58,180, 6,132,186, 85,170, 58,219,135,217, 44,105,182,134,253,216,113,124, 27,180,215, 57,142,123, 43,185,183,
- 56,215, 43,201, 10,164, 9,105,193,168, 17, 35, 70,188,130,205,224, 91,168,196, 95,193,254,240, 5,210, 75,124, 67,175, 33,117,
-125, 14,251,199,231,144, 52, 62, 71,127,120,137,149, 78, 94, 80, 39,191,128,250,118, 51,222,141, 80,169, 65,182, 96,117, 39,208,
-162,177, 59,190,197, 64,195,119,122,132,135, 20, 87, 81, 23, 90, 38, 59,170,195, 64,154, 4, 77,217,178,102,222,246,244,225,105,
-191,155, 23,214,201,129,109, 99,100,202,248, 14,175,237,217,100, 89,251,221,178, 40,233,151,110, 35, 39,154,214, 97, 86,205,114,
- 2,104, 61,224,152,202, 49,138, 82, 44,252,168,249,225, 26, 93,111, 0,147,218,220,130,208, 12, 35,213,161, 37,205,187,120,171,
-245,170,195,246, 99,230, 54,126, 58,227,213,190,167,166,139,171, 68, 73, 0, 90,166,150,175,133,169,249,159,222, 15, 90, 86,235,
- 65, 96,196, 31, 7,117,179, 85,247,130,249,115,231,124,123,227, 10,108,101,241, 51,150, 60,109, 22,137, 28, 39,165, 28, 62,115,
- 71,246, 64,146,229,154,183,162,228, 46, 90, 77, 50,186,100,122, 7, 34,255, 58,135,165,170, 68, 43, 85,201, 46,158,241, 92,203,
-191, 78,152, 52,205,199,238,221,187, 43,227,229,154, 53,107,200,115, 71,126,180, 2,249,169, 74,180,146, 23,235,226, 25, 55, 35,
-233,164,251, 72, 13, 11, 77, 54,232,139, 77,131, 78, 88,245,237,239,143, 78, 78,151,180,215, 59,213, 46,255,126,229,240,238,178,
-118, 88, 87, 5, 96,141,109, 89, 85,202,231,203,234,149,215, 53,195, 8,157, 53, 10, 6,180, 8, 96, 90,253,212, 95,145, 88, 89,
-167,177, 99, 22, 11,147,122, 93,143,103,120, 2, 45,218, 23,168, 32,139, 18, 12,173, 77, 11, 20, 17,104,113,160, 33, 93, 53,204,
- 14, 93, 56,168, 49, 20, 41,149,163, 36, 69, 99, 37,163,189, 1,109, 31, 13,162,105, 55,196,149,130, 52,216, 6, 47,247, 57,205,
- 79, 11,160,197,114,176, 60,148,174,177,140, 44, 51,203, 79,195,119,170, 82, 9, 16,185, 64,128,134,242,180, 3,211, 2, 90,106,
- 89, 0,102,146, 99,162, 26, 14,227,239,147, 0, 44, 4, 90, 92,234,175,103, 11, 82,119,188,111, 7, 65, 22,254,138, 61,160,126,
- 59, 14,154,185,172,137, 32, 79,102,222, 35,200, 10,240,173,181,211,209,132, 75,160,197, 58,177,110,236, 39,172, 23, 23, 23,112,
- 65, 1,125,134, 17, 36, 83, 93, 72,169, 36, 83,128,234,208, 46,128, 33,208,130,250,194, 19,101, 20,172,166, 83, 64, 22, 85,144,
- 12,187,163,170, 31,185, 16,130, 11, 36,104,155, 5, 53,151,178,132,217, 17,208,130, 26,230, 24,164,119,138,173, 24,237,198,104,
-184, 79, 59, 24, 62,199,193,135,101,162, 17,191, 34,229, 2,192,162,228,145,206,113, 1,184,142, 57,170,187,158, 6,208,145,199,
-178,141,214, 18, 84, 1,168,156,225, 30,246,121,215,185,135,221,161,114, 14, 90,192, 23,186, 54,235, 62, 95, 18,252,217,138, 21,
-149, 94,168,235, 27, 72,182, 94,161,109, 94, 64,130,245, 2,210, 86, 47,216, 20,190,194, 34,129,151,176,245, 34,128, 47,105,231,
- 13, 54,129, 22, 37, 90,234,234, 66,130, 44, 26,190, 91,131, 44, 7, 18,173, 64,154,201,147, 68,109,149, 57,123,252,119,191,247,
-175,247,113,217,156, 30,126,149,203,102,187, 17, 61,106,196,109,180,217,210, 19,158, 71, 99, 18,215,197, 52, 7,153, 52, 65, 81,
- 8, 94,160, 73, 19,210,172,113, 80,153,191,196, 79,194, 7,254,172, 64,165,200,149,118,246, 64, 22,139,160, 73, 19,121,244, 74,
-185,212, 42,105,209,140, 24, 62, 94,172, 43,189, 60,118,126,108,243,232,164,164,185,182, 89, 98,109, 60,116, 32,101,247,183, 82,
-115,178,143,212, 26,122,198, 47,124,212,248, 84, 67,211, 73,170, 22,205, 66,144, 86, 61,152, 60,110,162,121,198,159,243,165,108,
-213,122,114,232,228, 53, 25,249,199, 76,201, 87,184,156,127,212,200, 81,248, 13,252, 43, 67,240, 4, 48, 38, 26,126, 10,175, 18,
- 24, 81,162, 79,123,222,161, 67,135, 74,198,191,253,104, 61,199,170, 67, 58, 46,182,181, 89,183, 17,233, 92,225, 15, 40, 77, 36,
- 40,165,231,170,124, 29,116, 66,208,141,191,201, 71, 84, 63, 90,150,254,180, 28, 23, 52,167,107, 58,143,188, 89, 93,158,230, 99,
-202,156,193, 51, 79,166,244,119,243,101, 73,127, 32, 83,134,148,122,165, 47,193, 62, 64,198, 45, 36, 32,226,196,168, 55,105,197,
- 58,164,255, 42,130, 32, 74,178,244,128, 44, 61, 18, 45, 6,136, 38,128, 83, 19,223,161, 38,218, 98,169,137,128, 77, 77,248,227,
- 11, 77, 80,105,189, 60,253,127,199, 14, 0, 90,206,130, 44,198, 84, 68,249,157,137,117, 72, 3,246, 44, 72, 19,144,232, 8, 80,
-207,102, 13,176, 25, 64,122, 7,210,110,128,172,122,246, 8,224,158,163, 64,211, 65,104,194,128,247, 48,218,231,190,154,208, 62,
-247, 45, 19,235,104,153, 8, 46,209, 70,135,173,222, 29, 72, 83, 5, 90,148, 64,209,113, 31,193, 15, 87,156, 50, 34, 0,237,241,
- 56,120, 16, 32, 89, 38, 14, 76, 52, 92,183, 82, 29, 90,150, 51, 23,193, 22,202,250,132, 6,199, 80,197, 40, 9,215,158, 3,212,
-189, 3,192,248,128,228, 11,219,172,119, 0, 36,207, 41,201, 10, 0, 89,214, 64, 84,107,210,209,211, 38,214,121, 44,105, 50,188,
-206, 26,164, 5, 86,146, 44,198, 57,227, 50,109,189, 14, 11,237,149,179, 36, 84,197,219,192, 71, 47, 72, 26, 95, 67,178,250,250,
-135, 31,126,120,137,213,166, 91, 65,219, 30,192,178, 59, 57,162,205,171, 81,170,197,132, 54,118,152,144,167,182, 13,230, 4,150,
- 51,103,161,184,239,199, 46,200, 33, 46,153, 99,191,141, 19, 43,202, 54,170, 17,245, 0, 44, 27, 54, 90, 95,186,141, 66,210,198,
-122, 38, 71,123,116,163,129,207, 94, 92,100,131,159, 26, 45,191,123,122,234, 30,214, 64,139,229, 78, 31, 62,126,220,243,101,199,
-255,254,174,237,153, 29, 50,236,252,141,219, 13,199, 93,151,188, 13, 38,120,135,139,150,128,190,222,210,219,251,222,109, 84,218,
- 50,168,244,179,255, 88, 80,233,241, 4, 88,252,241,231,248,150, 19, 54,170, 35, 35, 68,144, 7,176, 25,125,132,132, 65,224,165,
- 78,160, 53,158, 63,150,252,209,229,184,153, 75, 63, 29, 93,125, 27, 29,168, 32, 82,181,128, 84, 8,123, 44, 53,149,178, 1,231,
-229,177,231, 53,245, 62,247,133,173,238, 71,210,245,162,144,103,178,239, 25, 62,228, 52,117, 61,105, 61, 57,158,195,192, 72, 61,
-191,238,132,143,220,218, 91,116, 16,154,184,127,210, 22,240,177, 4, 65,214,199, 78,128, 34, 93,149,212,217, 9, 67, 67, 43,248,
-164, 3,160,149, 36,105,210,163, 92, 73,199, 68, 67,111,235,132, 73,134, 94,159,131, 36,212,253,113,194, 68,137,246, 89, 20, 70,
-207, 32,233,108,217,191, 59,154, 4, 75,248,171,245, 0,208,241, 84, 19, 85, 32,106, 2, 40,240, 84, 19,165, 88,129, 41,122,116,
-216,226, 58, 12, 42,237, 44,239, 66, 51, 57, 58,243, 46, 91,109, 68, 91, 44,170, 90,104,171, 69, 27, 45,103,109,179,180,218,189,
- 36,128,230, 58,128, 46,134, 92,210, 2, 88,118,129,150, 51,149,212,250, 54, 83,164,137,230,150,187,112,220,247,148,108, 57, 3,
-176,254, 3, 64,203,132,177, 99, 60,210, 17,140,177, 90, 54, 89, 90,237,110,178,227,176,212, 81, 83,106,210, 12,120,152, 54,163,
-109, 77,241, 98,111, 52,197,142,127,221, 20, 37,225, 70,229,220,182, 45,169, 94,154,206,116,177,239,157, 38,253, 95, 41, 75,243,
-249,131,153,221,100,242,155,110,225, 71,107,230,223,158,225,245, 72,180, 66, 67, 71, 23,191, 9,162,144, 81, 81, 33,227, 39,184,
- 31,206,171,112,111,113, 30,120,159,215,152,223,234,126,160, 23,122, 93, 47,116, 62,147,243, 54, 90,206,191,195,230, 19,223,123,
- 39, 12, 13, 27,140,186,135,134,123,193,159, 53,248,105,240, 51,172, 56, 96,244,165,176,226,228,223,116, 12,126, 26,252, 12, 91,
- 14,216,160,166, 2, 45, 71,123,203,123,118,242,125,241,114,254, 19, 47, 48, 62,192,176,229,186,193, 79,131,159, 97,197, 1,163,
- 47,133, 21, 39, 13,176, 97,244, 37,163, 47,133, 45, 7,156, 0, 90,170,148, 75, 85, 27,170,210, 44, 75, 9,152,122,237, 11, 23,
-210,126,172,195,128,191, 17,126, 40,214,201,153, 50,217,122, 94,235,154, 22,125,173,231, 67, 82,102,131,102,240,118,118,196, 19,
-163,141,236,115,192,232, 75, 70, 95,210,219, 7,140,239,200,248,142,108,113, 64,111,255,177,204,247,111,233, 75,106, 61,236,241,
- 32, 88, 61,191, 3,137,214,183, 97,163,165,213, 67,116,222, 55,254,158,116, 50, 74,103, 54,131,159, 58, 25,165, 51,155,193, 79,
-157,140,210,153,205,224,167, 78, 70,233,204,102,240, 83, 39,163,116,102, 51,248,169,147, 81,161,205,102,195, 70, 75,177,201,178,
-167, 46,252, 7, 84,135, 14, 37, 90, 54,235,143, 24,219, 17, 30, 60, 88, 21,255,217,179, 45, 73,153,120,204,107, 78, 50,203,232,
-132, 78, 50, 76, 35,251,247,202, 79,134,235,209, 27,178,199, 94,222,239,181,238, 97,209, 3,140,186,135, 5, 23,255, 79,195,224,
-167,193,207,176,226,128,209,151,194,138,147, 26,116,172, 86, 29,114, 5,162,186,202,176, 66,128,218,144,215,212,149,137,150,199,
-129,247,191, 82, 81,245,189,134,128,138,224,234,201,147,197,165,159, 60, 89,216,241,239,180,184, 52,175, 57, 9,182, 2, 59, 97,
-162, 36, 73, 24,190, 37,208, 29,130,195, 85,129,200, 11,156, 26, 33, 72,250,119, 12,146,122, 1, 71,104,192,134,222,119, 88,138,
-110,245,117,140,128, 92,140,115,152, 35, 71,142,246, 8,179,178, 16,142, 46, 59,218,136,123,104, 57,248,140, 10, 23,206,244,153,
- 9,143,143,210,120,145,163,188, 90, 3, 90, 38,172, 4,156, 12, 23, 9,123,153,120,140,119,101,250,151, 2, 87,173,246,162,207,
-163, 38,112, 29,177, 3, 43,114,223,224,184,187,141, 7,180,248,169, 62, 66, 63, 68,125,224,189,255, 12,194, 15,121, 99,197,224,
- 25,156,247, 69,138,164,135,230,224,174,201,139,238,223,218,100, 43,247,182, 10, 61,184,103,242,132, 71,183,215,159, 60,178, 83,
- 10,123,222,167, 29,149,147,171, 34, 89, 62, 38, 30,235, 13,112,174,183,238, 44, 50,235, 89, 23,137,142, 27,185,183, 85,111,230,
-211, 67,179, 8,242,209, 83,249, 22,164,178, 90,141,168,147,166, 14, 50, 65,178,232, 41,167,250, 64, 76,172,104,158,142,244, 0,
-110,118, 24, 51, 48,149,157,151, 57, 67, 83,111,121,237,209,100, 91,179, 47,253, 28,176,183,244,147,165, 69,219, 97, 57,177,186,
-178, 58,234,186, 13, 43, 45,183,241, 88,139, 88,192,253,175, 89,247,192, 34,193, 61,204, 36, 56, 21,127, 71,111,253,116, 67,100,
-233,126,200,198,170,122,189,253, 83,103,149, 3,179,125,137,186, 59, 91,134,111, 41,191,115,171, 14, 41,189, 34,176, 58,123,186,
-215, 95, 91, 54,151,127,197,196, 99, 94,227,189,100, 89,234,164, 73,157,191,254,150,116,133,154, 60, 73,154,187,238,167, 84,249,
- 27, 62, 73,146,187,238, 22, 94,183,170,117, 96, 67, 16, 88,249,189,189, 42, 62, 47, 14,139,217,231,110,160, 79, 21, 91, 7,138,
- 67,209, 16, 0,173,248,241, 93, 98,199, 76,158, 99, 96,188, 52,185, 15,197, 73,157,253,109,236,148,217,223,198, 77,149,231, 80,
-204,228,217, 7,243,158,131, 22,209,236, 48, 89, 18,154,146,101, 78,104,234,145, 57,145,201,157,123,158,107,180,176, 53, 77,189,
-128, 35, 52, 96,195,242,217,113, 58,123,160,102,221, 45,233, 96,192,141,143,112, 41, 43,224,137,127, 19, 28,164,186,193, 17,233,
-166,218,181,107,175,196,245, 20, 22,249, 84,154, 73, 9,176,212, 54,198,177, 63, 6,133, 41,104,223, 81,214,137,215,121,223, 34,
- 47,129,153,165, 20,204,110, 57,177,116,188,113,161,194,197, 60,246, 29, 60,118,237,234,245, 59,143, 46, 94,185,117,103,211,182,
- 93, 39,114,230,202,125,156,247, 66,216,238,225, 16, 24,185, 17, 0,219, 50,164,115, 1,105, 25,175,129,158,163, 9, 61, 72, 57,
- 49, 0,238,103,108, 73,103, 18,158, 57,104,239, 59,210,209,166,245, 17,159,238, 29, 29,160,210,131, 61,227, 92,130,215, 12, 6,
-109,189, 89,243, 83, 1, 84,168,231, 25,180,133, 55, 92, 89,156,198,121,127, 12,232,123,255,250,235,175, 91,240,174,255, 28, 14,
- 87,223,193,241,234, 19,248,218,185, 28, 16, 80,218,122,146, 11,214, 70,221,170, 36,219,122,124,215,200,119,220,219, 42,251,128,
-142, 25,122, 30,217,213,235, 54,247, 78, 78,226,225, 17,174,103, 42,194, 59,189,195,196,242, 28,233, 89,192,164,195,137,231, 41,
-120,168, 36, 0, 68, 91,177, 19,245,244,249, 44, 40,207, 56, 60,255,114,228,200,145, 74,148, 1,250, 24, 2,208,164, 79, 33,126,
- 91,188,111,185,233,161,185, 30, 33,176,252, 25,197, 2,252,213,227,252,215,146,102,102,188,108, 49, 18,227, 78,170,154, 5,130,
- 53,210, 97, 10, 4,110,240,202, 63, 3, 63, 64,143,112,109,128,142,118,183,219,165, 0,210,151,174, 91,183,238, 19,125,245,209,
- 57, 48,206, 15, 56,217, 70,246,104,183,130, 11,149, 11,140,146, 0,126,178,125,218,216,248,166,172,249, 73,144,215, 10,237,177,
- 12,145, 26,220,224, 0,215, 13,126,236,220,224, 76,117, 25,175, 35,217, 3,129,186,219,136, 32, 11,142,159,149,232, 20, 0, 90,
-118,131, 81,135,160,221,237,242, 56, 36,252, 68,251, 78,134,115,225,183, 28, 43,225, 4, 88,232, 64,155, 17, 74, 84, 7,218, 54,
- 28,114,243, 53,122,250,103,152,150,211, 89, 98,255,162,252, 90,238, 80,254,174,234,223,210,172,133, 29, 9,176,222,189,187, 2,
- 79,227, 87,132,199,188,198,123,233, 10, 55,241,232, 53,114,129,255,241, 11,119,229,241,203, 15,194,125,187,254,127,249, 39,203,
- 91,159,193,130,109,118,108, 54, 62, 65,150, 60, 30, 44,151,215,199,151,231,175, 63,200,160,165,215,165, 66, 47,119, 41,218,102,
-177, 52,249,125, 45,104,189, 83,230,217,144, 0,173,152, 73, 50,149,141,157, 34,215,179,246,191,142, 51,111, 61,178, 77, 46,223,
- 57, 43,151,110, 95,149,181,219, 79, 74,235, 30, 99,204,113, 82,230,122,198, 60,206,116,236,124,201, 77,209, 51, 37, 52, 53,201,
-150, 36,220,246,246,213,114,124,222,255,103, 39,121,121, 96,178,236,159,222, 78,186,215,201,249,153,215,121,159,249, 52, 6,180,
- 96,128, 3,222,199, 15, 35,188,203, 94,203,196,107, 33, 5, 27,120,191,242, 14,179,217, 87,225, 33,233, 32,182,222, 54,240,242,
- 87, 76,242,142, 98, 85,217,252, 0, 49,154, 71,129, 72,164, 88,179,152, 49,235, 53,142, 20,169, 3, 83,147,152, 49, 27, 20, 73,
-157,122,228,195, 7, 15,182,192,235,188, 27, 60,205,187,193, 1,165,219,214,173, 91, 55, 33,132, 74, 87, 11, 30,216, 4, 90,225,
-195,135,243,135,215,241, 29,240,252,238,102,157,120,157,247, 67, 0,180, 50, 23, 41, 90,252,228,155,183,222, 31,238,223,185,231,
-245,123,215,254, 59,250,246, 25,177,105,246,162,117,219, 14, 29, 63,119, 52,107,214, 28, 71, 81, 46, 78, 82,182, 54,123,131, 79,
- 26, 76,132, 30, 0, 42,102,122,149,167,135,125, 53, 36, 5, 64,230, 7,222, 3, 49,235,159, 10,149,190, 53,208,242,188,178,123,
-187, 60, 56,123, 74,238,158, 60,166,120,240,231,192,200,116,113,155,155,156,221,184, 86, 78,175, 89,161,120,245,103, 98, 92,185,
- 12, 25, 50,112,146,212, 61, 65, 88,100, 76, 1, 73,163, 31, 61, 50,175, 94,189, 90, 9, 50,142, 48, 74, 4,172,157, 53,250,103,
- 68,132,191,217, 61,120,240,224,235,187,119,239,246,132, 87,103,111,132, 94,122, 0,143,248, 15, 1, 50,188,209,190,102, 56, 27,
- 53,163,238,230,182,109,219,154, 17,206,201,220,188,121,115, 74,182,250,216, 43, 39, 37, 88,221, 1,174, 26, 84, 45, 33,111, 95,
- 63, 18,238,121,110, 41,217,170,130, 80, 79, 93,106,228,122,118,225,228,226,207,220,243, 92,163,156,234,109,204, 53,225,167, 34,
-182,161, 23,251, 11, 67, 44,113,227,100, 99, 25, 29,129,206,145,233,179, 79, 39, 77,203,108,163,127,254,249,103,197,155, 63,219,
-158,116,212,196,112, 73, 12, 77,194,216,151,120, 96,180,141, 62,111,167,171, 41,151,221, 44,128,150,117,228, 3,173,254,185,242,
-214,173, 91, 50,118,236, 88,203,112, 38,123, 9,218,152,240,240,222, 0, 2,173,232, 92,151, 17, 33, 0,100,252,112,205,250,167,
- 64,239,132, 27, 1,224,245, 53, 39,111,242,148,209, 38, 0, 62,236,197, 10,213, 75,147,101,153,193,168, 10, 12,145,197, 8, 25,
- 8,205, 37,136, 16,192,242,207,179, 42,171, 37,205, 22,232,123,110, 71,142, 28,113,195,247,227,134,166, 14, 76,112, 86,237, 6,
- 48,232,134, 8, 14,148, 20, 58,140,143,138,251, 14,203, 73, 73, 22,104,123,160, 92, 30, 0,170,123,225,100,216, 29,206,171,181,
-156,245,234,173,187,163,126, 97,125,207, 17,205,177,232,247, 47,212,113, 18,124, 81,194,220,176,127,170,155, 1,180,156, 97,117,
-152,230,117, 78,162,165, 5,180, 18,231,168, 37, 47,223,249,203,171,247, 18,152,120,206,235,246, 6, 94, 54, 62, 37, 89, 4, 89,
-183, 79, 13,149, 7,207,189,165, 98, 47,246,235,191,183, 76, 85,250,203,237, 39,111,148, 99, 12,142, 31,163, 68,139, 54,222, 20,
- 57,114,109, 83,154, 52,201, 20,233,214,255,183, 96,157,144, 0, 42,125,238, 82, 62, 59, 16,206,198,243,229, 27,185,255,244,133,
- 28, 57,127, 86,142, 2, 0,158,184,244, 88, 14,159,187, 32,139, 55, 45, 17,151,124, 37,222,199, 72,148,201,150, 23,246, 96, 52,
- 33,185, 90,208,174,114,166, 15,251,166,181,145, 87, 0, 87, 62, 39,102, 7, 75, 79,119,143,151, 77,163, 26, 73,179,210,105, 63,
- 48,191,189,186,227, 58, 65, 80, 32,136, 32,160,216,188,121,243, 97,128,141,189,150,137,215,172,192,134, 63,159,213, 57,152, 43,
-239, 80,129,150,250,142, 69,139, 22,237, 45, 89,178,164, 59,120, 90,194, 78,151, 10, 86,247,102, 38, 83,186,102, 81,163,182,221,
- 53,125,122,107,175,135, 15,219, 97, 6,235, 4, 4,215,249,254,229,203,157,186,255,252,243,209,115,187,119,159,187,122,246,236,
- 30, 14,124,240, 40,236,134, 0,219,110,185,115,231, 94, 98,167,156,148,178,249,179, 60, 0, 40,151, 45, 36, 89, 43, 8,182,112,
-190, 66,189,198,251,204,199,252,160,101,173,102,180, 57,248, 64, 77, 56, 99,247,190,195, 87,238,223,185,255,242,230,133, 75,158,
- 83,127, 31,181,115,218,216,233, 91,198, 77, 89,176,114,197,250,157,235,151,174, 90,191,137,121,244,214, 29,249,210, 0,156,120,
-242, 79,145,131, 23, 39, 3,134,243,161,199, 99,122, 79,102, 24,157, 37, 11, 23, 72,234,148, 41, 9,134,108,129,173, 96, 64,235,
-193,217,211,210, 53,150, 73, 73,234,196,200,137, 80,189,198, 61, 99,202, 49,113, 82,203,152, 49, 99, 72,129, 86, 61,198, 41, 35,
-208,194,159,254,107,148,143, 64, 40,165,142,186,247, 65, 72,156,107,139, 23, 47, 54,183,106,213,202, 92,175, 94, 61, 37,193,187,
-179, 25,147,216, 7, 76,220,102, 72,198,204, 0,111,102, 4, 27, 55,215,172, 89,211,140,208, 26,183,224,209,158, 82, 47,203, 45,
-176,238, 84, 23, 82,146, 69,144,197,141,123,158,243, 58,213,132,148, 96,181,251, 33,207,243, 9,195,186,139,159,239, 91, 25, 63,
-180,155,180,249, 33,239,115, 94,167, 58,209, 65,159,167,138,112, 60,202,247, 84, 29, 59, 0, 10,149,118, 97, 92, 75,182, 21,163,
- 31, 60,124,248, 80,149,194,132, 4,104,121, 18, 96, 16, 12, 51,226,132, 26,226,139,123,134,184, 34,216, 98,255, 64, 57, 60,237,
-148,179, 4, 64,206, 61, 76,136, 98,153, 24,210,169,116,233,210, 74, 98,176,114,134,118, 34, 96, 99,152,167,130, 5, 11,190, 5,
-173,194,246,248, 9, 96, 57,127,255,254,253, 74,149, 9, 2,145,175, 23,210, 49,150,137, 9,199, 71,144, 50, 3,104,123, 51,234,
- 6, 67,123,161,223,219,146, 64,233, 6, 6, 8,137,117,130,253,145,145, 55, 24,234,170, 93,187,118,175, 25,225, 0, 0,108, 15,
-222, 69,195, 95,117,211, 67,147,193,152,103,176,236,228,221,172, 89,179, 20, 30, 96,236, 80,202,207,128,237,184, 79,201,150, 45,
-154,139, 9,174, 16,249,195, 13,237, 18, 4,104,241, 28,237, 65,201, 58,129, 22, 37,126,142, 54, 71,229, 76,139, 80, 99,123, 24,
-211, 21,161,188, 60, 80, 95, 15,128, 75, 15, 72,208,180, 36, 91,122,234,174, 81,172, 96,183,237,210,132,186,240,255,136, 10, 76,
- 97,136,155,251,247,239, 43,227,134, 1,180,156,101,243, 63,156, 95, 75,117, 72, 64,245,236,237,103,185,253,212, 44,158,111, 62,
-201,209,171, 94, 50,107,243, 53, 91, 64, 43,176, 38, 4, 90,236, 8,183, 31,191,145, 91,143, 94,203, 77,164,146,109,230,201, 72,
-183,119,210,100,198,115, 73, 91,226,103,185,114, 79,249, 65, 21,120,170, 69,204,186, 51,254, 16, 17,191,199,159,133, 95,236, 56,
-113,172,189,195, 7,210,165, 74, 48,110,234,156,207,183, 31,219, 37,219, 79, 46,145,125,167,119,201, 99,128,184, 27, 15,188,228,
-192,233,251,242,199,162,217,242,211,111, 53,100,248,244,174, 50,109,225, 72, 73,154, 41,219,235,120,241,210,199,209, 98, 49,128,
-147, 82,150,143, 47,110,136,239,213,173, 54,129,214,251, 11,107,228,241,241,149,114,108,233, 64, 97,126, 71, 52, 49, 80,194,225,
-238,223,128, 35,111,222,188,247, 16,104,120,175,173,196,123, 42,216,192, 51,142, 2,122,218,122,221,104,190,131, 9,252,190,139,
- 65,109, 47, 98,233,237, 69, 92, 69,190,203,221, 74,189,103,179,184,248,125, 75,211, 53, 99,198,159,189,159, 62,109,239, 11,144,
-245,104,237,218, 6,183,166, 78,173,123,104,196,136,198, 93,155, 52, 89,122,254,204,153,211,175, 95,190, 60,231,182, 96,193,249,
-185,211,166,237,166, 24, 31,241,249, 40,209,162, 74,195,230, 70,181, 32, 37, 86, 4, 84,106, 6, 30, 7, 0,173, 32,215,152,143,
-249,181,218, 71,189,143,201,228,224,197,203, 55,239,143,238, 59,124,247,236,145, 19,246,174,156,181,104,247,186,213,110,219, 87,
-109,218,189,126,197,166,221, 75,143,157,186,184,145,121,116,210, 11, 71,105, 21, 7, 46, 72, 30, 20,105, 6, 39, 90,198, 80,100,
- 80,233, 33, 67,134,200,111,189,122,202,220, 41,147,101,254,180,169,140,115, 72,201,150, 67,187, 32,218, 78, 80,146,101, 9,180,
- 8,178, 24,156,220, 26,104, 49, 62, 37, 7, 76, 87, 87, 87,107,160,165,179,248,166,124,156,184,247,237,219, 39,176,159,163, 36,
-139, 54, 65,154, 27,212,171,167, 17,106,229, 9,164, 84,102, 4,205, 54,171,128,171,114,229,202,102, 0, 55, 63, 4,208, 54,175,
- 90,181,202,156, 47, 95, 62, 51,232,155,209,151,204,136,247,248, 6,245, 39, 56,176,185, 81,114, 69,117,161,165, 68,139,231,188,
- 78,155, 44,170, 11,207,159, 88,242,153, 32,139, 27,247,231,112,206,235,188,111,135, 44,121, 29, 17,234,194,191,255,200, 2, 54,
-198, 85, 35, 8,161,212,145, 65,224, 85,144, 69, 80,139,126,102, 11,104,105,241, 68, 25,171, 84,105, 38, 67,123,169, 18, 71,134,
- 23,153, 62,125,186, 48, 52, 13,136, 88, 2, 45, 75,154, 51, 9, 30,172, 55,130, 55, 6,106,102,204, 81,130,106,246, 3,246, 51,
-246, 55,198,189,132, 42,116,145,131,130,197, 67, 95,186, 65, 16, 73, 0,200,152,155,104, 31,169, 84,169,146, 18,155,147, 65,201,
-203,149, 43,167,196,206, 36,208, 42, 82,164,136, 25,180,178,106, 85,212,193,253,236, 0,179, 94, 91,182,108, 81,128, 16,203,200,
- 31, 15,214, 1, 63, 29,254,144,254,232, 81,125,178,189,198,225, 39,207, 7,170, 46,101, 92,167, 52,107,208,160, 65,228, 29, 85,
-126,233,144, 22, 32,200,184, 34, 49, 3,168,185,104,167, 60, 10,208,162,186,144,146,116,130, 43, 38, 72,127, 21, 41, 23, 36,177,
-110,232,159,122,128,150,189,234, 42, 32, 11,109,236,129,254, 67, 73,182, 7, 2,211,123, 32, 30,169, 7, 67, 71,133,130,135, 97,
-254, 40,213,227,236, 3,148,100, 81, 18,136,111, 85, 1,254,170,148,156,253,212,142, 68, 75,179, 44,165, 75,155, 34,102,115,137,
-255, 99,177, 2, 46,123,139,230,207,112, 48,171, 75,188,166, 46, 46,166, 40,154, 15, 26, 25, 84, 14,228, 11, 56,176,140,121,248,
-127,238,240, 15,152,103,234, 94,203, 24,158, 64,235,161,215, 39, 89,188,247,169,244,156,121, 86,202,247,220, 38,181,126,115,215,
- 5,180, 46,223,125, 41,151,144, 46,222,121, 33, 5, 26,140, 13, 4, 90,201,243,214,151, 51, 55,158, 41, 99, 83, 38,215, 12,178,
-127,231, 98,185,127,251, 60,254,166,188,169,199,127, 96,175, 45,105,147,213,119, 98,191, 79, 30,215,246,203,160,185, 77,196,253,
-232, 90,121,229,237, 43,231, 65,235,192,153,251,210,102, 96, 61,249,169, 95, 83,169,223,165,166, 76,152,213, 79, 90,118,173,255,
- 57,118,178, 28,195,180,250,134, 10,180, 62,156, 89, 34,159,223,123,201,103,239,167,226,123,123,159,188, 63,181, 64,222, 95,219,
- 46, 47,174, 31,145,171,251,150,201,186,161,117,100,221,144, 58,154, 64,139,239,195,159,224,112,252,185, 29,134, 42,102, 47,254,
- 76, 38, 88,151,129,215,120,143,121,152, 87,171,140,118,238,171,198,240, 17, 0, 88, 10,101,206,156,121, 57, 6,141,189,144, 76,
-236,133, 10,241,119, 71, 52,169, 46,108, 30, 53,106, 27,252, 18,183,127,229,225,209, 98, 70,139, 22,237,178,185,184,156,207,152,
- 62,253,203,162, 69,138,120,253,218,189,251,253, 91,231,206,157,186,121,233,210,169,227,135, 14,157,157, 60,112,224,185, 63, 70,
-143,222, 10, 9,208,114,216, 5,217,181, 89,179, 7,170,108, 1, 45,235,107, 90, 60, 64,220,192,205,231, 47,221,184, 57,115,246,
-242, 93, 80, 29, 62,218,181,117,247,254,195, 71, 79,239,123,241,242,245,253,189, 7, 79,175, 62,122,226,220, 10,230,209,162,195,
-251,180,191,194,159,246, 71, 53, 32, 55,251, 34, 39, 70, 78,174, 24,204,165, 95,143,110,210,163, 85, 75,233,250, 99,109, 89, 53,
-125,138,252,244, 99,157, 15, 1, 54, 91,118,201, 19,104, 81, 93,168, 74,178, 44,193, 21,129, 28, 39, 92,190,175,191, 75, 82, 25,
-156, 39,163, 28, 89, 60, 55, 52, 64, 11, 66,224,200,155, 41,225,225,228, 5,227,245,215, 40, 24,162,106, 56,222, 48,120,123, 47,
- 89,178,196, 27,182,118, 10,200, 34,160, 66, 44, 66,115,137, 18, 37,204, 8,250,236, 11,169,140,162, 54,132,228,197, 12,233,168,
- 25,210, 26, 51, 2, 78, 95,133,157,150,181, 68, 43,216,139,168, 46,164, 36,171,231, 15,201,247,156,216,221,104,210,194, 9,185,
- 82, 80, 98, 69,201, 85,167,234,185,158, 5, 74,180, 32,217,130, 68,235, 25,175, 59, 48,140, 87,128, 22,165, 42, 4,191, 40,179,
-176,174, 4, 3,232, 55,138, 26,202, 18,100,145,183, 33, 0, 90,148,152, 41, 64,139, 52,153, 40, 41, 35,120, 97,160, 93,246, 3,
-166,109,219,182, 57, 2, 90,121, 1,116,222, 88, 75,180, 24, 52,156,210, 33,252,156, 8,120, 45,144, 12, 10, 76, 7,148,224,229,
-224, 57,193,181,150,129,188, 11,126,196, 94, 19,148,168,106, 82,210, 99,255, 33,104, 83, 65, 28,127, 8, 64,203, 90,173,171,213,
- 13, 44,239,103,133,180,237, 37, 39,109, 6,107,167, 4,138,193,218, 47, 95,190, 44, 23, 46, 92, 80, 98,226,161, 13,238,105, 16,
- 12,143,111, 99, 35,237, 4,217,255,185, 81, 45,254,199, 31,127, 8,126, 32,169,130,140, 28,240,124, 10, 74,244,184,149, 45, 91,
-214,222,207,170, 2,180, 84,115, 3,148,197, 13, 18, 39,183,174, 93,187,186, 1,184, 41, 9, 96, 91, 5, 90,212,126,204,193,184,
-247, 12,251,222,246,202, 8,240, 87, 7,223,166, 59,198,217, 85, 42,200,130,106,214, 3, 1,149, 61,160, 46,220, 65, 73, 22,230,
- 29,119,128,223,105, 24, 71, 61, 48,190, 93,134,234,148, 63,108, 85,156, 97,100, 88,231, 69, 89,158, 17,168,179, 95,210,110,144,
-106, 67,130, 96, 53,118, 48,239,161,207, 63,119,230,189,174,174,177, 18,102,117, 77,208,175, 78,141, 82, 79,103, 76, 29, 39, 27,
-214,225,199,101,247, 6,153, 49,101,184,212,173, 81,242, 85,182,204,137, 70,101, 73, 23,215,158,169,132, 51,175,210,204,107,141,
- 69, 52, 31,248,182, 50, 88,251,209, 10,106,171,101,171,114,142,220, 59, 16,104,221,245,252, 32, 11,119, 63,145,238,127,158,145,
-178,221,183, 74,141,126,250,128,214,105, 0,160, 21,155,118, 73,199, 78, 93,164,106,181,218,210,125,210, 46, 69,162,149, 32,115,
- 69, 57,114,241,161,242,193,101,116, 73, 43,147, 70,181,144, 77,171, 39, 65, 13,112, 75,226,196,139,135,208, 98,182,183,148, 57,
-115,158,116, 59,184, 82,150,237,152, 42, 91, 14,111,144,155, 15,189,228,204,181,167,178,199,227,158,172,217,125, 85,102,172, 57,
- 37,131,103, 29,148,238, 19,119, 72,171, 94, 77,101,192,152,254, 18, 39, 85, 94,218,237, 56,220, 84,160,245,106,113,109,121,181,
-244, 71,241, 57, 60, 73, 62,121,221, 17,241,255, 44,119, 79,239,148,245,195,235,201,148, 6, 73,101,114,189, 68,178,250,247,106,
-186,128, 22, 38,180, 36,248, 3,221, 73,117, 33,108, 93,246,226,131,200,163, 22,130,199,188,198,123,204,195,188, 90,101,212,115,
- 31, 31,102,118,149, 46, 6,105, 6, 14,182,187, 53,136, 20,169,240,182, 9, 19, 90,251, 62,125,218,110, 86,203,150,109,147, 96,
- 2, 6,240,243,243,243,245, 53,251,126,248, 96, 62,114,248,176, 95,187,182,109, 95,238,223,178,197, 99,225,188,121, 30,181,203,
-149, 59, 82,200,213,149,170, 63,123, 54, 80,202,187,190, 36,208,130, 81,109,255,245,110,238,103, 79, 95,184,118,126,253,230, 61,
-238, 31, 62,248,122,251,249,153,125,206, 94,186,190,227,210,181, 91, 91, 39, 78,249,115, 3,243,232,225, 21, 13,223,105, 7, 67,
-169, 8,255, 16, 57,113,157, 58,117, 74, 81,195,244,233,214, 85,186,183,108, 46,157,107, 87,151, 14, 21, 74,203,168, 22, 77,100,
-106,223, 95, 41,213,226,159,185,221,141, 64,139,180, 8,180,108,169, 11, 57, 73, 50, 13,201,235, 42,163, 75,229,147,163, 75,231,
- 59, 11,180,106, 97, 82, 96,127, 86, 13,159,211, 66,114,249, 12,192, 90, 81,203, 0,100, 94,198,189,168,142,202, 72,137, 22,164,
- 20,247, 9,180, 96, 68,111,134, 74,135, 0,203, 12,117,150, 25,170,168, 55, 0, 3,102, 72, 76,204,144,146,153, 11, 20, 40,160,
- 28,187,184,184, 28, 6, 77,205,201, 92, 93,117, 56,170,183,235,236, 67,219, 59,157, 29,251, 91,142,129,106, 89,104,147,213, 22,
-234, 66, 74,182, 58, 85,207,109,207, 70,203,186,232,225, 49, 17, 62, 33,208,160, 13,213,129, 3, 7,148, 54,226,132, 3, 9,140,
-162, 46, 36,175, 9,178, 8, 72,116, 2,173,104,144,122, 78,132,186,245, 9, 98, 49,126, 6,207, 62, 51, 40,238,225,195,135, 3,
-193, 22,129, 29,141,225, 85,160, 69,112,135,130,217,147,104,217, 98,119,217, 46, 93,186, 40,125, 32, 64,245, 87, 90, 79,159,180,
-145,167, 8,126,108,174,227,155, 22, 72, 26, 5, 18, 72,165,190, 4,113,205,154, 53, 35,112,251,140, 5, 12,115,240,156,179,174,
-120, 84,201,108, 22, 21,100,113,210,166,164,141,252, 37, 63, 56, 79,240, 91,128,250,248, 35,250,220, 84, 7,229,167, 13,221,188,
-217,179,103, 43,227,249,180,105,211, 4,253, 73,177, 47, 35, 40,160, 13, 25,158,109,139,196,119,206, 2,184, 81,164,101,104, 3,
-135, 18, 45, 75,187, 78, 74,183, 80,223, 64,160, 69,243, 5,208,162,249,194, 82, 74,159,185,193,214,209, 7,231,145,108,149, 19,
-227,226, 14, 26,190, 19, 79,115, 79,144, 5,176, 70,144,181, 29,249,211, 6, 60,243, 27, 36,183,138, 68,155,124, 96,194, 15,200,
- 39,220,251, 18,234, 66,135,221, 33,115,230,120, 57,114,101, 75, 54, 39, 85,170,148,254, 4,187,108, 19,130, 95, 30,243, 71,128,
-199,106, 74,155, 54,141, 20,204,155,102,115,246, 76,241,114, 58, 34,154, 45, 99,220,220, 5,243,164, 93,208,227,151,214,159,182,
-187,111,150, 45,110,235,165, 75,167,159, 36, 95,238,244,242,107,151,170, 50,115,106, 63,217,183,107,173,184,111, 89, 41, 61,126,
-105,233, 95,180, 96,250, 45, 90, 52, 67,216,167, 3, 31,251,206,129,150,181, 36, 43,184, 81,188, 90, 65, 59,140, 74,132, 63,152,
-101, 64,248,158, 76, 9, 83,102,150,205,110,123,101,194,194, 67,210, 97,252,126, 41,221,109,139, 84,235,179, 77,151, 68,235,200,
-133, 7,210,161, 99,103, 69, 20,207, 15, 57,189,139,171, 36,202, 92, 94,242, 86,108, 45,187, 79, 92, 83, 62, 16,151, 12,105,101,
-236,224,198,114,236,224, 6, 89,187,118,141,217, 20, 41, 18, 3,220,218,220,210, 23,202,252,254,252,141,115,176,197,122, 32, 23,
-110, 62, 19,143,203, 79,100,199,241, 59,178, 98,199,101,169,214, 54,135,148,111,156, 65, 74,215, 77, 37,197,171, 37,149, 58,157,
- 58,203,184,133,187, 37, 86,242,236,239,180, 58, 68, 16,160, 69,176, 21,144,252,110,237, 85,192,149,101, 90, 53,160,170, 46,160,
-197,119, 98,224,239, 2,169,201, 94,216,148,236,197, 64,128,192,232,127,111, 60,230, 53,222, 99, 30,173,242,233,189, 15, 53, 75,
-122, 12, 72, 10,128,131,132, 98,139,163,231,154,199,140,249,227,203,123,247,218,122,110,221,218, 32,139,139,203,101,168,241,252,
- 62, 2, 37,192, 46,197,252,206,219,219,140, 1,221,188,118,205, 26,191,214,205,155,223,109,215,168,209,242, 35,235,215,183,166,
-177,188, 86, 89, 44,128, 86,160, 61, 22,109,179,172,109,180, 44,174,105,185,129,176,124,101,204, 36, 73,147,237,189,114,237,230,
-173,211,231,175, 31, 93,191,209,253,192,182,157,123, 15,221,184,245,112,247,241, 83,231,246, 96, 66,216,135,204,177,180,202,200,
-251, 92, 89,200, 1,159, 3, 42, 13,172,249,215,120,244,232, 81, 57,188,107,167,116,107,222, 76, 58,212,168, 42, 29, 1,178,186,
-151, 45, 33, 3,171,150,147, 21,195, 6, 18,104,157,115, 68, 91, 5, 90,182,212,133, 42,200,226, 59,199,150, 41, 32,147,170,151,
-149,227,171,150, 72,166, 76,153,244,170, 14,243, 23, 42, 84,200,143, 82, 7,170,143, 80,142,184, 1,101,201, 9,149,251, 7, 2,
- 17,130, 3, 92, 99,160,104, 71, 91, 31, 76,174,231,161, 38, 52, 67,170, 96,166,218, 9,116,205, 0, 21, 65, 82,131, 6, 13, 94,
-215,168, 81,227, 26, 36,175, 39, 64,140,198,215,186,150,214,119,175,151, 50,218,152,174,133,207,158, 58, 56,238, 45,247, 60, 87,
- 11,163, 99,213,161,117,185,195, 65,178,240,152, 42, 44, 78, 50, 84, 23, 82,146,197, 9,188,126,253,250, 74, 82, 65, 22, 37, 40,
-144,226,106,169, 14,163, 1, 96,221,196,228,236, 71,251, 43,110,108,171,201,147, 39, 11,164, 34,129, 96,203, 26,104, 5,140,151,
-186,129, 22,164, 59,155,160,194, 87, 36, 15, 84,115,226,124,131,158, 62,105, 39, 15, 1, 10,219,186, 5,165,102, 84, 63,162, 93,
-216,206,165,145, 40,209,230,162,130,177, 72, 11,145, 28,254, 4,225, 62, 93, 56, 44,194,143,221, 27,168,255,247,161, 31,120,113,
-108, 38, 63, 89,103, 78,222, 92, 88, 1,201,207, 35,128,144,203, 0,162,207, 48, 23,208,112, 61,166,131,178,205, 35,255,184, 17,
-152,130,174, 63, 85,173, 0,238, 12, 6,172, 72, 3, 1,102, 9,170,102,140, 31, 63, 94,201, 23, 32,133,107,109,135,230, 98,170,
- 10, 29, 1, 45,216,162, 82,106,125, 71, 5, 89, 44, 51,250, 43,121, 66,208, 25,108, 67,125,118,112,117, 33,250,142, 7,234,232,
- 1, 48,168, 72,178,144, 49,109, 64,230, 95,168,158,163,250, 24, 42,117, 46, 44,122, 66, 85, 29,231, 44,124,243,186, 36,228,161,
-104,223, 32,143,102,113, 77, 48,186, 69,211,218,210,175,111, 31, 73,149, 42,149, 98, 26,192,196,239,155,170, 98, 38, 44, 98,145,
-245,235,215, 43, 43,141,115,231,202, 33,251,247,108, 20,168, 1,207,219, 43, 67, 86,151,248,227, 6,253,222, 11,245,187, 36, 43,
-151, 47,148, 38, 13,171, 75,142, 44, 41, 36,123,230,228, 74,234,254,115,249,192, 52,102, 72, 27,217,190,121,161,120, 28,223, 33,
- 89, 92,226,159, 12,171,122,217,163,163,129, 69,190,244,235,191, 28,125, 13, 20, 73,144,229,185, 99,199,142, 79,170, 97,232, 42,
-116,226, 52, 41, 83,201,192,126,211,165,117,191,229, 82,188,195, 90,169,218,123,171, 46,160,181,235,248, 85,249,185, 35, 86,239,
- 97, 48,131, 94, 93,210,165, 79, 47,219, 14,156,147,173,251,207,200,230,125,167, 3,128, 86, 26, 25,214,255, 71,121,120,255, 26,
- 59,249,123, 83,244,232,170,238, 51, 24, 19, 18,100,200,230,125,234,202, 89, 89,183,231,144, 76, 92, 50, 67,230,111,218, 34,139,
-183, 93,148,137,203,142, 75,173,246, 21,165, 84,237,191, 65, 22, 83,165, 22, 53,101,232,236, 61,161, 2, 90, 84, 29, 90, 3,173,
-149,253, 43,235, 6, 90, 24,168,226, 2,240,184,159, 60,121,114,239, 47,191,252, 66, 80, 85,140,137,199,188,198,123,204, 19, 86,
-173, 13, 17,121, 91, 12, 34,123,209,126, 84, 29, 58, 84, 71, 54,137, 20,233,103,179,175,111,167, 7,243,231,215, 73, 16, 63,254,
- 59,168, 37, 20,144, 69,105, 22, 38,115,243,193, 3, 7,204,123,118,239, 54, 23, 44, 80,224,229,241, 69,139,234,189,185,117,171,
- 17, 87, 35,106,149, 85, 5, 90,182, 86, 27,218,186,102,105,203,165, 69, 59,224,126,218,114, 21, 42,159,126,236,249,226,202,214,
-157, 7,214,239, 61,112,124,181,231,179,151, 71, 10, 23, 41, 70, 64,144, 81, 39, 13, 5,104,209,254, 1, 82, 60,101, 32,131, 4,
- 79, 14,237,220, 33,251,215,175,149,246, 63, 84, 10, 4, 89,195,171, 87,144, 69,109,155,201,209,153,138,157,150, 38,208,226,234,
- 66, 85,101,104,169, 46, 28,144, 57,165, 12,203,159, 69,198,150, 45,168, 72, 95,152, 40,253,210, 9,180, 18, 65,114,245,136, 32,
-131,127,183,152, 36, 84, 53, 30, 39, 89,170, 11, 55,113,178,163, 84, 1,199, 90,174, 62,148, 85,135, 80, 11,158,110,217,178,229,
-245, 42, 85,170,248, 2,104,189,135,241,179,217, 50,161, 91,250, 66, 82, 65,123, 73,123,126,180,130,177,154,160,170, 96,250,148,
-125,122,119,108, 36, 55,175,238, 18,238, 11,187,164,238,163,130, 45,170, 9,105,147,101,101, 0,239,176,201, 8,180, 8,178,224,
-118, 66,153,184, 41,201, 82, 65,150,186, 39,200,162,109,149, 22,208,162, 36, 11,210,160,255, 91, 18, 99, 4, 34, 80,163,196,140,
-147, 63,248,161, 0,110,107,160,133,159, 16,103, 36, 90, 25, 42, 86,172,232, 79,181, 38,165, 15,148,190,193, 32,158, 11, 62,210,
-235,237,155, 86,249, 8,180,250,195, 70,203,159, 63, 5, 4, 69, 27, 55,110,100,191, 33,168,236, 7, 53,215, 19,218,145,193,198,
- 72,160,222, 93,235,232, 29,232, 55, 83,241, 44,170,251, 89,177, 71,196,130, 28, 5, 92, 16, 96,177, 95,209,254, 13,252, 38,240,
-215,251, 29,181,134,205,166, 50,142,143, 30, 61, 90, 89, 77,136,126,227, 65, 59, 34,126, 87,248, 1, 80,218, 13,134,246,254,148,
-112,113, 99, 63,101, 62, 36,123,246,142, 14,129, 22,164,123,155,179,102,205,250,200, 18,100,177,238,202, 79,187,139, 11, 85,136,
-193,231, 13,172, 38, 68,221,221, 33,177,221, 11,160,234,129,122,211, 30, 75,253, 17,157, 10, 30,250,211,238, 13,207,179,108, 4,
-172,166, 82,165, 74,113, 76, 36,232, 60, 20,194,118, 11,209, 99,217, 51, 39,244,124,116,251,136,172, 95, 13,179,130,140, 25, 20,
-201, 32,128,165, 50,127, 82, 26,184,112,225, 66, 69, 37, 59,114,196, 48,217,178,105,153,156, 59,185, 69,118,108,158, 47,217, 92,
- 19,216,253, 17,224,189,187, 55,142,200,162,121,227,165, 72, 1,215, 64,128,101, 13,180,250,254, 82, 93,214,175,156, 40,151,206,
-184,203,182, 77,115, 36,171,107,252,187, 33,170,132,206,135,190,115,137,150, 90, 75,219,238, 29, 28, 85, 14, 18,129,165,248, 27,
-193,152,245, 73, 25,128,104,196, 75,241,252,248,113,227,165, 84,158,162,210,174,195, 84, 41,209,106, 1, 86, 16,110,214, 5,180,
-220,246,158,146,105,115,151, 73,185,242, 21,208,137, 51, 74,135, 95,122,203,186,237, 71,100,205,182, 67,178,122,235,193,191, 69,
-190,233,211,200,128,158, 53, 32,245,250, 32, 16,241,250,153,186,116,177,107,144, 23, 55, 85,222,131, 75, 55, 29,149,105, 43, 38,
-203,143, 93,243, 73,141,118, 57,228,247,233,171,164,207,212, 61,210,126,248, 26,249,161, 85,147, 64,160, 85,191,231,100,105, 59,
- 96,190,243,170, 67, 11,137,214,187,253, 99,131, 1,173, 21,253, 42,233, 6, 90,108, 9, 0,137,214,176,195,218, 11,181,199, 94,
-252, 53, 47, 96,226, 49,175,241,158,206, 62,169,153, 13,180,106, 54,105,210,100, 15,141,225,177,170,140,180, 43, 58,122, 72, 5,
- 90,143,151, 44,169,157, 40, 97, 66, 8,177,188, 21, 73, 22, 6,114,243,206,157, 59,205,203,151, 45, 51, 47, 90,184,208,156, 53,
-115,230,231,239, 78,156,168,236,125,227, 70,125,103,128,150,229, 10,195, 48,148,104, 41, 85,194,132,185,254,234,141, 59,135,143,
-121, 92, 92,120,230,194,141,121,151,175,221,220,202,107,154, 76,178,200, 64, 53, 32, 39,208, 63,255,252, 83,153,192,123,117,238,
- 40,125,218,180,150,126, 77, 27,202,234,145, 67,100,203,200,193,178,103,228, 64, 57, 56,188,159, 28, 27, 53, 80,118,140, 27,169,
- 75,117,120,110,211,186, 64,160,165,218,100, 81,138, 53,172, 96, 86, 5,100, 77,174, 89, 94, 1, 89, 28,196, 9,180,244, 24,195,
- 67, 29,186, 3,134,192,138,221, 11,126, 70, 4,171, 62,125, 97,108,236, 3,176,164,128, 14,218, 19, 17, 32,112,143, 42,106, 73,
-180,200, 5,197,143, 22,129, 20, 36, 60,126,152, 44,205, 80,157,153, 49,217,154,209, 55,205,176,249, 50,131,159,150,182,146, 9,
-193, 47,174,232,156,100,139,199,180,197,162,154,144, 18, 44,130,171,237,155,230, 41,223,246,246, 77,115, 21,176,197,235,188, 63,
-123, 76,206,148,131,187,197,141,187,123, 67,221, 63,250,180,139,167,185, 72,133,239,194, 68,247,152, 64,128, 32,178, 95,191,126,
-193, 64, 22, 37, 25, 76,220,180,128, 22,213,133,228,187,229, 70, 32, 68,137, 38,109,243, 0, 8,130, 0, 45, 2, 24,170,101, 3,
-192,129, 61, 85,151, 53, 75, 38, 19,176,144, 46,165, 58, 44,251,204,153, 51,217, 46, 54,121,167,213,103,209, 70,227,216, 63, 9,
-220, 72,139,106, 67,130, 35,186, 76,224, 42, 52,246, 11,218, 81, 13, 24, 48,128,239,112,248,115,133, 31,177,251, 4, 89, 84,151,
- 83, 90, 67,117, 57,251, 13,165,110,180,127, 35,168, 5, 13, 87,173, 50,169,247, 97, 35,120,129, 52,150, 45, 91,198,119,207, 71,
-162,205, 91, 67, 74, 91,184,113,181, 33,141,248,185,138,151, 27,213,138,184, 79,144,197,124,246,182,233, 0, 67,110,144, 0, 43,
- 6,241,252, 57, 27, 53,106,212, 9, 0,165, 23,144, 52,125, 68, 31,244, 85, 65, 22,247, 84,161,114,131,116,246, 35, 8,246,115,
- 84,118, 8, 17,118, 96,156,243, 64,121, 61,208, 23, 8,180,122,145,183,234, 70, 30, 3,112, 17, 20,207, 39,240,166,189, 25,222,
-167,103, 33,128, 94,150,105,230,203,154, 49, 62,128,214, 33, 57,119,124,149,220,190,178, 87, 86, 45,155, 45,189,127,237, 37, 24,
-211,101,224,192,129,144, 90,247,148,229,139,103,202,157,171, 7,228,208,158,101,210,171, 75,109, 25, 53,180,139,240, 57,123,196,
-121,239,241,157,131,114,234,200, 50,133,230,228,113,191, 73,190, 92,233, 2, 1,215,175,157,171,200,242,249, 67,228,230,197, 61,
-226,190,113,166,116,239, 84,243,111,154, 6,208,210,108, 47,100,208,231, 71,203,146, 18, 85,133, 20,169,243, 79,156, 98,111,254,
-229,208,143, 12,151,186,167, 72, 12, 3,222, 94,227,165,122,251,201,146,190, 92,207, 79, 73,114,215,163, 4,193,230,166,174, 58,
- 12, 50,162,217, 57, 73,159, 62,181,140, 30,218, 26,182, 43,175, 36,126,130, 4, 23,172,220, 59, 4,161, 79, 99,248,102,157,135,
-155,247,158,188, 32,213,219,102,151,202,205,179, 74,207, 73, 59,164,253,168,109,210,100,224, 70,169,222, 99,169, 20,175,158, 2,
-146,173, 12,144,120,109,147, 18,181,187,248, 57, 99, 12,239,189,115, 80,160,218,144,234,195,183, 91,122, 6, 1, 90,179, 90,103,
-150,229,125, 43, 56, 5,180, 0, 30, 99,228,207,159,127, 51, 1, 80,199,142, 29, 15, 51,241,152,215,120, 79, 79, 75, 90,229, 9,
-226, 13, 30,131,103, 62,252,145,141,131,232, 91, 89,113,136,182,162,241,253,159,248,139,118,168,234, 81, 85,135,222, 71,142,212,
-203,148, 62,253,181,149, 43, 86,248, 1, 88,155, 15, 30, 60,104,134, 13,132,121, 30,150,248,195, 62,195, 47, 87,182,108,167,125,
-174, 93,171,122,114,197,138,134, 78,170, 14, 53, 87, 29, 58,107, 12,175,242, 33,171,107,234,139, 13,234, 86,250, 80,227,135,146,
-222,165,138,231,122, 85,174, 76,254,119, 89, 50,166,210, 59, 17, 42,100,104,216, 14, 59,154, 15, 4, 91,191,180,111, 43,157, 26,
-212,147, 54,149,202, 41,146,172, 61, 19,199,200,254, 49, 67,100,255,208,126,114,103,109, 95,185, 60,103,140,140,110,211,210,172,
-199, 24,254,244,218,149, 10,208,234, 22, 55,130, 98,143,165,250,100, 26, 91,174,144, 76,169, 93, 81,102, 53,175,171,128, 44,126,
-103, 1, 64,139,147,155,163, 45, 6, 12,169, 21,119, 33, 84,161, 17,108,145, 38,109,117, 56, 89,114,210,164,161,108,143, 30, 61,
- 4,128,140, 6,188,170,225,177, 67,162, 88,113,121, 20,224,233, 33, 38, 31, 47, 0, 9, 51,120,161,248,207,194,196,163,172, 58,
-164,189, 19,193, 22, 19, 84,221,158,144,250,249, 97,114,162,186, 37,216, 70,195,119,218,100, 81, 93, 72, 73,150,229,198,115, 94,
-231,125,230,235, 90, 51,126,155,163,187,134,188,232,132,189,158,190, 79,160,197,250,209, 25,107,255,254,253,131, 0, 45, 75,144,
-165, 3,104,133,167, 77,150,101,217, 40,121,161, 52,147,128,138, 42, 25,212, 79,249,177,164,155, 15, 74, 16, 8, 16, 32,117, 38,
- 56, 32, 95,243,234, 40,111,116, 72,154,222,208,237, 68,128, 11,131, 7,240, 67,166,128, 33, 44, 86,160,215,126, 91, 62,248, 28,
-145,141, 9,201,138, 31, 1, 0, 37, 68, 48, 13,160,225,243, 76, 72, 32, 63,243,156, 32,137,253, 23,101,164, 45, 17,253,124, 57,
-108,123, 26,132,179,191,208,208,157,207,210, 6,139,106, 40,250, 96, 3,159,105,180,174, 21, 93, 33, 72, 89, 81, 14,101, 21, 28,
-141,252,113, 67,117, 98, 28, 25, 18,211, 7, 4,129, 4,117,220,168,158,164,196, 11,215,105, 91,229, 8,100,145,126, 6,164, 49,
-176,109, 83,220, 56,160,111,158,224,234, 90,182, 9, 55,190,143, 27, 65, 22,242,173, 70,154,129,254,233,133,253,175, 90,237, 67,
- 63, 89, 52,122, 71, 59,111,195,183, 60,141, 32,139,101,236,214,173,155,178,138, 19,139, 20, 4,171,108, 5,223,129,114, 29, 18,
- 78,130,174, 26, 90,116,195,242, 62, 65,209,195, 91,251,229,200,182, 1,114,122,255, 4,185,121,105, 27, 0,208, 46,153, 54,121,
-180,146,174,158,223, 9,192,180, 86, 6,245,109, 42,141,234, 20,144,102, 13,138,202,136,193, 29, 53,129,150, 74,243,212,190,113,
-114,249,244, 6,185, 1,154,253,127,109, 35,189,187, 53,151,235,231,183,203,177,253, 43,228,247, 95, 27, 7,165,249,133,129, 86,
- 88,242,237, 31,164, 21, 50,160,165,174,106,161,141, 1, 7, 32,126,132, 68,210,241,226, 39,250,156, 36, 87,173,143, 73,115,215,
-191,157, 56, 87,189, 69,137,178,213,179,244,249, 20,164,158, 86, 33,120,124,161,183,135, 68, 43,189,164, 77,155, 74,210, 5,166,
-212,248,131, 76, 45,153, 50,166,150, 69,115, 71,202,133,243,231,252,163, 69,143, 62,197, 17,208,162,123,135, 88,201,115, 62,251,
-107,197,126,249,115,229, 90,169,208, 48,171,252, 52,100,181, 52,252,109,131, 84,235,177, 74,202,116, 88, 42,213, 91,150,147, 97,
- 19,123, 74,175, 49,139, 37, 86,138, 28, 47,116,186,119,184, 58,165,255, 79,242,238,209,101,241,187,177, 83,222,108,232,160, 0,
-174,215, 43,155, 41, 64,107, 86,171, 76,178, 22,171, 13,231,252, 90, 85,106,231, 79, 76,160,117,213,153,134,197,164,213, 16,127,
-183,138, 43, 7, 38, 30,243,154, 51, 52, 2,242,170,222,224,233,167,234, 4, 36, 27,235,105,252, 14, 59, 8,197, 46,139, 54, 95,
-248, 43,159, 14,218,154, 3, 58,141,225,183, 79,154,212,218,236,229,213,110, 78,183,110,109, 40,213,250,115,198, 12, 63,170, 11,
- 41,201,250,165,107, 87,191,120,113,227,190, 91, 62,102, 76,179, 79,143, 30,213,152,214,176, 97,179, 70, 17, 35, 22,215, 42,243,
-151, 52,134,231,187,161, 66, 43,221,190,109, 83, 44, 67,247,146,103, 79,239,201,166,117,211,101,193,156, 65, 82,164, 96,118,225,
- 61,173,242, 89,220, 15, 71,151, 13, 75, 49,153, 78,133, 24,158, 32,171, 19,109,178,202, 20, 87, 64,214,193, 17,125,229,222,134,
- 62,114,127,211, 8,217, 53,172,191,196,210,233,222,129, 64, 72,149,100, 13,204,150, 70, 70, 20,201, 46,127, 84, 40, 18, 40,197,
- 34,200, 90,209,167, 43, 22, 88,252, 38, 23,119,185, 83,162,165, 5,180, 76,176,113, 57, 78,176, 65,160,213,169, 83, 39,197, 39,
- 17, 37, 5,104,255,247,176,183,185,142, 58,209,168,151,146, 44,173, 73, 44,176,250, 4, 80,232, 51,102, 53,209, 8, 30,147,155,
- 2,180, 32, 61, 50,227,143,222,140,249, 76, 73, 24, 11,204,144,250,152,237, 1, 45, 74,170,108, 75,180,230, 5, 74,180,198,244,
-207, 58,178, 87,195, 68,125,106,151, 43,242,137,126,182,184,239, 82, 51, 94,251, 81, 29,226,196,115,212,102, 4, 90, 84,115,169,
-134,239, 28,159,200, 67,218, 43,169,146, 44, 21, 60,233,145,104,169,182, 89,170,253,212,156, 57,115,148, 73,155,171, 3,193, 19,
-115,211,166, 77, 21, 9, 17, 39, 92,148,139, 0,171,188, 19,125,170, 45,199, 74, 74,200,240,141, 83,194,146, 27,147,247, 71,218,
-215,176,221,112, 78,163,112,103,182,164,180,199,226, 74, 64, 24,102,243,249,108, 1, 15,231, 65,159, 56, 10,163,243,151,216,211,
-167, 86,110,157, 68,147, 67,106,117, 8,224,250, 33,109,240, 8,212,233,147,140,160,144,170, 53,157, 52, 2,179, 1,184, 94, 84,
-165,108, 0, 46,244,107, 69, 15,250,155,240, 51,169, 24,239,163,127, 42, 0, 6, 99, 2, 65, 38,127,188,244,134, 77,226, 59, 88,
-167, 49,148,100, 17,100,209,181, 1, 36, 90,138,138,148, 96, 11,146, 62,170, 9,117,217, 13,218,170, 23,126,116, 21,167,111, 48,
-128, 39,152,154,200, 85,173,234,198, 31, 32, 72,202,120,189,185,179, 60, 9,109,126, 0,173, 7,183,175,236,144, 75, 39,230,203,
-177,237,131, 21,192,117,238,240,116,128,173,237,112,137,178, 73,198, 14,109, 47,141,235, 22,148,166,245, 10, 67,242, 84, 87,134,
-254,254,179, 52,107, 88,142, 64,107,151,189,119,255, 77,115,167, 92, 60, 62, 87,142,110, 31,164,208, 60,123,104,170,220,184,176,
- 85,206, 30,223, 32,163, 6,183, 85, 0, 22,105,246,232,252,127,154,217, 50,198,255,170,246,105,161,229,221,119,243, 60,141,224,
- 33,246,254, 72,219, 21,118, 60,216, 18, 41,137, 43, 79,120, 79,163, 34,255, 95,157, 97, 17, 82, 7, 3,193,147, 55,175, 95,201,
-157, 91, 87,100,221,170, 89,144, 94,117,146,118,205, 75, 75,203,134,133,164,117,227, 34,210,182, 89, 49, 57,184,207,141,134,125,
- 31,176, 94,189,129, 30,135,165, 41,179, 22,243, 25, 63,127,167,204, 94,187, 95, 58, 13,159, 46, 63,246, 89, 39, 63,116, 95, 37,
-141,127,223, 8, 3,248,237,210,109,228, 98, 73,146,177,240, 59,189, 14, 75, 75,227,131, 69,168,157,246, 57, 82, 70,126,178,104,
- 76, 23,121,123,243,176,188, 63, 62, 83,222,172,107, 43,155,255,104, 33, 91,166,118,147,142,213,114, 72,214, 36,225,158, 48, 31,
-243, 91,241,194,225,202, 20,172,244, 74,109,229, 5,222,159,215,116,243,243,239,140, 65, 60,206, 91, 58, 66,165, 20, 11, 3,242,
-110, 12,104,189, 1, 54, 2,141,143,109,208, 15, 44,167,234,222,225,245,131, 7,109,223,195,254,106, 78,223,190,173, 50,101,200,
-112, 29,234, 99,159,184,113,226,248,184,166, 79,127,117,206,152, 49, 45, 62,221,189,251,195,153, 21, 43,234, 53,138, 18,165,125,
- 75,219, 43,218,130,212, 61,140,128,150, 67,126,186,186,164,150,169, 19, 6,200,248,209,189,164,103,231, 31,149,228,146, 62,165,
-189,229,226, 42, 27,108,209, 76,147, 46,117,234,199,115, 39, 78,144,197,127,140,150,225,141,235,203,192, 74,165,229,192,240,223,
-229,216,136, 1,114,105,230, 40,217, 51,164,191,228,115,201, 64,177,188,173, 37,207,193, 28,150, 18,104,169,146,172,145, 69,115,
-200,184,138, 69,101,106,221,202,129, 82, 44, 78,244, 27, 71,254, 46,238, 83,198,202,213,131,123,105,107, 99, 13,180,108,149, 51,
- 21, 28,155,190,164, 42,159, 42,163, 0,111,245,142,194, 76, 89, 55,125, 48,154, 1, 18,173, 71, 0, 23,111, 9,176,104, 16, 15,
- 99,122, 5,104, 65, 61,165,156, 83,178,197, 4,181,133,178,183, 2, 90,193,104,210, 22,139, 54, 89, 65,108,180, 50,253,109,163,
-181,107, 99,157,113,148,100, 89, 58, 53,229, 57,175, 91, 20, 54, 24, 77, 0,201,199,228, 25,237, 60, 85,144, 69, 9, 9,212,228,
-193,100,228,118,128, 86, 32, 77,148,127, 18, 36, 36,120,220, 79,145,232, 80,109, 76,123, 23,170,180,176,250,151,106,169,137, 40,
- 75, 37,164, 73, 72,142, 0,150,205,254,137,231,207, 81,122, 69,105, 24,158, 95, 30, 80,175,229, 84, 29,210,190, 6, 60,119,100,
-227,103,139,102, 82,186,131,160,109, 22,193, 53,199, 0, 39, 39, 19,187,223, 17, 0,140,162, 70,164,157, 22, 85,125, 24,167, 95,
-235,164,109, 73,179, 21, 1, 21,235,204,208, 69, 4, 66,148, 58,242,156,215, 65, 79,239, 66, 23,187,229,132,157,151, 18, 66,132,
-180, 65,111, 36,247,220,112,221,174, 95,183,128,122, 56, 28, 67, 0, 0,223, 17, 80, 97, 94, 35, 80,229,182, 12,224, 75, 1,216,
- 84,203,227,188,150,163,241, 83, 39,175,244,100, 11, 82, 78, 24,195, 55, 47, 91, 60,243,251,229, 11,134, 1, 92,109, 82, 64,214,
- 81,247,223, 21,112, 68, 48,212,184,110, 33,233,214,161,150,162,218,107,223,170,134, 20,200,147,202,151, 6,244,185,211, 6,177,
-245,181, 79,243,194, 70, 57,119,104,154, 28,177, 75,179, 58,105,190,207,150, 49,222,112, 23,151,248,150, 99,204, 87, 95,125,169,
-135,121,255, 96, 30,231, 60,195, 91, 21, 52, 17,213,135,248,104, 62,209,222,131, 9,222,163, 63,226, 35,228, 68,147, 72,163, 82,
- 54,129, 86,188,248,241,183, 65,100,237,135,193,220,103,219,182,173, 31, 31, 61,124, 0,221,183, 89,158, 63,123, 12,128,181, 89,
-102, 77, 27, 12,201,196, 67,234,216, 63,152,146, 36, 73,167, 5,180, 88, 6, 53, 4, 79,213, 38,189,253,122,142, 94, 46, 35,231,
-236,145,193,127,238,144,214,253,231, 74,241, 90,157,253, 98,167,200,233,116, 8, 30,210,205,153,196, 20, 3, 64,106, 96,161,244,
-177,188,215, 77,234, 46, 47, 78,173,150, 17, 29,170, 74,158,148, 81,188,121,157,247,237,240, 64,171, 19, 6,241, 22, 31,224, 13,
- 93,107,208,180,166, 25, 12,104, 65,164,126,184,104,209,162,244, 4,255,139,141, 96,207,182,138, 26,132, 38, 29,150,118, 78,155,
-246,103,207,171, 87, 91,125,242,242,106,226,123,233, 82, 13,223, 83,167, 42,251, 94,188, 88, 9, 0,171,202, 39, 79,207, 26,103,
- 86,175,174,215, 50, 94,188,159, 17, 68,208,158, 49,175, 61,160, 21,154, 85,135,118,249, 25, 40,209,122, 11, 95, 66,158,119,101,
-227,218,105, 50,127,246, 64, 61, 18, 45,123, 52,211,196,128,227,210,214,117,106,124,152,220,227, 23, 89, 62,160,143,156,153, 59,
- 67,118,142, 26, 44,127,180,110,110, 14,144,100,217, 2, 89,228,111, 48,160, 69, 80, 64, 9, 12,211,137,149, 75,228,228,154,229,
-114,114,221, 74, 5,104, 49,209, 62,235, 2, 36, 89, 23,247,237,146, 75, 7,118, 11,212,190,143,172, 26,202, 94, 57,203, 96,178,
- 85, 12,153,209,238,252,219,182,183, 18, 76,179,221, 45, 51, 0,240,223,134,237,147, 25, 96,192, 12,192,161,132,220,129, 84, 38,
-136,234, 16, 96,231, 25, 36, 50,214,170, 67,155,229,180,183,234,144,182, 89, 84, 23, 6, 74,180,202, 22,249, 68, 53,162,149,173,
-150, 77,160, 69, 94, 90,130, 44, 85, 37,101,141,180,180,128, 22,234,173,172, 58,132, 19, 77, 63,170,205,232, 46,130,170, 61,130,
- 44,140,113,183,120, 95,231,192,109,179,238,152,168,189,169, 9,160,223, 44,208, 41, 22, 64,171, 24, 29,141,114,101, 28,192, 1,
- 29,203,218,115,191, 97, 19,104, 81,146, 69, 9, 25, 37,152,120, 86,107,204,176, 46,190,221,239, 8,146,173, 61, 0,212,254,116,
- 11, 2,233,205, 71, 72,167, 28, 57, 80,181,164,107, 77,115, 22, 99,109,210, 61, 6, 1, 22,121,202, 21,124,120, 64, 47,200, 10,
-246, 29, 89,190, 12,146,178,125,150, 18, 45, 74,182,120,206,235,186,231, 35, 27, 25,209, 86,207,168,226, 5,144,253, 8,149,236,
-121, 46,132, 56,116,232, 16,207,249,109, 85, 13,225, 56,175,179,251, 4,201, 22,172,141,114,102, 72,146, 56,139, 75,188,105, 53,
- 42,231,251,180,113,229, 88,185,118,118,149,156,218, 55, 94,186,180,175, 46, 99, 71,116,147, 94, 93,155, 72,201, 34, 25, 62, 97,
- 85,224, 44, 87,215, 4,150,113,103, 85,194, 78,209, 28, 51, 28, 62, 3,187, 52,146,226,133,210,127,202,150, 49,193,140,108,105,
- 19,217,234,103, 90,115, 92, 72,234,254,111,120,198,121,213, 97, 64,173,131,184,119, 8,144,100,105,129,172,160, 31,139,117,144,
-232,122,245,162,153,162, 69, 43, 98,138, 24,177, 7,128,215, 86,124,212, 47,240,231,224,135, 21, 41, 31, 46, 93,186,128, 21, 58,
-247, 5,215, 94, 7, 6,151,254, 63,251,237, 54,174, 26, 84,154, 6,242,112,225,240,150, 41,172,130, 74,103, 72, 98, 74,156, 41,
-145,105,122,150,196,225,222,115,207,243,208,124,212, 1,207,234, 13, 52,109,247, 99,225,224,197, 24,135, 4,106, 24,104, 22, 96,
-249, 47,125,121, 56,227, 67, 39, 24, 63,213, 16, 60,171,250,246,109,121,123,239,222,166, 88, 93,216,248,245,205,155, 13, 78,195,
- 38,139,234,194,198, 81,163,182,171,103, 50,185, 56,168,191, 77,160, 21,202, 85,135, 14, 63,106,151, 12, 41,221, 43, 87, 40, 44,
-157,219,215, 85, 18,143,121, 45, 20,109, 20, 24, 84, 58, 38, 86, 22, 50,209, 88,222,217,160,210,152,188, 78,210,197,131, 51, 9,
- 0,217, 58, 18,130,163,186, 55,134,173,207,125,168, 77, 40,121,113,102,115, 68, 51, 19, 36, 45, 55, 85,123, 44,117, 79,137,151,
-197, 11,108, 25,195,219,165, 73, 53,162,181, 31, 45,149, 86,151,218,241, 91, 81,146,197,189,141, 10, 4,163, 9, 59,198,189, 72,
-143,153,192, 87,135, 9,188,180,181, 28,221,154, 38,193,214, 36, 36, 79,212,149,126,180,184, 39, 63,245,130, 44,187,192, 0,237,
- 50, 26,102, 18,116,108, 59,215,170,110,227, 32,145,252,128, 85,129,127,232,253,142, 2,242,197,193,130,135,207,148, 98, 50,148,
- 15,174,197,119,166,209,145,215, 81,187, 39,195,216,190, 21, 63,214,247,192, 11,250,201,210, 11,220,173,105, 82, 29,216, 8, 63,
- 64,167, 33, 37,242,193,254, 48,206,107,133, 97, 57,171, 1,184,250,171, 54, 90,220,243, 28,244,171,133,226,123,231,163,191, 17,
- 16, 18, 28, 50, 17, 40, 6,128, 44, 71,234,194, 47, 1, 54,236,210,204,150, 33,145, 11, 12,210, 87, 54,249,177,132,255,246, 13,
- 19,101, 80,255,159,165, 98,233, 28,146, 37, 99,252,181,153, 50, 37,116,100, 79,167,155,230,192,254,237,165, 66,169,236,254,112,
- 15,177,130,239,115,178,127, 58,217,204,255,186,236, 33, 6, 89,161,225,196,255, 27,215, 26,104,217, 58, 79,158, 60, 53, 84,133,
-245, 97,151, 53, 21,224,235, 82,130, 68,137,166, 58, 3,180, 66, 81, 80,221, 31,139, 19, 33, 9,244,210, 12, 98,200, 30,194,129,
-194, 25, 26,214,175,176, 89, 78,123, 65,165,105,147,197,123,206,148, 19, 3,109, 91,170, 15,245, 38,230,215, 51,225,218, 42, 3,
-236,155, 56,249,104,169, 12,213, 71,245,182,145, 51, 93,203,160,105,131, 91, 92,133, 72,195,119,218,110, 89,223, 30,220, 37,126,
-108,174, 58,228, 62,164,237,238, 76, 3,105,128, 13,221, 54,109, 86,239,116,212,238,246,104,106,217, 39,217,164, 9,111,229,127,
- 49,196, 18,192,219, 44, 39,235,205,236,255,150,254, 89,141, 18, 44,170, 11, 3, 36, 89, 90, 32, 75,111,221,251,227,199,229, 33,
- 86,130,191,128, 52,148,182,142, 13,156, 25,235, 66,208, 30,182, 30,209,108, 35,184,103, 40,144, 53, 99,130, 77, 1,169,144,142,
-247,234,167,233, 18,111,125,230, 12, 9,237,186, 84,178,120,151, 38, 77, 29,229,250, 55,101, 9,149,234, 48, 52,140,248, 18, 13,
- 97,208, 12, 77,139, 4,127,214,224,167,193,207,176,226,128,209,151,194,138,147,127,211,113,196, 79,205,197, 45,118,138, 98,180,
-209,215,107,163,144,190,233,191,220, 70, 33,229,217,127,250,185,255,114,135, 49,234, 30,182, 93,223,224,167,193,207,176,226,128,
-209,151,194,138,147,218,128, 48,164,111, 50,218, 40,164,156,179,253,220,247,194,207,176,173,245,215,167,102, 41,213, 10,242,118,
- 54,128,173,228, 76, 17,237,209,112,116, 93,139,190, 65,211,118,187,132,180,189, 12,126, 26,252,212,219, 7,140,111,211, 62, 7,
-244,242,208, 50,159,193, 79,131,159,182, 56,240, 95,238, 75, 90,223,196,247,120,223,218, 62,235,171,217,107,125, 47, 40,218, 40,
-103,216,118,107,131,159, 6, 63,195,138, 3, 70, 95, 10, 43, 78, 26,210, 39,163, 47,125,251,125, 41,108, 75,248,117,169, 25, 64,
- 75,131,223,198, 7, 24,182, 29, 50, 8, 63,167,212, 49,165,100,210,251, 10, 59,249,141, 54,210,203, 64,125,249, 12,126,234,227,
-147,222, 92, 6, 63,245,114, 74, 95, 62,131,159,250,248,164, 55,215,247,194, 79,189,245,249, 86,243,217, 85, 29,126,201, 2,235,
-105, 92,250,252,248, 17,137, 49,169,106, 33,105, 45, 87,214,162,153, 8, 52, 58, 35,180,195, 1, 38, 30, 35,241,154,163, 45,144,
- 38,124, 8,209, 63,152,178,114, 45,224,152, 43,131,212,196,213, 67,116,157, 96,153,120,205,214,234,161, 64,154, 88,197,226,137,
- 21,119,244,134,172,149, 94,193,255, 21,131, 63, 79,194,170,151,234, 54, 10,236,176,238,240, 59,214,178, 66,133, 10,143,152,120,
-172,179, 97,181,248,105,143, 76,225,212, 41,146, 93, 73,154, 24, 33,146,130, 47,221, 14,164, 57,189,186,105,212,140, 26,166, 79,
- 76, 60,214, 42,147,131,252,206,150,179, 0, 86,103, 45,132,187, 11,134, 40,217,138,196, 64,203,214, 91, 48,154,240,159,211, 28,
-237,181, 3,190,172,110,115,207,115,173, 50, 91,221,119,182,156,122,200, 27, 52,245,112, 73,127, 30,131,159,250,121,165, 39,167,
-193, 79, 61, 92,210,159,231,191,204, 79,253, 92,250,183,230,204,146,208,148, 12, 78, 58,123, 32,220,140, 59,247, 60,215,168,107,
-144, 14,243, 67, 22,211,199,138, 25, 77,194, 84, 45,147,233, 19,124,204,204,128,159, 18, 55, 4,173,118,131,211, 70, 55, 4, 46,
-118,107,212,168,209, 38, 92, 31, 10,186,165,145,108,185, 17,176,213, 9,233,239,165, 41,210, 54, 56,112,252, 68, 31, 51, 12,130,
-205,248,111,140,106,143,165,208,140,251,181, 45, 32,143, 45,223, 48,150, 52, 3,125, 30, 34,191,212,171, 87,239, 4,210, 73, 53,
- 33, 76,197, 73,132,250,240,192,126, 10,246, 13,112, 93,241,230,142, 56, 19,133, 39,165,143,108, 25,116, 55,144, 38, 1,214,241,
- 37, 11,228,212,154, 21,114,120,222,204, 32, 62, 21,183,255,222, 75,118,252,214, 77,118,255,246,203, 75,220,216,141, 52, 1,113,
-204,154, 35,106,188, 26, 90,195,146,197, 14, 63, 64, 2, 44,214,155,129, 79,225,191,230,145,206,126, 24,146,143, 58,106,145, 2,
-121,222, 63,191,119, 69,110,159,134, 39,243,212, 73,222,225, 93, 4,203,234,166,208,156, 94,213,148,148, 0, 75, 46, 46, 21,166,
-233, 53, 76,159, 39, 86, 10,236, 51,101,145,133,126,174,152,120,172,228, 7,208,242, 87,243, 43,224, 12,215, 2,136, 58, 83,206,
-142,112, 54,136, 40, 65, 74, 68, 13,121,240,224,129,192, 55,208,109,208,177, 94,169, 21,132, 38, 66, 21,173,104,209,230,151,147,
-155,118, 28,187,124,236,204,245,219,107,183, 28, 62, 94,175, 73,171,195,188,174,147,151,204,230, 76, 57,245,146, 53,104,234,229,
-148,190,124, 6, 63,245,241, 73,111, 46,131,159,122, 57,165, 47,223,127,153,159,250, 56,244,109,230, 10,185,123,135,124,201, 77,
-209, 51, 37, 52, 53,201,150, 36,220,246,246,213,114,124,222,255,103, 39,121,121, 96,178,236,159,222, 78,186,215,201,249,153,215,
-121,159,249,108,212, 61, 72,135, 33,192, 82, 39,209, 14, 5, 77,114,242,228, 73, 70,155,117,179, 78, 8, 96,237,134,176, 63,110,
-136,154,190, 22, 52,173,253,163, 88,119,194,206,116,252,135,216,126,138,231,109,123, 27,131,176, 34,164, 15, 98, 43,166,245, 5,
- 77, 74,185, 44, 55,187, 64,235,252,249,243, 98, 35,109,189,112,225, 66, 23, 0,186,140, 36,146, 25,209,237, 39,253, 80,236,173,
-121, 84, 43, 58,205, 83,183, 32, 64,235,212,234,229,210, 53,166, 73, 73,150,219,159, 69,179,202,146, 42,133,159,175,111, 80,113,
- 39,174,143, 67,106, 10, 96,144,131, 68,178,154, 76,121, 90,199, 15,127,214, 22, 77, 91,253,140, 64,139,180,233,192,175,110,221,
-186,175,224,208,240, 49,156,192,106, 25,228,133,228,163, 46,189,125,213,236, 79,215,246, 45,151,125, 51,186,200,204, 94, 63, 74,
-180, 40,145,174, 88,151,211, 26,104,205,168, 25, 94,146,197, 52, 77, 14,200,183,151, 65,144,153,112,190,151,215, 92,226,155, 90,
- 79,175, 17, 46,176,143,132, 0,104, 69,134, 79,157,217, 11, 23, 46, 84, 88,204, 96,185,244, 74, 77,224,141, 48, 43, 2,231,144,
-234,187,131,181, 17, 37, 87, 4, 89,175, 95,191,253,112,255,214,253, 87,191,245,248, 99,251,140, 5,155,119,238, 57,122,233,120,
-205,122,141,247, 59, 33,217, 10, 9, 63,181,134, 13,131,166, 22,135,156,187,111,240,211, 57,126,105,229, 54,248,169,197, 33,231,
-238,255,151,249,233, 28,167,254, 13,185, 33,185, 90,208,174,114,166, 15,251,166,181,145, 87, 0, 87, 62, 39,102, 7, 75, 79,119,
-143,151, 77,163, 26, 73,179,210,105, 63, 48,191, 3, 0, 99,178, 6, 90,151, 46, 93, 82,128,214,240,154, 73,222,247, 45,105, 18,
- 38, 30, 35, 80,174, 27,128,145, 27, 60,243, 50,178,251,122, 71, 52,113,239, 49,165, 56,122, 54, 6, 30,101, 48, 87, 62, 99,143,
-166,165,234, 16,177,191, 62, 33,180,201, 9,120, 29, 62, 94,171, 86, 45,166, 99, 53,107,214,156,128,243,122,216,167, 34, 13,232,
-163,146,252,154, 63,139,167,121,197,164,207,126,117,211, 90, 58,202, 12, 2,180, 14,205,249,203, 38,208, 90, 84,169,224,211,117,
-245,202,111,223,214,170,230, 88,212,161, 49, 67,118, 5,208, 77,213, 58, 75,250,103,126,179,126, 39, 48, 12, 6, 12,172,251, 23,
- 2,213,102,254,245,215, 95,189,200, 11,240, 85,158, 61,123,166,132,118,129, 23,233, 32,146, 45, 16,207, 53, 40, 69,132,233,122,
-104,218,232,195,241, 74, 22, 45,240,122,234,232, 65,226,245,224,154, 28, 93, 56, 64,214, 14,107, 33, 99, 90, 87,146, 40,145, 34,
-220,179, 69,147,170, 64, 74,169, 8,178,142, 46,236, 43, 8,187, 68, 30,181, 65, 58,228,237,237,141, 64,208,222,106,160,222, 20,
-136, 39,230,181,115,122,103, 97, 94, 62, 99,165,106,212, 26,124,146,192,155,245, 81,108,194,112, 44,244,236,204,208, 28,240,242,
-237,139, 88,125,254, 87,174, 92,145,222,189,123, 19, 8, 91, 6,193, 14,164, 73, 53,225,250,109, 71,207, 63,184,243,192,235,198,
-165,155, 79, 38,140,154,179,109,194,180,213,235, 86,110, 57,178,105,249,134,189,171,121,223,214, 55, 29, 74,126,234, 29, 38,180,
-234,174,151,142,101, 62,131,102, 72,184,102,255, 25,131,159, 6, 63,195,138, 3,255,229,190,100,151,135,152, 27, 11, 34, 85,227,
-158,153, 44,207, 45,142,149,251, 86,231,133,112, 94, 56,224, 89,222,103,226, 53,149, 94, 21, 28,107,153, 44,233,105, 91,199, 66,
- 13, 55, 55, 55, 5, 32,168,123,149, 34,128,147,130, 95, 62,190,184, 33,190, 87,183,218, 4, 90,239, 47,172,145,199,199, 87,202,
-177,165, 3,133,249, 29,149,134,170,195, 38,185, 77, 66,105,214, 47,101,226,125, 56,126,252,248, 46,130, 42, 2, 44, 85,210,213,
-189,168,137, 49,192,182,141, 26, 53,202,109,209,162, 69, 4, 90, 76,142, 54,207,183, 39, 14,203,177, 36, 65, 37, 69,150,192,139,
-147, 44, 66,251, 8,226,183,201,220,185,115, 89, 70,218, 97,217,221, 16, 67,108, 47,165, 88,136,215,117, 26,153,236, 58, 6,196,
- 36, 27,179,105,186,100,151,125, 87, 76, 50,251, 53,207, 37, 94,165,162,217,172, 63, 85,135,150,219,232, 76,201,100, 90,161, 76,
-178,160, 98,254, 39,184,190, 13,105, 52, 82, 67, 36, 70,186, 55,193, 37,111,156, 90,201, 19, 94,255,176,114,242,123,191,118, 69,
- 52,189,156, 19,100, 33,248,239, 75, 6,198,189,125,251,182, 48, 96,237,142, 29, 59,148,192,176, 37, 74,148, 8, 4, 90, 40,111,
-210, 86, 89,210,122,250,205, 25, 98, 9,222,244,116, 32, 37, 79,164, 8, 17,166,157,216,177, 90,174, 31, 88, 37,199,151,143,146,
- 37, 3, 26, 75,151, 90,133,205,113,162, 71,253,128,219,229,236, 17,234, 84,220,228,154, 37, 93,226,171, 12, 76,206,160,173, 63,
-253,244,147, 18,167,141,241,222, 32,133, 19, 72, 46,169,234,148,221,187,119, 11,213,125, 21, 74,230,127, 87, 61,155,169,128,238,
-130, 33, 36, 37, 36,149, 79, 88,119,210,223,181,107,151, 2,178,184, 7,200, 34,255, 22, 32,180,198,123, 6, 96,198,123,169,222,
- 13,102, 83,135,231, 47,157,191,122,255,254,196,145,179,119, 47,156,182,108,247,218,213, 59,118,111,112, 63,190,121,189,251,137,
-149,199,206,220, 92,207,251,214,229, 9, 45, 63,157,168,159,145,213,224,128,193, 1,131, 3,255,122, 14,216,195, 34,172, 56, 1,
-210,223, 59, 5, 40, 85,176, 58, 87,238, 89,220, 15, 60,199, 28,208, 79,205,107,153,135,215,121,142,216,192,203,112,223, 53, 12,
-152,235, 88,117,168, 5,180, 62,156, 89, 34,159,223,123,201,103,239,167,226,123,123,159,188, 63,181, 64,222, 95,219, 46, 47,174,
- 31,145,171,251,150,201,186,161,117,100,221,144, 58,154, 64, 43,160, 34,187, 40,201, 2,152, 82, 18,130,163, 6, 3, 90, 93,187,
-118,221, 6, 38,184, 65, 5,164, 11,104,189, 57,184, 59, 8,208, 58,147, 47,141,220,236,210, 66, 40,221, 24, 54,108,152,116,238,
-220, 89,122,244,232,161, 0, 45,130, 16,148,195, 33,208,130,157,215,126, 2,173,230,205,155, 19,104,217,140,119, 86,218,100,138,
- 88, 57, 65,172, 61,111, 23,140,246, 53,119, 45, 39,175, 1,178, 46, 20,140,172, 11,104, 77,201,159, 81,230,151,203,251,104, 85,
-173, 82, 91,208,192, 35,145,234, 35, 41,113,170, 0,178, 34,149,138, 21,109,255,171,121, 35,189,205,189,171,203,235,210,182,193,
- 27, 0, 74,123,164,199, 0, 41,151, 84,144,117,235,214, 45,197, 38, 13,134,240, 79, 41,201, 66,122, 12,251, 52, 5,101, 23, 65,
- 61,170, 38,142,119,246,253,242,137,239,253,218, 22,210, 4,111,182, 58, 93,162,156,181, 43,167, 78,150, 80, 54,140,110, 37, 75,
-250, 55,148, 42,168, 7,242, 85, 65,210, 19, 19, 45, 37, 0,225, 51, 74,217, 40,113, 34, 40,100, 64,101, 6, 6,126,249, 18,193,
-160,159, 62, 85, 64,214,144, 33, 67, 72,211, 86,204, 59,123,223, 65, 10, 72,155,158, 82,130, 71,122,155, 55,111, 14, 34,201,186,
-122,245,170,180,111,223,222, 15, 15, 87, 7,200,186,134,120,125,135,113, 28,209,154, 88,134, 12, 25, 54,156,190,120,243,250,202,
-141,251,247,243, 75,126,251,252,140,130,141, 15,159,190,190,113,219,238, 99,203,121,223,242,153,176,224,103, 24,124,216, 6, 9,
-131, 3, 6, 7, 12, 14,252,107, 56,160, 7,104,169, 96,202, 18, 52, 89, 3, 44, 75, 16,102,153,223, 82,170,101,249, 12,174,219,
- 10,196,237, 44, 95, 53, 37, 90,165, 89, 65, 36,224,135,255,111,170, 68,235,213,226,218,242,106,233,143,226,115,120,146,124,242,
-186, 35,226,255, 89,238,158,222, 41,235,135,215,147, 41, 13,146,202,228,122,137,100,245,239,213,244, 2, 45,197, 38,203, 50,192,
-240,192,170,241,223, 83,146,197,244, 75,201,104, 31, 84,160,181, 96,193, 2, 93, 64, 75,149, 22, 81,170,101, 41,217, 98,244,245,
-118,237,218, 41, 64,171,103,207,158, 10,208,154, 62,125,186, 38,208,250,225,135, 31, 14, 16,104, 53,109,218,148,193,125,163,218,
-224,118,184, 2, 81, 35,173,124, 50,165,159,143,121, 80, 35,121, 11, 48,116,169, 80, 20,255, 17,169, 35,108,178,213, 50,214, 18,
-173,185,165,115, 63, 88, 89,163,196,230,205,205,126, 24,142,178,215, 67, 82,108,189,184,229,141, 20,105,249,253, 9,191,190,249,
- 56,178,149, 66,247,114,161, 40, 4, 9,193, 54,128, 44, 79, 26,189,115,163,186,144, 32,107,195,134, 13, 2,155,172, 39,148,112,
- 89, 61, 16,190, 96,244, 40,155, 94,252, 53,216,219,220,167,166, 66,215,217, 30, 68,144,213,230,151,161,159, 78,122,120, 72,202,
- 36, 9,228,183,134,165,252, 51, 37,139,239, 3, 58,206, 4,176,206,141,178, 93,108,219,182,173,180,105,211, 70,166, 78,157,170,
-216,104, 77,152, 48, 65,154, 53,107, 38, 53,106,212,240,139, 18, 37,202, 24, 39,202, 22, 3, 65,112,207,211, 22,139, 32,107,221,
-186,117,178,100,201, 18, 69, 50,102, 45,201, 2,191,168,218,228, 10,209, 96, 32,139,239, 67,124,197,170, 61,123, 15,184,121,251,
-254,211, 91,187,142, 92,216,185,121,251,254,147, 23,175,221,219,117,227,238,147,189,245, 26, 52, 57,139,251,150,241,196, 44,248,
- 89, 35, 68,252,116,162,142, 70, 86,131, 3, 6, 7, 12, 14,252, 39, 56, 64, 12, 98, 11,139,176,242,142,192,211,223,183, 21, 73,
- 87,160,212, 75,189,102,185,183,200, 87, 86,149,104, 5, 72,188,148, 5, 89, 95,124,179, 86, 27,242,133, 65,128, 22,193, 86, 64,
-242,187,181, 87, 1, 87,150,105,213,128,170, 33, 6, 90, 4, 93,135, 14, 29,218,134,201,119, 27, 65,150, 10,180,160,230, 11,115,
-160, 69,163,104, 84,205,161, 68, 11, 43, 33, 15, 18,104, 53,105,210,132, 64, 43,146, 53,243,211, 71,141,181,255, 76,191,214,230,
-143, 19,187,202,187,178, 49,228,114,225, 40, 31,127,138, 23,238, 53, 84, 73,150,246, 63,129,143, 17,104,173,251,165,157, 76,202,
-147, 78,102,151,204,121, 15,157, 97, 19,210, 80,164,186, 72, 25,212,140,233,162,198,222,117,162, 79, 11,191,143,211,126, 5,221,
-152,114,165,112,148, 15, 93, 19,135,183,180,167, 10,164, 9, 73,150, 39,213,100, 55,111,222,148,115,231,206, 41,134,254,148,100,
-217, 0, 89, 38,150,247,194,224, 14,126, 31,199,182,151,119,101,162, 43,116,245,116,168, 68,185,106, 23, 79,145,167,142, 79,202,
-124,245,164,101,231,223, 5,210, 71,105,221,125,196, 71,130,174, 88, 81, 35,207, 7, 13,173, 85,167,246, 94, 67,240, 90, 21, 43,
- 76,229,201,147, 39, 4, 88,108, 19,138,110, 41, 25, 99,226,170, 83, 6,204,117, 20, 57, 62,124,228,200,145, 55,157, 58,117, 74,
- 81, 23,110,217,178, 69, 1, 89,180,201, 2,160,246,167, 36, 11,246, 96,154,146, 44,203, 2,194,165,195,136, 77, 91,118, 94,185,
-116,243,225,137,141,238,135, 54,223,121,248,108,207,194, 37, 43, 14,227, 58,109,202, 2,183,144,242, 83, 15,207,141, 60, 6, 7,
- 12, 14, 24, 28,248, 47,115,192, 22, 22, 33, 63,172, 85,133,182, 64,149, 22,208,178,144,104, 85,178, 1,204, 66,203,118,107,213,
- 97,242, 96, 4,157, 1, 90, 84, 29, 90, 3,173,149,253, 43,235, 6, 90,180,203,178,148,104,241,248,242,229,203,110, 0, 88,110,
- 84, 25,170,105,246,236,217,186,128,214,139,181, 75,131, 72,178, 84,201,150, 45,137,214,248,241,227, 53,129, 86,245,234,213, 15,
- 17,104, 1, 8, 76, 1,163,130, 72,108, 98, 36,201,220,120, 83,219,186,159, 63,206, 25, 36,239, 43,196,149, 43,133,162,188,175,
- 23, 59,220, 75,123, 32,139,140, 38,208, 90,223,233, 39,153, 89, 34,219,157,165, 63, 20,221,128, 6, 30,140, 84, 27, 41,157,218,
- 16, 49,147,102,250,113,109,171, 90,159, 63, 46, 24, 46, 31, 42,199,151,171,133,162,188,173, 25, 51,220, 11,208,181,137,180, 97,
-211,212, 30,210,171,199,112, 47,241,138, 96,101,235,214,173, 52,124,191,111,221,176, 44,175,219,207,245, 63,127,156,249,155,188,
- 47, 31,155, 18,178,119,237, 19,216, 6,111,150,207, 18,100,101, 45,213,252,221,129,195,199,132, 96, 6, 64, 88,154,118, 28, 36,
- 4, 89,161,237,141,120,190, 51,120,252,241,198,141, 27,114,255,254,125, 69,221,153, 37, 75,150, 59,184,222, 13,160,230, 33,165,
-142,148, 78,193, 15,214, 2, 7,239,250, 3,170,103, 65, 95,146, 61,123,246, 40, 32,139,123, 74, 45,241,204,130,142, 29, 59, 42,
- 54, 89, 90,146, 44, 75,250,144, 90, 69,251,161,124, 70,191, 33,191,183,250,216,164, 65,209, 15, 83, 38,244,247,171, 85, 37,251,
- 14,128,215, 64,176,173,240,179, 67, 3,167,249, 25, 6, 60, 51, 72, 24, 28, 48, 56, 96,112,224, 95,207, 1, 61, 64,203, 22,240,
- 34, 22,251, 27,143,253, 95,178,197,115,123, 54, 90,106,254,128,251,229,191, 0, 99,181, 86,252,255,253, 74,123, 18,173,119,251,
-199, 6, 3, 90, 43,250, 85,210, 4, 90, 52,134,111, 15, 67,120, 26,191, 83, 93,104, 9,182,172,129,214,240,225,195,221, 96,192,
-174, 11,104, 61, 91, 58,199, 33,208,234,210,165, 75,160,234,112,204,152, 49,154, 64, 11, 43, 10,143, 0,104,109,165,159, 44,176,
- 33,208,112, 58,110,210,204,165, 71, 77,248,243,217,171,251,119,229, 65,165,228,114,190,112,212, 15,149, 99, 68,120,231, 8,100,
- 5, 2,173,159,155,222,130, 27,135,117,235, 26, 84, 24,136,142, 80, 19, 41,141,218,176,209,146,100, 44, 52,100,244,148,103,175,
-239,223,245,127,244, 67, 42,185, 80, 40,234,135, 74,209, 35,120,219, 3, 89,150, 29, 2, 46, 28, 60,185,114,111,229,202,149, 52,
-124, 15, 2,180,130,148,183, 98, 82, 57,139,242, 86,140,174, 93, 94,130,172,108,165, 91,188, 59,120,248,184,192,205,134, 2,122,
-224,227, 76, 18,231,168,229,180,202,209,186,243,194, 71,218,224,254,253,251, 43,246, 88,148,196, 17,248, 82,250, 68, 23, 12,104,
-115,101,181, 32, 22, 73,200,128, 1, 3,248, 46, 26, 43,218,218,234, 80, 37,204,237,216,177, 99, 65, 36, 89,215,174, 93,115, 90,
-146,165,190, 0, 64,171,116,151, 14, 13, 33, 33,123, 37,111, 95, 93,149,155, 23,230,239,173, 81, 57,231, 96, 24,194,199,101,158,
-144,242,243, 11,124,192, 6, 73,131, 3, 6, 7, 12, 14,252,167, 56,128,225, 62,164,171, 14,249, 28, 87, 25,170, 43, 14, 3,141,
-233, 3,174,241,126, 48,205, 85, 24, 48,215, 57,160,229,189,115, 80,160,218,144,234,195,183, 91,122, 6, 1, 90,179, 90,103,150,
-229,125, 43,104, 2, 45,107,247, 14,238,238,238,187, 32, 45, 81,164, 91, 42,208,130,241,186,219,188,121,243,220,198,141, 27,231,
-150, 55,111, 94, 2,173,129, 26, 21,126, 72,195,106,110,199, 83, 70,182,105,163, 69,160, 5,131,113, 25, 52,104,144, 12, 30, 60,
-152, 19,248, 67, 71, 52,233,194,129,126,178, 0,180, 20, 23, 14,249, 50,101, 24, 86, 60, 95,174,135, 21, 42, 87,247,251,224,251,
-209,255,210, 61,111,153, 50,124,170, 87,137, 88,209, 63,166,137, 30, 87,211,112, 27, 18,173, 27, 40,222, 26,164, 1, 72,213,145,
- 20,186,121, 51,101,248,173, 88,222,236,119,203, 86,168,238,231,103,254,228,127,229,254, 59,153, 54,116,234,235,210, 49,163,125,
- 76, 21, 61, 94, 39, 61, 13, 13,160,213,158, 70,239, 92, 93, 88,172, 88,177, 22,214,229, 37, 93,150,119,242,176,169, 47, 75,196,
-212, 46, 47, 65, 86,142, 50, 45,223, 29, 62,122,146,171, 63, 21,187, 47, 74,138, 22, 44, 91, 39, 41,242,212,165, 77, 86,104,182,
-168, 40,239, 7,250, 52,163, 4, 14,210, 43,174,136,156, 82,160, 64,129,143,252,139, 65, 63,144, 77,155, 54, 17, 48,154,113,125,
- 48,146, 77,123, 42,248,195,218, 10,227,121,127,210, 89,186,116,169, 82, 62,130, 55,228, 87, 36, 89,240,195,230,148, 36,203,178,
- 66,174, 46,169,101,215,134, 65,226,190,186,207,222,229,127, 54, 28,236,226,146,178,180,101,251, 59,203,207,208, 48,203,120,214,
-224,128,193, 1,131, 3, 6, 7,190, 27, 14,104,171, 14,109, 85, 5, 18,173,171, 83,250,255, 36,239, 30, 93, 22,191, 27, 59,229,
-205,134, 14, 10,224,122,189,178,153, 2,180,102,181,202, 36,107,177,218,112,206,175, 85,165,118,254,196, 4, 90, 87, 29,177,196,
- 26,104,173, 90,181,106, 23,140,161,221,134, 84, 75, 24,232, 71,235,183,138,113,222, 67,173,228, 6,201, 7,189,113,215,180, 55,
-217, 90,188,167,141,171,171,171, 47, 39,234,219,189,127,150,115, 37,178, 42,160,139, 27, 85,135,244,219,212,167, 79, 31, 5,100,
- 1, 64, 73,204,152, 49,233,218, 32,136,205,141,117,153,225, 47,171,190,234,140,212, 53, 67,202, 42,237, 27,213,125,115,239,252,
- 73,217, 50,109,184,244, 26, 56,241,243, 44,183, 43, 94,201,179,150,189, 27, 61,121,150,188,122,186, 0,128,214, 42, 20,167, 63,
-210, 15, 72,202,234,134,172,233, 83,151,107, 83,175,214,107,210,221, 60,109,132,244, 25, 62,205,127,222,150,107,175, 82,231, 44,
-119, 55, 90,146,172,150,134,215,122, 94, 17,152,199,186,188,221, 7,140,255, 60,115,211,229, 23,201,178,148,210, 44,111,226,108,
-117,138,229,171,208,230,221,145,227, 30,178,118,237, 90, 46,142,144,125,251,246,201,194,101,235, 37, 77,193, 6,222, 4, 97, 78,
- 21, 38,120,230,184,180,199,162, 27, 6, 44, 56, 32, 48, 82,165,122, 89, 99,196,136,177, 11,203,108, 31,195,198,106, 47,217,227,
-232, 61,137, 18, 37,122,205,246,133,159, 53,197, 38, 11, 32,203, 63, 52,146, 44,245, 93,148,104,117,254,185,129,248,190,247,220,
-251,230,229,149,193,103, 14,246, 45, 29, 26,126,134,146, 87,198,227, 6, 7, 12, 14, 24, 28, 48, 56,240,111,231, 64,105, 72, 20,
- 16,106,167,125,142,148,145,159, 44, 26,211, 69,222,222, 60, 44,239,143,207,148, 55,235,218,202,230, 63, 90,200,150,169,221,164,
- 67,181, 28,146, 53, 73,184, 39,204,199,252, 86, 60, 9,226,120, 45, 72, 8,158,204,166,143,200,219, 31,246, 47,235, 59, 23,250,
-191, 31, 45, 30,227,250,207, 72,177,236,240,215,150, 51, 55, 26,157,205,202,159, 63,255, 39, 74, 55,174,212,175, 32,167,178, 38,
-146, 78,157, 58,201,192,129, 3,105,212, 46,137, 19, 39,102, 24, 30, 26, 88, 7, 55, 80,179, 10,155,162, 58, 35,133, 55,240,120,
- 5,178,185, 62, 57,187,107,147,236, 95, 52, 69,230,118,174, 43,133,115,101,123,158, 44,107,169, 51, 58, 64, 86, 96, 57, 17,191,
-144,126, 60,232, 20, 77,121,119,166, 76, 9, 99,229,203,234,250,232,204,206, 77,114, 96,241, 52,133,110,145,220,217, 95,164,202,
- 86,246,178, 6,200,114,232,200,206,102,121,115,102,125,158,212,181,216,105, 7,229, 13,164,153,161, 80,131, 13, 15, 30,121, 42,
-234, 56, 26,151,211,171,250,162, 21, 27, 0,178,234, 59, 11,178,236,149, 51, 46, 22, 26, 8, 65, 17, 92,104,176,157,227, 58,241,
- 13, 89,210, 92, 79,176, 70, 59, 58, 75, 73,214,235,215,175,157,149,100, 5, 43,167, 75,250,148,163,235,212, 40, 57,184,243,207,
- 63,150, 14, 45, 63,157,168,155, 86,214,255,178, 3, 67,163,238, 90,189,195,185,251, 6, 63,157,227,151, 86,110,131,159, 90, 28,
-250,239,220,231,252, 78,169,150,186,135,183, 38, 39,182,156, 73, 76, 49, 0,164, 6, 22, 74, 31,203,123,221,164,238,242,226,212,
-106, 25,209,161,170,228, 73, 25,197,155,215,121,223, 9, 80,100,157, 53,134,165,164,139,199, 26, 69,115,212,177,233,139,106, 77,
-219,226,133,228, 92,219,134,138,107, 7,216,215,144,222, 26,226, 27, 7,116,131,208,196, 51, 81,179,103, 76,251, 75,158,204, 46,
- 15, 23,140,236,251,121,199,159, 35, 21, 48,196,148, 59, 83, 58,107,175,242,246,200,254, 31,192,100,200, 80, 6, 82,152,164,217,
-178,101,139,156, 57, 67,234,118,185, 51,101,120, 48,103, 88,239, 79, 59,103,142, 14,164,155, 71, 31, 93,155,117, 15,101,121, 3,
-105, 38,205, 85,171, 96,155, 94, 99, 63,120, 62,125, 46,116,242,186,120,229,198,144,128, 44,242,195, 46,208,162, 36,139,171, 23,
-233,176, 52, 20, 64,203, 21,177, 11,175, 78,155, 54, 77,174, 95,191, 30, 98,155, 44,123,229,132,122, 51, 59,218,191,107, 8,219,
-223, 24,120,157, 24, 91,116,100, 53,248,169,131, 73, 78,100, 49,248,233, 4,179,116,100, 53,248,169,131, 73,255,145, 44,170, 77,
-150,245,222,185,234,103, 72, 98, 74,156, 41,145,105,122,150,196,225,222,115,207,243, 80,128,162,192, 71, 45, 37, 93, 60, 14, 3,
-154,116,209, 79,159, 86, 76,138,187,126,103,104,230,116, 73,123,189, 83,237,242,239, 87, 14,239, 46,107,134,117, 85,192,208,216,
-150, 85,165,124,190,172, 94,121, 93, 51,140,208, 34, 22,112, 63,216, 7,152, 35, 99,218, 75, 29,106,150,123,183, 98, 88, 55, 89,
- 59,252, 23,153,215,229, 71, 25,223,170,154, 84, 44,144,253, 85,158,204,233,199,235,160,107,243,163, 14,101,121,131,208,164,122,
-176,237,175,127,124,184,115,239,145,164, 47,212,208, 89, 73,150, 90, 5,123,131, 79,164, 92,185,114, 61,167,177,123,142, 28, 57,
-168,194,117,198, 0,209,154,102, 20,216,106,141, 97,120, 29, 58, 61,117,102,117,161, 5,159,191, 56, 63,117,180,169,158, 44,198,
- 96,174,135, 75,250,243, 24,252,212,207, 43, 61, 57, 13,126,234,225,146,254, 60,255,101,126,234,231,210,183,151, 51,228, 65,165,
-109,213,197,197,197, 20, 69,103, 29,191,203, 14,147,211, 53,157, 71,222,172, 46, 79,243, 49,101,206,224,153, 39, 83,250,187,249,
-178,164, 63,144, 41, 67, 74,103, 92, 27, 4, 7, 90,174,233,206,231,203,226,242, 44,127,214,140,207, 65,247, 25,232, 62,200,155,
- 57,253,137, 28, 25,210,214, 10, 13, 63, 67, 89,222, 96,229, 76,154,173, 78,129, 44, 37,154, 45,167,205,150,206,114, 89,103,115,
-212,238,149, 16,248,121, 37, 30, 40,227, 36,109,123, 52, 11, 86,169, 82,229,142, 61,143,239,206, 0,108, 53,111, 88,243,211,201,
-122,218,202,254, 93,126, 71, 97, 80,111,146, 48,234, 30, 70,140,180,247, 3, 24, 6,228,141, 54, 10, 3, 38,106,253, 0,134,242,
- 21,223, 75, 27,133,178,154,255,205,199,191,151,198, 53,202, 25,182,253,243,107,243,147, 46, 56,108,174, 80, 12, 9,208, 10, 37,
- 43,190,118,221, 67, 90, 92,163,156, 33,229,156,237,231, 12,126, 26,252, 12, 43, 14,252,151,251, 82, 88,241,240,159,160, 19,182,
- 18, 45, 39,106,240, 95,238, 48, 70,221,157,232, 40, 58,178, 26,252,212,193, 36, 39,178, 24,252,116,130, 89, 58,178, 26,252,212,
-193, 36, 39,178, 24,252,116,130, 89, 58,178,126, 47,252,212, 81,149,239, 51, 11, 27,192, 86,114,166, 54,246,104, 56,186,174, 69,
-223,160,105,187, 93, 66,218, 94, 6, 63, 13,126,234,237, 3,198,183,105,159, 3,122,121,104,153,207,224,167,193, 79, 91, 28,248,
- 47,247, 37,173,111,226,123,188,111,189,234, 80,159,195,210, 48,168,233,247,130,162,141,114,134, 65, 99, 91,144, 48,248,105,240,
- 51,172, 56, 96,244,165,176,226,228,223,116, 12,126, 26,252, 12, 43, 14,124,137,190, 20, 86,101,251, 39,232,132,110,181, 97, 40,
- 74,252, 37, 26,194,160, 25,138, 6,177,241,168,193, 79,131,159, 97,197, 1,163, 47,133, 21, 39,255, 93,160,136, 65,228,153,236,
-109,182,238, 27,125,233,191,217,151,194,182,214, 95,151, 90,152,218,104,185,162,236, 76,122,182,144,126, 44,157,225, 77,253, 60,
-156, 90,126,134,151,118, 41, 91,182,236, 96,139,151, 5,210, 44,153, 61,226,201, 50, 57, 35,122,254, 63, 69,242, 44,147, 43,170,
-103,153, 60,209, 61, 75,230,142,126, 82, 79, 1, 3,242,132,180,156,142, 94, 97,208,212,110,128,180,209,227, 36, 62, 23, 35, 94,
-178,171, 81, 99, 37,184, 26, 41,106, 44,164,152,129, 41, 66,228,168,238,182,218, 93,189,150, 44, 79,157, 52,137,114,214, 90,145,
- 40,103,205, 18, 8,118,189,156,251,196, 57,235, 46,251,123, 95,103,105,226, 60,181,115,113,159, 60, 95,189,212,118,138,242,221,
-181, 17,162, 41, 68, 8, 77,178,199,207, 20, 41, 82,184, 33,194,194, 85,123, 9,223,227, 30,237,230,252,238,165, 37,165, 80,199,
-243, 72, 74,112, 90,139,116, 9,199, 90, 65,103,117,245,165,210, 88,180,209,208,100,234,212,220,100,186,199,196, 99, 94,251,150,
-250, 39,156, 59,239, 71,123,123,198,142, 29,251, 38,203,197, 61,207,121, 61, 4,229,236,136,103,124, 2, 18,143,173, 55,123,247,
-117,241, 83, 71,159,180,204, 98,208,116,146, 97, 26,217,191, 4, 63,195,182,132,223, 17,181,204, 40, 43, 61,181, 51, 36,206,147,
-130, 5, 11, 74,214,172, 89, 57, 8, 61, 9,184,198,123,204, 99,107,115,186, 33, 16,122,103,220,228,201,147,197,223,223, 63, 48,
-148, 14,194,225, 12,182, 32, 30, 72,147, 0, 75,238,238,149,227, 27,255, 20,121,255, 2,233,165,200,135, 87, 34,207, 47, 73,153,
- 60, 49, 61,157,224,177,101, 57, 99,199,143, 31,127, 98,130, 4, 9, 30,193,201,168,167, 86, 98, 62,230,231,120,100,245, 62,205,
-186,199,140, 17,245, 99,212,168,145,252,109, 37,222,179, 81,254, 64,154,120,239, 97,150, 13,131, 95,144,148, 36, 73, 18, 79, 53,
- 37, 77,154,212,211, 50,193, 67,189, 39, 19,158,179, 4,161,142,202, 25, 45,124,196,200,125, 35, 68,138,185, 39, 66,148,232,143,
- 35, 68,137,241, 56, 98,148, 88,123,120, 13,101,139,230,128,191,154,117,199,179,105,147,167,118,185,255,199,204, 53,210,172,235,
- 80,185,114,253,150,180,236,242,187, 92,187,121, 71, 58,246, 30,161,236, 9,186,108,181,187,122, 45, 73,158,134, 75, 39,205, 89,
-247, 50, 73,158, 6,143, 38,205, 89,171,236, 39,207, 93,255, 2,215, 31,114,159, 52, 79,195,251,147,231,172,123,145, 36,111,163,
-197, 33,237,159,141, 51,165,120,215, 36, 67,146, 79,182, 18,239, 57,106, 35, 39,250,159, 86,214, 64,126,170, 32, 11,238, 44,232,
-117, 88,154, 84,204, 55,106,124,215,154,157,108,165,126,245,242,141,170,151,221, 36,141,243, 70,207,167, 62,103,143,159, 25, 50,
-100,184,252,233,211, 39, 4,212, 54,203,135, 15, 31,132,129,202,233,105, 31, 33,178,148, 0,224, 46, 46, 46,202,164,171,177,233,
-105,247, 26,160,113, 6,233, 44, 18,131,182,107,109,142,104,198,130, 47,181,129, 8,223,180, 39, 74,148, 40, 79,153, 16, 98,107,
- 15,175,129,168,189,200, 18,124,159, 61,154,103, 16, 63, 83,241,203,246,252,249,115,121,242,228,137,146,158, 61,123, 38,209,162,
- 69,187, 22, 6,117, 55, 17, 88, 77, 45, 81,226,211, 91,196, 16,245,236,222, 93,250,197,137,243,145,215,244,244, 79,212,207, 29,
-229,184,234, 76,226, 51,206,142, 75, 4, 85, 28,124,185,231,179,214,231, 78,244,121, 74,170,124,212,129, 60, 92,184,112, 31, 17,
-102,107, 9, 98,178, 46, 64,154, 95,164, 72,145,133,188,166,222,103, 94, 36, 85,242,165,167, 47,105,245, 29,235,251, 6, 77,103,
- 57,230, 56,255,151,224,103,216,150,240,235, 82, 11,145, 77,214, 22,118,124, 2,171,137, 19, 39, 10,192,142,188,127,255, 62, 16,
-252,112, 32,218,190,125,187, 18, 2, 37,123,246,236, 4, 94,252, 72,236,126,212,229,171,151,232, 82,189,113, 5, 97, 42, 84, 34,
-207, 35,124,188,125,144, 63,188, 21, 31, 92, 90,180,104,161, 32, 44, 6, 23, 70, 80,103,113, 36,209, 82,128,214,165, 21,178,173,
-107, 26,145,221,191,138,204, 43, 32,178, 18,129,185,183,180, 9, 49,208, 34,104, 26, 50,100,136, 18,235,111,205,154, 53,178,124,
-249,114, 89,180,104,145, 32,208,181,204,156, 57, 83, 70,141, 26, 37, 12, 98,205,228,235,235,171,240, 4,249, 62, 5,128, 45,203,
-234, 4,118,194, 34,249, 83,159, 44, 86, 32,173,103,209,128, 84, 36,111, 42, 5,232, 16, 96, 5, 50,212,234,128,247, 28, 13,104,
- 0, 80,247, 95,192,241,167,215,217,179,242,242,212, 41,121,121,242,164,240,252,197,241,163, 72,135,145, 14,202,139, 99,251,229,
-249,145,189,242,236,224,110,121,186,103,135, 60,217,225, 46, 15, 48,192,171, 3,104, 0,125,123, 31, 75,177, 72, 81,162,223,251,
-169,243,239,230,153, 75,183,202,142,131,231,100,235,190, 51, 50,121,222, 38,105,214,161,159, 57, 74,244,216,247,240,188, 61, 63,
- 91,154, 31, 96,148, 24,113,174,173,219,178, 87,250, 14,155, 44,201,178,151,147,164,217,202, 6, 73,157,251,142,210, 2, 90,241,
-147,228,248,225, 34,216,230,147, 52,119,189,183,220, 39, 83,247,185,130,158, 39,205,241,195, 5,148, 53,190, 35,126,218,107, 35,
- 2, 44,181,105,158,254,249,167, 60, 68, 80,114,117,227, 61,189,147, 14,193, 45,249,174,149,172, 64,176, 74, 62, 8,208, 2,200,
-202,143, 27, 2, 96,196, 62, 34, 91,255,234,191, 78, 46,175,158,101,153,206, 44,235,191,142, 32,203,223,247,173, 63,247,205, 10,
- 70,207, 79,176,101, 81,222, 32,109,148, 46, 93,186,171,239,222,189, 19, 4,121, 87,130,123, 91, 39, 0, 45, 45,160, 65,210,182,
-218,157,223,248,212,132, 9, 19,178,207, 51, 58,195, 49, 2, 25,190, 11, 32,224, 28,206,243,198,141, 27,247, 52,243,216, 24, 15,
-236,209,228,245, 82,136, 14,112,111,247,238,221,222, 0,132, 62, 55,110,220,240,249,252,249,179, 15, 64,145, 15,130,161,191,133,
- 20,134,253,147, 18, 42, 91,155,189,254,233,139,128,228,138, 20, 29,241, 86, 3, 19,129, 86,237, 66,145,252,219, 87,142,225,211,
-188, 76,116,142, 93,213, 17,141, 33,174, 21, 97,205, 62,207,252,148, 98, 17,100, 97, 80, 21, 41, 93, 90, 32, 42, 19, 94,211, 83,
- 78, 2,172,213,235, 87,200,166,173,235,101,221,166,213,178, 98,205, 82, 89,178, 98,161,204, 95, 60, 71,102,205,251, 83,166,207,
-156, 34, 19,167,142,147,177, 19, 70,201,168, 63,134,203,208, 17,131, 8, 16,173,227,207,106,150, 83, 5, 86, 25, 51,102,244,230,
- 49,247,150,192, 75,111,159, 71,190, 32, 64, 11,101, 17,180,147,255,253,251,247,149,196, 99, 94, 51,128, 86, 48,142,106,182,145,
-157,254,226,232,242,247, 66, 51, 4, 85,251,102, 30, 9,145,234, 80, 56, 32,122,121,121,113, 64,183,135, 7, 20,176,113,225,194,
- 5, 5,144,160,186,214,224, 32,176,113,231,239, 27,219,101,247,147, 69,194,228,126,127,129, 12,152,209, 85, 32, 93,177,246,134,
- 62,234,200,145, 35,202,223,100,212,168, 81,247,129, 94, 28, 71, 31,181,170, 58, 44,149, 35,210,219,138, 5,227,122,151,202, 17,
-249,109,104, 85,135,148, 80,205,153, 51, 71,126,252,241,199, 32,131,173, 58,240, 54,109,218, 52,200, 36, 68, 0,202, 63,126, 62,
-103,111,224, 37,192,178,100, 96,181, 10,217,189,138,228, 79,227,153, 58,101,130,207,188, 78,176,202,212,175, 95, 63, 37, 81,170,
-160, 5,180,192,187,251, 94,167, 79,203,213, 73,147, 2,211,245,105, 83,228,230,172,169,114,107,254, 84,185,179,120,170,220, 93,
-134,180, 20,199,139,112,109,222, 84,185, 49,115,170, 60,116,219,168, 7,104, 21, 74,153, 38,147,215,162,181,187,101,214,138, 93,
- 82,166, 97, 95,132,226,169, 39,233, 11, 55,144,138,205, 6,202,248,121,219,100,242,124, 55, 73,145,198,245, 37,234,108, 43, 0,
-182,230, 71, 29, 37, 90,236,251, 23, 16,138,167,106,157,102,146,171,100, 45, 25, 49,113,182, 76,252,107,177, 2,182,230, 44, 89,
- 39, 7,143,157,118, 8,180, 48, 57, 79, 43,251, 99,183,119,211, 23,184,249,148,107, 60,200,103,250, 66, 55,159,242, 77,213,253,
- 96,229,188, 66,179, 33,202,190,114,227, 94,239,208, 62,211, 28,245,165, 96,109, 84,241,239, 54,106,153, 41,149,210, 70,220,142,
- 97, 82,100, 10, 9,208, 82, 39, 47,187, 31, 82,192, 13, 43, 16,172, 22, 57,144,159,170, 36,139,223, 36,251, 29,128,129, 2,182,
-182,205,236,191, 86, 5, 90,167,151,246, 95, 75,112,245,249, 3, 0,205,222,145,226,119,107,223,103, 85,178,101,193,131, 32,109,
-132,254,180, 21,106,195, 43, 76,136,241,232,141,189,159,101,194,100,251,206,150, 90,209, 74,165,104,171,221,167,242,155,126,251,
-246,173, 32,104,247, 11,124, 87, 31, 1,136,100,243,230,205,146, 55,111, 94,255, 50,101,202,152,249,189,183,106,213,138,227, 7,
-193,150,245,102,139,102, 5,152, 19,188,240,193,246,241,227, 71, 31,140, 83, 62,235,214,173,243, 1, 29,229,152,215, 32,137,242,
-201,156, 57,243,115, 16,179,249,188,157,161,217,247,241,227,199,159, 78,156, 56, 33,151, 46, 93,146,187,119,239, 42, 18, 61,142,
-113,205, 75, 71, 18,217,150, 85,186,212, 78, 38,127,204,220,116, 41, 71,174,188, 83, 25, 11,211, 30, 63,237, 13,253, 4, 85,148,
-100, 17,100,161,194, 78, 3,173,157, 59,119, 10,226,195, 58, 76,133, 10, 21,146, 18, 37, 74, 8,162, 38,104, 2, 45,124, 23,107,
- 33, 1, 63,108,153, 32, 37,127,211,167, 79,159, 79,108, 39,110,220,243,156,215,153, 15, 63, 3,107,157, 0,153, 29, 41,181, 34,
-160,130, 38,228, 14,126,158,151, 34, 45, 99,106,208,160,193, 10, 94,227, 61,230, 1, 77, 75,213,162,230, 24, 18,130,233,213,160,
- 25, 2,166, 57,120,228, 75,240,211,238,235,208, 21,243, 35, 65,146, 18,152, 42, 88, 28, 23,198,113,161,128,115,203,235,204,207,
-235,150,207, 90,159,243,217,152, 72,144,212, 40,180, 25,151, 56, 65, 8, 88,229, 88,162,229,230,230, 38,106,178, 32,174,124,100,
- 12,151,194,129,231,234,213,171,138, 24,157,106, 5, 79, 79, 79,217,181,107,151, 76,153, 50, 69,186, 99,208,232,209,163,135,204,
-152, 49, 67,181,105,176, 89, 62, 85,162, 85,163, 73, 5, 25, 50,239, 87, 89,115,105,142,212,108, 81,245, 19, 6,106, 53, 6, 97,
-196,156, 57,115, 62,227, 59,199,143, 31, 79, 90, 84, 49,232,218, 64,163,215,238,115, 62,131,184,215,245,128,131, 76, 4, 76,148,
- 90,213,169, 83, 71, 23,208,162, 4,128, 64,211, 6,208, 10,124, 11, 39,108,203, 9,246,198,229,125,114,234,200, 10,169, 85,243,
- 7, 5, 84,189,124,249, 82, 1,151, 79,159, 62, 85,120,204,189, 29,160, 21, 72,147, 64,139, 82,172, 32, 64,107, 6,128,214,156,
-169,114,123, 33, 0,214,242,169,129,175, 36,224,226,181,155,179, 1,180, 54,174,183, 6, 90,214,220,136, 22, 33,114,244, 59,115,
- 86,108,151, 95,134, 45,144, 52,165,186, 72,178,220,181, 3,105,101, 40,218, 72, 10,214, 27, 34, 93, 71, 44,147, 63,102,109, 16,
- 72,182,238,128,128, 35, 53,162, 77,110, 71,142, 26,227,126,253,250,245, 5,170, 26,233,218,163,183,244, 30, 52, 86,198, 78,155,
-175, 0,173,191, 22,172,150,125,135, 79, 90, 3,173, 32,116, 32,205,184, 5, 41, 27, 64,214, 64,159,254, 35,255,242, 41,211,112,
-128,207,192,177,115,148,243,161, 19, 22,248, 84,104, 58,216,103,244,180,165, 62, 85,127, 26,225,227,190,255,180, 15, 36,142,183,
- 28,245,141,255,181,119, 21, 96, 82, 28, 77,244,130,187, 7,183, 4, 18,220, 93,130,187, 4, 39,184, 5, 9,193,131, 19,228,130,
-187, 4,135,160,193,221,221, 29,238,112,215, 67,143,195,143,227, 22,191,171,255,189, 97,103,255,185,101,119,103,230, 56, 32, 36,
- 59,223,215,223,238,206,246,212,116, 87,219,235,170,234, 42,251, 54,186,130, 54, 58,118,112,145,252, 81,169,188,248, 33,166,162,
- 22, 96,241,251,177, 20, 41,196,137, 68,203,225,107, 84,160,197, 56,143,142, 36, 70,188,207,203, 9,208,210,210, 84, 36, 89,228,
- 27,233,112, 92,158, 62,125,138,146, 53, 81,129,214, 59, 73,214, 83,121,182,125,128,220, 27,144, 80,158,204,175, 45, 79,150,183,
-122,197,251, 70,198, 7,213,136, 90,213, 61, 65, 29,193, 6,165, 80,220,124,177,191,178,143,222,184,113, 67, 0,190, 46,187,162,
- 9,190,123,243,153,157, 59,119, 10,192,144,162,142,100, 28, 77, 6, 45,223,180,105,147,210,254,231,206,157, 19, 72,219, 4,109,
- 74,201,150,222, 21, 11,234,193, 91, 40,139, 5,115,145, 5,101, 81, 0, 22, 37, 89,252,190,119,239, 94, 75,145, 34, 69,148,123,
-120,143, 5,106,197, 91, 32,104,175,214,119,246,142, 23, 87,175, 94,125,195, 96,229,248, 84,234, 8, 44,167,180, 11, 36, 90,210,
-162, 76,180, 23,191, 84, 73,101,217,228,245,228,245,232, 25,155,206,163,173,170,234, 21,214,254,127,170, 9,123,198,137, 19, 68,
- 73, 22, 83,167,175,190, 10,114,161, 58, 12,241, 56,165, 83,148,100,213,248,169,170, 82, 38,126,218,167,159,234,215,148, 6, 77,
-234, 73,179, 22,141, 21,169,150, 3,137, 86, 8,154,152, 71,246, 3,172, 95, 4, 63, 47, 66, 93,124, 17,237,115, 17,188,188,136,
- 56,177, 79, 16,113, 65, 65, 90,252,172, 95,191,190,191,143,143,207, 69, 72,161, 46,242, 25, 51,245,206,145, 35,199, 12, 60, 43,
- 0, 86, 75,208,103,211,107, 19,239,241, 63,230, 49, 67,211,157,247,223,201, 1, 39, 88, 68,169, 44, 65, 16, 63,212,164,253,141,
- 77, 69, 79,245,183,163,124,218,123, 86, 48,101,163,101,125,182, 34, 63, 73, 27,234,237, 5,200, 99,212, 14,221,124, 67,176,146,
-154,167,108, 64,139, 96, 75,155,154, 54,109, 42, 45, 90,180,144, 95,127,253, 85,218,183,111,175, 0, 45,130, 46, 43, 3, 92,190,
- 24,187,177,136,169,190, 73,181,117,226,214, 81, 50,112, 94, 31,129, 17,110,111,235, 3, 63, 18, 96,241, 34,224,194, 61,195,158,
-190,195, 18,104, 81, 5,216,164, 73, 19,105,219,182,173,180,110,221, 90,169, 39,127, 99,162,225, 68,161,168, 51,185,219, 37,184,
- 58, 1,181,221,193,131, 7,153,231,141, 3,213,161,141, 15,249,115,165,244, 59,127,106,155,172,154,223, 75, 86,252,221, 67,150,
-206,233, 38,139,103,118,145,202,149,202, 41, 11, 87,187,118,237,148,247,181,105,211, 70, 73, 92,116,141, 0,173, 7,120,247,123,
- 64, 11, 96, 74, 1, 90, 0, 87,234,165, 0,173,217,239,128,214,173, 21,203, 92, 46,230,225,194, 69,234, 94,167,121,183, 87,211,
- 22,111,151,212,197,218, 75,218, 82,191, 73,138, 92, 53,109,180,210,255,208, 80, 10,215, 31, 34,197, 27,143,144, 97, 51, 54, 73,
-237,230, 93, 95, 70,136, 20,149,106, 96, 83, 23,129,150,231,224,177, 82, 3,146, 67, 74, 77, 91,183,235, 40,221, 1,182, 8,180,
- 38,204, 88, 36,219,246, 28,114, 9,180,226,198,141,235,131, 66, 89, 54,108,216, 96,129, 10,219, 2, 21,146,101,215,174, 93,150,
-125,251,246, 89,208, 38, 22,108, 14, 44,199,142, 29,179,156, 60,121, 82, 89,144,177, 27, 39, 32,116,122,189,107,163,173,182, 54,
- 90,134, 54, 90, 50,171,171,120, 2,104,221,132,180,209, 30,104, 29, 14, 31, 94,234,125,235, 80,117,232,240, 29, 4, 80, 4, 47,
-144, 54, 60, 86,109,229,180,159,188, 79, 48,195,123,174,202,169, 74,180, 0, 42,130, 8, 88,206,157, 59, 27,196,113,231, 72,162,
-245,242,220,218,224, 39,243,106,136,255,146, 70,111, 28, 72,180,156,190,134,106, 68,170,196,157,169, 17,181, 64, 17,146, 46, 61,
-219,173, 76,148,100,173, 92,185, 82,152,104, 18,160,130, 44, 74,103,208,102,178,103,207, 30, 6,127,127,133, 2,229,212,235, 68,
-180,191, 2, 64,123, 70,169, 21,129, 21, 36, 78, 33, 64, 86,149, 42, 85, 44, 51,102,204,176,160,140,138, 84,171,111,223,190,254,
-145, 34, 69,162,205,150,145,235, 32, 64,223, 91,130, 44, 72,182,148,177,169, 74,117,192,119,170, 57, 61,160, 2, 77,210,119,196,
-220, 35,155,143, 62,125,147, 53,123,238,225, 70,136,106,243,192,176, 46, 98,222,152, 49,239,238, 93,177, 34,120, 72,131, 6,111,
-243,199,138,229, 83,204,224, 92, 71,208, 68,147, 6, 85,162,197, 65,169,149,110,193,230, 9,130,178, 98, 82,166, 76, 25,169, 84,
-169, 18,165, 80, 70,128,214, 62,212,243, 34,120,122, 17,237,114, 17, 96,248, 34,180, 19, 23, 49,159, 95,129,186, 88, 81,101,160,
-141,223,246,239,223,223,135,247,121,185, 2, 90, 48,105,216,141, 57,253,166, 54,165, 72,145, 34, 16,210, 75,182,177, 37, 85,170,
- 84,119,153,208,199,188, 8,184, 8,180,200,107,212, 99,154, 89, 94,186,243,255,123, 57, 96,135, 69,148,138,106,129,148, 22, 44,
-217, 3, 44,251,255,236,159,123, 71,234, 29,104,115,246, 44,238, 39, 15, 5,119,245,109,180, 28, 84,204, 20,208, 26, 61,122,180,
- 33,160,197,194, 99, 16,214,110, 63,172,173,140,223, 60, 86,190, 75,151,102, 47,110,197,166,170,144, 82, 29,170, 25,240,123,136,
-153, 74, 58, 2, 90, 0,107,155, 96, 95,118,193, 81,226,127, 46,232,135,149, 49,188,237, 21,249,114,164,240, 59,229,189, 81,230,
- 77,235, 40,115,167,180,151,217,147,218,202,204,241,191, 74,133,242,165, 21,245,207,254,253,251, 5, 59,113,217,189,123,183,178,
-243, 7,104,208, 5, 90,168,243, 77, 78,164, 57,190,249, 70,122, 67,250,150, 33, 89, 50, 89,221,179, 27,212,131,127, 42,106, 66,
-170, 11,169, 54,244,158, 52, 88, 58, 85,175, 32,141, 74, 21,149, 45,253,251,200,141, 37,139, 92, 2,173,240,145, 99,108, 31, 51,
- 99,149,212,106, 63, 78,190, 43,253,155,164, 43,221, 81,146,103, 45, 47, 73, 51, 22,147, 20,153, 75, 72,150, 82,205,165, 68,147,
-145, 82,182,197, 88,105,209,239,111,249,227,207,165, 18, 53,102,188,237,102,218,139,121, 9,180,102, 46, 88, 35,125, 6,140, 82,
- 36,135,148,150, 68,137,153,192,102,167,245,115, 71, 79,151, 64, 11,192, 86, 1, 90, 91,182,108,177,236,216,177,195, 2,222, 89,
-192, 71,203,161, 67,135,148, 69, 22, 42, 93, 11, 36, 19, 22, 44,156,212, 48,233, 2, 45,182,209, 73,239, 13, 33,219,104, 66, 27,
-241,172, 88,206, 6, 50, 85,213, 33,203, 74,187, 29, 51, 64,139, 0,138,210, 96,103, 64,138,135, 22,184,176,243,211, 21, 47,105,
-103,165,218,104,157, 56,126,252, 53, 39, 11, 87, 54, 90, 15,230,213,125,235,196, 70,203,233,107,180,106, 68, 85,157,232,236, 83,
-231, 52,162, 98,248, 14,240,243,134,117, 35,200, 2,232,121,129,123, 39,152, 0, 6, 94,242, 62,251, 63,198, 41, 85,160,188,239,
-210, 64, 30, 18,170,157, 0,230, 22, 72, 95, 20,144, 69,201,149, 42,201,170, 88,177,162,101,254,252,249, 22, 0, 68,139,151,151,
-151,229,210,165, 75, 10,248,134,154,121,167,193,254,201, 0,244,123,144,158, 32,249,107, 18, 37, 56, 5, 85, 26,149,106, 52,154,
-177,237,132, 69,170,212,110, 54, 79,143, 46, 84,109, 61,193,207, 19,248, 60,141, 57,110, 61, 84,100,151, 17, 80, 93,233, 83,156,
-115,209,222,180,207,210,170, 32,157,146, 36,208,162, 77,150, 86,138, 69, 58, 53,235, 84,147,122,141,126,146, 70,205, 26, 72,243,
- 86, 77,177,105,105, 37, 29,126,107, 43, 67, 71, 14, 54, 4,180,192, 71, 5,104,173, 94,189,250,226,226,197,139, 47,206,153, 51,
-231,226,200,145, 35,175, 32, 0,188, 2,180,178,103,207,254, 22,128,213, 7,182,170, 23,177,113,185,136, 54,223,231,172,144,236,
-191,251,102, 76,145, 99,203, 22,137,215,194,191, 21, 73, 40,251, 61,211,206,241,163,100,231,184, 17,178,162, 83,107,110,176, 31,
-186,129,150, 94,239,249,111,254,239, 8,100,145, 19, 42, 40,122,247,245,157,250, 80,253,110,255,233, 12, 92,217, 63,195,231,236,
- 37, 90,214,223, 37, 66,193,125,215, 54, 90, 78, 42,102, 10,104,141, 24, 49,194, 37,208,130, 77, 69, 59, 26,153, 58, 74,148, 18,
-113, 18,230, 69, 99,120, 84, 48,173,153, 74, 18,104, 77, 93,124,104, 36, 62,251,242, 59, 83,158, 60,121,238,145, 30, 37,113,218,
-139, 70,236, 4, 95,102,232,127,104,222,188,217,147,249,121, 31, 88, 45, 83,199,180,148, 63,135, 54,145,209, 3, 26,201,240,126,
-245,164,111,183, 26, 50,164, 95, 67,241,236,241,147,244,238, 82, 83,122,116,172, 42,157,219, 84,146, 14,173,202,201,119,223,196,
- 15,206,149, 53,241,155, 60,217,147, 60,117,244,126, 2,173,142, 29, 59,210,182,193,254, 40,186,203,223, 60,184,224, 74, 61,133,
-147,133, 55,151,109, 58, 44, 5,127,242,148, 76, 21,123, 72,182,226,245,176,179,167,173,249,187, 43,115,209,250, 82,174,229, 56,
-169,220,102,162,212,237, 58, 67, 38, 45,218, 45,209, 98,196,189,233,140, 71,209,227, 37,217, 20, 59,241,183, 23, 98,125,157,250,
- 66,204, 4, 41, 47,196,136,151,236, 2,221, 57,196, 74,152,234, 81,244,216, 9, 0,210,226, 74,177, 82,229, 4, 98, 39, 2, 43,
-105,223,115,168, 52,104,221, 75,186,255, 49,198, 16,208,226, 66,202,193,226, 44,113,177,229,133,133,206,165, 68,139,109,228,133,
- 54,154, 50,186,165,140, 29,252,174,125, 6,246,170, 45,125,218,255, 40,253,127, 71, 91,117,173, 45,157,235, 22,148,118, 53,243,
- 74,155,230,101,164, 69,195,226, 82, 40, 75,146,224,236,153,190,126,147, 51, 83, 66,135,109,164,229, 9, 23, 32,168,104,156, 2,
- 41,254, 79,240,102, 4,104, 89,193,150,114,234,240,167,210, 57, 70, 14,249,181,114, 39, 71,169,107,205, 28, 35, 93,156, 58,252,
-208,110,109,228,249, 67,180,205,226,165,170, 11,173, 6,240,202,179, 80, 79, 93,166,106, 14,224, 88, 0,140,148, 3, 55, 0, 19,
-138,228,200,217,133,231,239, 67,149,105, 33,216, 82, 85,134, 4, 93, 56,197,102,153, 50,101,138, 13,100, 81,146, 9,187, 71, 11,
-164,104, 22,208,164,132, 60,204,174, 10,213, 26,204, 36,208,250,177,102, 83,103,167, 89,109,239,130, 73,193, 69,136,254, 5, 6,
- 74,130, 50, 74,135, 14, 29, 20, 73,185, 10,180, 10, 23, 46, 44, 0,206, 47,241,192, 95, 72, 46, 37,122, 4, 90,179,102,205, 10,
- 33,209,226, 97, 37,210,192,252, 74, 21,159, 0,212, 74,173, 90,181, 20, 9, 60,237, 61, 13,168, 14,247, 65,242,167, 0, 45,240,
-234, 34,128,234,197,241,227,199, 95, 6, 8,126, 90,183,110, 93, 69,117, 88,175, 94,189, 32,252, 14, 24, 54,108,216, 85, 72,139,
-117,129, 22, 65, 86,251, 24, 30, 74,162,141, 27, 19,213,205,221, 18, 68,150,223,147,196,144,157,163, 6,135, 0, 90,110,213, 97,
-152,117,205, 47,158,144, 51,144,197,138,217,131,167,176, 0, 90, 58, 52,205,242,243,195,108,180,140,168, 14, 7, 15, 30,236, 18,
-104, 65,205,214, 46, 4,226,177,251, 65,181, 10,221, 58,208,189,131,217,218, 17, 88,249, 62,122,179,153, 96,139,182, 90, 76, 69,
-139,151,124,192, 35,234, 84, 71, 66,218,109,179, 65, 99, 67,234, 0,173, 88,216, 1,143,129,196,196,144,123, 7,230, 99,126,148,
-217,169, 29, 72,158,108,201,252, 14,236, 94, 46,163, 6, 54,148,193,125,106,203,243,103,247, 13, 37,255,135, 87, 36,123,166,132,
-142,220, 60, 80, 42,120,115,225,172,213,210,182,113, 31,105,211,168,119,136,212,190, 73,111,233,216,172,183,204,157,186, 88, 73,
-252,206,123,204,231,217,117,180,164, 72,150,204,169,212, 4, 64,235,214,162,245, 7,165, 72,253, 65,146,163,106, 31, 73, 91,224,
- 39, 73,158,177,168,173,181,178,151,108, 44, 85,218, 78,146, 26, 29,167, 73,227, 94,115,101,194,194, 61, 18, 45,102, 92,218,193,
- 56,188,226, 38, 73,115,129, 15, 79, 93,115, 66,161,177,100,203,113,229,115,251,193,211,202,231,169, 11,215,148,207, 9, 51, 22,
- 75,132,200, 49,158,186,240,163, 21,130, 62, 22, 48, 31, 60,102, 83, 21, 82,130,161,170, 10,161,218,181,192,118,201,114,229,202,
- 21, 11, 38,113, 11,237,121,244,128, 86,158,108, 73,253,246,239, 90, 38, 35, 7, 52,144,254,189,106, 26,106, 31,182,163,210, 70,
- 25,191,118,216, 70,246, 64,139,182,141,116,189,225,136, 81,188,143,147, 88, 78,255, 87,159,249, 16, 31, 90,118,167, 14,205, 14,
-179,208,228, 63, 68,112,201, 49, 7, 21,175,114, 74,217, 30,104, 81, 69, 73, 85, 36, 65, 22,109,163,244,128, 86,196,136, 17,239,
-179, 93, 9,160,192, 79,165,157,175, 2, 76,175,136, 17,195,114,105,234, 84, 11, 84,250,138,186,152,247, 97, 67,102,129, 65,123,
-216, 3,173,170,245,103, 17,104, 85,174,209,104,174, 14, 83, 70, 81, 90,123,190, 81, 35, 89,130,117,194, 19, 39, 86,153,176, 9,
-180, 1, 45,126,239,221,187,183,178, 1,197,152,230, 28,106,127, 64,200,246, 10,130, 38,158, 46, 84,109,180,106,215,171, 1,123,
-172,186, 33,102,210, 78, 93,218, 75,183,158, 93,228,247,126, 61,101,228,152,225, 70,128,214, 94,244,187,139, 27, 55,110, 84,212,
-134,211,166, 77,187, 92,174, 92,185,151,208, 80, 4,107,141,225,199,142, 29, 27, 12,191,134, 47, 1,196,174,233, 73,180,142, 44,
-152, 27, 2,104, 17,100,209, 60,128, 32,235,143,212,241,100, 39,108,199,160, 78,126, 73,181, 33,140,225,175, 59, 49,134, 15, 77,
-127,115, 63,243,133,115, 32,172,108,180,236, 0, 84, 94,245,247, 59,188,230, 92, 26,198,255,173, 18, 45, 61,191,121, 97,198,105,
-101, 0,115, 18,212, 3, 90, 93,186,116, 17,232,240, 67, 45,209,194, 78, 44, 24,131,151,142, 2,219,134,166,244,142, 36, 90,153,
- 50,101, 58, 7, 64,117,205,172,234,144,160, 9,238, 26, 48,199,216, 14,155,217, 38, 50,222,131,109,136,226,218,129,162,112,238,
-198,105,220, 11,183, 15, 65, 86,176,229,176,248,185,179, 38,245,219,181,117,145,244,239, 81, 3, 82,171,138,202, 34,126,114,255,
- 68, 67,201,217, 34, 78,160,181,110,149,151, 12,235,191, 92,134,254,177,204, 97,154, 55,107,151, 48,105,255,159, 52,102,189, 75,
-137, 86,132, 40, 49,119, 14,153,180, 76, 26,116,153, 34,249,106,247,151,194,245, 6, 75,198, 34,255,159,204,115,151,109, 38, 53,
- 59, 77,151,186,221,102, 73,199, 97, 43,164,239,216,165, 18, 35,118, 2,167,170, 25, 2,173, 1,243,188,165, 98,183,165, 82,186,
-221, 76, 41,218,252, 79, 41, 80,127,176,228,170,209, 83,178, 84,104, 39,233,138, 55,145,111,242,215,148,133, 43, 55,187,148, 96,
-217, 51, 86, 5, 90, 84, 21,114,112, 56, 75, 48,182, 86,128, 22, 36, 69, 46, 37, 90,185,179, 38,241,219,185,101,161,120,118,175,
- 46,221,218, 87, 8,147, 54,210,150,153, 64,138,198,227,206,128, 22,253,161,193,208, 88,248,233,106, 12, 56, 3, 90,170, 58,145,
-159,174,192,152, 35,218, 86, 85,161, 83,103,165,246,167, 13,117,212,133,218, 87, 40,170, 67, 44,166,175, 9,178,120,128, 6,234,
-189, 87,205,155, 55,191,206, 4,201,201, 27, 2, 45,130, 44,216, 23, 25, 82, 29,194, 16,126, 23, 85,134, 60, 93, 72, 32, 69,213,
- 49,204, 13, 20,144,181, 52,124,120,203,149,233,211, 45,215,174, 93, 83, 0, 54,129, 24,237,247,208, 87,118,185,224,105,126,252,
- 71,117,161,114,122,211,154,248,157,247,248,223,123, 87,165,234, 13,231, 16,104, 65,178, 53, 71,103,190,242,163, 57, 0,205, 33,
-104,236,207,205, 40,129, 22,237, 90, 9,176,152,248, 93, 5, 96,180,207, 4, 61,167,237, 79,160,197,205, 40,237,178,104,143, 85,
-180,104, 81, 41, 93,186, 52,121, 42,213,170, 85, 83,236, 71, 27, 54,108, 40,224,173, 98, 63, 75, 0,167, 39,209, 66, 91,238,129,
- 77,154, 13,104, 77,158, 60,249, 10,164, 87,138,202,176, 70,141, 26,193,252,206, 79,254,254,241,199, 31,223, 98,174,243,209, 3,
- 90, 84, 23,170,146,172,142,177,194, 73, 87, 72,178,122, 39,141,201, 19,178,202,124,201,185, 19,243,179, 80,146,229,194,189, 67,
-104,150, 2,247, 51,255, 98, 14,160, 11, 42,128, 73,147,180,167, 11,249,159,122,234,144,223,213,188, 52, 7, 32,186,210, 62,171,
-253, 95,165, 97, 79, 43, 98, 40, 88,169,198, 58,212,170, 16,117,201, 92,160,237, 4, 65, 5,212, 47,239, 25,195, 67,236,175, 12,
-102,186, 37, 24, 56,112,160, 34,182, 6, 69,195, 42, 57, 12,214,130, 13, 58,213,151,241, 91,198, 73,254,226,249, 30,227, 89,173,
- 79,173,175, 0, 36, 26,165,254, 54,213,134, 82, 85,139, 60, 47,245, 99, 97, 79, 87,165, 13, 99, 99,248, 59, 4, 84,216, 21, 75,
-134, 12, 25, 28,158, 16, 83,141,129,249, 63, 13,226,169,242,161,100,203, 89, 25,115,101, 73,226,183,101,253,223,210,173, 93,121,
-105,219,188, 68,152, 44,226, 4, 90, 35,135, 79,147, 76, 25,242, 74,134,116,185, 29,166, 98, 69,202, 11,147,246,255,198,245,127,
-115,109, 12, 31, 33, 82,207,154, 77,187,190, 26, 51,123,179, 20,105, 48, 68, 10,215,233, 39,223,100, 47,101, 3,155, 25,242, 86,
-144, 26,237,254,148,198,189,231,203,176,153, 59,164, 86,243,238, 47, 97,111,197,211, 26, 14, 47, 2,173,167,150, 87,242, 40,224,
-133, 60,122,106, 81,128,214,195, 39,207,228,193,227, 0,185,255,232,169, 2,180,174,222,184, 35, 23,175,222, 8, 21,208,162, 61,
- 14, 37, 24, 56, 64,160,156, 50,163, 63, 37, 46,180,216,165, 91, 96,255,166, 44,182, 88,204,117,129, 22,219,104,243,250,185,210,
-181,109, 57,249,181, 89,209, 48,105, 35, 43, 67, 18, 2,228, 45, 7,216,120,202,113,228, 0, 72,225, 86, 66,229,127, 30,130, 8,
- 13,208,178,247,171,229, 10,108, 57,106, 36, 26,191,179,129,217,239,121, 10,150, 11, 37, 55, 17,170,211, 82, 74, 35,212, 83,177,
-148,186, 25,116, 94,170,190, 42, 83,169, 82,165,158,208, 22,145,134,239,180,201, 34,184, 82,237,118,120,178,143,146,172,111,191,
-253,214,168, 49,188, 39, 54, 66, 1, 40,167,114,232,129,135, 32,120, 0,130,146, 44,130, 44, 74,182, 30,195,110,139,109, 79, 48,
-134, 83,209, 79, 96, 27,229,116,254, 0,175, 78, 81,210,168, 58, 41,101,121, 88, 87,130, 2, 84,224,136, 61,191,208, 62,137,250,
- 12,157,117,100,179,247,211,183,217,115,230, 27,161, 7,180,104,188, 14,115, 8,129, 90,243, 61,192,165, 2, 44,170,251, 32,225,
- 17,184,186,208, 5, 90,244,147, 85,167, 65, 45,216, 99,213,151,159, 91, 53,145,214,109, 91, 74,251, 78,109,164,115,183,142,210,
-227,247,110,210,231,143,223,101,192,224, 63,100,232,240,193, 50,110,194, 24, 35, 64,107, 55,164,127,138,234,112,213,170, 85, 23,
- 81,206, 43, 56, 13,172, 0, 45,126, 66,205,201,211,193,202,111, 0,185,183, 56, 93,238,131,185,199,165,141, 22,219, 86, 85, 23,
-170, 32,171,255, 55,241, 21,144, 69, 62,243,127,204,217,207, 97,251, 53,205,133,195, 82,221, 5,202,157,193,205,129,127, 24, 7,
- 66, 21,235, 48, 13, 42,177, 21,250,121, 5, 72,208,237, 0, 79, 33, 81,186,197, 83,135, 60, 41, 71,187, 44,250,106,193,169, 18,
- 78, 16,219,144,248,140,209,235,171,188, 69,115, 63,152,121, 96,146,180,232,221,132, 3, 79,117,126, 73,144, 53,179,235,168,150,
-178,241,250, 12,197,239,214,172,221,195, 62, 25,208,162,183,117,170, 49, 9,162,140, 0, 45,230,225,228,204,231,156, 85, 60, 71,
-230,196,126,235, 86,206,148, 54,205,138, 73,227, 58,249,195,100, 17, 39,208, 82, 23, 43, 46,142,174,124,157,133,208, 45,224,135,
-142, 11,129,168,240,113,229, 51,100,202, 74,233, 60,108,177, 20,170,217, 93, 14, 28,242,178,145, 56,120,216, 91,170,182, 26, 38,
-125, 38,108,148, 1,147,214, 72,244,216,241, 92,186,119, 32,208,242, 15,116, 13,180,124,110,250,202,133,247, 61,193,187,236, 71,
-224,183,162, 58,164,193, 59, 50, 58,149,104,209, 80,154,167, 14,245, 36, 90,108,163,181, 43,102,200, 47, 77,138, 72,163, 90,121,
-194,164,141, 80,174, 28,240,103,244,128, 99,135,125,234,214,173, 91,246,253, 36, 7,236,107, 30,240,212, 21,255,167,223, 38,156,
-106, 51, 37,209,210,128, 44,229,164, 28, 64,145,114, 10,209, 25,216,114,196, 84,184,115,184,192,190,228,200,237,196, 7, 56, 47,
- 85, 94, 5, 73,175, 23,129, 11, 93, 56,240,192, 7,165, 59,156, 67,180,234, 66,158,226,229, 33, 16,156, 36, 53,228,222, 1, 82,
-144, 91,108, 87, 2,106,130, 44,170,141,217, 15, 32,153,177, 60,188,119, 79, 1,215, 0, 74, 22,188, 71,207,189, 67,100, 24,215,
-191, 34,144,212, 58, 40,229,119,222,171,146, 39,188,180, 40, 29,249, 89,211,210,113, 30,148,175, 82,111, 14, 36, 89,115,251, 12,
-159,125,100,253,225,135, 47,199,206,220, 76,247, 14, 85,116, 38,187, 91, 11, 22, 44, 16,216, 54, 41,126,194, 32, 25, 82,220,224,
-144, 7,252, 84, 1, 22,231, 79,128, 14,197,214, 10,244,156,170,225, 41,157, 26, 58,116,168, 2,200,160,222, 83,202, 76,127,127,
-156,163, 57, 39,115,243,203,121,185,115,231,206,138,125, 22,129,156, 1,137,214,110,170, 12, 49,143, 95,236,214,173,219, 69,156,
-160,190, 2,219,172,151,144,140,189,133,173,215,155,178,101,203,222,228, 39,192,226, 91,248, 16,124,137,141,181, 33,160,165,170,
- 11, 41,201, 34,200, 26,156, 46,177, 2,178, 84,160,165,177, 69,212, 11,209, 99,116, 61,113,231,115,115,224,115,115, 32, 84, 18,
- 45,181,208,245, 49, 88,239, 77,159, 62, 93,241,159,197, 9,147,158,211,249, 27,162,100, 9, 31, 62, 60, 13, 77, 27, 58,169,161,
- 75,135,102,152,168, 38, 78,218, 60, 76,166,110, 27, 33,223,126,247,237, 30,168, 48, 50, 96,103, 55,181, 55, 78,229, 17, 96, 77,
- 92,231, 41, 13,218, 85, 19, 59,137,214,123, 52,157,168, 14,207,155, 80, 29,218,104, 82, 50,197, 69,199,168, 68,139,106, 15, 46,
-144, 14, 36, 90, 54,154,217, 51, 38,186,183,105,221, 2, 25,236,249,171,120,246,106, 36,129, 79,125, 13,169, 13,169, 94,180, 83,
- 29,218,104,130, 79, 55, 41,109, 60,131, 69,149, 11,153, 86,183,237,234, 59, 17,147, 29,208,114,212, 70,133, 18,167, 72,243,120,
-224,196,229,210,119,204, 98, 41, 85,171,173, 20,169,210, 90,138, 85,111, 35, 21,234,117,146,190,227,150,203, 31, 19,224,143, 43,
-101, 90, 74, 34, 29,121,135,183,209, 36,208,122, 18,240,210,185, 68,171, 88, 19,185,114,253,182,140,135, 75, 7,187,144, 59,246,
- 93, 42, 68, 57, 9,180,104, 20,205, 83,133, 52,120,231, 34, 75, 85, 18, 85,133, 60,214, 79, 67,105,245,116, 26,248,100, 65,223,
-114,164, 58,212,180, 81, 66, 91, 27,245,235,209, 48, 76,218, 8,106,194, 5,108, 27, 2, 44,130, 9,216,183, 80, 98,101, 59,161,
-201,255,185,137, 97,255,161,100,116,246,236,217, 4, 90,142, 78,112,218,202,105,175, 22, 36,168,162, 95, 45,130, 44,130, 23, 26,
-157,131, 22, 79,246, 81, 93,245, 94, 92, 68, 13, 83,109, 52,209, 31, 54, 58,139,113,200,163,249,206,156,151, 58, 80, 33, 58,116,
- 88, 74,144, 1,111,237, 60,222,255, 16,199,252, 95, 3, 0, 5,115,220,192, 56,252, 45,164, 99, 79, 8,178,168, 66, 67,217,140,
- 58, 44, 45, 15,103,164,247,169, 30,100, 59,211,102,139,146,204, 62,125,250, 88,176,233, 81, 36, 89, 4, 89, 88,204, 57, 55,149,
-119, 48, 55,169,229,140, 2, 85,228, 75, 74, 95,232, 43,144,115, 27, 37,118, 4, 9, 28, 91, 13,139, 70, 80,156,148,182,175,158,
- 84,168, 42,100,162, 36,139, 32, 11,210,172,137,118,222,225, 29,213,189, 17,250,169,133, 32,136,245, 35,176, 34, 40,162,211, 99,
-128, 91, 69,138, 69,128, 69, 67,118,212,135, 39, 50,185,105,128, 79, 83,219, 21,130, 38, 65,211, 24,156,220,107,209,250,103,105,
-211,254, 23,233,216,185,189,116,237,217, 89,122,245,233, 33,158, 56, 81, 60,104,232, 0, 25, 62,106,168,140,249,115,148, 76,152,
- 60, 94,166,253, 53, 69,215, 97, 41,218,112, 55,234,123, 17,253, 71, 73, 24, 63, 23, 1, 94,175, 65,205,235, 3,181,108,136,196,
-123,224,243,101,244, 9,158, 20,215, 94,182,114, 18, 64,237, 24, 55,242, 61,117, 33, 1,214,159,185,211,202,228, 66, 25,101,207,
-176,190,246,135, 62,232, 65, 94, 13,189,163,210,253, 24,206, 48,221, 52,195, 22,138,124, 12,126,134,109, 9,191, 48,106, 60,126,
- 60, 21, 78,229,130, 41,254,167, 67, 79, 72, 84,104,199, 64, 39,115,142, 66,155, 24, 26, 44, 88,252,114,215,106,249, 99,240,186,
-107,179,100,194,250,254,210,184, 83, 77, 25,189,236,119, 5,100, 13,157,215, 77,146,167, 76, 62, 23,121, 82, 57, 27,212,234,125,
- 76, 22,109,175,221,121,250,158, 49, 60, 65,133,193, 83,135,182, 14, 67, 91, 43,248,225, 9,162,152,155, 39,166,248,201,221, 45,
- 39, 99, 46,138,170, 83, 81,170, 66,184,128,210,231, 78,191,126,253, 28,217,104,217,104,102,203,152,112,106,249, 82, 89, 95,250,
-249, 94,147, 39, 15,125,100,203,154, 63,101,201,236,158, 46,211,170, 5,125,165,114,153, 76,175,242,102, 79,122,194,209,196,139,
- 5,123, 31,252,222,188,118,100, 75,102, 47,193,210,254,198,241,237,215,152, 12,225,169,192,241,100,254,255,219, 17, 10, 71,137,
- 22,251,102,205,166, 93, 94,247, 27,187, 24, 70,239,187,101,226,162, 61,138, 77, 86,237,159,187,189,142, 17, 59,222, 77,143, 8,
- 17, 10, 59,233,199, 33,128, 86,181,190, 27, 97,163,181, 68, 99,163, 53, 72,114, 85,135,141, 86,249,182,146, 14, 64, 43, 99,177,
-250,210, 22,167, 13, 35, 69,141,233, 42,204, 75,136, 65, 77, 7,164, 80,113, 41, 42, 66,173,170,144, 11, 45,109,120, 24,150,133,
- 96,131,210, 44,230, 3,191, 28, 57, 44,253,168,109, 4,208,116,146, 7, 49, 40, 9,134, 61, 82,176,117, 23,111,243,164,143, 58,
-156, 36, 48,226, 34,143, 48, 87,193, 86,251, 45,151,158,246,237,193,147, 42,209,162, 36,139,180, 32,217, 81, 92, 62, 24,144,104,
- 25,154, 36, 25,122,135,253,135, 18, 83,130, 15,170, 20, 57, 46, 56, 14, 28,168, 16, 29,209, 84, 66,240,192, 25, 41,213,112, 74,
- 8, 30,142, 73,250,161,179, 26,190,103, 2, 31, 24,158,199,108, 8,158, 50,168,227,109, 72,213,159, 82,162, 5,144, 96,193, 6,
- 67,113,243,209,181,107, 87,127, 72,170,110,131,102, 25,157,254, 25, 25, 64,235, 21, 55,144,220, 88,217, 59, 41,165, 68,235,231,
- 82,145, 44,141, 75,197,121, 80, 1, 6,240,229,171,214,159, 77,117, 33,230,164, 26,152,115, 18, 56,155,151,192,151,200,152, 31,
- 11, 32, 79, 83,124, 14,194, 9,192, 59,180,191, 35,224, 26, 62,124,184,160,124, 2,215, 9, 2,227,114,201,157, 59,183,160,172,
-116, 56,203,200, 5, 9, 93,205,117, 4, 90,112,179,160,216,195,170,106, 71,126, 98,254, 81, 18,191,243,191, 1, 3, 6, 8, 37,
- 95,116,185,163, 23,130, 7,229,163, 91,157,139,216,176, 93, 68,223,185, 8, 27, 44,170, 15,157, 38,130, 49, 93,160, 53,118,184,
-244, 78, 30, 75,250,167, 73, 96, 83, 23,178,207, 76, 41,148, 73,102,148,200, 33,123,223, 7, 90,142,154,201, 80,255, 52,185,142,
-186,105,154,100,152, 78,246,143,193,207,176, 45,225, 23, 74,173, 32,116,234, 12,187, 18,128, 84,196, 64, 29,116, 27, 2,147, 81,
-247,118, 3,154,216,212,132, 91,110,205,146, 63,254,234, 40,176,207, 90, 0,250,246,177, 16,249,202,247,104, 98, 1,203, 8, 58,
-237, 85,215, 14,170,123, 7, 19,167, 14,181, 52,195,234,212, 97,136,114, 66, 50,181, 33,111,246,228,193,121,115,164, 12, 2,240,
-114,154,112,202,240, 45,165, 88, 76,118, 32,203,190,238, 49, 0, 30, 14, 80, 58,101, 38, 89, 65, 86, 12,125,160,165,228,136, 26,
- 41, 74,204, 94,209, 99,197,219, 19, 53, 70,236,187,209,144, 98,198,249,122, 15, 0, 88, 47,254,231,162,253, 67, 0,173, 43,119,
-158, 42, 64,235,210,205,135, 82,246,215,137,114,249,198, 61,169,217,126,140, 92,187,229, 39, 63,119, 29, 41, 55,110,251, 73,222,
-162,229,131, 34, 70,139,205, 35,238,206, 46,123,137,214, 4, 24, 6, 63,163,235, 6,130, 41, 38,218, 98,169,192,138, 82, 44, 58,
-181,228, 39,243,129, 87, 46, 67,240,240,165,255,111,163, 20, 97,210, 70, 56, 33,151, 11,134,216,167,145, 46, 3, 76,172,199, 43,
- 82,104, 43,199,255,113,255, 52, 84,102, 14,255,119,212, 70,142,164, 84, 54,191, 90, 86, 73,150, 65, 27, 45,221,177,201,247, 19,
- 76, 57, 83, 43, 58,136,127,104,132,102, 88, 6,149,142, 11,251,171,254,224,223, 62, 72,131, 30, 50,129,159,251, 80,255,254, 40,
-186, 43,223, 84,182,114,210, 17, 41,189,211, 83,189, 75,233, 35, 1,129,170,134, 7,141,247,108,180,140,244, 79,128,235,244,160,
-229, 9,192,127,150, 52, 1,224, 94, 64,146,181, 15,206, 86,215, 65, 58, 24, 76, 7,207,148, 98, 1,136,115,179,138, 3,137, 78,
-221,217,132,224,231,199, 8, 42, 13,137,219, 66, 72, 82,207, 2, 56, 95,164,155, 7,109, 82,165, 92,218, 79,216,196, 93,196, 51,
-155,237,248, 16, 66,162,181,193,179, 7, 92, 56, 12,194,233,194, 1, 54, 91, 60,246,161,189,195,250, 41, 32,107, 79,255,110,186,
-110, 76, 28,205,243, 6,214, 27,189, 44, 70,250,167, 30, 13,251,255,221, 52,205,114,204,157, 63,204, 57, 96,168, 19, 2, 40,212,
- 73,243,253,183,123, 75,254, 88,248, 89,250,140,223, 29,196,111,234,237,181, 1,112,181, 5, 51, 68,211,164,195, 82, 67, 52, 77,
-114,199, 77, 19, 12,251,191, 31,173, 84,240,163,149,220,230, 71, 43,106,236,132, 23,224,160,244, 66,228, 24,241, 46, 68,138, 26,
-251, 98,100,215, 32,139,172,183,231,103, 60, 76,248, 19,176, 88, 93,165,235, 6,218, 96,169,137,106, 66, 53, 81,146,101, 5, 89,
- 46,131, 74,155,108, 91, 87,217, 63,106,187,135,225,169, 67, 67,229,164,122,208,153, 90, 17,255, 57, 93,112, 63, 3, 63,191,194,
- 59,153,140, 92,218,186,155, 62,117,232,228, 5, 54,154, 80, 41, 70,161,205, 41, 82, 51, 72,140, 58, 35, 53, 65, 95, 77,108,125,
- 46, 15, 62,215, 88, 19,191,127,182,190,100,125,113, 52,148,109,145,125,188, 67,103,191,177,105,216,129,231, 66,108, 24,180, 99,
-147,193,195, 41,185,213, 75,214, 32,227,159,187,238, 70,250,138, 94, 30, 67,227, 72,143,136,221,255,255,101,154, 38, 89,245,143,
-202,110,239, 71, 75,223, 83,124, 24, 21,255,191,220, 97,220,117, 15,163, 78,100, 37,227,230,167,155,159, 97,197, 1,119, 95, 10,
- 43, 78,190,163,227,230,167,155,159, 97,203,129, 47,147,154, 27,104,253, 3,118,142, 97,209,117,220, 19, 90, 88,112,241,255, 52,
-220,252,116,243, 51,172, 56,224,238, 75, 97,197, 73, 55,120,251, 47,247,165,176,237, 69,159,150,154,253,169, 67,254,182, 93,108,
- 84, 71,201, 76, 17,157,209,112,117, 95,143,190,155,166,227,118, 9,109,123,185,249,233,230,167,209, 62,224, 30,155,206, 57, 96,
-148,135,218,124,110,126,186,249,233,136, 3,255,229,190,164, 55, 38,220,255,155,224,192,127, 25,153,187,235,110,162,163, 24,200,
-234,230,167, 1, 38,153,200,226,230,167, 9,102, 25,200,234,230,167, 1, 38,153,200,226,230,167, 9,102, 25,200,250,165,240,211,
- 64, 85,254,177, 89,220,170, 67,157,166,249, 82, 58,161,187,156, 97, 59,198,220,252,116,243, 51,172, 56,224,238, 75, 97,197,201,
-119,116,220,252,252,111,242, 51,108,107,253,105,169,125, 56,208,138,145, 56, 99,166,175, 83,103,159, 29, 47, 69,182, 19, 76,252,
-206,123,255, 81, 0, 19, 13,245,174,143,227,218, 91,112,186,237, 41,190,119,114,192,135,127,195, 68, 17, 27,245,170,133,196,227,
-242,213,145,162, 27,236,183,134,234, 94,204,195, 35, 66, 29, 15,143, 54,240,208,120,131,137,223,121,207,201, 59, 12,209, 52, 88,
- 62, 53,219, 39,161,233,217, 62,105,193,221, 27,234,111,224,167,163,242,121,118, 78,154,224,224,230,218,227, 6,183, 73, 22, 63,
-140,234, 30, 11,167,198,166,241, 20, 38, 62,175, 35,205, 4,221, 56,118,180, 63, 73,221, 77,182,135,163,236,238,114,134, 1, 19,
- 53, 36,220,252,116,243, 51,172, 56,240, 49,250, 82, 88,149,237,115,208,113,105,163,229, 1, 71,127,197,172,222,196,177,206,189,
-127,197, 75,149,181,121,190, 18, 53, 46,110,221,115,244,210,153,139, 55,239,156, 56,119,221,103,197,250, 61,222, 89, 10, 84, 56,
-199,255, 92,212,200, 85, 67,124, 5,175,242,117,225,172,111, 1,210, 73,107, 90,192,123,160,231,234,152,118, 8,154, 88, 76,118,
- 51, 28,141,153,132,103,156,122, 54, 54,208, 58,181, 83,165, 74, 21,200,248,101, 12,163, 1,231,166,244,180, 78,231,136,246,151,
-211,186,199,139,151, 54, 86,140,164, 89,250,198,249, 38,247,190,216,201,179, 4,196, 74,158, 57, 32, 86,202,220,251, 98, 36,205,
-236,201,255, 76,240,147,254,172, 46, 33,209,209,103, 87, 3,101,119,185,144, 53,206,233,241,166, 94, 54, 15, 97,106,146,203,227,
- 45,156,183,110,133, 67,200,157,136,133,182, 19,129,195,119,198,138, 21,107, 19, 8,116, 65,250, 78,231, 93,134, 6, 32,129,213,
-248, 31,126,120, 27,176,106,149,248,117,234, 36, 61, 99,199,126,195,123,161, 0, 27, 95, 69,138,228, 81, 59, 89,178,136,127, 39,
- 77, 26,241, 92,178,164, 17,207, 39, 79, 26,113,126,164, 72,225,235,129,150, 35, 95,108,234, 43,140,148,179, 62, 50, 51,134, 39,
- 19,191,235, 93,239,209,236, 88, 62,201,134,195,219, 6, 7,242,211,209,195,189,127, 77,211,249,192,182, 46,215,248, 25,138,186,
-219, 63, 18, 29,238, 44,174, 33, 14,224, 27,134,245, 97,130,131,208,183,184,119, 3, 25, 9,156,205,212, 93,175,174,134,251, 60,
- 50, 70,141, 16, 46, 92,151,232,145, 35,111,137, 18, 33,194, 61, 38,126,231, 61,254,103,162,207,155, 45,147,203, 62, 31, 22,196,
-172, 52,140,244, 37,179,175,115,211, 52,203, 49,215,249,221,252,252,135,243, 83, 15,139,132,109,241, 63, 49, 53,130, 44,190, 82,
-253,212,190, 62, 70,162, 12,153, 11,148,170,121,222, 63,192,242,194,199,231,246,227,223,218, 12,218,210,178,195,200,149,163,166,
-175, 93,191,235,208,217,131,153,242,149, 61,195, 60, 38, 23,136, 84,112, 20,232, 13,160,242, 26,139,184, 18,192,149, 94,173, 17,
- 44, 86, 16,196,244, 5,255, 3, 61,123,143,240, 14, 23, 8,250,107, 57,191,125,179,220, 58,113, 84,174,123, 29, 18, 56,169, 84,
- 2,227, 50,157,217,184, 86, 78,172, 94, 46,199,150, 45, 82,188, 90, 51, 49, 96, 46,194, 95,220,177, 43,175,209, 1,152, 44, 75,
-150, 44,175,200, 39,134, 20, 97, 76, 49,120,203,103,108,185,182, 14,234,239,144,102,140, 68,233, 74,196, 74,158,253,126,243, 30,
- 19, 95,175,219,191, 73, 78, 95, 61,134,116, 81,150,108, 61, 43, 77,186,252,249, 58, 86,242, 28,247,153, 71,143,159,112,204, 88,
- 0,206, 99,109, 78,223,145, 95, 16, 28,248,153, 54, 1, 16, 62,211,166,148, 41, 83, 62, 67,240,222,203,240, 97,147,203,209,130,
- 75,128, 37,103,230, 43,233,247,162, 30,244,222,125, 16, 47,216,169, 38, 56, 4,221,137,184,104, 59,171, 86,173,186, 19,207,187,
-138,243,102,136,159,148, 98, 17,100,193, 45,186, 72,177, 98,114, 22,117,224, 61,189,186,219,253,159, 38, 73,146,136,199, 70,142,
-104,249,106,213,170, 89,178, 97,195, 58, 89,191,126,173,172, 92, 49, 83,198,142,105, 3, 47,248, 17, 79, 33,255,247, 38,104, 82,
-162, 54, 8,105, 52, 18, 37,151, 23,212, 88,159,252,110,189, 55, 26,192,101, 20,190, 59,146,190,217,234, 78, 9, 86, 39,128,171,
-159, 42,252, 32, 1,254,119,132,159,252,173,149,108,149, 79,155, 54, 86,187, 31,179,221, 63,237,245,119, 16, 63,249,219,104, 95,
-178,203,167,248,145,194,134, 99, 18,156, 74, 42, 65,128,213,139, 99, 98,206,156, 57, 65,232, 51,179, 28,181,187, 19,222,164, 71,
- 29,175,195,111, 82,136, 64,241, 9,179, 87, 47,148,177, 72,163,126, 9, 50, 87, 45,102,162,156,249,162, 70,138,116,107,203,226,
-201, 65, 15,111,156,148, 87,207,253,196,255,210, 81,185,117,246,160,204,153, 58,250, 77,228, 8, 17, 24,223,207,145, 71,124,190,
-194, 80, 95,114, 82, 7,103,183,221, 52, 77, 50, 76, 39,187,155,159,110,126,134, 9, 7, 92, 97,145, 48,121,193,231, 36,162,141,
-141,103, 95,142, 4,169,178,207,219,180,211,235,130,207,181,219,143,206, 29, 63,231,219,174, 89,239,213,191,252, 50,112, 65,163,
- 14, 99,167,140,153,181, 97,222, 95, 11,214,175, 97, 30, 19, 11, 89, 42,128, 19, 63,132, 77, 81, 2,140, 34, 62,157, 48, 60, 5,
-227,188,205,154, 53, 75, 16, 79, 75,230,224, 51, 69,242,228, 4, 67,142,192,150,189, 68,203,239,214,137, 99,210, 62,166,135,146,
- 24, 42, 71,141, 28,175,222,227, 39, 67,233, 48, 17,108,125,247,221,119,161, 5, 90,181, 58, 65,242, 66,126, 65,186,227,143,242,
-117, 71, 74,110,180,238, 4, 80,223,228, 40, 97,217,116,248,168,220,125, 28, 40, 55,238,249,203,238, 19,103,101,255,217,251,114,
-240, 2,191, 95,144, 89, 43,231, 75,218,156, 69,159, 71,255, 58, 93, 57, 87, 11, 25,192,226, 37,196, 34,147, 69,139, 22, 41,137,
-128,213,200,197, 80, 35,112,168, 72, 41,152,122,217,248,105, 15,180, 16,251, 45, 4,208,130,116,100, 39, 60, 93,239, 68,108, 65,
- 2,173,177, 46,250,172,161,137,151,160,138,146, 44,130, 44, 32,253,208, 0,173, 52,185,115,167,190,127,207,111, 47, 36,139, 83,
- 4, 1,156,233,113, 90, 73, 12,208, 59,121,210,159, 8, 21,115, 68,138, 20,249,238, 1,202,154,222, 32, 48, 24,196, 56,158, 0,
- 43,140, 95,121,187,104,209,162, 65,236, 51,127,254,249, 39, 37,151,111, 1, 60,110, 51, 56, 50, 28,135,242, 61, 4, 91,246,151,
-173,238, 84, 23, 82,146, 69,144,197,139,159,252,205,251, 84, 19, 82,130,213,178, 98,142, 7,163, 7,116,146, 87, 47, 3,100, 84,
-255,142,210,188, 98,206, 7,188, 79,117,162,163, 54,242,168,181, 36,124,214, 50,158, 8,213,226,169, 74,234, 8,176,248, 93, 73,
-137,147, 38,187,163, 13, 48,206,113,198, 24,126,140,131, 8,169,177, 22,196,186,106,163,244, 8, 38,252,128,116,224,253,253,158,
-182,130,217, 74,253, 60,224,201,211,103, 79,187,244,159,188, 56, 97,166,106,217,236, 42,239,136,102,190,194, 5,114, 7, 4,248,
-158,151,103, 23, 55,203,235,128,109,242, 58,112,187,120,255, 81, 79,142,142,108, 39,175, 44, 62,114,235,234, 73,201,144,238, 59,
- 70,155,200,107,176,141, 62,116,186, 52,212, 63, 77,190,196, 77,211, 36,195,116,178,187,249,249, 31,228,167, 43, 44, 18,182,236,
-248, 12,212, 92,161,200,120, 41,179,158, 57,113,206,231,102,135, 95, 7,110,252,173,121,159, 85, 61, 59,143, 92,220,119,192,244,
-121,253,198, 45,157, 62,108,202,234,201,219,246,158, 92,202, 60, 6,139,253, 21,165, 85, 12,220,202,144, 23,148,100, 49, 52, 3,
- 3,238, 34,214,155, 18,172,186, 87,151, 46,242,215,248, 63,101,198,132,241, 92, 24, 40,217,114,233,237,153, 18, 45, 74,178,180,
- 64, 75,141, 28,111, 15,180, 8,236,184,104,194,211,181, 61,208, 50, 88,124,143, 92,213,171, 87, 23,198,123,196, 66, 78, 73, 86,
- 1,163, 15, 82, 37, 24, 39, 85,214, 7, 27, 15,237,148, 53,251,102,201,214, 35, 91,228,246,195,151,114,241,118,160,236, 56,249,
- 72, 6,205,156, 35, 63,181, 47, 35,189,135,183,144,177,211,251, 75,226,239,179,248,199,141,251,173, 86,213, 19,226, 85,144, 74,
-221,101,108, 54,198,210,163, 52,144, 60,100,252, 56, 6, 39, 62,118,236,152, 32,254,155, 18,231,241,192,129, 3,130, 32,177,210,
-188,227, 31,210, 4,177,214, 24,192, 23,241,221,238, 58, 42, 55, 85,135,157, 10,122, 40,210,172,254, 21,227,191,196,243, 7, 9,
-174,152, 32, 9,220, 9, 90, 4, 88, 4, 25,122, 64,203, 16, 91,168, 38,236, 25, 39, 78, 16, 37, 89, 76,157,190,250, 42,200,133,
-234,208,158,230, 87,137, 18, 69, 60,254,224,254, 30,121,252,112,170,172, 90,254, 13,130,242,126, 69,201,172,146, 34, 68,248, 74,
- 22, 47,204, 34, 79, 30,207, 70,172,202,195,146, 36, 73, 36,246, 81, 87,106, 68,149,254,232,106,213,170,201,142, 29, 59,132,129,
-154, 25,211, 15,241,243,228,175,191,254,146, 5, 11, 22,216, 98,226,245,234,213,139,239,161,212,203,233, 69,201, 21,213,133, 90,
-137, 22,127,243, 62,109,178,168, 46, 60,117,100, 94, 16, 65, 22, 47,126,158,196,111,222,231,255,206, 8,143,155,191,175, 66,197,
- 22,163,127, 77,154,171,101, 78,107,157, 24, 69, 1, 41,109,228, 36,201,191,177, 16, 32, 81,101, 72,240,205,177,189,113,227, 70,
- 89,190,124,185, 32,132,139, 67,105, 33,164, 96,173, 96,199,117,135, 9,225,108, 6, 1, 80,222,165, 20,143,151, 10,180, 84, 73,
- 86,162, 44, 85, 58,173,219,122,224,144,239,189,135,247,243,148,111, 61, 34, 78,246,170,113, 92,176, 32,106,180,200,145,111, 61,
-187,123, 65, 30,239,155, 40,175,159,156, 3,197, 32,121,251,250,134,236,238,240,163,172,109, 80, 76,246,143,236,140, 57,224,182,
- 92, 62,119, 66,162, 68,140,120, 29,180, 34, 27,234, 60,238, 76,110, 14,184, 57,240,175,227,128, 43, 44,130,201, 35, 55, 82, 37,
-107,202,143,207,124,214,239,252, 84,255, 43,173,201,195,188,246,191,181,121,249,191,246,183,246, 59,233,231,177,210, 42,143, 79,
-103,246,179,218, 54, 80,109,180,180,182, 90,255,255,223, 85,229,226,167,202,190,255,232,233,171, 87,186,122, 78, 95,113,225,188,
-207,213,113,127, 46, 89,250,215,194,205,139,110,251, 61,188,188,124,243,225, 57,219,247,159, 90,192, 60, 70, 90,156,246, 87,211,
-166, 77,123, 67,192, 67,144,197,139, 11, 25,129, 1,131,162,118,239,212, 81, 58,253,220, 84,218,212,174, 33, 11, 39, 77,144,198,
- 53,171,191,176,218,108, 57, 37, 79,160, 69,213,136, 42,201,210,130, 43,190,131, 82, 44,190,175, 87,218,196,226,153,227, 59, 57,
-240,247,140, 15, 1, 90, 30,136,167,182,126,254,252,249,178, 10, 42, 47,168,225,252, 81, 48,103,106,211, 16,101,166, 77, 86,183,
- 49,191, 7, 29, 62,187, 67, 58,143,169, 42,107,246, 44,145, 39,207,222,200,137,171, 1,178,243,212, 35,169,215,233, 71,169,211,
-161,174, 84,106, 86, 81,134, 79,232, 34,141,219,215, 9,138,149, 36,203, 0,103, 21, 7,208,242, 35,152, 90,183,110,157,172, 92,
-185, 82,145,176, 80, 42, 4, 21,145, 76,156, 56, 81, 96, 91, 37, 3, 7, 14, 84,192, 43,131,204,166, 76,147, 73, 1, 32,148,214,
- 0,104,249,185,104,175,131, 0,110, 7,161,198, 85, 18, 2,205, 42, 82,172,118,237,218,237,108,209,162,133, 2,180,172,105,172,
-145, 54,119,149, 7,250,203,136,121, 99,198,188,187,119,197,138,224, 33, 13, 26,188,205, 31, 43,150, 79, 49,231,198,240, 33, 72,
-209, 38,107,238,156,246, 47, 95, 60, 63, 38,151,206,103, 64, 74, 39, 61,187,127,109, 3, 90,191,117, 74, 41, 62, 87, 74,200,245,
-171, 21,197, 18,184, 31,170,222,174,175,162, 71, 15,223,196, 64,153,163,133, 11, 23,238,102,143, 30, 61,130,201, 67, 74,178, 84,
-144, 69, 62, 83,138,136,207, 96,196, 41,188, 9, 90, 84, 45,234, 94, 84, 23, 82,146,213,185,114,210,189, 0, 80, 19, 39,123,166,
-201, 76,137, 21, 37, 87,109, 42,103,187,111,147,104, 65,178, 5,137,214,125,222,119,102, 24, 95,172,152,103,132,165,219,207,151,
- 89,179,255,230,239,205,251, 44,156,154, 36, 95,171, 1, 30,223,230, 34, 32,143, 24,229,251,159,154, 23,175, 80,247,241,230,205,
-155, 21, 21,249,241,227,199, 21,160,197, 50, 67,221, 27,132,177,164, 85, 29,218,202,141, 16, 44,119,184, 1,225,120,201,159, 63,
-255, 51, 2,115,142, 25, 94, 80, 69, 43, 18, 45, 85,146,213,217,115,226,226,180, 5,234, 15,190,114,253,246,173,205,187,189,188,
-191,206, 82,181,188, 51, 6,208,254,106,219,250,249,111,223,190, 58, 45, 65,175,175, 72,224,205, 83,114,114, 88, 51, 57,208,171,
-174,188,120,118, 28,233,156,248, 63,190, 32, 99, 75, 23,144,137,117,107,202,144,214,173,222,128,247, 29,117, 25,234,206,224,230,
-128,155, 3,255, 74, 14,232, 0,173, 74,234,250,131,249,185, 39, 65, 16,127,171,192, 74,253,174, 89,163,148,255,236,127,107,239,
-217, 63,171,165,201,119,240,217,130, 5, 11, 46,192,125,103,230, 39,218,118, 80, 79, 29,154, 15,189, 19, 55, 69,214,193, 11, 87,
-109, 59,185,109,255,105,175, 17,147, 87, 45, 12,120,246,252, 73,160,229,165,255,158,195, 23, 86,157,186,120,115,195,216, 41,127,
-175,103, 30, 35,173, 78,195,119, 74, 97,124,124,124, 20, 27, 42,130,172,163, 71,143,202,161, 67,135,164, 91,135,246,210,161,105,
- 99,249,165,122, 21,105, 81,166,184,244,111,218, 80,198,244,236, 70,169, 22,131, 75, 59,189, 8,180, 72,203,153,186,144, 11, 6,
-211, 31, 57,191,151,161, 69,115,201,193,249,179,204, 2,173,170,216,229, 31, 68, 1,122, 91, 11,145, 58,121,242,228,247, 97,171,
- 36, 11, 23, 46,148,152, 49, 99,158,195,253, 40,122,245, 79,154, 61,187,215,170,221,139,101,214,218,209,178,106,215, 74,185,116,
-199, 34, 71, 47, 63,149,173,199, 31,202,162,221,119,101,236,170, 27,210,115,246, 37,249,117,194, 41,105,220,165,169,244, 26,222,
- 79, 98,165,200,195,247, 58,188, 8,180, 40,165,208, 2, 45, 74, 92,104,160,207,133,245,206,157, 59,138,189, 26,213,178, 51,103,
-206, 20, 74, 96, 8,102,251,247,239,175, 7,180,118,162, 83,237,132,170,201,150,160,126,218,217,160, 65, 3, 27,208, 98,239,181,
-118, 94,189,106,135,248, 31, 18,147,158, 56,165,121, 2,159,167, 17, 12,120, 61,108,204, 46,195,230, 77, 89,208, 57,192,208,150,
-215,241,128,171, 96,192, 54,122,201,146, 68,156,123,251,246, 38,241,189,221, 86, 1, 89, 76,151, 47,100,146,189,187,178,200,190,
- 61,121, 0,178, 74,202,245,107, 21,229,134, 79,117,185,239,215, 95,110,221, 92, 41,201,147, 71, 88,174, 83, 96,197,240,189, 72,
-145, 34, 65, 12, 52, 60,126,252,120,214,243, 21,239, 49,181,105,211,230, 45,212,166, 74,159,133,234,246,173,245,190,174,129,188,
-122,234,112, 96,151,239,103,239,219,220,230,196,240,223, 51,253,161,150,131, 54, 89, 45,160, 46,164,100,171, 77,229,236,206,108,
-180, 52,197,246, 12, 87,167,227,228, 98, 11, 55,159,239,183,222,235,222,104,207,105, 59,151,198,207,214,100,141, 71,242,178,121,
- 51,148,238,178,107,215,137, 7,126, 41,190,205,240,106,194,196, 73,193,148,196,205,155, 55, 79, 42, 85,170, 68, 0, 99,111, 12,
-111,163, 9,160,229, 71,160, 69, 41, 22,213,247,148,140, 50, 5, 5, 5, 9,236,250, 20,160,245,117,214, 42, 53,215,110,221,127,
-240,142,223,131,123,137,115,212,232, 59, 97,214,202, 77,252,158, 48,107, 21,198, 37,117,120,209,216,253,233,163,171,242,230,229,
- 30, 72,216,222,200,241, 1, 13,101, 79,199, 42,178,241,231, 50,242,250,229,101,121,246,236,154, 60,120,232, 35,115,186,118,148,
-118,105,190,145,191,209, 63, 33, 1,227,129, 11,247,229,230,128,155, 3,110, 14,132,224,128, 22, 4,113,253,113, 6,180,236,238,
- 43, 18, 45, 53,191, 30, 56,115,244, 14, 43, 24,115,102, 34,164, 45, 35, 1,150,125, 50,214,138, 9, 18,164,139,153, 44, 93,254,
-147,199,206, 94,189,188,231,200,249, 93,115,151,108,216,178,126,203,222,253,183,238, 62, 58,112,242,204,229, 67, 73,191,207,119,
- 74,231,164,156,237, 69, 60, 89, 24, 16, 16,160,168,187,206,156, 57,163,216,141,224,116,148,236,131, 93, 86,251, 70, 13,165,101,
-149,202, 10,200,106, 83,178,136,244,168, 88, 70,254, 30,216,143, 64,235,164,171,146,170, 64,203,145,186, 80, 5, 89,124,231,240,
-226,121,100,108,229, 18,114,120,201, 60, 73,151, 46,157, 81,213, 97,238,124,249,242,189,186,117,235,150,148, 46, 93,154,139,110,
- 28,107, 89,178,102,202,148,233, 5,213,112, 56,141,199,251,173,244,184,249,109,190, 12,207, 79, 92, 58, 37, 7,207, 63,146,147,
-215, 2,228,240, 69,127,217,232,253, 80,230,237,240,149,226, 53,191,145,194,149, 96, 87,100, 77, 63,118,232, 37, 67,230, 31,151,
-152, 73,179, 6, 58,163, 75,160,213,170, 85, 43,201,155, 55,175,228,204,153, 83,178,101,203, 38, 25, 50,100, 80, 0,149,159,159,
-159,162, 50, 92,189,122,181,162,246, 34,136, 41, 89,178, 36,237,202,148,122,232, 72,180, 20, 85,161, 30,208, 10, 13,216,130,125,
-211, 69,249,245, 87,145,140, 25,165, 80,161, 66,210,161, 67, 7, 30,126,176, 1, 45,218, 85, 65,181,252, 18,117,254, 11,137,106,
- 49,167, 23, 12,224,207,190,126,237,171, 72,173,222,129,172,204,114,229, 98,110,168, 15,195, 41, 32,240,226,249,242,114,211,167,
-134,220,186, 81, 31, 96,172, 61,164, 90, 71, 4,167, 18, 47,235,180,147, 98,248, 78,208,177,103,207, 30, 69,146,133,252, 23, 60,
- 61, 61,219,142, 26, 53,106, 25,128,234, 43,124, 74,239,222,189,165, 99, 71,216, 83, 53,111, 78, 32,242, 76,175,237,249,127,203,
- 82,113, 99, 15,235,144,255,212,209,189, 35, 3,134,119,200,127,242,215, 98, 95,199, 80,159, 51,112,234, 48,196, 43,210,150,111,
- 23,185, 82,171,209, 29,102,174, 61, 63,126,237,225,135,115,166,173, 62,187,233,155, 34,237,118, 45,218,118,229,226,188,221,129,
-231,127, 30,235,115,188,120,165,198, 79, 83,126,251,253,155,200,209,226, 60, 15, 23, 62,210, 98, 77,223,125,175,184,104, 23, 63,
-110,126,104,151,246,251,239,191, 43,159, 84,157, 82,194, 5, 53,162, 2,180, 82,167, 46, 22,165,108,189,238,147,158, 6, 88, 2,
-171, 54,233, 53,163, 65,219, 1,115,248,253,135,170,237,255,212,216,139,133,160,205,147,133,175, 95,222, 5,208,218, 43,143, 78,
-108,147, 61,157,170,202,250,198, 37,100,113,213, 2, 18, 16,112, 77,238, 63,184, 46, 55,238, 64,141,184,126,163, 52, 73,148, 88,
- 38,181,233, 32,124,198, 8, 63,221,121,220, 28,112,115,224,191,197, 1,173, 36,202,149, 68,203, 14, 44, 17,145, 25, 2, 90,246,
-146, 46, 85,162,101,125,151,179, 3,106,198, 27, 65,239, 72,101,172,175, 51,165, 45, 90,177,254,165, 59,126,143,207,111,217,227,
-189,233,216,153,139,123,252, 3, 2,207,151,249,177,201,249, 24, 73,190,203, 96,244, 77, 4, 77,215,175, 95,199,201,176, 13,138,
-157,211,129,253,251,101,239,214,173,178,107,245, 74,105, 94,169,188,180,180,130,172,190, 63,150,147,153,173,155,202,190,191,166,
- 24, 2, 90, 60, 93,168,170, 12,181,234,194,222,233,147,203,128,220, 25,100,120,137,188, 18, 24, 24,168, 36, 74,191, 12, 2,173,
-175, 33,185,186,115,229,202, 21, 69,130,129,197,232,152,181,158, 60, 21, 70,117,225,154,113,227,198, 41,170, 56,124, 31,169,199,
-131,248,223,102,122,230,117,238,164, 44,222,238, 45, 67,102, 79,149,105,171,182,201,172,173,183,101,232,146,107, 82,190, 81,169,
- 16, 64,171,116,147,122,210,103,214, 41, 67, 64,139, 0, 11,160,143,117,162,145,187,144,191,203, 32,233,170,209,160,181,100,207,
- 87, 92,234,214,173,167,216,232, 16,128, 65,138,228, 18,104,209, 70,139,246, 89, 35,203,121,200,248, 90, 9, 94,168, 96,203,145,
- 68, 75, 65, 71,230, 36, 91,163, 42, 87,174, 44,231, 27, 53,146, 37, 0, 66, 0, 47, 74,202,147,135,106,240,119, 18, 45,126, 39,
-136,129,154, 11,160, 40, 25,249,234,200,216, 92, 97,117,146,196, 17,207,174, 88,177, 76,112, 50,206,166, 46, 92,180, 32,139, 13,
-104,109, 92, 87,210,118, 31, 18, 73, 72,106,254, 50, 4,180,104, 59, 72, 73, 22,221,118, 80, 66, 72,160, 5, 21,236, 34,181,190,
-246,159, 56, 88, 65,137,151,203,171, 83,173,228, 81,115,167, 77,214,171,219,175,117,229,202,133,109,194,207,124,105, 83,246,228,
-125, 62, 72, 53, 33,109,178,236, 12,224, 93,210,140,147,186, 73,156, 92,213,250,141,152,181,225,210,194,197,123, 30, 46,219,126,
- 42,240,200,206,179,207, 47,116,156,237,127, 96,236,186,103,231,215, 30,246,191,157,172, 96,187, 29, 30, 41,171,100, 4, 33,151,
-182,105,112,227,225, 71,117, 33, 37,180,144, 92,218, 14, 88, 80,122,135,141, 76,168,129, 86,212,136, 17,239,249, 95, 60, 36, 39,
-134, 52,150,167,183,183,201,203,192, 83, 98, 9, 56, 39, 15,238,158, 22,207, 44,223, 74,251, 20,137,165,101,178, 36,242, 71,149,
-154,178,223,251,146, 28,244, 58,239, 6, 90,122,157,201,253,191,155, 3,255, 98, 14,184,194, 34,161,145,104,145, 85,102,128,150,
-125, 94,123,208,166,195,122,215, 14, 75,141, 28,169,140,159, 42,219,206,139,215,110, 30,129,186,112,213,213,155,247, 55, 92,191,
-229,187,159,247,204,180, 57,213,128,107,214,172,145,201,147, 39, 75,143,238,221,165, 75,187, 54,210,173, 69,115,233,218,160,174,
- 44, 30, 54, 80,214, 32,109, 29, 49, 72,118, 15,235, 7, 35,217,193,178,113,204, 48, 67,170,195,147,107, 86,216,128,150,106,147,
- 69, 41,214,128,188, 25, 21,144, 53,174, 74, 41, 5,100, 89, 44, 22, 5,104, 25, 49,134, 7, 40,217, 66,169, 16,109, 93, 26, 1,
- 28,100,207,158,253,101,214,172, 89, 45, 80, 43, 73,237,218,181, 21, 21, 28, 37,114,252, 4, 15,116, 37, 90,240,147,181,119,238,
-250,147, 50,106,238, 56, 41,223, 56,189,148,168,149, 90,186, 78,220, 40, 29,166, 94,144,198, 35,246, 75,217, 22,191,216,192, 86,
-213,158,139,164,137,231,106, 93,213, 97,203,150, 45, 21, 73, 22,129, 22,234,164, 0, 45,218, 17, 85,111,216, 78,218,246,158, 32,
-185,243, 20,149,108,137,190,150,223,161,150,133,109,156,192,174,200, 37,208,178, 63,117, 8, 91,159,131, 4, 91, 4, 90, 13, 27,
- 54,220, 9,137,142, 98,163,101,127,241,158,129,126,224, 71,233, 26,121, 74,123,178,193,131, 7, 43, 64,171,125,251,246, 10,192,
- 98,226,119, 21,128, 65, 77, 71,154, 78,109,201,160, 58,252,123,201,146, 41,212,159,219, 0, 85,249,114,137,228,244,201,114,114,
-230,100, 21,105,217, 34,131,237, 62,218, 78, 6, 15,234, 97, 88,117,200,211,133, 4, 29,180,195,131,196,237, 77,247,238,221, 95,
-177,206, 67,134, 12,177,209,164, 26,150, 87,138, 20, 41, 30, 59,171,251,156,209,217,146, 13,255, 61, 75,223, 97,237,243,159, 32,
-184,218,188,102,166,242,204,230, 53, 51, 20,176,197,251,252,127,250,176,172,201, 61, 59,198,137,179,125, 85,141, 17,221, 91,198,
-117,122, 0,194,238, 61,225,162,165,171,147, 52,231,143,189, 23,175, 58,248, 96,253,204,109,143, 54,245, 95,242,112,123,159, 69,
-254, 71,214,123, 7,222,254,182, 68,231,221, 30,169,202,231,176,130, 44,151, 64, 11,146, 78, 63,158,250,157, 58,117, 42,128,121,
- 93, 69,125, 72,176,201, 19,192, 80, 43, 42, 64, 43, 97,230, 42,213, 66,163, 58,188,227,181, 93,246,119,171, 45,151,215,140,151,
-151,207,175,192,102,242,170,220,190, 5, 21,121,146, 4,210,236,235, 4,210, 56, 81, 18, 89,177, 96,141,236, 57,122, 77, 86,173,
-222,225, 86, 29, 26, 24, 72,238, 44,110, 14,252, 91, 57, 96,212, 70,203,106, 55, 85, 73,149, 58,113, 13,178, 74,158, 74,233, 72,
-180,242,218, 75,174,156, 1, 49,235,186,102,163,107,128,231,246, 54, 90, 33,129,151,129, 35,149, 95,229,200,150,250, 82,243,134,
- 69, 94, 52,171, 91,240, 89,197, 82,223, 62,169, 82, 46, 99, 32,239, 25,120,185, 45, 11, 13,219, 97, 84,253,130,239,235,248, 75,
- 75,105, 93,167,182, 52, 43, 87, 90, 90, 65,146,181,109,252,104,217, 49,106,176,236, 28,220, 79,174,174,234, 35,103,230,142,149,
- 65, 45,155,189, 54, 98, 12,127,108,249, 98, 5,104,117,140, 19, 94,177,199, 34,200, 82,212,133, 37,243,201,159,213,202,200,180,
- 70, 53, 20,144, 5, 63, 80, 42,208,242,213, 41,119,244, 42, 85,170, 4,115, 81,228,233, 45,130, 45,210,163, 29, 24,109,159,168,
-102,225,233,190,223,126,251,141, 82, 34, 58, 63,141,164,199, 7, 26,195,215,235, 48,250,245, 54,175,203, 0, 89,169,164,200,143,
-201,165,205,164, 51,210,120,212,105,169, 62,240,132,148,234,185, 95, 10, 87, 78, 46, 69,171,125, 39,195, 23,123, 73,193,154, 61,
- 94,233, 25,195,171, 64, 43, 35, 84,113, 42,208,162,171,135,220, 69, 42, 73,158,252,165,165, 56,192,215, 79,223,167,150,142, 80,
-195, 82, 42, 7, 94,154, 6, 90, 80,165,237,132, 42,114, 39, 22,223,157,176,255,114, 8,180, 12, 74,182, 20,155, 50, 58,122,157,
- 50,101,202,123,128, 75, 5, 88,224, 59, 0, 81,114, 41, 94,188,184, 75,160, 5, 99,248, 58,163, 70,182,124, 53,124,248,112,161,
- 63, 49, 14,138,142, 29,190,135,186,176, 38,212,133, 13,100,220,216, 98, 54, 80, 68,151, 28,221,187,213,124, 19, 45, 90,248,102,
-122,237,132,255,163,209,133, 3, 79, 28, 18, 24, 82,170, 67, 48,237,236, 66, 94,167, 64,235,200,246,186, 99,105,147, 69,117, 33,
- 37, 89,218,139,191,121,159,255, 51, 95,155, 42,241,154, 31,220,246,199,195,246,248, 52, 80, 70,102, 81,220, 58,196,207,220,176,
-122,227, 30,115, 54, 47,217,239,191,163,207,194,135, 91,150, 30,180, 92,110,220,107,241,209, 72,223,214,164, 39,127,158, 70, 36,
-200,114,121,114, 23, 27,160, 59,148,206, 82,138, 71,149, 56, 15,123,240, 64, 5,237,253,224,226, 66, 1, 90, 89,138, 55,235, 67,
-183, 14,102,141,225, 55, 76, 29,249,214,123, 92,111,217,216,169,158, 60,241,191, 38,119,253,174,203,165, 43,151, 21,144,213, 40,
-113, 82,233, 81,161,186,236,244,186, 42,187, 1,180,122,245,232,255,218,109, 12,111,176,245,221,217,220, 28,248, 23,114,192, 21,
- 22,193,252,169,128, 36,107, 42,128,207,196, 72,234,201, 67,222,231,255, 17, 53,249, 20,119, 49, 46,126,171,207,168,116,249,169,
-126,215,158, 86, 84,232, 26, 96,183,107, 27, 45, 61,137, 22,118,181,137,155, 55,171, 69,216, 1,224, 17, 36,103,189,134,201,222,
-117,141,165, 88,193,239,184, 40, 22, 51, 80, 0, 53,203, 87,116,217, 48,127,206,108,249,115,208, 0,105, 90,182,148, 2,178,218,
-193, 38,139, 32,107, 15, 12,192,125,214,245,150, 27,235,135,201,230, 33,158, 18,211,160,123, 7, 2, 33, 85,146,213, 55, 83, 42,
- 25, 84, 32,179,140,192, 73, 38, 85,138, 69,144,181,168,123,123, 89, 57,240,119, 57,179,109, 19, 65,137, 30,208,242,128,145,251,
- 97,130, 41, 2, 45, 74, 87, 42, 84,168, 32,229,202,149,163,100,235, 57,212, 85, 4,152,155,145, 40,201, 50,226, 50,192,131,118,
-108, 49,147,101,187, 63, 97,217, 49,249,115,225,122, 41, 94, 61,157,212, 27,188, 95,170,244, 63, 46, 37,123,122, 73,190, 78,135,
-164, 66,211,138,210,127,220,239,210, 97,212, 58,137,153, 44,251, 67, 29,247, 14,126,246, 64, 11, 39,196,164,107,215,174, 82, 7,
-234,194,236,201,146, 74,237,239, 83,201,208,226,249,229,239, 33, 3, 20,117,144, 30,208,178,247, 12,143,186,205,167, 36, 11,167,
-215,118,194,126,138, 32,107,217,187,126,251,255, 11,126,166, 8,104, 60,121, 95,167, 31,220,162, 42,110,216,176, 97,210,172, 89,
- 51,169, 81,163,134,178,144, 83,194,197, 79, 21, 96, 65, 66, 68, 30, 43,126,176, 64,143,142, 44,157, 93,225, 18, 38,140,112,106,
-254,252,105,130, 50, 74,212,168, 17,228,212,137, 42, 10,200,186,125,179, 57, 12,225, 91, 67,221, 27, 77, 42, 86,172, 8,233, 89,
- 55,249, 58, 65, 4, 26,180, 59, 11,239,163,125,199,104, 74, 42,121,104, 3, 18,173, 96,158,136,165,164,141,151, 35,137, 22,128,
-246, 11,103, 5,164,164,202,177, 68,107,166, 77,162, 53,172, 87,198,193, 93,234,124,221,189, 90,201, 2,111,233,103,139,159,237,
-170,196,109, 53,164,117,108, 35,135, 2,216,247,194,199,204,212,112,206,180, 53, 23, 15, 46, 61,240,236,216,212, 53,215, 46, 69,
-203,216,152,167, 11, 89, 87,213,191,150,203,166,129, 93, 92,171,168, 81,163,222, 97, 66,125, 6,241,164,225,226,197,139,101,236,
-216,177,180,235, 83, 37, 90, 5, 51,254,208,164, 87,194,204, 85, 59,155,113,239, 16, 51, 90,212, 91,190, 55,206,201,163, 7, 87,
-101, 86,203,134,210, 62, 85, 50,105,141,126,122,228,196, 21,217,115,228,162,172, 94,191, 95,126,207, 90, 78,134,150,169, 39,113,
- 34, 70,226, 73, 78,183,123, 7, 19, 19,170, 59,171,155, 3,255, 38, 14,232, 97,145, 47,186,174, 6, 42,247,213,119,105, 82,200,
-142, 53,253,101,199,234, 63,100,209,148, 58, 74, 74,251,109,114,238,128, 93, 73,115, 28, 57,157, 75,245, 77,202,148,190,211,199,
-140,150,217, 35,134,138,103,131, 58,210,163,124, 73,168, 11, 7,202,254, 17, 3,229,212,204, 81,178,121, 80, 95,201,254, 93, 26,
-170,141, 82, 57, 96,236,123, 14, 75, 9,180, 84, 73,214,224,130, 89,100,100,153,130, 50,190, 70, 57,155, 20,139,146,172,213,131,
-251,200,166, 63,135,203,133,189, 59,105,207,100, 15,180, 28,149, 51, 5,236,111, 30, 61,126,252, 88, 57, 38,111,245, 86,239, 42,
- 60,142,125, 81,223,163, 73,135,165,201, 50, 22,177, 12,251,251,176, 76, 94,125, 92, 90, 14, 93, 40, 21,251, 29,149, 18, 0, 90,
-213, 7, 30,151,193, 11,142, 73,155,225, 27, 36,209,119, 5, 2,245, 28,150, 66,146,114,183,111,223,190,138,234, 80,149,104,193,
-221,132, 2, 82,120, 34,178, 7,212,178,109,203,149,148, 89,131, 7, 8,220, 51,192, 39,104, 49, 69,117, 88,175, 94, 61,123, 63,
- 90,174, 28, 3, 82, 34, 66,199,169,125,144, 42, 90, 23,111, 5,116,168,128,203, 10,180,116,235,142, 12,141, 0,216, 45, 4, 89,
- 4, 46, 4, 86, 44, 11,109,130,112,130, 79,145, 98,177,236, 37, 74,148,144,244,233,211,195,214, 42,146,133,207,104, 8, 59, 42,
-231,247,249,242,125,251, 96,201,146,233,176, 47,154, 34, 15,238, 13, 23,191, 59, 93,197,239,110, 47,121,248, 96, 60,188,195,143,
-135,100,166,175,228,203,155,234, 33,232, 56,114,195,225,136,230,160, 9, 19, 38, 40,128,149, 46, 28,224, 71,234, 45, 85,199,206,
- 46,242,193,174,242,239,209,164, 45, 86,222,244,169,234,105,109,180,242,167, 75,217,157,247,183,173,174, 62,146,146, 44,173, 83,
- 83,254,230,125,157,186,243,239,119,206, 74, 19,148, 78,154,186, 72,219, 45, 11,119,221, 63,145,182,100,231,157,252,173, 1, 89,
-206,164, 89, 46, 29,150,162, 61,238,209,240, 31, 27,142, 16,198,233,170,100,203,140,195,210,124,185,115, 61,187,114,241,172, 92,
- 60,119, 86,218,162,109,155,166,252, 70,246, 31,247,145, 29,144,100,245, 47, 80, 67, 6, 21,175, 45, 89,210,126,207,131, 31,110,
-135,165, 33, 59,147,219,105,103,216,174,172,110,126,254,195,249,105, 0,139,132,109, 13,194,150,154,235, 88,135,122,239,162,212,
-170,235,111,205,108, 18,173, 51, 71,134,200,158,117,141,164, 88,161,180,122, 18, 45,103, 29, 91, 9,193,211,164,218,143, 47, 70,
-119,238, 40,115,250,244,144,163,179,167,203, 38,216,103, 13,109,209,244,181, 85,146,229, 8,100,177,168,239, 1, 45, 2, 41, 58,
- 62,101, 58,178,120,158,120, 45, 91, 40, 94, 43, 22, 43, 64,139,137,146,173,211,144,100,157,217,181, 77,206,238,217, 46, 8, 75,
- 99,212, 51,124,113, 72,178,112,202, 61, 72,224,168, 52, 24,239,182,157, 20,211,227,153,125, 57,213,252,106, 8,158,178,141,255,
-120,213,126,228, 6,241,156,125, 66,122, 77, 63, 38,141,251,173,148, 2, 53,122,188,130, 36,203, 80, 8, 30, 44,128,135,120,116,
-159,167, 54,233,169,156, 39, 32,105, 83, 67,219, 34,158,132,252,251,239,191, 21,255,100,155, 54,109,146, 62,125,250, 40, 42,187,
-209,163, 71, 43,167,202, 32,181, 56,100, 96, 17,119, 86, 69, 85, 37,199,255,109,160,203, 25,216, 0, 80,137, 12,195,246, 2,176,
-123,106,138,207, 65,245,235,215,191, 67,151, 19, 77,225, 60,149,106, 63, 2, 26,130, 69, 74, 12,115,231,206, 77,155, 60,186, 77,
-152,128, 4,239,231, 33, 46,103,125, 41, 45,194,236,156,156, 51,187,237,203,155, 55,150,227,116,225, 65, 9,124,182, 87,174, 93,
-157,139, 8, 3, 45, 95, 37, 78, 20,145,142, 74,211, 57,169,140, 35,154,239,133,224, 33, 40,116, 38,209, 50, 2,180,212,119, 15,
-239, 88,208,139,234, 66,218,102,169,134,240,180,205,162,218,208, 38,209, 42, 81,224, 45,213,135,118,182, 90, 78, 23, 8, 68, 89,
- 72,133, 83,167, 0,240, 37, 7, 69, 77, 91,237, 74,146,140,101, 7,225, 94,209, 92,185,114,165,177, 2, 49,103,237,168,183,232,
-164, 7,216,189, 14,176, 25, 50, 4, 79,230, 42, 5, 51, 20,105,220, 59,113,150, 42, 21, 28, 16,118, 70, 51, 95,180, 40, 81,110,
-141, 31, 61,246,205,242,201,211,101, 80,173,122,138,241,251,204, 17, 83,165, 95,241, 74, 65,113, 34, 69,226,120,116,135,224,121,
-159,161,122,109,100, 96, 26,122, 47,139,155,102,104,184,230,252, 25, 55, 63,195,150,159, 95, 50, 53,215,198,240, 70,106,150, 54,
- 77,242, 77,149, 17,171,173,109,171, 26, 74, 42, 87, 58,191,240,158,206,179,174, 58,161, 45,168,116, 12,156, 70,100,162,177,188,
-217,160,210,112,115,224, 69, 23, 15,102, 18, 36, 43, 71, 13, 46,226,204, 86, 15,146,162,155,176, 29, 25, 99,132, 79, 70, 0,140,
- 26, 84,154, 6,242, 49,147,102, 9, 96, 10, 69, 80,233,108, 4, 91,176,161,185,139,228,199,196,211, 99, 76,184,255, 0, 94,192,
- 3, 35, 68,136,240, 2,233, 37, 22,204, 64,240,246, 1, 61,194, 91, 65, 86, 54, 35,229, 52, 80, 95, 93,160, 5, 87, 30,233, 33,
- 81,243,132,125,219, 89, 74,214,160,146,123, 1, 73,214, 62,148,107, 61, 84,184,193,180,115,163, 20, 11,237, 72, 32, 75, 55, 4,
-105, 77,128, 34, 53,107,184, 40, 81,194,215,135,251,134,133, 8, 42,125, 33,105,146,136, 23,241,125, 9, 28,148, 54, 70, 6, 74,
-229, 66, 11, 54,248, 92,125,168,210, 94,127,136, 68,203, 6,180,126,207,210,251,157, 31,173, 44,125,237, 11,212,174, 90,188,102,
-148,100,241,211, 40,128, 1,192, 74, 11, 64,213, 27,105, 9,190,159,200,145, 35,215, 69,124, 30,196,239,105, 72,191,102,206,156,
- 57,197, 7,214,221, 64, 23, 8,145,197,213,120,183, 5,149,142, 30, 33,194,125,119, 80,105, 67,172,117, 47,226,134,216,100, 56,
-147,155,159,134, 89,101, 40,227,199,224,167,161, 23,255, 67, 51,133,222,143,150,125,133,104,116,141,123,122,246, 56,234, 99, 31,
-163, 33,220, 52,195,182,151,125, 40, 63, 85, 27, 45,109,169,108, 52,113, 18, 50, 10,164, 89,133,144,154, 65,162,213, 25,169, 9,
-109,254,172,153,243,224,115,141, 53,241,187,171,235, 67,203,233,136,182, 33,154, 40,251, 81,168,106, 3, 32,133,125,165, 26,222,
- 91,199, 0, 85,202,246,126,159,156,210,164,205, 22, 13,223,249,105, 95, 24,207,118,241, 98,241,212, 33, 63,141, 2, 45,230,163,
- 68, 11,160,170, 56, 62,235, 34,181, 70,170,129, 84, 4,167, 56,191,197,223,174,140,224, 13,213,221,100, 87,115,211, 52,201,176,
-127,106,159, 55, 89, 13,119,187,155,100,152,187,221,195,150, 97,255,117,106,238, 1, 24,182, 61,192,205, 79, 55, 63,195,138, 3,
-238,190, 20, 86,156,124, 71,199,205, 79, 55, 63,195,138, 3,255,229,190, 20, 86, 60,252, 28,116,194, 78,162,101,178,244,255,229,
- 14,227,174,187,201,206,226,222,229, 57,229,128,187, 47,185,251, 82, 88,113,192,221,151,194,138,147,110,128,253, 49,250, 82,216,
-182,206,231,161,230, 48,214, 33,153,229, 40,153, 41,162, 51, 26,174,238,235,209,119,211,116,220, 46,161,109, 47, 55, 63,221,252,
- 52,218, 7,220, 99,211, 57, 7,140,242, 80,155,207,205, 79, 55, 63, 29,113,224,191,220,151,244,198,196,151,250,191,249,128,210,
- 97, 80,211,143,129,120,221, 52,195,160, 97, 52, 36,220,252,116,243, 51,172, 56,224,238, 75, 97,197, 73,183,180,196,221,151,254,
-155,125, 41,108,107,253,105,169,185, 85,135,110,181,148, 91, 45,229,128, 3,238,201, 60,108, 39,162, 47,142,159, 8, 7, 21,222,
- 72, 10,159,186, 76,213, 56, 89,234, 28, 13,159,178, 92, 45,109,126,247,134, 69,225,192, 23,215,238, 97,216,237,221,117, 15, 67,
-102,254,231, 72,165, 73,147, 34,243,119,169,147,253,146, 54, 85,138, 54,105,190, 73,222, 50,109,188,247, 79, 67,165, 76,153, 50,
-110,154,212, 41, 27, 51, 15,243,242, 25, 59, 70,233,117,194,200,112, 75,208, 25,174, 25, 54, 33,240,239, 89,156,236,218, 4, 55,
- 4,157, 65,195,149,119,104, 61,154,161,105, 43,151, 52,225, 64,179, 30,130, 13,183,129, 79,168,159, 17,239,176, 49, 63,225, 11,
-170, 13, 28,154,214,115,241, 50,151, 52,113,250,174, 36,130, 61,183,132,219,128,150,164, 3, 95, 87, 77,248,155,247, 67, 65, 51,
- 51, 78,195, 29,131, 11,138,147,120, 86,235,186,193, 8, 47,204,240, 19,175, 8,215, 26, 46, 56,182,226,211,199,250,217, 26, 47,
-177,247,142,111,148,102, 77, 60, 59, 11,180, 78, 49,241, 59, 18,239, 57,186, 62, 59, 77, 6, 69,103, 10,203,114,162,221, 78, 50,
-125, 0,205,166, 56,249,120,128, 9, 52,154, 26,105,112,107, 30, 27, 63,101, 74, 70,201,153,196, 67, 73,252,110,246,183, 25,176,
-225,140,126, 40,250,188,246,145,138,112,124, 75, 30, 86, 53, 88,127, 91,221,141,128, 44,230, 73, 94,160,249,237,197, 71,130, 37,
- 73,222,166, 87,141, 0, 45, 76,132,101,114,133, 15, 63, 17,159, 63,161, 76, 60,253, 25, 17,243, 91, 99,156, 96,157,201,121, 46,
- 81,162, 68, 51,225,138,133,238, 71, 34,126, 96,221,149,199,229,172, 71,188, 87, 71, 60, 50,189, 62,228,145, 75, 77,252,205,251,
-118,244,141,142, 35,131,172, 84,178, 25,161,201, 57,162, 19, 82, 91, 36, 37,152,186,206,245, 30, 77,134,103, 66,228,136, 61,136,
- 86,176, 17,235,197, 6,164,141, 88, 63, 54,146,159, 76, 56,205,188, 25,159,115,141,240, 51, 70, 42,143, 12,241, 51,125,229, 21,
-231,251,175,118,199, 72,233,193,192,235, 30, 49, 83,122, 20,194,247,169,209, 83,122,108,141,249, 77,184,147,209, 83,121,108, 68,
-234, 18, 51,153,199,247, 70,104,234, 85,200,196,255, 70,248,169,146, 75,141, 47,116, 61,180,202,154,214,227,147,238,139,102,176,
- 74,154,119,154,161,105,180,168, 31,131,166,209,119,255, 19,243,217, 75,180,232,192,244,255,151, 38,190, 80, 49,222, 37, 96,234,
-209,165,227,154,235,151, 47,174,189,117,237,242,218,245,171, 87,108,140, 19, 59,246,114,116,234,195,240, 52, 26,152, 42,122,244,
- 0,248, 61,218, 23, 59,118,172, 69,155,215,175,217,192, 60,204,203,103,236,192,150,171,134, 72,159, 36, 73,146, 35,136,177,118,
-235,250,245,235,190,175, 94,189,242,189,112,225,130, 47,130,245,222,192,123,142,160, 24,233,157,112, 82,175,113,139, 36,137, 31,
-110, 80,186, 20,225, 15,167,139,237,113, 56, 73, 52,143, 65,160, 83,196,236,160,214,230,199,224, 62,120,229,202, 21,122, 50, 15,
-166, 83,212,159,126,250, 41,152,191, 1,138, 8, 12,156, 93, 46,203, 9,239,244, 23,232,155, 9,238, 50, 46,131, 0, 62,190,191,
- 76,154,188, 31, 10,154, 94,143, 30, 61,146, 91,183,110,209,213,130,183,201, 30,168,199, 79,149, 28,253,158,173,130,179,215,149,
- 8,207,210, 6, 49, 0, 7,192, 89,106, 63,132,202, 89,129,251,107,145, 73, 11,182,244,104,198, 3,184, 88,138,246,223, 53,103,
-206,156,105,231,206,157,155,139,192,213,139, 1, 52,151,100,200,144, 97, 63,255, 3, 61,179, 11,132, 66, 19,206,117,119,205,157,
- 59,119,214,217,179,103,231, 1, 12, 47, 89,183,110,221, 82, 68, 47,216, 23, 90,154,152,220,151, 32,128,233, 54, 4,216, 30,119,
-243,230,205, 73,136,117, 57,227,208,161, 67,179, 16,142,105, 23,255, 11,109, 57,177,185,216,142,152,143,127,158, 58,117,106, 10,
-250,253, 76, 4, 3,159,141,182,223,101,166,156, 88, 84, 74, 96, 28,190,193, 37, 76, 88,104,130,176, 9, 8,132,223, 55, 91,130,
- 15,176, 64, 38,240,197,151,249, 29, 77,188, 4, 63,127,254,249,103,229,208, 36, 62,107,100, 50, 87,129,220,200,145, 35,171,218,
- 39,132,250,249,145,255,155, 28,239, 85, 75,150, 44,121, 2,207,180, 66, 92,204,107, 24, 74, 12,248,126, 17,191,219, 35, 48,246,
- 49,240,162,150,145,113,100, 20,104,165, 41,218,246,225, 18,111, 17,229, 83, 35, 5,115, 86,247, 28,225,194,141,127, 89,163,198,
-235,241, 25, 51, 30,194, 42,221, 11, 0,107,205,208,161, 67,143,160, 79,122, 99,174,243, 62,125,250,180,119,183,110,221, 14, 3,
- 44,172, 6,141,212, 38,235, 30, 34, 59,193,212,179,125, 30,197, 31,108,247,232,114,127,155,199, 32, 53,241, 55,239,219,129, 45,
-189,177,105,114,250, 80,178, 27,161,233,201, 96,229, 61,123,246,100, 59, 19,108,233, 93,246, 52,127,131,211,232, 29,104,103,111,
-204, 63,222,136, 55,235,141,136, 32, 74,130,195,106,111, 56,166,246,134, 99,106,111, 0, 88,134, 70,115,118,217,104, 70, 79,225,
-177,225,239,235, 63, 75,215,163, 73, 36, 90,106,143,213,209, 82,120, 44, 47,215, 62,157, 76, 60, 86, 79,230,223,110, 33, 43,158,
-182,150, 25, 87,235, 73,151, 37,133, 37,103,141,132, 65, 0,102, 92, 71, 28,249,228, 51, 82,119,189,186,218,255,111,152, 38,198,
-255,118, 70, 69,161, 83,109,109,130,255, 66,242,121,148,145,177,105,247,242,212, 8, 49,183,159,116,173,253, 50, 53,128,237, 62,
-244,223,115,248, 93,213, 46,175,225,114, 26,101,128, 61, 22, 49,250,220, 63, 52,223,251, 65,165, 89, 80,213,253, 61,165, 83, 4,
- 78,249,243,228,156, 22, 47,110,236, 41, 96,124, 0, 22,213,160,103,207,158,201,131, 33, 67,228, 46,130,244, 98,209, 97, 16,218,
-215,177, 99,199,246, 79, 16, 47,206, 24,230,229, 51,124,214, 64,227, 70, 38,200, 34,176,194, 2,225,139,192,197, 10,200, 66,140,
- 57, 95, 44,186,190, 91,183,110,245,197,110,143, 96,203,145,100,203, 89,227, 38,254, 62, 69, 4,175, 81,125,127,122,118,126,255,
-120,121,118,107,147, 4, 28, 89, 41,103,230, 15,146, 33,205, 43, 61,251, 62,206, 87, 94,160,167,250,111, 50,213,177,225,228,243,
- 7, 72,178,238,117,236,216, 81,241, 91, 73, 39,155, 88,188, 25, 34, 40,181,145, 65,237, 40, 15,164,100, 10,208,226, 39,254,255,
-158,159, 4, 90,214,223,186, 19,133, 93, 6, 63,213,161, 38,238,179, 92,102, 46,123,126,134,195,228, 63, 9,128,234, 1,218,128,
-160,247, 58, 22,104, 31, 56, 59,189, 7, 9,230,166, 64,203,139,211, 15, 31, 61, 57,219,163,207,240,150,104,167,174,152,228, 86,
-148, 47, 95,126, 13, 37, 93, 6,218, 93,201, 66, 48,129, 88,135,179, 17, 75,114,238,146,101, 43, 55, 44, 93,177, 6, 24,107,243,
-122,180,255, 22, 4,239, 62,252,199, 31,127,172,179, 2, 14,109, 61, 92, 14,106,230, 7, 16,158, 15,111,248, 11,230, 47, 90,186,
- 97,193,146,149,235,215,174, 93,183, 26,160,104, 29,104,238, 9, 13, 77, 2, 41, 68,132,159,142, 73,125,138,151,247,241, 37, 39,
- 78,159, 93,140,126, 58,239,198,141, 27,139, 48,193,111, 66,255, 95,102, 5, 91,134,203,137,140, 75,170, 86,173, 74,176, 54,109,
-206,188, 5, 75,255, 94,176,100,233,138, 21, 43, 23, 32,230,227, 98, 76,152, 91, 32,217, 92,110,180,238,104,163, 91,160, 35, 75,
-151, 46, 85, 18, 61,238,219, 95,150,231,239, 34, 38,112,188, 2,108,105, 99, 71,218,248, 73,144, 67,144,133,103,115,153, 77,118,
- 0,201, 97, 27, 5, 77,206, 40, 4, 87, 4, 84, 88, 16,243,216, 39, 56,179,205,235, 2,108, 57,164,137, 24,150, 94, 4, 87, 0,
-213,150,178,101,203, 62,230,119,126, 34, 50,130, 5,241, 73, 45,181,106,213,162,132, 84,119, 28, 25, 5, 90,169,139,180,246, 37,
-208,202, 84,174, 75, 32, 2,160, 71, 80,159,115,214,231, 51, 33,124, 20, 65, 86, 80,205,154,193,158,233,211, 63, 30,252,219,111,
- 55, 94,191,126,237, 13,167,189,222,232, 67,222, 8,242,238,141,185,206, 27, 29,223, 27, 11, 25,125,201, 57, 10,101,230, 72,170,
- 51, 18,227, 48, 0,207,220,193, 56,189,141,116,167,112,174, 88,247,126,111, 17,237,233,210, 17, 17, 95,174, 30,253, 85, 48,251,
-192,166,241, 30,207,110,110,240,216, 64,176, 69,201,150,209,177,233,106,226,136,157,194, 35, 77,140,111, 61, 22,126, 91, 52,218,
-125, 0, 15, 45, 88,114,212, 70, 53, 49,103,204, 7,189,170, 86,154,139,208,206, 98, 93, 99, 22, 89,239,149,196,248,153,137,239,
- 5, 29,188, 87, 75,179, 61,198,204, 38,130, 44,166,154, 53,107,122, 35, 42,134, 55,250,190, 55,198,187, 55, 54, 85,222,216,248,
-121, 99,195,110, 6,104,157,216,252,188,135, 12,247, 79, 41,201,115,197,120, 51,254,112, 3, 89, 99,105, 35,211, 3,138,200,159,
- 79,179,200,104,255,239,100,194,211, 28, 50, 35,160,132, 44,124, 90, 87,234, 14,203, 36,144,116,109,193,140, 31,197,174,172, 97,
- 14, 54, 64,223, 48, 77,130,162,221,187,119, 11,215, 14,251, 4, 58,218, 77,183, 81,154, 51, 48, 95,202,142, 29, 59, 8,212,102,
- 32,106,135,239,147, 39, 79,148,185, 5, 2, 7,198, 34, 53, 51,215,153, 89,135,148,188, 95,120, 8, 30,251,250,190, 15,180,172,
- 72,178, 24,115, 82, 21, 72, 41,213,215,113,227, 78,172, 89,163, 6,230,233, 23,202,252,205,152,130, 62,165, 74,201,181, 66,133,
-132,204,103, 98,224,229, 52,169, 82, 61, 75, 24, 47,206, 72, 62,195,103,245, 6, 53,213,133,227,199,143,191, 5,146,190,160,237,
-235,231,231,167, 0, 45, 12, 28, 95,132,140, 81, 62, 17, 15,239,134, 85,141,104, 95,120, 71, 29,230,155,244,105, 19,221,185,115,
-106, 6, 40,206, 21, 57,129, 53, 99,127, 58,145,174, 73, 68,134, 23, 22, 89, 63, 80,124,230,247, 13,254, 46, 89,252, 59, 32,246,
-141,206,160,118,214, 57, 42, 35, 22, 95, 16,249,128, 79,122, 49,175,162,211,139, 92,118,108, 72,176, 46, 48,142,162,189, 68,139,
-247, 93,208,117, 70, 51,172,128, 86, 56, 0,231,105, 0, 44, 79,184,112, 97,241,183, 0, 92, 91, 0, 0, 44, 8,143,243,104,254,
-252,249,109, 31, 60,122,122,238,238,253,199,199,186,244, 26, 84,103,206,232,209,213,110, 95,187,246, 59,212,170,139,168, 70,212,
-107,119,235,255, 53, 33, 9,220, 9, 80, 53,251,228,217,203, 23, 79,159,191,118,117,197,218,109, 7, 55,111,219,181,127,207,158,
-189, 27, 17, 87,114, 41, 22,164,115,240,112, 78, 85,152, 86,141,232,138,159, 53, 41,201,194,164, 59,255,212,185, 43, 23,206, 94,
-188,118,121,249,154,173,123, 55,108,218,193, 64,216, 22,220, 95, 8, 41,194,177,124,249,242,153,162,153, 63,127,254,109,240,100,
- 63,217,239,222,163, 83,143,159, 60, 59, 75, 90, 76,144,106,205, 3,112,153,130, 77,194, 1, 44, 0,123,204,148, 19, 59,238,109,
-232,223, 83,125,253, 30,222,188,119,255,209,237,197,171, 54,109, 93,179,126,235,198,173, 91,183, 47, 32,248, 66, 57,233,217,221,
- 16, 77,236, 58,253, 24,252,154,187,215,243,136,199,233,229,229, 37,203,150, 45,147,153, 51,103,202,244,233,211, 5,237, 37, 25,
-115, 21, 81, 98, 92, 50, 84, 19, 34, 6,104, 65,248, 39, 1, 90, 4, 89, 90,128,229, 12,200,169, 96,203, 78, 66,198, 46, 99,223,
-238,170, 36,107, 1, 65, 22,218,214, 50,102,204, 24, 11,251, 43,230, 48, 5,100, 17,108,225,185, 5,144, 16,238,195,103, 85, 87,
-227, 93, 5, 76,216, 76,113,238,219,143,116, 18,139,255, 12, 0,152,148, 90, 16, 22, 41, 77,165,213,127,239,127, 41, 13,126, 95,
- 34,225, 83,148,107,162, 7,180, 64,231,171, 44,144,182, 13, 74,151,238, 26,192,150, 44,168, 90, 53,112,218,224,193, 55, 48, 86,
- 20,160, 69,144,128,185,206,251,240,225,195,222,191,254,250,235, 65,188,191,185,129,121,105, 12,164, 58,143, 56, 7, 49,232, 55,
- 54, 0, 10,136,126,249,248,128,248, 95,232, 38, 91,167,196,144, 73, 61,222,133,197,226, 39,193, 22,165, 91, 84, 37, 26, 28,155,
-142,167,158,164, 30,209, 32,241, 25,159,187, 94,220, 55,158, 94, 57,101, 90,192, 15,146,178, 64, 20,206,165,234,101,223, 70,217,
- 17, 94, 43,152,139,245, 15, 63,252,192,144, 90,209,144,236,129, 86, 84, 56,213,245,231, 6, 1,146,200, 32,252,159,213,238,229,
- 54,154, 88,224,119,169, 32,139,159,173, 91,183,246, 94,190,124,249,123, 32,203,215,215,215, 27, 27,120,163, 18, 45, 27,208,154,
-115,169,165, 44, 8,172, 41, 3,111,165,150, 82,189, 99, 73,242, 66, 17,130, 18,100, 10,255, 34,125,149,200, 82,123,122, 60, 25,
-251, 52,131,204,123, 86, 85, 90, 76,203, 33,144,132,105, 99,144, 58,234,159, 58,203,130,161,191,141,130, 34, 18, 75,141,180, 24,
-125,253,197,162, 69,139, 4,115,182,178, 78, 19,116,225, 62, 53, 13,206,218,200, 89, 65, 86, 81, 50,102,213,174,188,240,247,247,
- 23, 8, 66, 4, 18,125,198,159, 93,233,172,141, 12,213,202, 64,166, 47, 92,162,165,175, 58, 36, 15, 84, 52, 73,187,171,181,171,
-150,111,130,122, 35,128,141, 70,198,115, 80, 99,113, 20, 4,142, 83,210,249,243,231,149, 93, 50, 64,146, 18, 99, 15, 11,244,227,
- 45, 27,214,110,160, 61,151, 30, 63, 33,134,220,132, 65,225,235, 12,104, 97, 16,249,162, 97,125,177,107,211, 11,241,195, 87,125,
-149, 44,225, 87,167,111,159,152, 38,114,177,147,200,174, 4, 34,123,146,138,236, 75, 37,210, 41,158, 72,251,152, 34,173, 35,194,
-238,164,166, 92,157,249, 91,112,242,232, 17, 78,243, 25,189, 50,218,253,159, 22,129,155,149, 32,187,188, 58,119,238,204, 64,206,
-244, 8,238, 44, 92,140, 46,121,170, 29,217,153, 33,193,120, 2, 27,173, 27,252, 52,160,142,116, 70, 87, 11,180,222, 34,244,202,
-195,168, 81,163, 46, 64,102,251,221,151,203,114, 81,146,165,130, 44, 46, 92,131, 6, 13,178, 96,177,182,236,219,183,207,194,176,
- 62, 88, 32,250,255, 62,108,122,251,223,255, 24,211,112,255,134, 13,157,111,238,223,221,251,233, 73,239,246,200,123,155, 54, 91,
-186,149,126,151, 97,214, 95,127,253, 53,126,206,194,101,171, 78, 95,188,126,245,226,149,155,119,182,239, 57,228,227,117,196,251,
-230,217,163,222,167,207,159, 60,177, 9, 0,126, 59,222,197, 69,210,149,106, 86,251, 58,104, 37,102,205,248,123,209,138, 13,167,
- 47, 92,191,114,233,234,173, 27, 91,118, 30, 96,140, 67, 5, 24,157, 57,118,116, 57, 38,139, 13,144, 32,236, 50, 67, 19,210,134,
-209, 71,188, 79, 44,126,248, 56,224,124,192,179,231, 87, 85,122, 79,159, 60,217,242,232,254,253, 89, 0,161, 75, 32,221, 98, 31,
- 53, 92, 78,168, 11,199,206,250,123,241, 50,128,183, 59,247, 31, 60,241,219,180, 99,223,241, 3,251, 15, 28, 61,121,232,224,214,
-211,222, 94,115, 80,206,165,216,161, 27,162,137,241,241,120,255,254,253, 74, 16,113, 11,192, 20,218, 75, 1, 91,106,124, 79,168,
- 35,165, 93,187,118,194,224,227, 0, 37,130,176, 76,254,142,218, 72, 85, 29,218,131, 32,140, 83,118,119,215, 82,174,144,170,195,
- 16,228, 41,237, 82, 65,150, 35, 58,246,244, 41,233,114, 0,180, 66,208,212, 74,178,240,199, 38, 72,153, 45, 0, 45,150, 51,103,
-206, 88,192, 55, 11, 64, 38,219,124, 19, 36,116,202, 38, 1, 1,203, 41, 25,119,122, 17, 48,161,239,182,135,122, 56, 8, 32, 72,
-168,130, 39,223,126,254,249,231, 55, 8, 19, 85, 86, 5, 84,225, 83,150,173,253, 83,183,121,178,232, 72,144,100,174,208,237,101,
-180,180,149,115,242, 63,157, 62,255, 85, 90,132,201,154, 91,177, 98, 96, 80,173, 90, 50,255,199, 31, 3,255,236,219,247, 6,230,
- 78, 27,208, 34, 96, 32,224, 66, 91,186,178, 45,226,107,134, 87,171, 86,141,115,166,114, 65,170, 35,140,117, 74,137,230,249,163,
-243,197,231, 96, 11,245,175, 16,159, 14,128,150,193, 97,250, 46, 91,180, 84, 30, 73, 18,100,136,112,172,237,138, 12, 10,192, 26,
-117, 45,159, 20,105,157, 80,162, 38,242, 24,235,132,208, 87,224,229,105, 72,151, 4,227, 71,242,230,205,203,246,224,245, 30,208,
- 66,125, 94, 81, 82,194, 13, 1,214, 15,142, 77,135, 23,230,165, 77, 48, 1,240,110,216,176,161, 55, 54,224,222, 0,214,222,136,
-237,250, 78,253,218,163,207,141, 92,133, 75, 4, 38, 72,145, 42, 40, 94,210, 84,111,163,199, 77,254, 36, 98,180,120, 45, 64,200,
-229, 28, 15,192,100, 3, 90, 19,158,230,148, 30,167,146, 74,162,156,225,131, 98, 38, 15, 31, 48,110,210,152,211,144, 60, 30,153,
- 59,127,206,201, 90, 77, 43,223,207,213, 52,154,140,124,252,157,252,253,180,154,100,173, 18, 47, 72,181,233, 50,197,200,143,151,
- 57, 53,165, 78, 4, 68,236,191, 11, 22, 44, 80,214,107, 43,208, 90, 21,138,215,218,128, 22,129, 27,105, 18,100, 1, 11, 80, 26,
-158, 58, 20,244, 76, 61,242, 47,147,104,133,172,187, 6, 69,122,242, 31, 26,185,211, 38, 11,147,182, 34,193,225,174,153, 19,122,
-187, 54,109,222, 98, 71,254, 20,210, 3,255, 30,221,186, 5,115,144,176, 33,136,153,154, 55,111,254, 50, 86,204,152,179, 28, 25,
-205,219,115, 26, 32,227, 20, 65, 22, 19,236, 41,222,147,104,193,198, 68,145,106, 97,240,209,192, 85,239,250,105,216,228,234,254,
-207,159, 45,189, 27,188, 43,222, 67,217,155, 66,228, 64,122,145, 67, 89, 69,122,125, 43,210, 45,153, 72,199, 56,242,162,121,220,
-135, 62, 51,182, 92,237, 80,190,213, 19, 16,164,129,170,225, 11,229,157,195,122,162,172,193,236,208,252, 92,181,106, 21,109,180,
-230, 24, 38,242,126,198,111,161, 38,188,171, 21,247,242, 55,178, 49,116,138,217,203, 6,180,176,235, 80, 38, 90,130, 66, 16, 57,
-157, 37, 75,150,135,104, 47,170, 77,117, 7, 9,213,133, 4, 88,106, 26, 48, 96,128, 5, 59,103, 11,118,221, 22,148,237, 54,250,
- 64,191,205,219,119,246,152, 63,110, 92,157,235, 59,182,245,177, 28, 63, 50, 85,174, 95, 89,128, 73,105,157,157, 68,203,105,249,
-105,248,141, 9,114,202,204, 5,171, 87, 20,206,155,230,101,233, 31,210,190,173, 81, 38, 75,112,131,202, 57,131, 27, 87,206, 30,
- 84,175,108,230,215, 79, 31, 61, 90, 7,169,214, 85,171,129,188, 46, 47,152, 15, 11,237,156, 57,139,214,110, 88,180,106,231,190,
- 45,187, 14, 18, 76, 43, 32,203, 62,225,253,183,117, 9, 34, 3,140,203, 79, 98,177,248,211,251,248, 89,218, 97, 57,164,101, 9,
- 8,152, 6,169,214,113,230, 53, 66,147,117,135,196,110,194,140,191, 87, 46,115, 70,243,129,175,239, 95,144,106, 29,183, 26,200,
-187, 36,139,182,126, 1,105,136, 64,250, 39, 0,235, 2,123, 55,101,243,179,101,203, 22,217,190,125,187, 80,165, 80,187,118,109,
-134, 9, 18, 72,222, 4, 52, 41,137,125,239,114, 5,180,116,193,150, 14,208,162,202,208, 25, 88, 35,109,123,250, 46,108,181,212,
-114,183, 87, 37, 89, 4, 89,184,185,137,224, 10,128, 55, 4,200, 66,255,177, 16,108,225,255, 86,174,152,136,190, 51,160,101,203,
-150,130,252, 54,128,130,252,106,152, 49, 74,109,216,182, 74,250, 42, 94,198,125,189,166,121,201,228, 77,247, 37,124,234,114,192,
- 89,186, 64,203, 3,245,219, 50,115,248,240, 27,148,104, 81,178, 53,183, 82,165,192, 97, 93,187,222,128,132, 81, 1, 88,144, 96,
- 43,160, 11, 64,107,139,171,114, 66,170,227,175, 69, 80,191,252,242,139,162, 46,102,224,248, 43,167,150,200,205, 35,191,200,150,
-201,209,141, 72,180,140,116, 85, 37, 79,244,228, 30, 89,147,231,139,124,183,239,225, 28, 10,200,106, 60, 53,173,196,207, 24,254,
-102,228,120,138, 81,187,179, 56,154,121, 8, 84, 49,103, 8,212,245,228, 99, 79,235, 11,223, 83, 29,130,247,253, 89,126,130, 69,
- 6,189, 71,190,188,142, 10, 7, 13,200,166,123,247,238,121,163,190,222,152,119, 21,144,181,105,243,214,147, 25,178, 23,176,148,
-175,213, 42,104, 51,158, 63,121,217, 91,206, 94,245,145, 21,219,207, 74,209, 74,117,159, 71,138,149,244,144, 71,180, 4, 33,141,
-145, 53,196,181, 64,107,216,227,148,178,228, 97,115, 89,253,184,147,204,190,220, 76,114,150,251,246, 5,198,160, 87,135, 14, 29,
-104,255,229,213,180, 93, 61,191, 26, 19,227,202,148,128,252,242,219,170, 60, 18, 45,165, 71, 63,195, 76,252,200, 25,177,161, 94,
- 69,205,146, 42,117,130,109,226,243, 15, 4, 90,107,213,231, 41, 29, 35,112, 35, 77, 84,131,113,104, 83,127,228,234, 40,194, 30,
-107,242,252,216,239,250, 71,208,167,225, 59,140, 11, 21, 49, 36,236, 9,228,183,142, 29,223,178, 81, 81,184,148, 72,105,161,127,
-223, 54, 97,252,248, 96, 26,226, 81,247, 78,224, 1, 16,166, 21, 85, 58,173, 7, 22,254,211, 90,160, 5,195, 98,155,234, 16, 11,
-134, 47,129,214,222,189,123,105,167,229,202,206, 66,161, 31, 51,142,199,220,147,183,135,200, 5, 41, 34,167,222,196, 12,120,118,
- 46,211, 1, 57,156,231,141,120, 65,101, 56, 32,135, 4,245,201,252,230, 92,227,118, 7, 86,231,159, 18,176,181,218, 2, 89,215,
-109,161, 68, 15, 31, 85,111,247, 24,162,236, 84,231,145, 23, 48, 52,126,128,242, 93,194,231,125, 2, 36, 29, 53,159,145,118,252,
- 30, 59,133, 63, 49, 25,159,231, 39, 30,112,117,186,197,158, 30,109,162,168, 10, 26,207, 79, 78,194,108, 43,168, 32, 4,234, 19,
-129,122,139,162, 94,229, 59,108,169, 56,137, 17,196,209,160,177,128,179,130,209, 38,139,210, 1, 74,178, 8,178, 38, 77,154,100,
-193, 98, 96, 57,121,242,164, 5, 70,172, 79,161, 6,216, 11,169,195, 50, 95,168, 11,159,236,219,211, 41,232,202,249,133,242,234,
-229, 29,216, 91,241, 20,162,214, 70,203,105,221, 9, 32,192,187, 89,139,150, 44,159,255, 67,174,100,175,143,111, 93, 30,124,105,
-247, 90,185,117,112,163, 60,216,191, 44,184,229,143, 57,222,188,120,120,127, 19, 22,190,107,102,128, 22,108, 52, 22,174, 92,181,
-118,229,154,141,123,118,238,223,125,144,253,230,131,129, 22, 14, 23, 76,133,148,132,125,197, 33,173,215,129,129,127, 97, 82, 58,
-107, 6,104, 65,154, 49,109,233,210, 21,243,156,209,180,220,187, 59,139,170, 83,103, 64, 75,123, 50, 80, 11,180, 32,185, 81,164,
-206,147,102, 45,151,226,213,126,145,204, 57,242, 11,119,164, 0, 58,130,113,235, 18,104, 57,179,209,178,130,160,247,192,144, 22,
- 56, 57, 3, 70, 90,149,161, 43,160,197,126,171,188,199,122,242, 81,103,208, 84,165,193, 59,109,177, 32, 41, 83, 36, 89, 4, 89,
-234,198, 0,237,101,225,125, 74,178, 8,198,138, 22, 45,250,136,134,242,160, 89,209, 5,221,147,246,162, 32,130, 46, 44,176,194,
-185,141, 18, 46, 74,237,177,208, 75,175, 94,191,223,207, 85,189,175,208, 86, 43,105,222,166, 87,140, 0, 45, 0,164,173, 24,131,
-222, 4, 91,195,114,230, 84,192,214,172,242,229, 3, 61,219,182,189,129,131, 31,222,152,235,188, 49,215,121, 99, 83,233, 18,104,
- 65,170,227, 11,169,142, 64,170, 35,144,234,200,232,209,163, 21, 59, 26,108, 90,228,218,185,117,114,231, 68, 47,185,181,175,132,
- 2,182,120,185,176,209, 50, 50, 47,121, 68, 73,229,241, 77,234,194, 81, 31,143,184,156, 79, 1, 89,213, 6,167,148,168, 73, 60,
-150,123, 68,240, 40, 4, 2,246, 7, 85,180, 52,127,197, 1, 15,101,206,129, 52,235, 25,254, 80,109,207, 28,217,104, 69,199, 6,
-253, 5, 14,194,200,176, 97,195, 56, 71,105,237,123,109, 52, 9,180,104,236, 78,112, 74,219, 54,208,247,206,152,163,160,101,236,
- 92,108, 44,238,221, 18,223, 71, 47,229,236,141,103,178,251,244, 99,217,117,234,161,108,216,177, 82, 58,253,209, 53, 56, 90,252,
- 36,220, 96, 58,148,108, 65, 42, 53,237,143, 3,133, 20, 27, 45,166,145,254,223,202, 40,255, 52,226,121, 37,165,228,170,248, 13,
-154,255,185, 23, 54, 39, 52,178,247,218,190,115,219,145, 52,165, 35, 43, 42,196,177, 23, 75, 81,125, 72,147,132,127,196, 69,187,
- 41, 10, 60, 52, 82,167, 25,236,183,220,100,161,128, 60,121,104,246,242, 86,129,150,170,205,226,111,218,109,209, 30,204, 44, 49,
-119,126, 29, 14, 36,141, 25, 51,224, 33, 38,233,235,101,203, 42,170, 66, 72,111, 40, 9, 74,163,121, 44, 51,108, 73,252,111,213,
-173, 43, 87,178,101, 83,242, 36,135, 97,166, 17,198,106,129,150, 35, 27, 45, 72, 81,124,177,107, 49, 4,180,226, 38,244,240,185,
-255,102,177,156,148, 68,114, 92, 98,203, 41, 73, 45, 62,207, 11,220,126,115,190,230,133, 7,131, 58, 94,216,221,112,209,237,141,
-229,231,200,154, 66,211,100, 77,225,233,114,108,212,110,137, 29, 62,166, 81, 53,151, 82, 29, 26,168, 19,104,153, 52, 92, 55,194,
-138, 80,231,129, 4,201,143,226,121,168, 28, 57,160, 20, 3, 88, 14, 48, 74, 47, 8,174, 56,121,241, 59, 7, 9,213, 73,180,211,
- 57,114,228,136, 0,188, 28,115,246, 82, 26,190, 99,130, 81,212,133,148,100, 97,240, 90, 54,174, 95,107,169, 94,178,128,165, 74,
-153,226,138, 13, 12, 64,241, 65,128,184,133,120,199, 77,236,162,214,195,232,120, 35, 79, 35,130,166,189,139, 7,103,175,153,181,
-126,253,250,185,144,142, 45, 42,156, 45,206,203,203,187,151, 7,223, 30, 87, 42,248,193,204,134,193,129,115,155, 4,181,173,146,
-235,141, 88, 2, 15, 65,138, 74,149,143, 97,149, 28,212, 20,139, 49, 17,175,221,182,125,215,154,227,216,138,249, 28,245,162, 20,
- 66, 1, 72, 47,142, 30, 94, 39,207, 3,119,128, 39,166,104,130,222, 95, 0, 47, 11,174,223,188,181, 0,234,194,109, 42,189,215,
- 1,254, 59,222,222,247, 91, 4,144,185, 14, 11, 48,237,169, 12,151,115,205,154, 53, 51, 81,247,133, 27, 55,111, 91,120,124,223,
-190, 29, 87,189, 14, 29,189,227,125,248,152,255,241, 35, 59,159,123, 29, 90, 34,129, 1, 27, 80,247,189,206,104, 18,216, 12, 25,
- 50,164, 26, 19, 64,245, 43, 85,162,133, 5, 91, 81,121, 85,106,214, 95, 42, 87,109, 42, 37,210,167,151,166,101, 75, 42,146, 45,
-168, 12, 63, 8,104,217,192,144, 3, 53,162, 43,160,229, 74,154, 69, 96,165, 2, 57,149,190,222, 96,160, 11, 7,173,196,149,234,
- 66, 74,178,120, 15, 6,234, 10,240, 82, 19,165,176,111,223,190, 85,254,179,186,126,112, 70,222, 6,180,166, 78,157,170,156,222,
-228,133,204,218,116, 9,191, 67, 37,209, 34,208, 2, 57,111,130,173,201, 3, 6,220, 80,213,136, 51,202,148, 9,236,218,180,233,
- 13, 26,117, 83, 66,163, 7,180, 48, 54,125, 9,246, 40,197,226,166, 22,207, 40, 32,139,246,121, 55,174, 29,151,123, 87,151,202,
-131,115,158,242,232,108,103, 25,241, 91,244, 64,170, 12,157,156, 58,212,242,225, 43, 24,181, 87,135,145, 55, 93,202,216, 0, 73,
-156,212, 30,113,190,206, 26,241,210,192,147,185, 20,144, 85,117, 96, 10,130, 44,158, 4, 78,167, 55,206,209, 39,167,242,244, 51,
- 65, 33, 54,222, 7, 53, 47,115, 4,180, 60, 10, 20, 40,112,154, 26, 17,158, 72, 68,222, 17,142, 26, 9,135,113, 54, 3, 60, 43,
- 32,139,234,194,174, 80, 23, 54,232,216, 40,248,156,207, 81, 25, 48,253, 23,121,244,244,181, 92,186, 29, 40, 59, 78,248, 73,165,
- 38,121,164,124,157,244, 50,107,225,104,169, 80,167,216, 91,171, 26,241, 61,178, 81,191,245, 72,137,186, 47, 77,144, 57,220,165,
- 4, 25,195, 63,200, 80, 52,233,139,108,165, 83,191, 40, 89, 51,191,255,242, 53,139,207, 17, 96,253,248,227,143, 10,208,218,179,
-103,207,254,239,242, 37,181,244,190,144, 92, 70, 93, 45, 40,209,147,135,187,174,215, 87, 63,225,255, 85,121, 34, 16,130, 15,154,
- 90,164,102,226,137, 65, 43, 40,226,111,103, 23,255, 27,131,180,202,154,214,227,147,110, 33, 78, 43, 82, 82, 59,227,122,130,122,
-235, 73,196, 79, 88,181, 47,238, 85,170, 45, 36, 37,169, 52,161,122,207,189, 67, 49,173, 49, 60,171,151, 56, 70, 12,127, 63, 28,
-197,245, 41, 90, 84, 1, 81,169, 83,167,126,140,219, 90,131,197,124,165, 74,149,122,234,215,173,155, 92,205,151,239, 29, 24,139,
- 27,215,254, 84,130, 67, 78, 25, 1, 90, 80,127, 24, 2, 90,177,227,123,220,188,255,246,111, 57, 33, 9,109, 64,235,180, 20,188,
-237,249,112,202,133,186, 35, 31, 93, 88,212,124,243,255,129, 22,192,214,177, 97,187, 36, 70,248,232,134,202,169, 22, 30, 0,235,
- 60,119,181,148,100,105, 37, 90, 48, 64, 60,255, 25,187,194, 62, 78,104,156,124, 81, 6,101,113,160,248,152, 96,139,187,113,218,
-208,169, 54, 39,176,177, 18,216, 60, 41,187,115, 0, 46,167,167, 18,121,186, 16, 19,139, 5, 59,108, 11, 64,153,101,219,150, 77,
-150, 26, 69,115, 89,142,174,153, 99, 89,212,186,168,165, 90,217,226, 22,236, 60, 3,176,112,223,208,248,209,226, 46,212,140,205,
- 91, 77,156,224,220,139, 29,210,206,202, 69, 82, 62,187,117,104, 85,240,131,145,249,131,158, 77, 42, 31,244,114,114,197,160,225,
-237,106,240,228,197,147, 66,133, 10,113,146,118,230, 83,203,158,237, 53, 97, 51,183, 23,117,223,203, 83,135,231,188, 14,175,188,
-115,244,200, 54,255, 19, 71, 20,112, 20,124,235,250, 82,178, 7, 18, 57,123, 99,120, 87,205, 87, 19,253,123, 39,216,177,145,134,
-239,143,239,221,179, 73,182,222,222,191,183, 36,232,201,163,153,160,121, 15,170, 57,130, 34,195,229,164, 11, 7,148,115, 19, 13,
-223, 79, 31, 62, 56,239,214,225, 3,107, 31,123, 31, 92,111, 57,180,111,185,220,184, 58,139, 52, 81,119, 78,154, 14,105, 18,160,
- 16,100, 81, 74,164, 5, 90, 84, 29,194,246, 77, 74,150,175, 41, 53,114,231,147,206,121,178,200,228,134,181, 20,149, 63, 37,155,
- 85,170, 84, 81, 0,185,163, 10,235,216,104,217, 4, 62, 14,213,136, 78, 84,135, 4, 96, 78,129,150,245, 25, 45,208, 50, 8,182,
- 42, 82, 66, 69,137, 22, 65,191,106,147, 69, 73, 22, 1, 22,128,177, 98, 24,207,239,147, 39, 79,182, 32,239, 99,171,203,135,170,
- 46, 26,218, 6,180, 8,178, 56,118,184,123,231, 88,225,156,152, 35, 71,142, 96, 28,202,201, 18, 74, 27, 45, 15, 21,104, 17,108,
-209, 13, 1,109,180, 40,209,162,205,214,180,146, 37, 3, 59, 52,104,112, 3, 27, 26, 67, 64,139,182,119, 60,212, 64, 13,131, 10,
-178, 40,197,164,244,250,225,189, 75, 18,112,255,144, 98, 24, 95,190,104,252,135, 52,128,119,226, 71,203,198, 10, 0,172,193,101,
-187, 39, 21, 38,248,139,226,233, 63,110,150,194,197, 78,251,213,246,110,219,178, 40, 32,171,201, 95,105, 9,178, 86,224, 62, 79,
- 46,234,142,115,204, 11, 99,185, 1,220,176, 97, 3, 55,231,199, 53,124,111,203, 3, 26,180, 23,196, 61, 79,245, 62, 78,111,159,
-224, 28, 70,233, 43,238, 77,113,212, 78, 4, 90, 48,217, 80, 36, 89, 60, 72,144,187,104, 17,203,250,125, 75,101,250,138, 33,178,
-211,123,143, 92, 4,200,218,115,230,177, 44,223,239, 39, 61, 39,173,150,238, 51,206, 73,135,129,158,210,123,104,123,137, 18, 55,
- 37,199,146,203, 11,246,167,115,160,126,243,194, 59,142, 96, 14, 61,130,185,254, 8, 1, 86,137, 18, 37,188,249, 29,243,225,190,
- 73,127, 77, 56,153,178, 96,180,183,169, 10, 68, 11,138,157, 32,186,246,224,143, 30,249, 15,253,223,140,187, 5,195,239,210,113,
- 11, 65,211, 11,130, 46,130,175, 85,214, 68, 80,150,218,240, 11, 66,153, 17, 99,238, 61, 44, 18, 74, 82,159,227, 49,213, 62,221,
-254,243, 93, 89, 28, 25,160,161, 33,246,222,190,125, 91,104,147,196, 93,211, 31,253,250, 5, 97,194,217,133,236,185,145, 10,163,
-115,122,115, 1,167,196,132, 34, 70,210, 0,138,166,237,137,238,101, 15,180, 32,105,240, 5,130, 86,236,178, 86,175, 94,237, 11,
-137,135, 47, 36, 20, 4, 90,186,182, 47, 49, 98,123, 44, 58,118,187,167,156,151,124,114, 84, 98, 5, 12,243,111,124, 48,203,229,
- 13,111,114, 93,221, 42,185, 60,159, 73,198, 94, 1,111,202,183,190,118,112, 65,225,153, 1,155, 43,253, 45, 43,127,157, 43, 81,
-195, 71, 85,143, 23,235,150,149, 25, 96,187,164,248,209,194,162,170,216,104, 65,138, 19,196,223,176,101,155,109,136,128,243, 76,
- 5, 49, 25, 45, 1, 63,174,241, 19,217, 28, 29,115,118,246,116, 83, 26,145, 82,109,139,221,188, 2,176,216, 94,180,167, 35,200,
-226,105, 80, 74,176,216, 70,148,106,208, 48,149, 19,178, 30,208,162,218, 5, 19,154,101,247,174,237, 10,200, 58,177,113,190,101,
-251,168,118,150, 17, 63,166,179, 52,251,169,178, 5, 18, 72, 11, 78,246,152,146, 8,106, 42,192,137, 60, 81,165, 74,149,158,246,
-238,221,251,193,161,189, 27, 94, 5,120,255, 29,244,108, 90,241, 55,175,231, 85,123, 43,123, 6, 6, 61,188,119, 39,104,236,232,
-145, 7, 29,184, 56,112,198, 7,133, 38, 84, 42, 15,176,240, 6,162, 47, 30,135,205,216,198, 71,119,125,151, 62,191,127,111,185,
-188,124,177,157,224, 5, 11,239, 54,179, 52,161, 58,184, 15,245,233, 29,168,146, 14,128, 47, 75, 45,254,254, 51,223, 90, 2,103,
- 65,236,177, 22, 98, 67, 63, 24, 50,175,119,224,222,193,101, 57,177, 75,190, 15,255, 73,119,192,199,131,104,187,101,143,238,220,
-158,245,226,222,221, 57,242,194,178,158, 52, 39, 76,152,176,209, 85, 57,181, 64, 11,227,209,210,182,109, 91,193,105, 74,158,132,
- 21,168,112,101,197,242, 21,210,169,106, 69,249,171,241, 79,114,249,224,126,233, 4, 87, 44,200, 39, 56,173, 38,144, 60,190,116,
- 84, 56,103, 14, 74,237,129,144,189,154, 79, 85, 99, 58,162,233, 10,104,169, 82, 48,103,244,117,198, 84, 43,213,133, 3,220,107,
- 40, 54, 90,170, 26,145, 32,139,191, 7, 14, 28,168, 72,178,248,137,223,237,117,232, 41, 64,139, 32,139, 18, 45,130, 44,173, 68,
- 11, 60,107, 73, 21,161,129, 83,135, 14, 95,163, 5, 90,244,249,132,241,233, 61,188, 91,183, 27,148,104, 17,108, 77, 5,216,234,
-254,243,207, 55,244, 36, 90, 0, 27,119, 89, 54, 21,100,113,227, 68,169, 53,199, 60, 55, 88,156,151, 8, 18, 33,197, 19,140, 79,
-154, 9,232, 94,113,190, 11,231, 71, 48,197, 84,127,226,183, 10,216,130,148,167, 77,189,241,223, 42,247,168, 54,132, 77,150, 15,
- 92,170,230, 1, 49,163, 18,235,230,234,156, 3,163,248, 23,120, 46,150,181, 32,116, 82, 74,151, 16,180,239, 82,105,197,196, 97,
- 13,101, 46,181,218,115,253,236,168,208, 4, 90, 0, 66, 10,200,162,255,172,111,178,167, 8, 58,239,115, 73,188, 47, 62,150,147,
-215, 2,100,251,201, 71,178,112,247, 93, 41,223,160,128,148,174,147, 71, 74,212,206, 45, 85,218,180,146,193,115,118, 73,196,152,
- 9, 3,244, 24,129, 13,203, 54, 72,108,188, 33,109,246, 34,176, 2,112, 63,124,215,215,247, 72,236,136, 17,189,175, 45, 90,228,
-133,249,112, 63,128,237, 62,228,217, 15,254, 31,130, 42,126,135, 30,205, 48,252,223,140,187, 5,195,175, 53,225, 22,194, 48,205,
-176,200,248,133, 27,195,219, 75,178,156,186,119,224,174,194,131, 6,237,112, 70,186, 0,246, 15,175, 56,184, 57,152, 33,162,151,
-185,115,230, 4,215, 43, 88,240,105,203, 50,101, 2,142,192,216,145,131,154,137, 54, 13,245,235,215,199,201,180, 24, 83,104, 72,
-175,199,112, 76, 62,103, 48,153, 41,198,240,152, 28,124, 97, 32,236, 75,167,165, 4, 90, 48,232,245, 69,103,246, 5,195, 13, 1,
- 45,188,235,231,225,211, 75, 63, 58,247,118,206,245,196, 23,103, 60,140,123,126,149, 36,191,184, 86,210, 92,218, 32,105,186, 5,
- 72,242, 78, 1, 18,183,205, 83,137,244,179,255,195, 73,227, 46,159,235, 80,172,213, 3, 62,163, 87, 70,237,255, 24,136, 37, 96,
-112,252, 64,245,163,197,197, 11, 39,251,238, 35, 79,104, 12,215, 21,210, 0,178,117,177, 99,122,200, 73, 93, 21,211,242, 55,239,
- 27, 44, 91, 52, 0, 64,172,255,207, 20,253, 60,165, 91, 4, 89, 56, 89,167,128, 44, 26,163, 98, 39,166,128, 44,238, 46,169,110,
-224,196,236, 10,104,193,232,209,135, 64, 11, 19,154,165, 94,133,194, 54,144, 53,170,106, 58, 75,133, 60,233, 45,215,174, 92,178,
- 0, 88, 91,176, 64,154, 6, 90,223, 39,140,158, 45, 91,178, 88,231, 59, 53,171,243,118, 63,192, 95,133, 10, 21,252,243,228, 76,
-247,242,228,154,177, 65,175,239, 28, 13,126,125,219, 59,248,216,134,105, 65,249,115,101, 8,138, 19,221,131,198,151,174,236, 64,
- 20, 22,101, 2,205,172,201, 98,157,235,210,178,222, 51,156,136,181, 16,108,161,157, 56, 41,238,134, 49,235, 89,244,203,203, 84,
- 23, 66, 61,113,192,137, 35,208,247, 88,109, 79, 19,192,232, 30, 93, 56,240,116, 33,232,157, 64,253,207, 97, 7,190, 23,167,190,
-246, 56,113, 88,170, 75,179,114,229,202,247, 32, 41,217,131,114,110, 65, 57, 79,128,238,121,180,221, 62,216,180,236,213, 43,167,
-170, 58,164, 68, 11, 11,234, 69, 74, 2, 40,181,162, 77, 6, 37, 90, 4,221,108,115, 26, 24,211, 62, 11,155, 2,197,158, 7, 54,
-119,180,213,210, 74, 24,116,187,153, 35, 32,100, 80,242,228,161,250,206, 98, 57,181, 73,171,106, 12, 13,125,250,199,210,184,112,
-176,157, 46, 84, 85,134, 86,112,165,128, 45,222,131, 20, 90, 79,162,113,146,115, 24,221, 36,112, 44,209,229, 10, 37, 44, 4, 50,
-211,166, 77,163,170,189, 3,129,150, 1, 63, 90, 14,249,137,249,112, 27,165, 89,170, 68, 11, 99, 83, 1, 11,180,209,154, 88,172,
-152, 13,108,165,136, 18,133,246,147, 78, 37, 70,152, 23,238, 18, 76,209,254,201, 21,200, 98,251, 24, 5, 90,209,146,122,204, 32,
-192,210,130,173,239,203, 68, 15,158,242,164,176,114, 47, 95,227,248,193, 17, 99, 43,135, 9,140,120,114, 87,235,159,153,253,142,
-234, 39, 0, 96,242,111,162,179,142, 70, 53, 35,205, 26,152,112, 2,145,107, 79, 42, 71,121,233,241, 29,237,162,128, 84,172, 69,
-222, 9, 82,164, 12, 58,115,245,134,140, 93, 48, 95,134,207,154, 33,211,215,159,151, 33, 75,174, 73,249, 38,229,165,112,165,196,
- 74, 42, 87, 47,183,116,159, 10,147, 9, 3, 64, 11, 7, 17, 22, 64,130,169,128, 44,104, 1,142, 16, 80,193,250,224,192,197,137,
- 19,189, 86,198,142,237,125,125,201, 18, 47,188,123, 63,230,128,253,152, 95, 15, 64,141,203, 77,241,167,186,204,184, 91, 48, 83,
-166,212,200,108,196, 45,132, 25,154, 31,156, 87, 99, 12,175, 96,145,127,213,101,143, 34,233,162,129,174, 26, 32, 81,122, 4, 16,
- 36,144, 16, 40,146, 19, 78, 68,183,155, 54,149,123,189,123, 43,146, 44, 78, 80,220, 9,174,135, 62, 30,157,239,222,238,109, 91,
-214,209, 53,132, 14,115, 34, 64,205, 65,103,157, 10,208,162, 36, 11, 18, 24,122,123, 80,128, 22, 78, 10,249, 2, 52, 40, 64,203,
-224,169,195,136,225,227,199,184,220,249,244,174,224,170, 55,160, 38, 57,187, 76, 98,157, 91, 41,241, 1,184,226,183,125, 42,177,
- 90, 3,100, 53,247,151, 66,131,158, 73,149, 33,231,131,195, 69, 73, 64, 79,236, 17, 67,209,128,213, 85, 63, 90, 88, 36,233,247,
-165, 86, 40,104,216, 30, 1, 72, 58,206, 73,177,107,215,174,143,160,154,188,202, 79, 2, 46,222, 55, 65,119, 2,164, 56,138, 63,
- 51, 62, 75,144,197, 99,252, 4, 89,144,140, 40,110, 55, 6, 15, 30,172,216,238,208,191, 18,243, 98,135,238,212,142, 14,187, 28,
- 31,250,204,218,191,119,143,165, 94,222, 20,150,245,253,234, 91,236, 65, 22, 37, 5,102,129, 86,250, 68,209,179,148,200,146,202,
-239,200,138, 25,178,184,109,105,249,173, 89,157, 32,204,220,201,227,196,242, 24, 16, 55,134,199,249,104,145, 61, 94, 32, 5,151,
- 46,154, 55,104, 64,105,143,215, 37, 51,123,208,149,130,203,139, 52, 75,102, 78,117,247,216,218, 57,150,197,191, 22,183,116,109,
- 81, 47,144, 52,241,144,153,176, 62, 33,222,161, 71,211, 96, 8, 30, 83, 52, 13,134,224,177,209,212, 2, 45, 0,255,134, 88, 84,
-207,162,221, 30,168, 9, 70,211,143, 97,175, 17, 0,251, 60, 11,128,213, 19,148,249, 30,164,207,190,248, 78,195, 96, 74,163, 13,
- 95,246, 64,136, 18, 51,220,243,228,125, 61, 34, 42,208, 82, 92, 54,104,193,150, 70,213, 24, 26,250,244,248, 78,207,239,120,255,
- 2,158, 42,228,233, 66, 26,190,171,234, 66,141, 36,107, 1, 60,226,211, 38,175,170, 78, 89, 79,170, 32,139, 18, 45, 74,135,120,
-193,181, 3, 55, 37,219,113, 34, 49, 34,129,150, 1,207,240,142, 94, 19, 14, 64,207,230, 3,138, 64,129,174, 29, 32, 89, 86, 12,
-187,127,174, 82,229,198, 28,171,235,135,222,223,125,231, 79,191, 91, 32,226, 16,108, 17,104,113,156,235,129, 44,150, 29, 7,107,
-124,245,218,199,250,127,162,104,201, 60, 54,104,193,214,184, 59, 5, 20,144,213,102,105, 6,137,154,212,131,128,226, 59,131,180,
-108,217, 32,129, 90, 69, 87, 64, 52,136,111,213,170, 21,249, 56, 29,127,210,151,150,122,197, 1, 0,251,147,167,100,185,249,155,
- 61,123, 54,215, 15,122, 34,119,120,161,111, 43, 64,139, 32,139,167, 15,115, 21, 42, 19,184,116,219, 25,233, 57,188,181, 2,170,
-154,245, 25, 42,109, 39,157,147, 6,195,143, 73,201, 38,141,149,123,245,123,252, 33,245,122, 44, 48,170, 58,236, 9, 0,124, 4,
-118,184,148, 94, 29, 4,208,218, 71,117, 33, 54, 66, 7, 46, 79,158,236,181, 38, 65, 2,239, 71, 15, 30, 28,194, 26,120, 0, 82,
-108, 2,173, 79,121,234,240, 99,185, 91, 8,107,183, 16,102,187,137,195,252, 95,184, 68,203,117, 80,105,251,202,169, 14, 75,233,
-132, 52,117,138, 20,129,148,152,112,151,167,120,136,205,152, 81,174,230,202,165, 72,177, 8,178,182, 97, 48,197,143, 27, 55, 32,
-209,215,241, 7, 25,113, 88, 10,123,145,122,191,255,254,251, 21, 21,104,161, 83, 43,192, 10, 59, 10, 95,108, 34,124,177,251, 86,
- 64, 23, 79, 29, 98,145,112,228, 3,199,145, 51,183,236,113, 82, 37,191,221,230,204,206,224,118,190,199, 36,235,149,205,146,224,
-194,106, 5,104,165,235, 17, 32,181, 38, 90,164,234,176, 43,193,209,227,167,160, 47,144,236, 14, 90, 88,207, 65, 92,122,128, 44,
- 63, 74, 6,120, 65,245, 67, 85, 13,109,157,156,133, 9,226, 43, 92,210,164,221, 23,105,193,102,135,134,182,223,243,211,234, 25,
-222,149,221,151, 61,205,172, 60, 22,205,182,224, 4, 76, 80,204, 93, 56,140, 55, 21,105, 6, 84,176,138, 77, 4,157, 27, 82,226,
- 97, 61,217, 51,213,174,254, 54,154, 42,208,162,205, 75,253, 74, 37, 44,181,115, 36,182,252, 88, 40,139, 77,146,197, 69,204, 32,
-208,178,209,252, 46, 73,140, 12,197, 1,136,142,174,157, 27,188,105,104,107, 25, 89, 37,125,112,198, 36, 49,104,215, 20,226, 42,
-158,201,195, 71, 46, 44,127, 43, 3, 61, 44, 37,179,120, 92,113,213, 70,153, 65,179, 84,150, 84,119, 84,181,230,152,106,233, 45,
-160, 73,163,116,179,151,173,156, 95, 10, 77,173,234,208, 94, 90,244,222,111, 23,174, 23,244,250, 39, 25,105,119,234, 80, 81, 77,
-234, 48, 56, 68,255,204, 1, 59, 45,140,153, 42,122, 64, 75,125,143, 19,250, 14,199, 17,253, 99, 81,250, 74,176, 69,103,186, 4,
- 90,252, 52, 40,201,178,209,196,130,223, 25,118, 92,193, 52,222, 38,200,162,122,157,210,123, 26,103, 3, 4,175, 80,253,104, 49,
-198, 33, 99, 29, 50,230,161,145, 16, 60,228, 19,108, 25, 43,117,239,222,125,175, 42,209,162,209, 59,193, 2, 22,108,111,204,117,
-222, 24,163,222, 99,123,247,190, 49,189,116,233,192,183, 56,141, 72, 79,242,244, 40,175,225,177,173,156, 0,152,119, 41,109,163,
-212, 90,181,205,228,124, 76,187, 45,213,128, 95,153,156,244,129,150, 61, 63,147,189, 7,182,110, 23,144, 36,185, 34,223,195, 9,
- 67,230,117,228,177,222,190, 27,216,211, 76, 1,137,239, 11,170, 57, 9,182,224,188,148,142, 75, 95,211, 56, 30, 39,181, 79,214,
-169, 83,231, 57, 37, 94,172, 7, 77, 26,224,130,134,246,191, 73, 92,204, 75,138,234,144, 32,139,159, 3,134,140,184, 81,162, 74,
-179,160,237, 71,206, 72,217,218,233,164, 97,255, 5,240,220,126, 82, 42,244, 61, 42,133,127,153, 44, 37,171,167,150,191,215,172,
-144,111,178,151, 9,180, 51,134,119, 54, 39,127,135,249,124, 43,230, 81, 8,215,188, 14, 16,100,225,147, 64,107, 31, 52, 45,251,
- 31,249,249, 29, 66,223, 56,128, 53,234, 0,108,149,121, 58, 84,123, 58, 92,111,237, 48, 59, 39,217,175, 29, 97,229,110, 33, 68,
- 57,195,200, 45, 68,152,215,253, 11, 7, 90,230,218, 90, 27,130, 39, 81,252,248, 67,227,196,137,253, 0,170,193,231,176,141,176,
- 57, 44,165,132, 4, 59,203, 64,160,251, 59, 73, 19, 38,232,111, 52, 4, 15,118,102,135, 49, 57,208,173,191, 47,244,242,183, 41,
-185,226,119, 12, 34, 95, 56, 9,188, 1,113,179,226, 87,139,247,105,164,104, 2, 20,101,254, 42, 97,188,139,249,250,119,121, 84,
-111,223, 74,233,112,211, 75,126,157,237, 47, 85,250, 31,151, 44,213,134, 62,242,136,154,152,113,208,236,131, 94,171,228, 93,118,
- 24,216, 79, 45, 36,208,164,141, 22,237, 32, 24,235,208,106,236,185,208, 5,103,245,128,150,226, 25,222,228, 73, 70, 71, 52, 87,
-194,174, 77,153,112, 41,130,135,199,125,101,114,195,130,163, 56,178, 36, 40,196, 46, 76,118,237,218, 37,144, 80,114, 66,115, 26,
- 67, 80, 5, 90,224,191, 5,147,138,229,202,229, 11,150, 64, 44,102, 84, 23,170, 32,203, 44,208,202,156, 44,214,226, 35, 43,103,
- 40, 32,107,248,143,223, 7,229, 78, 25,203,151,106, 68,135, 64,235,200,159,111, 8,180, 74,103,241,160,212,209,233,100,158, 57,
- 89,236,197, 71, 33,201,162,237, 24, 37,110,185, 83,196,244,165,202,207, 92, 47, 87,114,255, 31,104,125, 33, 52, 63, 53,208, 82,
-165, 87, 90,208,101,180,207,219,219,105,217,159, 80, 84,253,104,217,131, 58,103, 11,174,221,253,170, 86,207,239,237,161,198, 63,
- 71,160,133, 79, 2,244, 86, 6, 36, 89,182,118, 39,104,130, 4, 48, 35, 0, 23,231,154,255,251,204, 2,200,130,100,232,235,255,
- 59, 44, 45, 87, 43, 78,150, 58, 71,195,167, 46, 83,213, 40,208,194, 92,183,134,167,229,152, 24,231, 16, 27, 31, 5, 40, 48, 12,
- 15,188,155, 31, 66,156, 87,111,122,138,239,134,121,207,243,187,239,252, 24, 27,145, 49, 18, 29, 1, 45,140, 77, 5,104,233,129,
-172, 80, 0, 45,190,206, 6,182, 38, 61, 44, 36,197,219, 39, 18,248,202,234,130,251,169, 13,142, 41, 71,243, 82, 81,196, 65,125,
- 66,159,110, 60, 33, 9, 55, 49,138,138, 27, 39, 69, 21,233, 59, 37, 94,140, 96, 0,117, 57,237, 6,139,185, 26,239, 12, 20,205,
- 24,134, 76,104,147, 77,144,226,110,138, 22, 55,233,211,150,189,166, 5, 47,218,126, 82,218, 12,153, 36, 85, 7, 28,151, 18, 61,
-189,164,209,136, 35, 50,107,245, 74,169,249,139,231,219, 72,177,225, 75, 43,164,132,208,233,156, 12, 9,112,107,156,224,222, 5,
-169,214, 17,168,118, 15, 66,242,184,191,127,255,254,135,192,239,253,148,100, 65,109,123, 0,155,218,109,208,178,216,187,177, 9,
-115,176,161,157,151,240, 61,172,220, 45,132, 40,103, 24,185,133,248, 24,117, 55,216,229,254, 5,217,236,131, 74,239,216,178,113,
- 61,236,175,166, 98, 87,181, 44, 89,156, 56,183,144,110, 96, 18, 89, 24, 43, 70,180, 9, 84, 23,154, 9, 42,141, 93,222,118,236,
- 98, 46, 99, 7,113, 5, 32,237, 15,156, 22,187, 72,251, 44,184,138,184, 2,148, 61, 20,199,212, 47, 64,124,235,139, 73,148,254,
-111,242,184, 26,128, 14,254,139,128,123,141, 61, 98, 68,159,239, 17, 39,214, 13,143, 40,241,111,120, 68,138, 53, 95,185,231,129,
-253,153,243,203,101,135, 97,160,103,171, 31,173,135, 56, 49,119, 7,170,207, 7, 31, 16, 0, 90, 41, 5, 79, 44, 90,125,113,113,
-113, 72,135,157, 30,126, 42,190,185,104,171,225,236,114, 84, 78,122,127,223, 68,169, 21,193,150,234,188,142, 19, 50,233, 81, 93,
-200,157, 37,108,141, 40,141,104,226,138,159,152,200,124, 8,176, 48,161, 43,190,136, 96,188,251, 30,200, 50, 11,180,242,167,142,
-115,116, 78,179, 66,193, 4, 89,185, 82,196,186, 67,245,156,163,202,229, 77,239,113,154, 82, 45,166, 2, 25, 60, 28,185,160,176,
-213, 61,255,183,177,143,206,111, 85, 88, 1, 89,121, 82,196,188,237,140,166,129,161,248,197,209,212,170, 14,245, 36, 90, 58,206,
- 63, 77, 77,146,161, 1, 90,228, 63, 85,136, 70,124,100,185,160,111,164,156, 85, 49,111,112, 81,117,229, 47, 75,219, 29, 66, 0,
- 45,163,241, 14, 29,229,211, 16,125,175,156,144,222, 47, 6,200,216,139,185,109, 31,230,206, 94,152, 59,118, 83,109,136,208, 78,
-251,176,176, 3, 91,125,183,147,241, 14,113,242,110,127,106, 15,143, 30,185,194,135,159,136,157, 96, 25, 71, 52, 9,180, 56,182,
- 85,205,130, 35, 73, 86, 40, 37, 90,234,235,146,225,116,225, 60,156, 68,188, 23, 53,161,199, 68,220,228,193, 28, 61,207,247,234,
-179,206,218, 40, 25,230,148,125,240,149,165,216,107,209,132, 1, 7, 24,120,106,150,155, 85,218, 12,134, 62,160,118,212,248,201,
- 0,164,142,102,255,161,154,165,253,176,213,210,119,230, 81,233, 62,229,136,212,237, 49, 95, 82,103, 45, 30,232,196, 97,169,171,
-190, 20, 30,182, 90,237,177, 46,109,129, 49,255, 33, 72, 30, 15, 17, 28, 99, 30, 61,136,245,234, 0,218,106, 11, 54,170, 60, 88,
- 97,207, 19, 35,253,211,192, 84, 20, 34,139,150,230, 40, 30, 70, 11, 3,119, 11,246,229, 12,173, 91, 8,135,227,200,108, 5,221,
-249,173, 28, 32,216,162,100,139,106, 68,218, 93, 57, 50,114,167,209, 60,237,185,152,135,121,249,140, 29, 3, 29,117,194,180,216,
- 21,108,192,196,154,147,121,209,121,171,194,174,228, 52, 63,249, 27, 82,172,170, 72,103, 33, 78,110,225,164, 49, 62,118,199,126,
-239,181,144, 58,213, 3,240,248,149,159,252,147,159,112, 18,103,251, 29,154,114,130,159,165, 32,129,170, 11,245, 65, 77,128,171,
-170,176,165,170,137,137,168, 46,118, 26,142,192,165,222,132, 70,176, 53,143,134,238, 0,178,247,248,169, 38,216,154,248,209,231,
- 22,254,167,202,208,145,253,135,141,159, 60,105,138, 29,163, 15, 19, 79, 22, 50,209, 30,203, 62, 97,209,120, 79,245,231,172,221,
- 51, 38,137,249, 67,254, 84,177,246,101, 75, 26,115,111,166,196, 49, 50,126,192, 0,179,149,147, 52,243,165,138, 3,154,177,246,
-252,215,104,106, 29,150,242,187,222,111, 23,252, 54, 61,142,172, 18, 40,207,176,164,169,165,229,132,190,233,114, 26,232, 99,159,
-138,102, 90, 44,222, 11, 97,119,169,206,117, 63, 98,238,219,129,249,237, 71,235, 92,247, 35,164,105,187, 48,215, 53,209,155, 67,
- 32,213,241, 2,104,185,107, 77,190,180,195, 98,194,239, 59, 76, 0, 98,183,213,132,249, 84,235,191,202,158,180,171,186, 39, 66,
-102, 58, 52,230, 28, 20,219, 0, 31,245,230, 37,245,127,250, 95,164,253, 25,231,160,161, 72,156,219,179,235,208, 55,210, 70, 95,
- 69,140, 22,191, 53, 93, 56,208,232,157, 41, 74,156, 20,251, 92,132,224, 49, 66, 51, 3,120, 61, 8,237,180, 18,109,183, 7,105,
- 21,230,187,193, 40,107, 6,189, 54, 50,193, 47,189,172,218,114,198, 68,102, 58, 30,253, 80,119, 11, 70,234,174, 87, 46, 51,125,
-201, 44,173,127, 67,126,221,240,131, 31,171,146, 95, 74,227,186,203, 25,182, 61,192,205, 79, 55, 63,195,138, 3,238,190, 20, 86,
-156,124, 71,199,205, 79,227,252, 52,226,210,194,205, 79,227,252,252,183,231,116,109, 12,255, 17,107,239,238,132, 97,203, 92, 55,
- 63,221,252, 12, 43, 14,184,251, 82, 88,113,210, 13, 96,220,125,201,221,151,194,150, 3, 95, 38, 53,151, 18, 45, 14, 18, 71,201,
- 76, 85,157,209,112,117, 95,143,190,155,166,227,118, 9,109,123,185,249,233,230,167,209, 62,224, 30,155,206, 57, 96,148,135,218,
-124,110,126,186,249,233,136, 3,255,229,190,164, 55, 38,220,255,155,224,128,123,167, 99,130, 89, 6,178,186,249,105,128, 73, 38,
-178,184,249,105,130, 89, 6,178,186,249,105,128, 73, 38,178,184,249,105,130, 89, 6,178,186,249,105,128, 73, 38,178,124, 12,126,
-154,120,253, 63, 46,171, 91,117,168,211, 36, 31,163,195,184,105,134,237, 56,112,243,211,205,207,176,226,128,187, 47,133, 21, 39,
-223,209,113,243,211,205,207,176,229,192,151, 77,237,147, 27,197,255, 27, 7, 32, 13, 36, 25,179,107, 55, 18, 61, 48,243,147,191,
-237, 13, 39,141,214,157,167,123,134, 32,241, 36, 31,233,241,115, 16, 18, 79,155,216, 95, 70,105,154,233,166, 95, 36, 77, 30,151,
-199, 41,181, 17, 76, 56,125,165, 36,156,186, 26,129,147,147, 74,130,235,144, 17, 56, 57,212,235, 35, 2,108,103, 71,223,223,227,
-167, 90, 86,109, 57,181,101,253,200,229,116,198,130, 47,178,221,205,116,108, 23,121,255, 9,117, 79,143,211,109,222, 40, 99,168,
-157, 30,135,146, 23,255,132,186, 27, 41,186,187,156, 70,184,100, 60,207, 39,229, 39,230,183, 95,224, 73,128, 39, 97,237,253,142,
- 25, 47,241,151,153,211, 53,200,130,131,208, 93, 76,106,221,112, 68,120, 63, 38, 2, 63, 51,137,207,216,241, 38, 68,227,242,127,
- 44,130,126,246, 9, 11,205,115,103,239,193,127, 12, 29,162,189, 62,105,135,177,123, 55,221, 35,172,199, 34,190,108,226,196,137,
- 63,193, 7, 78, 87, 56, 7,237,132,144, 60, 75,113,127, 19,146, 22,108, 25, 41,103, 65,120,159,190, 4, 63, 59, 67,225,225,186,
- 45,130, 64,119,134, 35,212, 63,154, 54,109, 58, 3, 14, 20,233, 96, 53,207, 63,168,238,102,186,189,145,186,155,161,199,188, 33,
-104, 18, 96,193,145,234, 84, 38,132,130,154, 10,175,206, 83, 17, 74,101, 42, 98,115, 78,133, 47,176,169,240,238, 61,149, 96, 43,
-172,129, 22, 92, 94,228,194,187, 15,194, 15,218, 91,124, 30, 64,202,161,215, 70,246,101,133,127, 50, 91, 89, 17, 4,225,163,148,
-211, 0,115, 63,122, 27, 25, 40,131,145, 44,142,202,217, 28,110, 76,150,195, 47,213,109,184, 70, 57, 5,247, 37, 12,241, 98,239,
- 89,220, 21,109,189,186,199,193,195,163, 17,139,239, 0, 92, 47,220,134, 63,172, 3,252,141,196,251,206, 46, 61,154,218,231,210,
- 23, 43, 86,140, 65,208, 5, 94,233, 25,123,213, 25,216, 50, 67,211, 8, 47,223, 27, 71, 70, 31, 10,235,113,100,224,189,238,186,
- 27, 96,146,137, 44, 78,249, 73,215, 77,152, 43,151, 35, 93,135,171,144, 87,240,126,255, 10,254, 45,175, 35,110,236, 10, 56,157,
-117, 21,187,216, 41, 77,172,231,116, 68, 78,135,220,207, 48,134,238, 99,147,121, 3,244,233,166, 66,215,109,136, 61, 22, 49, 81,
-199,207,157, 85, 63, 4, 15, 42, 87,140, 73, 45, 41,118,225, 55,233, 20, 15, 1, 92,109, 49, 13, 17, 0, 87, 9,190,202,251,140,
-123,136,184,120, 74,212,120,122, 44,134,135, 99,225, 51,174, 22, 29,160,219, 91, 88,100, 84,191,122,202, 39,127, 3,120, 5,145,
-174,253,197,123,140,241,165,183,144,133, 1,119,141, 14,234, 54,232, 64,243, 3, 3, 45,231, 30, 60,124,114,177,106,221, 95,106,
- 44, 91,177,162, 5,188,197, 47,198,196,185, 10,229,160,100, 75,189,244,104,198, 1,200,186,140, 16, 29, 13, 60,251, 15,238, 88,
-229,167,150,205,115,253, 80,166,106,139, 22,191, 84, 67,232,135,129, 8,167, 51,205, 10,182,180,146, 45, 61,154, 30,232,204, 27,
-177,176, 95, 96,194,247,205, 6,120,163, 75,211, 0, 13,251, 44,122, 52, 29, 57,143,117,229, 80,246,189, 5, 66, 5, 47,112,224,
- 56, 21,158,156,167, 98,209, 98,128,218,169, 8, 53, 52, 21, 14, 6,167,194,209,224, 84, 0,251,176, 6, 90, 17, 48, 41,221,154,
- 63,127,190,140, 28, 49,130,113,255,152,236,125, 22,189, 87,119,181,172, 4, 85,112, 60, 56, 21, 14,121,167,194,147,249, 84,132,
-159,154, 10, 47,252,110,160,229,186,131,217,243,179, 7, 34, 74, 40, 14, 28,233,200,145, 97,167,232,172, 23, 14, 37, 31,129, 76,
- 90,131,125,213, 85,255, 76, 8, 16,253,112,242,228,201, 74, 96,100, 6,104,103, 84, 5,120, 9,103, 28,210,135,160,159,208,201,
- 59,244,250,188,237, 49, 74,178,224,135, 79,208, 31, 20, 7,195,216,104, 49, 64,189, 35,176,101,148,102, 56,204,147, 29,145,214,
- 98,204,111, 65,234, 15,122,206, 66,231,184,162,153, 20, 62,190, 14, 96,115,235,199, 4,137,132,146, 64, 47, 72,221, 8,115,147,
-140,121, 94,240, 91,187,169, 54, 90, 78,131,205,163,100,115,211, 52,195, 45,253,188, 14,249,137,246,108,142,141,196, 43,248, 11,
- 19, 0, 44,129,243, 92,201,150, 45, 27,251,164, 20, 42, 84, 72, 74,149, 42,245,170, 68,137, 18,205,245,250,124,193,156,137,155,
- 22,204,157,228,214, 15,121,146,249, 50, 21, 45,152,142,209, 68, 4, 78,126,149, 16,113, 76, 8,118,255, 22,126, 34,111,128,150,
- 83,176,101, 13, 42, 29, 2,139,232, 87,237, 11,201,161,198, 23,210, 22, 23,200,246, 38,131, 70, 51,108, 2, 98, 63,233, 38, 6,
-158,214, 3, 90, 64,181, 10,208,226, 4,166, 38, 21,104, 17,208,217,191,135,129,171, 25,227,235, 83, 2,173, 90,153, 61,132,137,
-222,172,153,180,191,139,124, 23,141, 33,110,126,186,247,224,201,101,164,227, 69,203,214, 46,222,173,126,253,252,215,206,157,107,
- 3, 79,194,115, 81, 78,170, 17,141, 2,173,161,121,242,228, 25,210,235,143, 33,157,124,110,250,157,184,229,123,255, 72,241,202,
-141,170,148,173, 88,163, 84,129, 2, 5,114, 32,182,214,216, 17, 35, 70,172, 0,177, 65, 38,104,122, 32, 92,208, 5, 72,117,148,
- 9, 28,223, 41, 21,211,187, 62,245,132, 70,231,141,244, 82,175, 56,127,181, 94,252,206,123,138, 99, 71,189, 65,205,255, 85,240,
- 2,190, 79,189,116,233,210, 84, 44,136, 83, 17, 63,110, 42, 2,105, 79, 93,179,102,205, 84, 4,171, 13,115,160,149, 60,121,242,
-172,136,211,249,242, 79,120,185, 86,195,199,224,243, 45,138,163, 85, 35,190,199, 79,170, 12, 41,121, 35, 32,132,231,233,231,216,
-225,189, 70,184, 24, 37, 33,232,240, 51, 0,106, 46,180, 39,172,137,177,212,236, 47, 71,109,148, 6,206, 46, 87, 32,221,192,243,
- 65, 76,152, 44,111,224,247, 24, 60,172, 13,224,107,136,159,154, 76, 41,241,157, 30,214, 43, 57, 73, 21,225,217,219, 25,160,113,
-214,151,194,138,230, 55,224,101, 48,194,163, 40,158,198, 75,151, 46,253,186, 74,149, 42,193,244, 56,206,223, 40,111, 7,189,206,
-110,253,223, 85,159,111,186,104,209, 34,193,102, 71,137, 19,138,136, 10, 22, 4,124, 23,134,220, 98,128,118, 60,223,196, 72,255,
-212, 41, 71, 85,148,251, 41, 55,172, 0,221,130, 0,211, 4,113,142, 98,167,186, 42, 39,157, 20,119, 67,218, 4,137,222,243, 46,
- 93,186, 4, 64,138,251, 2, 27,140,128,223,126,251,237, 4,128,210, 37, 44,162, 70,205, 15, 40,137, 31,136, 16,104,190, 8, 95,
-244,146, 49, 31, 57, 31, 51,134, 34, 55,215, 12, 59,198,200, 24,220, 92, 51,113,110,129,100, 87,187,169,174, 98,144,239,102,178,
-125,146,121, 9,227,230, 53, 10,197,118, 37, 63, 61,244,126, 27, 28,155,102,234,233, 40,239, 39,169, 59,192,114,107,108,246,149,
-185, 12,210, 43, 5, 92,217, 39, 0, 45, 65,248, 61,169, 90,181,170, 35, 21,160,173,156,133,242, 36,241,121,120,229, 47,145,199,
- 75,148, 52,102,112,179, 64, 2, 45,132,233,147, 49, 99,198, 8, 3,136,115, 83,132, 0,226,111,172,146, 45,135, 60,114,132, 69,
- 62,148,153,159,240,121,123,181, 97,200,223,206,128, 22, 7,218,225,195,135, 5,187,111,221, 68,160, 69,112,230,170, 82,248,255,
- 54,165, 96, 20,153,171,137,191, 41,209, 34,226,181,127, 15,239, 65, 10,102, 52, 18,189,250,234, 38, 88,108,198,225,135,209,221,
-109,136, 34, 19, 92,161, 51,212,117,148, 48,161, 61,194, 4,220,249,167, 95,254,168, 95,185,102,203, 50,155,231,205,107,118,125,
-251,166,182, 15,247,239,108,128, 62,197,197,210, 76, 89, 15, 78,152, 48,161,117,229,250,157,127,245,123,240,248,220,195,199, 79,
-207,246,237, 61,248,231,191, 70, 14,107,188,100,228,176,154,222, 7,246,214, 66,140,173,157,160,169,231,133, 61, 68,249, 9,180,
- 56, 73,178, 99, 3, 24, 56,138, 25,248, 9,251,221,123,175, 82, 64, 22, 47,235,228,198,223,142,238,241, 65,151, 18, 46,130, 23,
-170, 12, 85,105, 22, 1,140, 10, 94, 84, 0,131, 73, 68, 11, 96, 78,128,166, 35, 16,163,203, 15, 76, 68,155, 57, 25, 97, 55, 38,
- 93,126,251,237, 37, 63, 53, 64,203,149, 23,110,133,182, 90, 86, 2, 66,130, 44,246,107, 71, 23,219, 13,217, 89, 78,189, 43, 35,
- 2,174, 63,129, 68, 44,152, 11, 31,233,113, 49,228,248,169, 86,173,218,115,244,127, 2,236,136,122, 68,156,252, 95, 17, 65,201,
-139, 66,218, 82,216, 81, 2,200, 41,134,178, 59,219,225, 58,123,101, 88,209,100,159,168, 2,254,111, 68,196,131, 81,214, 62,146,
-147, 33, 94, 24,156, 24, 97,109, 24,210,229,131, 46,204, 81,171, 25,190, 10,146,102,182, 69, 41, 43,177, 82, 45, 91,182, 84,130,
-180, 67, 74,250,161,239, 72, 95,180,104,209, 7, 39, 79,158, 84, 36,113,148,152,109,222,188, 89, 96, 58, 64,218,220, 84,186,178,
-217, 82,235,150, 25,106, 77,111,196, 50,189, 8,160, 22,196,128,242,220, 20, 51, 60, 15,194,153, 41, 90,135,222,189,123, 31,131,
-116,106,185, 1,102, 16,100, 13,158, 58,117,234, 99,246,201, 6, 13, 26,188,101,253, 25,215,150,210, 8,130, 88, 53, 94, 33, 66,
-211, 8,204, 27, 20,176,101, 7,180, 92,189,198, 31,127,146,151,113, 12,148,197, 72, 22,210, 99,124, 68, 37, 33, 2,198, 75,108,
- 48, 94,162,221, 94, 2,172,190,196, 56,232,138,106,232, 73,199,109,239,193,156,254,198, 90, 62,122,196, 15,167,247,219, 72, 1,
- 63, 65,158, 20,152,219,150, 35, 61, 65,122,138, 50,175,198, 28,147,218,204,123, 49,127, 37,128, 36,235, 53,214, 11, 27,184,194,
-198,159,243,135, 84,170, 84, 73, 16,160,221,118, 31,155, 2,249,245,215, 95, 95, 99, 12, 36,112,246,142, 66,185,146,252, 82, 40,
-119, 98,223, 34,249,146,249, 49, 21, 47,148, 94,145,104,245,234,213, 75,137,107, 73, 33, 10, 99, 94, 50, 28, 28, 0,222, 91,148,
-123, 25,104,149,180,167,247, 47, 1, 90, 42,192,122, 15,104,121,218,235, 69,209,112, 55, 57,129, 19,133,106, 37, 80,206,190, 3,
- 20, 16, 20,221,114,213,216, 24, 12,190,204, 71,177,185,154,248, 27, 82, 43, 69,117,104, 79,155,247, 66, 1,180, 58, 99,146, 28,
- 3,212, 60, 18,101, 49, 13,182, 84,160,133, 62,194, 5, 37, 68, 2,205, 19,144,152,252,182,116,213,154, 86,127,180,108, 89,252,
-218,134,213,109,159,123, 29, 24, 45, 87, 47,206, 2,208, 92,133,247,105, 37, 90,122,253,254, 17, 22,198,206,121,138,215,174, 93,
-185, 65,215,186,253, 61,135,253,178, 98,234,244,174, 7, 23,207,239,125,102,233,130,142, 87,247,236,168,129,247, 19,184,153, 1,
-111, 30, 0, 87, 10,208, 98,208,111,168,185, 24, 71,241,159,114,113,242, 83,240, 5,219,124,221,186,117, 42,216, 82,238, 81, 5,
- 77, 85,138,117,210,211, 45, 51,193, 11,237,178,160, 62,154,138, 62,170, 0, 24,238,190,157, 93,148,142,130,232, 9, 93,194, 14,
- 50, 96, 82, 42, 12,240,246,178,125,251,246,148, 18, 18,100, 61, 67, 10, 64,186, 67,155, 45, 61,154, 44, 43,237,178,168,222,100,
- 57, 89, 70, 46,136,136,123, 39,220,160,112,179, 65,160,100, 5,160,186,101,196, 34, 59, 19,227, 53,152, 18, 17, 72, 49, 4, 96,
- 83,249,132,116, 79, 81,225,195,174,194,130, 60,253,244,202,229,228,255, 74,206, 64,150,122, 31,229, 52,123,170,198, 33,205,155,
- 55,111,254,128, 62,186, 6, 49,239,110,132,130,166, 90,252,175, 10, 22, 44,104, 97, 32,117,180,209,189, 80,214,217,246, 24, 65,
- 16,212,185,130,207, 23,184,169, 46,216, 17, 16,252,248, 5, 1, 17,212, 42,180,169, 50,122,165,135,173,203,205,226,197,139, 63,
-132,105,129,146, 16,152,254, 41,251, 58,131, 43,255,253,247,223, 82,174, 92, 57,129,189,167, 2,108, 6, 12, 24, 32, 0, 71, 52,
-144,119,117, 69,133,125,218, 49,240,206, 66,112,197, 5,140,192,135,237,206,249, 19,170,115, 69, 66,134, 62,113, 7,192, 83,143,
- 31, 33, 64, 22,193, 22,250,205, 83,106, 25, 56,127, 16,100,113,156, 2,208, 11, 65, 22, 55,221,124, 7,223,135,190,239,114, 83,
-173,169,128,191,117, 76, 11, 64, 17, 3,219,199, 49,202, 60, 39,249, 8,176,148,121,130,244,168,242,194, 26, 65,137, 32,237,129,
-104,138,242,111, 7, 90,201, 9,174,208, 7, 94, 97, 61,162,144,130, 27,234, 87,232,151,207,202,148, 41,243,141, 81,222, 2,212,
-111, 32,239, 84, 73, 86,189,122,245,100,248,240,225,148,226, 6, 97,158, 11,106,216,176,161,252,240,195, 15, 10,216, 34, 0,235,
-208,161,131,180,109,219,118,131, 81,250, 88,211,253,180, 64,139, 96,139,227,138,159,144,154, 42, 27, 11,168, 38,131, 65,175,161,
-150, 38,230,181,247,176,136,209,119,254, 3,242,233,187,119,176,183,209, 34,208,226,194,197, 9,129, 98,116,189,100, 4,104, 49,
- 54, 23,119, 93, 20, 77,171,137,191, 49, 80,130,184,104,216,191,131,226,106,130, 51,147, 12,236,236,233,233, 57, 21, 42, 30,158,
- 60, 51, 13,182,168, 42,164, 52,203, 17,208,130,225,234, 68, 76,184,123, 80,174, 5,215,207,156,105,243,112,243,186,198,114,233,
-252, 44,121,253,242, 65,197,138, 21,183,162,156, 90, 27, 45,189, 98, 31,196, 78,177, 79,189, 70, 77,171, 52,104,210,182,234,156,
-161,163, 90, 29,154, 63,167,207,141,173, 27,167,222, 93,183,178,255,243, 51, 39,186, 3,104,158, 5, 17,151, 18, 45, 70,179,103,
- 32,110, 53, 97, 39,226, 71, 80,193, 29, 62,130,215,222, 67,167,190,160, 38,230,213, 43, 20,255,199, 32,220, 4, 0,113,129,210,
- 49, 2, 55, 76, 98, 10,141, 52,105,210, 92,128,241,241, 5, 76,104, 23,160,203,191,128,133,141,247, 13,209,180,190, 87,145, 94,
-113,242,102,127,161, 58,134, 23, 85, 17, 92, 32,172, 19,168, 86,165,232,180,184, 4, 47, 52,126, 71,255,156,138, 93,246, 84, 74,
-177, 72, 11, 7, 20, 20,251, 29, 2, 15, 2, 55, 2, 25, 46,108, 38,164, 69,239,189, 19,224, 72, 89, 4, 1, 10,130, 85, 73, 22,
-120,147, 13, 60,112,102, 7, 19,130,134, 90, 86, 21, 16,178,156, 4, 69, 28, 3,172, 59,251,190, 42,229,194,131, 39,244,218, 8,
-210, 44, 95, 46,172, 4,106, 4, 89, 88,116,149,186,114, 44,145,175,148,150, 96,193,124,131, 20,136,201,244, 14,128, 12,199,129,
- 43,163, 86,237, 43, 63, 25,208,130, 77, 8, 85,227,180, 13, 89,253, 1, 64,203, 3, 11,193, 99, 2, 45, 44, 54,143,245,120,167,
-247, 63,192,208, 99, 46, 8, 0,171, 33,104, 97,193,121,108, 5, 90,134,223,129,197,198,155,237,195, 75,149, 58,178,141, 86,173,
- 90, 37, 84, 79,206,154, 53, 75, 89,192,176,195,127, 78, 27, 48,244, 41, 71,234, 67,251, 34,247,128,106,252, 18, 65, 22, 77, 4,
- 72,131, 27, 82,218,171, 65, 18,169,140, 41,242, 2,146,178,231, 88,140,159,232,212,183,159, 42,201,226, 39,242,238,196, 51,207,
- 90,180,104,161, 0,192, 10, 21, 42, 40,210,141,213,171, 87,219, 64, 22,231,104,206,203, 24, 7, 46, 55,213,154,247,250,179,141,
- 33,129, 36,136,180,129, 34,180,185,162,170, 11,197, 21, 25,207, 80,146, 21,130, 30,236,234, 56,206,123,130,213,134,165, 89,124,
-183, 70, 85,168, 72,180,244,126,135,162,188, 97,250, 8, 37, 65, 4, 89, 26,137,186, 34, 93, 71,127,125, 5,112,180,222,232,203,
-104,123, 71,192, 67, 32,133, 53, 77, 96,166, 34,237,218,181, 91, 14, 26,209, 1,216,162,163,253,151, 99,179, 97,147,106, 17,120,
- 97, 77,101,255,116,120,233, 73,180, 40, 88, 97, 63,133,121, 7, 5, 43,193,109,218,180,145,121,243,230, 81,114, 70,211, 11,198,
-194,180, 93,246, 88,196,104,157,190,200,124, 20, 13,115,103, 67,177,180,145,132,147, 94, 66, 27, 44, 87,149,197,132,242,140,160,
-202, 65, 82, 84, 32,246,239,225, 61,208,188, 99,146,129, 10,208, 10, 45,216,114, 4,180, 86, 47,157, 95,167, 96,134, 20,231, 42,
-151, 42,250,134,162, 77, 24, 7, 30,128,120,253,111, 12,234,187,219, 54,206,149,202,149, 43,179,131, 51, 25,137,141,165, 86,103,
- 56, 58,246, 36, 32,252, 62, 21,138, 21,202,189,106,200, 31, 63,157, 93, 48,187,243,253,181, 75, 7,188, 88,187,164, 7,102,230,
-125,216, 85, 18,188,209,245,131,211,139,224,199,254, 32, 1,219,141,147, 46, 23,112,245,226,119,230, 53,194, 75,130, 44, 74, 89,
-120,113, 82,229,226,173, 46,236, 42,120,225, 36, 79,240,130,197,205, 16, 77,205,123, 21,123, 44, 46, 8, 84, 81,176,223,112, 87,
-206,123, 72,174,108,180, 66, 20,157,224, 5,253, 67,145,102,193,142,208, 6,180,160,158, 19, 79,208, 34, 8, 81,129, 12,127,135,
- 22,104,225,100,155, 34,113,226,194,136,246,162,250, 80,153,228,140,240, 81,205, 67, 87, 14, 44,171, 22, 16,114, 49,231, 33, 18,
-246,113,110,104, 88, 62,163, 18, 45, 76,180,129,124,150,117, 84,165, 88,172, 43,121, 73, 80,201, 54, 99,123,179,173,112, 64, 64,
- 32,250,167,177,235, 2,131,101,254,104, 64,171, 79,159, 62, 13, 40,197,162,100, 12,253,134, 1,134,185, 72,108,133, 61, 93,145,
-208, 0, 45, 76,216, 94,232,171,126, 0,255,129, 0, 7,175,177,112, 4,130,215,126, 76,220, 81,171,167,155, 29,156, 92,118,200,
- 10,210, 3,120, 14,196,130,242, 26,155,137, 64,244, 49, 63,108,244, 20,122,216,200, 4,194,134,233, 53, 0, 66, 32, 22, 41,251,
-147,208,206, 88,155, 30,155,179,251, 4, 89,220,252,176,111,114,161,225,166, 2,180, 20,240,142,250,211,192,190,170, 85,146,101,
- 68,109,184, 17,109,253,154, 27, 8,130, 45,216,140, 42, 99,157,253,129,146,167, 77,155, 54, 41, 82, 3,168,121, 30, 0,104,187,
- 28,155,144,120,157,112, 42, 2,214,252, 1,155, 81, 69,229, 67,144,197, 57,154,125,203, 12,208,130,106, 75,160,206,230, 2,203,
-205,138, 16, 20, 65,213, 47,164,107, 86, 2, 69, 70, 3,180,189, 84, 65,155,150, 94,104,104, 89, 27,142,243, 14, 37,211,234,252,
-173,247,219,224, 80, 10,251,108, 0, 90, 15,177, 17,214,154, 46, 40,223,113,242,157,234,238,103, 70,223,136,177,241,150,134,239,
- 4, 90,144,178, 18, 68,189, 69,159,177,153, 27,224,126, 68,180,209, 91,108, 96,149, 60, 84, 41, 66, 10, 69, 80,228,240,114,102,
-163, 5,243, 24,165, 39,113,141,186,122,245, 42,237, 28, 95, 67, 0, 50, 11,128,118, 6, 15,181, 12, 29, 58,148,115, 41,237, 74,
-255, 13,151,174,107, 7, 90,249,139,246,212,161, 10,180,200, 28, 35,137, 3,157, 54, 88,174,184, 69,113, 51,237,190,180, 23,127,
- 19,120,113,225,182,127, 15,239, 81, 61, 99,178, 5,108, 64,139, 96, 11, 72,125, 40, 38, 73,172,181,198, 46,123,213, 33, 65, 86,
-249,220,233, 30, 30, 93, 51, 71, 22,181, 46, 38, 85, 74, 23,125, 11,164,255, 39,213,136,216, 85, 61,248, 58,174, 2, 16,218, 32,
-209,245,131,209,139, 3, 58, 61,118, 18,129,152, 24, 55, 97,209, 29,123,116,223,190,218, 87,215,175,172,251,234,242,185,238,242,
-226,249, 97, 44,238,199, 49,161, 92, 66, 62,151,199, 97, 41, 97,226,130,202,137,208, 62,113,194,213, 38,230, 53, 82, 64, 74,178,
-216,158, 75,151, 46, 85, 0, 17, 39,114,170, 12,184, 80,240, 93, 42,200, 98, 59,134, 2,104,217,108,178, 8,224,184, 8,113,241,
- 65,185, 76, 1, 45,130, 23,186,114, 80, 79,239,161,110,202,177, 85, 44,218, 10,128,211, 2, 25, 52,126,168,128, 22, 79,223, 16,
-180,112,241,250,235,175,191,148, 50, 82,141, 72,155, 45, 35,124, 84,243,176,172,224,167, 2, 8,177,200,188, 32, 24,162, 4,130,
-146, 55,181,188, 4, 77, 4,179,120,230,132, 30,109,244,139,215,108, 3,182, 5,235,201, 69,151,237,197,123, 92, 4, 9,180, 57,
-174, 84,240, 70,186,144,106, 25,157,132, 63, 10,208,234,216,177, 99, 51,242, 15, 11,227,122,216,109, 52,194,130,241, 26,128,229,
- 4,108,190, 20,123,176,208, 0, 45,180,131,162,158,208, 94, 4, 52, 4,174,228, 3,249, 76,190,242,196,156, 30, 79,249,191, 51,
-122,170, 52,138,252, 37, 47,141,210,179,190,147, 54, 89,143, 88, 38,210, 33, 24,154, 59,119,174, 12, 27, 54, 76, 0, 0,217, 38,
- 70,192,149,182,248,167, 8,176, 56, 87,178, 44, 60,172, 68, 99,101,206,223,148,226,210,184,126,193,130, 5, 2,251,155, 32,128,
-155,162, 58,245,246,116, 36,209,162,205, 27, 37, 89, 56, 8, 64, 35,104, 69, 66, 70,186, 60,132,192,247,114,209, 52, 10,180,176,
-160,250, 67, 2,171,168,184,104,219,136,113,170,156,106,131,180, 93,160, 82, 13, 21,208, 66,157, 34, 99, 76,189,212,130,172,208,
- 72,179,140,244,137,127, 90, 30,140,253,135, 88,155,223, 3, 90,228, 39, 14,132, 24, 29,227, 52, 49, 9, 82, 79, 23, 86,175, 94,
- 93, 32, 97,122,133,245, 82, 43, 40, 8,135,141,203, 43, 28,214, 81,128, 22,243,204,152, 49, 35,200, 25, 63,156,157, 58, 28, 61,
-122,180,178, 6,113,142, 39,200, 2, 72,244,177,174,105,241, 1,180,223, 82, 61, 13,220,112, 70,165,107,149,102,133,192, 34,255,
-180, 54,112, 81, 30,125,247, 14,124, 88,107,136, 70, 80,196, 9,155,106, 9, 35,137,147, 26, 24,230, 18, 20,145, 38, 39, 9, 78,
-126,106,226,111, 60,167, 0, 45,251,247,124, 40,208, 2,154, 30, 5,128, 48,169, 91,183,110,249,141, 54,150, 22,104,169, 32,235,
-196,198, 5,178,125,100, 59, 25,241,227,247, 82, 56,235, 55,135, 48,177,255,223,118, 11,198,243, 70,105, 51, 95,198,175,163,229,
-200,150, 44,150, 79,215,150,245,131,216, 1, 1,182, 44,176,209, 88, 4, 96,181, 15, 11,227, 67,240,252, 18, 36, 89,155,177, 11,
-164, 33,123, 65, 61,218, 24, 48,155,176,120, 95, 80, 19,118,208,119, 57,169,115,231, 89,178,100,201,123,218,255,152, 87,143, 30,
-255,199,206,115,147, 43,117, 33,164, 60, 23, 8,176,152, 76,170, 14, 21,105, 22, 47,130, 3, 2, 56, 14, 64, 94,102,165, 90, 4,
- 47,116,237, 64,247, 8, 52,136,167,100,128,116, 60, 65,159,137, 32,110,115,207,158,182,223, 70,165, 69, 42,127,184,227,230,130,
- 66, 3,115,170,122, 88,110, 35,188,115,144, 39, 45, 38,198, 51,152, 84,158, 48, 1,196,190,164, 10,138,117,103,157,105, 16,205,
-133,146, 98,122,168,173, 4, 0,158,110, 10,190,117,245, 46, 26,236,210,136,186, 78,157, 58,202,110,148,253,136,146, 49,218,121,
-177,237, 9,226, 40,234,167,221, 5,191,243,194, 4,205,221,168, 17,181,202, 71, 1, 90, 86,123, 44, 74,125, 5,229,183, 96, 1,
-126, 57,104,208,160, 58, 31, 96,247,165, 0,163, 71, 79,158,202,190,195, 39,101,215,254,163,178,109,247, 97,217,180,125,191,172,
-219,188, 91, 86,173,223, 46,203, 86,131,207, 7,188, 13, 3, 35,149,222, 1,175,211,178,231,224,113,217,177,215, 75,182,238, 58,
- 40, 27,183,237,149,181,155,118,202,202,117,219,100,239,193, 99,134,233, 89,219, 48, 5,108,200,110,192,180, 32,152,253,137, 18,
-200,233,211,167, 11, 23, 32,170,111, 66,209,167, 54,160,223,191,162,141, 31, 37, 99,156, 51, 41,213,226, 66, 11,137,181, 98,171,
-132, 57, 37, 8, 64,246,136, 1,218,239,217,104, 1,144, 43, 54,100, 56,138,175,244, 81,218,123,169, 32,139, 27, 3,190,143,235,
- 2,120,229,114, 83,173,190, 27, 32,203, 31,192,148,118, 68,116,193, 33,148, 16,231,203,151, 79, 5, 88, 93,208, 53, 9,178,205,
-104, 2, 20,210, 0, 89, 47, 41, 25, 83, 65,219, 7, 72,179, 12,176,201, 92, 22,189,147,139,246,255,155,161,142,122, 47,131,148,
-233, 61,213, 33, 78,157,190,130,212,221,176,234, 48, 67,134, 12, 15, 84,251, 44,170, 14, 27, 53,106, 36,101,203,150, 29,134,178,
- 80, 96,240, 21,132, 19,195,176, 17, 80, 36,101, 4, 90, 84,245, 77,154, 52,201,176,125,162,234, 71,139,182,172,148, 46,211, 71,
-151,189, 31, 45, 72,135, 31,210,140, 4,210, 99,127,149, 7, 42, 6,249, 66,141,226,117, 37, 90,202,142, 72, 91, 57, 44, 8,138,
-141, 22,119,204, 70, 18, 65,145, 30,208, 82,105,210, 78, 65, 77,124, 7,129, 22, 23, 10,251,247,240, 30, 6,168,161, 1,173,233,
-172,138, 68, 75, 5, 89, 16,137, 26, 6, 89,164,161, 85, 29, 86,200,159,254,134, 10,178, 70, 85, 77, 39,133,210, 38,188, 79,240,
- 21, 90,160,149,233,235,232,217, 75,102, 73,229,127,108,237, 28, 89,252,107,113,233,218,162, 94, 48,140,124, 50,227,181,195,145,
-120,122,141,139, 44, 63,135, 34,197, 49, 51, 0,213,188,148, 90,113, 97,165, 84, 7, 19,209, 63,210, 24,158,106, 46,238,236,185,
-232, 50, 17,112,240, 34, 96,176,222,203,163, 87,119,236,140,122,105,189,192,211, 69, 2,105, 80,202,227, 9,154, 92, 44,248, 73,
-201, 14, 63,205, 0, 45, 78, 46,148, 62, 16,164,208, 8,216, 90, 38,189, 34, 57,250, 63, 43,140,161,239, 81,242, 64,201, 24,251,
- 55,109, 21,232,159,134,139, 35,237, 34,104,104,202, 50,171,255,115, 49,195,196,195,211,103,223, 59,123, 33, 39,106,168,181, 20,
- 9, 35, 37, 12,148, 22,168,188,228,167,139,255,140,216,197,124, 20,160, 69, 64, 69, 21, 33, 37, 90, 44, 35,108, 51,254,212, 26,
-221,127,136, 68,139,210, 43,170, 77,185,121, 35,109,206, 69,148,238, 82,218, 67,254, 24,149, 64,169, 18, 45,206, 73, 84, 23,115,
-142, 34, 61,182, 13,193, 6,213,176, 4, 56, 70,233,225,217,148,176,117,185,130,178, 89, 70,141, 26,245, 2, 96, 40,152, 52,120,
-154,111,224,192,129,161, 5, 90,221,176, 17, 59,199,242,241, 20, 36,165, 99, 35, 71,142, 84, 22, 66, 30,197,167, 75,138, 78,157,
- 58,209,199, 21, 93, 63, 24,185, 66,128, 45,130,126,218, 57,178,156, 4,243, 60, 29,174, 61,184,193,113,197,203,168,250, 28,188,
-242,215,130, 44, 72, 94,123,225,113, 2, 44, 35,160,223,101,249, 1,178, 94, 18, 96,254,147, 64, 22, 11,172,119,114,209,254,127,
- 35,141,164,230, 1, 72, 77, 14,105,227, 83,154, 3, 16,176, 98, 99,205,147,125,175,176, 25,124,134,195, 10,134,141,225, 49,199,
-237, 34,239,212,211,133,220,232,145, 22,128,240, 75, 0, 32,158,228, 84, 36,144, 4, 89,204, 67, 21, 32, 54, 7,187,140,150,213,
-128,103,248,200, 40,195, 27,158,104, 5,168,179,109, 56, 84, 28,242,133, 2, 45,215,236,113,132, 34, 9,138,184,216,112, 2, 51,
-146, 56, 25,233,217, 83,145, 38,119, 67, 84,115,168,137,191,241, 92, 16,159,183,127, 15,239,133, 6,104, 65,132, 58,142,146, 44,
-179, 32,139, 92, 82,129,214,146,121,115,235,213,203,155, 66,214,247,171, 47, 78, 65, 22, 36, 91,204,111,164,243,165, 75, 24, 61,
- 43, 64,214, 19, 21,184,141,169,150, 94, 50, 38,137,110,100,215,105,132,188, 45, 15,118, 42, 10,208, 34,127,177,200,255, 35,221,
- 59,104, 78, 23,218,220, 59,104, 64,150, 97, 59, 45, 59,198, 40,246, 38, 92, 28, 9,172,216,119,182,245,238, 29, 26,137,150, 98,
- 79, 67, 48, 72,160,245, 1, 32,203, 3,146,172,185, 4, 89,144,220,248, 3, 0, 95,129, 24,254, 70,173, 90,181,130,161, 70, 83,
- 0, 22, 19, 23, 73, 28,169, 87,118,230, 4, 96, 61,122,244,120,139,157,105, 48,198,196,159,174, 26, 30,146,196,109, 4, 90, 48,
-140, 38,208,218,167,205,235,234, 63, 3,157,169, 2,164,161,197,157,157, 60,132,164,176, 4,216,108,214,189,131,141, 38, 37, 91,
- 48, 0,255, 89,181,213,226,123, 66, 73,211,161, 68, 11,246,146,226,119,255,161, 34,209, 90,190,102,179,108,221,121,192, 48, 48,
-114, 36,209, 34,189,123, 15, 30,217, 36, 90,219,119, 31, 52, 74,143, 70,197,231,112,216,193, 2, 64,100,193,137, 46, 11, 54, 7,
- 87,176,120, 61,224,137, 43,171,234, 48, 52, 18,173, 40, 80, 11,122,193,222,239, 33,213,206, 84, 19,210,207, 87,171, 86,173, 4,
-254,205,184, 24, 94,135, 73, 3,109,200,140,128,106,181, 59, 16,108,121,194,110,236, 14, 22,189,151, 28, 67,208,229, 40,110, 29,
-232,214,194, 62, 89,129,150,161, 67, 74,152,243,253,169,126, 10, 75,128,165, 22, 26,146,152,151,148, 2,255,151,128, 22,235, 14,
- 87, 11, 41,122,246,236,185, 28,224,253, 9,220,248, 60,197,250,189, 26,182,170,169, 13,140,109, 91, 22,240,238, 27, 0,243,183,
-228,159,214,119, 22,214, 12, 2, 31,197,134, 78,189, 79, 16,191,124,249,242,183,176, 41, 52, 12,228, 12,148,165, 61,109, 94, 57,
-127, 65,250,202,200, 42,202,245, 47,144,104,217,171, 15,255,207, 10, 71,149, 3,192, 81,236,169, 56,224,232,226,193,209,128,211,
-222,163, 88,220,193, 9,193, 16,142,215, 72,147,192, 74,251,156, 10,180,168,246,176,127, 7,239, 97, 98,178,151,104,233, 57,115,
-107, 2,144, 53,217, 36,200,178,209,212,170, 14,139,100, 78,125,178,118,142,196, 82, 56, 93,162, 59,239, 73,178,172,234, 67, 23,
- 64,203, 70, 51, 99,226, 24,153, 74,101, 73,245, 88, 43, 29,203,157, 34,214, 19,170, 17, 13,116, 72,109, 22,189,186,123,224,132,
-156,226,222,129,187,114,124,255, 82, 28,150,170, 78, 76, 13, 59, 44,117,192, 55, 5,104, 17,172, 83, 18,202,126, 69,192,164,189,
-240,204, 9,187,231, 28,241, 83,145,102, 17,168,134, 18,100,217,104, 98,225,190, 70, 9, 21, 84, 38,202, 81,120, 76, 96, 29, 9,
- 0,237, 47,222,195, 1, 11, 5,216, 1, 36,189,224, 39,158, 61,175, 41,171, 67,135,165,144, 14,109,131, 88,126, 23,242,165,179,
-171, 87, 26, 23,255,169, 89, 29,246, 37, 72, 91,210, 18, 72, 81,194,228, 36,241,191,140, 78,250,237, 39,163,201,247,171, 18, 40,
-173, 68, 75,141, 90, 65,155, 66,170,165,121, 2,211,129, 4,202, 97, 57, 29, 73,180, 84,103,157,170, 68,139, 18, 30, 39, 18,173,
- 16, 52, 1,126,167, 2,100, 63,131, 84,205, 50,101,202, 20, 11, 64, 55, 79, 16,115, 49, 76, 15, 21,202, 93, 46, 50, 48,232,190,
-174, 51,254,157,141,247,204, 0, 83,199, 0,214, 14, 99,238,246,195,169,192, 87,176,159,185,133, 5,113, 55, 84,196,199, 64,147,
- 82,114,103,151,171, 57, 36, 17,195,164, 65, 93,254,150,253,159, 39, 98, 41, 57, 99,255, 84,213,210, 92, 19,168,178,196, 70, 64,
-235,202,166,187,179,151,161,175,116, 10,165, 4, 75,119,174,211,208, 46, 98,112, 30,213,165,105,144,142,203, 57, 89,239,228,162,
-253,255, 14,222,249, 73,202, 9,160,213,143,230, 7,229,203,151,119,232,172,148,146,172,214,173, 91, 43,154, 46, 72,223, 29,185,
-139, 49, 91, 78, 74, 49,105,147, 56, 24,239,126, 67,213,244, 79, 63,253,196,121,182,156,202,131, 47, 28,104,169,213, 48,238,254,
- 6,162,191,125, 56,101, 2, 19,170,183,182, 16, 60, 28,100,106, 82,221,234,171,159,240, 47,245,198,110,240,241,165, 33, 26,130,
- 52,177,187, 83, 28, 54,170,137, 11, 17, 38,165, 55, 84,169, 16, 28,104, 19,140,144,223, 96,130,162, 24,220,101,199, 14,197,224,
-176,127,196, 33,208,194, 64, 46,182,113,221,138, 90,254, 15, 31,150,226,119,135,201,185,141,150,141,102,166,228,177, 86, 29,133,
-186,144,118, 94,148,142,229, 73, 17,235, 49,213,136,161, 40,183,110,199,134,216,119,163,198,126,202,136,209,182, 46,205,143, 80,
- 78, 71,106, 3, 61,117,161, 94, 57, 79, 16, 88,169, 73, 53, 4, 55, 9,180, 84, 21, 99,104, 65, 86,136, 62, 79,137, 22,156, 74,
-218, 36, 90,176,161,185,129,137,229, 21, 37, 90,216, 45,190, 70,122,211,185,115,103,218, 82, 5, 67,226,245, 0, 42,195,171, 48,
- 24,125,234, 64,162,165, 87,247, 80, 52,209,151, 31,226,132,192,232,225, 99,127, 57,116,244,140, 28,240, 58, 37,123, 15, 33, 92,
- 14,108,181,182,239, 57, 44,155,119,188,179,213, 90,187,113,187, 41,160, 69,155,175, 67, 71,207,130,222,105,216,126,157,144,221,
- 7,142,193, 86,235,136,108,217,121, 80, 54,108,221, 43,235, 55,239,210, 5, 90, 0, 59, 63, 64,213,114, 27,146, 33, 11, 36,150,
-143, 48,239, 29, 71, 3,165,210, 52, 82,122,131,167, 12, 93,181,187,234, 25,126, 45,232,158, 66,226, 39,213,133,122,146, 44,189,
-190, 20, 3, 64,242,128,122,122,147,167, 46,169,113,224, 9, 76,158,240,100,162,106, 26,239,137,174,169,143, 83,160, 21,154,142,
-105,125, 70,175,156,161, 33,253, 41,105,234,157, 92,180,255,255,147,173,113,218, 23,225,176,195, 0,128,169, 32, 2, 42,130, 30,
-213,165, 7, 93,124, 80,242,138, 3, 81, 65, 56, 25, 56,192, 9,179, 67,240, 19,167, 24,211, 98, 30, 43,143,121,172, 29,210, 56,
-152,174,172,199,231, 69,164,135, 76, 80,117,190, 33,176, 27, 55,110,156,226, 46,132, 39, 14, 1, 58,103,134,166, 33, 63,245, 51,
-103,114,190,211, 92,157,206,237, 81,140,223,249,233,164, 12,198, 65,150,149, 64, 12, 12,182, 3,234,224,210,251,196,224,163,109,
-145,118,240,133, 88,116,156,209,196, 59,174,227,191, 10,252,180,127, 7, 6,249, 33,252, 23,195,174, 66, 31,117,176,184,242,163,
- 21, 90,160,149,255,219, 56,103,231,183, 42,172,130,172, 71, 84, 35,134,178,163,124,212,186,135,178, 76,142, 30,251, 28,229,164,
-215,247, 19, 58,201,222, 51,188, 67,137,214, 7,242, 65, 75, 83,177,209,162, 49, 61, 55, 20, 76,220, 80,192, 14,130, 42, 35,218,
- 96,189,247,191, 19, 27,173,207,193,207,208,176,225,147,150, 83,117,239, 96, 93,252,109,174, 24, 12,184,119,112, 88, 78,210, 35,
-120, 83,233,105,221, 59,208,160, 87,117, 25,225,196,189,131,141, 38,220,111,172,130, 42,252, 46, 84,194, 87, 33,189,162, 27, 11,
-251,121,209, 40,111, 63, 41, 63,141, 22,202, 65,190, 46, 31,240,172,179, 71,191,148,186,127,241,229, 4,192, 74, 3,117,228, 1,
-104,129,158,192,118, 52, 24,210,209, 96, 28,208,242,135, 26,250, 32,212,133, 33,124, 92,185, 90,139, 97,215,151, 14,169, 10, 64,
- 84, 55,124,206, 64,218,135,113,240, 64, 61,249, 78,187, 73, 30,174,160,186,155,106, 75,208,162,235, 34, 67,190, 8,249, 94,172,
-191,121,145, 42, 89, 63,213,239,165,213,123, 31,161, 15,218, 72,170, 64,203,254,211,238,157,250, 14, 75, 63, 82, 33,191,184, 78,
-232, 44,206,161,125,220, 67,237,111, 39,188,179,213, 61,125,226, 24,197,242,165,138,237,141,211,134, 71, 50, 36,138,225, 74,172,
-175,215, 12, 95, 28, 63,245, 42,100,226,255, 47,181,238,105, 97,167, 50,135,135, 20,152,240,125, 22,234,172, 61, 85,168,247, 63,
- 89,244,165,214,221, 68,243, 58,205,250, 37,214, 61, 21,193, 22, 37, 91, 31,200,128, 47,165,238,116,111, 19,214,215,151, 82,247,
-127, 85, 57, 97, 67, 26,158,201, 96, 99,190, 39,209,194,198,178, 60, 82, 59,164,113, 72,235,145, 46, 34, 61,100,130, 57,195, 37,
- 28, 4, 88, 9,218, 3,145,204,186, 53, 33,208, 98,252, 85,106, 29, 8,182,108,223,213,123, 6,203, 28,170,108, 4, 88,106, 34,
- 1, 21,112,133,138,216, 71,120,232, 95,213, 9, 77,242,199, 93,119,147, 12,211,201,238,230,167,155,159, 97,197, 1,119, 95, 10,
- 43, 78,190,163, 83, 63,108,201, 41,212,220,109, 20,182, 76,253, 82,248,233,180,214,159, 19,104,153,104, 10,173, 84,203,196, 99,
- 31,150,245, 75,105, 92,119, 57, 63,172,157,237,159,118,243,211,205,207,176,226,128,187, 47,133, 21, 39,223,209,249, 24,252,172,
- 16,182, 69,252,104,229,252, 24,117,119,211,252, 8,141,239,136,228,231, 4, 90,170,109,150, 42,213,114, 98,163,101,111,159, 21,
-226, 55, 59,138,163,100,134,125,206,104,184,186,175, 71,223, 77,211,113,187,132,182,189,220,252,116,243,211,104, 31,112,143, 77,
-231, 28, 48,202, 67,109,190,127, 58, 63,107,163,128, 70, 12,218,153, 71,155, 26,227, 55, 65,150,123,158, 15,221, 26,250,111,236,
- 75,106,157,244,250,188,233,255, 63, 39,208,178, 25,195,231,244,240,100,193,157,168, 14, 93, 2, 45,211, 21, 54,241,128, 27,237,
-155, 96,150,129,172,110,126, 26, 96,146,137, 44,110,126,154, 96,150,129,172,110,126, 26, 96,146,137, 44,110,126,154, 96,150,129,
-172,110,126, 26, 96,146,137, 44, 31,131,159, 78, 95, 15,160, 85, 2,126, 6,123, 34,131,114, 42,156,223,237,108,181, 76, 20,221,
- 92, 86,131, 18, 45, 18,117,171, 14, 93,176,246, 99,116, 24, 55, 77,115,125, 89, 47,183,155,159,122, 28, 50,247,191,155,159,230,
-248,165,151,219,205, 79, 61, 14,153,251,223,205, 79,115,252,210,203,253,165,240,211, 21,208,138, 12, 96,149, 79, 53,134,183,158,
- 62, 84,127,231,213, 99,192,191,249,127, 87,141,155, 44, 92,132, 72, 61, 34, 71,139,181, 37,114,212, 24,119,149, 20, 61,246,150,
- 8,184, 7,134, 36,251, 16, 80, 4,111,138,153,170,198,141,118,165, 92,172,200, 55,241, 61,159, 1, 6, 59, 44,103, 45, 15,143,
-194, 13, 35, 71,182,180,128,223, 24, 71,137,255, 49,143, 19,250, 95, 74,199,118,151,211, 64, 7, 49,145,197,205, 79, 19,204, 50,
-144,213,205, 79, 3, 76, 50,145,197,205, 79, 19,204, 50,144,245, 75,229,103, 12,184, 30, 57, 4, 31,150,126,106, 82, 93,152,240,
- 83,245,163,166,126,194,183, 26, 29,225,126,109,199, 15,251,186,135, 5, 77, 3, 44,255,252, 89, 66,165, 58,212,196, 23, 42, 22,
-198, 85,112,216, 9,195, 71,140,210, 34,238,215, 73,238,255,218,109,104,240,184,153,171,101,229,182,163,178,114,235, 81, 25, 59,
- 99,149,180,233, 62, 44, 56, 65,226,100,247, 35, 70,137,210, 34, 52, 0, 38, 19,252,110, 85,136, 25,229,241,131, 97, 45,228,201,
-176,166, 82, 62,102,164,199,188,167, 83,175,247,202, 73, 0,213, 50, 65,130,192, 71,240,138,111,127,209, 25, 38, 29,185, 62, 68,
-108,190,150,241,227, 7, 58, 1, 91, 95,234, 0, 12,139, 46,240,111,169,123, 18, 4, 86, 29,134,137,232, 8, 98,127,221,199, 4,
-228,141,201,105, 36, 24,148,252, 67, 54, 2,161, 96,240,191,133,159,161,168,250, 71, 49,222, 54,196,207, 12, 73, 98, 20,169,254,
- 67,230, 91,249,210, 38, 88,149, 62, 89,204,248,102,231,144,208, 84, 86,103, 33, 11, 3,146,159,156,159,174, 98, 26,186,250,207,
- 80, 27,153,100, 72, 8,154,112, 26,235,133,241,237,199,196, 0,223, 76, 24,223, 74,162,247,127, 38,123, 16,130,123,251,117,218,
- 40, 45,242,108, 97,140, 71, 60,235, 50, 49, 15,243,130, 94, 90, 23, 52, 99,161, 60, 99,144,239,142, 22, 8, 57,251,206,124,204,
- 15,122,177, 92,149, 19,121, 14, 34,246,106,240,123,139,155,131, 27,116, 82, 14,255,126,193,160,125,238, 99,211,252,136, 88,196,
-100, 87, 9, 85,118,215, 54, 90, 31,209,237,253,123,131, 37, 82,212,152,171,139,149,171,245,108,241,134, 67,210,125,232, 44,169,
-208,176,187, 20,170,214, 65,138,212,232, 36, 85,154,246,150,238,195,230,200,223,107, 14, 74,137, 10,181, 3,162,198,136,179,218,
- 65,117, 93, 14,192,124,209, 35, 12,217,213,184,232,107,249,171,153,200,180, 70,178,189, 78,190,215,188,103,102,146,180,129, 44,
- 4, 85, 61,183,105,147,116, 72,154, 84, 58, 39, 76, 40,189, 33,217, 26,148, 36,137,140, 78,150, 76,166, 33,126,215, 45,132,162,
-184, 7, 15,183, 78,192,214, 71,159, 40, 66,213, 21,222,127,200, 93, 78, 7,140,196, 36,220, 20,222,140, 31, 48,168, 52,227, 21,
- 50,172, 15,131,235, 34, 90, 65, 48,226, 73, 62,192,228,220, 42, 52, 27,129, 80,182,153,187,141, 66,201,184, 15,105,163,116,137,
- 98, 76,247,223, 51, 73,206,205,237, 40, 63,164, 79,120, 33, 67,130,104, 73,220, 0,219, 33, 7,156,245, 79, 87,161,181,244,194,
-110, 57,164, 25, 53,106, 84, 58,251, 13, 17, 68,221,254, 55,124,152, 57,139, 33, 25,130, 38, 1, 22,199, 53, 55,206, 4, 19,140,
- 74,194, 80,114,106,216, 37,254,167, 38, 6, 42,103, 72, 34, 56,179, 85,194,105,105,174, 16, 52,177, 33,219,204, 77,184,246, 34,
-125,103, 9, 49, 63,133,207, 56,163, 73,208,228,233,233, 41,140, 48,193, 4, 79,237,178,120,241, 98,197,233,231,188,121,243,100,
-204,152, 49, 74,148, 21, 53,162, 10,203,143,144, 76, 65, 86,176,229,180,156, 0,129,119, 89, 70,189,208,122,140, 75,203, 60,214,
- 80,121, 12,118,255, 81,105,126, 68, 44,242, 65, 51,136, 65,207,240, 73,241, 18,173,141, 22,127,255,255,250,136,149, 11,209, 9,
- 33,201,106, 86,184, 84,245,128,165,155,188,164, 90,171,161,146,161,112,157,247,240,115,238, 50, 77,164, 81,151,241,242,247,218,
- 35, 82,178,114,189,128,136, 81,162, 53,115,213,184,218,255, 32,185, 74,252, 83,252,232,129,175, 38,181,149, 91, 11, 74,201,219,
- 77, 63,202,235,145, 13,165, 86,156, 40,129,252,207,200, 36,105, 15,178,126,139, 31, 95,150, 35,146,249,190,184,113,229, 96,188,
-120,114, 4,201, 27,247,246,242,126,202,148,114,123,215, 46,185,179,127,191, 35,176,229,114,113,140, 17, 35,198, 49,107,172, 51,
- 51, 14, 76, 63,247,130,155,153,101,102,217,205, 0,215, 15,234,225,255,127,216, 85,221,217,161, 29,237,142,233,117, 56,145,145,
-118,215,230,137, 2,105,106,179,102,205, 2, 57,225, 50,112, 47, 61, 27, 51,100, 4,227,221,249,248,248,200,237,219,183, 25, 54,
-231, 25, 38,200, 14, 14,104,187, 42,103, 4,196,168,155, 73,143,227, 8,218, 26,136, 73,251, 30,222,245, 55,104,124, 72,216,148,
-112,160,217, 8,206, 80, 87, 22, 47, 94,252, 32,226, 42,174, 1,205,159, 65,147,129,130, 93, 93,122,125,137, 60,229,137,178, 70,
-214, 84, 10,113, 24, 93,241,146,239, 50, 75,179,100, 40,105, 82, 66,189, 30,233,132, 78, 98, 30, 71,210,108,189,114, 42,124,203,
-144, 48, 90,213, 46,213,115, 6, 63, 95,211, 65, 46, 79,173, 47, 37, 51, 37,244,201,148, 52,106, 74, 39, 76, 53, 68,211,228, 88,
-248,146,105, 42, 64,138, 23, 63,145,180,113, 76, 93,253,167,178,200, 97,221, 17,128, 56,152,192,194,217, 69, 96,196, 60, 70,218,
-136, 64,139, 33,187,230,207,159, 47,136,241, 41, 43, 87,174, 20,120, 69, 87,130,105,239,220,185, 83,184,201, 66,240,110, 37,214,
-239,153, 51,103, 20,208,165, 7,180,162, 71,143,238,207,178,169,192, 12, 1,211,149, 64,247, 8,212, 46,231,207,159, 87,230, 15,
- 70,127,224,111,198,205,228,156,194,103,236,202,107,171, 59, 37, 84,211,167, 79,151,154, 53,107, 10, 3,156,219, 39, 6,164, 87,
- 61,175,243,147,101,229,251,248,156, 51,154,188, 15,137,152, 47,203,169, 62,195,114,176,142, 44, 35,131,213, 95,189,122, 85,217,
- 88,222,186,117, 75, 8,182, 8,224, 80,119,151, 64, 43, 44,104,126, 68, 44, 98,114,232,133,204,110,208, 51,188,235,119,124,162,
-202, 37,139, 21, 55,209,253, 5,107, 15, 72,227,158,127, 73,206,242,173,157, 14,150, 82,117,187, 75,199, 97,203,101,214,202, 3,
-146, 32, 81,178,251, 40,189, 43,155, 45, 91,229, 10,197,138,244,247,241, 95,203, 5, 61, 28, 87, 77,206,110, 66,120,194, 43,181,
- 68, 38, 87, 19,175,134,249,223, 22,140, 21,105,174, 17, 78,211,238,138,234, 66, 74,178, 8,178, 86, 68,143, 46,235,145,118, 1,
-108,169, 32,107,127,236,216,178, 57, 70, 12, 57, 8,240,181,243,155,111, 20,176,117, 19,210, 45, 62,107,228, 29,204, 67,241,244,
-142, 29, 59, 4,113, 9, 31,224,103,110,163,207,125,198,124,185,115,228,200,241,144,147, 17,203, 30, 22,229,192,238,180, 38, 64,
-219,125,126,134,146, 30,193,196,192,159,127,254,217, 23, 0,131, 65,110,181,225, 28, 34,240, 30,254,227,132,227,137,164, 7, 60,
-212, 34, 36, 71, 76,194,251, 4, 89,156,180, 24,248,148, 97, 35,112, 79,249,205,201,145,147, 16, 39, 32, 4,137,102,223, 76,109,
-176,236,145,160,154,184,138,157,232, 51,208,182, 32,248,181,229,193,131, 7, 22,196,196,123,134,221,229,117,208,208, 3, 91,142,
- 94, 19, 14, 33, 99,102, 35,126,232, 33,236, 56,189, 17, 8,216, 27, 19,187,247,236,217,179, 15,226,254, 60, 60, 96,212,195,179,
- 61,237,156,152,252, 27,117,237,218,181, 28,130, 34,151, 96,194,206,185, 84,227,198,141,107,244,239,223, 63,151,193,250,218,103,
-203, 13, 96,218,144, 52,193,211,146, 8, 92, 92, 28,113, 0, 75, 55,111,222,188,230,160, 65,131,178,155,164,185,158,193,154, 33,
- 13,120,134,118, 8, 64,122,202, 4, 0,236,143, 69,225, 9, 36,144,143,177,216, 60,222,181,107, 87, 0,232, 58,146,138,191,247,
-186, 12,137, 99,252,218,169, 94,105,203,239,205, 42, 74,207, 70,101,164, 91,189, 98,210,185, 86, 1,233, 94, 59,175,236, 24, 92,
- 85, 94, 46,174, 47, 55, 39, 85,146,242,217,190,246,207, 18, 63,166,105,175,214, 38,235,247,165,103,231,166, 71,153,223, 9, 52,
-214,173, 91,167, 5, 91, 54,144,229,239,239,175, 44,226,204,139,228, 74,141,104,227, 7,198,208,150, 73,147, 38, 5,115,124, 82,
-194, 4,245,151,220,184,113, 67, 1, 7, 24, 79, 10, 48,194,156, 98, 31,106,203, 33, 63,169, 42, 36,104, 83, 65, 22,227,253,177,
- 44, 11, 23, 46, 84, 64, 22, 55, 87, 12, 78, 78, 0,194, 64,239, 4, 90, 24, 87,246, 18,173, 16,180,241,110, 5,104,177,108,106,
-221, 17, 79, 80, 90,181,106, 37,189,123,247, 86,226, 7,146, 46,231, 17, 6, 60, 39,125, 62,227,172,193, 9,152, 16,255, 84,170,
- 87,175,110, 8,104,145, 30,203,234, 0,104,133,120,133, 10,138, 56,167, 17,100,177, 60, 4,127,142, 64, 22,129,155, 19,160, 21,
-230, 52, 63, 17, 22, 49, 61,190,194,196, 51,252,167,208,139,194,240,189,123,243, 78,131,130,135,253,181, 81, 74, 54, 29, 41,121,
- 42,182,177, 1,173,156,165, 26, 75,222,178, 77,109,191,203, 52,232, 37, 77,250,204,151,209,115,119, 73,235,238, 35,130, 34, 68,
-138,170,235,227, 5,193, 3,211,253,146, 44,190,229,205,164, 86,114, 98,230, 15, 18, 62,220, 59,241,178,236,249, 81,130, 6, 85,
-145,230, 9, 99, 6, 50,143, 30,135,105,244,206,139,234,194, 21, 0, 87,235,162, 69,147, 55, 16, 27,123, 53,107, 38,123,241,123,
- 63, 18,191,243,222,182,152, 49,229,108,162, 68,114, 58,103, 78,101, 23,241, 51,212,139,122,244,213,255,169,255,231,123,238,223,
-191,207, 0,195, 15, 17,174,163,168,209,103,237,243, 49,246,154,214,168,209,217,119, 39, 49,218,116, 95,203,178, 21, 46, 92,248,
- 17,235, 72,128,193,178,235, 62,164,147, 1,226,253,242,117,235,214,197, 92,235,207,221,154, 63,127,155,164, 73,224, 52,120,234,
-212,169,143,201, 71, 43,160,210, 74, 92,146, 18,128,241, 63,230, 97, 94, 36, 93,176, 5,137,221, 32,238,102, 57,121,171, 32,139,
-187,190, 72,145, 34, 41, 19, 24, 99, 21,114, 87,202, 9, 30, 19, 52,237, 22,198, 26, 41, 55,164, 76,179, 9,178, 8,176, 48,113,
- 91,206,157, 59,103, 1, 29, 11, 38,100,203,240,225,195, 3, 48,217, 46, 50, 66, 71,155,135,146, 44, 44, 98,135,158, 62,125,234,
-141, 9,214, 27,239,240,198,228,237, 29, 24, 24,232,141, 9,253, 0,126,155, 14,112, 10,250, 73, 1,178,154, 96, 49, 40, 1,192,
- 82, 92,155, 80,247, 98, 80, 75, 52, 0,200,209, 6, 72, 54, 82,236,228, 4,110,123,247,238, 45, 85,186,116,233,161, 0, 92, 23,
-152,240,125, 24, 0, 87, 25, 0,197,134,187,119,239, 78, 97,132,144, 53,207, 9,240, 46,192,209, 14, 95,123, 15, 99,139,237,126,
- 2,201, 85,188, 54,133,100,245, 2,223,221,121,115,100,186,188, 57, 56, 81, 94,239, 25, 33,175,183,121,202,235, 13,157,229,229,
-202, 95,228,213,250,223,228,213,170, 95,228,229,204,114, 18, 48,165,136,180, 46,146, 52, 40,227,215,177,204,246, 87, 19,213,251,
- 87,100, 85, 0, 21, 65,150, 29,216, 82,230, 87, 2, 17,180,185, 35,105,151, 94,229,115,194, 64, 59, 80,149, 24,169, 64,139, 82,
- 34,170,236,242,230,205,251, 28, 4,180,210, 51,167,244, 8,180, 8, 32,168,146, 35, 0,226, 24, 39,168, 33, 88, 81, 65,214,233,
-211,167, 21, 0, 66,201, 54,198, 21,129,214, 45, 87, 5, 84,129, 22, 65, 31,250,181,252, 84,187,182,120,123,121,201, 37,204, 29,
- 76,103, 64,143,245, 38,184,225,123, 16, 15,208, 37,208,162, 10,176, 73,147, 38,210,161, 67, 7,105,215,174,157, 32, 38,161,252,
-242,203, 47,194,160,207,152,223,148,196,121,137,146, 40,150,149, 64, 19,255,191,113,160, 58, 12, 81,108,240, 80,153, 27, 89,142,
- 18, 37, 74, 72,193,130, 5,109,137,239, 96, 26, 49, 98,132,108,219,182, 77,105, 63,242, 9,225,195,124, 93,213, 93, 75,179, 93,
- 76, 15,249, 57,198,255, 19, 54, 85,194, 68,181, 39,223,233,140,230,167,192, 34,122, 29,236,139,254, 63,114,180,216,155,135, 78,
- 94, 46,191,246,159, 39,101, 91,140,149,226,245, 61,165, 96, 85,216, 62,212,248, 77,138,214,234, 34,197,170,255,106, 3, 90,229,
- 27,245,145,230,158,139,229,247, 9, 27,100,248,180,213, 18, 35,118,124,123, 29,246,123,188,248, 33, 78,196,237, 87, 59,255, 24,
-124,247,207, 10,114,105,123, 25,155, 14, 95,174, 66,170, 53,181,172,156,111,156, 59,152,121,244,152,168, 2,173,223, 0,154,246,
- 83, 98, 5, 48, 69, 96, 21,140, 65,204, 79,237,247,227, 80, 35, 94,133,205,214,149, 44, 89, 20, 59,158,102, 95,127,109, 24,104,
- 17, 12,169,162, 91, 46,220,121,242,228,121, 20, 10,176,161, 84, 39,110,220,184,215, 57,209,184,186,248, 63,243,233,213,223,254,
-127,150, 9, 17,221,159,112, 7,201, 65, 76, 0,194,178,155,165,163,205, 15, 0, 80, 20, 11,226, 19,238, 38,169,134,131, 36, 70,
- 0,228, 30,243,190, 65,186, 33, 64,150, 21, 72,121, 58,120,118,160, 10,196,140,130, 45,236,244, 14, 16, 76,158,128,125, 30, 37,
- 89, 4, 89,220,209,114, 18,190,115,231,142, 88, 44, 22,197,158,131,187, 91, 74,182, 48,241, 30, 53, 82,102, 76, 66,119, 32,117,
-178,108,221,186,213, 50,119,238, 92, 11, 38, 20, 11, 36, 46, 22,180,139, 5,245,183, 80,141,104,132,142, 54, 15,164,108, 43, 40,
-201,194,100,237,141, 9,204, 27,255, 41,159, 16,249,123, 3,192,122, 39, 79,158,124,157, 89,154,200, 95,174, 83,167, 78,229,236,
- 65,150,250, 27,147,122,121,128,197, 26, 38,233, 86,232,222,189,123, 89,244,163, 1, 92,124,181,137, 96, 11,160,179, 34, 38,222,
-106, 38,104,158,192,194,231, 15,224,234,179,124,249,114,159, 53,107,214,248,108,222,188,217, 7,252,244, 65,155,249, 96, 1,243,
- 65,155,249,128,230, 35,208, 60,129,196, 0,222, 46, 47,216, 99,181,111, 92, 44,221,235, 54,229, 51,202,165,105,117,229,213,210,
-198, 10,192, 10,126,236, 99, 27, 86,193, 15,175,200,203,249, 53,228,249,216, 76,210, 32,119,220,151,105,227,197,179, 55, 56,214,
-123,205,199,248,159,199,218,247, 33,113,110,203,255, 49, 94,240, 1, 52, 67,128,173, 13, 27, 54, 40,188,228,120, 15, 37,200, 82,
-138,130,121,108, 47,198,115,176, 86,162,197, 13, 43,199, 44, 54, 74,123,141,150,151,146,121,142,103, 46,238,136,195,167,244, 75,
-196,228, 19, 72,238,185,249,149,220,185,115,115, 94,102, 0,100, 65, 31, 85,198,190, 81,160, 69, 0,136,152,129, 33, 64,150, 10,
-182,248, 73, 30,112, 62,229, 28,227, 74,162,133, 50,133,149, 49,124, 8,182,168,160,136,146, 44,130, 44,218,129,169,137, 32, 72,
- 77, 4,113,228, 51,109,180, 48,159,216,171, 14,157,210, 36,200, 90,247,245,255,147,118,109, 98, 91, 25,165,105,180, 45, 63,117,
- 62, 39,167, 14, 85,105,191,106,171, 21,210, 70,235, 83, 20, 18, 70,240,183,230,175, 61, 36, 63,253, 54, 77, 42,254, 50, 94,126,
-108, 51, 81,170,181,159, 34, 85,126, 29, 39, 69,107,116,176,181,195,148, 89,139,165, 98,147,126,242,203,192,101,210,121,212, 90,
-153,187,214, 91,162,197,140,235,114, 23, 1,251,171, 66,125,211, 39,181,188, 25,223, 88,142,205,255, 65,158,159,169, 22, 18,104,
-121, 85,145,224,190,197,165,123,138,216,180,213, 42,228,170,190, 42,208,234, 5,201,150, 98,147, 69,123, 44,171, 20,139, 96, 75,
- 5, 92, 71, 1,194, 8,178,174, 67,242,117, 59,107, 86, 5, 48,132, 6,104,109,223,190, 93, 24,213,156,187, 38,236,198, 30,135,
- 82,141,150, 25,118, 63,247, 96,168,173,136,163,237, 19,239,243,127,212,219,140, 61,152, 7,203, 66,169, 19, 7, 25,119, 33, 44,
- 43,245,246, 31, 8,180,114,195,150,232, 17,141, 55, 9,218, 88, 86,130, 64,130, 77, 76,114, 70,213,168,253,236, 0,212, 78,212,
-109, 50,210, 36,187,196,123, 59,237,242,118,115,213,254,152,196,125, 57, 9, 16, 96,165, 75,151,206,161,209, 45,236,138,132,182,
- 29, 4, 91,216,229,221, 54, 50,126, 50,103,206, 28, 0,201,147, 5, 19, 58,213,203,182,132,231, 45, 48,148,181, 96, 2, 15, 52,
- 66, 71,155,167, 80,161, 66, 7,168, 46, 68, 59, 41, 32, 75, 77,144,116, 41,106, 68,148,243,176, 89,154,200,223, 16,237,252,158,
- 52, 75, 5, 90, 88, 64, 74, 98,176,118, 49, 73,183, 17,213,143,224,237, 41, 46,102,218, 68,201, 22, 36,165,208,243, 75,103, 19,
- 52, 9,180, 30, 19,100, 65, 98,226, 3,155,154, 16, 32, 11,139,135, 15, 84, 32, 62,224, 1,251,211, 9, 36, 93,160,133, 60,225,
- 50, 37,142, 57,107,205,128,154,242,106,117,107,121, 57,175, 26, 64,214, 53, 57,122,225,158,212,237,179, 78, 73,252, 30,116,255,
-188, 60, 31,150, 82,188,219, 39, 16, 4,136, 39,112,252,220, 23, 85,230, 42, 79,143,127,238,194, 56,120,191, 2,182, 8,178,184,
-129, 1, 72, 23, 72, 54, 67, 35,201,210,146, 46,136,241,242,140, 96,128,128,134, 6,229,148, 54, 65, 50,195,113, 85,208, 40, 15,
- 8,180, 56,134, 55,110,220, 40, 41, 82,164, 80,202, 68,128, 69,227,111,170,250, 40, 57,162, 58,177, 81,163, 70,138, 74,141, 82,
- 29,188,215,229,120, 87, 37, 90,148, 48,117,104,223, 94,145, 98,145,174, 10,178,212,239,220,184, 82,154, 69, 94,232, 0, 45,163,
-213, 49,149,143, 27, 63, 46,186, 92,119, 92, 1, 45,242,149,210, 67,206,215, 0, 90,122, 18, 45, 27, 77, 87, 64,139,239, 53, 74,
-211, 84,165, 62,127,102, 85,131, 96,255,249,174,100, 64,244,197,172, 34,187, 98, 31,171,172,240,147,117,155,167, 9,235,119,253,
- 11, 32,107,146, 84,239, 48, 85,106,253, 54, 93, 74,212,233, 46,199, 79,157, 87,128,214,148, 89, 75,164, 82,211,119, 32,171,205,
-144,149,210,109,236, 6,153,187,238,168, 68,139, 17,215,101,231, 46, 30, 39,210,217,187,191,215,144, 91, 19, 74,139,207,174,114,
- 66, 41,150, 58,249, 40, 18, 45,166, 89, 37,229,102,163,204,194,188,174,234,168, 2,173, 1, 0, 80, 4, 89, 71, 19, 36,176,169,
- 11,181, 64,139,210, 44,130,172, 91, 56,129,120, 11, 18, 45, 14,118, 51, 64,139,199,115, 89,103,238,104,152,184, 27,163,184,154,
-110, 4, 66,217, 6,185, 49, 16,238, 31, 56,112, 64, 81,111,169,137,191,121, 31, 52, 77,219,129,177, 44, 84,237,113,210, 80,203,
- 73,112,196,178,135,178,140,153,243,229,203,247,144,192,141,106, 72,109, 57,201, 63,130,185, 84,169, 82,233, 2,194,104,209,162,
-157,112, 41,190,115,241, 39,158,229,238,223,233,133, 9,232, 16,129, 31,119,176,148,100,177,190,156,208, 33,217, 83, 38,115, 94,
- 60, 65,196,137,135,246, 37,224,237, 9, 35,188,224,196,166,170, 13, 41,201, 82, 19,213,135,188,111, 5,194, 70, 72,217,242,164,
- 78,157,122, 5, 64,161, 55, 38, 75,111, 44, 22, 10,208,130, 13,157, 55, 64,191, 2,180,176, 40,172, 53, 69,240, 93,230,122, 40,
- 91, 8,149,161, 86,186,101, 5, 69, 84,195,154,185,234,211, 38,203, 5,208, 42, 13,182, 14, 50, 65,240, 4,218,232,161, 10,178,
- 32, 29,177, 73,178, 8,178,240,159, 15,250,147, 15,128, 45,251, 61,219, 71, 15,104,189, 3, 89,127, 84,131,138,176,181, 60,153,
- 94, 22, 54, 89, 13,148,182, 38,192,202, 92,111,182,146,248,157,215,243,241, 57,196,210, 55,170,148,248, 46,166,203,185,196, 68,
-125, 62, 36,235, 73,117,174,195,167,215,135, 16,250, 72,207,218,108,178, 56,142, 40,197,230,156,100, 45,179, 33, 21,159,163,114,
-209, 12,226,175,191,254, 82,128, 22,231, 18,110,140, 48, 95,153,170, 63,129, 22,250,136,162, 30,155, 57,115,166, 34,181,174, 88,
-177,162, 34,169,230,184,167, 4,155,180, 41,129, 97,217, 57,111,153, 1, 90, 84, 67,186, 2, 90,156, 83, 49,214,244,128, 86, 44,
-212,117, 12,202,106,200,189, 3,243, 49, 63,120,230, 82,218,154, 40, 81,162,219,236,203,156,131,245,128, 22, 65, 33,219, 13,155,
- 68,151, 64, 75, 75, 83, 15,104, 57,163,249, 41,176, 72,104,250,185,234, 25, 94,141,113,232, 68,162,101, 47,201, 10,105,186,241,
- 41, 12,208,162, 68,143,189,117,240,164,101,210, 97,200, 98, 43,200,250, 75,234,116,157, 41,165,235,209,139,254,187,171, 82, 83,
- 79,105, 13,144,213, 22, 32,171,195,240, 53, 50, 96,218, 14, 25, 62,125,173,196,138, 19,127,171, 51,230,100, 13,239, 81, 99, 66,
-254,180,207, 95,141,169, 35,199,150, 20,145, 87, 23,106, 56, 6, 90,167,171,137,244,200, 37,195,210,198,182,240, 25,103,244, 8,
-180,184,144,142, 76,158, 92, 1, 89, 7,227,196,113,168, 58,244,134, 26,241, 12,254, 87,129, 22, 37, 50,102,128, 22, 29,193,177,
-206,170,244,137,246, 64, 48,222,126, 24, 74,137,150, 82, 29,170,222,160, 78,122, 64,113, 48, 39, 9,126,242,183, 9,149, 92, 8,
-182,176, 44, 44, 19,203,166,150,147,187, 82,150, 61, 52,157, 21,246, 76,215, 9, 94, 8,222, 88, 62,251,196, 73, 19,146, 15,218,
-128, 93,215,161,239,249, 1, 18,173,223, 92,209,198, 73,164,161, 80, 69, 5,115,162, 37,192,228, 68, 68,149, 1,129, 22,119,180,
- 44, 59, 1, 23,129, 22,242, 9, 38,151,241, 70,120,129, 54,152, 51,106,212, 40,108,160,159, 41,192,138,159,160, 97, 65, 23,176,
-116,236,216, 49,180, 54, 90,205,166, 76,153,114, 16,147,150, 55,108, 66, 20, 27, 45,244, 67,111,208,244,238,210,165,203,126,128,
-202,214, 70,202,102,151,167, 16,236, 85, 74, 57, 83, 29,162,220, 24, 96,210,222, 36,221, 31, 72,211,153,234, 16,229,199, 78, 72,
-218,152,160, 73,160,245,128,146, 44,130, 44,128, 56, 31, 24,245,250, 0, 28,251, 96,145, 84, 64, 22, 22, 72, 31,180, 27,251,169,
- 30,208, 82, 64,214, 90,207, 42,242,106,197,207,178,164, 45, 64,212,196,188,242,114,238,143,206,129,214,216,204,242,124,224,215,
- 82, 47, 79, 60, 26,219,127,238,171,184,181,142,151,241, 89,226,115, 23,198,238,253, 54,144, 69,155, 37,206, 35, 4, 89,188,194,
- 64,170, 85, 2, 11,255, 51,154,108, 16, 44,149, 45, 91,150,210, 44, 83,245,167,173, 41,199, 51,213,152, 4, 61, 80,111, 43, 0,
-144,182, 85,220,108,113, 14,224,102,138, 32,139,239, 32,216, 0,208,178, 63,205, 23,162,202,170, 68,139, 96,141,224,237, 44,230,
- 59,173,202,144,223,175,225, 63,206, 33, 4, 89, 4,121,174, 36, 90, 4, 77,203,150, 45,131, 0, 61,232,189,237, 35,239,105,221,
- 82,112,158, 98,125, 48, 55, 6, 89,193,150,211,238,160,130, 34,218,158,209, 30, 75,171, 46,212,170, 17,137, 13, 56,215,241, 93,
- 70,129, 22,105,210, 30, 75,123,105,213,136,167, 58,183,116, 74,243, 83, 96,145,208,140,145, 48, 59,117,168, 26,161,133,166, 16,
- 70,158,161,199,247,159, 59, 13, 10, 26, 57,107,171,212,254,237, 47,169,219,117,150, 52,232, 49, 87,202, 54,248, 93,114, 22,171,
- 41,185,138,215,146, 42,205,251, 75,219,161,171,164,195,136, 53,210,121,244,122,153,176,248,160,252,218, 99, 84, 80,164, 72, 81,
-233, 45,254,189,171, 24, 78,170,148,141, 25,249,238, 19,207,154,114,109, 82,113,185,189,175,194, 59,233,149,179,180,160,184,220,
-111,144, 70,202,196,136,116,151,207, 58,162, 73,160, 69,163,202,169,240,147,181, 15, 64,106, 11, 78, 23,170,198,240, 84, 23, 82,
-146, 69,144,197,123, 60,137,168, 0, 45,232,241, 57,176,204, 0, 45,116,116, 5,104,113, 33,231,228, 3, 53,207,131,208,218,104,
-105,235,129,197,181, 60, 84,112, 15, 9, 18,248,201,223, 70,218,199, 89, 30,150,137,101, 83, 37,101,156,216, 88,246,208,208,132,
-202,209,139,174, 13,244, 18,243,233,208,119,100,163, 53,208,193, 51,246,128,204,136, 65,124, 42,158, 58,164, 42,152,106, 82, 78,
-182,156,204,178, 64,106,201,137, 86, 5, 89,220,221, 2,132, 82, 98, 98,239,108,208, 89,209,163, 0,196, 93, 31, 56,112, 32, 79,
-201, 89,120,242, 16,180, 21,144,133,251, 55,240, 80,168, 78, 29, 2,244,254, 13,163,213, 3,148,108,169, 39, 15, 9,178,176,179,
-165,113,189,161,147, 92,218, 2, 99,119,155,240,183,223,126,171,129,133,230, 61,169, 22, 38,227, 18,232,178,195,144,160,129, 55,
-126, 65, 29,147,164,115,231,206,213, 97, 59, 85,210,222, 24, 30,210, 56,136,160,133,179,178,158,212, 73,251,194, 19, 24,111,247,
-176,112,251, 64, 10,236, 3,105,176, 13,100,161,221,124, 32,129,160, 52,203, 7, 11, 4,109, 74, 78, 32, 57,165,157, 49, 73,244,
-193,107,251, 86, 82,108,178, 22,255,154, 85, 50, 37,142,126,238,100,143,111,228,249,240,212, 18,116,239,236,251,170, 67,191, 83,
-144,102, 69,145,192,145,223, 75,254,111,227,158, 55,206,133,255, 92,206, 16, 32,139, 39,172,193, 1, 37, 17,100,133, 5,216,194,
-184, 57, 77,127, 82, 60, 33, 8,219,172,211,102, 57, 76,160, 69, 51, 1,206,109, 84,227,113, 51, 73,224,195, 57,153, 99,159, 32,
-139, 0,145,224,133, 18, 24,130, 13,163, 64,139,182, 77,148,178,209, 44,228, 50,212,142, 42,216, 82, 65, 22, 79,251,241, 93,176,
- 45,212, 51,134,191,195,247,178,108,240,223, 23,194,149,131,214,173, 3,191,243,127,106, 70, 40,129,163,100,203, 21, 63, 96, 19,
-122,139,109,203, 54, 63,223, 0, 0, 10, 33, 73, 68, 65, 84,192,249, 77, 15,104,169,126,193,160,109,112, 41,209,210,210,212, 3,
- 90,206,104,106,140,225, 13,219, 59,155,109,247,208,228,215, 74,176,212, 19,136, 14,232,104,125,104,169,223,255,159,237, 19,161,
-200,100,241,190, 78,122,239,175,165,123,224,186, 97,153, 52,236, 57, 87,154,244,158, 47, 21, 26,247,181, 1,223,234, 45, 7, 74,
-199, 17,107, 21,144,213,127,250, 14,153,185,242,136, 36, 76,146,146,139,186, 67,247, 14, 57, 35,134,107,187,180, 92,150, 23,207,
- 71, 86,145,227, 43,139,201,219, 75, 53,109, 32, 75, 29,212, 33, 64, 23,165, 93, 61,179,201,156, 28,241,159,243, 89, 71, 12,167,
-139,134, 7, 24,116, 55,177,219, 88, 10, 3, 73,186,112,216, 10,131,248, 99, 0, 88,215,172, 54, 89,231, 96,244,190, 11, 46, 30,
- 46,192, 96,254, 22, 58,183, 15,108,160,206, 2,249,155,113,239,160, 2, 45, 14,112,216, 7,220, 15,173,212,201, 81, 29,176, 67,
-170, 9, 53,205,125,126,134,166, 83,217, 63,195,178,177,140, 44, 43,119, 62,161, 5, 90, 97, 81, 22, 13, 13,251, 83,135,156, 4,
-180,198,135,137,120, 18,145,157,203,168, 33,188, 74, 27,124,107, 87,187,118,109, 2, 34, 69,117, 64, 59, 14, 78,118,170, 83, 64,
- 78,186,176, 93, 11, 0,143, 93,218,123, 57,168,111, 36,250,205,162,141, 27,120, 24,200, 79, 72, 13, 9,136, 66, 3,178, 84,242,
-225, 64,179, 41, 22,128, 53, 80, 99, 30, 6,136,197, 65,217,104, 28,228,166, 65,150, 74,112,226,196,137,217,177,248,212, 67,253,
- 43, 96,145, 41, 9, 30,148, 1, 15, 40,117, 26,138, 84, 37, 52,237, 56,121,242,228, 28,164, 9,128, 84, 1,125,168, 20,164,122,
-165, 65,243, 39,240,117, 56,133,217, 38,105,242,212,225, 93, 24, 19, 43, 32, 11,155, 10, 31,236,162,125, 32, 33,165, 1,188, 2,
-178, 0, 58,125, 0,144,185,216,184, 4, 90,149,179, 37,188,251,114, 94, 85, 89,252, 75, 70,130,172, 89,233, 19, 69,171,212,183,
-116,108,177,252, 17, 91, 94,140,207, 46, 65, 0, 86,234,197,239, 47,254,204, 6, 27,173, 20,178,177, 99, 38, 73,159, 56,250, 8,
-147,229,254,175,100,183,185,119,224,162,175, 1, 89, 4, 95, 10, 0, 83,193, 22, 1,130,117,174, 14, 77,127, 45, 29, 46, 92,184,
-183, 76,160, 97,218,231, 24,199, 31,141,210, 57,175, 17,160, 80, 3,160,130, 44, 74,219, 85,144, 69, 73,145,234,187,203, 40,208,
-162,233, 1, 77, 33, 84, 35,122,206, 25,164,195,141,154, 10,178,104, 59, 75,233,153, 43,137, 22,205, 52,168, 97, 33,136, 50, 2,
-180,152,135,115,150,158,121,135, 10,138,184,161,228,233, 66, 87, 18, 45,181,255, 3,104, 25, 2,111,164,201,211,133,174, 36, 90,
-206,104,126, 34, 44,242,121,198,225,167,170, 28,156,143,182,248,161,108,173,128,217,171, 14, 73,231,145,171,228,231,126,139,164,
-114, 51, 79, 91,123,212,252,101,176,116, 25,179, 65, 6, 76,223, 41,115,214, 29,151, 50, 85, 26, 62,141, 18, 45,102, 11,103, 92,
-169, 22, 63,202,233, 39,125,171,203,219, 5,101,228,229,181,201, 34,119, 23,233,167,245, 77,229, 65,189, 52, 82, 53, 94,100,135,
- 59, 32,197, 97, 41,194,234,248, 29, 58, 36, 55,177, 11,219, 1,195,231,115,112,225, 64,144,117, 67,181,201,162, 20,139, 73, 5,
- 89, 56,194,220, 34,110, 92,103,161,120, 28, 22,159, 82, 29, 14,100, 24, 67,211, 38,201,180,253,212,103,232, 41,185, 89, 86, 78,
- 30, 44,251,103,120,191,163, 87, 18,108,121, 18, 80, 89,253,104,105, 39,235, 72, 86, 63, 90, 4, 96,148,118,233,186,118,208,190,
- 0,162,247,118,240,147,245,128, 19, 6, 69,225,156, 36, 41,205,227, 88,129,196,235, 33, 38,105, 51,198,219,255, 16,118, 25, 47,
- 6, 22,156,228, 0,150,216,185, 8,117,251,148, 98,117, 52, 41,117,122,239,101, 86,154, 4,108,164, 73,128,213, 62,148, 52,215,
-195,181,198, 35, 72, 29,238, 97, 65,132,198,217,207, 15,192,237, 46, 0,150, 47,218,201, 23,229,190,195, 4, 99,121,158, 58,228,
-105, 60,167, 18, 45,248,207,106, 83, 43,103,130,219,144,108,141,179,246,145,175, 0,160, 54,173,168, 31, 75, 44, 3,226,139,165,
-127,108,121, 62, 46,171,146, 44, 3, 19,224,196, 97,102,185, 56,164,128,228,251, 38,142,111,218,196, 49,190, 54,206,209,255, 92,
- 78, 5, 80,105,252,100,189,231,176, 84, 3,178, 66,109,171,245, 33, 92, 37,208,162,113, 62, 93,130,176,156,122,238, 66,184, 80,
- 1,104,185,148,234,168, 14, 75, 57, 79, 18, 80,177,142, 80,109, 43,246,183,148,156,209,117, 12, 78, 30, 51,194,132, 2,178,224,
- 46,197,145,195, 82, 91,181, 40,153,162,201,130, 81,137, 22,223, 73,105,156,158, 68,139,167, 39, 89, 31,206,105,148,172, 81, 2,
- 71, 16,200,164,149, 42, 97, 12,217,214,103, 61,160,165,165,201,250, 19,100,171, 23,213,133,106, 58,214,170,158, 83,154,159, 10,
-139,124, 72,191,113,241,172,107,137,214, 71,122,169, 67,178,176,213,218,248, 67,153,154,207,166, 47,221, 39,163,255,222, 45,237,
-250,207,145,159,218, 12,145,186,109,135, 73,231,161, 11,100,252,162,131, 50, 99,229, 97, 41, 86,190,246,179,152,177,226,109,116,
- 85,182, 74,113, 34,237,191,220,188, 68,176, 12,173, 42, 50,176,162,200, 31,101, 68,250, 20, 23,249,189,176, 72,119, 4,245,238,
-156, 19,203, 67, 22, 76,231, 25, 67,164,211, 37,146, 4,243, 89,103,180, 85,176,229, 11,123,161,219, 24, 24, 39,112,220,247, 50,
- 84, 71, 60, 93, 72,195,119, 37, 65, 93,168, 72,178, 66, 1,178,248, 94,236, 56,188,160,246,185,142,175,166, 78, 2,126,202,182,
-114,240,174,204, 44, 51,203,254,153,203, 97,255,122,250,207,210, 58, 43, 85,255, 39,240,250,144, 35,182,223,160,190,211, 0, 44,
-207, 80,138,135, 93, 32, 48,119,162,191, 64,243,187,127, 88,253,255,107,197, 81, 61,195, 83,117,231, 42,237,194,255,217,144,190,
- 49,195,160,236, 64,217,233, 19, 69,223,209,189, 20, 14,195,116, 79, 35,254, 99, 97,183, 53,169,160, 92, 26,146, 87, 38, 54, 72,
- 39, 57,146,197,186,145, 46, 97,116,184,229,115, 95, 58, 28, 80,192, 22,146, 35, 32,229,234,191, 79,194, 88,168, 14, 15, 65,154,
- 21, 68,169, 22, 85,136,180,195,226,105, 56,130, 13, 74,160, 40,193,166,217,128,122,193,166,234, 13,230, 2,158,242,116,122, 49,
-156, 14,237,117, 9,120, 40, 41, 35,200,162,221, 41,237,192, 40,217, 83, 65, 22,253,139, 17,100,209, 43,189,131, 16, 60, 54,250,
-180,181,130,183,250, 32,170, 47, 89, 54,126,178,188,148, 64, 17,200, 80,122, 69,176, 68, 9, 28, 37,240, 52, 97,233,215,175,159,
-174,141, 22, 29,175,178, 94,164, 65,176, 73,186,148,220,171,245,182, 15, 35,196,188, 56,124,227, 82,162,245, 49,104,126,146,142,
- 16,246, 47, 9,141,255,194,176, 47, 69,196,104,209,218,196, 79,148,252,126,203,206, 67,131,135, 76, 94, 41,179, 86,123,201,236,
-213, 71,101,232,148,213,242, 75,215,225,193, 9,147,164,186, 31, 45, 90, 12, 93,227, 88, 24,138,164,173, 28, 59,210,177,154, 49,
- 34, 61,175, 25, 61,226,187, 20, 45,130, 45,213,136, 26,254,185,125,170,142,123,149, 98, 69, 60,202,103, 93,213, 76, 5, 91,244,
-248,206,206,204, 29, 15, 69,162,212,105,115, 32,177, 67, 83, 93,104, 86,146, 21,246,220,116, 83,116,115,224, 63,203, 1, 58, 34,
-165,180,202, 85, 34,200, 10,141, 90,234, 43,184,111,168,147, 62, 81,140, 21, 25, 19, 69,187,146, 57,113,244, 91, 0, 95, 91,211,
- 39,140,222, 37, 87, 82,143,104,255, 89,142,155,175,120,104,131, 74,155,127,147,249, 39, 98, 16,108,241,112, 15, 19, 55, 83, 90,
-251, 81,108,172,184,185,242, 3,128, 80, 18,254, 59,136, 87, 68,215,121, 77, 90, 2, 39, 74,182,168, 18,116,149,152,199, 10,178,
- 92,173, 69, 31,229,212, 33,164,121,151,181,167,168,105, 26,161, 38,170, 42,237, 47, 74,188,192, 11, 31, 87,117,255, 24, 52,205,
- 55,233,167,121,194,201,169,195,127,142, 68, 75,195,134,100,145,162,196,236, 21, 51, 94,194,237,209, 99,198,243,141, 30, 43,158,
-111,236,248,137,182, 67, 85,216, 11,121, 12,133,220,249,216, 44, 37,216,162,221, 21, 61,190,211,208,221, 62,241, 63,230,249,216,
-229,112,211,119,115,192,205, 1, 55, 7,220, 28,112,115, 32, 12, 57,144,158,167,187, 85, 96,169,130, 74, 45,176, 84, 1, 38, 63,
- 1, 68, 9,178,244, 66, 79,125, 12,154, 97, 88,229, 47,136,148,170, 67, 53, 88,100, 67, 6,138, 38,221,238,127, 86,154, 6,235,
-205,108,102,203,105,228,148,133, 81,154,170, 95, 52, 79, 3,229, 53, 74,211,166,187, 15, 67,154,102,252,183, 25, 45,103,152,210,
-212,216, 12, 24,165,171, 91, 78,237, 24, 50, 56,158, 12,211, 52, 49,150, 62, 59, 77, 3,253,200,208, 56,210,218,117, 24, 60, 61,
-109,166,238, 70,199,146, 25,154, 70,199,146, 25,154, 97,222, 63, 77,248, 52,114, 89, 78,251, 62,105,144,174, 41,154,236, 40, 6,
-198,146, 41,154, 6,199,210, 63,130,166,129,177, 20,218,114,186, 90,151, 12,245, 79,173,143, 78, 77,219, 27, 89,155, 12, 84,235,
-211,102, 81, 79, 28,170,254,180,236,222, 30, 54, 42, 67,131,147,152,246,221,186, 13,161,205,108, 96,160, 24,154,120, 63, 22, 77,
-147,134,122,134,234,110,176,206,106,149, 62, 27, 77,181, 0, 6,203,107,180,156,187,172, 19,164,242,169,115, 25,165,169, 76, 12,
- 97, 81, 78,109,127, 55,209,246,134, 38, 52,181,140, 97, 93, 78, 19,237,100,184,156, 31,131,230,199,226,167, 94, 39,178,254,111,
-184,238, 6,219, 71,119, 94,114, 52,119, 26,160,109,166,156, 70,199,146, 25,154, 70,199, 82,168,198,166, 78,253, 77,211,252, 80,
-126, 58,235,231, 97, 89, 78,131, 99,201,116,221, 13,204,121,161,162, 25, 22,115,178,182,108, 6,218,200,224, 16,254,188,217, 62,
-186,234,208, 36,163, 12, 53,174,102,209, 41,102,128,125,166,104, 26,160,167, 59, 73,106, 7,135, 9,176,105,168,156, 6,119, 77,
-166,129,150,118, 23, 17,150,131,133, 59, 18, 3, 60, 53, 90,119,163,187,112, 51,109,164,210, 12, 19, 9,161, 61, 32, 48,208,255,
-117,235,174,165, 97,128,158,161,186,219,211, 52,208, 78,159,181,156,154,126,175,215, 78,134,203,105, 98, 44,125, 86,154, 38,230,
- 59, 51,229, 52, 58,150, 66, 67, 51, 76,218, 72,237,147,214,118,242,252, 80, 0, 99, 63,199, 25, 24, 75,134,234,174, 29, 59, 6,
-230,209, 80,209,252,208, 57, 89, 91, 46,131, 99,201, 84, 57, 13,142, 37, 93,154,246,125,221, 32, 93, 3, 75,204,231,201,242, 73,
- 36, 90, 6, 80,179,125,237, 13, 55,132, 9,182, 25,162,105,112,231, 96, 10,192,124, 41, 52, 77, 72, 11, 12, 45,226, 38,235,109,
-152,230,199, 42,167,137,126,170,219,151,190, 52,160,101, 96,177, 49,220,231,237,105, 25,160,109,152,159, 38,250,212,103,165,105,
-162,143,154, 42,167, 1, 94, 26, 26, 71, 31,187,127, 26, 28, 75,186, 82, 50,237,252,110,144,167,166,104,126,204,114,126, 8, 40,
-114,214,206, 31, 2, 50,191, 20,154,142,218,196, 96,219,155,128, 3,255,210,172, 6, 39, 8,195,147,185, 6,241, 42,118, 11, 6,
-216,166, 59,161,217,209, 44, 22, 86, 52, 77, 44, 14,134, 38,201,143, 85, 78,238,200, 12,236,196, 76,181,145,193,137,204, 20,205,
-143, 81, 78,208, 84,118,202,218, 93,169,139,246,215,237, 75,154,137,193, 40, 79, 13,211, 52,193, 83,195, 52, 13,238,110, 13,245,
- 79,237,164,104,144,167,134,203,105, 98, 44, 25,166,105, 98,183,108,134,230,151,210,238, 97, 94, 78, 19, 99, 73, 23, 20,169,109,
- 99,237,243, 70,202,106,138,166,193,177,100,138,166,193,177, 20, 90,154,174,214, 37, 83, 52, 13,142, 37, 83, 52, 13,142, 37, 67,
-227, 40, 20,109,111, 96,201,254,178,178,252, 15,108,217,145,131,204, 67,208, 25, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
+138, 44, 32,239,255, 99,239, 42,192,170,104,186,240,181, 81, 64, 66, 65, 4, 68, 4, 68, 16,196,110, 69,236,238,238,248,236,238,
+238,238,238,238,238,238,110,177,187, 91, 17, 19, 16,131, 58,255,121, 87, 46,255,229,122, 99, 47, 94, 3,157,229,153,103, 47,187,
+179,103,103,222, 57,187,243,238, 57,103,102,148,149, 98,194,148,215,205,205,109, 83,246,236,217, 35,103,205,154, 69,235,215,175,
+167, 5, 11, 22, 68, 78,153, 50,133,198,142, 29, 43,165, 9, 19, 38, 68,141, 25, 51, 38,194,215,215, 55, 50,109,218,180, 47,217,
+234, 85, 65, 15, 40,121,179,164,181,216,148,215, 43, 67,228,171,197,117,137, 78, 54, 36, 90, 93, 48, 50,106,158, 27, 69, 14,180,
+167,207, 99, 51, 83,212, 16,231,168,231, 83, 10, 68, 84,205,231, 22,153, 42, 85,170,151, 76,246,244,201,252,107,218, 65, 84, 68,
+ 32, 32, 16, 16, 8, 8, 4, 4, 2,255, 42, 2,154,184, 72, 60,194, 66,117, 30, 45,121,197,102,151, 97, 2,184, 2,153,104, 13,
+ 46, 93,186,244,253,106,213,170,133,130,100, 77,156, 56, 17, 4, 75, 34, 93, 7, 15, 30, 12,103,119,226,103,118, 31,222,153, 49,
+ 99,134, 23, 36,151, 47, 95, 30,211, 53,104,220,172,172, 83, 37, 48, 79,150,216,222,219, 43,235,224,250, 69,125,238, 15,168,234,
+ 17, 26,182, 56, 39, 69, 13,116,162,200,105, 46, 20,185,182, 68, 36,221, 26, 23, 62,178, 69,137,207, 25,156, 51,220,153,181, 96,
+181, 36,179,100,105,237, 50,229,213, 70,228, 18, 8, 8, 4, 4, 2, 2, 1,129,128, 64, 64, 32,240,211, 16, 48,124, 30,173, 66,
+133, 10,129,104, 37,204,154, 53,171,185,131,131, 67,126, 78,167, 39, 77,154, 4,162, 21, 49,123,246,108, 90,186,116,105, 68,147,
+ 38, 77,130,120,110,173,237,108,253,178, 70,209, 93, 92, 92,116, 6,173,231,201, 95, 32, 65,138,228, 38, 9, 61, 61,189,205,109,
+ 82,167,206,111,155, 58,213,233,176,137, 62, 68, 67, 28, 35,104,126, 14,162,181,101, 35,198,213,206, 27,148, 36, 73,210,237, 44,
+ 78,146,153,206,193, 94, 4,194,255, 52,189, 16,130, 5, 2, 2, 1,129,128, 64, 64, 32, 32, 16, 48, 2, 2,113,159, 71,139,221,
+119, 41,216,125, 87,166, 82,165, 74,119, 56, 8,158, 86,174, 92, 73,243,230,205,139,156, 57,115, 38,245,232,209,227, 6,143, 18,
+172,131, 2, 86,173, 90, 85, 54, 33, 50, 51, 75,153, 34, 69,178, 36,101,186,151,112,191, 19, 53,214,131, 34,183,215,161, 15, 43,
+235, 70, 70, 46,206, 75, 59,186, 20,185,193,211, 70, 72, 50,171, 85,172, 32, 91,166, 17, 64, 18, 34, 4, 2, 2, 1,129,128, 64,
+ 64, 32, 32, 16, 16, 8,252, 90, 4, 76, 76, 76, 28, 57,246,106, 2, 7,192,135,143, 28, 57, 50, 50,115,230,204,143,189,189,189,
+ 23,119,238,220, 57,140,255, 15,131,165,171, 78,157, 58, 54, 40, 21,199,106,169, 19, 35,141, 19,175, 37, 76,152,192,209,218, 60,
+197,132,103,253,115,133, 63, 26, 94, 32,210,195, 45,195,227,108,110, 78,139,215,117, 43, 24,246,108,120,238, 48, 39,107, 51,150,
+ 89, 91,146, 89,160, 64,126, 89, 50,127, 16,149,127,121,130, 56, 81,247, 31, 84, 30,181,203, 5,158, 2, 79, 99, 33, 32,116,201,
+ 88, 72,126,147, 35,240,252,243,241, 52,110, 9,127,189, 52,221, 83, 59,104, 43, 15,207, 6, 95, 63,103,206,156,103,153, 76,125,
+113,114,114,122,205,243,103,245,110,215,174,157, 43,143, 68,188,149, 45, 91,182,247, 60,197,195, 35, 38, 98,181,181, 92,175, 81,
+177,205, 82, 36,171, 95, 34,179,253,217,129,229,115,126,113,180, 77,245, 58,109, 90,135,222,237, 58,116,114, 77,107,155,250, 86,
+ 46, 47,151,247, 85,188, 29, 30,241,212, 15, 6,201,252, 65, 60,197, 3,248,131, 0, 10,178, 17,131,128,208, 37,161, 75,198, 66,
+ 64,232,146,177,144, 20, 68, 43,190,232,146,113, 91,252,215, 74, 83, 95,227, 80,222,154,135, 28,123,229,200,174,195, 81,182,182,
+182,107,205,205,205,207,213,168, 81, 35, 55,202,205,139, 73, 39,244,240,240,240,229,101,120, 78,179, 69,235, 54, 47,163,115,200,
+ 0,162,229,104,102,102, 62,202,194,194,114, 45,203, 63, 87,190, 74,125, 73,102,235,246, 29, 19, 58,103,112,245,229,152,175,211,
+105,108, 82,221, 78,156, 56,177, 33, 50,127, 20,206,248,162,132,162,156, 63,218,210,177,175, 23,120, 10, 60,141,133,128,208, 37,
+ 99, 33, 41, 72,209,191,172, 75,198,213,162, 95, 43, 45,206, 68,203,150, 45, 90,214, 28, 51,229,182,103,207, 30, 19,213, 50,255,
+247,223,127, 9,138, 20, 41, 98,198,214,172, 90,174,174,174,169, 56,105,138,167,210,164, 48,182, 76,204,172,121,169, 29,183, 35,
+199, 46,199,146, 89,183,101,167, 4,185, 11, 21, 51, 51, 79,105, 81,139, 45,102,169,236,211,102,144, 43,243, 71,225,252,151, 21,
+ 91,212,253, 71,181, 71,144, 55, 37, 2, 66,151,132, 46, 25, 11, 1,161, 75,198, 66, 50,126, 17, 87,227,214,250,215, 75,139,155,
+235,240, 7,203, 41, 30,150, 31, 4, 80,237,114,129,167,192,211, 88, 8, 8, 93, 50, 22,146,241,171, 35, 19,237, 46,218,221, 88,
+ 8,252, 12, 93, 50, 86,217,254, 41, 57, 63,163, 33,132, 76,227,170,144,192, 83,224,105, 44, 4,132, 46, 25, 11, 73, 65,222,132,
+ 46,253,155,186,100,220, 90,255, 90,105, 58, 93,135, 80,104, 77,201,144, 34,106,147,161,235,184, 62,249, 66,166,230,118,137,107,
+123, 9, 60, 5,158,114,117, 64, 60,155,218, 17,144,139,161,106, 62,129,167,192, 83, 19, 2,255,178, 46, 41,241,136,107,127,166,
+239,153,250, 29,231,227, 22,163,101,132,146,138,175, 18, 35,128,168, 34, 66,224, 41,240, 52, 22, 2, 66,151,140,133,164,176, 62,
+ 9, 93, 18,186,100, 92, 4,226,167, 52,229, 18, 60,186, 23,151,254, 9,117, 19, 15,160,113, 65, 21,120, 10, 60,191, 67,128,214,
+ 42, 18,209,108,207,140, 52,203,195,143,230,102,117,167,193, 10,173,203, 96,201, 37,237,146,204,169,222,174, 52, 63, 83, 65,154,
+157, 45,163, 49,100,198,177,233,132,206,199, 17, 56, 45,151, 9, 60, 5,158,198, 66, 64,210,165,180, 5,219, 86,179, 47,220,225,
+149, 67,161,118,175,172,220,138, 6,165,177,119,142, 48,214, 13,132, 28,121, 8,136,135, 90, 30, 78,114,115, 9, 60,229, 34, 37,
+ 47,223, 95,129, 39, 77,207,236, 69,179, 51,111,165, 57,158,254,156, 86,209, 76,111, 31, 25,213,215, 89,247,104,153,155, 36,153,
+179, 50, 47,167, 89,158,222, 63, 42, 83,198,245,154,178,252, 21,109,244, 39,215,189, 67,251, 54, 84,204, 55, 59,185,166,183,165,
+210, 37,178, 81,167,142,237,200,192,242,138, 54, 50, 16, 48, 61,217,227, 21,158,105, 11,180,123,211,120,220, 25,106, 51,243,166,
+148, 90, 77,189, 66, 60, 61,211, 94,174, 99,125, 78, 41,140, 11,141,144, 38,235, 37,201,211, 58, 4,112,198,168,228,201,147,111,
+224, 61, 76,109,134,110,241, 74, 9, 13,173,220,223,244, 0,254, 1,117,183,143,214,179,168,104,189, 83, 47,146, 46, 93, 50,231,
+151,197, 64,158,218,228, 32,175,142,240, 10,137,231,120, 59,136, 99, 44,196, 92, 71,221,126,169,126,210, 82, 31, 83,154,153,169,
+199,151,105, 30, 23,118,182,181,123,250,113,138,251, 69,154,237,209,135, 22,100,210, 85, 70, 20, 95,107, 57, 37,153,179,189,186,
+126,154,234,113, 97, 89, 51,167,103, 33,147, 89,230, 76,207, 94, 63, 34, 83, 5, 47,171,164, 73,147,238,226,255,109,100,234,199,
+ 47,197, 83,102,153,100,189,235,126, 64,150,242,210, 95, 82,247,138,101, 11,210,231,160,131,180,106, 73, 15,122,241, 96, 54,149,
+ 42,158,227,135,136,150,151, 66,145, 59,119,226,196,221, 51, 43, 20,197,185, 34,113, 93, 70,237,151,212, 61,190,180,209,159, 92,
+206, 88, 22, 45,215, 34, 81,105,210,166, 39, 44,209,215,184,113, 99, 74,159, 62,253, 71, 46,123, 45, 35,148, 95,136, 48,176,211,
+161,215,175, 95,211,218,181,107, 35,120,142,174, 80,238,184,250,240,245, 73, 13, 64, 49, 94, 63,128, 60,241,235, 9, 94,172, 59,
+128,235, 30,192,251,243,202,122,107, 59,174,134, 75,188,174,187, 74, 93, 60,120, 18,220, 71, 60, 25,238, 45,213,250,217,102,171,
+ 86,208,189, 80,163, 65,169,189,171,248,105,208, 7, 67,234,158, 20,122, 5,253,130,158, 61,123,246, 12, 29,135,166,206, 67,155,
+204, 34, 60, 25,239, 19,127,127,255,240, 79,159, 62, 69, 5, 94, 92, 65,239, 47, 45,161, 55,231,230,208,197, 61,179,194,173,172,
+ 44, 31,179,188, 34, 90,116,214,144,114,202, 85,123,237,164,104, 14,187,247,102,103,222,117,174, 79,186,219,243,235,167, 10, 63,
+220,217,225, 62,147,164,189, 76,190, 50,233, 17,174, 93, 38, 92,134,179, 51,239, 56,209,195,233, 78,235,202,185, 34,118,180,119,
+122,192, 50,247,208,116, 15,247,184,202, 84, 94,151, 48, 97,194,190,220, 54,145, 76,182, 70,200,172,252, 47,197, 83,102,153,254,
+ 42,162, 85,179,106, 81,250,252,225, 0,109,223, 48,144,137,214, 44, 42, 83,226,199,136, 86,142,132, 9,187,132, 85,175,254,101,
+ 73,182,108,155,153,108, 85,214, 66,182, 64,192, 58,242,146,110, 59,121, 95,247, 7,159,119,213,203,199,120,122,122, 62,227, 3,
+157,226, 32, 83,227,123, 41, 87,174, 92, 5,139, 21, 43, 54, 40, 71,142, 28,113,121, 47,105,148,249,163,207, 81, 28,244,244, 87,
+ 61, 71,237,179,103,207, 30,217,173, 91, 55, 90,183,110, 29,109,219,182,141,178,100,201,242,149,203,235, 16,135, 50,199,183, 75,
+114, 70, 23, 88, 25,171,101,184, 33,169,166,139,162, 80, 61, 87,197,225,218, 46,138,224, 58,174,138,144,134,174,138, 99, 53, 92,
+164, 47, 22, 93,155,166,198, 37,108,175, 94,189,162,143, 31, 63, 82,175, 94,189,190,176,213, 1, 15, 70, 25,153,168,198,146,201,
+147,159,158, 99,171,195, 19,126,121,199, 42, 11, 31, 59,199, 22, 8, 28, 47,161, 42,151, 23,200,150,136, 14,239, 99, 72, 14,159,
+143,145,137, 25,240,113, 30,123,213,235, 32,135,143, 61,229,235,212,143, 23,231, 99, 79,212,143,171,202, 84,149,131, 14, 60, 40,
+ 40,136, 66, 66, 66,136,201,198,115,229, 57, 28,255,240,225, 3, 5, 7, 7,199, 58,174,134,137,206,135, 5, 24,160,206,168,187,
+ 90,217,165,227,234,117,138,206,243,157, 76, 21,236,180, 97, 26,151,118, 87, 22,201,163,116,233,210,175, 35, 34, 34,200,205,205,
+237,149,106, 57, 61,253,254, 27,118,250,118, 72, 80,243, 94,179,214,216,122, 85,205,106, 72,221, 85,242,150,129, 62, 65,175,160,
+ 95, 32, 89, 47, 94,188, 48,132,104,149,172, 82,165,202,251,176,176,176,168,200,200,200, 40,110,143,168, 3,131, 93, 41,108,177,
+ 21,133,174,201, 78,111,143, 13, 97,194, 53, 59,170,116,209,220,239,181,180,241,175,122,161, 41,104,173, 87, 82,154,155,185, 89,
+228, 44,207,243,139, 27,166,126, 31,176,182, 13, 77,172,102, 21, 18, 54,195,227, 60,205,204,220,154, 22, 57,199,154, 16, 88, 14,
+158,146,204,153,153,154, 66,230,144, 26,174, 31,214,174, 92, 66, 93,203,187,124,252, 38,211,163,101, 92,100,170,220,151, 13,139,
+ 73,222, 76,153, 50,133,152,104, 5,241,241,100, 50,158,249, 95,134,167,140,178, 24,250,174,139,149, 63,175,131,194,177,120,198,
+ 68,103,114,218, 43, 10,201,188,151,156,186,103,137,126,222, 61,226, 42, 83, 73,180,170, 84,200, 69,101, 75,102,255, 97,215, 33,
+ 91,180,202,128,100, 69,213,172, 25,169,133,108,129,100,245, 30, 61,122,180, 63, 63, 99,254, 60,217,245, 97,254, 95, 61,174, 80,
+ 78,221,213,171, 60,153,101, 18,222, 45, 46, 46, 46, 31, 12,148,169,245,189, 84,170, 84,169, 97, 15, 30, 60, 8, 26, 56,112,224,
+ 26, 38, 93,134,188,151,180,202,212,211, 86,113,169,187,190,230,255,149, 50, 29,185, 48,189,184, 79,252, 0,162,213,165, 75, 23,
+188,127,107,234, 43,160,190,243, 76, 27,146,113, 42,198,169, 2,167, 18,156,242, 70,255,206,195,123, 36, 28, 47,169,182,207, 3,
+185, 42,231,243,105,145,129,107, 85,175, 87,149,137,227,170,255,199,250,173, 82,110,229,168, 67,245,253,183, 44, 0, 67,117,175,
+ 94,225, 58, 46,138,193, 29, 10, 58,134, 94,223,186,130, 66,158,220,167,119, 55, 46,208,133,185, 35,169, 67, 30,219,208,250,174,
+138, 49,250, 0, 82, 59, 47, 17,173,227,199,143,211,213,171, 87, 37,194,113,251,246,109,202,151, 47,223, 39,126, 97,236,231,188,
+ 46,134,200,227,198, 12,216,191,127, 63,113,231,253,129,137,196,120,229,195, 5,178,132,123,224, 56,231,153,204,199, 19, 65, 46,
+ 47, 35,244, 10,247, 87, 37, 57,170,247,227, 78,246, 29,206,195,226, 20,125, 60, 17,174,231,245, 29, 67,206,158, 61, 75, 76,136,
+148,199, 19,242, 61,198,183,111,223, 62,132, 45, 31,170,199,117, 22,159,173, 56, 79,248,229, 66, 91,183,110,165, 52,105,210,196,
+ 34, 90, 56,190,121,243,102, 93, 68, 75,155,236,132, 92,247,113, 13, 27, 54, 12,126,248,240, 33,241,108,253, 49,101, 4, 38,108,
+194, 13,126,252,248, 49,217,216,216, 40,143,235, 44, 35,174, 63,113,226, 4, 85,175, 94, 61, 72, 21, 83, 28, 63,121,242,164,242,
+248, 56, 13, 47,178,239,228,242, 18, 77,173, 80, 79, 36, 43, 43,171, 17,246,246,246, 47, 3, 3, 3, 37, 29, 80, 18, 45,165, 37,
+ 43, 77,150,202, 93,102,175, 61,121,250,200,149, 55,129,217, 74,181, 25,103,153,173,138,165, 1,186,224, 2,253,241,243,243,251,
+244,228,201, 19,137,196, 95,186,116, 73,210,179, 59,119,238,104, 35, 90,234,226, 83,114,125,159,125,249,242, 37, 10,137,203, 25,
+201, 31, 4,145, 55,198,219, 19, 45, 76, 18,147,222,111,174, 68, 47,143,140,138,178, 48, 55,125,202, 2, 82, 26, 80, 70,163,102,
+165, 25,222,233, 16,147,117,109, 96,250, 27, 71, 70,151, 13,167,135, 7,104, 69, 83,219,240,195, 93, 28,239,114, 92,213,122,154,
+227,229,100,232, 13, 37,153,179,188, 86, 92,234,151,254,230,180, 33, 29,195, 31, 61,122, 68,221, 27,151,141,216,211,193,241, 30,
+ 91,185,214,198, 69,166, 74, 25,234, 85,171, 86, 45, 4,186,200, 11,211,127, 76,148, 40,209,127,134,150, 47,190,230, 7,201, 42,
+233,145,236,217,165,229,221,163, 42,101, 49,125, 99, 0,217,210, 85,229, 44,252, 92,189, 94,188,120, 49,241, 59, 10, 31, 45,114,
+201, 86, 44,153, 32, 90,159, 62,236,167,170, 21,243,234,116, 25,214,174, 93,155,216,178, 67, 29, 58,116,208,231, 90, 76, 0, 75,
+150, 22,178, 37,145,172,177, 99,199,250,135,135,135,251, 47, 90,180,200,191,114,229,202,254,124,172,251, 15,182,237,148, 49, 99,
+198, 16,203, 36,150, 73, 44, 19,101,156,170, 77,166,156,247,146,210,146,197,107,253,118,217,180,105,211,233,155, 55,111, 6, 86,
+172, 88,113, 28,175,241,171,241,189, 36, 71,230, 15,214,241,167, 92,206,239, 60,247,172, 89,179, 46,227,103,242, 49, 91,163,190,
+122,121,121,125,230, 37,246, 30,178, 37,106, 49,135, 76, 24,212, 31,171, 20, 48,127,161, 66,133, 34, 15, 31, 62, 76,252,204,163,
+ 45,148,214, 30,157,117,208,197, 69, 64,172,122,247,238, 13, 15, 24, 97, 15, 98,132,223,209, 4, 41,230,183,242,152,202, 57,137,
+124, 41,255,215, 36, 3,231, 52, 92, 39, 93,163,233, 30,170,242, 84, 42,164,110,201,138, 61,221, 3, 42,199,201,143,211, 97,117,
+ 20,106,185, 42, 10, 50,201,250,244, 41,240, 5, 93, 25,217,153, 14, 22, 75, 71,199,139,166,165, 91, 93,171,209,139,229,147,169,
+109, 14,235,208,154,174,138, 98, 6,104,128,212,201,130,156, 32,157, 63,127,158,248,107,129, 96,205, 89,189,122,117, 36,119,230,
+159,184,113, 71,179, 60, 89, 65,116, 32, 84,144,199, 29, 35,141, 24, 49,226,115,180,165,202, 14, 68, 9,199,223,191,127, 79,252,
+149,243,153,255,191,196, 50, 29,152,108, 60,185,127,255, 62,217,217,217,197,144, 28,213,178,131, 72,241, 3,165, 36, 78,142,252,
+255,149, 45, 91,182,132, 65,214,211,167, 79,137,137, 18,200,138, 29,151,243, 2,227, 37, 29,127,254,252,185,242,184, 94, 24, 64,
+180,216, 29, 69,188,164, 81,172, 50, 40,143,239,220,185, 51, 22, 1,211, 43,144,203,194,117,243,103,236,190,130,168, 93,185,114,
+ 69, 73, 18,237,152,216,156,103,215,153,116,252,198,141, 27,178,201, 96,134, 12, 25, 36, 50,138, 47,195,217,179,103,127, 81, 98,
+170, 60,254,245,235, 87,248,224,191, 48,246,120, 65,218,233, 42, 35,227,253, 28,249,209, 14, 76,166, 67, 64,124, 96,209,195, 6,
+121,184, 86,105,201,106,214,115,198, 26,151,188,245, 71,238, 62,243,236,233,252, 77,231,252,109,178, 84, 41, 43,163,254, 41,160,
+ 47, 76,224, 62, 31, 61,122, 52,146, 45, 81,132,142, 28,122,165,212,177,203,151, 47,203, 34, 90,136,191, 58,125,250,116, 24, 44,
+ 89,236,222,150, 72, 22,167, 8,117,162, 5,210,245,122,103, 11,218, 62,183,211, 87,182,204, 32,102,235,151,111,210,168,192, 57,
+158, 85, 16,172,190,184,161,205,235,224,243, 43,137,246,118,162,123,195, 92,105, 96,217,148,193, 81, 82, 96,124,230,154, 52,216,
+ 47,177,220,194, 73, 50,231,122, 85,130,204, 49,181,156,223, 92,240, 63, 75,120, 81,206,156, 60,150, 58,148,116,252, 40,201,156,
+229, 85,221, 16,153,170,247,230,118,186,125,236,216, 49, 58,114,228, 8, 13, 25, 50,132,152, 24,195, 5,251, 67,155,100,129,155,
+229,225, 76,243,120,196,229,130, 76,246,116, 72,126,125,127,232,198, 6, 92, 12,146, 85,202, 35,217,211,215, 23, 54, 17,189,189,
+ 67, 47,199,123, 83, 89,207, 36, 63, 74,182, 64,178, 2,241, 97,245,242,229, 75,154, 56,113, 34,241,243, 24, 39,178, 37, 17,173,
+247,251,116, 18, 45,254, 0,165, 73,147, 38, 73, 68, 38,127,254,252,250,136, 22,208,249,142,108,121, 42, 20, 85,248,120,159,113,
+227,198,197,144,172, 25, 51,102,248,243,243,233,207,177, 60, 59, 12,128, 84, 61,235, 84,150, 25, 67,178, 88, 38,225,153,119,118,
+118,126,162, 77,166,156,247,146,210,146,213,191,127,255, 53,188,220,220,200, 11, 23, 46, 60,221,190,125,187, 63, 19, 47,141,239,
+ 37, 57, 50,127,160,142,210,165,252,218, 76,204, 9,150, 29, 36,254,250, 35, 16, 87, 36, 60,231, 73, 56, 73, 6, 5, 57, 27,127,
+152,155, 22, 44, 88,208,191, 65,131, 6,161, 32,235,208, 37,124,156, 2,203, 65,131, 6,209,194,133, 11,241, 81,253,145,223,219,
+167,107,214,172,153, 92,142,204,232, 60,222,176, 40,194,104,176, 98,197, 10, 88,175,183,203,189, 86, 23, 23, 81, 35, 55, 18,193,
+ 2, 36,223, 96,249, 63,145, 82,253, 95,219,111,109, 36, 77,147, 28,245, 99, 26,238,135,234,233, 95, 64, 58,186,114, 26, 31,158,
+122, 46,138, 3, 87, 55, 46,162,107, 99,187,211, 94,159,196,116, 36,123, 18, 58,147, 51, 9, 93,202,157,148, 30,183, 42, 74,167,
+219, 87,160,198,110, 9, 78,202, 5, 50,186,144,146, 53, 75, 53, 93,191,126, 93, 34, 44,232, 36, 59,117,234,244,153, 93,130,175,
+ 57,111, 85,125,114,149,132,234,192,129, 3, 4, 75, 9,147,162, 40,182, 86,189,100,150,254, 30,232,195, 50,131,175,114, 38, 48,
+ 81,252,197,129,184,168,183,184, 15,255,214, 72,180, 64,164, 64,252,248,250, 15,153, 50,101,122,131,242, 68, 69, 69, 73, 74,136,
+ 78,135, 73,199,123,102,251,175,112, 28, 27,246,184,135,138, 21, 73,103,145, 57,223, 19,144, 14,116, 54, 76, 14, 98,202,128,227,
+239,222,189, 35,212, 67, 27, 9, 84, 23, 12, 87, 33,199, 56,188, 66,217, 64, 52, 79,157, 58, 69, 59,118,236, 64,217,223,243, 87,
+201, 43,212, 27, 36, 7,164,227,224,193,131,178,203,200,166,124,137,104,157, 59,119, 78,178, 12,161,126, 92,214, 0, 94,127,242,
+ 3,142,195,178,135,178,226,126, 78, 78, 78, 1,234,110, 91,213,114,194,138,134, 50,160,109,240,165,169,108,115,144, 63,190, 86,
+ 34, 90, 54, 62,149,107,204, 90,123,226,212,225, 75,175, 95,217,101,175, 62,112,224,212, 77,187,241,219,214,167,114, 91, 61,237,
+ 95,149, 93,162,175,167, 79,159,206,183,248, 74,111,222,188,145, 8,165,186,110,225,255,232, 7, 82,167, 56,238,248, 15,113,125,
+163,144,148, 36, 11,132, 75, 19,209,250,184,194,131, 30,110,109, 23,197,250,167,109,241,115,125,170,251, 67,231,105,158,119, 26,
+ 30, 9, 56,243,225, 48,151,107,171, 59,230,248, 74, 47, 47, 16,205,203, 70,108,113,162, 33,229,173,194, 79,247,116,186,197,132,
+105, 30, 45,242,210, 73,132, 85, 11, 33,201,156,237, 57,253,222, 80,151,107,195,219, 84,250, 10,247,254,250,245,235,137, 59, 23,
+106, 94, 33, 71,248,177,110,233,110,179, 85,107,142, 33, 50, 85,228,251,242, 87,115,176,170, 76,214,167, 16, 62, 95, 42,174, 64,
+192,141, 73,243,188,138, 73,214,187,217,158, 71, 56,142,108, 9,147,203,188, 52, 39, 39, 58,156, 63, 98, 83,146,172, 55, 23,191,
+145, 44, 90, 82,136,104, 65, 46,122, 49, 53, 31,149,205,108, 18, 87,178,149,133,223, 17, 18,201, 10, 8, 8,144,218,103,239,222,
+189,180, 96,193, 2,124, 76, 25, 76,182,190, 17,173,189, 84,165,146,102,139,150, 42,201, 66,231, 91,161, 66, 5,226,206,217, 96,
+178, 53,194,195,227,122,235,186,117,239,241,179,234,207, 31,197,146, 37, 11, 36, 43,111,222,188,167,184,177,226, 26, 48, 61,125,
+252,248,241,132, 15, 44,150, 41, 89,178, 64,178, 88, 38,226,130,218,105, 83, 2, 57,239, 37,142,201,170,177,113,227,198, 83,252,
+ 78,121,149, 39, 79,158,129,179,102,205,218,141,223, 76,180, 52,190,151,228,200,140,171, 82,130, 80,113, 74,206,201,130,147, 53,
+167, 84,156, 44,153,200, 88,113,251, 88,178, 92,139,232,132, 65, 48,186, 66, 6,164, 34,176,245, 42, 29,215,233,253,134, 13, 27,
+164,126, 12,241, 84, 76, 36,137, 61, 55, 24, 49, 72,131, 7, 15,150,244, 9, 31,197,115,230,204, 33,182,226,189,101,226, 42,231,
+ 93, 98,194,253,207,141, 85,171, 86, 17, 99, 71,142,142,142,129,124, 59,231,232,122,247,231,143,127,180,117, 21,109, 56,232,226,
+ 34,170,196, 10,239,115, 25, 4, 72, 39, 1, 83,202,208, 70,186, 52,157, 87,189,175,202,111, 84, 71,105,205,210,222,196,186, 88,
+100, 93, 23,197,219, 55,151, 78,211,241, 18, 78,116, 60, 71, 18, 58,151, 43, 41, 93,205,147,148,238,228, 79, 70, 79,139, 91,211,
+139, 30, 85,137, 99,183,240,194,148,187, 73, 13, 11,119,142,166, 4,146,131,151, 7,190,124, 57,112, 54, 82,159, 80, 16, 35,200,
+ 3, 65, 97,139, 6,221,187,119,143,216, 42, 65,125,250,244,249,138,227,176,106,128,165,227, 56, 30, 64, 54, 89,135,161, 67,102,
+ 5,208, 72,180, 64,152, 16,215,195, 95, 49, 97,176,178,193,170,131,114, 42,173,111, 3, 6, 12,248,170, 60,142,178, 66, 38,172,
+ 72,114,221,114,176,168,161,126, 32, 41,170,100, 79,121, 28, 22, 31, 85, 2,166,171,254, 40, 43,172, 99, 32,110,168, 51, 48, 3,
+ 41,234,219,183,239,215,207,159, 63, 75, 15,201,197,139, 23, 99,202, 46,183,140,112,233, 1,187, 51,103,206, 72,164, 10, 49, 78,
+119,239,222,197,139, 76,194, 20,247, 66, 2, 78,120,217,171,184, 89,191, 43, 46,218, 7,121,208, 62,253,250,245,147,246, 32,125,
+ 40, 51,215, 83, 34, 90,206,206,126, 38,133,171,247,154,121,246, 78,232,199, 18,117,251, 46,168,220,124,216, 18,252,206, 83,177,
+ 35,155,254, 7,107,157, 19, 10,250,129,182, 12, 13, 13,149,200,180, 54,157,146,235, 58, 76,150, 44, 89, 32, 8, 32,147, 72,201,
+146,133,196, 49, 90,145,165,179, 91,144,151, 99,146, 88,169, 98,110, 43,122,176,169, 37, 70,207,226, 69,242, 75, 55,238,225, 18,
+208,252,140,190, 76,122,206,172,108,108,251,242,197,190,241,236,139, 31, 33,145, 44,154,151,149,142,246,243,161,222,165,173, 63,
+ 48,249, 56,199, 22, 40,142,105,208, 63,242, 75,146, 57,207,189, 48,100,206,168,239, 20,112,120,223, 46,137,160,195,197, 13,215,
+252,172, 73, 35,169, 77, 49,187, 96, 38, 50,103,249, 62, 69,229,200, 84, 5,133, 63,156,246,241,139, 55, 74, 85, 38, 94,230,172,
+ 59, 39,226, 2,158, 68,178,166, 73, 36,107,203,149,126,233,207, 15,175, 96,249,230,206,144, 12,103,185,206,107,104,142,143, 49,
+200, 86, 81,182,192,221,231,178, 21,142, 75,249,112,141, 68,178, 60,147, 61,121, 27,139,100,229, 36, 90,234, 75,180,186, 44,189,
+152, 87,142,202,122,165, 48,148,108,129,100, 73, 31, 87,170, 36, 11,207, 62,222, 81,232, 48,249,153, 51,136,108,129,104,133,190,
+223, 67, 85, 52,184, 14,171, 86,173, 42, 89,178, 64,100,230,207,159, 79, 76, 54,164,119, 30,187,133,228, 16, 45,192,144, 0,150,
+ 44,144,172,200,154, 53,105, 79,139, 22,239,155,215,172,121,143,143, 15,226,212,142,201, 54, 70,160,198,133,100,193,138, 51, 99,
+194,132, 9, 82,217,134, 15, 31,142,242, 44,224, 52,146,101,226,221,174,149,100,161, 80,114,222, 75, 76, 46, 76,234,213,171, 55,
+147,223, 45, 31, 57,252, 98, 65,155, 54,109,150,224, 55,187,194,166,114,136,194,119,239, 37, 57, 50,227,162, 75,108,185, 44,193,
+ 33, 27, 89,162, 73, 86, 26,222,167,227,148,158,219, 33, 3,123, 22, 92,216, 50,149,129,223,165,233, 88, 54, 58,251, 52, 92,190,
+180, 76,150,116,234, 45, 91, 16, 47,224,217, 86,110, 32,208,136,157,228, 15, 87, 60,147,177,136, 22,244, 12, 86,194,180,105,211,
+ 30,151, 81,254, 86,221,187,119,167, 67,135, 14, 17, 92,144,156, 95, 57,213,140,101,201,146, 37, 37,175, 80, 52, 9,206,165, 73,
+ 86, 92, 44, 90, 32, 74,234,164, 75,157, 60,233, 59,207,101,145, 72,153,166,124, 50,142,201,128,133,179,232,242,139,130,104,189,
+ 56,176,153,252, 75, 56,208, 5,182, 98,221,200,155,140,238, 51,201,122, 86,200,132,222, 22,183,164,192, 22, 5,168,190,155,225,
+ 68, 11,150, 32, 93,137,125,226,178,136, 22,200,134,146, 80,129, 84,128,244,128,172, 12, 29, 58, 84, 34, 5, 32, 88,120, 41,225,
+ 94,176,118, 76,155, 54, 45, 12, 86, 26,182,166,104, 36, 90,108, 13, 11,128,245,133,221,141, 97,200,143,235,111,221,186, 37,197,
+145, 33,241, 3,253, 21,214, 55,200,131, 11, 18, 9,132,139, 31, 6, 89,241, 79, 32, 84,176,168,225,235, 65,157,104, 65, 9, 97,
+ 69,210,102,109, 83,111, 77, 16, 28,228, 7,145,196,203, 15,150,155,107,215,174, 73,117,199,255, 40, 55, 72, 6, 72, 18,202,137,
+186,201,209, 8,119,119,119,137,104,193,133, 10,121, 72,184, 7,187, 39, 36, 76, 85,143,131,112,169,196,173,125, 39, 30,101, 68,
+123,224, 11,135, 95, 8,112, 15, 75, 9,229, 66,135,129, 11,126,132,104,161, 94,250,116, 9,231,241, 32,233,171, 59, 7,106, 7,
+130, 0,178, 85, 48,138,221, 49, 17,140, 95,216,189,219,183,195,182,216,218,210,221,249,243,163, 24,223, 79,140,107, 40, 31, 15,
+229, 56,176, 80,206, 19,246, 91,136,214,204, 44, 86, 76, 48, 70, 4,142,203,120,121,114, 93,199,207, 81, 1,151,217, 82, 82, 80,
+ 34, 89,180,188, 40,133,175,169, 74,117,114, 91, 68,220, 24,236,114,141,173, 60, 99,121,180, 96, 42,125,117, 39,200,156,237, 53,
+236,213,216,140,151,187,215,204,245, 25, 35,131, 97, 29,133,165, 4,237,231,207,122, 86,202,199, 38,242,234, 0,231,235,156,111,
+180, 28,153, 42,247,116,227,231, 35, 84, 93, 38,116,151,191,112, 49,252,155, 67,122,228,111, 52,213, 45,153, 68,246,152,100, 93,
+ 29,144,222,127,104, 69,219,208, 43, 11,154, 83,187, 66, 41, 66,175, 13,202,112,142,201,214, 90,154,157, 37,255, 15, 88,182,252,
+216,114,253,113,222,188,121,196,237,139,143, 72, 95,249,165,251,127,206, 18, 25, 19,109, 63, 54,189,105, 84,140, 37,107,126,118,
+110,167,194, 68,171,202, 16,173,175, 78,180,181, 49,157,159, 92,133,124, 93,147,196, 26, 20,162,235, 94, 76, 88,175,194, 10,161,
+137,100,225,189,132,119, 17, 58, 76,238,244, 85, 7,251,104, 21, 57,126,220, 88, 42, 81, 52, 59,133,190,219, 67, 69,125, 51, 19,
+255,255, 78,153, 25,177, 53, 74,146, 5, 87, 47, 72, 23,222, 3,220, 81, 18, 70,149,233,193,164, 52, 63,251,203,184,115, 61,205,
+ 88,238,104,215,160,193, 61,144, 44,144,173,225,153, 50,221,136,118, 35, 26, 58,245, 67, 93,132, 43,148, 40, 81, 34, 12, 3,144,
+224, 46,133, 37, 59,154,100,205,229,242,200,150, 39,231,189,100, 40,209,146, 35, 51, 46,122,196,125,156,123,231,206,157,155,115,
+ 93,189,249,245,235,200, 41, 35,127, 12,250,240, 7,107,214,201,147, 39,251,212,175, 95, 63, 11,147, 26, 60, 67, 25, 27, 53,106,
+228,192,239,111, 12, 0,203,160,235, 94,236,206,227,193,153,158,220,213,125,139,151,197, 7, 16, 62,124, 84, 19,250, 83, 24, 21,
+208,230, 28,230,241,146,229,185,201, 40,255,120, 60, 55,208, 65,206,187,149, 19,230,223,147,226, 88, 89, 39, 47,224, 62,232, 83,
+163, 13, 29, 54,234,242,244,196,104,233,138,195,210,122, 14,247,136, 11,209, 82, 94,243,237,242,216, 36, 76, 77,158,178, 26,250,
+221,135,218, 0,108,224,170, 56,112,106,116, 23,122,216,165, 50,221,202,151,140, 30, 21, 48,161,151,133, 77,232,125,145,228,244,
+185,154, 51,157, 42,109, 79, 77,227,224, 58,196,139, 66, 83, 66,227,150, 47, 95, 62, 84,174,235, 16,228, 65,149, 80,173, 92,185,
+ 50,138, 95,234, 47, 89,233,223,227, 56, 44, 30,112,115,113, 76, 84, 20,127,233, 4, 48, 41,120, 11, 43, 21,155, 65, 53, 18, 45,
+ 16, 38, 40, 23, 95,255,129,127,191, 98,194, 23, 5,203, 13,200, 17, 44, 59,144, 11,249,252,229, 8,247,146,228, 18, 67, 7,194,
+164, 65, 22,137,225,107,185,143,126, 66,120, 41,170, 90,213,112, 28,132, 0, 68, 81,155,181, 77,189,141,224,178, 67, 89, 80,103,
+ 92, 11,185, 40,171,122, 25, 81, 62,224, 32,183,140,236, 50,149,136, 22,234, 12,242,199,196, 72,194,148, 49,147, 92,135,202,227,
+107,214,172,145,142,235,114, 29, 98,176, 2,252,255, 48, 63,215,173, 91, 87,114, 31, 50,217,149,172, 36, 76, 58,165, 14,198,214,
+187,114,213,184,186, 14,161, 39,208, 23,232,141, 54,157,194,113, 60, 44,250, 94, 18,252, 53,119,152, 7,103, 68,113,138,228, 47,
+215,112, 38, 25,161,108,121,252, 4,146,181,209,220,156,238, 47, 92, 24,197, 29,217, 39, 38,238,161,220,246,159,217,138,240,133,
+ 95, 30,135,245,201, 53,246,121, 38, 58,153,153, 76, 28, 93,223,220,238,201,141, 85,221,163,232,226, 92, 38, 89, 62, 68,203,216,
+208,132, 14,124, 71, 11, 90,218,173, 40,245, 44,157,234, 45,187, 23, 79,208,220,108,217,244,149,129,221,134,158,112,191, 45,107,
+230,248,116,203,218, 37, 81, 32,233,187,119,239,150,172,196,176,148,128, 92,143, 29,212,141,186,148,178,123,199, 86,175,227, 52,
+195, 75,175, 76,229, 61,217, 82, 56,151,221,187,225,248, 80,217,181,107, 87,140, 76,124,200,176,229, 57,130, 59,207,149,250,202,
+167, 60,255, 45, 38,203,219,143, 45,107, 91,110, 12,204,224, 63,188,146, 77,104,232,245,109, 68, 23,231,209,149, 1, 25,168, 65,
+206, 20, 95, 46,244, 77,127, 94, 10,220,159,225, 93, 32, 14,100,203, 23, 36, 11,101,197,243,142, 47,121,214, 49,144,193, 34,114,
+203,168,204,151,207, 78,225, 92,210, 61,209,139,139,253, 93,190,185,117, 65,134, 87,150,230, 54,170, 70,180,165, 33, 5,172,104,
+ 72,229,179,152,191,207,239, 20,123,196,180,158,251,228, 96,114,250, 26,229, 2, 9, 86, 90,178,148, 36, 11,207, 21,191, 19,223,
+176,140, 44,250,202, 59,113,194,120,255, 70,245,202,208,147,123,219,152,104,237,166,107,254,211,168, 90,197,236, 84,212,175, 8,
+ 58, 86, 66,112, 57,136, 12,143,182,163, 58,117,234, 80,203,150, 45,165,248, 44, 30,209,171,239, 89, 42,205,131,132,252,249, 57,
+242,231,215,133, 63,135, 53, 72, 9,150, 44,144, 44, 29,163, 17,117, 21,185, 46,220, 90, 24,149,141, 13,161, 18, 42, 36,107, 54,
+ 95, 40,155,100,225, 38,114,222, 75,236, 34,172,106,136,235, 80,142, 76,125,109,162,229,124, 2,126, 87, 22, 98,252, 27,243, 59,
+158, 21,136,242,243,251,169, 0,199, 64,229,229, 54,202,199,131, 19,138,240, 71,108, 17, 62,159,131, 93,130,165,248,227, 32,175,
+ 28, 60,248,221,157,151,221,163,239,222,190,125, 75,176,228,227,227, 31,239,105, 16, 37,144, 43,120, 69, 64,138, 56, 60,229, 13,
+135, 85,168,143,182,212, 86,149, 86,252,161, 47,189, 51,176,175, 85,171, 22,249,250,250,146,143,143, 79, 40, 19,215, 47, 76, 4,
+165,182,195,160, 42,182, 24, 99, 82, 83,217, 27,215, 91,235,200, 66, 93,231,112, 3,153,215,106, 27, 89,104,200,168, 67,229,242,
+ 59,202,189,188,250, 33, 24,190,117, 14,171, 79, 47, 38,247,160,128,166,249,232,117,113, 43, 10, 42, 97, 65, 95,171,166,163,247,
+ 85,156,232,191,140, 9, 62,198, 37, 24, 30,150, 3,213, 4,210,194,238,186,112, 86, 18,131,130,225, 65,140,240,224,129,240,240,
+ 48,210,143,172,144,248,146,179, 99, 51,167,116, 28,102,101,254, 26,251,200,249, 46,241,113, 7, 38, 91, 79,112, 92, 27,209, 2,
+ 25,129, 59, 46,154,148, 56, 51, 49,187,198,174,184, 16,229,212, 11,209,199,237,112, 31, 54,145,178,113,236,163,164,144,184,159,
+ 28, 68,249,122,137, 80, 65,129,163, 77,220,210,101, 56, 14,247, 23, 94,240,114,137, 86,244,253, 80, 22,255,174, 93,187, 74,101,
+196, 40, 78,213, 50,246,236,217,243, 35, 20, 27,228, 82,110, 25, 17,131, 6,140,224,122,228, 47,215, 24, 76,213,142,135,224,190,
+ 40,186,174,122,243, 3,250, 28, 95, 55,240,247,195,148,140,224, 72,116, 18,152,208, 46, 58,158, 68,225, 89,164,217, 0, 76,235,
+240, 35,193,240,208, 27,232, 15,244, 72, 93,183,240, 63,158, 53,125,237,195,132,113, 48,199,225,125,101,172,162,248, 69,240,153,
+221,156,161,108,205, 9,133, 37, 11, 36, 11,150,173,183,129,129, 97, 76, 52, 67,185,221,191,176, 94, 4,241,203, 98,176, 62,185,
+198, 62,207, 1,235,185, 17,176, 62,162,162,229,135,135,107, 58,179,133,164, 44,147, 44,191,111, 29, 56,147, 44, 58,216,139, 14,
+ 78,106, 68, 69, 50,154,132,127,155,217,221,171,180,190, 50, 40,101,246, 40,231, 24,180,115,203, 58,201,244,143,152, 68,184,142,
+ 97,209,132, 85,120,253,138,133,228,235,110,250, 77,230,108, 47,185,211,177, 40,152,104,189,132, 21, 19, 50,145,148, 50, 97,125,
+129, 62, 48,145,137,177,162,232, 45,231, 36, 14,124,159,149,121,221,205,193, 25,206, 13,175, 24, 77,178,174, 44, 37,154,203,158,
+ 21,142,127, 58, 63,186, 16,187,227,146,135,157,233,149,254,130, 20,179, 53,203,221,144,249,123, 10,131,100,129,100, 34,192, 92,
+ 73, 50,151, 47, 95,142,192,125,144,173,162,250,202,167,126, 62,134,108, 13, 97, 99,196, 74, 30,252,180,174, 42,147,172, 6,244,
+106, 69, 3,170,224,147,242,157,129, 36, 75, 41, 94, 34, 91, 40, 23, 58, 52, 37,201,130, 75, 94, 46,201,130,160,138,229, 75,208,
+179, 7,187,104,253,170,145, 84,164,160, 7, 45,153,223,145,252,143, 15,165,106,149,203, 74,150, 49, 88,194,225,238, 7,201, 50,
+164,222,176,100,129,100,241,243,227, 95,174, 92, 57,127,254,200,245,231,103,198,159, 49,220, 1, 75,150,158,169, 31, 52,222, 10,
+150, 44,144, 44,132, 30,176, 76,105, 48, 17, 62,248, 48,181, 15, 95, 96, 16,201,194, 13,228,188,151, 56, 24,126, 0,166,117,144,
+ 27, 12,175, 71,230, 29, 67, 48,212,144, 23,117,116,207,152, 49, 99, 53, 38, 43,149,217,146, 85,137,159,157,106,252,110,173,204,
+ 4,171, 20, 19,166, 98,172, 19,229, 57,143, 28,171, 83,140,120,126,111,230,225,126,232, 26,203, 67, 72, 75,164,196, 98,121,227,
+143,140,136, 81,163, 70, 61, 98,151,228,101,182,244,103, 55,160,236, 73,249,157,120,140,251, 35,137,172,225,189,129,118,194,135,
+ 62,218, 15,125, 17, 98,158,177,113, 60, 93, 20,154,194, 0,217,127,122,214,184, 91,180, 80,179, 6,110,138,193,173,125, 82,134,
+158,104,152,159, 94,182, 44, 76, 1,117,188,232,152, 95, 42,137,100, 53,142,227,244, 14, 32, 51,202, 4, 83, 56,147,128,143,252,
+146, 51,120,122, 7,144, 7, 16, 2, 14,236,123,203, 47,153,152,233, 29, 16,188, 13, 18,196, 95, 96,111,153,100, 77,230,106, 72,
+163, 49,244, 17, 45,200, 83, 35, 37, 73,216,106, 49,139, 71, 94,188,133,101, 4,114,163, 91, 59, 33,238,199,102,116,245,227, 58,
+149,129,229, 63,129,149, 8, 73,213,125,137,227, 32, 90, 72,170, 4, 76,166,102,161, 44,227, 52,148, 37, 78,101,100,255,189, 68,
+ 54,121, 68, 74, 44, 76,113, 28,164, 50,250,184,172,233, 29,184, 19,109,197, 15,243,115, 36,126, 0, 71, 96,164, 33, 91,194,136,
+ 31,108,229,144,116, 88,180, 10,184, 23,108,210,215,214,187, 74,183, 31,153,222, 1,250, 3, 61,130, 62,169,234, 23,126, 51,142,
+114, 58,139,148, 92,222,167,176,106,113, 91,135,131,100,177,123, 43,148,173,140,161,176,100,189,121,245, 42,140,143,127, 98, 66,
+251,133, 45,104, 95,248,197,250, 91,166,119,160,185, 30,238,112,155,221,229,160,245, 78, 69, 76, 63, 95, 30,206, 46, 41,137,100,
+ 53,231, 96,197,158,116,102, 78, 75, 42,232, 98, 18,121,188, 59, 7,196,207,246,220, 40,103, 74, 6,105,141,196, 89,153,119,220,
+ 30,226,114,213, 99,156,189, 0, 0,255,244, 73, 68, 65, 84,173,177,175,195,231,249, 51, 39, 75,113,120,176,176,226,163, 96,199,
+166, 53, 84,208,205,244,155, 76,190,183, 28,153, 42,186, 91,136,219, 62, 4,174, 30,196, 38, 42,101,242,192, 21,116,148,161,156,
+ 79,214,168,101, 41,142,108,150,119,213,136,153,158, 71,251,149, 50, 15,126,179,173, 39,209,229,197,223, 72,214, 34,158, 30,103,
+ 13,127,120,110,109, 66,167, 38,215,164, 66, 46, 73,195,165, 0,249, 57,222,178,131,237,185, 67, 9,130,238,160, 99,192, 96, 21,
+184, 54, 97,117,195,135, 17, 2,206,249, 60, 98, 78,100,143,226, 84,214, 95, 34, 91,153,146,190,184,200, 36,144, 54,215,163, 64,
+ 38, 89, 21,125, 82,190,141, 35,201,138, 33, 91,236, 82,122,141,114,129, 20,129, 20, 99,170, 7, 62,169,215,146,165, 20, 80,177,
+ 28,199,138,125,189, 72,197,138,248,112,176,179, 15,249, 21,202, 68,207,238, 78,165,188,185, 50, 72,177, 88,120,223,193,178, 37,
+243, 29, 20,147, 13,238, 66, 88,178,216,210,140, 15,177, 93,252,191, 63,187,248,149, 65,239,186,166,126,208,122, 43,184, 11,209,
+ 57,179, 76,148,231, 57,226,125, 16, 54, 16, 29,239, 99,104, 17, 21,114,222, 75,108,209, 42, 80,188,120,241,190,188,239, 38,103,
+122, 7, 61, 50,101,185,114,101, 84, 4,253, 24, 62, 30,224,146,203, 29,157,120,234, 50,233,152,236, 17,135,106,247,193,117, 77,
+ 88,191,231,115, 95,119,144, 63,128, 15,240,212, 43,112,197, 54,228, 36,103,221, 84,245, 98,227,154, 86,156,246,112,191,116,135,
+ 45, 89,159,202,148, 41, 35, 17,100, 88, 37, 65,180,208, 7,192,226,149, 49,117,234,136,201, 10,197,107, 54, 73, 54,149, 81,247,
+191, 63, 11, 38, 44,101, 23,225, 97,158, 55, 43, 24,193,239,205, 50, 38,248,161, 9, 75, 1, 54,190, 28,121, 94,150,143,236,178,
+137,243,132,165,108, 85, 57, 7,183,155,186,251, 74,229,120,172, 9, 75, 57,239, 9,144, 37, 86, 0,141, 19,150,226, 58,156,199,
+ 94,181, 85, 89,241,202,243,177,103,234,199,163,221,119, 79,212,143,243,181, 26, 39,136, 3,161,194,139, 28, 22, 56, 38, 46, 49,
+238, 75, 37, 1,195,151,180,182,248, 49,109, 50,149,229,212, 86, 22, 29,101,196,165,223,149, 83, 6,166, 63, 52, 97, 41, 91,236,
+ 94, 33,136,149, 71,167,196,158,176, 52,218,178,245,163, 19,150, 66,159,160, 87,208, 47,232, 25, 18,215, 83, 83,135,161,169,141,
+202,230,206,157,251, 13, 70, 27,242, 23, 88, 4,155,234,191,240, 11,253, 19,199,129,132,113,155,125,102, 18,246,149,191,212,190,
+176,142, 32, 8, 94,211, 48,239,159, 62, 49,160,228, 62,155,227, 85,136, 45, 54,219,111, 12,114,190,222, 36,159,217, 23,255, 9,
+229, 37,146,117,106, 86,115, 42,224,146,236, 27, 33,154,147,121, 39, 45,244, 40,130,152, 38, 13,111,168, 88,229,148,100, 34,192,
+158,175,185, 54,208,249,122,181, 92,182, 95, 87, 46,158, 35,197,210,109, 89,183,130,242,187, 70,147, 44,204, 16,143, 0,123, 25,
+ 50,213,238, 41,145, 45, 88, 54, 33, 19, 35,146,100,146,172,152,114,170, 18,173, 62, 37,205,223, 55,207,151,252, 75,189, 28,201,
+190, 86,201,146, 52,172,180,123,210,136,130,206,137, 35,179,219, 39,140,242,178, 85, 80,105,207, 20, 95,162, 71, 34,106,178,188,
+105,108, 35,182,188, 97,186, 9,165,174,124,183,231,242,163,205,181, 17, 45,157,237, 46,145, 45, 15,147, 23,251,135, 22,167, 74,
+217, 82,190,145, 73,178,244,233, 82, 14,126, 86, 95,195, 29,143, 81,136, 92, 54, 57, 36, 43, 70,102,229,138,165,233,209,221, 29,
+180,113,205, 40, 38, 91, 94,180,108, 65, 39, 58,125,100, 16, 85, 40, 87,140, 64,100, 16,114,192, 68, 67, 14,209,138, 85, 78,165,
+ 69,139, 93,207,254, 32, 89,203,150, 45,243,103, 23, 39, 44, 90,203,162,117,226, 59,178,133, 73, 78,213,244, 37,150, 76,165, 69,
+ 11,238,108,148,141,101, 74,110, 83,150, 9, 50, 39,119,211,133,167,135,182,247,146,210,178, 21,151, 9, 75, 85,100, 26, 98,209,
+210,215,238,114,235,171,154,239,119,203,196, 71,172, 63, 66, 60, 16,202,227, 99,103, 71, 35, 19, 37,162,167, 73,147,210,115, 78,
+179, 20,138,183,113,169,212, 31,118,141,186,219,240,199, 44, 92, 6, 84, 78, 83,227, 74,174, 54,118,187,125,101, 43, 71, 40, 7,
+229,253, 83, 75,240,240,139,241, 4, 92,123, 72,170,100, 79,245,120,180,251, 83, 19,204,191,251, 97,145,219,244,250,202,233,193,
+237,254,136,191,160, 98, 47,193,195,150,173,140,133, 26,247,183,203, 82,185,156, 62, 98,160,167, 32, 44, 62,105, 31,232, 23,244,
+ 12,238, 84, 3,136, 22, 68,151,226, 23,248,179, 37, 75,150,124, 98, 87,110, 56,199, 48, 68,176,117, 39,156, 45, 28, 95, 57, 88,
+ 52, 24,231,144, 71, 75, 25,244,213, 93, 46,134, 58, 95,146,209, 1,225, 18,217,186,220,223,249, 70, 37, 31,211,176,185, 93, 75,
+ 83,129, 12,106, 36, 75,251,236,240,223,149, 83,146, 25, 77,182, 46,244, 75,127,163,152,135,121,196,168,254, 93,152,100,165,136,
+182,142, 69,147, 44, 3,100,170,147, 45,198, 46, 24,115,244,200, 36, 89,223,125, 8,208,124,207,244, 76, 6,151,125, 35, 81,122,
+210, 44,158,222, 98,186,103,250, 31,212, 37,185,237,165,183,221, 65,182, 74,120,152, 92,149, 73,178,190,171,187,150,130,228, 96,
+ 11,196,117,153, 36, 43,150,204,233,211,167, 81,131, 58,165,232,238,245, 13, 20,242,102, 7,157, 63, 57,145,170, 87,206,201, 94,
+ 0, 30,180,201,177, 58,136,203, 99, 79,129,193, 68,139,111, 82,186,117,235,214,146, 21,139,173,161, 18,201,226, 64,122, 16, 34,
+ 85, 23,118, 12,217,194,114, 61, 88,182, 71, 23,209,226,115,117, 89,166,100,197,130,133, 21, 36, 11,193,249, 56, 46,183,129, 56,
+159,190, 54,210,248, 94,130,101,139, 63,220,250,243, 4,166,113,121, 47,105,148,169,167,204,250,202,105, 64,149, 99,178,254,110,
+153,102, 60,184, 2,171,109,192,178, 21, 57, 69,161,120, 63, 55, 65,130, 0,164, 57, 10, 69,160,176,104,197,165, 73,255,127,205,
+119,141,203,157,159,180,168, 52, 91, 51,196,162,210,134, 99,251,187, 31, 22,185, 37,254, 83,202,105, 31,173,103,152,134, 65, 83,
+ 12,157,174,114, 90,177, 5, 99, 40,199, 61, 28,103,210,246, 6,137, 59,180,227,252, 85, 54,148, 65,176,210, 1,196, 47,171,187,
+ 42,217, 58,215, 39,253,205,106,217,205, 62,199,178,100,197,101, 9, 30, 21,178,117,186,119,250,155, 85,115, 88,125,147,169,180,
+100,197, 65,166, 58,217, 98,139, 35,166, 77,144,229, 46, 84,239, 28, 37,203,219, 66,119, 23,105,178,214,217,158,181,181,166, 89,
+ 30, 21,224,222,164,193, 94,154,214, 81,253,101,109, 36,247,129,249, 93,164,125,230,204, 25, 84,181, 10, 79, 51, 81, 50, 47,101,
+245,241,224,201, 42,199, 74,113, 80,112,239, 34, 54, 11,129,240, 50,234,160, 9,207,210,252,236, 45,195, 28, 89,209,150, 44, 77,
+113,130, 32, 91,197,177, 0, 53, 22,162,214, 67,180,112,186, 46,203,132, 11,242,107,180, 37,203, 16,146, 37,151,184,202,168,110,
+172, 44, 66,151,100, 34,198,211,241, 76,226,137, 76, 17, 83, 87, 79,230, 37, 34,155, 76, 4,132, 18,202, 4, 74,102, 54,129,167,
+ 76,160,100,102,147,139,167,114,246,101, 57, 98,229,202,148, 35, 75,153, 71,171,204,255,147, 45,204, 31,133, 32,245,204,155, 36,
+119,161,110, 66,164,179,211,137,177,108, 73,241, 93,144,233,185, 77,114, 23,254,128, 76, 67, 42, 43,163,195,133,127, 47, 1, 13,
+ 86, 36,212,154,116, 7, 72,255,210, 54, 50,118,221,127, 64,158,206,118,231, 57, 2,137,173, 54,196,179,160, 19,187,207, 9,255,
+203,188,151,192, 83, 38, 80, 50,179,253,203,120,202,132, 72,100, 83, 69,224, 95, 86, 24, 81,119,227, 62, 11, 2, 79, 45,120, 74,
+ 86, 30,105,141, 66,158,246, 0,203,209,104,142,159, 82,191, 90, 39,158, 49, 50,103,123,151,164, 69,198,145, 25, 71,117, 16,237,
+ 30, 71,224,180, 92, 38,240, 20,120, 26, 11,129,159,161, 75,198, 42,219,239,144,163, 30,147,245, 91, 99,180,126, 20,128,159,209,
+184, 66,230,143,182, 74,236,235, 5,158, 2, 79, 99, 33, 32,116,201, 88, 72,126,147, 35,240, 20,120, 26, 11,129,159,161, 75,198,
+ 42,219,239,144,163, 36, 86,234,251,152, 7, 15,128,169, 39, 67, 10,170,233,122,125,199,244,201,215,119,125, 92,202,252, 55,200,
+196,232,156, 58,156,218,112,194,138,247,189,162,147, 62, 60, 17,200,105,104,253,245,201, 52, 84,158,156, 7, 83,200, 52,172,157,
+ 68, 27,105, 71, 64,232,146,208, 37,185, 58, 32,158,163, 95,251, 28, 41,239,166,173,125,244,181,199,159,120,254,143, 26,117,248,
+163, 0,201,233,172, 13,189, 71,124,145, 41,123,146, 72, 3, 0,248, 61,117, 39, 69,118, 14,180,153, 28,157,228, 76,136,247,123,
+202,105, 0,144,209, 89, 69, 57, 13,199, 76,215, 21, 2, 79,129,167,177, 16, 16,186,100, 44, 36,191,201,249, 25,120, 26,183,132,
+255,136,180,159,209, 16,255,178,204,170, 63, 65,111,126, 13,158, 68,246,188, 14, 66,190,232,148, 66,241, 73, 81,159, 73,214,183,
+191, 32, 69, 67, 94,164, 56, 5, 39,158,117, 82, 74, 88, 28, 85,125,251, 53,229,252,113,128, 69, 57,127, 28, 67, 85, 9, 2, 79,
+129,167,177, 16, 16,186,100, 44, 36, 5,209,210,132,100,206,232,131,232,191, 96,221,210,212,143, 25,183, 5,228,124,221,167, 72,
+157,201, 62,133,157,103, 57, 83, 91,143,238, 72,248,141, 99,122, 74, 34,235, 97, 49,119,240, 72,101,230,144,245, 0,246, 50,106,
+166, 87,166,143,135, 69,245, 82,133,211,109,202,226,105, 94, 69,134,188, 88,108,223,210,210,217, 50,173,107,142, 22, 86,233,178,
+ 76,179,115,205,217,221,218,218, 77, 90,100, 51, 14, 91,115, 93,215,240,154,160, 9,114,182,244, 79,152,191,203,201,196, 21, 7,
+251, 39,241, 27,124, 40, 49,254,175, 89,115,173,174, 37, 42, 52,214, 29,237, 96,106,155,169,126, 26,183,220,147,210,103,241, 59,
+153,185, 96,181,183, 30, 5,170,189,181,113,201,227,159, 50, 93,142, 73, 56,167,163,173,190,151, 73,212, 27, 11, 78, 73,169, 88,
+177,189,138,206,138, 51, 49, 68,171,139,226,100,177, 98,138,125,209,103,145,163,183,129, 68, 11,211, 45,192, 42,150,129,215,212,
+178, 53, 0, 87,189,237,110,128, 44,101, 86, 33, 51, 14,160,233,184, 68,224, 41,240, 52, 22, 2, 66,151,140,133,164, 32, 90,154,
+144,212, 25,163,165, 17,122,103,239,194,103, 61,115,151,126,131,148, 41, 87,169, 55, 25,115,150,122,147,214, 45,247,110,101,102,
+155, 12, 57,119,219,103, 46,246,198,206,179,216, 27, 91,143,162,111, 82,185, 23,125, 99,225,156,239,172,154, 48,173,138,109,102,
+235, 81,173,114,253,246, 43,230,175,222,125,225,220,141,151, 33, 72,248,141, 99, 56,247,163, 47, 94, 51,135,236, 51,139, 86,249,
+ 47,204,204, 33,219, 12, 25,186,165,247, 1, 44, 86,200,241, 48,189,154, 66,197, 11,165,219, 39, 67, 94, 44,162, 5,146,213,166,
+ 75,191, 89, 15, 30, 62,157, 83,172,122,155,153,102,105, 60,102,155,219,103, 25,101,102,231,225,167, 80, 12, 54,100,137, 3,245,
+ 73,253,164,162,128, 96,185,117,216,153,200, 50,125,126,155,164,102,169, 59, 36, 73, 97,117, 34,169,169,245,137,228,214,233, 58,
+167,207, 83, 47,109,137, 94,254,154,102, 6,215, 74, 12, 44,236,189, 75,186,231, 42, 27, 60,112,230,222,240, 49, 43,175,208,152,
+ 53,183, 56,221,166,142,163, 55,146, 87,214,220, 52,111,243, 69,106, 60,120, 83,184,131,119,137, 96, 83,206, 43,139, 20, 61,124,
+ 56, 38,134,104,221,191,159,151, 73,150, 9, 39,187,232,100,242,236,153,130, 23,244,252,150,227,193, 3,197, 88, 89, 50, 57, 83,
+153,242,181, 75,121,122,101, 59,157,210,194,170,183,101, 42,155,158,142, 78, 46, 1,169, 83,167,185,203,167,210,197,232,170,141,
+141, 25,255, 22,243, 41,197, 6, 85,175,206,203,212,115,213,108, 66,102, 28, 64,251,209,119,157,129,183, 20,109,100, 32, 96,122,
+178, 11, 60,141,139,103,124,150,166,110,201,210, 63,234, 16, 4,235,195,199, 48, 90,184,235,158,148,158, 6,134, 82,195,142,163,
+ 49,175,202, 77,164,202,205, 7,211,229,251,239,104,230,230,155, 52, 99,211, 13, 58,117, 61,144,172, 50,250, 97,213,120,189, 47,
+222,228,118, 94,121,154,118, 24,180,225,250,227,224,136, 77,251,252,239,118,233, 63, 97, 7, 18,126,227, 24,206, 33,143, 22,196,
+245, 42,118,114, 7, 55,199,220,197,106, 4,191,122,247, 41, 34,115,158,114,239,241,191,220,135,133,103,101,239,196,203,171, 12,
+ 66,226,217,219, 99, 82,161, 60, 14,183, 65,180,138,228,119, 56, 99,237,224, 25,108,147, 33,199,251,116,158,249,142, 89, 56,122,
+105,179, 50,197,148,211,202, 41,203,212,219,119,238,205, 89,191,239,226,156,230,131, 87,205,185,114,231,217,156, 75, 55, 31,206,
+ 97, 34, 56,227, 27,217,146,189,245, 84,207,233,232,152, 63, 81,162,100,102,101, 19,155,152,173,113, 43,214, 49,108,229,161,103,
+116,247,121, 8, 93,125, 20, 68, 99,214,223, 39,231,130, 77,194, 77, 82,218, 97,114, 88,204,100,174,137,212,125,135,167,139, 79,
+145, 87, 51, 54,127, 35, 87,202,164, 36, 89, 39, 47, 61,164, 25, 91,239, 75,199,123,207,187, 64, 86,233,115, 61,215, 78,138,136,
+ 23, 56,165, 38, 10,197,245,110,138, 82, 77,206, 43, 2, 2,134, 51,149,234,173,120,253, 26, 11, 81, 59,115,194, 36,134, 72,206,
+175, 95, 43,236, 96,201, 10, 8, 80, 12,111, 82, 74,225,127,129,131,252, 89,217,154,112, 82, 46,146,170,177,221,203,148,171,126,
+126,206,178,125,225,155, 78,190,162, 33, 11,206, 83,153,170,205, 40, 71,190, 98, 95,121,114,188,131,206, 30, 57, 15,120,231, 43,
+251,193, 33,189,251, 7, 11, 43,155,243,150,150,214, 32, 95,170, 75,168,232,213, 37,217, 45,243,255,140, 66,102, 28, 64, 19,100,
+ 67, 35, 2, 66,151,132, 46, 25, 11,129,248,162, 75,198,170,111,252,144, 3,162, 21,201,107,196,245,152,126, 76, 74,155,142,220,
+163,179,215, 95, 82,217,186, 93,169, 88,205,206,180,229,216,125, 90,184,237, 26,117,152,120,144,218, 79, 56, 64, 7,252, 31,203,
+ 38, 90,102,118,158,237,142, 93,122,252,118,194,220,117, 39, 82,216,122,180, 50, 77,227,145, 5, 9,191, 71,207, 88,233,127,208,
+255, 94,136,153, 93,230,193,113, 37, 90,230,142, 57, 54, 29, 62,123,251,171,255,237,183, 33,115,214, 30,125,107,230,152,125,189,
+ 92,162, 5,130,197,203, 4,140,103,211, 74,172, 52,122,120,175,185, 37, 11,165,219,234,100,159, 98,240,217,115,254,244,233,243,
+ 23,186,125,247, 33,253,215,190,215, 71,182,244,157, 48,181,241, 2,121, 80,221, 98, 20, 27, 22,173,122,205,187,205,170,211, 99,
+142, 68,178, 88,246,156,167, 1,239,230, 12,158,189,117, 14, 44, 91, 6,104, 4, 70, 24,170,110, 53,109,236, 93, 70,142, 89,125,
+237,236,157,167,239,233,222,243, 96,186,120,247, 45,157,184,254,154,142, 94,125, 77,167,110,190,165, 43, 15,130,232,208,149, 55,
+ 84,124,224, 5, 74,110,233,240,146, 47,174,174,173,156,202,227, 46, 62,190, 17, 91, 79,189,212, 73,178, 64,180, 6, 46, 60, 71,
+214,233,115,126,213, 65,180,152,100, 49,125,146,146,191, 52, 27, 48,147,215,154, 89,179,101,127, 86,187,126,211,231,221, 6,140,
+ 15,105,217,109,100, 72,129, 82,181,159,167, 73,239,249, 44,185,153,117, 77,228,185,174, 80,212,138,190, 8, 23,178, 12,105,211,
+248,162,200,224,234,177, 63, 44, 34,146, 78,223,124, 79,227,184, 76, 61,198,111,163, 22, 61,103, 70,245,155,115,236, 83,151,113,
+219,104,196,178,171, 84,175,245, 0, 42, 81,182, 54, 21, 44, 86,249, 92,165,166, 99,204, 89,150,210,186, 21, 95, 94, 62,162,156,
+ 6, 60, 36, 50,178, 10, 60,101,128,100, 64, 22,129,167, 1, 96,201,200,250, 47,227, 41, 3,158, 63, 54,139,238, 81,135,219,182,
+109,251,110, 6, 96, 16,173,176,240, 72,170,208,117,141,148,122,207, 58, 73,199,175,189,161,219, 79, 67,232,226,189,247,180,112,
+207, 67,170,208,123, 39,149,108,191,130, 74,180, 91, 78,171,247, 94,211, 68,180, 98, 33, 50,126, 84,138,156,147, 38, 89,140,171,
+ 94, 59,247,250, 27, 79, 66,168,101,135,138,123, 70,143,182,156,138,227,150,150,217, 44,109, 93,115, 45,205, 81,164,242, 23,156,
+ 75,155, 49,223, 39, 83,199,236, 11,112,220, 16, 88, 83,164,201, 92,185, 65,235,126,193,183,159, 6,125,206,213,102,207,153, 83,
+215,223, 4,228, 44, 86, 39, 32, 69,154, 76,149,229,200,129, 21, 11, 36,139, 23,119, 30,255,236,217,179,241,188,174,214,120, 94,
+243,107,124,219,150,181,134, 22, 47,232,184,203,193,222,100,232,179,231,175, 40, 44,156, 40, 60,130, 40, 44, 34,138, 22, 44,223,
+ 20,145, 58, 67,142,211, 44, 95, 99, 44, 20, 98,180, 44, 28,188,251,165,116,200, 54, 19, 68, 43,224,109,240,156,197, 91, 79,207,
+169,216,126,186,161, 68, 75,189, 10, 61,191,134, 69,244, 26, 49,114,244,249, 6,141,154, 61, 94,180,122,231,131, 67,231, 95,208,
+174,179,207, 57,189,160, 67,151, 2,233,252,221,247,244, 48, 32,148,130, 63, 69,208,222, 11,175, 41, 65,130, 4, 88, 2, 65,231,
+102,239,158,255,235,251,160, 16,122,250,250, 51,109, 59,249,156,170, 53,238, 78,115,215, 29,167, 41, 27,110,210,176,197,254, 52,
+124,193,113, 26, 53,127, 63,181,233, 63,155, 82, 58,102,251,162, 93, 24,172, 89, 74,162, 69,210,136, 73,103,103,231, 11,247,159,
+ 4,208,117,182,184,237,191,248,138,150, 31,120, 76,227,215,223,166,246,147,121,129, 88, 43,123, 54,100, 73,171,250,150,209, 64,
+180,212,111, 99,194, 7, 48,101,197,174,144,208,176,200, 67,151,223,208,238,211,175,168,198,127, 3,104,232,138, 27,161, 99, 86,
+195, 26,199, 86,185,213,183,104,212,170, 27, 84,165,118, 91,170, 90,183, 3,213,239, 60,197,151,175,209,229, 74,213, 7,143, 56,
+ 47, 16, 16, 8, 8, 4, 4, 2, 63, 1, 1, 77, 92,228, 39,220,230,247,136,212, 70,180,174,223, 15, 36,215,202,147,105,240,252,
+ 19,180, 96,247, 35,154,176,254, 14, 13, 88,124,157,218, 79,191, 72,245, 71,159,161,114,253,143,147,119,195, 21,148,174,220,120,
+ 26, 50,247, 16, 89,185,125,231, 58,140, 85, 33,144, 44, 38, 49, 52,116,152,251,243, 25,179,155, 72,123,252,143,227,108, 69,217,
+ 57,113,214,138, 40,191,114,245,232,226,157, 55, 84,184, 76, 29,234, 51,122, 97,148,149, 75,190,157,114, 81, 73,233,232,101,109,
+157, 33,215,235, 71, 1, 65, 97,173,167,156,189,229,209,108,207,129,238,243,174, 29, 95,185,247,198,117, 38, 4, 47,112, 94,159,
+ 44, 37,209,122,242,228,137, 68,178,174, 95,191, 62,254,242,229,203,227, 43,149,241,186, 12,215,161,111, 62,135,179,111,222, 5,
+211, 87, 38, 90,111,130,195,233, 38,147, 66, 16,153, 50, 53, 90,132,154,219,107,117, 35, 42,204,237,179,142, 57,114,246,250,156,
+126,211,183,206, 25,187,120,255,156, 42,157,103,206,177,245, 46, 23,203,117,104,110,239,238,193,249, 30,153, 59,100, 11,136, 73,
+142, 62,231,116,148,185,103, 68,100, 84,207, 83,103,207,143, 62,118,230,210,226,233,115,151,158,170,223,164,213,211, 37,155,142,
+ 95, 59,116,233,101,248,217, 91,111,233,240,149,215, 52,104,249, 29, 42, 61,224, 28, 77,220,244, 0,132, 90,211,154,127,177,110,
+ 97,231,158,191, 93,233, 26,173, 35, 30, 60, 15,146,172,100,159,191, 70,208,171,183,161,116,237,222, 43,218,115,226, 22, 77, 90,
+178,159,234,117,157, 70,150, 25,242,133,155,217,231,104,167,131,104, 57, 48,109, 98,130, 37,165,212,200,151, 42, 85,170,226, 53,
+234,212,127,117,129,201,250,206,179, 47, 37,194, 62,114,213, 77,242,200, 91,225,149,137,137, 69,241,104,162,149, 58,154,108,129,
+112,177, 12,141,219,220,230,109,123,141,159,191,124, 95,228,226,157,143,104,213,129, 23,212, 99,208,116,234, 56,100, 9,141,102,
+114, 37,185, 60,215,126,115,125,142, 92,121,157, 90,246,154, 65,101,106,183,163,100, 38,102, 98,157, 45,125, 15,129, 56, 47, 16,
+ 16, 8, 8, 4,126, 3, 2,241,156,104,169, 90,180,190, 31,212,167,169,114,202, 96,248,194, 21,154,124,189,116,255, 3,205,223,
+253,144,122, 77,221, 75, 85,219,142,167, 82, 77, 71, 81,133,110,107,153,104, 29,163,138,131, 78, 80,186, 92, 53,191,166,226,248,
+ 44, 13,193,240, 49, 77, 85,185,178,125,186, 54, 45, 28, 38,140, 29,227,116,178, 94, 61,179, 48, 16, 44,236,241, 63,142,103,201,
+ 91, 56,232,253, 39,162,201,179,151, 83,169,170, 77,104,194,140, 37,132,255,237, 61,125,223,203,109,111, 51,199,108, 43,199,205,
+223, 17,124,250,230,219,144,236,109, 14, 92,202,217,241,216,169,124,221, 79,237, 91,114,224,197,133,186,157, 38,159, 51, 79,235,
+189, 68,159, 44, 37,209,186,123,247,174, 68,178, 46, 93,186, 52,254,236,217,179, 32, 90, 23, 64,180,252, 10, 56,156, 2,209,122,
+254,246, 11, 93,184,247,129,118,158, 11,160,173,167, 95,208,188,245,199,217,141,150,235,152, 54,249,112, 17,238, 63,121,105,142,
+ 71,165, 65,115,216, 45, 58, 75, 61, 24, 30, 36,203, 61,103,201, 87,221, 70, 46,163,190,147, 54, 74,169,253,176,149, 4,194,165,
+139,104,193,187,123,226,212,153, 94,135,142,158,238,191,251,192,201,225, 7, 79, 94,157, 48,100,196,184,123, 45,218,118,121,215,
+116,226, 69, 42,212, 97, 7, 21,233,122,128,138,245, 62, 73, 35,215,220,151, 69,180,112, 63, 38, 91,237,139, 86,110, 17,177,245,
+248, 67,170,212,107, 59,149,238,184,134,138, 52, 95, 64,217,106,140,163, 2,117, 70,146,121,186,188, 32, 89,237,245,225,169,233,
+124, 90,123,199,121, 51,151,108,137,220,116,226, 57,205,218,126,159,154,244, 89, 20,105,102,153,102,158, 1,178, 82,112,240,251,
+218,147,215,223, 68,222,124,248,133,214, 28,101, 55, 39,147,171,174, 99, 54,211, 40, 38, 85,248, 45, 17, 45,236, 57, 29,184,248,
+154,206,223,124, 67,147, 87,159,143,224,123, 44,230,100,106,192,189, 68, 86,129,128, 64, 64, 32, 32, 16,248, 5, 8,196,115,162,
+165,138,144,146,116,253,255,152,174,202,121,176, 11,241,254,139,143,180,120,239, 35,106,220, 99, 6,187,160,194, 9, 65,242, 5,
+235,142,160,178,253,142, 81,237, 17,167,201, 38, 83, 81,245, 32,248,239,154,164, 74, 21,155,255,162,162,190,110,106,221, 42,221,
+117,144, 44,229,134,255,113, 60, 79,193, 44, 65,239, 66, 34,232,126,192, 23, 10, 8,138,160, 83,183,130,104,222,174, 71,148, 50,
+125, 94,189, 22, 24,220, 44,133, 77,230,236, 25,178,149,122, 31, 30,193,212,131,183, 58, 99,206, 95, 45,208,237,244,177,194,189,
+206,239,174, 62,234,198,182,149, 71, 95,157,182,117,203,255, 12,249,116,233,139,146,104, 93,189,122, 85, 34, 89,167, 79,159, 30,
+127,236,216,177,241, 77, 27, 86, 26, 86,178,112,186, 45,238, 25,204, 91, 92,101,203,206,169,155,239,104,211,201, 23, 52,123,199,
+ 3, 26,197, 46,170,197,187,110, 80, 74,251, 44,193,218,100,155,165,245,246, 4,185,226, 52, 6,164, 74, 53,159,146,100,117, 26,
+182,152,114, 85, 27, 72, 41,211,229,122, 43,215,162,197, 85,237,126,250,244,153, 30, 39, 78,158,233,117,244,248,233,190,251, 15,
+159, 28, 52,123,254,146, 57, 69,139, 21,123,153,175,229, 58, 42,216,126, 91, 12,209,234,191,244,142,108,162,165, 36, 91,197,107,
+117,250, 58,112,254, 89,242,109,179,154,114, 53, 94, 64,109, 71,109,163,180, 89, 43,125, 54,115, 52,152,100, 89, 57, 57, 57, 13,
+118,205,152,241, 88,150,108, 57, 31,175,223,119,137,214, 28,121, 66, 83, 54,221,225, 24,191,125,148, 58, 93,230,199, 41,172,211,
+ 29, 75,106,102, 59,152,239,141,233, 26,180,110,123, 79, 93,171, 88,173, 78, 83,122,244,234, 11, 69,113,115,143, 89,116, 61, 98,
+248,178,171, 81,202,192,253,213,135, 3,168,255,132, 85, 84,161, 97,111,234, 55,235, 8, 15,218, 8,165, 7, 79,131,163,250, 13,
+157,242,202, 46,173,227, 21,125,242,127,193,251, 68,220, 66, 32, 32, 16, 16, 8, 8, 4,212, 16,248, 11,136,150,146, 96,105,182,
+104,161,130,154, 42, 9,162,117,228,194, 99,218,126,234, 25,245,152,188,139, 42,181, 24, 45, 17,173,124,181, 6, 83,153,190,199,
+168,250,208,147,178,136,150,100,209,106,229, 48, 97,204, 24,167, 19,245,235,165, 8, 5, 25,194, 30,255,227,184, 71,142, 2,175,
+ 3, 63,124,165, 37,251, 30, 83,183, 57,151,169,100,239,163, 84,141,101,203, 37, 90,230,142,217,230,174,219,125, 94,146,123,229,
+ 97,112,112,193, 30,103, 78, 22,238,125,254, 64,153,161,215,118, 85, 24,121,103,221,136, 13, 1,219,235,245,152,123,208,204,206,
+107,186, 46,237,182,181,181,149, 98,180, 46, 92,184, 16, 67,178, 14, 28, 56, 48,190, 73,131,138, 67, 49,143,150,155, 75,138,102,
+ 59, 79, 61, 98,146,240,140, 73,194, 61,234,187,240, 26,181,153,122,129, 70,175,184, 64, 76,162, 52, 18, 45, 16, 41, 71,143,252,
+143,210,123, 21, 10,112,202, 92, 40, 32,173, 91,190, 71, 74,178,165, 74,178,242,212, 26, 65, 22,206,249, 95,154,166,241, 44, 33,
+243, 9,236, 9,162,117,230,204,153,238,167,207,156,233, 1,194,117,236,196,201,222, 11, 22, 46,158, 90,180,104,209,231,249, 90,
+174,141, 69,180,186,204,187,105, 16,209, 66, 25, 80,102,118, 79,210, 35,118,143,142,102, 66,137,196, 46, 67, 89,228, 87,181, 14,
+169, 83,167,238, 60,125,250,116,122, 26,240,158,174, 62,252, 64,251,206, 7,208,178,253,143,104,236, 90,182, 68,205,185, 68,245,
+ 70,159, 38,191,174,123,200,190, 96, 59, 74,146,220,178,179,174,250, 47, 93,186,199,182, 76,197,154,116,249, 97,168, 68,180, 48,
+104,163,239,180,221,212,115,234,126,201,130,117,240,226, 59,186,247, 44,136, 22,108, 56, 77, 93,135, 45,164,138,141,122, 80,139,
+ 78,195, 47,121,249,228, 14, 45, 95,173,158,250,128, 2,153, 80,139,108, 2, 1,129,128, 64, 64, 32,240, 51, 17, 80,242,144,191,
+136,112,201,131, 43, 83,174,210,111,230,110,244,167,125,231,158,208,212, 45,247,168, 98,139, 81, 49, 68,171, 52, 19,173,202,236,
+ 58,148, 99,209,194,221, 38, 76,248, 22,163, 5,114, 5, 75, 22,246,248, 31,199, 93,125,138, 4,188,122,255,133, 22,237,125, 76,
+ 93,102, 95,166,226,189,142, 80,213, 33, 39, 12, 32, 90, 57, 46,223,123,246,225,203,224,229,183, 30, 21,234,113,246, 76,209,126,
+ 23,143,212,155,112,235, 96,235,185, 15,247,182,155,255,108,235,128,213,129,235,135, 46, 61,191,203,204,222,251,148,174,154, 51,
+ 33,144,136,214,169, 83,167,198, 31, 57,114,100,252,254,253,251,199,239,220,185,115,124,133, 82, 30, 82,140,150, 95, 1,199,163,
+115,183,220, 96,130,112, 91, 34,132,136, 85,107, 52,246, 44,213,237,187,150,221,105, 57,143,107,146, 13,146,117,212,255, 46, 85,
+169,213,132,202, 85,107, 72, 59,142,223, 33, 91,215,188, 18,217,242, 46, 84,249,227,187,119,239, 8, 36,203, 54, 75,149, 23,166,
+118,153, 39,200,107, 25, 41, 87, 12,209, 2,217, 58,121,234, 84,207,205,219,118,141,152, 49,119,241, 60, 38, 90,207,212,137, 86,
+155, 25,215,227, 68,180,222,135,132,209,212,205,247,168, 96,237, 65, 84,190,197,184, 56, 17, 45, 55, 55,183,121, 87,175, 94,163,
+103,111, 62,145,255,157,119,180,253,204, 11,154,191,235, 1, 13, 95,121,131, 99,254, 46, 80,141, 97, 39,169, 96,151,131,148,177,
+230, 60, 74,102, 97,175,207,141,152,200, 59,107,174, 53, 21,170,214,163,165, 27,246,211,157, 23, 95,169, 42, 7,193,183, 25,178,
+138,134, 45,187, 28, 53,124,195,189,176, 47, 95,195,163, 64, 16,247,156,125, 67,211, 55,222,166, 14, 67,151, 81,246, 92, 5, 47,
+121,123,103,203,106, 0,190, 34,171, 64, 64, 32, 32, 16, 16, 8, 8, 4,228, 32,160, 59, 70, 75,151, 4, 16,173,189,231,158,209,
+176, 5, 71,105,235,169,231,212,176,251, 12, 58,121,241, 62, 21,172,243,205,117, 88,174,223,113,217, 68, 11,163, 11, 65,170, 96,
+193,130,187, 16,123,252,143,227, 32, 90, 1,239,190,112,112,244, 35,234, 52,235, 18, 21,237,121,132, 42, 49,137,147,107,209, 50,
+179,207,242,254,227,231,240,240,242,131,253,253,125,123,157, 63, 82,115,220,173, 67, 29, 23, 60, 58, 60,116,221,203, 67,163, 55,
+ 7,238, 30,190,233,205,250, 37,135,222,111,100, 34,163,211, 26,163, 36, 90,135, 14, 29,146, 72,214,246,237,219,199,111,217,178,
+101,124,197,210,153,165, 24, 45,223,124,246, 23,250, 47,240,151, 6, 4,212, 24,118,138,138,245, 56, 66,109,166,156, 39,183,188,
+ 53, 63,242,204,246, 88,232,249,187, 45,125,150, 34, 31, 94,114,221,206,222,126, 71,135, 47,191,166, 57,236,110,116,244, 42,242,
+213,167, 80,245,207,227, 86,158,163, 6, 76,214,230,204,153, 67,166,118, 94, 60,225,107,206, 36,114, 90, 52, 58, 79,207,136,136,
+136,238,135, 14, 31,237,187,106,221,230,241,179, 23, 44,159,183,116,229,250, 41,235, 54,108, 30,169,137,104, 53,153,120, 37, 78,
+ 68, 11, 35, 43, 31,189, 10,149,130,203, 7, 45,189, 30, 87,162,117,240,245,187, 32,122,240,242, 35,157,188,241,134, 54, 30,127,
+ 70, 51,183,221,163, 1, 75,174, 81,139,201,254, 84,113,224,113,202,221, 97, 63,101,110,182,133,137,150,195, 65,153, 24,120,217,
+166,177,191,188,120,219, 13,226,182,151, 70, 23,130, 0, 43, 99,180, 86,238,189, 23, 53,103,199, 99, 26,183,238, 14, 53,237, 52,
+129,234,181, 27, 17,201,114, 87,113,194,136, 69,177, 9, 4, 4, 2, 2, 1,129,128, 64,224,247, 35, 0,162,117,234,198, 91, 26,
+186,248, 28,117,159,118,152, 70, 46, 62, 65, 45, 7,175,164,166,163, 14, 82,233, 62,135,168, 84,159, 35,100,195,179,194, 27, 82,
+ 82,184, 17, 17,179,133,189,242, 58, 16, 45,144,145,249,187, 30, 82,199,153,151,200,175,251, 97,170,192,157,175,108,162,229,144,
+253,226,149,251,111, 62,116,152,115,203,191,104,255, 43,123,154, 78,123,176,111,240,154,151, 7,103,239,123,119,124,225,161,224,
+ 67,243, 14,134,108, 30,181,226,194,106, 14, 68,151,101,209,218,187,119,175, 68,178, 54,109,218, 52,126,205,154, 53,227,235,212,
+ 40, 49,172,120, 1,199,221,233,210,166, 24,214, 98,236, 17,170, 57,252, 52,187, 77, 79, 73, 36,171, 96,157, 33, 17,188,220,207,
+121,174,139,198,233, 29,210,121, 21, 9,121, 28,248, 73, 34, 88,163, 57, 72,187,215,252,171, 84,167,195, 4,154,190,245, 30,213,
+ 26,126,138,106, 12, 62, 74,174,185, 42, 6,153,164,113,119, 49, 4, 71,190, 93,239,227,103, 46, 78, 91,179,113,231,188,245,155,
+182,143, 61,122,236,120,111, 88,182,184,236,253, 84,137, 22,176,172, 52,244, 60, 85, 28,114, 30, 68,235,169, 33,247,128,235, 16,
+ 46,221, 41,209, 22,173,146, 77,199,144, 69, 28, 92,135,153, 51,103,190, 8,151,243,173, 39,193,116,232,114, 32,173, 58,244,132,
+ 38,109,188,195, 88, 92,161,198,227,206,178, 46, 29,165,172,173,247,146,119,203, 61,148,204, 42,253, 69,185,101,180,176,180,156,
+ 57,112,236,130,136,160,208, 8,122,241,230, 11,149,168,214,134,154,244,154, 77, 27, 79, 4, 50,169,251, 66,227, 54, 72,163, 14,
+131,250, 78,219, 75,125, 56,177,220,193,156,242,203,149, 47,242, 9, 4, 4, 2, 2, 1,129,128, 64, 64, 6, 2,170, 51,195,127,
+ 31, 12,175, 75, 0,136, 22,230,207,154,181,253, 1, 13, 88,116,145,154,143, 62, 68,117,134, 28,160,202,253, 15, 80,137,158,135,
+168,104,143,195,132,229,119,180,200,144, 61,241,154,171,143,111,192,243,183,159,105,238,206,135,212,126,198, 69,242,237,118, 88,
+ 26,213,168,129,104,105,148,105,110,239, 51,118,216,180,117,143,246, 95,126,247,160,248,160,235,155, 90,205,126,180,109,248,166,
+192,221, 11, 15,125, 56,180,252,216,199,221,219,206,127,217, 86,170,118,143, 77,166,105, 51,143,212, 80,214, 24,153,176,104,125,
+250,244,233,187, 9, 75, 7,247,239, 52, 23,193,240,142,246, 38, 67,250, 77,217, 70,125,231,158,161,218,125,214, 80,198,124,181,
+ 62,114,124,216,185,228,169,220,213,167, 33,136,145,153, 46,179,111,208, 5,118,151, 77,222,116,151,122, 50,201,106, 49,249,188,
+100, 13,131,123,180,194,128,227,148,171, 66,135, 80, 14,126,111, 34,163, 33,213,227,139,234,123,120,249, 12,216,181,107,119,143,
+192,192,192,238, 60,223, 87,119, 30, 33, 25, 67,180,242,183, 90, 71, 37,250,157,165,106, 35, 46,144,119,229, 97,148,212,212, 42,
+148,239,209, 72,237, 62, 58,219, 8, 68,235, 43,207,167,134, 24, 45, 88,180,186,207,189,204,113,100,122, 99,180,190,147,153, 59,
+119,238,219,112, 13, 95,126,240,129,246,248, 7,112, 44,222, 35,105,158,171,206,179, 47, 81,157,145, 28,159,197,122, 4,146,133,
+148,220, 38,211,109, 13, 88, 96,102,123, 77, 91,185,242, 85,234, 80,192,135,112,186,112,247, 3, 21,240, 45,129,185,194,246,213,
+107,211, 37, 50,244, 75, 36,193,125,184,251,236,107, 46,251,183, 17,136,101,235,117,231,249, 80, 21,174,209,130,100,235,167,140,
+182, 81,102, 17, 50, 13, 0, 75, 70, 86,129,167, 12,144, 12,200, 34,240, 52, 0, 44, 25, 89, 5,158, 50, 64,250, 71,178,168,175,
+117, 40,191,218, 88,231, 16, 46,189,192, 15, 95,232, 49, 47,195,115,235,105, 48,199,216,188,231, 33,243,175, 36,247,207,248,117,
+183,141, 66,180, 92,178,248, 6, 60,227, 9, 50,231, 49,209,106,199,110, 57, 95,182,194,148,238,123,148,204,191, 31,117,168, 81,
+177, 83,167,206,100,110,153, 46,251,227, 93, 39,239,223,220,114,238,253,249, 33,107, 2,182,142,216,252,102,227,226,163, 31,183,
+237,186,252,101,247,132, 85,167, 23,176, 53,235, 30,242,233, 34, 90,150,150,150,157,172,173,173, 7, 33,241,239,152, 84, 48,183,
+253, 61,105, 9,158,124, 14,167, 82,216,102,250,104,150, 54, 75, 48, 98,178,216, 93,216,150,229,105,178,100,197,148, 51,125,182,
+210, 39,103,174, 62, 42,145,139,182,211, 46, 82,221, 81,103, 36,183,104, 77,182,102,229,171, 57,232,171,181, 75,190,133, 50, 91,
+ 68, 83, 32, 55,172,130, 93,242,231, 47,208,125,215,174, 93,221, 31, 61,122,212,253,240,225,195,253,138, 23, 47,254,172,246,232,
+ 75,148,187,201, 66, 50, 77,157, 1,211, 26, 96, 16,128,166, 5,151,245, 18, 45,196, 85,205,220,246,128, 10,215, 25, 66,126, 13,
+ 71,199,133,104, 37, 44, 82,164,200,147,167,175, 63,209, 57,118,159, 98, 58,140,185, 59, 31, 96, 98, 81,198,227,130, 52,232,161,
+ 64,231,131, 49, 68,203,212,222, 7,147,170,170, 47, 23,164,173,156, 9, 56,210,237, 90,153, 10, 53,168, 86,131, 22, 52, 98,242,
+124,184,134, 77, 76, 82,164,152, 93,170, 76,245,247,199, 46, 62,151,134,161,158,187, 25, 76,123,207,125, 32,159, 2,101, 49,147,
+189,210,114, 40, 94,146, 50, 21, 79,102, 54,129,167, 76,160,100,102, 19,120,202, 4, 74,102, 54,129,167, 76,160,100,102,251, 25,
+120,202,188,245, 31,153, 77,247,204,240,186,138,236,228, 85,248, 44, 22,148,118,205, 94,242,141,115,182,146,111,156,178,148,120,
+227,232, 93,252,141,234,130,210, 60, 10, 77,125, 49,105,131,191,238,157,189, 10,110,233, 61, 98,122,196,186,253,215,104, 22,199,
+238, 52, 24,188,147, 92, 75,116, 15, 55, 79,151,103,163, 90,249,180, 54,110, 10, 59,247,220, 41, 29,178, 62,236, 48, 96,214,201,
+245,135,110, 31, 60,118, 35,120,231,202,189, 55,215,213,108,209,111, 35, 79, 38,122, 15,231,181,212, 85,175,194, 96, 49,105, 16,
+ 45, 44, 46, 45,179,137, 99,100,166, 72,237,153,214,209,171,216,151, 94,147,183,209,196,245,183, 36,119, 89,205, 65,123,200,171,
+100,155,207, 22,233,114,174,208, 66,212, 52,221,166,161,142,123,103,225,115, 61,152, 96,117,103, 87,103,191, 98,197,138, 63, 75,
+229,146, 63,138,143,173,225,164, 92, 47, 80,211,229, 58,235,158,206, 51,255,233, 21, 91,143,135,191, 9,250, 74,107,121,164,101,
+233, 54,115,194, 44,210,231,193, 44,248,186, 54,117,153,246, 13, 26, 53,121,113,143,167, 9, 57,126,237, 53,173, 63,246,148,166,
+111,185, 75,253, 23, 95,165,230, 19,207,177, 85,239, 24,229,108,183, 47,134,104, 89,101, 42,245,130,133,171, 15,143,213, 85,206,
+ 68,156,191, 5,167, 74,170,133, 74,148, 56,113,111,123, 7,167, 27,109,122, 77, 9,159,185,250, 20, 21, 45, 83,139, 60,178, 23,
+ 94,169,146, 71,111,187,203,108,107,213,108, 66,102, 28, 64,211,113,137,192, 83,224,105, 44, 4,132, 46, 25, 11,201,111,114,126,
+ 6,158,198, 45,225, 63, 34, 77,118, 67, 88, 91,187,165,180,203,152,103,170,189, 71,193, 11, 86, 25,114, 5, 90,102, 40,224,207,
+ 22,163,241, 10,251,156, 41,212,176,210, 41, 19, 22, 43, 14, 42, 31,109,106,159,229, 52, 2,223, 17,147, 5,119,161, 22, 75,150,
+ 82,180,222,114,250,100,178,168, 1,215,161,143,135,133,250, 90,129,218,154, 50,150, 76,179, 52,174,182,150,206,121,150, 88,187,
+228, 15,176, 72,159,247, 45,175,199,200,150, 49,207, 42,124,177,198,184, 46, 45, 66,177,228,140,190, 13, 75,204,244,136, 78,218,
+136,165,108, 98, 96, 99,227,101,198, 75,242,156,182,115, 47, 16,192,243,144, 5, 88,103,200,123, 26,199,244, 20, 66, 29,207,124,
+131,135,142, 8,186,241, 56,136, 14, 94,122, 69, 43, 14, 62,166, 9, 28, 59,213, 99,222,101,106, 56,246, 12, 79,229,113,132,178,
+180,250,230, 54, 68, 74,147,247,191, 32,150,159,207,144,118,215, 81, 30,103, 62,135,245, 36, 65, 56,213, 39, 88,213,219,238,250,
+192,214,112, 94,200,140, 3,104, 58, 46, 17,120, 10, 60,141,133,128,208, 37, 99, 33,249, 77,206,207,192,211,184, 37,252,181,210,
+148,174, 67,229, 93,213,255,255,105,165,249, 25, 13, 33,100, 26,183,185,126, 5,158,110, 25,221, 61, 78,101,242,204,226,239,238,
+149,237,178, 91,230,156, 55,157, 61,115,221,115,204,148,251,113, 26,151,156,143, 45, 28,125,238, 37,183,203,124, 51,185,141,251,
+229,228,169, 92,253, 77,172,210, 97,192,130,186, 21,238, 87,148,211, 24,200,138,114, 26, 3,197,255,203, 16,120, 10, 60,141,133,
+128,208, 37, 99, 33, 41,136,150, 38, 36,213, 99,180, 4,209, 50,146,181, 68,151,218,138,135,250,207,127,168, 69, 27,137, 54, 50,
+ 22, 2, 66,151,140,133,228,207,235,196, 69, 27,253,249,109,100,220, 18,254, 90,105, 58, 99,180,160,124,154,146, 33, 69,212, 38,
+ 67,215,113,125,242,133, 76,205,237,162,138, 11, 92,137, 85, 57,169,143, 36,212,132, 45, 47,236,172,177,157,255,180, 54, 66,192,
+191,161,109, 47,116, 73, 59, 2,134, 98, 41,167, 51, 18, 50, 13,211, 81,161,159, 66, 63, 53, 33,240, 47, 63, 71, 74, 60,140,193,
+ 63,244, 61, 95,127,253,121, 57, 47,109, 67, 65, 16, 50, 13, 69, 76,119,126,129,167,192,211, 88, 8, 8, 93, 50, 22,146,194,170,
+ 35,116,233,223,212, 37,227,214,250,215, 74,139,251,168,195, 31, 44,167,120, 88,126, 16, 64,181,203, 5,158, 2, 79, 99, 33, 32,
+116,201, 88, 72, 10, 82, 20, 47,117, 9, 3,164,244, 12,146,138,165, 33,166, 54, 94,118, 72,226,157, 28,131,192,207,104,119,227,
+ 62,149,191, 71,154,209, 98,179,146, 36, 76,156,172,135,105,202,212,215,205, 44, 83, 63,211, 81,151,159,209, 16,127,154,204, 4,
+ 30, 25,204, 58,148, 42,226,178,201,211, 53, 69, 21, 21, 44,244,150,211,212,214, 99, 81,218,140,249, 30,155,165,241,232,160, 97,
+116,165, 54, 83,179, 70,184, 49,170,209,220, 41,247,241,148,142, 89,228,140, 76, 84,149,161,183,156,156,217,196,219,219,187, 0,
+ 18,126,203,208, 93,189, 50, 77,211,120,212, 75,231,158,255, 72, 26,183, 28,188,208,119,166,154,198,144,169, 42,131,215,145, 76,
+109,238,148,107, 61, 79, 4,251,206,220, 62, 91,144,121,186, 92,135, 83,218,120,233, 13,176,119,170, 60, 50,243,144,149, 87, 86,
+ 98,175,169, 76,214,101,167,166, 28,180,234,246,136,212,149,198,104,154,143, 13,151,232,173,187,140,186,170,103,249,171,100, 58,
+ 21,170,103,101,239,215, 45,181, 76, 28, 98,234,206,107,134, 94,205,144,197,247,149, 67,166,124, 87,100, 94,171, 72,231, 89,224,
+188,179,119,161,128,116, 30, 5,206, 25,242,108,202,149,255, 55,202, 76,110,235, 90, 32,185,117,250,237, 38,214,233,119,152,164,
+114, 45, 38, 3, 11,157,250,105,111,111,159,130, 87,134, 40,155, 63,127,254, 86, 37, 74,148,232,156, 35, 71,142,150,206,206,206,
+165, 89,110,226,223,213,119,240,251,167,143, 89, 90,143, 47, 72,248,173,175,142,102,105, 60,135,243,123, 58,242, 91,242, 28,254,
+167,180,187,137,157,135, 51,151,127, 98,202,180,222,103, 82,164,201, 20,107,122, 27, 57,132,144,231,139, 44,109,107,107, 91, 85,
+153,240,191, 62, 44,126,114,221, 13,184,253, 31,151,213,168, 22,173, 68, 73, 76, 76, 79, 55,105,219,243, 83, 64,224, 59,234, 61,
+106, 1,153,152, 89, 93,211, 82,229,223,222, 65,216,184,230, 61,103,151,177, 64,128,106,194, 49, 57, 74, 40,167, 25, 61, 51,164,
+104,190,124, 86,155,135, 81,239, 54, 82,241,130,233, 54, 27,162,132,252,128, 92, 58,122,249, 5, 13,155,188,156,156,179,248,190,
+231,233, 30, 6, 88, 56,101,177, 50,244,229, 99, 97,235,230,154,202, 53,255,179, 42,221,150, 71, 58,250,148, 9,228,175,174,108,
+114,202, 30,157, 71, 87, 27,217,102,204,152,177,130,135,135, 71, 19, 94,139,177, 37, 18,126,227, 24, 95,171,105,242, 83,229,109,
+117,182,187,169,173,103,195,249, 75,215,242,146, 57,161, 60,145,232, 43,170,217, 98, 32,201, 32, 91,178,117,201,202,202,197,194,
+202, 57,215,243,193, 51,119, 70,156,185,249,134,246, 95, 8,160,110,147,118, 70,165,113,203,247, 86,141,108,125, 39,211,177, 68,
+207,149,115,182, 93,126,143,189, 38, 12,125,106, 77,168, 62, 99,203,141, 11,216,203,209,121,171, 12,133,118,219,122,150,184,101,
+231, 85,234,150,189,119,169, 91,142, 62,165,111,165,207, 90,230, 86,134,108,101,110, 57,102,246,221, 45,179,157,100,215, 93,166,
+ 60,100,139, 37,147, 87, 96,120,153,210,165, 96,184,165,107,161,240, 84,110,133,195,109, 50, 22, 14,183,205,228, 27,110,231,225,
+ 27,158, 54, 83, 97,185, 75,108,233, 43,167,165,143,187, 85,225,182,205, 42,221,205, 92,164,201, 75,167, 34,157,231,165,247,237,
+154, 93, 79,153, 99,100,102,204, 94,236,249,205,167, 31,201,217,187,240,215, 52, 89,170, 28,150,147,220,178, 21,255,250,237,154,
+ 66,170,107,156,234,209, 79,143, 82, 60, 53,204, 43,158, 26,230, 29,158, 73,243,212, 30,238, 92, 70,125,211,176,124, 39, 51, 69,
+ 26,207,255,184, 99,158, 45, 55, 33,255,143,188,151, 18,155, 88,148, 72,158,210,102,187,119,158, 18, 47, 45,109,156,182, 38, 54,
+177,244,211,128,173,190, 54, 82, 36,183, 74,191,233,248,213,215, 81,167,111,125, 32, 43, 71, 15, 57, 58,170, 83, 38, 19,171,250,
+ 39, 78,156, 24,196,243, 6, 75, 41, 60, 60,124,208,138, 21, 43, 6,241,187, 68,215, 84, 57,250,202,233,200,228,160, 96,186,116,
+233,106, 35,225, 55,215,213, 81,142, 46,153,217,185,217,112,155,132, 95,184,243,138,144,204,236, 60, 34,211, 23,110, 63,206,165,
+120,159, 33,154, 82,186, 66,237, 38, 48,185,138,186,250,240, 29, 33,241,181, 17, 42,150, 45,125,229, 52,224,145,140,201,170, 87,
+102,242, 52,158,249, 76,211,120,174, 45, 81,171, 99,228,252, 77,231,232,204,141, 64,178,116,204,114,194,208,190, 3, 4,235,225,
+195,135, 61, 31, 63,126,220,231,254,253,251,157,241,191, 1, 5,254,174,156, 14, 30, 5, 78, 56,122, 20,122,106,235,150,123, 32,
+203, 81,159,116, 26,162, 19, 89, 58,229, 28,104,153, 33,239,211,148,233,115,235, 42,175, 1,197,248, 11,179,178, 37,171, 91,227,
+ 54, 61, 62, 93,190,255,129,106,247,221, 64,166, 22, 54,129,134, 54,238, 15,194,162, 87, 9, 85,229,131, 96, 93,122, 16, 76,119,
+159,135, 74,233,194,189, 32,194, 49,125, 47, 52, 86,132, 67, 60, 99,123, 64,170,232,100,233,148, 35, 40,181,107,254, 0, 27, 36,
+158, 79, 10,115, 74,121, 21,169,183, 2,228, 10, 36,107,201,140,214, 79,220,156,146,119, 86,145,171,183,156, 32, 90,199,120,121,
+163,253, 23, 95,211,105, 94,104,121,202,194, 45,228,149,167,204, 39, 83, 59,143, 9, 26,150,244,249,174,115,196,129, 20,105, 51,
+229,178,117, 47,244,186,205,132, 67,212,100,210, 21,154,187,237, 54,213,111, 51,240, 67,145,242, 13,222,165,247,242,125,238,228,
+ 93,100,143, 89,218,140,158, 6,180, 81, 34,115,115,243, 76,252, 21, 90,167, 92,185,114, 77, 15, 30, 60,216,146, 95,142,177, 18,
+142,225, 28,242, 32, 47, 30, 30,125,120,170,158,119,203, 90,228,204,135,143, 95, 40,103,233,255, 40, 91,201,230, 52,115,211,117,
+ 50,119,240, 58, 32,231, 37, 41, 71,119,204, 28,179, 79,237, 50,106,117, 56,150,250, 41,207,203, 56,213,228,229,142, 22,236,126,
+ 72,189,167,108,143,178,113,205,115, 88, 83, 27,193,130, 5,114, 85,174,110, 39, 10,120,251,145,176,199,255,170,150, 45,183,178,
+ 29, 82,230,169,222,235,197,230,163,183, 35,177,199,255,250, 58, 50,144,172,253, 23,248,133,126,239, 61, 93,225,229,135,174,243,
+ 92, 98,183,159,133,208, 37,126,126,220,115,149,189, 37,167, 62,156, 71,159, 46, 37,194,215,172, 89,154, 76,155,144,162,191,108,
+213,219, 68,253, 86,177,100, 90,184, 20, 14, 63,122,245, 53,221,126, 26, 66,152, 88,246, 97,192, 71,122,194, 43, 65, 28,185,242,
+154,220,114, 87,192,202, 2,114, 54,109,229,180, 45, 87, 40, 77,133, 67,211,253,166,127, 57, 90,253,248,226,209, 53, 94, 47, 91,
+191,155, 38, 46, 59, 22,158,187,250,144,143, 78,190, 93,246,167, 43,220, 73,219,151,116,140, 76, 88,167,210,123,251,126,116,206,
+ 86,150,174, 60,252, 64,152,151, 13, 75, 58,157,191,251, 94, 90,176,253,244,173,183,116, 70, 74,239,232, 28,175, 94,113,150,247,
+ 89, 11, 87, 37, 92, 99,136, 69, 11, 36,235,232,213,119,180,247,194, 27, 42,197,107,123, 22,168,218,141,210,100, 42,244,128,113,
+173,108,192,115,164, 0,193,122, 23, 18, 70,211, 86, 30, 97, 28,223,240, 28,114,175,105,223,133, 64,122,198, 43, 36,140, 89,116,
+128,182,157,126, 73,155, 79,190,224, 21, 54,158,211, 13, 94, 3, 20,249, 13,121,142, 84,243, 38, 54, 73, 57,176, 68,141,246, 52,
+101,237, 5, 90,125,248, 25,173, 61,244,144, 90,116, 27, 78,137,147, 91,116, 55, 84,102,114, 75,199,109, 74,162,101,105,239,190,
+ 95, 70,195,235,212,207,138, 21, 43,118, 1,185, 82, 18,173,207,159, 63, 15, 58,117,234,212, 32, 51, 51,179,254,134,224, 25,157,
+215,148,223, 59,181,249,163,175,227,179,103,207,186, 69, 70, 70, 74, 9,191,231,205,155,215, 17,231, 56,159,169, 22,185, 82, 57,
+241,110,229,119,111, 20, 8, 56,146,169,157, 39, 77, 91,115,118,223,186, 99,207,183,105, 74, 51, 54,248,239, 69,158,152,252,124,
+ 45, 38,161,142,190,199,119,117,103,171, 80,201, 52,105,210, 84,214,148,172,236,221, 71, 91,166,207,243,134,251,150,215,214,174,
+156,210,231,188,174,239, 29,162,122,158,203,157,197,210,201,231,120,243,158,147,105,207,153, 71, 76,252, 62,208,196,165,135, 41,
+123,177, 6, 97,102,182,134, 19, 87, 16,171, 39, 79,158,244, 61,119,238, 92, 93, 38, 90, 93,127,148,104, 57,101, 46, 24,128,245,
+108,167, 45,220,244,201,217,167,232, 75,251, 76,133,159,216,185, 23,122,146,134,147,141, 91,193, 39,233,125,138,191,108,209,111,
+238, 39, 76, 86, 45,119, 29, 99, 25,250,247,167,100, 49,154,203, 80,193, 95, 76,103,239, 61,124, 66,141,135,237,250,142,100,153,
+ 89, 88, 97, 97,101,213, 77, 95, 7, 17,147,215,220,214,163, 0,155, 63,151, 88, 56,102,221, 96,233,148,109,123, 74, 7,159,153,
+ 41, 82,103, 82,159, 29, 28,249,101,203, 68,102,144, 42,144,171, 81,107, 31,196, 36, 57, 68,203,202, 57,239,243, 29,103, 94,208,
+121, 94,163, 16,179,153,179,165,136, 95,148,129,116,237, 81, 16, 47, 35,243,150,106,181,236, 27, 84,182,164,207,126,143, 12,166,
+139,139, 23,114,222,157,222, 62,249, 88,190,157,242,225,147, 85, 78, 16,173,125,220, 9,175, 63,246,156,182,156,122, 73,187,207,
+189,164,157,199,239,210,172,229,187, 41,111,241, 26,225,252,197,178, 32,185,189,151,147, 10,160,177,234,110,154,214,167,140,189,
+ 87,177,119,237,167,158,162,146,253,206,241,186,134,254,212, 99,225, 93,218,122,230, 13,191,184, 63,209,147,215, 95,233,208,185,
+251,148,211,175,218, 27, 88,189,116,189,124,148,231, 50,100,200, 80,171, 99,199,142, 77,249, 11, 71, 34, 87, 11,151,175, 25, 89,
+184,116,205,107, 46, 89, 10, 7,103,240, 46, 20,156,191,120,245,107, 56,134,115,200,211,174, 93,187,198,105,211,166, 85,255, 50,
+213,217, 70, 25,124,124,207,188,100,107, 86,182, 18,205, 40, 75,177,102, 52,120,209,121, 67,137, 86, 2, 71, 71,199,228, 92,102,
+ 85, 43, 3,126, 75,137, 39,131,189,179,227,212, 35,105,105, 31,172,153, 89,123,196,105,234,183,248, 26,109,224, 25,233, 83, 57,
+231,192,100,168,202, 45,166,156,112, 23,194,146, 5,146,133, 13,123,252,143,227,112, 19,194,130, 85,160, 70,183, 23,253,198,204,
+167,144, 79, 95,169,239,232,249, 84,144,255,199,113,184, 19,181,181, 81, 90,182,100, 93,100,146,213,158,151,149,234,181,224, 42,
+ 13, 91,121,147, 23,211,190, 75,243,120,241,116,143, 60,229,126,136,104, 65, 55,248,107,124,136,133,131,247,179,214, 93,135,210,
+177,115,183,162,142, 93,184, 19,213,161,239,120,178,114,202,250, 28,231,212,244, 71,235,179,105,201, 86,172,219,188,188, 22,150,
+134,106, 56,230,172,180, 12, 86,223, 69,215,120,169,173, 64,202,148, 55,206, 68,203,186,117, 21,183,134,151,150,150, 92,244,245,
+ 72,181,147,167,231, 23,155, 91,191,148, 83, 13,251,220, 77,142, 99,249,174,153,219,238,211,182, 83, 47,104,230,250,115, 81,126,
+141,198,145,125,158,102, 55,108,179,213,170,162,235, 29,226,152,191,102,114, 91,239, 42,119,150,236,188, 42,225,216,108,130,191,
+180, 8,125, 63, 46,235, 40, 94,203,114,218,150,123,180,104,239, 99,233,153,154,178,242, 24, 57,102,175,113, 84,225,231,167,238,
+162,210,109,209, 98,162,181,231,252,107,233,125,209,106,236, 62, 26,178,252, 6,245,157,127,145,138,213,237, 71, 90,214, 74,213,
+248,188,131, 56,129,100,241,115,126, 78,105,213,194,111,144, 44,245, 99,131,102,239,141, 51,209, 98,146,213,191,116,189,222, 52,
+ 98,241, 89, 26, 54,107, 39,213,250,175, 23, 45,220,124,142,142, 92, 15,161,158,195,231, 16, 91,186,138,107,210, 79,243,180,153,
+ 11, 23, 42, 93,243,113,157,102,157,169, 86,147,206, 84,163,113, 39,170,222,168, 19,149,170,210,152, 10, 20,175, 66,249,138, 85,
+166,162, 21, 27, 82,185, 58,237,169,108,237,118, 84,186,102, 91,202, 81,180,102, 8,172, 41,134,188,231,217, 93,216,254,249,243,
+231,131,182,109,219, 54,104,220,184,113,131, 26, 53,106, 52,136, 63,212, 6,241, 51,220, 73, 71, 15,169,169,141, 44,178,101,203,
+214,246,237,219,183,221,248, 17,141, 73, 95,190,124,233, 22, 28, 28,220,141,215,168,237,198,164,161,155,143,143, 15,150, 69,179,
+208, 32, 59, 70,102, 74, 59,207,153,105,220,114, 17,146, 77,166,226,247,220,203,244,159,168, 43,217,120,148,184, 99,237,148,141,
+172,211,101,229,118,202, 52, 73,219,243,142,227, 32, 43, 15, 30, 60,232, 1, 43,145, 50,177,213,168, 79,143, 1,163,150,101, 45,
+ 82,231,211,174,179,207,232, 36,127, 88,111, 62,249,156, 82,187,228,125,175,171,156,170,231,120,185,183,242,165,170,183, 14, 63,
+125,237, 57, 93,231,126,104,226,234,243,228,158,191,230, 39,246, 6, 12, 53,181,245, 78,163, 3, 75,173,253,145, 26,209,234, 98,
+ 12,162,133,247,231, 11, 94,183, 56, 60, 34,138, 62,126, 14, 39, 44,189,118,247,121,136,180,124,223,233,155,111,105, 62,127,244,
+110,225,231,222, 80,162,197, 98,243,112,170,128, 61, 42,164,250,191,202,111,233,188,218,255,121,249,255,124,209,215,150,140,222,
+ 35, 31,146,242,127,109,199,145, 7,215,155,170,200, 44,203,191,173, 53,224,173,221,117,200,202, 79,170, 23,168,255,175, 46,204,
+ 42,181,253,243, 0, 94, 28,184,209,208, 93,100,102,105, 27, 99,205, 74,147,214,241,205,178, 85,235,201,194, 42,213, 35, 61, 13,
+ 30,235, 52, 58, 2,115, 7,159,245, 21,107,183, 10,217,121,228,114,200,195,231,239,190,222,123,242,250,203,198,189,167, 67, 42,
+213,110,249,201, 34,157, 15, 22,129,214,100,130,148,117, 27,153,174,195,239,100,241, 12,232,207, 79,222,120,203, 11, 64,251, 83,
+243, 73,254,148,206,167,180,100,149,192, 11,189, 78,187, 33, 31,150,205,106,247, 12,150, 44,191,252,142,251,249,203,165, 5, 11,
+192,154,131, 6,109, 32, 90, 91,249,171,118,249,129, 39,180,234,208, 99,106,208,101, 26,173,216,126,238,219,215,250,147, 16, 90,
+178,241, 24, 94,200,251, 52, 9, 77,110,231,158,199,206,179,120, 80,135,233,231,201,183,215, 25, 42,214,247, 28,181,152,118,131,
+ 70,175,127, 76,235, 78,188,165, 29,254, 31,164,180,253,220, 59, 90,188,253, 42,241, 87, 5,119,234, 94, 73,245, 21,144, 31,180,
+134,252,117,211,242,222,189,123, 77,234,253,215,113, 85,209,114,117, 62, 95,189,245,128, 2,223,127,162,135, 47,130,105,221, 30,
+127,202, 82,176,226,231, 42,245, 91,175,188,116,233, 82,173,237,219,183,183, 76,149, 42,149,174,165,129,190,187, 37, 92,135, 35,
+ 38, 47,166, 67,151, 2,104,230,230, 27,148,179,108, 59, 57,174,195, 88,114,250,244,233,147,138, 93, 15,238,166,166,166,120,193,
+196,144, 44,254,157,200,194, 41,231,131, 5,219,175, 83, 43, 94,188, 27, 11, 86,119,158,125,153,166,110,190, 71, 91, 79, 62, 37,
+155, 12, 57,223,105,194, 64,151, 69, 11, 49, 89,112, 23,110, 62,122, 43, 18, 36, 11, 27,246, 91,248,127, 28,199,121,109,184, 58,
+100, 41,125,235,234,195, 32,137,180,100, 47,222, 56, 32, 99,206,178,183,220,115,151,187, 5,146,149,193,167,168, 28,183,140, 70,
+209,172, 23,189, 11,151,173, 19,185,114,211, 62,122,242, 42, 56, 10,235,132, 94,100, 43,217,133,123, 31,232,254,203,143,116,235,
+ 73, 80,212,222, 83,119,168,114,131,174,145,102,182,153, 7,235,107,119,235,140,190,225,120, 25,214, 31,125, 70, 90,127,178, 55,
+147, 66, 16,151,237,172,159, 30,249, 42,144, 85,250,156, 31,172,157,115,126, 72,229,172,241, 11, 92,163,248, 84,233,179, 92,112,
+201, 82,240, 75,173,242, 57, 15,230,202,102,135,216,193, 84,200,232, 84,164,203,182,213,135,159, 74,139,148, 79,225,133,214, 39,
+172, 60, 75, 75, 87,175,163,227,219,198, 83,185,170,117,131,163,219, 83,107,145, 83,251, 84,203,145,173, 76,251,136,253,231, 95,
+ 82,223,133,215,164,178, 14,103, 2, 59,101,211, 61,182, 92, 62,162, 53,188, 84,212,210, 93,215,201,189,112,163, 23,118,217,107,
+218,232,171,187,250,121,214,207,146,108,213,122,195,174,195, 16,142,239,187,225, 81,160,234,167,246,163,183,208, 72,198,163, 72,
+205,238, 81,252, 1, 84, 66,142, 76,144, 43, 88,178, 84, 45, 85,248, 13, 75,150,250,177, 21, 7,159,106, 34, 90, 90,111,147, 36,
+121,202,246,105, 28,221, 94,250,149,173, 21,229,145,183, 18,213,236, 56,131,254,235, 51,155,146, 91,218, 46, 77,150,204,194,213,
+ 58,141,243,234,165,219, 47,208, 94, 38,140,169,237, 93, 52, 90,165,184, 12,115,238, 61,125,207,107,216,126,102, 43,102,168,100,
+177,185,242, 48, 88,178, 16,238, 61,125,159,118,240, 71,223, 65, 94,211,118,239,249, 64,218,113, 54, 64,178,190,173, 62,244,132,
+ 93, 84, 62, 75,181, 21,204, 49,179,223,110,151, 28,236, 26,231,228,204,238,241,244, 89, 75,223,114,241, 42,124, 7,214, 44,144,
+173,125,251,246, 13,154, 54,109,218,160, 41, 83,166, 12,178,205,144,235,174, 13, 91,124,109, 60,138,223, 74,157,169,248, 45,184,
+217,117,225,202, 31,116, 13,213, 73, 22,200,213,171, 87,175,186,173,219,180,109, 88,233,170,141,252, 51,102, 47,250,193,149,215,
+205, 77,153,198,109,171,190, 54, 74,151,191,197,236,201,203,143, 31,116, 41,209, 11, 43, 71,232,220,144,103,198,186,115,251,211,
+ 21,106, 61, 67, 95, 94, 37,121,241,247,247,175,167, 76,141, 91,117,157,228,237, 91,235,227,254,243, 47,104,244,154, 91,210,122,
+183,187,217,226,206, 94, 18, 77, 68,235,187, 91,192,221,153,181,112,165, 15,119,159,241, 59,253,204, 75,106, 48,100, 47,165,205,
+ 94,237,136,130,227,223,244,149, 71,215,121, 53,162,101,168,235,240, 59,209,176,104,225,253,136, 62,109,214,246, 7, 52,105,195,
+ 29, 26,203,235, 33,227, 67,183,249,164,243,210,250,190,101,250, 30,163, 85,135,159,104, 36, 90,186,248, 8,136, 17,223, 16,226,
+ 99, 8,146,202,255,210, 57, 77,255,247,238,221,187,143,234,181,202,124,202,188,170,123, 85, 25,202,223,209,215,151,199, 30,199,
+ 10, 20, 40,176,146,229, 33,156, 64,125,211,110,209, 66,197,148,149, 83,253,173,165,113,220, 76, 45, 82,191,253,252, 53, 82,250,
+202,235, 48,118, 59,165,180, 78,243, 42, 77, 90,135, 55,231, 47, 94,161, 61,167, 31,146, 85, 42, 91,109,241, 90,223,137, 52,183,
+205, 84,144, 45, 12,239, 23,111, 56,244,254,107,120,100,228,157, 23, 95, 62,108, 58,245,238,241,178,195,175,239,239,189,244,225,
+217,149,251,239,130,234,181,234, 19,100,110,231,221, 67,155,178, 88,102,200,125, 78,233,222,147,246,236,218,179,206,144, 71, 61,
+ 6,203, 96, 93, 4,209,218,115, 62,128, 90, 79,189, 32,117, 60, 78, 89, 75,211, 49,118,173, 12, 92,122, 61,160,116,177,204,251,
+163,221,133,207,138, 20,204,178,145, 59,251,206, 6,223,128, 47, 0,209, 66,167, 0,134,223,105,212, 58,154,183,246, 16, 61,122,
+ 21,202, 95, 43,193,146,235,227,216,213, 55, 32, 90,151, 52,201, 54,119,240, 72,149,198,221, 55,160,253,180,179, 52,110,195, 67,
+ 90,122,240, 5,237,191,196,214, 55, 94, 60,249,208,213, 96,137,100,173,103,194, 53,110,227, 83, 26,176,252, 62,149,110, 57, 53,
+220,219,175, 97, 84,170,244,185, 55,232,121,240, 26,158, 62,125,186,101,255, 33,163, 70, 22, 41, 83,235,243,199,207, 97,244, 32,
+ 32,148,221, 40,129,180,140, 31,158,101,251,159,208,250, 35,143,201, 53, 71,233,207,157,123,246, 31, 25, 23,162,133,251,251, 20,
+ 40, 31,122,229,126, 16,181,233, 61, 14, 95,136,170,193,165,114,160, 76,184,118,237, 90, 11,254, 74,180,107,209,162, 69,110,126,
+ 89,228,231,139,146,113, 74,104,101,101,149, 37,127,137,234, 27,106,181, 27, 23,182,116,255, 99, 26,177,234, 38,205,216,202,157,
+198,153, 0,234, 55,110,113,152,163, 71,190,245,186,110,160,140,209, 74, 87,178,247,198, 33,171,110,142, 44,208,122,163, 45, 44,
+ 86,176, 92,229,173,209, 43,150, 69, 11, 22, 46, 28,215, 17, 24,175, 96,189,185,117,147, 77,233,163,215,220,166,140,242, 93,133,
+122, 49, 96,189,184,249,233, 11,127, 45, 6,126,162, 19,215,223,210,218,163,207,248,229,245,148,173,162,175,232, 44,235,206, 30,
+ 38, 89, 13,219,246,167,180,238,249,200, 44,173,183,174, 1, 43,210,189, 82,187,251,134, 63, 96,130,214,122,202, 5,234, 57,255,
+ 42,227, 6,235,208,125,218,116,226, 57, 85,109,212,133,142,158,187, 67,168, 71,234, 12,185, 62,232, 45, 92,116,134, 12, 57, 43,
+210,153, 43,143,104,244,172, 13,100,155,169,232, 71,254,160, 26,153,210,209,203,154, 93,133,107, 23,239,125, 68,125,230,156,162,
+193, 83,215,208,174,141,211,232,236,158,201,180,102,237, 74,114,204,215, 34,214,135,159,182,123,217,100,169,218,187,213,160,229,
+ 82,249,240, 46,154,184,225, 46, 47, 84,254,144, 86, 30,122, 74, 27,143, 62,166,188,149, 58,132,165,206, 82, 37,167,220,178,234,
+202,135,129, 38, 22,246, 89,118,117,159,188,139, 70,175,186,198,164, 51,199, 65, 57,114, 65,166,224, 46, 84, 39, 85, 32, 44,234,
+199,240, 92,105,112, 29,106,188, 13,123, 21,166,244, 26, 49,135, 14, 94,121, 47, 89,173,240,220,183,238, 61,133,146,153,167,134,
+ 27, 42,250,163,212, 58,101,249,218, 45,162,112,190, 88,249,186, 31, 53, 9, 74, 97,239,153,163, 64,169, 90, 65,213, 26,117,164,
+ 42, 13, 58, 82,165,250, 29,168, 98,189,246,212, 99,216,108, 58,204, 4,177,235,208,185, 84,138,173, 88, 37,106,180,165,226,213,
+219, 80,209,170,173, 41, 91,145, 26, 47,248,121,213, 26, 32,239,202, 31, 18,112, 55, 35, 36, 2,214,208,157,231, 2, 40, 83,238,
+178, 95, 90,117,234,179,127,235,206, 61,147,246,236,217, 51,184,107,247, 62, 83,242, 21,173,116, 56,181,123,209,175,189, 22, 92,
+161,142, 51, 46, 82,163,177,103, 41, 21,147, 45,109,184,114,112,126,129, 2, 21,219, 30,174,217,118,212,233,134, 29,198, 28, 29,
+ 59, 99,213,162,179, 23,174, 13, 1,201,106,215,101,192, 90,159,252,229, 66, 71, 76,223, 16,181,146,151,247,226,251, 71,177, 5,
+254,137,105, 42, 39,157,243, 11,130, 60,109, 58, 25,184, 77, 73,180, 82,216,121,108,192,251, 86, 53,225, 24,202,164,158, 87,207,
+ 59, 52,198, 29, 7,151, 92,195,150, 93, 38,130,100,237,139, 38, 89,181,216,194,222,104,220, 89,218,202, 86, 29, 14, 67,145, 69,
+180,216,109,221,127,237,206,147,146,107,188,219,156,203,148,181, 66,239, 40,107,183,178,142,248,104,197,199, 56,167, 71,216,179,
+117,171,134, 66,241,157, 5, 87,107,113, 85,137,214,221,187,119, 37,162, 5,239,135,153,189,119, 71,171, 12,249, 86, 91,187,228,
+189,158, 42, 67,222,151,169,100,246,169,233, 84,136,214,184,249, 59,201,198, 37, 23,173, 60,248,132, 58,205,186, 68,221,199,111,
+226,247, 71, 78,233, 3, 14,161, 28,154, 44, 90,186,248,136,146, 44,113,101, 36,178,133,189,234,111,165,165, 74,253,152,182,255,
+181,229,215, 39, 39,250,188,131,156,119, 64, 76, 30, 85,146,133,131, 58, 44, 90, 30,182,246,206,111, 79,158, 57, 79,207,223,124,
+166,177,252, 53, 58,126,253, 29,154,184,226, 20,221,186,115, 79,122,176, 26,183,233,253,198,196,196, 68,151,223, 61,230,190, 48,
+ 63,167,113,203,253,225,248,165,167, 31, 2,222,135,125, 90,112, 32,240,110,219,185,143,252,149,169,254,240,195, 87, 7, 76,219,
+ 17,176, 97,207,185, 16, 91,183,188,207,181, 85, 10,228, 10,110, 8,196,193, 28,224,175, 47,188,120, 17, 75,101, 16, 8, 26, 50,
+ 91, 59,231, 14,112,204, 82, 90,178,100,129,100, 89, 56,248, 80,225,114, 53, 63,253,223, 93,152, 97, 95,174,172, 46, 91,199,143,
+ 31,223,155, 45, 58,114, 38, 12,253,238, 46,120,160,151,176,155, 99, 58, 19,129,242,255,141,164, 71, 47,130, 36,108,111,113,156,
+ 12,190, 42,241, 53,169,141,104, 65,152,121, 90,159,194, 22,206,121,110,101,206, 87,241, 77,222, 18,181, 95,151,168,220,248, 77,
+151, 62, 35,131,215,110, 61,242,213,255, 46,155,150, 55, 63,165,246,179,111, 83,217, 1,103,168,242,192,227, 52, 98,205, 61,242,
+200, 95, 5, 22, 29,173, 22, 66, 88,180, 64,180,242,248, 85,186,118,229,230,125, 41, 94,103, 43,187, 53,231,236,120, 64,131,150,
+221,160,150,108, 37,234, 54,247, 10, 53, 27,178,129,220,178,151,186, 22, 87,162,197, 86,129, 53, 91,142,220,164, 57,235,142, 50,
+ 17,200,124, 20, 1,236, 6,180, 89, 2,118, 15,216,238,220,185,211,145,221, 6,238, 11, 23, 46, 44,130,120, 8,190,222,142, 3,
+111,107, 5, 5,133,180,117,205, 86,252,105,173, 54, 35,190, 78, 95,195,241, 89,236, 70,233,216,127,242, 87,118, 19, 60,199,104,
+ 68, 93,247, 81,142, 58,204,217,116,122,159,137, 27,175, 29,242,109,187, 32,166,109, 17,147,149,159,201, 21, 44, 91,121,107,244,
+212, 22,163, 21, 75, 60,130,222,239, 61,255, 40,185,201, 50,177, 37, 75,106, 55,135,108,119,204, 29,179,127, 64, 74,153, 46,251,
+ 7,139,116, 57, 62,112, 12,224, 7, 43, 78,214,233,115,104,138,217,208,160, 59,158, 55, 96,150,135,181, 97, 3,199,248,128, 84,
+ 30,186,252,134,214,236,185, 72,149, 26,118, 34, 7,143,252,212,172,235,104,218,120,228, 30,165, 74,159,227,174, 62,108,109, 61,
+138,132,131,228,247,152,119,133,134,173,184, 41, 89, 0, 23,239,123,204,207,211, 11,242,171,214,158, 58, 78,220, 47,185,229,248,
+197,249, 65,159, 44,229,249,172,126,117,104,207,241, 27, 52,118,193, 62, 10, 10,249, 68,171,182, 28, 36,215, 92, 21,195,173,220,
+138,222,235, 59,110, 41, 45, 93, 60,149, 78,236, 24, 79,179,231,207,163,161,115, 15,208,186,195,143,201,201,183,179, 44,162,165,
+ 80, 12, 78,152, 38,107,149, 19,243,183, 92,162, 37, 92, 78,124, 61,227, 67, 0, 36,166,114,243, 17,196,238, 69,131,172,172,250,
+234,100,146,198,221,165,100,157,110,188,224,253, 3,242, 42, 88, 85, 86,231, 8,226,180,159, 63, 80,212, 73, 21, 98,178,212,143,
+ 45,230,247,128, 28,162,149,212,212,170, 79,223, 49, 11, 37,130, 53,122,214, 38,170,213,118,172, 20,163,179,245, 76, 32,213,107,
+ 51,144, 18,155,166,196,196,196, 10,184, 19,135, 78, 93, 77,135,174,124, 32,135, 12, 94, 23,245,213, 79,121, 62,133, 77,230,236,
+245,218, 14, 98,107,203, 43, 14,143, 24, 64, 32, 99,114,175, 69, 62, 16, 45,196,200, 13,101, 29,234,191,248,186, 68,218, 91,246,
+152, 20,212,161,215,168,176,188, 37,107,135,166,203, 92,248,179,103,254,106,161,133,106,246, 9,247, 41,219, 45,164, 84,159,163,
+228,215,253,176,228, 53,208, 69,180,210,103, 41,121,120,227,145,187,175,183,156,122,254,122,217,190,251,207,198, 44, 62,114,183,
+121,247,169, 23,242,151,251, 47,176, 86,211,110, 95,119,157,121, 42,197,166, 77, 97,189,157,198,105,192,244,109,145,105, 61, 10,
+236,213, 85,118,117,242,132,119,237,161, 75,129, 97, 28,247, 23,126,252,250,155,175,172, 75,159,148,239,223,184, 18,173, 24,146,
+229,255,205,146,133, 48,134,198,227,206, 81,203, 41,231,105, 29,127, 28,113,172,175, 28, 93, 74,232,234,227,247,236,249,235, 80,
+ 90,176,231,145,132,105, 70,223,150,220, 47,230,254, 88,186,118,103,234, 55,113,141,212,247,205, 90,117, 88,114,243, 90, 58,122,
+191,224,120,173,106,114,218, 77,149,104, 93,184,116,169,155, 85,186,172, 91, 61,185,143,232, 63,117, 75,212,252, 45,231,105,219,
+ 73,188, 3,158, 19, 98,147,229,200, 3,209,138,140, 34,233,131, 60, 85,250,172,232,191, 56, 6,249,149,228,222,183,118,250,246,
+255,210,253,143,248,253,114, 87,167, 69, 75,157,151,224,222,234, 86, 41, 77,255,203,201, 3, 81,223,196, 73,150,177, 24, 43,153,
+166,227, 56,166,110,209,138,254, 95,219,199,134,170,251,240,255,144,201,114, 29, 38, 77,234,105, 99,239,252,254,226,149,155, 52,
+112,201,117, 42,217,235,168,100,166,199, 75,103, 41, 3,186,106,247, 21,170,223,162,219, 59, 83, 51,179, 75, 44, 25,150, 5,157,
+ 91, 10, 59,247,220,105, 92,115,127,216,125,234,254,187,219,207, 62,127, 24,184,250,217, 21, 85,146, 85,172,217,148,179,230,246,
+ 94,111,153, 85, 47,183,113,205,125, 54, 37,175,133,167, 77, 32,136,214,250, 99,207,168, 30,155, 98, 27,242, 87, 81,147,241,231,
+140, 66,180, 82,185,230,123,126,232,242,183,152, 44,127, 38, 61, 37,170, 52, 10, 85,117, 23,150, 41, 83,166,119,167, 78,157,122,
+ 33, 48,156,149, 85, 14,209, 74,204,100, 96, 56,155,191, 31,240,208,230, 55,216, 91,167, 73,255,106,198,150, 59, 52,110,221, 29,
+242,171, 51,128, 73,214, 39,201,183,125,159,201,205,177, 43, 1,180,237,196, 99,157, 68, 75, 35, 38,110,110,201,108, 93,243,244,
+108,215,119, 98,240,168,117, 15,169,220, 64,144,172, 99, 76,178,238, 83,241, 38,227,162, 56,208,190,177,174,198, 81, 18,173,244,
+153, 11, 6, 7,188, 13,149, 92, 6, 32, 9, 3,184,221,155, 79,244,167,114,253,143, 83,161,174,135,168,253,212,211,196, 95, 57,
+193,113, 37, 90, 60,138,167,118,155, 62,147, 36, 51,120,223,137,235, 40, 77,198,188, 15,249,107,172,168, 62,221, 81, 57,159, 40,
+ 75,150, 44, 30, 76, 10, 51,135,133,133,229, 62,127,254,124, 25, 30, 66, 94,243,218,181,107,141, 35, 34, 34,154, 4, 7,127,108,
+ 92,171,113,251, 77,108, 57,123,196,211, 2, 60,182,115,205, 53, 75, 54,153,243, 26,156,180, 84,155,153,187,150,236,185,241, 6,
+123, 5,255,175,188,175,140, 81,135,177,170,128,142, 7, 1,240, 48,165,123,230,173,240,141,104,217,251,124,132,206, 34,248,252,
+ 20,187,167,207,113, 32, 55, 62, 20, 86,177, 53, 6,238, 57, 57, 24,240, 11,235,218,135,143, 97, 18,177,192, 51, 8,162,181,229,
+232, 77,114,241, 41, 74,237,251, 79,163,173,172, 59, 32, 74,125, 22, 94, 37,115,251, 44, 90,159, 31,229,189,236, 60,139,134,163,
+156,176, 90,113, 39,195,150,177, 0, 41,142, 2, 68,161,100,173,142,212,119,214, 97,233, 30,236,122,253,196,215, 72, 47,147, 36,
+ 73,146,232, 36, 51, 62, 69,106,211,221, 39,239,104,211,161, 91,228, 81,126, 40,117, 24,177,150, 62,125,254, 74, 59, 15,158, 37,
+247,156, 37,105,198,236,105,212,121,220, 22, 26,182,244,178, 20,111, 5,107,148,147,111,167,207,114,234,143, 60,105, 61,171,165,
+207, 85,161,227,167,157,103, 95,240, 66,229, 79, 36,194,217, 97,232, 18,178,241,174, 50, 89,174, 12,185,249, 16, 67, 90,163,213,
+ 80, 2, 33,114,203, 93, 86, 86,167, 3,226,180,135, 9,139,122, 60,214,186,163,207,191, 59, 6,151,167, 62,162,197,129,237,189,
+187, 14,158, 38,145,172,190,163, 23,146, 91,206, 82, 17,141,250,175,225,184,169,218,212,105,228, 74,154,197,110,120,203, 52,206,
+123, 17, 0,223,182,215,184,111,249,152,148, 37, 50, 73,217, 64,118, 61,237,189, 22, 45,216,124, 94, 34,216,211,215,158, 37,115,
+ 59,175, 69,114,175, 69, 62,232, 59, 6, 38,168, 18,173,230, 61,166,188,125,200, 86,241,211, 55,223, 17, 66, 37,102,108,189,199,
+ 31,107,151,201,181,104,199, 96,185, 68,139, 71,101,127,122, 27,244, 37,188,122,191, 29,247,187,204,190,120,189,231,228, 93, 15,
+ 11, 85,238,248,101,193,186,163,145,135,241,129,193,158, 1,124, 28,244,103, 23, 21,172, 39,120,175,166,118, 43,168,209,146,167,
+172,143, 38,162,133,247,125, 27,246, 98,244,230,231, 6, 46,222,184, 18,173, 71,143, 30,245, 85,183,100, 33,140, 1, 36,171, 21,
+147, 44,148, 17,207,123,154,140,250,137, 86,138, 52, 30, 21, 39,206, 93, 75, 15, 94,134,210, 24,182,140, 35, 12,161, 80,245,222,
+ 84,191,211, 36,250, 26, 30, 33,165, 70, 93,167,210,209,107,239,165,180,229,232,125,148,251,177,156,118, 3,209, 66, 89, 7, 15,
+ 31,219, 59,127,201,218,239,251, 79,217, 24,129, 0,251, 37,251, 30, 73,150,167, 94,140, 67, 23,182,160, 97,240,151, 28,121, 32,
+ 90,236,157,146,222, 21,219, 78, 61,161, 3, 23, 94, 72,245,236,192, 86,203,153, 91,110,209,242,125,247, 37, 35, 13, 72,167, 54,
+139,150,234,125, 84,249,137,154,235,240, 59,146,164,207, 18,197,114, 99, 44, 97,209,121,165,152, 47, 13,199,181,202, 86,203,175,
+ 14,137,246, 69,165,245, 17,173,164, 73,205, 50,219,216,103, 8,186,112,249, 6,119,182,215,168, 96,231,195, 52,121,227,125, 26,
+ 62,255, 32,199, 99,217,188,177,180, 74,253,220, 58,117,154,107, 41, 82,152, 13,225,187,234,141, 1, 74,145,214, 35,167,173, 75,
+238, 15,235, 15,220,120,115,254,193,199, 55,253, 87, 62,187,172, 74,178, 90,205,186,123, 30, 36, 11, 49, 72,114, 26,150,205,155,
+239,114,214,155, 78, 57,235, 77,163,236,117,166, 80,182, 90,147, 40,173,119,169,143, 24, 25,136,196,163, 59,130,160, 36, 82,226,
+192,120, 36, 30,121,166,215,181,152,154,137, 22,130,152,241, 85,198,233,165,170,187, 48,111,142,140, 27, 58,116,232,208,139,135,
+ 40,183,132,245, 71, 6,209, 74,100,103,103,119,126,250,244,233,159,217, 2, 35,197,248,240, 40, 28,154, 62, 99, 70,100,214, 60,
+ 69,104,232,178,107, 84,170,241, 8,186,251,244, 3, 61,226,209, 94,231,110,188,164,173,199,238,209,242,221, 55, 13, 39, 90,209,
+160,217,123, 20, 62,221,108,212, 65,170, 58, 24,150, 44, 38, 89, 77,199, 71,105, 24, 62,254, 29,196, 74,162,229,228, 89, 32, 24,
+241, 0,112,199,224,193,110, 58,225,156,228, 91,207,218,122, 47,101,107,179,143,254, 27,119,252,135,136, 22,223, 56,129,153,189,
+215,202,166,221, 38, 73,157,215,152,229,254,228, 93,168, 70,132,134, 64, 91, 93,106,144,204,211,211, 51,223,197,139, 23, 11, 50,
+158,190, 12,107,117, 78, 13, 57,213,230,212, 52, 36, 36,164, 21,147, 47,140, 66, 66,108,144,190,225,249,210,125,156,253,154,152,
+100, 46, 80,177, 99,139, 30,163,233,196,149,199,132,125,230,124,149,167,216, 22,239, 36, 5,155,194, 77,136,152, 44,181, 0,120,
+173,101,116,242,242,219,141,120, 44, 47, 38, 89,174,209, 49, 89,236, 66,251, 8, 55,116,241, 94, 71,168,202,224,147,146,219, 4,
+193,231,171, 57,110,129, 99,160, 62,200,209,123,126,145, 94,125, 29,244,133, 9,198, 83,154, 29, 29, 11,177,139,221,134, 7, 46,
+191,166,133,140,103, 51,182, 16,228,239,116,144, 63, 60,206,178,197,208,231,190, 62,153, 60,114,245,189,107,238,138,145,238,121,
+ 43, 69,122,230,175, 76, 53, 57,160,186, 88,173, 46, 84,166, 94, 55, 42,223,184, 55,141, 92,116,156,182, 48,169,227, 57,172, 62,
+177,187, 70, 26, 8,193, 50,117,142,178,201, 82,184, 22,189,226,120, 78,196, 27,186,148, 26, 40,165,224, 79,145, 20, 17, 73,148,
+ 41, 95, 53,106, 55,249, 36, 19,193,107,146,235, 15,241, 90,139,248,107,157,221,138, 26, 99,232, 80,126, 39, 39,167,226,220,158,
+149,211,167, 79, 31, 67,200,217,114,213,160,195,176,101,108,217,123, 69,163, 22,236, 39,187,108, 28,183,162, 18,252,206,100, 60,
+127,177, 98,197, 74,177, 5, 52,175, 62, 12,116,156, 79,192,241, 90,107, 39, 46, 63,134,209,105,112,117,207,147, 35, 11,196,233,
+ 25, 91,168, 71, 47, 60, 32, 97,183,145,201, 11,143,106, 99, 50, 27, 66, 3,103,238,149, 44,112,208,125,144, 44, 4, 9,235, 34,
+ 90,108,169, 42,221,172,211, 16,137, 60, 13,156,184,156, 76,204, 83, 45, 77,157,206,243,124,151,137,123,168, 73,223,133,148,157,
+201, 86,239,233,135,200,197, 43,255,231,246,125,198, 75,249, 70,205,218, 72,166, 86,118, 75,228,234, 62, 92,164,190, 21,155,133,
+161,140, 11,119,220,146, 58,203,124,101,154,134,225,184,156,250, 34,143, 38,162,213,172,251,228,183, 55,159,124,164,157,252,209,
+ 6,235, 61, 92, 95, 85,135,156,164, 12, 69, 58, 6,201, 38, 90,153, 11,125, 14, 11,139,160,150, 61, 39, 69, 20,171,222, 53,188,
+ 89,151,177, 17, 39,175, 60,149, 92,156,107,153,100,193,218,218,159, 63, 6, 97,113,175, 59,234,180,244, 78,181,206,144, 63, 84,
+ 87,185, 53, 17, 45,124,252, 96,208, 10, 92,253,248,136,137, 43,209,234, 53,104,244, 50,184, 11,247,178, 37,107,204,218, 91, 82,
+172, 40,140, 0,112,205,131,100,225, 30,203, 15, 60,102,162, 85, 64,175, 69,203,194, 33,203,190, 7,207,223,115, 93, 95, 75, 94,
+ 36, 24, 59,254, 27,186,137,122,143,223, 64,133,171,119,151,210,184,133,251, 37,146,181,104,239, 83,198,246, 20,202, 45,139, 24,
+129,104, 93,187,113, 99,128,189,135,111,224,241,203,207,121, 84,236, 43,106,207,164, 8,239,123,132,204,116,229,182, 66, 92, 50,
+151, 83,150, 60, 16,173,208, 47, 17,146,149, 25,109,173, 36,134,144, 9,146,137, 24,173,146,189,143,114, 8,206,181, 31, 34, 90,
+104, 87,117,226,133, 67,223, 14,255,223, 82,133,255, 53,197,104, 69, 95,251,157,149, 76, 85,134, 82,150,234, 94, 69,158,166, 56,
+ 77,237, 68, 75,151, 34, 38, 53,179,246,178,181,119, 9, 62,127, 9,100,227,255, 36,107,220,242,211, 28,139,101,247,132,175, 85,
+159, 0, 82,231,243,136,249,157, 82,115, 71,178,104,235,133,192, 99,215,131, 3,250,174,120, 26,139,100,129,112, 53,159,116,245,
+ 34,130, 80,229, 62,216,136,201,130,175, 27, 35, 56, 64,178,118,158,125,201,110,204,215,223,190,202, 57,216,208,179,226,112,233,
+ 24,226, 6,240, 16, 97,200,191, 28,165, 1,209, 66,103, 88,187,117,191, 96,117,119, 97,251,246,237,123,131,100,237,218,181,171,
+229,149, 43, 87, 90, 50,137,210,105,209,226,243,131,103,205,154,245, 73, 98, 88,106,219,148,169,211,169,116,221,174,212,160,239,
+ 10, 26,191, 96, 23,199,103,189,165,131,231, 30, 16, 99, 68, 11,182, 94,142, 51,209,226,151,246,136,178, 45, 39,209,136,213,247,
+169,132, 76,146, 5,204,149, 68, 43, 91,161, 10,215, 86,237, 56, 71,243,118, 62,144,226, 9,240,112,120,183,220, 67, 25,155,238,
+162,146,108,238, 47,217,118,145, 65,174, 67,158,143,168, 10, 91,211,118,179,213,170,150,106,219,242,176,233,158,185, 74, 54, 12,
+ 31,178,248, 28,117,155,114,144,135, 90,103,214, 27,196,170,114, 61,200,147, 25,187, 11, 75, 51,129, 45,193,100,171, 12, 91,179,
+ 42, 49,196,117,249,255, 86,185,115,231, 6,201, 66, 39,161, 12,150,215,170, 86,133,155,174,181,241,109, 51,191,113,201, 86, 51,
+247,128, 92,173,218,118, 84,106, 41,236,241,127,201,214, 51,246, 22,106, 61,191, 89,222,230, 43,211,164, 41, 53,206,180,215,194,
+ 75,253,237, 43, 14,142, 83, 32,170,185, 67,214,143,176,100,161,179, 1,182,120, 9, 33,168,123, 25,119,108, 28,195,240, 65,142,
+238,243,139,244,202,139,183,159,164,209,139, 19, 56,224,116, 48,187,117,187,243, 75,177, 62,143, 24, 44,215,239, 56,249,245, 56,
+ 66,249, 58, 29, 96, 75,239,105, 98, 23,243, 3, 57, 50,149,121, 16,248,126,204,255, 46,117,154,116,144,250,205, 62, 74,163,151,
+156,164,217,235,207,179,107,242,181, 68,180, 56, 62,174, 37, 44,185,156, 95, 39,209,242, 42, 88,131,166,243,168, 59, 16,172,219,
+207, 48, 93,196,103,233,247, 80, 30, 25,151, 49,111, 21, 42,213,106,206,203, 14, 28, 99,136, 64, 89,184, 43,225,254, 99,215,161,
+214,120, 50,182, 8,131, 64,151,225,121,220,234, 57, 56, 56,212,100,226, 85, 3,201, 49,115,225,143,158,121,202, 80, 58,111,191,
+ 8, 87,143,108,141,221,221,221,171, 32,101,202,148,169,114,161, 66,133,106,226, 26, 38, 90, 21, 13,193, 64, 37,111, 66,182, 40,
+ 76,235, 60,100,174,100,225,104,216, 97, 4,241, 68,195,178, 38,117, 4,113, 2,201, 82,183,104,129,100,169, 31,235, 62,121,167,
+ 78,162,149, 50,149,195,190, 29,108,253, 29,191,112, 55, 37,183, 72,131, 57,222, 18, 38, 74,158,178, 78,163,238, 51,105,200,226,
+ 11,212,184,251,100,202, 94,184,188,100,233, 82,146, 44,115,171, 52,203,144, 79,110,189, 83,216,122, 12, 28, 60, 99, 27,119,146,
+ 15, 57, 22,171, 22,123, 44,238, 82,151,113,155, 8,199,229,202, 0,209,194,123,246, 56,135,146, 96,148,246, 46,182,140,182,238,
+ 51, 45, 8,129,246,234, 68, 43, 99,177, 78, 33, 24,200,208,113, 38, 58, 97,221, 49, 90,110,217,138, 62,120, 21,248,150,152,107,
+209,187,144,112, 14,175,248, 72, 71, 56,134, 21,238, 55,116,232,176,184,195, 82,132, 15, 23,116,230,245, 6,109,167,212,238,133,
+ 31,233, 42,183, 38,162, 37, 77,183,193,174, 50,144, 98, 12, 4,137, 11,209,178,178,207, 56,134,173,185,159,246,250, 63,151, 72,
+ 22, 2,223, 37,146,197,150,178,206,209, 36, 11, 97, 24, 32, 35,105,221,117, 19, 45,196, 75,117,236, 51,134,222, 6,127,149,172,
+182,147,121,240, 8, 62, 76,186,205, 57,207,207,229,113, 90,179,255,142, 52,109,200,162,125, 79,169,250,208, 83,228, 90,107, 9,
+101,168, 48,222, 32,162,213,178,211,128,147, 3,167,109, 9,199, 72, 72,140, 56,110,193, 65,235,109, 38,159, 38,191,122, 3, 62,
+101,204, 93, 41,208,206,189,192,171, 52,110,223,205, 61,169, 17,218,116,153, 11,189, 12, 10, 13,151,234,102,159,163,166,212,239,
+226, 99, 10,163,174, 65,180,236,178,213,144,172, 89,176,104, 98,238, 62,185,122,133,124,252, 28,199,117,212, 33,174,195,200, 65,
+213, 81,134,234, 35, 23,245,141, 70, 84, 61, 15,121, 73,180,148, 93,179,235, 80, 91, 69, 77,173,108,125,152,100,133,248, 95,186,
+ 22,139,100,141, 93,118, 58,202,194,202, 22,102, 73, 15, 67, 64, 50,181,205,228,147,138, 59,145,201, 43,142, 7,236,186,240,254,
+ 89,239,101, 79, 47,169, 90,178,254,255,251,161,191,157,135, 95,160,101,250, 28, 19,109,108,188,204,244,221, 3,241, 88, 32, 89,
+255,177, 91, 43,107,205, 9,236,234,122, 41,117, 92,248,106, 0, 27,119, 47, 63, 68, 34, 90,120,153, 15, 90,122, 93, 82, 82, 57,
+ 68,203,198, 45,223,243,122,237, 99,143, 46,132,187, 16,150,172,101,203,150,181,132,203, 12,214, 44, 14,200,110,201, 47,125,157,
+ 68, 11,110, 66, 88,176,212,183,128,128, 0,186,113,227, 6,185,121,100,229,145, 83,151,165, 57,123, 70,206,222,193, 83, 60,220,
+166,195,231, 31,209,210, 29, 87,226, 68,180,204,236, 60,219, 21,175,215,151, 70, 74,238,194,177,176,100, 53,215,135,163,242,188,
+146,104, 33, 24, 62,115,190,242,159, 87, 30,120,200, 15,201, 5,202,217,110, 31,249,180,218, 43,145,172,186, 35,142,147,157, 71,
+209, 79,134, 4,195,123,228, 42, 25,178,227,212, 67, 42, 86,185, 73, 24, 2,249, 85,203,195,195,150,203, 85,109, 49,156,221, 13,
+ 55,200, 53,103,165, 47,114,203, 26,157, 47, 65,202,148, 41,221,186,119,239, 94,145, 73,150,114,200,110,211,209,163, 71, 55,224,
+227, 25,229,144, 44,200, 65,224, 59, 98,178,224, 46,132, 37, 75,117,195,255, 56,142,243,200,103,235,215,179,202,156,109, 87, 31,
+219, 22,239, 83,197,192,178, 74,217, 83, 50,209,130,187, 16, 47, 30,152,212, 97, 49,196, 23,244, 18,184,230,100,198, 64,113, 7,
+112,249,241,171,143,210,151, 60, 72, 74,207,249, 87,164, 23,121, 21,126,217,150,233,123,156,124, 57,238, 37,127,231,131, 84, 99,
+216, 73, 16,173,135,134,148, 19,238, 75,140,124,133,108, 88, 53,208,249,128,100, 97, 68,163, 35, 19, 45,144,172,235,215,175,235,
+ 37, 90,153, 11, 84,167, 9,139, 15, 72,228, 10,163,217, 48,178, 13,191,251, 77,217, 74,110,121, 42, 19, 79, 88,218, 48, 99,137,
+158, 27,202,183,155,255,166,215,188,243, 28,208,126, 27, 68,235,142,182,178,242,188, 75, 53,120,222,182,198,236,122,111, 10,242,
+164, 76, 24,105,134,142, 60,115,158, 82,239, 85,143,135,134,134,150,205,158, 61,123, 35, 76,104,105, 99, 99, 35,197, 46, 25,176,
+ 37, 64,156, 11,143,162,186,217,159,227,201,208,153,245, 31,191,156,221,176, 94,139,229,202, 0,209,194,180, 45,223, 5,190,179,
+ 37, 75,253,216, 12,118,207,235,178,104, 21, 40, 94, 53,100,251,217,215, 84,162,106,211, 40,133,149,149, 50,158, 49, 65, 82,211,
+ 84,119,154,116, 27,207,131, 33, 94,176, 53,243,131, 68,178, 6, 79, 90, 65,230,150,105,182,113, 57,101,147, 44,133,151, 87, 82,
+247,220,101,223, 98,106,140, 14, 67,151,225,189,115,165,229,128, 37,146, 5,197, 57,123,153,183, 56, 47,167,222,154, 70, 29,214,
+109,214,249, 13,136, 81, 12,209,226, 78, 22, 31, 25,246,185,234,188,149, 59,234, 48,181,147,215,152,213, 27,119, 68,126, 9,139,
+146, 72,251, 81,144, 44,182,188, 97,160, 11, 15, 80,146, 44, 69,144, 89,160,203, 65,106,202,164, 38, 95,237,193,145, 76,136,199,
+235, 42,179, 58,209, 98,252, 79,241,136,202,171, 72,108, 69,186,106,158,214,251, 42,142, 65,134, 33, 49, 90,150,233,115,189,223,
+125,150, 73, 86,244,232, 66, 88,135,224,142,196,232,103, 16, 75,124, 20,225,121,135, 53,211, 94, 15,209, 50, 77,147,105,205,165,
+ 91, 79,164,184, 93,196, 61,129, 84, 98,160, 74, 47,142,211,106,195, 22,167,182,211, 46, 82,205, 33,199, 41, 71,147,229,148,161,
+244, 32,114, 45, 59,132,242, 52, 95, 35,155,104,165,178, 73,215,174,126,235,254,161,112, 23, 14,230,190, 17, 56, 54, 25,182,147,
+ 28,188,138,189, 74,229,148,179,163,150,249, 28,181,194,154,222,171,240,229, 39, 1,193,180,134,227,229,142, 95,121,197,100,171,
+198,183,148,253, 91,154,184,238,166,244,156, 55, 25,125,140, 44,156,243, 93,150,163, 83,127,117,158,228, 22, 54,207, 46, 94,190,
+ 38,249,189, 17,147, 5,119,225,216,101,167, 34, 83, 90, 74,211, 55, 24, 68,178, 0, 20, 44, 23,237,134,173, 58,182,253,252,135,
+125, 61, 22, 63,157,211,124,250,131,169,218, 82,181, 1,251, 23,165,203, 94,249, 54,191,212,190,112,156, 86, 40,127, 81, 13,210,
+ 6,182,181, 75,254,247,217,107, 79,146, 72,150, 79,245,113,228, 93,109, 12,101,174, 50, 74,178,100,185, 87, 24, 74, 25, 89,241,
+ 92, 74, 15, 36,167,146,253,200,177, 88,111,178, 47,210,139,248, 26,189, 22, 51,239, 34,117,167,150, 81, 25, 93,168,116, 23,170,
+146, 44,158, 2,161,229,187,119,239, 90,242, 87,181, 78,162,197,231, 95,171,147, 44, 38,104,196, 29, 22,113,108, 17,185,186,103,
+166, 46,252, 16,118,159,123,137,106,247, 88, 74, 69,235, 15, 35,191,186,131,169, 66,203, 9, 6, 19, 45, 38, 89,109,139,213,237,
+ 35,145, 44,191, 90, 61,153,100,121, 96,234, 9,217, 27, 2,251,143, 29, 59, 38,145,200,178, 53,154,110,204,144,189,244,231, 6,
+ 3, 55, 82,135,233,103,169,249,132, 83, 84,186,253, 82,137,100,249,149,175,191, 17,100,115,211,166, 77, 45, 45, 45, 45,245,198,
+168,165,207, 82,228, 1, 2,108,231,173,222,199, 83, 57,120, 30, 50,179,205,212, 6,110,194, 20,182,153, 90, 99,180,204,144, 25,
+155, 36, 66,111,231, 81,228,133,236,194,126,203, 40, 89,171,176,116,196,213,171, 87,171,193,109,120,231,206,157,166,209, 29, 43,
+ 58, 26,189,214, 44, 8,193,232, 66, 85,139,214,202,173,223, 44, 90, 43, 85, 44, 90,249,154,207,105, 99, 95, 98, 96,211,226,213,
+ 91, 69, 96,158, 45,236,109,139,246,174,110,227, 55, 88,239, 7,129,106,157,120,174,184,143, 8, 94, 85,206,255, 4,243, 58,226,
+224, 16,199,101, 43,147,104,113, 7,176,113,217,166,195,210, 68,183, 51,182,221,147,190, 24,225,130,172,196, 95,244,165,216,197,
+ 91,141, 9, 23,166,106, 40,212,106, 37, 91, 9, 61,244, 77, 6, 27, 11,114,107,231, 28,152, 51,232,163,181, 83,246,143,169,210,
+103,251,194,241,109, 95,210,184,230,228,125,206, 47, 60,154,235, 21, 72, 22,220,135,124,145, 78,139, 22,200, 20, 2,236, 49, 77,
+138,210,117,248,224,229, 39,250,240, 49,156, 92,114, 85,146,130,222, 93, 11,180,182, 77, 87,168, 83, 91,167,124, 77, 79,180,110,
+223,238,115,222, 98, 85,240,126,209,181, 37, 99, 29,173,226,235,235, 91, 63, 48, 48,176, 28,136,149,119,222,210,119,220,179, 23,
+125,231,149,183,244, 93, 37,209, 98, 29,174,200,110,198,250,108, 77, 46,194,194,180,125,125,198,220,231,219,148, 14,158,175,121,
+158,172,143,118,174,185,175, 21, 40, 89,247,125,231,129, 83,232,200,229,151, 60,210,235, 61, 13,155,178,146, 82, 58,120,175,230,
+ 11,100,147, 23, 16, 39, 88, 70,190, 11,124,231,175,125,245, 99, 32,181,186,136, 86, 58,183,172,151,214,240,168,210,174, 35,151,
+ 82,210, 20,150, 3, 20, 10, 27,179, 68, 38, 22,179,203, 55,234, 79,133,235, 12,162, 66,101, 27, 80,165,186,173,201, 59,151,111,
+104,146,228, 22, 32, 24,178,203, 41,189,159,121, 73,172, 38,221,167, 74, 86, 69, 88, 99,208,193,122, 23,174,245, 9, 36,190, 82,
+ 43,201, 66, 82,215,192,231, 50, 38,187,147, 71,158, 7,211, 23,111,138, 88,127,248,158, 68,140, 58,112,124,103,193,134,147,195,
+ 45, 28, 13,177,180,122, 37,229,229,151, 66, 30, 60, 13,148, 72, 7,230, 73,195, 51, 51,104, 41,147, 3, 38, 49,152, 51, 15,177,
+163,149,121, 30,184,218, 3,118,144, 85,134,188, 28,159,165,155, 28, 58, 21,110, 55,117,238,166, 43,123,229, 78,239,128,188,184,
+ 70, 31, 14, 60, 98,253,253, 41,126, 46, 17, 55,140,121,222, 64,136,240,126, 71,188,164,146,100,193, 50, 5,162,229,144, 73,183,
+ 69,139,137, 86,224,141,199, 60,178,148, 71,112, 46,231,143,158,169,155,110,211, 16,142,105,108, 51,225, 40, 85,236,186,134,114,
+215,157, 66,153,202, 15,166, 28,117,166, 82,229, 62, 59,169,225,136, 67,228, 93,162, 53, 91, 33, 51,233,157,134, 2,245, 72,105,
+235, 50,125,202,146,189,145,176,150,225,131,175,203,204,243,100,239,233,251,218,220, 62, 19, 38,162, 54,120,227,153,225,199,111,
+221,127, 46, 10,207,252,116, 30,181,124,128,167, 96,217,121,230, 57,109, 58,254,148, 39,209,125, 36,189,227,129, 73,209,230,179,
+163,204,211,229,214, 73,132, 13,190,121,124,188, 32, 69, 74, 27,105, 62, 12,219, 44, 85, 88,169, 95,210,232,197, 39, 35,205, 83,
+ 90,193, 5, 97, 8,201,138, 53,233, 92,211, 25,247,235,182,152,123,191,126,253,105,247,106,203, 73, 85, 71,156,105, 84,105,192,
+193,102, 10,103,103,213,245,245, 98,201,132, 69, 75,147,187, 16,102,107, 12,133, 69, 96,230, 97, 14,106, 7,201,226, 17, 37,146,
+ 57,155, 77,161,186,102,134,143, 89,187,240,219,100,164, 25,246, 21,200,227,185,109,248,240,225,189,121,104,114, 75,144, 16, 38,
+ 71,152,103, 74, 34, 89, 12,145, 54,162, 21, 83, 78, 88,180,148,177, 89, 60,139, 49,241, 48, 90, 98, 89,180,102,205, 26, 90,189,
+122, 53,241,244, 24,225, 5,106,244,163,214, 19, 79, 74, 86, 56,124,173,244,103,165,199, 67,169, 54,234, 80,231, 68,139, 18,201,
+170,195,241, 52, 18,201,234, 5,146, 37,103,166,218, 88, 50, 49, 61, 2, 91,181, 26, 12, 24, 48,160,153,114,154, 7,247, 92,101,
+174,241,196,122,193, 8,126,199, 72, 67, 88,178,182,110,221,218,178,115,231,206,205,145, 23,215,168,233,248,119,229, 4, 89,238,
+ 62,106,165, 52,130,113,245,238,139,212,143,173, 3,181, 90, 13,160,238,163,150,208,204,181,167,165, 1, 1,101,218,205, 71,125,
+181,205,105,163,171,238,146, 11,209,203,203,171, 58,183, 73, 93,140, 60,196,255,156,244,145,172,239,100, 34, 70,203,179, 64,229,
+ 94,170, 49, 90, 94,249,170,204, 68,140, 86,239, 69,151, 6,192,146, 21,123, 82,211,171,143,113, 92,165,254,122, 39,212, 5,209,
+ 90,115,132, 95, 60,156,240,130, 67,172,206,114,222, 3,155, 52,174, 26, 71,245,125, 39,211,210, 50,155, 37, 91,137,199,228, 47,
+ 85,247,235,140, 85, 71,104, 33, 15,151,110,197, 29, 78, 35,182,146,117,153,115,133,106, 15,218, 77,142, 57,171,133,179, 14, 76,
+213, 50,210, 82,111, 57,163,235,212,242,245,235,215, 45,225, 46, 60,114,228,136,100,201,194,255,208,123, 13, 68, 43,150, 76, 75,
+167, 92,199,254,235, 62,145, 78,243, 20, 15,152,190, 36,107,213,145,210, 92, 77,175,131,194,200, 57, 71, 5,229,232,194,116,157,
+234,184,253,119,123, 93,133,157, 23, 87, 86,191, 81,161,156,223, 44, 53,146,160,169,156, 9,152, 72,251,178, 37,185, 49,207,229,
+ 6, 43,102,140,117, 11,191,187,118,237, 90,147, 71, 63, 55, 73,150, 44,153,182,208,134,239,100, 50,201, 10, 68,217, 46,243, 42,
+ 18,152,100, 20,113, 84,215,185,131, 91,180,238, 0, 21, 44, 83, 87,154, 20, 82,207,176,249,239,100,130, 56,193,234,162, 78,170,
+ 22,114, 44,154,250, 49,116,188, 26,136, 86,140, 76, 4,180, 3,203, 57,219,239, 81,211,158, 83,201, 57,115,190,200, 26,173, 71,
+208,160,133,254, 84,190,249, 24, 74,106,158,106, 52,227, 22,231,117, 72,217,219,112,106,252,234, 43, 28,231,117, 0, 31, 66,104,
+ 3, 5,246,173, 71,239,162, 46,211, 57, 84, 36,125, 78,201,178,163,101,211,169, 75,133,124,253,122,151,173,222,228,178,119,158,
+210,129,206,222,190,193,108,245,120,149, 41, 71,209, 75,142, 78,206,189, 13,145,105,106,157,161, 84,174, 34,213,194, 78, 94,126,
+ 44,185, 38, 65, 78, 59,207,190, 36,185,199,107,240,234, 15,205,216,114, 4,189, 79,227,225, 23,150, 34,181,180, 76,152,250, 22,
+ 83,206,232,181, 11,163,204,237, 60,163, 82,123,148,190,174,109,249, 29,229,113,228, 65, 94,110, 35, 78,186,215, 58, 76,197,147,
+144,110, 59,253,130,167,148,121, 41,141,216,195,115,142,129, 30,203, 56, 38,107, 41,147,108,140, 52,199, 64, 21,184,215, 28, 50,
+ 21,212, 57, 97, 41, 98,173, 6,206,216, 69,255, 13, 88, 73,117,123, 46,161,170,157, 22, 80,249,182,115,169, 98,135, 5,212,104,
+208, 70,234, 62,253, 56, 13, 95,113,149,218,143,223, 77, 57,202,180, 33,246, 14, 28,211, 50,207,155,198, 54,226, 80,158, 3,235,
+246, 95,149,230,179,195, 92,116,101, 26, 15,253,106,227,146,167,151, 76,206,242,253,123,158, 39, 25,119,201,230,247,226,200,133,
+ 71,210, 76, 4, 43,121,222, 53,124, 72,194,163,132,132,233, 60,234, 13,222,197, 68, 56,223,115, 45, 19,146,203,188,245, 95,146,
+ 45,169,137,217,157,117, 59, 79, 71, 96,126,154,145, 11,143,133,165, 48,183, 64, 64,173, 33, 36, 11, 72,200,125,153, 27,130,218,
+119, 68,235, 59,119, 33, 91,178, 48,164, 84,213, 93,104,239,215, 83, 34, 89,227,120,242, 52, 93, 68, 75,117,237,194, 34,249, 29,
+247,240,215,115,227,228,201,147,119, 98,171, 77, 67, 36, 76,206, 9,247, 26, 38,207,227, 23,189,148,216,154, 18, 43,238, 40,186,
+ 50, 49,229, 68,140, 22, 79,210,247, 25,238, 67, 94,230,128,120, 90, 2,226, 24, 47,218,184,113, 35,241, 60, 80, 97, 28,123, 50,
+ 18,238, 61, 94,159,239, 73,129,154,253,168,205,164,147,108,221,226,151, 30,127, 1,201, 37, 90,248,226, 44, 90,167,119, 20, 72,
+ 86,209,218,189,163,152,216,180,146, 9,170,166, 54, 74,202,117,206,199,117,172, 63, 97,194, 4,137,112, 33,193,130,133, 52,100,
+200,144, 22,209,245,198, 34,211,154, 92, 10, 26,100,230, 76,194, 38,121,158,223,106, 60,245,157,115, 76,138, 53,152,206,163,143,
+134,178,185,186,241,240,125, 84,176,238,112,178,116,200,186, 93,193,163, 38, 13,125,153,179,123, 40,125,206,156, 57,139,114, 92,
+ 78,123, 94,130, 99, 1,239,219,242,177, 34, 28,163,229, 18, 77,182, 12,234, 32, 64,182, 16,171, 5,119, 33,246,248, 31, 2, 16,
+155, 5,183,161,210,162, 85, 2, 22, 45,118, 31,170,197,106,233,213,121,203,116,217,239, 32,232, 29, 9, 49, 89,112, 23,194,146,
+ 5,146,101,231,150,251,186,174, 14, 66,253, 92,114,123,239,116,236, 34, 89, 92,176, 66,243,200,190, 51,247, 83,207,217,103,200,
+167,116, 91,158, 84, 51,211,106, 29,171, 1, 24,242,108,182,228,229, 77,190, 35, 89,114,136, 22,136, 9, 91,165,155, 91,184, 20,
+124,221,164,203, 56, 58,126,225, 62, 53,235,191,140, 58,142, 92, 71,233,179,149,163,218,197,156,106, 94, 95, 89,102, 89,200,193,
+170,135, 22,245,207, 53,216,212, 52, 41, 8,187,186,245, 73, 43,158,236, 70,244,224, 4,235,101, 51,190,174, 37, 63, 71,205, 56,
+ 46,171,126,138, 20,210,226,238,186,172,140, 26,137, 22, 72,214,166,147,175,216, 82,217,129,154,117, 28,128,213, 25,130,208,169,
+170,187,186,229,234, 39,136, 19, 70,195,169,199, 99, 33,174, 78,253, 24,226,236,116, 17, 45,232,113, 18, 83,235, 69,117,218,141,
+164, 49, 43,175,208,208, 37, 23,168,255,252,115, 84,165,245, 88,142,217,178,195,170, 20,114, 55,141,120,250,248,214,122,135,119,
+ 99,225,234, 93, 56, 6, 45,147, 15,132, 97,159,187,124,123,234,192, 67,243,221,242,212,128, 75, 95,219,128, 18,157, 58,207,131,
+ 17,218,179,190, 12,226,119,159, 52, 59, 60,191, 83, 6,245,237,219,119, 16, 15,106,104,175,163,208, 26,101,154,241, 34,215,246,
+ 30,133, 62,118, 26, 50, 55,114,234,234, 51, 60,237, 12, 19,132, 21,215,168,254,160,109, 84,160,206,176, 72,238,192, 63, 50, 33,
+211, 86, 30,233, 56,214, 41,100,172,121,116,221,183,181, 11,121,134,252,168, 89, 27, 46,236,213,182, 4, 15,206, 33,143,220,181,
+ 14,173,210,231,186,155,214,195,247,173, 99,230, 34,111, 29,189,124,223,166,243, 42,242, 45,121,127,219,243,178,104,156,124,223,
+166,231,189,125,198,188,154,166, 94,137, 41, 63,136,214, 67, 30,109,136,201,132, 47,222,125, 75,135, 47, 62,167,205, 60,101, 11,
+ 62, 78, 91,244,157, 77,185, 74, 53, 38,158,212,251, 30, 44, 88,188, 18,132,159,161,120,242, 7,244,163, 67, 23, 49,245,196,109,
+142,245,188,203,171, 64, 84, 12, 50,192, 93,168, 17,103, 46,115,150,180,238,249,159, 53,232, 56,250,227,212, 53,231,249, 35, 16,
+ 19,151,222,162,214,227, 14, 80,174,202,221, 67, 44,157,114, 63, 67, 30,185, 10, 27,143,243,201, 49,116, 40, 60,146, 36, 53,185,
+110,146,220,236, 94,210,100, 38,152,132,212, 80,146,101,200,203,220, 16, 44, 99, 53,110, 42,151, 60,231,148, 35, 12,149,163, 11,
+121,164, 97, 48, 70, 23, 34, 22, 75,153,224, 46, 4,193, 66,210, 16,216, 23, 35, 83,117,237,194,244,105, 77,134,113,193, 12,158,
+241, 61,186, 50,170,229,148, 70, 29,114,220,208,231, 51,103,206, 16, 47,176, 74, 75,151, 46,165, 86,173, 90,133,241,241, 11,156,
+ 63,122,137,144,156, 73,148,132,171, 96,205,254,212,118,178, 52,122,228,146, 10, 56, 90, 95,104,152, 68,113,248,170,187, 4,178,
+ 5,119,156, 1,128,234,122, 73,166, 96,203,128, 31,199,196,212,225,185,170,154, 78,154, 52,169,165,155,155, 91, 67, 11, 11, 11,
+140,184,208, 21, 8,174, 85, 38, 38, 59,100, 18, 48,218,209,187,248, 69,239, 98, 77, 62, 58,120,151,184,204,110,155,177,112,221,
+232, 41,179,198,243,108,189,114, 99,146,213,159,211, 90,254,125,137,247,183,120,127,138,247,115, 57,181,245,246,246,214,213,126,
+ 90,239, 9, 55,162, 52,143, 22,239,213,203,149,166,104,175,202,176,108, 97,175,161,204,250,234, 97, 64,211,196,100,213, 43, 19,
+ 47, 46,158,143,108,189,185, 93,230, 45,152, 62, 69,198, 77,244,202,132,140,232, 41, 28, 84, 3, 60, 99,126,179,110,168, 79,239,
+160, 69,230,255, 9, 87,165,150,227,169,221,176, 53, 84,180,116,121,250,124,168,218,177,109,227, 11,141,119,115, 72,142, 9,103,
+177,164,146,166, 77, 95, 57, 49,216, 1, 22, 54,196, 96, 97,202,137,108,188,215, 55,194,244,123,162,245,205,117, 24,200, 24,190,
+ 51,181,241,232, 29,189,116,145, 62, 57,170,229,253, 78, 38,136, 19,220, 92,253,103,236,145,172, 23,176,100,129,100, 97, 77,198,
+174, 19,119, 72, 22, 25,124,112,128,100,193, 42,175,135,104,225, 94, 9,146,152, 88, 54,201,152,163,196,157, 2, 21, 90,132,103,
+200, 90,244, 82,162,228, 22,186, 22,102,150,141, 39, 91,175, 6,100,202, 91, 37,200,220, 33,203, 4,213,139, 48, 81,166,115,142,
+202, 31,204, 28,188,226,178, 46,161, 36, 42, 79,158, 60, 85, 57,228, 98, 0,135, 75, 12,226, 9, 60, 7, 45, 88,176, 96, 80,249,
+242,229, 7,112,236, 92, 21, 29,122,170,163,221,221,146, 89,218,251, 76,225,145,178,247,248, 93,255,153,201,213,103,155,140,133,
+238,167,180,207, 50, 93,225,152, 95,155, 30,225, 86,146, 76,172, 83,200,207,203,255,215, 58,228,185,157,120, 4,228, 28,109, 75,
+240,224, 28,230,127,146,187,214,161,140,103, 79, 95,150,152,186, 35,196,130, 63, 80,159,242,253,239, 32, 46,147,211,105, 78,135,
+248, 67,122, 29, 98,113,245,124, 76,233,212, 79,156,228,149, 83,222,195, 0, 1, 55, 44,166,107,178,207, 84,224,131,190,194,169,
+156,215,209, 70,126,137,173,211,103,255, 47,173, 71,225, 61,220, 23,223,181,113,147,210, 30,158,218,134, 23, 78,151, 63,161,170,
+ 1,101,249, 19,179, 98, 9, 65, 89,100,235, 71, 11,175,239, 37, 25, 23,249, 63, 85,166,167,107,138, 42,165,138,184,108,114,115,
+ 50,133, 89, 91,117,237, 66, 67,203,170, 94, 78,144,173,193,108, 37,186,207,196, 37, 16,238, 68,252,207, 66, 53, 44,254, 27, 67,
+184, 48,219,239, 10, 57,138,141,145, 80,169, 93,114, 29,228,120,156, 38, 6, 22, 84, 14,158,150,220,169, 22,143,142,123,178,148,
+ 33, 95,142, 76, 25, 98, 98,101,209, 42, 83,105,209,226,125, 93, 78,109, 56, 85,231,228, 27, 87,139, 22,238,138, 81,136,202,153,
+225,213, 11,234, 88,115, 98,242, 62,139,181,142, 58,252,165,117, 55, 20, 68, 57,186,244,243,100, 70, 19,174, 12, 5, 3,170,151,
+203,113,223, 55,171,109, 41,190,151,166,133,185,245,118, 16,170, 25,146, 38, 77,138,121,162, 90, 70,239,229, 20,255,151,180, 17,
+166, 83, 1,121,146,155, 52, 76,191,242, 75,202, 41, 7, 48, 61,121,244,149, 51, 81,214,172, 89,139,242,243,216,132, 63,130,218,
+177,139,191, 9,175,169,234,171,249,221, 23,115, 39,125, 50,227, 82,236,255, 19, 24, 94,175,144,215, 45,140, 66, 82, 91,187, 80,
+163, 92,228,209,146,255,167,150, 51, 46,149,212,114,141,198,114,218,184,228,190,157,150,167,152,192,232, 71, 38, 89,239,237, 92,
+243,220, 54,224,158, 63,163,238, 6,220, 94,100, 85, 34,240, 51, 26, 66,200, 52,174,126, 9, 60, 5,158,198, 66,192, 16, 93,146,
+ 27,172,109,136, 76,185,245, 16, 50,229, 34, 37, 47, 95,188,196, 19, 86, 75, 29,139,174,127, 87,115, 45,249,227,101,221,229, 53,
+171,222, 92, 63,163,238,122,111,250, 7,103,208,100,249,255, 37,197,253, 25, 13, 33,100, 26,183,233, 4,158, 2, 79, 99, 33, 32,
+116,201, 88, 72,126,147, 35,240, 20,120, 26, 11,129,248,162, 75,198,170,239, 31, 39, 7, 13,160, 41, 25, 82, 80,109, 50,116, 29,
+215, 39, 95,200,212,220, 46,113,109, 47,129,167,192, 83,174, 14,136,103, 83, 59, 2,114, 49, 84,205, 39,240, 20,120,106, 66,224,
+ 95,214, 37, 37, 30,113,237,207,244, 61, 83,191,227,188,186, 69, 11, 49, 90,191,100,139, 47, 44, 90,148,211,184,234, 32,240, 20,
+120, 26, 11, 1,161, 75,198, 66, 82, 88,201,132, 46,253,249,186,100,220, 18,254, 94,105,191, 36, 16, 94,152,190,141,223,200,226,
+ 69, 97, 92, 76, 5,158, 2, 79, 99, 33, 32,116,201, 88, 72, 10, 66,248, 47,235,146,113,181,232,247, 74, 19, 68, 75, 13,255,127,
+ 89,177, 69,221,141,251, 48, 10, 60, 5,158,198, 66, 64,232,146,177,144, 20,228, 45,190,232,146,113, 91,252,215, 74, 19,174, 67,
+ 61,120,199, 23, 37, 20,229, 52,238,131, 35,240, 20,120, 26, 11, 1,161, 75,198, 66, 82,144,162,127, 89,151,140,171, 69,255,136,
+180,127, 89, 97, 68,221,141,171,228, 2, 79,129,167,177, 16, 16,186,100, 44, 36, 5, 41, 18,186,100, 92, 93,138,207,210,148,174,
+ 66,229, 68,165,194,117, 40, 92,135, 49, 8,136, 23,133,113, 31,109,129,167,192,211, 88, 8, 8, 93, 50, 22,146,130, 16,198, 23,
+ 93, 50,110,139,255, 90,105,234,196, 42,246,255,188,254,148,114,129, 87,133,234,239, 95, 91, 70,113, 55,129,128, 64, 64, 32, 32,
+ 16, 16, 8, 8, 4,254, 85, 4,226, 57, 23, 81,181,100,129,100,197,158,222, 1,149, 83, 86, 80, 16,173,127, 85,197, 69,189, 5,
+ 2, 2, 1,129,128, 64, 64, 32,240,251, 16,248,171,185,136, 42,201, 18, 68,235,247, 41,153,184,179, 64, 64, 32, 32, 16, 16, 8,
+ 8, 4,254, 85, 4,254,106, 46, 18,207,205,117,255,170, 78,138,122, 11, 4, 4, 2, 2, 1,129,128, 64,224,175, 65,224,175,230,
+ 34,127,117,229,254, 26, 21, 20, 21, 17, 8, 8, 4, 4, 2, 2, 1,129,192,223,139, 64, 60,231, 34,186, 99,180,254,222,102, 19,
+ 53, 19, 8, 8, 4, 4, 2, 2, 1,129,128, 64, 64, 32,240,211, 17,208, 61,234,240,167,223, 94,220, 64, 32, 32, 16, 16, 8, 8,
+ 4, 4, 2, 2, 1,129,192,223,139,128,250,204,240,191,108, 30,173,191, 23, 82, 81, 51,129,128, 64, 64, 32, 32, 16, 16, 8, 8,
+ 4, 4, 2,191, 25,129,248, 50, 73,154, 40,167,113, 21, 69,224, 41,240, 52, 22, 2, 66,151,140,133,228, 55, 57, 2, 79,129,167,
+177, 16,248, 25,186,100,172,178,253, 14, 57,202, 24, 45,220,251,251,121,180,126, 98,137,126, 70, 67, 8,153,198,109, 48,129,167,
+192,211, 88, 8, 8, 93, 50, 22,146,130, 20, 9, 93,250, 55,117,201,184,181,254,181,210,148,174, 66,245,253, 79, 47,133,120, 88,
+140, 11,177,192, 83,224,105, 44, 4,132, 46, 25, 11, 73, 65,138,132, 46, 9, 93, 50, 46, 2,241, 83,218,111, 11,134, 23, 15,160,
+113, 21, 70,224, 41,240, 52, 22, 2, 66,151,140,133,164, 32, 90, 66,151,132, 46, 25, 23, 1, 33,205, 32, 4,196, 3,104, 16, 92,
+122, 51, 11, 60,245, 66,100, 80, 6,129,167, 65,112,233,205, 44,240,212, 11,145, 65, 25, 4,158, 6,193,165, 55,179,192, 83, 47,
+ 68, 6,101,248, 25,120, 26, 84, 0,145, 89,124,229,253, 12, 37, 20, 50,141,251,100, 9, 60, 5,158,198, 66, 64,232,146,177,144,
+ 20,125,199,191,172, 75,198,213,162, 63, 72, 26, 26, 85, 83, 50,164,136,218,100,232, 58,174, 79,190,144,169,185, 93,226,218, 94,
+ 2, 79,129,167, 92, 29, 16,207,166,118, 4,228, 98,168,154, 79,224, 41,240,212,132,192,191,172, 75, 74, 60,226,218,159,233,123,
+166,126,199,121,229,168, 67,213, 25,226,127, 73, 57,254,101,102, 46,234,110, 92, 21, 19,120, 10, 60,141,133,128,208, 37, 99, 33,
+ 41,172, 79, 66,151,140,171, 75,241, 89,218, 47, 31,109,168,202, 86,141, 13,156, 80,108,227, 34, 42,240, 20,120, 26, 11, 1,161,
+ 75,198, 66, 82, 16, 24,161, 75,255,166, 46, 25,183,214,191, 86,218,111,155, 25, 94, 60, 44,198,109,104,129,167,192,211, 88, 8,
+ 8, 93, 50, 22,146,130, 20, 9, 93, 18,186,100, 92, 4,132, 52,131, 16, 16, 15,160, 65,112,233,205, 44,240,212, 11,145, 65, 25,
+ 4,158, 6,193,165, 55,179,192, 83, 47, 68, 6,101, 16,120, 26, 4,151,222,204, 2, 79,189, 16, 25,148,225,103,224,105, 80, 1,
+254,176,204, 98, 30, 45, 61, 13,242, 51, 20, 70,200, 52,238, 83, 32,240, 20,120, 26, 11, 1,161, 75,198, 66, 82, 88,243,132, 46,
+ 25, 87,151,226,179, 52, 49, 51,188, 32, 90, 90, 17, 16, 47, 10,227, 62,218, 2, 79,129,167,177, 16, 16,186,100, 44, 36, 5, 33,
+140, 47,186,100,220, 22,255,181,210,244,199,104,109,219,182,141,126,109,153,196,221, 4, 2, 2, 1,129,128, 64, 64, 32, 32, 16,
+ 16, 8,252, 31,129,191,150,139, 40, 43,246,215, 86, 80,104,177, 64, 64, 32, 32, 16, 16, 8, 8, 4, 4, 2,127, 52, 2,241,156,
+139,168,206,159, 5,235, 22,254,255,158, 65, 10,162,245, 71,235,160, 40,156, 64, 64, 32, 32, 16, 16, 8, 8, 4,254, 90, 4,226,
+ 57,209,210, 29, 12, 31,207, 43,247,215, 42,157,168,152, 64, 64, 32, 32, 16, 16, 8, 8, 4,254, 21, 4,226, 57, 23, 17, 49, 90,
+255,138,162,138,122, 10, 4, 4, 2, 2, 1,129,128, 64, 32,190, 34, 32, 60,107,241,181,229, 68,185, 5, 2, 2, 1,129,128, 64,
+ 64, 32, 32, 16, 16, 8,252, 60, 4,244, 91,180,126,222,189,133,100,129,128, 64, 64, 32, 32, 16, 16, 8, 8, 4, 4, 2,255, 4,
+ 2,234,177, 90,255, 68,165, 69, 37, 5, 2, 2, 1,129,128, 64, 64, 32, 32, 16, 16, 8,252,108, 4,126, 11,201,138, 47,147,164,
+137,114, 26, 87,253, 4,158, 2, 79, 99, 33, 32,116,201, 88, 72,126,147, 35,240, 20,120, 26, 11,129,159,161, 75,198, 42,219,239,
+144,243,219, 92,135, 63,163, 33,132, 76,227,170,144,192, 83,224,105, 44, 4,132, 46, 25, 11, 73, 65,138,132, 46,253,155,186,100,
+220, 90,255, 35,210,196,195, 98,220,134, 22,120, 10, 60,141,133,128,208, 37, 99, 33, 41, 72,145,208, 37,161, 75,198, 69, 32,126,
+ 74, 19,139, 74,235,105, 55,241,162, 48,174, 98, 11, 60, 5,158,198, 66, 64,232,146,177,144, 20,132, 80,232,210,159,175, 75,198,
+ 45,225,175,149, 38, 22,149, 22, 68, 75, 43, 2,226,229, 99,220,135, 81,224, 41,240, 52, 22, 2, 66,151,140,133,164, 32,153,241,
+ 69,151,140,219,226,191, 86,154,136,209, 18, 68, 75, 16, 45, 13, 8,196,151,151,143, 40,167,113, 95,152, 2, 79,129,167,177, 16,
+ 16,186,100, 44, 36,255,114, 57, 80, 20, 77,201,144,106,107,147,161,235,184, 62,249, 66,166,230,118,137,107,123, 9, 60, 5,158,
+114,117, 64, 60,155,218, 17,144,139,161,106, 62,129,167,192, 83, 19, 2,255,178, 46, 41,241,136,107,127,166,239,153,250, 19,206,
+255,178,169, 30, 4,219, 55,110,115, 11, 60, 5,158,198, 66, 64,232,146,177,144, 20,110, 41,161, 75, 66,151,140,139,192,223, 33,
+ 77, 16, 45,181,118, 20, 47, 10,227, 42,182,192, 83,224,105, 44, 4,132, 46, 25, 11, 73, 65, 8,133, 46,253,249,186,100,220, 18,
+254, 90,105, 34, 70, 75, 15,222,226, 1, 52,174, 66, 10, 60, 5,158,198, 66, 64,232,146,177,144, 20, 68, 75,232,210,159,175, 75,
+198, 45,225, 63, 34, 77, 40,182,113, 27, 90,224, 41,240, 52, 22, 2, 66,151,140,133,164, 32, 48, 66,151,132, 46, 25, 23,129,248,
+ 41,205,158,139, 13,171,150,114,159,243, 87, 85, 67, 60,128,198, 69, 90,224, 41,240, 52, 22, 2, 66,151,140,133,164, 32, 90, 66,
+151,132, 46, 25, 23,129,248, 41, 77,204,163, 37, 92,135, 90, 17, 16, 47, 73,227, 62,212, 2, 79,129,167,177, 16, 16,186,100, 44,
+ 36, 5, 25,142, 47,186,100,220, 22,255,181,210,116,199,104,109,219,182,141,162,147,223,175, 45,151,184,155, 64, 64, 32, 32, 16,
+ 16, 8, 8, 4, 4, 2, 2, 1,133,226,175,230, 34,168, 28, 26, 89,185, 23, 13, 46, 16, 16, 8, 8, 4, 4, 2, 2, 1,129,128,
+ 64,224, 87, 34,240, 87,115,145,191,154, 69,254, 74, 45, 17,247, 18, 8, 8, 4, 4, 2, 2, 1,129,128, 64, 32, 78, 8,252,213,
+ 92, 68, 88,178,226,164, 19,226, 34,129,128, 64, 64, 32, 32, 16, 16, 8, 8, 4,140,132, 64, 60,231, 34,234,163, 14, 99, 79, 88,
+ 26,207, 43,103,164, 38, 22, 98, 4, 2, 2, 1,129,128, 64, 64, 32, 32, 16,248, 93, 8,196,115, 46,162, 62,234,240,119,193, 40,
+238, 43, 16, 16, 8, 8, 4, 4, 2, 2, 1,129,128, 64,224,175, 67,224,183,205, 12,255,215, 33, 41, 42, 36, 16, 16, 8, 8, 4,
+ 4, 2, 2, 1,129,128, 64, 64, 32, 32, 16, 16, 8, 8, 4, 4, 2, 2, 1,129,128, 64, 64, 32,240,235, 16, 80,181,106,253,178,
+187,198,151, 73,210, 68, 57,141,171, 18, 2, 79,129,167,177, 16, 16,186,100, 44, 36,191,201, 17,120, 10, 60,141,133,192,207,208,
+ 37, 99,149,237,119,200,137, 29,252,254,109, 57,158, 95,178,253,140,134, 16, 50,141,219,116, 2, 79,129,167,177, 16, 16,186,100,
+ 44, 36, 5, 41, 18,186,244,111,234,146,113,107,253,107,165, 9,162,165, 7,111,241, 80, 27, 87, 33, 5,158, 2, 79, 99, 33, 32,
+116,201, 88, 72, 10,242, 38,116,233,207,215, 37,227,150,240,215, 75, 19,174, 67, 29,152,139, 7,208,184, 10, 41,240, 20,120, 26,
+ 11, 1,161, 75,198, 66, 82, 16, 45,161, 75,127,190, 46, 25,183,132,255,136, 52,161,216,198,109,104,129,167,192,211, 88, 8, 8,
+ 93, 50, 22,146,130,192, 8, 93, 18,186,100, 92, 4,226,167,180, 95, 22,147,165, 14,143,120, 0,141,171, 48, 2, 79,129,167,177,
+ 16, 16,186,100, 44, 36, 5,209, 18,186, 36,116,201,184, 8,196, 79,105, 58, 39, 44,197, 67,162, 41, 25, 82, 85,109, 50,116, 29,
+215, 39, 95,200,212,220, 46,113,109, 47,129,167,192, 83,174, 14,136,103, 83, 59, 2,114, 49, 84,205, 39,240, 20,120,106, 66,224,
+ 95,214, 37, 37, 30,113,237,207,244, 61, 83,191,227,252,111,155,176, 84,124,233, 24,183,185, 5,158, 2, 79, 99, 33, 32,116,201,
+ 88, 72, 10,139,150,208, 37,161, 75,198, 69, 64, 72, 51, 8, 1,241, 0, 26, 4,151,222,204, 2, 79,189, 16, 25,148, 65,224,105,
+ 16, 92,122, 51, 11, 60,245, 66,100, 80, 6,129,167, 65,112,233,205, 44,240,212, 11,145, 65, 25,126, 6,158, 6, 21,224,111,204,
+108,155, 56,113,226,190, 41, 82,164,152,201,105, 14,255, 30,207,149,180,214, 83,209,239, 26,194,204,204,172, 99,218,180,105,111,
+112,122,154, 62,125,250, 29, 41, 83,154,118,118, 51, 81, 20, 97, 57, 73,100,130,166,171,113, 19,178, 12, 79, 78,157,185,140,215,
+147, 39, 79,254,144,127, 47,195,255,156,108,116,200,215,171, 48,195, 28, 20, 53,174,116,170,178, 9,123, 53, 57, 21,236,236,236,
+142,242,177,210,106,199,245,202,212, 86,158,186,166,138,146, 53,205, 20,143,145,240, 91, 37,159, 65, 50, 83,166, 76,217,208,222,
+222,254,100,234,212,169,159,241,254, 56,227, 81, 83,195, 61,117,201, 76,195,117, 27,231,228,228,116,203,193,193, 97, 50, 95,139,
+213,201,229,108, 6,149, 83,142, 64,206,163, 87,166,175,137,194, 55,191,137, 34,176, 64, 50, 69,112,161,100,138,153,188, 47, 85,
+ 74,161, 48,141, 99,187, 23,230,235,214, 89, 88, 88, 92, 96, 93,223,198,191,171,115,130,126, 85,199,255, 56,142,243,156,144, 79,
+117,211, 91,206,104, 57,227,120,255,140,211,200,232,255, 59, 48,206,193,217,178,101,123,200,105,145,187,187,123, 35,185,237,110,
+106,106, 90,138,175, 93,207,207,211,195, 2, 5, 10,188,117,116,116,188,153, 46, 93,186,197, 38, 38, 38, 69,227, 88,119,153, 77,
+242, 93, 54, 57,117, 55, 84,182,144,105, 40, 98,186,243, 11, 60, 5,158,198, 66,224,103,232,146,177,202, 22,239,228, 84,226, 18,
+143,226, 52,237,210,165, 75,254, 68, 36, 37,252,230, 99, 51, 57,141,214,209, 9,198,106, 8,238,240,135, 12, 31, 62,252,243,139,
+ 23, 47, 40, 48, 48,144,110,221,186, 69,147,250,247,138, 42,147, 42, 49,185,217, 90,135, 50, 25,184,235,156, 46,221,170, 44,230,
+ 9,123,177,204,140, 90,144,210,214,184,214, 76,174, 78,247,239,223, 63,228,232,209,163, 33, 95,191,126, 13,137,138,138, 10,121,
+254,252,121,200,190,125,251, 66, 10, 21, 42, 20,194,242,186,112, 74,164, 65,174, 94,133, 25,234,160, 56, 76, 11, 6, 16,246,170,
+215,103,206,156,249, 26,223,135,106,212,168,241,133,143, 59,202,237, 28, 53,213,141, 47, 78,158,197, 66, 97, 85,211, 92, 17, 16,
+177,120, 24,209,140,238, 4,178, 21, 23,153,105,210,164,217,220,177, 99,199,160,103,207,158,209,151, 47, 95,232,241,227,199,212,
+170, 85,171, 15,124,124,185,218,189,181,213, 61,117,214,172, 89, 3, 78,158, 60, 25,245,254,253,123, 58,116,232, 80,148,143,143,
+ 79, 0, 95, 43,135,108,197,146,201,247,156,203, 68,109,135, 33,137,175,153, 47,179,156, 49,217,242,153, 40, 30,135,249, 31, 36,
+ 58,187,135,182,212, 40, 64,147,114,167,163,234,169,146,189, 47,156, 76,209,193, 79,161, 72,108, 64,187,215,242,243,243,251,120,
+249,242,229,200, 55,111,222,208,181,107,215,162, 90,180,104,241,153,175,191,138, 61,254,199,113,156, 71, 62, 62,222,220,128, 54,
+ 2, 89, 91, 56,120,240, 96,126,140,136,248,121, 32, 38, 86, 84,188,120,113, 10, 9, 9,193,161,135,156, 22, 69, 68, 68, 52,145,
+ 35,211,210,210,178, 33,183,115, 72,104,104,168, 36, 15, 27,244, 17,109, 54,109,218,180,143,252, 65,179,131,229,104,250,200,208,
+171,243,113,120, 83, 9,153,113, 0, 77,199, 37, 2, 79,129,167,177, 16,136, 47,186,100,172,250,254, 14, 57,232, 27, 85,227,180,
+228,244,149, 82, 57,235,245,234,213, 75, 73,170,118, 22, 46, 92,248, 76,147, 38, 77,252,145,248,247, 33, 62,191,251,220,185,115,
+254, 61,123,246, 4,233,170,167,167, 35,179, 46, 88,176,224,251,151, 47, 95, 82,166, 76,153, 40, 67,134, 12,132,223,216,206,214,
+202, 69,251,189, 20,244,228,200, 78,218,179,113, 29,181,176, 79, 76,190,246,150,225,246,105,211,190,177,177,177, 25,193,114, 19,
+232,233,116,170,121,121,121, 5, 95,189,122, 53,228,246,237,219, 33, 67,134, 12, 9,225,142, 43,132,137, 66, 72,245,234,213, 67,
+166, 78,157, 26, 18, 22, 22, 22, 50,127,254,252, 16,182, 68, 92,101, 89,234,100, 75,175, 18,106, 35, 90,108,221,152,194,164,147,
+238,222,189, 75, 44, 23, 86, 10,229,166, 46,211,210,202,202,170,172,181,181,117, 23,236, 57,147, 37, 50,102, 82, 40,204,179, 91,
+ 42,210,119,200,238,150,121, 91,189,146, 25,167,149,204,147,171,102,202,132,239,195,167,119, 39,170,145, 62, 78, 68, 11,157,111,
+231,206,157,131, 65,176,208, 1,163, 3,199, 62, 56, 56,152,234,213,171, 23,196,150,173,106,250, 58,113,198,125,216,145, 35, 71,
+ 34,208, 70,188,167, 29, 59,118,208,140, 25, 51,162,152, 0, 77,148,161,193,177,234,206,157,253,222, 61,123,246,248,159, 63,127,
+222,255,244,233,211,254,225,225,225,254,220, 30, 82,218,182,109,155,255,134, 13, 27,252, 87,175, 94,237,207,228, 88, 74, 92,110,
+127, 87, 87,215, 93,106,247,209,219, 70,121, 77, 20, 79,190, 30,221, 66, 52,177, 29,125, 24,211,134,222,119, 45, 79,175, 90, 21,
+161,153,121,210, 81,145, 20,138,173,106,122, 4,241, 26,101, 38, 73,146,228,240,195,135, 15,163,250,244,233,243,213,219,219,251,
+ 67,179,102,205, 62, 3, 75,108,216,227,127, 28,199,249, 7, 15, 30, 68,177, 14,236,211,135,167,202,249,209, 74,146,117,248,240,
+225, 24,114,132, 31,104, 39,214, 91,201,162,229,226,226, 82, 95,159, 76,115,115,243, 42,189,123,247,150,216,153,250,198, 24, 75,
+237,141,242,241,179,246,156,101,165, 54, 20, 79, 25,237,172,158, 69,111, 27, 9,153, 6, 33, 32,240, 52, 8, 46,189,153, 5,158,
+122, 33, 50, 40,195,207,192,211,160, 2,252, 97,153,227, 52, 51,124, 73, 16, 40, 88,175,250,245,235, 7, 34, 5,203, 86, 82, 78,
+230,209, 9, 22,130,186,252,162,151,242,128,144, 69,231, 81,173,187,106, 67, 84, 90,187,118,109,216,228,201,147,137,221, 81,196,
+157, 47, 77,153, 50, 69,250,250,126,185,109,185, 68,180,174,247,109, 44,245, 23,183, 70,180,151,254,191, 55,107, 40, 53,104,208,
+ 32,148, 93, 35,170, 36, 78,189,113, 83,229,202,149, 43,248,211,167, 79, 33,139, 23, 47, 14,225,188,103,185, 0,222,156,146, 68,
+119,172, 40,111, 35,238, 24,131,174, 92,185, 18,178,114,229, 74, 88,182,134,200,236,116, 96, 85, 43,198,238,206,234,189, 29,147,
+220,134, 69,171,183,157,226, 50, 31,243,225,100, 27, 45,195,129,235, 46,149,155,221, 55, 71,180,116,142,150, 76,250,122, 49, 9,
+ 28,196, 29,224, 32, 38, 28,131, 60, 60, 60,250, 84,118,181, 47,176,169, 94,169,156, 31,134,182,201, 73, 19,186,102, 29, 95, 46,
+111,201, 85,117,138,214,107,234, 98,115,180, 89,154,228,161,181, 45, 19, 5,199,197,117,200,174,163,211,176, 96, 41,201, 21, 58,
+ 92, 88,182,238,223,191, 79,108,237, 35,182, 28,238,215,215,137,115,251, 92,131,140, 89,147, 38, 81, 13,159,204, 84,196, 42, 37,
+249, 89,167,164,220,230,201, 63,122, 41, 20,185,245, 40,248,119, 68,235,194,133, 11,208, 15, 41,177, 53, 72, 74,239,222,189,139,
+ 57,134,227, 31, 62,124,144, 18,200,150,155,155,155,193, 68,171, 80,114, 69,161,124,201, 21,111, 11,152, 40, 62, 85,114,180,121,
+222,198,213, 38,242, 84,189, 2,244,174, 93,113,154,156,211,145, 96,217,146,217,238,149,146, 37, 75,134, 15,137,238,156, 64,202,
+ 27,151, 45, 91, 86, 50, 25, 97,143,255,163,143,119,142, 38, 89, 32,206,202, 77,215,203, 39, 33,187, 4, 63, 66, 14, 44, 89,124,
+193, 9,252, 15,139, 22, 18, 92,135,209,178,213,225,213, 40, 51, 99,198,140,183, 88,239, 99, 8, 32,172, 88,108,193,165,123,247,
+238, 17,127,116,208,217,179,103,137, 9, 35,173, 89,179, 38,146,201,253,118,153,117,215,211,180, 58, 79,255,140, 23,175,144,249,
+ 35, 45,242,253,181, 2, 79,129,167,177, 16,248, 25,186,100,172,178,253, 14, 57,250, 71, 29,178,101, 1, 47,126,213,109, 12,172,
+ 85, 32, 82,124, 80,215, 68, 92, 45, 65,196,162, 93,137,112, 49,106,220,184,243,159, 15, 87, 97,227,198,141,201,211,211, 83, 74,
+108, 25, 35,238, 88, 41,228,206, 21,137, 88,157,173,157, 91,234, 52,130,175,159,151,254,247,111, 80,144, 46, 94,188, 72, 28,111,
+178, 71, 7,106, 91,143, 31, 63, 30,184,124,249,242,151,156, 7,241, 88, 32, 88,249, 57, 77, 97, 87,226, 66,222,195, 93,152,129,
+147, 53, 91,210,222, 50,249, 8, 97, 55, 31,200, 86,122, 29, 50,253,184,124,119,217, 2, 70,175, 94,189,162,183,111,223,210,216,
+ 66, 30, 4,162, 53, 60,119,134,168, 89,179,102,125,233,222,189,251,199, 84,169, 82, 33,118,199,129,229, 69,160,220, 69,138, 20,
+129,107,237,187, 13, 22, 44,144,172,207,159, 63, 15,226,206,112, 16,203, 27,180,101,211,166, 65,101,124, 60, 26,131,100,129,108,
+149,115,180,174, 62,177,116,158,214,207,250, 52,175,209,175,160,247,245,207,163, 59, 29,172,229,106,167,106, 33,147,173, 56,182,
+182,182, 47, 96,121,225, 11,190, 75,176,188,177, 11, 87,213, 29,169, 81, 46,215,173, 95,231,186,117, 34,171,101,112,164,187,147,
+251, 83,248,222,149, 20,190, 99, 49,221, 25,211,149, 42,167,181, 9,202,159, 52, 97,111,185, 5,130, 69, 11,150, 44,206, 31, 67,
+180, 64,178, 52, 17,173,160,160, 32,137,104, 49, 1, 81, 39, 90,114,111, 23,147, 47,127, 50,133,155, 95,138, 68,103,207, 55,246,
+165,192, 54,197,169,172,101, 18,196,236,197,117,171,203, 23,130,124, 53, 48, 80, 0, 92,133,163,149,132,106,204,152, 49,146,142,
+227,127, 62,142,115,113,221, 44,217,109,125,191,121,243,230, 17,108,205,125,197,174,241,247,103,206,156, 33, 88,201, 96,125, 92,
+183,110, 29,241,135,133, 68,176,241,220, 85,168, 80,225, 61,223,200, 47,174, 55, 19,215, 9, 4, 4, 2, 2,129, 95,129,128, 6,
+ 46,242, 43,110,251,243,239,161,172,152, 74, 5, 45,249,174, 83, 57,237,228,132, 14, 6, 91,130,172,137, 20,181,138,167, 72,124,
+ 17, 9,191,113, 44,250, 92,101,222,195, 53, 51,133, 83, 90, 77, 37,230,248,156, 59,136,107,225,152, 22,202,159, 63,191,148,138,
+ 22, 45, 42,197,146,188,191,125,133,118,101, 86,208,209,170, 89, 37, 43,204,171,171,254,180,213, 83, 65, 7, 42,251, 80, 64, 64,
+ 0,177,187,234,190, 22, 20,178,215,174, 93,251, 6,187, 92,174,177,149, 6,157,120, 50, 78,203,254,251,239,191,144, 19, 39, 78,
+ 28,142,140,140, 28,199, 95,246,173, 57,182,168, 45, 31,103, 67,140,162,220,232,209,163, 67,184,158, 32, 90,176, 74,104,218,124,
+184, 83, 10,133,235, 5,100,133, 93, 90, 4,139, 85,143, 76,169,162, 64,180,250,103, 73, 27, 57,125,250,244,224, 77,155, 54,189,
+ 91,182,108, 89, 32,147,171,167, 74,139, 22,147, 73, 4,197,127,183,193, 93,200,228, 65, 34, 89, 32, 92, 28,239, 36, 37,187, 84,
+169,122,193,109,232,153, 92,145,111, 89,245,162, 45,217,170,213,164,109, 14,215,126,171,106,149,120,251, 97,104,219,155, 62,201,
+165, 32,126,131, 55, 46,199,169,167, 79,159, 18,223,147, 96,241, 96,242, 66,192,254,245,235,215, 82, 71,172,102,209,210, 40,223,
+ 69,161, 40, 84, 49,157, 93, 84,248,158, 21, 68,227,219, 16,181,204, 75,212, 34, 15,209,208, 6, 20, 48,163, 63,229,176,183,251,
+ 98,145, 50,229, 59, 38,145,115, 89,128,187,174, 66,130,104,193, 93,168,180,100,113,222, 24,210,197,152, 72, 86, 44, 16, 44,110,
+103,127,118,153,249,207,155, 55,207, 40, 68, 11,101, 42,148, 66,145,115, 84, 30, 87,250,208,163, 50,181,119,177,166, 60,230,138,
+ 84, 58,202, 90,156,221,134,107,153,100,130,216,183,227,100,134, 61,254,199,113,254, 93,220,224,198, 96,146,165,116, 21, 42,221,
+123,248,159,229, 32,182, 81,185,181,101,242,187, 45, 97,194,132,243,248, 64,121, 78,101,185,141, 74,232,185, 87,211,133, 11, 23,
+ 94,155, 61,123,246, 53,206, 87,128,147, 27, 92,243,108,213,165, 9, 19, 38, 16,235,191,244, 17,115,243,230, 77,226, 56, 59, 90,
+176, 96, 1,177,219, 28,109, 37, 54,129,128, 64, 64, 32,240, 71, 34,160,129,139,252,145,229,212, 82, 40,221,174, 67,245,202,177,
+251,109,178, 63,111,236,206,216,203, 2,165,175,110, 16,171,193,190, 57, 62, 6, 47,159, 64, 31,230, 14,166, 94, 57, 51,125,140,
+ 38, 91, 56,157, 48,119,238,220,199,113, 13,143,116,194, 40,170,239, 54, 38, 90,183,209,217, 87,171, 86, 13,238, 23, 42, 87,174,
+ 28,113,252,148,100, 45,122,114,225, 12,173,203,164,160,237,101, 60, 36,215,199,221,211,199,104,165,187,130, 54,151,246,144,220,
+ 32,220, 1,223,211, 82,177,174, 28,232,126,120,228,200,145, 7,248,124, 77, 78,185,217, 98,134,192,224,144,161, 67,135,238, 42,
+227,238,178,168,142, 85,146,215,245, 82,155,188,242, 76,162,152,204,231, 77,249,222, 33,108, 73, 9, 73,144, 32,129, 70,139, 9,
+ 91,193,142, 35, 86,134, 93, 93,176,164, 93,137,150,235, 58,196, 94,113, 68,114, 29,166, 85, 92,226, 99,157,216, 93,121,139, 59,
+180,103,188, 15, 67, 71,246,232,209, 35,116,158, 26, 45,122,176,104,113,158,129,236,198, 25,196,214,134, 65,227,199,143, 31,195,
+ 22,136,157, 28, 7,117, 42,181,101,202,193,163, 75,230,238, 68,227,187,181, 4,217,242, 78,174, 24,127,175, 87, 19, 58,216,188,
+202, 87,207, 20, 82,167,107,240,198,163, 13,235,180,108,217, 50, 24,120, 51,177,147,220,133,136,179,130, 43,137,113, 15,102,183,
+ 24,220,192, 58,183,194,201, 19,111,186, 53,169, 31,209,132,182, 68,245, 61, 99,210,231, 58, 30, 52,170,221,127,116,138,235, 12,
+146,204,177, 87, 81, 60,218, 13, 46, 47, 14, 55,211,188,129,104, 33, 30, 75,155,187,144, 93,155, 7,153,104,109,227,184,172,141,
+172,115, 27,153, 20,108, 99,183, 24, 70,244,253,240,230,155, 84,145,101, 84,126,119,250,208,191, 46,117,204,100,171,139,104,213,
+170, 83,167, 78, 32,199,164, 5,115,189, 16,215,247,142, 99,217,238, 97,143,255,113, 28,231,185, 64,170,163, 1,245,150, 79,233,
+ 42,132, 37, 11,238,193,104, 75, 22,116, 17,174,247, 14,252,255,177,246,237,219,251,243, 71,129, 63,235,190, 63,147,248,173,236,
+ 82, 31,196,164,172,162, 30,225, 11, 57,255,181, 74,149, 42,129,104, 57, 35, 47, 91,108, 95,143, 24, 49,130,118,237,218, 69, 28,
+ 76, 79, 32,219,104,115, 88,184, 14, 28, 56, 64, 28,211,133,188, 98, 19, 8, 8, 4, 4, 2,127, 36, 2,127, 9,209,210, 60, 67,
+188,122,229,248,235,122, 41,226,174,152, 8,193,242,128,184, 44, 5,172, 88, 65, 75,199, 17,117, 46, 65, 65,173, 10,209,197, 46,
+ 53, 8,199,162, 91, 43,105,205,154, 53,165, 88, 45, 92,171,169, 5,153,104,205, 70,220, 8, 58, 2, 14,200,150, 18, 19, 36, 41,
+ 32,254,202,225,125,180,200, 77, 65,107,138,187,211,245,235,215,233,244,214,117, 52,207, 85, 65,235,107, 22, 34, 38, 82,176,192,
+104,115, 29,142,103,130,179,182, 86,173, 90,171,248,158,136,153, 90,192,255,135,116,232,208, 1, 22,171, 70,213,205, 20, 47,232,
+212, 14,162,233, 93,169,138, 89,130, 87,124, 44, 9,187, 89, 16, 60, 28,194,157,206, 3, 77,229,100, 34, 38, 69, 61,243, 72,174,
+ 40, 62,159, 82,153, 71, 67, 48,188, 37,147,178,125, 28, 16, 45, 25, 42,216,133, 3,162, 5,203,130,166,205,146, 99,142,122, 49,
+129, 24, 52,142, 55,182, 60, 60, 96,203,210, 83, 38,132, 23, 79,158, 56,113,214, 43,147,251,113,144, 45, 15, 83, 69,150,162,118,
+102,187,163,198,119,163,113, 37,114,145,187,249,119, 1,204,223,201,206,151, 36, 81,243,162,201, 19,159,247, 53, 73,248,130,247,
+254,121,146, 36,250, 15,153,152,156,174,109,212,168, 81, 48, 72, 22,130,245, 57,224,156,170, 84,169, 18,204,199,225, 78,213,187,
+ 21, 72,150,232,233,167,205,115,137, 90, 23,136, 33, 89, 95,235,122,208,225,170, 62,116,237,234, 21,201, 90, 2,107, 35,218,143,
+173, 40, 81, 28,128,175, 62, 74, 48,230, 30, 74,162,165,193, 93,120, 26, 4,139,211, 82,118,113,205,204,146, 37,203,196, 60,121,
+242, 76, 28, 59,118,236, 76,198,107,154,222, 66,234,207,144,176,176,137, 98,241,209, 86, 21,232,195,240,255,168, 82,170,228,152,
+ 78, 65,227,198,228,116, 15,147,254, 16,142,157,122, 91,191,126,253,215, 24,181, 10, 61,193, 30,255,227, 56,206,179,222,108,209,
+127,219,255,231, 80,139,201, 82,181, 98,117, 99,203, 86,204, 40, 94, 12, 6,224,248, 69,127,198, 97, 43,223,119,208,192,129, 3,
+117, 17, 45, 83, 38,109,151,185,108,215, 80,238,232,187, 49,231,207,245, 21,207, 15, 54,124, 44, 32, 38, 15, 4,139,221,234,146,
+ 37,147, 99,192, 52,186,182, 13,169,143,200, 43, 16, 16, 8, 8, 4,126, 22, 2,127, 1,209, 82,143,211,138, 13,149,170, 95, 84,
+ 73,180, 64,158, 56, 87, 12,209,122, 55,185, 59,189,107,158,159,206,215,240,161,141, 53, 11,196, 34, 90, 32,101,186,136, 22,203,
+ 41, 55,103,206,156,240,221,187,119, 83,219,182,109,165,196,214, 16,201, 98,181,107,210, 48,154,230,162,160,117,173,107, 18,226,
+ 76,118,142,234, 67,171,171, 23,160,195, 75,102, 19,127,177,127, 78,154, 52,105, 85, 77, 13,203,150,153, 41,108, 9,152,158, 51,
+103,206,201,124, 62, 17,119,246,207,208,199,112,224, 59,136, 86,194,106,102,138, 87, 52,189,155, 52,122,175,178,169, 2,157,140,
+117,249,242,229, 67,152, 32,224,252, 2, 77, 50,217,189,114,153,173, 47, 82, 7,197,191, 97,245, 66,224,119,210,190,105, 21,199,
+ 46, 12,106, 65, 61,237, 20,103,248,255, 82,236, 14,220,137, 96,126,190, 63,109,222,188, 25,214,175,175,124, 92,117,164,152,186,
+120,105,212, 33,187,161,182,112, 48,252,157,143, 31, 63, 94,132,219, 12,228, 99,205,234,213,103, 97,217,226, 11, 18,116,206,233,
+ 30, 66, 19,186, 81, 99,143,116,122,227,137,138, 36, 75,180,109,114,241,156,193, 33,243,134, 16, 29,222, 64, 33, 83,123,208,248,
+ 66,153,131,252,146, 39,218,140,155,115,249,107,114,185, 14,115,204,214, 83,238,100, 15, 50, 73,208,107,201,194,117,137, 18, 37,
+170,144, 35,131,115,232,243, 5,163,136, 90,229,151,136,214,135, 90,153,232,110, 37, 87,154,217,184,114, 12,201, 66, 12, 16,218,
+ 16,137,101,195,218,163,113, 3,209,194,232, 66, 62, 41, 37, 21,119,225, 54, 38,209,243,216, 93, 56,138, 7, 7,244,230, 60,157,
+120,192, 68,167,141, 27, 55,246,230,145,114,253,126,228, 97,206,107,170, 72, 83, 36, 69,130, 13, 43,235, 22, 15, 14,153,214, 51,
+106,123,195,146, 84,200, 68, 49, 76,135,204,138,220, 54,176,140,118,226, 84,146,201,123, 32,116, 9,123,252,207,169, 13,183,223,
+ 65,222, 27,106,101, 28,141,192,119,149,184, 44,169, 8,176,100,225,121, 97, 82,233,207,250,122,150,221,134,131,248,112, 93,222,
+143, 97, 76,224,234,214,106, 33,228,115,126, 76,240,207,236,223,191,255, 18,255, 6, 78,157,219,180,105,115,109,201,146, 37,129,
+ 76, 86, 63,243,245, 47,216, 34,248, 22, 86, 76, 36,118, 47, 74,123,126, 62,244,198,230,253, 8,230,226, 90,129,128, 64, 64, 32,
+240,163, 8,252,181, 49, 90, 74, 96,148, 21,100,151,201, 88,182, 12,249,115, 28,213,105, 62, 23,227, 58,236,230,157, 33,228,100,
+139,210,180,190,114, 46,170,159,214, 60,150,235, 48,111,222,188, 7,217, 53,230,207, 86,158, 25, 90,128,182,224,145,119, 65,112,
+ 21,178,123, 68, 26,113,136,223,136, 37, 89,209,162, 58, 45,170,144,139,118,173, 94, 74,243,103, 76,163, 54,126,185,168,116,206,
+ 44,225, 78,233,210,189,230,206, 13,157,142,198,141, 71, 3, 14,100,162, 51, 32, 71,142, 28,125, 57, 67, 34,118, 7,238, 96, 55,
+ 84, 72,137, 18, 37, 64,164, 82,150, 74,174,168, 93,195, 60,193, 43, 88,182,106,126,155,248,115, 24,199, 85, 41, 99,180, 90,107,
+ 17, 91,152,221,143,225,232, 24, 17,211,196, 49, 93, 8,224,143,234, 87,193, 47,124, 74,247,182, 52,183, 87, 71,226, 96,120, 41,
+200, 24, 35, 38,231,206,157, 75, 28,148, 28, 54,106,212,168, 43,108, 45, 66,140,154,206,141, 73,236,118,184,209, 64,176,238,220,
+185,227,207,177, 90,254,220, 97,250,115, 39,184,207,214,202,106,165,139,189, 29,117, 47, 81,128, 50,153, 38, 90,173, 75, 80,254,
+ 36,137, 26, 77, 45,149, 59,152,142,108,228, 33,108, 13,165,160,119, 90, 48,140,194,231, 15,162, 97,185,220, 62,228, 74,148,168,
+161,190,178,104, 57, 95,214,215,215, 55,228,216,177, 99,212,184, 98, 25,122,211,171, 38, 5, 84,207, 72, 87,202,187,208,129,226,
+ 78, 52,170, 80, 70, 58,126,252,152, 20, 96, 13,130,185,106,213, 42,226,185,203,244, 90,180,152, 60,197, 16, 45,196,100,193, 93,
+200,105, 41, 72, 22,187,188, 58, 49,217,104, 48,105,210,164, 42,108,229,172,194,152, 55, 96, 98, 40,103, 37,244,116,236,126,157,
+196,233, 9,167,105, 28,160,231, 86, 32,137, 34,119,129,228,138,158,245,156, 83, 31,190, 49,170,203,245,208,165,163, 31, 95,238,
+247,223,219, 10, 54,201,111,229, 84, 40, 82, 24,128, 9, 98, 19, 65,188,116,145,103, 57,226, 18,195,101,136, 13,123,229, 5,252,
+ 91,250, 48,193, 94,249,140,201, 17, 22,157,167, 57, 91,192, 86, 48,185, 90,207,255,207,228,253, 37,142,129,187,198,150, 55,184,
+ 6, 93,163,243,184,241,128,142,183, 60,160,133,102,206,156, 73, 28, 83, 72,252, 92,131, 40,138, 77, 32, 32, 16, 16, 8,252,209,
+ 8,196, 83,178,197, 93,140,180, 41,231,211,210, 59,143,150, 19,103, 70,224,236,110, 78, 8,116,199,166, 43, 24, 30,157, 18,172,
+ 63, 8,230,181,211,214,130, 76, 50,122,128,196, 32,118, 4, 46, 39,140,140,234,242, 95,227,200, 82, 25, 29,162, 50, 58,216,125,
+100,203,203, 45,123,155, 84,139,114,152, 74, 35, 5,211,201,208,132,198, 28,236,219,146,101,194, 93,134,251,254,199, 29,127,200,
+222,189,123, 67,216, 42,131, 17,129,152,218, 1, 27,226, 97, 26,177,117, 44,132, 3,220, 67,208, 1,241,255,186, 58,221,154, 28,
+168,255,110,231,206,157,146,197, 74,125,195,100,171,176,226, 96,164, 23,203,105,200,196,238, 16,143,124, 60,196,115,139,161,227,
+211,185, 49, 33,232,195, 35, 41,207,129,148,110,223,190,221,127,197,138, 21,254,173, 91,183,190,204, 29,238, 39,142,167,138, 66,
+108,205, 69,142, 15,243,244,240,192,168, 52,103,109,194,216,109,123, 38,104,254, 48,250, 60,188, 9,125,174,234, 36, 17,173,224,
+137, 61, 40,160,125, 73,186,213,174, 28, 21, 75,158,232,164,190,178,104, 58,207, 86, 29,204,141, 38,205,193, 4,139, 85, 35, 38,
+ 91, 39,155,151, 36, 14,120,163,165,126, 46, 52,177,116, 54, 42,227,231, 43,117,222,112, 71,178,101, 37,138,235,164, 55, 70,139,
+167, 24,144,136, 22,183,139, 20,248,206,242,183, 62,121,242,100, 6,183, 69, 47,182,194,212,103,178, 90,188,152,139,115,175, 18,
+ 41, 77,110,149,180, 72,126,215,195,220, 20,243,117,169,206,159, 22,171,184,150,140, 77, 70, 55,183, 96,118,137, 69, 97,208, 2,
+187, 72,163,188, 60, 50,125,158, 80,187,236,250, 7,243, 71,175,255,188,115,201,238,208,205,115,143,175,109, 90,241, 82, 81,211,
+132, 75, 10,152,197, 76,199, 17, 23, 88,112, 13,116,124, 19, 39,229,168, 67, 12,166,216,172,242,191, 38,185,210,228,164, 26, 44,
+ 90, 9,213,136,150, 65,101,226, 24,202,174, 91,182,108, 25,204,177,113, 99, 57,110,108, 62, 91, 8,183, 51,201,186,196, 66, 48,
+113, 42, 48,195,234, 8,149,216,154, 25,200,214, 83, 76, 54,139, 9,117,131,217, 50,108,232,136, 73,131,202, 37, 50, 11, 4, 4,
+ 2, 2,129,127, 24, 1,245,216, 44, 57,198, 2,197, 8, 76,217, 16, 61,135, 86, 27, 29,224,181,196, 20, 16,152, 10,130,243,168,
+198,160,104,188,132,231, 29,218, 8,183, 33,207,165, 21,194, 22,160,141, 73, 18, 37,106,238,196, 35,195, 56,115, 92,134,186,251,
+178,133,170, 10, 91,200, 42,240,245,249, 56, 37,225, 17,119,207,153,196,133, 48,241,145,102,131,103, 18,240, 10, 19,151,114,224,
+122, 8,127,245,135,116,237,218, 21,214, 46, 57, 46,180,228,156,175, 29,187, 39, 55,114, 92,215,165,254,149,139,135,143,237,216,
+156, 26,187,219,226,250,233,156, 96,105,179,194, 61,217,197,186,159, 99, 99,118,243,125,230,200, 80, 50, 7, 38, 22, 7,152, 16,
+158,195, 68,157, 61,122,244, 56,199, 4,244, 41, 72, 22, 79,255, 64,108,233,146,130,204,153,132, 69, 50,233,209, 26,167,228,107,
+146,232, 5,237, 89,174,113, 10,135, 39,253, 26, 80,161,100, 9,181,198, 35,233, 42, 35, 91, 9,223, 34,136, 30, 68, 24,110,221,
+245,235,215, 83,217,130,121,105,117,235,234,180,252,191, 42, 52,174,108, 94,202,151, 50,249,199,180, 41,205,207,113,124,208, 43,
+185,163, 14, 49, 9,169,114,116, 33, 19, 0,127, 38, 88, 27, 24,175,137, 76, 24, 58,193,146, 5,146, 53,178, 76,193, 79,161,251,
+214, 82,240,154,233,212, 59, 87,166,207, 42,131, 45,190, 43,178, 99,234, 84,203, 14,243,108,245, 74, 18, 12,130,186,105,227, 70,
+170, 93,174,212,165, 15,187, 86,206, 59, 58,168,253,170,174,185, 50,109,226,185,181, 64,144,180, 18, 54,165,224,156, 28, 15, 87,
+196, 34,225,140,242,233, 83,189,240,181, 76, 56, 61,127,202, 88,203, 75,213,102,171,219, 61,190,215, 11, 38,132, 24,152,177, 28,
+123,149,255,155,106,193, 52,102,196,161,202, 72, 67,232,249, 64,142, 85,148, 44, 90,112, 33,226,218,236,102, 10, 27, 63,203,132,
+243, 42,187,217,189,193, 30,255,107,146,233,156, 84,225,225,107,107,122,180,138,187,125,112, 81, 71,203, 35,203, 23, 45, 24,203,
+238,112,196,199, 65, 87,134,177, 46, 29,173, 91,183,238,181,165, 75,151, 94, 99,157, 15,195, 96, 8,158, 96,245, 35, 15, 82,209,
+229, 54,149,161,182, 34,139, 64, 64, 32, 32, 16, 16, 8,232, 64, 64,221,146, 37,139,104, 85,194, 36,164,232, 12,162,231,210,210,
+228,138,170, 12, 34,134, 60,209,179,195,171, 79, 96,166,105, 66,179,193, 60,195, 56,241,139, 31,214,175,184,108,170, 50,211, 86,
+173, 90, 53, 63, 91, 72,242, 48,113,203,195,194, 96,185,114, 98,114,117,143, 45, 69, 33,152,196, 20,113, 54,220, 9,135, 48, 17,
+ 12, 97, 43, 21, 72,146,242,171, 95,245,222,122, 39, 94, 67,140,214,217,254,255, 17,246,106,133,110,192,195,236,119,114,224,241,
+ 86,142,137,234,169,114, 78,151, 76, 39,182,222, 13,132,245,136,203,218,151,247, 47, 16, 23, 6,146, 5,151, 28, 44, 16, 24,201,
+200,199,159,170,221, 43, 70,102,137, 20,137, 79,189, 27,219,142,162, 22,142,160,175, 83,251, 72,132,235,253,164,222,244,122,230,
+ 16, 58,219,162, 12, 21, 77,158,232,132, 76,112, 99,149, 19,196,137,221,124, 81,236,214, 36,152,111,153,240, 97, 96, 0,121, 56,
+216,127,201,159, 44, 97,128,175, 73,226,221,113,153,176, 20, 68, 11,150, 44, 14,210,246,103,226,234,207,174,230, 13,236,154,158,
+136,152, 44,184, 11, 97,201, 2,201,162, 30,229,136,218, 21,166,187,205,139,170,198, 0,162, 42,177, 39, 65,181,179,123,170,156,
+173,157,227,221,164, 24, 36,196,213,165,181,177, 9, 42,146, 34, 81, 75,142,199,242, 43,196,203, 25,233,193, 32, 70,102, 49,203,
+132,139, 78,205, 28, 21,249,105,231, 82, 90,217,184, 92, 68, 81,171,132,170, 46,240,213, 32, 85,108, 21,122,128, 61,147,207, 39,
+216,115, 92,162,244, 63,223, 3,131, 49,148, 91,140, 76,181, 64,120, 12, 66, 0,201,106,167, 12,130,199,158,255,151, 38, 81,101,
+114,181,248,244,156,113, 81, 95,182, 47,166,181,205, 42, 68,226,127, 77, 50,139, 89, 37,222,122,126,225, 36,250,186,123, 57,109,
+236, 88, 63,178,112, 90,139,195, 76, 2,199,117,234,212,105, 3,235,204,101,182,192, 94, 99,130,124,141,151,223,185,198,235, 30,
+ 30, 99,226,117,137, 63, 22, 52,185,223,245,234,188, 76,253, 49,232, 57, 18, 50, 13, 66, 64,180,145, 65,112,233,205, 44,240,212,
+ 11,145, 65, 25,126, 6,158, 6, 21,224,111,201, 92, 15, 4, 42,218, 90,181,157, 45, 49, 59,121, 84,158, 63, 18,207, 77,133, 89,
+208,183,194,234, 53, 96,192, 0,116, 24,250,150,224, 81, 98, 98, 76,162, 5,153,121,184,131, 77,207,100, 7,174, 70,204,216,142,
+ 13,132,171, 19, 91,207,142,243,232,181, 16,142, 27,195, 60, 92,152, 13, 94,155,207, 84,175,194,104, 89,130,167, 28,143, 14,219,
+206, 4, 98, 51,119,154,112, 27,170, 6, 48,235,149,169, 4, 4,150, 43, 30, 4, 16,137, 41, 34, 64,108, 96, 69, 98,242,161,201,
+162, 21, 35, 51,111,210, 68,117, 70,228,201,248,225,243,212,174,244,166,181, 31, 37, 77,148,136, 2,167, 15,162,203, 13,243, 83,
+107, 39,139, 15,185, 19, 37,170, 45, 83, 9,213,203,233,206, 86,193, 80,158,214, 32,106,235,214,173,196, 36, 27,211,107, 96,157,
+ 63, 63,153,242,144, 45, 54, 41,226, 96,120, 38,189,210,210, 58, 72,108,133,132,203,116,235,196,137, 19,103,176,251,184, 23,199,
+183,213,135,187,240,195,236,129, 20,217, 50, 31, 61,175,145,137, 14, 20,178,213, 73,180,152,168,142,103,183, 97, 36, 92,156, 28,
+227, 70, 60,227, 63,113, 27, 68,217,166, 78, 61, 59, 46,229,172,232,106,251,225,203,234, 73, 68, 53,157,233,121, 37, 23,242,181,
+ 72,136, 81,170,202,141,215,166, 86,108,228, 52, 87,205,146,133,185,230,112, 92,117, 65,241,152,186, 99,129,104, 38, 98, 88, 82,
+ 7, 3, 27,148,203, 62, 45,226, 99, 91,185,236,152,119, 14,238,121,201,146, 91,209,197,246,253,231, 53, 83,164,251, 63,171,232,
+ 76,133, 82, 38,120,167,114,255, 24,153,149, 61, 28, 67,195,214, 34, 95, 6,122,214,177, 28,149,176, 73,254,142,227,181,134,240,
+220, 99, 43,152, 16,159,101,210,117,158,175,195, 26,164,117,162,159, 3,109,112,200,214,207,184,224,105,192, 53,250,178,138,114,
+234, 67,200,176,243, 2, 79,195,240,210,151, 91,224,169, 15,161,127,231,188,250,136, 67,189, 49, 90,170,208, 64,145,224, 18,156,
+197,241, 80, 49,195,209,241,155,143,161, 83,195,220, 81,218, 92,113,154,148,176,127,180, 69, 75,142,155, 77, 83, 19,169,203, 76,
+206,163, 14, 83,176,235, 14,163, 35, 53, 85, 76,175,219,136,175,211,251,176,104, 34, 90,220,169, 77,102,119,228, 6, 30,213,181,
+150, 99,143,212,131,166,245,202, 84,169,156, 51, 91, 63,222, 49,249,136,130, 21,137,131,203, 35,121,228, 24, 58, 90,103, 53, 0,
+ 98,201,228, 81,135,235,186,103,118, 12, 58,215,144, 45, 64,157, 42,211,209, 6, 69,169,165,163,121, 80,145,228,137,214, 24,160,
+219,154,202,233,206,193,249, 11,153,160, 6,177,149, 14,115,169, 21, 52, 64, 30,178,198,146,137, 81,172, 24,121,168,154,216, 2,
+185,129,201,210,116,182,232,245,103, 43, 90, 43,183,228,201, 38,117,242,112,248,124,169,170, 23,237, 99,146,213,192, 38,153,186,
+235, 80,189,156,246, 76,162,223, 48,105,147, 8, 33, 98,197,120,164, 98,144, 6,204,116, 21,253,255, 22, 45,171, 68,107,214, 85,
+207, 31, 21, 80,193,145, 70,103, 78, 25, 85,204, 58,209, 34, 45, 23, 34,206,105, 51, 39,109, 19,222,198,200,228,145,127,179,153,
+ 84, 45,226, 24, 45,200, 82,126,136,148,226,181, 56, 7,241,241, 65,216,243,241, 50,184, 79, 17,203,132,203,150, 87,201, 29,249,
+188,188, 3,141,202,108, 30,137,255, 85,238, 31, 35,179, 68,170,196,155, 54, 55,175, 16,245,162,121, 33, 26,232,110, 22,153, 63,
+149,201,126,182, 88, 97,164, 36, 44,206,121, 57, 97,210, 94, 57,155, 33,250, 41, 71,222,119,237, 46,247, 34, 61,249, 68, 57,141,
+ 4,100,180, 24,129,167,192,211, 88, 8,252, 12, 93, 50, 86,217,254, 4, 57,178, 92,135,234, 5, 77,203,150,151,133, 60,169,228,
+ 90,103,103,231,181, 60,156, 31,193,202, 8,154,151,213,145,169,100,114,227,248,148, 32,238,200,179,199, 17, 9, 77,141,155,134,
+101, 57,114, 82, 95, 56, 87,238, 45,244, 42,204, 80,123, 69,251,219, 61,107, 95,196, 94, 69,104, 94,182,112,128,104,106, 26,242,
+175, 87,166, 90,225,156, 97,217,130,187, 48, 58, 54,203, 89, 67,225,191,147,201,150,171,250, 28,248,126,162, 96,178,132, 47,139,
+ 37, 79,124, 60, 79,162, 68,154, 44,139,134,182,145, 92,220,180,229, 51,180,238,144,163,107,176,133,182, 78, 92, 26,117,200,120,
+ 61,199,168, 67,206,164, 9, 51, 89,117,207,158, 66, 97, 95,220, 42,209,166,130, 41, 19,124, 44,110,153,104,125,110, 83,237,131,
+ 58, 12,208,249,156,108,101,107,194,164,170, 9,207, 35, 87, 51,250, 58, 16,255,172,152, 39,139,143, 87, 84,206, 0,143,233, 40,
+138, 90, 37, 90, 81,200, 34,193,123,236,241,191,202,125, 98,240, 68, 57,139, 49, 41, 68, 62,142, 41, 91,145,222, 68, 90, 94, 42,
+ 46, 91, 92,218, 72,223,125,132, 76,125, 8, 25,118, 94,224,105, 24, 94,250,114, 11, 60,245, 33,100,216,249,159,129,167, 97, 37,
+248,179,115,199,137,104,197,165, 74, 63,163, 33,132,204,184,180,132,246,107, 4,158, 2, 79, 99, 33, 32,116,201, 88, 72,126,147,
+ 35,240, 20,120, 26, 11,129,248,162, 75,198,170,239,239,144,243, 67,174,195, 31, 41,112,124,105, 92, 81,206, 31,105,229,239,175,
+ 21,120, 10, 60,141,133,128,208, 37, 99, 33, 41,200,155,208,165, 63, 95,151,140, 91,194, 63, 72, 26,148, 79, 83, 50,164,136,218,
+100,232, 58,174, 79,190,144,169,185, 93,226,218, 94, 2, 79,129,167, 92, 29, 16,207,166,110, 11,176, 92, 28,149,249, 4,158, 2,
+ 79, 77, 8, 24,170, 71,114,136, 98,124,145,169,196, 35,174,253,153,190,103,234,159, 58, 47, 71, 49, 12, 5, 68,200, 52, 20, 49,
+221,249, 5,158, 2, 79, 99, 33, 32,116,201, 88, 72, 10,235,147,208,165,127, 83,151,140, 91,235,127, 68,154,120, 88,140,219,208,
+ 2, 79,129,167,177, 16, 16,186,100, 44, 36, 5, 41, 18,186, 36,116,201,184, 8,196, 79,105,134, 45,193,147, 56,239,240, 0, 69,
+206,193,132,132,223, 60, 27,102, 66, 93,137, 39,173,194, 60, 67, 88,176,246,113,244,111, 85,179,160,244,155,229,236,101,121,254,
+ 72,248,173, 87,166, 90,126, 21,220, 99, 30,106,150,145, 72, 67, 89, 19,225,184,156,164, 73,230,207, 40,103,124,145,105, 68,221,
+142,119, 47,222, 36,249,254,175,243,248,173, 79,127,212,243,107,210, 37,213, 60,166,133, 71,191,206, 86,119, 97, 31, 93,201,204,
+119,204,107,229,115, 39, 93,251,255, 45, 6, 79, 67,159,205,116,246,246,165,120,100,227, 99, 36,252,254, 85, 58,111,128, 46,229,
+230,188, 91, 56, 29, 86, 73,147, 53,149,211, 0,153,250,178,198, 59,253,212, 87, 33, 3,206,139,186, 27, 0,150,140,172, 2, 79,
+ 25, 32,253, 35, 89, 12, 92,130,135, 9,150,255, 99,162,195,183,137,137,214, 48,114,173, 58,103,149,122, 74, 95,102,212,198,148,
+ 14, 89,239, 91,217, 58,191,231,151,120,204, 82, 40,209,132,235, 59,162, 5,130,197, 50,253,143,220, 33,137,108,241,188, 16, 86,
+ 38, 73,147, 14,183,182,182, 62,201,179,196,135, 32, 73,191,249, 24,206,169,231,215, 70,180,208, 49, 41,203,154, 40,207, 48,242,
+172, 58,167,139,123,229, 89,189, 83,164,205,186, 43, 65, 98,147,125, 60,185, 86,149,193, 10, 69, 82, 77, 29,167,198,151,185,106,
+ 57,179,245,190,192,196,177,164,105,242,228, 61, 29, 29, 28,182,115, 61, 31,242,252, 79,143,108,120, 97,232,164,137, 19,247,196,
+ 57, 5,231, 81,173,151, 94,153, 44,191, 38,151,135,103,175,172,111, 97,110,190,128,235,124, 11, 9,191,113, 12,231,228,212, 93,
+ 61,143, 62,226, 42, 75,166,241,158,134,248,247,242, 97, 61,186,255,154,232,250, 11, 34,147, 2, 35, 41,107,253, 37,171,145, 60,
+ 74,116, 62,236,144, 46,195, 23,164, 76,197, 58, 30, 86, 30, 79, 94,112, 84, 76,126,137, 28,105, 32, 69, 56,174,148,153,167,249,
+106, 90,127, 54,124, 8, 82,139,158,147,214,184,184,186,135, 32,225,183,242, 56,242, 40,243,235,146,169,255,217, 28,179,193, 34,
+ 67,161,171, 38,214, 46,207,120,126,182,152,197, 58, 65,182,228,232, 39,207,147, 98,205,179,168, 14, 72,156, 40,209, 62, 94, 42,
+233, 29,214, 6, 77,146, 56,241, 94, 28,195, 57, 35,235,210, 50,245,181, 68,163, 9,215,247,239,144,127, 89, 63, 69,221,141,129,
+ 64,252,123, 47, 25,163,214,223,100,196,151,186, 27,175,198,191, 94,146,129, 75,240,112, 7, 1,146, 53,120, 27, 81,137,206,219,
+104,237,185,168,237,170,169,102,243, 65, 87,125,124,178, 70, 98, 70,110,172,139,199,179,154,199,188, 43,117, 17, 45,144, 44,150,
+233,175,112,169,121,135,215,212,123, 51,107,214,172,112, 94,186,134,176,148,202,215,175, 95, 9, 51,163,243, 12,215,225, 56,135,
+ 60, 49,249, 97, 9,211,208,145,129, 60,161, 67, 82,150, 53, 91,163,229, 49,157,153,187,135,247, 27, 94, 91,143,176, 64,114,177,
+ 98,197, 94,115, 39, 49,148, 39, 38,202,160, 74,184,180,117, 58,184,239,127,227, 79, 93,183,180,117,250,218,190,125,251, 32,229,
+ 44,233, 60,155, 55, 29, 59,118,140,120,125, 62, 26, 54,108, 88, 84,133, 10, 21,130,147,153,165,250, 58,107,237,169,235, 82,189,
+180,148, 19,199, 99,234,226,217,226, 58,175, 17,120,187, 73,147, 38,159,118,237,218, 37,173, 39,136,132,223,188, 38,221, 39,156,
+ 83,112, 30,125,117,143, 37,147,229,155, 40, 20,133,211,166, 73, 51,135,103,117, 63,201,100,240, 9, 18,126,227, 24,206,169,231,
+215, 88,119,227, 41,102,124,121,168,255, 95, 78,214, 35,144,172,181, 60, 37,111,197,222,123, 98,116, 62,131,171,251, 87,158,148,
+150,176,204,143, 99,186,244, 17,107,207, 68, 72,207, 2,242, 40,243,235, 34, 69,202, 60, 73,243,143, 32,175,138, 99,135, 88, 58,
+229,222,107,158,210, 34, 66,249,192,164,180,176,136,192, 49,156, 99, 43,150, 44,153,186,158,205,166,221,166, 92, 40, 81,178,116,
+ 24,150, 80,194, 51,117,246,236,217,152,103, 83, 23,209,138,209, 55,215,218,119, 56,223, 11, 94,127,146, 46,240,226,230,119,239,
+222, 37, 94, 0, 93,218,243,234, 11,196,235, 84,190, 80,112, 30,189,250, 41, 95,151,178,113,214,231, 77, 91,118,164,245, 59,143,
+ 73,101, 21, 68, 43, 6,188,248,247, 28,201,111,119,125, 57, 69,221,245, 33,100,216,249,248,130,167, 97,181,250,115,114, 27, 62,
+103, 22,220, 19, 73,243,141,144, 72, 86,202, 34,227,222,171, 90,179, 44,221, 74, 92,100,146, 32, 45,124,140,133,135, 65, 58,176,
+ 96, 46, 47,146, 76, 76, 18, 62,235,117, 29,186,214,189,157,201,211, 59,226,201,147, 39,132, 5,111,241,242, 30, 63,126, 60,241,
+218,108,180,121,243,102,194,113, 36,119, 15,175, 8, 5,231, 85,186, 26,181, 17, 45,148, 21, 86, 55,144, 44,211,194, 99,222,123,
+ 84,157,221, 29, 22,173,132, 73,205, 94, 64,222,211,167, 79, 9, 11, 14,191,122,245,138,120,146,200,168,196,201, 82, 79, 82,146,
+ 45, 77, 50,149,110,190,212,142,153, 67,207,159, 63, 79,139, 23, 47,166,124,249,242, 17,207, 66, 78,188, 70, 31,241, 66,213,196,
+139, 72, 19, 47, 59, 36,173, 71, 56,103,206, 28, 74,106,225, 24,170,171,156, 49,174, 67,247, 38, 55,109,210,164,141, 56,122,244,
+104,140, 5, 80,253,107,254,224,193,131, 81,200,163,224,188,178,100,102,106,118, 35,181,163, 71, 16, 47, 36,252, 14,157, 43,175,
+ 37, 24, 35, 18,109,132,206,146, 9,225, 91,228, 81,112, 94, 93, 50,141,168,179,241,229,161,142, 41,167,170,155, 47,101,145,177,
+111,149,150, 43,123,199,244, 95, 65,178,240, 65,193,203, 34,145, 69,186,156,119,112,206,188,200,152, 55,250,220,124,170, 50, 19,
+123, 52,122,167, 36, 48,120, 86,148, 27,158, 31, 37,129, 65, 30,125, 50,117, 61,155,214,158, 21,207, 96,213, 5,172,155,137, 5,
+202,177,102, 38,158,205, 58,117,234, 68,241,179,249, 78,175,235,144, 9, 84,225,194,190, 81,208,107,232, 13, 63, 47,196,235, 59,
+ 82,173, 90,181,164,186,227, 89, 66, 42, 91,182, 92, 20,200,150, 17,116, 9,203, 15, 45,236, 51,104, 12,221,124,250,145, 64,182,
+ 4,209,138,245, 20,198,187,231,232, 95,126,135,136,186, 27, 17,129,248, 39, 74,105,205,210, 94,114, 44,251, 18,157,252,144, 11,
+110, 40,144, 43,124,185, 99,175,116, 75, 89,176, 69, 40, 71,142, 28,225,232,192, 97,197,106,219,182,237,199, 41, 83,166, 28,228,
+245,249,214, 69,132,133,205,119,176,183, 31,143,188,154,238,132,227,206, 10,133,165,169,169,105,224,227,199,143,105,199,142, 29,
+ 82, 39,176,124,249,114,218,185,115, 39,237,219,183, 79,218,163, 19,226,245, 19,165,197,149,217,178, 21,136,107,116,200,148, 98,
+177, 64,174,224,126,129,219, 16,255, 91, 43, 20,153,185,156,145,188,142, 30,241, 18, 45,180,100,201, 18, 73,230,235,215,175, 41,
+177,137, 89,160, 6,162, 21, 83,100,101, 93,217, 26, 20,136,122, 58, 57, 57, 17, 47,113, 66,108, 33, 34, 15, 15, 15,226,133,144,
+169, 92,185,114, 84,191,126,125,137,108, 33, 79,242,228,201, 99,226,216,180,213,157,163,228, 82,112,125, 30,251,251, 99, 21, 35,
+205, 27,175, 7, 40,149,113,247,238,221,168,251, 99, 92,163, 11,207, 20, 10, 69,174,172, 89,179, 6,226, 26,116,174,192,245,202,
+149, 43,116,227,198, 13,233, 55,228, 41, 55,224,201,100, 49, 16,215,104,147, 25,255,116,219,120, 37,214, 22,147,149,222,206,174,
+ 28, 47, 29,244, 9,235, 79, 62,123,246, 76, 34,222,172,224, 35,212,243,107,105,119, 73, 63,121, 77,156,210,133, 11, 23,142, 84,
+ 18, 24,172, 31, 89,166, 76, 25, 38, 44,101,105,208,160, 65, 49, 4,134,245, 42, 18,121,245,233,167,166,103,211, 82,161, 72, 95,
+177, 98,197, 79,208, 3, 88, 72,121, 93,210,167,236,138,110, 96,166, 80,120,243, 67,109,162,212,107,109,250, 9,151, 32,136, 32,
+202,184, 97,195, 6,226,213, 31, 2,249,250,166,252,204,187, 34,225, 55,175, 10, 17,136,243, 32,157,233,211,167,127,129,107,126,
+ 64,151, 98,145, 44,144, 45, 46, 27, 7, 44, 72, 22, 45, 44,251, 36, 54,129,128, 64,224, 31, 67, 64,157,139,252, 85,213, 71,229,
+ 80, 33,229, 94, 27,209, 74,146, 40,209, 42,184, 11, 95,188,120, 65, 45, 91,182, 12, 58,124,240,224,194,203, 23, 47,206,189,113,
+237,218,220,200,136,136,185,250,136, 86, 10, 19,147, 65,252,197, 29, 14,203, 11, 72, 22,200, 22, 47, 8, 45,185,227, 78,159, 62,
+ 77,176, 32,129, 16,237,217,179, 71,186,199,208,161, 67,195,112,141, 62,162, 5, 11, 22,136, 22,246, 73, 20,138, 54,121,242,228,
+ 9,133, 53, 11, 95,244, 32,111, 27, 55,110,148, 22, 29, 70, 71,105, 97,157,230,157,190,142, 12,247, 99,130,245, 6,150, 48,184,
+ 76,122,244,232, 65,213,171, 87,151, 72, 86,233,210,165,169, 87,175, 94,180,116,233, 82,201,242, 6,215, 36,175, 9,248, 74, 95,
+ 71,150, 44,113,226, 30, 93,186,116,249,162,139,100, 61,127,254,156,120,205, 70, 41, 53,109,218,244, 11,174,209, 86,247, 84, 10,
+133, 3,175,181,248, 28,110, 87, 88, 47, 22, 44, 88, 64,147, 39, 79,166, 49, 99,198,208,184,113,227,104,250,244,233, 82,157, 97,
+201, 83,110,192,151, 23,136,126,137,107,255, 42, 5, 54, 66,101,180, 17, 45, 28,231, 8,114, 83,147,100,201,142,240,250,158,146,
+117,116,244,232,209,196,150,219,238,170,215,104, 35, 90, 30, 10, 69, 42,117, 2,195, 58,218,204, 70,161,112, 67,194,111,117, 2,
+131,107, 32, 91, 27, 41,210, 68,180,152,181, 76,128, 27,158, 23, 56, 39, 23, 23,151,187, 94, 10,133,153, 82, 39, 85,247,218,100,
+ 34,254, 10,250, 3, 75, 22, 72, 22,151,205, 78,253,122, 28, 3, 89,135,133, 15,207, 20,174, 49,144,104,169, 6,190,191, 84,186,
+ 11,163, 73,214, 66, 46, 27,214,106,196, 26,143,202,197,225,141,208,178, 66,132, 64, 64, 32, 16, 95, 16, 80,231, 34,241,165,220,
+209,229,212,237, 62,148,107,209,226, 78,250, 94, 96, 96, 32,193, 82,196,132,105, 47, 72, 22,119, 62,115,249, 11,122, 46, 91,180,
+244, 18, 45, 94, 92,248, 24, 72, 22, 44, 76,176,100,129, 8, 29, 63,126, 92,178,142,225, 5,127,245,234, 85,201,157,136, 61, 58,
+ 53,124, 61,227, 26, 57, 68,107,252,178,243, 19, 45,109,157,239, 45, 94,188,136, 99, 74, 30,208,197,139, 23, 37,226,134, 24, 21,
+ 16,185, 83,167, 78, 17, 58,162,100,230,182, 15,229, 16, 45, 94,155, 46,134,161, 32, 70, 39, 56, 56, 88,138, 37, 67, 2,121,129,
+133,136, 45,121,146,203, 83,142, 69,139, 3,232, 15,131, 76,106,218, 64,148, 64, 44, 65,176,128, 7,172,123, 28,171, 70,184, 70,
+ 91,221, 57, 64,191, 19,227, 38,197,250,132,134,134, 18, 98,106,152,200, 81,213,170, 85, 63, 21, 40, 80, 32,152, 45, 38, 31, 91,
+183,110,253,137, 59, 68,201, 77,137,120, 53, 96,220,188,121,243,240,228,201,146,117,141,103, 10,252,211,139,171,139,104,225, 28,
+ 91, 23, 45, 44, 82,166,244, 71,187,163,189,216, 29, 23, 25,109, 29,148,172, 86,218,136, 22, 19,178,129,170, 4, 38,189, 66,145,
+ 86,253, 94, 56,166, 74, 96,112,141,161, 68,139,215, 14, 61,134,114,193, 26,197,133,169,166,137,100,233,120,142, 18,114,224,251,
+ 94, 60, 51,176,176,193,122,165,237,122,156,131,206, 67,231, 16, 32,111, 32,209,250, 46,240, 29,100,139,177, 3,201,210,104, 9,
+255,233, 13, 47,110, 32, 16, 16, 8,252, 49, 8,196,115,139,150,250, 18, 60,177,137,151, 92,139,150,143,143,207, 23,188,204,209,
+113, 28, 62,116,104,217,109, 38, 89, 15,152,100, 61,127,250, 84, 22,209, 98, 66, 18,140, 23, 52,187, 27, 37,171,213,137, 19, 39,
+ 36, 34,132, 23, 60, 72, 6, 72, 22, 2,111,225,246,194,111, 88,120,112,141, 62,162,229,144,183,205,164, 92,185,243,124,129,203,
+ 12,132, 8, 95,245,111,223,190,145, 44, 88,215,174, 93,147,228,177,187, 35,138, 93,157,100,237, 86,106,181, 28,162,197, 86,136,
+ 0, 85, 82, 4, 23, 33,130,245, 81, 86,148, 29,113, 53,108,113, 35, 94, 32,155,120,196,164, 94,215, 33, 91,189,130, 52,185, 13,
+ 85, 73, 22,240, 64, 91,172, 88,177,130,250,246,237, 11,185, 90,235,206, 65,201, 71,113,173,114, 59,114,228, 8, 44,107,225,220,
+ 17, 86,226,214, 77,130,132,223,137, 18, 37, 10, 7, 97, 5, 6,112,163, 66, 46,119,202,103,254,152, 39,235, 15, 41,136, 62,162,
+133,243,110, 10,133, 13, 47, 96,125, 15,177,137,136, 85, 98,226,117, 97,112,244,136, 86,173, 68, 75,133,192,192,122,165,237, 62,
+ 56,167, 70, 96, 12,178,104,177, 27, 50, 8,207, 22,226,170,120,101,117,123, 67,137, 22, 70, 22,194,229,136,248, 67, 11,118, 21,
+106,187, 30,231, 16,163,137, 45, 91,182,108,176, 14, 27, 66,144,178, 49, 78,234,129,239, 47, 5,201,250, 67, 30, 2, 81, 12,129,
+192,111, 70,224,175,183,104, 1, 95,125,174, 67,142,251,144,136, 22, 2,110,217, 66,180,236,209,131, 7, 18,201,226, 24, 33,217,
+ 68, 11,113, 67,115,231,206, 37,140,224,131,219,237,242,229,203, 18,201,130,139, 14, 68, 6,228, 10, 29, 25, 72, 18,146, 28,162,
+149,220,202,249,252,236,217,179,233,193,131, 7, 28,227, 20, 40, 89,111,208,233, 32,193, 2,133,184,165, 76, 30,222,159, 42,212,
+237,188, 21,238,197,184, 16, 45,196, 65,129,180,193,213, 9,151, 28, 44, 72,136,181, 65,144,176, 28,162,197,121, 62,194,221, 2,
+ 18, 5, 89,216, 80, 54,212, 21,245, 7,201,130,133, 12, 36, 22,241, 59,108, 49,129,220,143,218, 58, 50,117,162, 5,121, 92,182,
+168, 18, 37, 74, 4,194,245,131,132,223, 44, 51, 10, 46, 78,224,221,177, 99, 71, 98, 43, 23, 89, 88, 88,156,253,205,207,211, 31,
+119,123, 57, 68, 11,121,120, 4,167, 47,187,117,163,160, 99,208, 99, 38, 72, 77,116, 89,180, 84, 9, 12, 92,133,218,238,131,115,
+106, 4,198, 32,162,197, 58, 19,132,129, 16,253,250,245,139, 19,209,202,156, 57,243, 59,144,113, 4,190, 27, 64,180,222, 27, 64,
+180,228, 4,190,255,113,122, 33, 10, 36, 16, 16, 8,252, 58, 4,226, 57,209, 50, 12, 40,188, 60, 53,197,129,216,216,216,220, 3,
+ 73, 64,108,213,218,181,107,247,178,187,107,238, 91, 38, 89, 33,193,193,178, 98,180,224, 6, 4,161, 66,220, 20, 98,189, 64,178,
+224, 34,196,151, 52, 94,242,112,159, 33,208, 22, 9, 86, 41,184, 22,229,184, 14,147,166, 72,249, 14,214, 34,184, 10,145, 64,184,
+222,191,127, 39,185,120,186,117,235, 22,201,111,248,169, 25,138, 15, 25,170,140,227, 50, 38,209, 26, 53,106,148, 44,162,197,150,
+144, 19, 40, 35,234, 10, 82,136, 56,175, 22, 45, 90, 80,189,122,245,168, 90,181,106, 82,236,151,159,159,159, 20, 32,221,189,123,
+119, 76, 31, 65,184, 70, 91, 71, 6,215, 33,187, 34, 99,166, 9,208,228,146, 68, 44, 13, 44,132,112,245,114, 76, 29,181,106,213,
+ 10,247,136, 72,150, 36, 73, 23,195, 52,226,239,207, 45,151,104, 33, 31,235,211,124,184,187, 97, 65,229,223,107,117, 17, 45, 85,
+ 2, 99, 0,209, 2,129, 49,136,104,241,168,194, 99, 32,127,176, 90,198,197,117,200,110,192,125,112,173, 67,159, 13,112, 29,238,
+147, 73,180, 68,224,251,223,255, 8,137, 26, 10, 4,254,117, 4,116,187, 14,213,209,209, 70,180, 56, 24,126, 53, 70,196, 33, 70,
+137, 93,102, 65,207,159, 61, 91, 8,146, 21,246,229,203, 92,138,140,212, 27,163,133,192,118,204,157, 21, 16, 16, 64,155, 54,109,
+146, 44, 57,120,185,195,226,130, 99,111,223,190,149, 8, 22, 58, 12, 4, 29,119,232,208,225,171,156, 96,248,196,201,204, 94, 35,
+254, 8, 73, 73,182, 96, 13,195,168, 64,158,176,180, 14, 58, 45,213,128,249,223, 65,180,184, 30, 67,135, 12, 25, 18, 6, 66,132,
+249,141, 80, 95,116,212, 60,213,131,228, 46, 68,204, 26,207,215, 69,156,135,198,142, 29, 11, 2,134,129, 0, 67,181,117,100,202,
+ 96,120,144, 41, 88,198, 96,205, 0,118,112,113,162,125, 16,151, 54,115,230, 76,226,121,192,136,167,126,160, 70,141, 26, 33,192,
+ 30, 83,112, 4,138, 96,248,239,223, 7,134, 16, 45, 30, 25, 88, 22, 83,146, 0,103,182, 44, 74,163, 88,181,185, 14, 85, 9,140,
+ 1,174, 67, 16, 24,131,136, 22,130,225,161,251,208,123, 46, 83,156,130,225, 49,162, 18, 22,101, 4,231,107, 11,134,207,152, 49,
+163,220, 96,120,213,192,247,199, 34,240,253, 95,239,131, 68,253, 5, 2, 2,129, 88, 8,104, 35, 90,236, 82,200,224,237,237, 29,
+ 6,171, 22,130,130,217,133, 24,194,177, 65, 7,159, 62,126,108,240,244, 14,184, 30, 36, 3,193,241, 74, 75,214,187,119,239, 36,
+194, 16, 25, 25, 41, 5,200, 99, 42, 8,103, 25,211, 59, 36, 72,156,124, 63, 2,193,217, 66, 22, 5,242, 2,194, 5, 34,195, 83,
+ 36, 4,204,225, 88, 37,116, 90,152,250, 1, 22, 45, 76, 5, 33,147,104,189, 84,181, 18,105,114, 29, 34,112, 56, 58, 70,235,165,
+ 50,166, 69, 75,135,155, 16, 67,225,185, 62,111,224,126, 4,161,132, 37, 15,238, 66, 88, 7, 65,178, 16,159, 3,146,133,184, 47,
+196,217, 32,175,174,225,243,184, 31,130,177,121,110,175,215, 32,172,136, 25, 2,158,108,105,148, 8, 91,255,254,253,169,115,231,
+206,146,171, 16,163, 38, 27, 54,108,136,216,172,247, 98,122, 7,205, 15,187, 42,209,114, 78,155,182, 52, 15,252,120,198, 22,220,
+ 23,248,173, 78,194, 48,241, 45, 15, 42,144, 72, 73,209,162, 69, 35, 7, 99, 54,127, 13, 27,174, 67, 96,187, 42,129, 73,175, 37,
+ 24, 94,149,192,196, 41, 24,158,167,119,224,137,121, 67, 49, 88, 5,122,197, 51,194, 63, 49,116,122, 7, 76, 70,138,103, 17, 3,
+ 71, 80, 30,245,233, 29,112, 12,100, 14, 31, 66, 50,166,119, 16,129,239,162, 95, 17, 8, 8, 4, 4, 2,218, 16, 80, 78, 2,250,
+109,194,210,177,223, 77, 88,138,169, 14,240, 53, 15, 98,132,233, 24, 64, 20, 96,149,145, 59, 97,105,198, 76,158, 17,112,161,193,
+ 69,168, 12,126, 71, 7,129,152, 42,108, 8,144,183,181,179,151, 53, 97, 41, 58, 51, 30, 19,158,146, 59,167, 33, 60, 82, 48,148,
+ 45,102,146, 76,116,130,152,180, 20,150, 44,144, 43, 76,102,138, 73, 77, 49,185,105,244,250,141,170, 22,131,152,137, 1,149,147,
+139,166,247,246,251,128, 78, 69,185,161,174, 32,113,112,103, 34,214, 10,211, 59, 32, 33,120, 56,133,173,215, 7, 89,147,139,242,
+ 36,143, 14, 60,187, 56,226,165, 32,139, 39, 39,165,213,171, 87, 19,202, 60, 97,194, 4,201,146, 5,151, 98,106, 91, 59,174,187,
+238, 9, 33, 99, 38, 65,229, 73, 72, 83,217,187, 7,151, 42, 85, 42,104,205,154, 53,210, 28, 92,112,205,162, 77, 64, 2,121,182,
+121, 88, 40, 66,204,172, 29, 67,196,132,165,223,105,124, 76,187,171,146, 41, 12,132, 80, 78,250,201,238,219,112,182, 22, 13, 75,
+174, 80, 20, 98,130,229, 2,146,197,255, 47, 0,153,133, 37,150,231, 87,123,172,102,125,138, 37, 19, 83, 53,168, 19, 24,245,233,
+ 29,212, 9,140,134,233, 29, 84,245, 83,154,160, 87,211,179,137, 9, 75, 17,163, 5,221,135, 43, 30,250,137, 1, 32,152,247, 77,
+238,132,165,229,202,149,143,130,174,195, 82, 10,242,143,184, 49, 36,252,198, 49,144,172, 10, 21, 42,202,153,176, 20, 83, 52, 96,
+ 62,172,195,156,164, 9,221,120,255,140,147, 33,193,243,104, 48, 49,105,167,113,187, 42,129,167,192,211, 88, 8,252, 12, 93, 50,
+ 86,217,226,129, 28,149,245, 3,181, 45,193,227,158,201, 35, 18,147,139, 34, 30, 10,150, 20,144, 36,184,173,184,118,250,215, 83,
+227, 25,223, 49, 25,233,240,225,195,195, 16, 16, 15,210,134, 4, 57,157, 58,117,250, 10, 75, 22,102,133,215,183,134,160,186,165,
+129, 45, 64, 14,252, 22,159,155, 43, 87,174, 72, 4,150, 91, 88,217,190, 86,174, 35, 7,146,133, 37,133,176,124, 9,102,223,214,
+214, 57, 42,215,113,219,112,252,249, 37,187,244,158,159,120, 78,170, 16,116,168,112,203,161,163,129,165, 12, 83, 48,240,200,201,
+168,226,197,139, 7, 37,183,114,248,180,251,236,243, 75,202, 53, 28, 85, 90, 87,117,121,151,255,175,243,200, 75, 11,193, 90,197,
+ 29, 96,216,162, 69,139,164, 9, 90,177,135,117,140, 93,124,168,187,180,252,144,190,186,171,175, 55, 23,189, 4,207, 92,182,196,
+156,179,178,178,122,201, 29,107, 0, 91,176, 46,240,126,145,114, 9, 30,189, 50,141,167,154, 63,227, 1,252,169, 50, 85,117,137,
+ 49,124,167, 28, 13, 10,178, 13, 50, 12, 2,220,160, 65, 3,170, 93,187,182, 20,243, 6,189,143,158,188,116,154, 46,162,133,115,
+152,132,180,124,249,242,145,250, 8, 12, 79, 56,170,109,194, 82, 85, 93,138, 89,219, 83,211,179,137, 37,120,242,228, 43, 16, 6,
+178, 13,183, 60,150,118, 82, 62,155,178,214, 58,100,130, 15,107, 21, 62, 38,148, 31, 62,202, 41, 68,112, 12,231,240, 17, 96,160,
+ 46, 29,142, 38, 90, 32, 93,134,110, 63,181,221, 13, 45,140,142,252,162,156, 70, 4, 83, 16,108,227,130, 25,143,240, 52,122,197,
+127,161, 64,158, 5, 72,218,212,215, 60,212, 82, 4,149,245, 3,177, 20,143,198, 69,165, 75,253,127, 81,105,219, 52,105,162, 64,
+178, 16,236,173,139,104,169,174,143,230,204, 46, 65,196, 95, 33,216, 29, 35, 11,145,240, 27,199,112, 78,206,218,124,218,226,106,
+172,120, 54,108, 94, 80,122,103,138, 52,222,251, 96,209,130,219, 16, 11, 78,131,100, 97, 65, 94,125, 68,235,255,229, 28,120,158,
+ 73,138, 31, 47,248,220,203,209,222,126,151,173,173,237, 3, 46,227,131,212,214,214,187,146, 39, 77,218, 11,231, 20, 57, 7,158,
+215,187,238,155,234, 90,135,209, 11,106,107,171,187,114, 65,109, 67,101, 42, 93,151,218,246,114,240, 52,162, 66,198,187, 78, 71,
+ 85,151, 28,108,108,106,176, 62,126, 98,226, 35,185, 97, 65,170,224,154,133,149, 8, 35, 99, 49,138, 21, 65,227, 76,104,111, 97,
+202, 7,125, 68, 75, 73,182,244, 17, 24,213, 89,225,117,124, 8,196,172,237,169,245,217, 44,243,255, 69,165, 29,211, 57, 69, 42,
+159, 77, 89,107, 29,178,126, 42, 23,149, 70,124, 25, 79,225,240, 30,211, 56,168, 47, 42,173, 87, 63, 99, 43,211,150,104,162, 21,
+151, 25,223,227,157, 46,253,203,207,145,168,187, 81, 16,248,151,117,222, 40, 0,254, 38, 33,202,121,179,212,247,154,139, 3,215,
+154,114,205,181,104, 55, 91, 66, 93, 29,121,244,250,134,176,100, 61,214,187,214, 33,191,200,225,246,210, 71, 12, 98, 92, 99,209,
+249, 85, 74,170,209,221,163,141,116, 41,143,107,168,147, 78,215,161,210, 21,104,140,114,170,215,229, 79,149,105, 68,229,140,119,
+ 47, 10, 77,250, 3, 11, 41,235,115, 87, 38, 25, 39,153, 36,189,134,165,148,227,160, 48,229,200, 61,118,255,117,132,203, 90,121,
+157, 28,253,132, 75, 16,241, 87,234, 4, 6,199,148,238, 66,213,114,104,146,105,232,179,137,245, 13, 65,176,144,244,174,117,104,
+196,103, 83, 77,151, 16, 24, 31,215, 25,223,227,157, 46,253,203,207,145,168,187, 81, 16,248,151,117,222, 40, 0,254, 38, 33,234,
+150, 44,195, 23,154,142, 99,193,255,101,133, 17,117,143,163,210,104,185,236, 79,192, 19,228,220, 66, 79,181,254,132,114,202, 65,
+ 94,148, 83, 14, 74,242,243, 8, 60,229, 99, 37, 39,167,192, 83, 14, 74,242,243,196, 23, 60,229,215, 72,228,140, 65, 32,190, 52,
+174, 40,167,113,149, 86,224, 41,240, 52, 22, 2, 66,151,140,133,228, 55, 57, 2, 79,129,167,177, 16,248, 25,186,100,172,178,253,
+ 14, 57, 74,139,150,234,124, 90,177,200, 16, 0, 83, 79,134, 20, 84,211,245,250,142,233,147,175,239,250,184,148, 89,200,252,190,
+157,117, 97, 34,218, 72, 59, 2, 66,151,132, 46,201,213,129, 63,241, 57,170, 18,135,119,190,220,250, 34, 31,175,197,174,232,165,
+175,226, 26,202, 32,231, 30,250,196,202,145, 97,104,127, 39,100, 26,247,121, 87,182,161, 54, 92,245,181,241,159,120, 94, 94,108,
+214, 79, 40,249,207, 96,188, 66,166,113, 27, 74,224, 41,240, 52, 22, 2, 66,151,140,133,164,176, 62, 9, 93,250, 55,117,201,184,
+181,254,181,210,116, 90,180,126,102, 81,196,195, 98, 92,116, 5,158, 2, 79, 99, 33, 32,116, 73, 13,201,193,131, 21, 9,121, 76,
+114, 2,162,193,188, 95,155,136,168, 38, 39, 69, 2,153,128,107,196,179,102, 77,205, 51,252,119,168,111,157, 82,134, 92,209, 70,
+ 50, 64, 50, 32,139,192,211, 0,176,100,100,253, 25,120,202,184,173,200,162,142,192,207,104,136,191, 73,102,250,180,105,211,238,
+230,180,135,129,227, 73,195,245,110,127, 83,221,245, 86, 86, 45,195,111,171, 59, 79, 90, 90,130, 23,226, 46, 33,179,192,191,173,
+156, 50,203,167,204, 22, 83, 78,239,140,138,106, 94,153, 20, 3, 98,146,187,162,145, 54, 89, 94,124, 78, 53, 47,174, 85,201, 43,
+167,238, 9,203,149,116,154,133,196,215,201,153,188, 84,142, 76,245,226,122,240, 84, 44,143,120,164,229, 51,158, 19,173,162,134,
+186,196,200,228, 9,135, 19, 33,213,171,145,170,127,167, 86,153, 63,118,106,229,245,181,121, 99,167,128, 6, 53,173,111, 53,174,
+103,179,179, 85,227,180,125, 90, 53,115,200,170,204,167,190,215, 85,247, 44,238,138,114,181,171,121,207,206,233,147,188,251,161,
+ 67,126,137,233,105,205,228,247, 78,184,218,182,104,152,106, 83,247,142, 57, 35, 27,213, 78,181,185, 89,179,212,230, 58,218, 45,
+ 46,117,215,167, 6,191, 84,230, 72,110,227, 33, 73,146,120, 13, 77,148,168,242,208,196,137,235, 13,227, 52, 52, 97,194, 58,188,
+207, 61, 94,161,136, 83,221, 89,102,170,193, 10, 69,177, 17, 38, 38, 77, 88,102,111,150,213,107,164,137, 73,227, 33, 10, 69,209,
+ 81, 10, 5,207,238,163,117,211, 90,247,248, 38, 19,245, 69,189,255,212,186,235, 83, 66,113, 62, 26, 1,115,115,243,115,220,185,
+ 96,210,203,152,100,109,109, 29,128,196, 29,143,148,120, 78,169,152,196,203,149,224,220, 57, 3, 59, 71,140,224,130, 95,243, 72,
+116,194,239, 31, 25,213,101,145, 52,105,210, 97, 92,142,147, 38, 38, 38, 33, 72,248,141, 99,122,228,234,122,249,240,232,123, 69,
+ 61,198, 99, 62,227,241,128, 39, 0,125,200,191, 23,224, 24, 39,156,211,182,233,146,153,130, 59,128, 73,188,224,240, 43, 94, 4,
+248, 58, 79, 42, 25,229,225,225,241,138, 49,156,196,194,120,149,156, 56,201,140,171,238,234, 42,103, 70, 38,129,103,157,156,156,
+206, 71,227,103,129,223, 92,246,179,252,127,198, 56,148,211,140,175, 41,201,248,245,229, 78,112, 79,244, 50, 55,207, 88,151,246,
+112, 27,245,197, 57, 78,200,163,105,251,165, 29,132, 74, 1, 82,114, 57, 95,178,174,191,228, 99,127,165, 21, 2,196,137,194,110,
+172, 84, 38,252,175,173,109,245,228,213,219, 70,197,253,236,171,204,153,222,124, 14, 18,126,203, 80, 90,189, 50,213,100,120,240,
+202, 21,111, 63,125,250, 36,173, 92, 81,163, 70,141, 96,126,110,185,255,141,181,125, 71,180,218, 52,205,248, 54,236,211, 83, 10,
+255,252, 92, 74, 95, 67,159,208,253,219, 7,104,203,186,161, 52,124, 96, 25,106, 88,195,250,100,253,154,105,178,200, 37, 90, 94,
+110,138,138,253,250, 86,155, 19, 25,113,101, 78,237, 26,222, 51,166, 78,205,155,242,238,133,236, 54,167,247,101, 45,212,167, 91,
+129, 40,220,227,224,158,233,212,180,142,205, 89, 29,100,203,208,186,203,128,243,151, 5,195, 39, 24,148, 44,153,243,144,196,137,
+219, 12, 75,146,164,242, 40, 43, 43,175, 81,105,210, 56, 35,141, 73,157,218,117,104,146, 36,101,164,115,137, 19,231, 48,224,121,
+ 79, 48, 60,113,226, 2, 51, 51,103,238,243,238,246,237, 62,225,159, 63, 15,224,249,217, 6, 33,225, 55,142,205,244,240,232, 51,
+ 88,161,200, 39,100,126,135,128, 38, 93,250, 25,120,202,209, 65,145, 71,137, 0, 72, 22,214, 29, 84,110, 81, 81, 81, 20, 30, 30,
+ 46, 45, 96,140,151, 24,102, 73, 87, 46,100,140,101, 57,176,156, 14,127, 69, 6,104,123,161,169, 28,199, 87, 44, 26,125, 5,175,
+ 19, 23,134,153,183,177,128, 52,228,238,217,179,135,114,230,204, 25,198,231, 86,114, 66, 48,165,166, 47, 94,109, 47,159, 50, 60,
+219,252, 27, 44, 90,141, 25,177, 33, 15,139, 55, 99,130,201,121,243,230,133,227, 28,203, 43, 99,192, 3,136,172, 62, 76,172,110,
+243, 18, 36,159, 48, 11, 56, 38,100,197, 26,140, 88, 50,135,151,182,249,132,115,200, 99,128,204, 4, 76, 50,154, 56, 58, 58, 62,
+159, 59,119,238, 23,224,120,250,244,233,155,192, 14,107, 41, 78,159, 62,253, 11,206, 33, 15,203,212,228,178,248,174,238, 92,134,
+115, 74, 50,172,143, 8, 27, 72,134,115,184,184,184,220,229, 69,138, 35,121,129,234, 48, 38, 26, 91,144,238,222,189, 27,193,203,
+ 7, 69, 98,225, 98, 46,163, 33, 47,201,108, 76,168, 30,241, 66,225, 33, 60, 9,104, 20,102,238,199, 82, 68, 88,252, 26,203, 55,
+241,114, 65, 81, 60, 65,232, 71, 38,199,152,143, 45,155, 6, 76,117,117, 58, 5,153, 12,205,102,236, 78,242,146, 56, 79,144,240,
+ 27,199, 88, 78, 65, 29, 79,181,222,142,140,101, 45, 89,176, 96, 65,196,200,145, 35,195, 25,235, 37, 50,222, 16,122,101,202,144,
+161,158,229,167,202, 84,146,167,229,139, 7,175,236,212,182,204, 74,254, 31, 31, 38,154,244, 47, 1,206, 33, 15,242,130,152,169,
+145,178,239,202, 89,190, 68,186,113, 85,202,187, 46, 42, 93,204,190,121,222,188,214, 41, 43,151,119, 93, 21,242,118,203, 96, 36,
+252,198, 49,156, 67, 30,228, 53,176,221, 61,184,157, 31,249,248,248,188,230,229,183,174, 36, 73,146,164, 13, 72, 22,222, 75, 87,
+175, 94,149,214, 17,133,126,229,205,155, 55, 56, 89,178,100,170,150,173,239,136, 86,253,234,214, 3,217,202, 20, 1, 82, 53,121,
+ 76,109, 90, 56,167, 45, 29, 61, 56,143, 2, 95, 92,146,136,215,245, 75, 91,169, 71,167, 92, 97,117,171, 91, 14,105,217, 50,103,
+ 18, 37,225, 82, 41,239,255, 45,132, 30, 10, 63, 37,201,194, 62,107,230,132,163,242,228, 72,220,175, 84, 81,147,145,147, 71,228,
+152,216,163,125,134,251, 32, 89,170,100, 75,139, 43,241,167,182,123, 28,244, 80,219, 37,234,229, 76,192, 68, 42, 43, 91,177,106,
+207, 76,151,206,106,130,131,131,229,104, 83, 83,159,145, 73,147, 22, 64, 26, 97,106,154,115,162,181,117,218, 53,249,242, 37,103,
+178, 85,134,201,150,175,140,118,135,204, 38,254,211,167,247,226,197,112, 7, 5,223,189,219,231,230,164, 73, 93, 15, 85,169,210,
+233, 88,157, 58, 29, 31, 47, 89,210,233,243,211,167,189,249,220,192, 99, 35, 70,244, 26,145, 52,105, 3, 33, 51, 22, 2,154,218,
+200,216,120, 26, 81,165,226,165, 40,101, 48,188,106,172,150,238,138,160,243, 6,201,194, 18, 49,235,215,175,167,205,155, 55, 75,
+ 47,174,189,123,247, 74,107,244,225, 5,198, 36, 65, 34, 31,188,152,179,180, 6,154, 12,162, 85,157, 45, 36, 47,177,148, 7, 72,
+134,166, 13,132, 14,179,112,243,210, 55,152,121, 27, 86,132,234,106, 37,213,244,242, 41,230,233,233, 25,138,165,114,110,223,190,
+ 77, 11, 23, 46,164,241,227,199, 75,235,179,161,220, 56,142,196, 86,163, 80,150, 85, 76,198, 3,136, 44,185,185,163, 14,229, 69,
+179,163,130,131,131,165,122, 42, 55, 16, 66, 44,197,195, 56, 68, 33, 15,242,202,144,153,139,235,126,189, 93,187,118, 31,176,156,
+ 15, 54,158,113,252, 57,207, 54, 30, 5,162,133,132,197,166, 81,206,246,237,219, 7,177,220,235, 44, 51,151,190,186,163,157, 64,
+122,177,189,124,249, 82,170, 55,150,143,193, 90,125,192, 17,255,131,112,130,204,202, 37,195,188, 12, 80,201,236,217,179, 63,129,
+ 69, 64,185,241,146, 67, 15,185,253, 95, 65, 14,202,136,245, 40, 51,101,202,244,132,137,145, 38,151,218,119,109,196,132,229, 2,
+ 48,196,114, 67,220,241,145,155,155, 27,241,130,216, 84,168, 80, 33,105,189, 72, 44,130,141,197,144,153, 20, 19,119,138, 23,100,
+224,137, 44,217, 97, 93,227,165,139,222, 97,113,114,213, 15, 3,204,134,142,197,197, 43, 84,168,240, 54,218, 2,151, 93,166, 76,
+213,108, 57, 74,148, 40,193, 48,188, 35, 44, 6,206, 58,246,142, 79,106, 35,151,202,235,226, 93,231,168, 36, 90, 32, 80,215,175,
+237,154, 51,118,116,203, 49,197,253, 18,213,120,247,206,203,137,190,120,185, 33,225, 55,142,225, 28,242, 32,175, 28,162, 5, 2,
+ 21,250,126,203,224, 93, 91,251, 79,237,210,161,196,134,227,251,167,173,255, 26,114,116, 57, 18,126,227, 24,206, 33, 15,242, 26,
+208, 70,252, 56,123,188,196, 50, 65, 88,132, 30,107,165,242,146, 94,159,249,121,253,122,241,226, 69, 90,177, 98, 5, 13, 27, 54,
+140,186,117,235, 70, 3, 6, 12,160, 68,137, 18, 97,157,197,239,218, 72,213, 66, 53,105, 82, 21,203,101,115, 26,228, 88, 48,179,
+ 98,217, 5,211, 11,247,232,223,213,109, 69,155,166,246,183,134,244, 43, 65,143,239, 29,163,207, 33,143,104,193,236, 54, 4,178,
+165,147,104,101, 82,244, 11, 13, 61, 55,231,221,187,179,115,110, 50, 86,183,174,237,154,119,243,218,230, 37, 55, 46,175,218,112,
+241,212,140,131,247,207,183,157,220,181,141,203, 19, 25,100, 43,222,233, 18, 0, 30,154, 52,169, 43,187,244,170,175,169, 81, 35,
+ 41,147, 42,207,225, 73,146,248,142, 50, 51,203, 48, 61,109, 90,219,201, 86, 86, 54,227, 76, 77, 29,134,155,152,228, 6,225, 58,
+216,191,127, 98, 38, 91, 37,134, 37, 74,148, 71,215,187,142,229,229,191, 56,103, 78, 79,110,235, 65, 23, 6, 14,236,182,167, 72,
+145, 54, 15,199,142,173, 29,188,123,119,101,164,103, 51,103,214,188,216,172, 89,147,231, 75,150,180,141,252,250,181,255,225,129,
+ 3,123, 12, 85, 40,120, 78, 97,237,100, 67,155,204, 7,171, 86,213,104, 80,170,212,216,116,169, 82,157,115, 74,153,242, 66,171,
+ 50,101,230,191,127,253,122,240,143,200, 52,102, 57,183,249,250,182, 91,220,172, 89,187,171, 75,150, 72,245, 55,102,221,127,164,
+156,241,146, 26, 25,183,208,234, 19,148,198,254,159, 45, 10,126,176, 42,112, 26,172,188,175,146,104,201, 33, 89, 88, 32, 25, 68,
+139, 59, 52,117,139,150,122, 53,158,128, 72,225,197,168,111, 3, 89,192,130,213, 44,224,137, 30, 44, 82, 98,109, 68, 44,143, 2,
+ 34, 56,120,240, 96,105, 65,101,172,245,182,111,223, 62,105, 15,178, 8, 89,183,110,221, 34,172,177,200,242,244,185,128, 76, 56,
+223, 99, 37,185, 2,161,124,241,226, 69, 76,145, 97, 49,131,133, 11, 86, 40, 44,226,140,188, 44,147, 87,228,209,190,177, 53,231,
+ 5,151,225, 12, 11, 57,204,132,224, 40, 91,134, 78,205,159, 63,255,216,196,137, 19, 47, 13, 28, 56,240, 58, 91,122,238, 52,106,
+212,232, 65,181,106,213,158,178,187,227, 21, 47, 4,252,142,221,105, 65,250,244, 64,217, 78, 32,148, 88, 76, 27,196, 10, 27,136,
+ 48, 48, 1, 97,197,134, 54, 66,121,101,180,145,130, 23, 57,190, 3, 34, 12, 82, 5,204,128, 35,200, 26,136, 12,234,142, 58,115,
+217,165,181, 41,217,162,112, 71, 95, 25,113,158,243, 5,130,252,240, 12,235, 32, 82, 88,140, 25,196,151,242,231,207, 47, 45,122,
+ 92,175, 94, 61, 98, 28, 36, 61,226,153,215,245,233, 17, 68,230,200,154, 53,107, 32,234, 4, 82,137,186, 98,105, 28,212, 19,191,
+ 85,137, 60,234,192,196, 14,237,174,143, 36,169, 86, 37, 33,151,241, 22, 8, 53, 8, 44,116, 0, 36,145,203,118,139, 51,201,137,
+ 45,146, 3,203, 31,145, 71, 37,238,106, 24,136,212,189, 91, 75,134,110, 89, 87, 99,216,158, 53, 94,195, 94,223, 44,208, 13, 9,
+191,113, 12,231,144,199,203, 67, 49,145,175, 83,183,104,125, 87, 31, 88,171, 64,164,190,188,223, 63, 61,240,233,230,117, 67,250,
+ 22,121,216,176, 86,234, 79, 72,248,141, 99, 56,135, 60,200, 43, 19, 16, 55, 38,249,129,104, 87,232, 20, 54,232, 38, 62, 84,152,
+104,125,106,211,166, 77, 80,239,222,189,169,113,227,198, 84,169, 82, 37,170, 92,185, 50,222, 35,143, 52,201, 86, 37, 90,135, 22,
+ 13, 54,121,253,100,149,125, 80,224, 50,183,240,247,253,124,195, 63,244, 46, 21,241,126, 68,163,173,171,170, 79,108,221,212,241,
+213,222,237,147,232,203,199,199,212,179,115,158, 48,165, 27, 81,147,204,204,238,138,226, 74,139,214,128,190,213,231,100,243, 74,
+ 56,166,112,222,196, 67, 42,148, 73, 62,101,220,144,146,163, 35,223,204,104,251,225, 97,223,209,154,200,150,158,152, 45,153,240,
+252,190,108,131, 20,138,164,112, 9,206,119,119, 55, 7,201,154,108,103,231,195,230,197,146, 17,151, 46, 89, 84, 43, 81, 34,150,
+149,116, 64,194,132, 14,131,147, 36,201,179,170,106, 85,233,154, 49, 10,133,173,166,146,115,167,100, 61,197,205,173, 15, 44, 89,
+ 23, 6, 12,232,202,190,214, 38, 44,179,188,166,244,100,194,132,218,175, 86,175,110,201,174,196, 62,227,211,164,233,173, 45,102,
+ 75,147,204, 17,157, 58,117,241,206,152,113,135, 87,230,204,161, 75,150, 44,145, 92,207,120,167,226, 29,234,230,234,250,217,183,
+112,225,211,117, 45, 44,102, 24, 34, 19,101,228,186, 87,224,186, 79,205,232,226,114,221,204,212,244, 19,146,187,147,211,173,250,
+197,138, 45,251, 26, 26,218,215,144,114,182,201,149,107,108,234, 84,169,222,101,114,119,255,194, 94,167,136, 52,236, 69,170, 82,
+172,216,212, 23, 7, 14, 84, 69,221, 95,175, 93, 27,167,186,163,156,111, 78,156,168, 92,175,108,217,113, 5,178,103, 95,159,197,
+211,243,138,163,131,195,235,180,182,182,111, 61, 50,100,184, 93,190, 92,185,163, 69, 77, 77, 87,243, 3,154,230,103,106,151, 38,
+ 46,242, 51,239,103,100,217,234,163, 14,241,255,255, 55,144, 44,245, 27,162, 3, 7, 41,218,178,101, 75,140, 37,235,208,161, 67,
+ 49,150, 44,184,252, 96,201, 66,199,198,164, 65, 90,116, 89, 70, 39, 46, 89,201, 96, 13,193,250,113, 32, 83,234, 27, 22,151,222,
+176, 97, 3, 13, 29, 58, 84,114, 41,113,185,116,118,186,108, 81, 25, 56, 99,198,140,112, 88, 52, 64,178, 64,182, 14, 28, 56, 16,
+171,156, 32, 89,176, 66,129, 44,177,220, 48, 92,163, 11,224,196,137, 19,119,239,210,165,203, 23,101,217,214,174, 93, 43,145, 14,
+229,134,151,122,199,142, 29,233,250,245,235, 82,106,218,180,233, 23, 92,163, 75, 38,199, 36, 73,117, 87,110, 76, 88,110,242,226,
+196,111,217,133,246, 21,164, 72, 61,177,107,242, 29,151, 19,238, 78,157, 27,220,133,168, 23,240,196,151, 60,136, 22,202, 7, 28,
+129, 9, 94, 18,192, 25,237, 3,194,160,171,141,120, 77,187,193, 76,120, 78,181,108,217,242, 9,220,196, 88,240, 27, 58, 0, 92,
+ 33,235,249,243,231, 18,113,197, 30, 29,217,214,173, 91,169,108,217,178, 79,216,221,123,212,217,217,153,223, 93,218, 55,142,237,
+122, 3, 12,241,226,130,133,161,126,253,250,228,231,231, 39,117,132,144, 15, 66,143,242,193, 53,155, 34, 69,138, 87,122,170,157,
+150, 59,218,231,112, 15,163,110,236,218,163,201,147, 39,211,152, 49, 99,164,250,178, 11,150, 86,174, 92, 41, 97,160,220,160,175,
+136,181, 98,185,105,245, 97,138,243,140,107, 23,118, 17, 75,102, 87, 96, 11,114,137, 5,154,153, 20,126,100, 23, 85, 23, 57, 50,
+226, 97,158, 4,176, 90,129, 80, 61,185,214,120,201,164, 81,197, 15, 53,109,224,253, 63,246,174, 2, 62,138,227, 11, 31,238, 46,
+193, 53, 4,119,119,138,211,226, 20,215,162, 69,139, 91, 91,220,139, 91,139,187, 59, 65,130,187, 7,119,119, 8, 22, 36, 4,146,
+ 3,242,254,223,183,205,230,127,185,220,221,238, 37,129, 66,187,251,251,205,239,246,118,103,223,206,188,153,157,249,230,189, 55,
+239, 61,103,226, 57,175,241, 30,243,160,110,186,118,227, 81, 53, 72,169, 21, 1, 85,207, 78,174,239,111, 95, 26, 37,239,188, 23,
+202,173,211,181,100,198,216,212, 1,205,234, 37,241,229, 61,230, 97, 94, 61, 60,203,146, 37,237,214,163,187, 91,202,241, 3, 67,
+101,227,218, 49,178,115,167,135, 98, 34,192,241,136, 99, 11,190, 37, 31, 72, 74,223, 34,144, 55, 37,154,236, 79, 28, 67, 16,229,
+ 40,228, 97, 9,180,182,108,153, 28,205,235,198,194,164,175,158, 44,201, 96,126, 53,186,192,135, 23,189, 43,156,218,215,178,153,
+255,243,105,189, 95,222, 30,252, 11,193,214,221, 27,251, 5, 18, 42,105,242, 99,194, 67,124,214, 94,121,131,108,180, 62,157,155,
+209,176, 94,142, 89,123,182,164, 76,117, 96,119,166,194, 47,110, 13,174, 48,109, 76,157,241, 59,214,247, 90,247,224, 98,159,233,
+214, 96,171, 89,131, 68,187,244,242, 86, 15,175,190,116, 30, 0,166,220,176,201,250,129,234, 66, 74,178, 48,129, 23,240,152, 57,
+ 51,194, 40,216,222, 66,210,149,149,105, 56,226,131,170,229, 26, 24, 53,106,182, 97, 17, 34,164,135, 97,123,161, 65, 17, 35,218,
+148,224, 97, 96, 41,235,125,249,114,191, 55,183,110,245,223, 1, 73, 22, 65, 65,234,148, 41,175, 37, 77,146,228, 37,128,134,146,
+146,187,184,188, 76,145, 60,185,146, 82,186,184,188, 74,155, 38,205,155, 52, 41, 83,190, 73,158, 48, 33, 23, 70, 33, 14,107,154,
+185, 50,101,114,231,248,113,227,198, 13,101,204,179, 62, 56,118,177,111,245,234,213, 75, 18,153, 76,107,244,208,100, 57, 81,247,
+166,233, 82,165,186, 82,171, 86,173,247, 71,142, 28, 81,180, 10, 76, 60,175, 89,163,134, 95,102, 87,215, 59,107, 70,142,196,134,
+ 87,147, 45,245,169,201,178,156,155, 33,201, 34,200, 98, 63, 87, 15,206,191,237,218,181,123,159, 40, 97, 66,239,105,191,254,218,
+225,222,176, 97, 13,205,119,239,118,185,186,114,101,119, 61, 52, 85,126,178,172, 57, 51,103,222,211,177,125,251,103,152,127, 3,
+ 40,100,160,118,136, 42,120,142,125, 24, 87, 3, 74,149, 40,241, 50, 97,164, 72,161,137, 87,170,187, 27,218,194, 34,186, 31,254,
+218, 51, 90,160,200, 50,106, 89, 57,129,115,178, 85,213,133,142, 64, 22, 39, 79,170,215, 32, 1,208,146, 68, 40, 96,131,147,169,
+154, 84,149, 15, 59,248,140, 25, 51,164,123,247,238,210,167, 79, 31,101, 50, 38,224, 66,121, 28,210,100, 32,106,210,224, 10,132,
+146, 44,150,243,224,193,131, 10,125,170,142,216, 81,212, 14,115,249,242,101, 57,124,248,176,240, 25, 71,109,130,251,123, 40,193,
+ 80, 15, 78,228,234,193,137,157,192,134, 64,129,239,161,180,135,234, 46, 62,227,136,166, 37,208,130,170,239, 13,202,225, 69, 32,
+128,143,251,146, 53,200, 2, 24,124, 7,117,152, 79,224, 4,225,176,251,176,157,198,140, 25,163, 0, 12,166, 95,126,249, 37,232,
+156,255, 91,183,110,173, 0,144, 81,163, 70, 41,129,144, 29,181, 17, 64,214,113, 74, 27, 33,185,121,193,193,102,225,194,133,210,
+181,107, 87,133, 38, 37, 77, 4, 88, 84,203,246,236,217, 83,185, 78, 94,183,105,211,230, 25,251, 72,161, 66,133,142, 56, 42, 40,
+108,104,130, 80, 15,251, 21,251, 11,129, 18, 19,249, 64,233, 4,237,182,168,238,213,146,104,225,126, 23,180,175,130,124,169, 58,
+154, 48, 97,130, 0, 24, 11, 6,179,119,197,138, 21,123, 83,185,114,229,183, 63,255,252,243, 59,168,168,149, 17,147,101, 39,208,
+ 2, 47, 62, 64,154,166, 7, 36, 37,133, 90,243,153, 10,174, 9,180, 8,178, 88,119,246, 5,172, 36, 41, 29,179,185,250,254,218,
+191,117,173,242, 81, 69, 72,233, 21,129,213, 47, 29,202,124,184,120,118,155, 48,241,156,215,120,143,121,180,232,224,126, 68, 26,
+187,211, 14,139, 42, 66, 74,175, 8,178, 36, 0,205,134,100,246,217, 38, 55, 79,148,144,241, 67, 92, 2,120,143,121,152, 55,208,
+ 64,222,161,196,176,116,137, 44,231,207, 31,174, 39, 47,159,174, 19, 31,239, 29,178,111,215,100, 25, 59,102,128,210, 70,235,214,
+173, 19, 44, 96, 4,223,196,219,124,249,242,189,115, 4,178, 88, 7, 75,160, 53, 99, 70,219, 40,183, 79,207,139,239,253,104,101,
+154,231,119, 38,100,109,221, 36,253,152,191,166,254,188,231,206,245, 13, 7,223, 61,158,210,155,146,173,129,125,203, 40,182, 85,
+147,255,104, 40,220,141,232,136, 15,216,117, 88,133,134,240,133,243,199,234,251,248,148,107,146,253,187, 92,243, 53,169,151,234,
+143,153,211,187,237,190,115,125,211,161,109,235,122,174,183,150,108,245,239, 81,236, 83,139, 22,142,165,227, 58,120,255,143,101,
+129, 93, 86,157, 81, 9, 19,102,134, 77, 86,158, 81,113,226,164,133, 52,167,202,224, 8, 17, 18, 18, 96, 65,218, 21, 87, 73,209,
+162,185, 78,203,158, 61, 53, 62,205,196, 19, 51,102,140, 59, 52,122,244, 50,131, 35, 70,140, 15,144,246,179,173,130,115,135, 29,
+141,221,175,254,249,103,143,219,144,218, 16, 20, 16,100,169, 38, 19, 28,171, 40,113,167, 20,219,218,110, 56, 69,146, 36,175,244,
+208,140, 29, 51,230,125,142, 21, 28,219, 41, 33,183, 62,184, 80,165,201, 12, 23,214, 80, 93, 60,210, 67,147,146, 44,130, 44, 44,
+216, 62,217, 2,111, 28, 7,177, 64,252,148, 57, 99,198, 59, 67,162, 71,183,101, 83,102,178,172,251,252,214,173, 59, 82,146, 21,
+162,112,184, 0, 16, 24,128,177,253,125,171, 42, 85, 70,189,217,183,175,229,139,115,231,186,141,140, 30,189,177,158,114,170,146,
+ 65,128,211, 23,172, 59, 53, 21, 28,139, 3,181, 92,202, 57, 36,197,138,185, 76, 44, 29, 90,150,176,116, 62, 91, 88, 36, 44,244,
+190,240,179,150, 30,225,213,243,144, 69,176, 68,147,156,192, 57, 9,210, 38, 75, 5, 47, 4, 31,156,176, 84, 21, 13, 37, 89, 92,
+ 73,194, 96, 90,233,224,161, 1, 90, 42,224,194,132, 45,176, 95, 82, 38, 76, 21,104, 81, 42,161, 5,180, 48,233,190,225,100, 11,
+ 27, 34, 69,106, 69, 59, 31,174, 60, 40,221,225, 71, 65,144, 69, 32, 72,117, 18,207, 9, 22,248,140,163, 6,192,224,252,154,117,
+227,193, 15, 4, 18, 51,229, 92, 5, 89,164, 11,245,158, 34,209,161, 45,200,184,113,227, 4,210, 39,135, 52, 85,160, 69, 32, 3,
+144,117,146, 42, 15,130,141,233,211,167,223,227, 4,161,130, 45,170, 0, 51,102,204,248,116,240,224,193,234, 74,220, 97, 95,225,
+238, 79, 85, 50,200,129,135,224,138,131, 14, 15, 14, 14, 4, 89,252,160,121,176, 61, 29,181, 17,140,138,151, 3, 60,126, 34, 56,
+133,132,233, 9, 63, 44,218,190,144, 46,127,217,214, 4,171,236, 7,148,116, 98,117,247,148, 18, 52,128, 98, 26,199, 47,211, 11,
+ 52, 89, 22,214,159,244,216, 78,108, 55,130, 24,214, 25, 70,241,228,165, 67,112,141,119,237,183,148,134,114, 16, 64,155,125,192,
+251,105,240, 76, 41, 3, 83, 53,216,229,124, 32,176,102,219, 99,119,167,244,239,223, 95, 32,169, 61,166,245,241,193,150,110, 51,
+ 36,142, 65,203, 90, 85,162, 69, 16,200, 4,105,227, 39, 72, 48, 55,107,209,249, 22,239,211, 30,139,170, 66, 74,177, 8,176,212,
+131,231,188,198,123,204,163, 85, 55,186,111,224,206, 66, 26,189,211, 30,139,170, 66, 74,178,130,128,150,239, 81,121,125,231, 7,
+217,184, 48,141,240, 30,243, 48, 47,159, 9,116,253, 96,247, 21,144, 76, 14, 59,186,187,121,192,157, 75, 3, 21,160,197,116,229,
+252, 10,233,209,189,185,242,173,242,123,228,162, 13,170,101,127,108, 44,129, 23, 1,251,135,245, 46,194,195,135,199,199,184,119,
+101, 78,138,106, 21, 83,254, 58,101, 98,135, 45,215, 47,175,219, 53, 99, 90,135,221, 23,143,182,110, 66, 53, 34,109,182, 40,213,
+218,179,125,186,180,109,230,210, 87,203,207,150,171,171, 41,154,167,103,219, 40, 55, 61,243,199,171, 88, 54,242,111,147,199,183,
+218,118,245,194,250,157, 4, 91, 11,166, 55, 25, 46,207,255,108,127,243,100,167,137,253,187,101,186,220,235,151,252,159,218,180,
+ 72,180, 94,139,183, 95,243,125,170, 0,167,167, 73,147, 0,246, 79,101, 47, 13, 31,158,158,234, 66, 24,177,231, 4,192, 82,118,
+ 83,163, 63, 69,248,244,225,195,200, 83,243,231,143,193, 53, 5, 80, 15,143, 20,169, 2,102,165, 40,120,166, 7,174,133,216,201,
+ 77, 23, 6,120,110,224,129,186,117,127,161, 13, 17,129, 1,165, 88,236,155, 4,214,148,178, 83,139,193,133, 47,199,126, 74,124,
+184,112,227, 2, 43,101,210,164, 54,199,101,107,154, 42,208,162, 36,135,115, 28, 77, 36, 56,167,113, 17, 79,147, 1,206, 73,170,
+ 29, 41, 42,194,133, 86,136,195,154, 38,213,133,144,170,190,183, 5,178, 56, 70, 19,212,113, 12,172, 88,177,162,127,209,200,145,
+ 87,105,209,164, 77, 22,213,133,182,128, 22,223, 65, 97, 69, 38, 87, 87,255, 54, 21, 43,142,247,243,242,234,138, 29,154, 54,181,
+ 44,182,248, 73,158,166, 79,151,238, 37,231, 10,150,137, 60,224,102, 37, 38,158,115, 14,165,205,111,140, 40, 81,222,125,137,254,
+247,141, 75,182,108, 7,147, 86,145, 43,209,164,202, 68, 78,224, 92, 33,232, 1, 89,148, 72, 16,236,132, 5,104, 81,242, 98, 13,
+180,216,193,245, 0, 45,150, 19,187,248,148, 78, 65,117, 23, 63, 52,130, 33, 21, 8, 18, 92, 81, 45, 69, 64,200,164, 5,180, 48,
+209,191,101,231,226,202,152, 54, 64,148, 6, 17,164,144, 6,233, 18,204, 81, 45, 65,117, 21, 85, 19,148,194,241, 25, 61, 64, 3,
+ 96,239, 56, 1, 12, 65, 22, 19, 7, 4,168,225, 30, 16,104,113, 37,145, 35, 71,142,167, 77,154, 52,161, 97,175,110,160,197, 85,
+ 8, 7, 25,130, 33, 74,183,120, 80,164, 76,155, 21, 74,177,120,176,141, 8, 78, 52,218, 40,134,155,155,219, 56, 72,167,118, 97,
+199,225, 34,184,159,184,203,250,211, 86,129, 3, 3, 19, 55, 50,176, 79,164, 79,159,254, 14, 38,188, 37, 0,133,187, 0, 76,198,
+161,238, 49,244,212, 95, 29, 36, 72,151, 6,230, 28, 32, 9,168, 41,149,162, 58, 18,187,251,156, 6, 90,164, 9, 58, 1, 48, 92,
+127, 10, 21,166,146,120,142,149, 88, 0, 13,247,217, 47,168,234,133,148,139,210, 40,186,166,176,123, 0, 64,149,197,160,250,134,
+210, 44,214,151, 60, 35, 47, 9,170, 9,230,217,214,156,200, 97,243,245, 18, 68,108,109,172,248, 18,227,208,103,123,199,231, 4,
+ 90, 84, 23, 82,146,101, 6,200,242,127,214, 71,145,104,133, 6,104,177,175,149, 42,158,241,241,217, 67, 13,229,192,206,129,242,
+252,233, 25,165, 91, 93, 56,189, 68, 26, 55,170,165, 0,106,216, 60, 42,139, 54, 72,154,185,129,193,238, 97, 13,180, 6, 13,170,
+ 27,181,104,193, 88,191, 76, 24,215, 97,253,149,139,155, 55, 78,153,208, 97, 75,155,230, 25, 70, 83,141,248,225, 69,223,138, 52,
+144,247,216, 56, 86,188, 30,156,148,230,141, 18,111,161,115, 83,173,198,128,106, 60, 98,129,220, 81, 58,141,255,163,245,154, 75,
+231, 86,109,154, 52,190,229,182, 38, 63,166,250,227, 9,212,136, 35,126, 47, 51,210,243,240,212, 93, 19, 71,231, 29,187,123, 67,
+246,226,244,179,165, 69,239,107,190, 15,160,213,121,118,230,204,113, 0,154,202, 63, 94,178, 68, 81,135, 65,133,152,103,146,201,
+ 20, 13, 77,148, 21,169, 20,193,214,192,200,145, 11,172,252,123, 65,100, 26, 28, 41, 82, 57,222,199,179,157,176,237, 52,150,117,
+253, 84, 96,112,164, 89,179,206,111,118,236, 80,128, 22, 85,133, 4, 23,150, 32, 75, 29,251, 57,166,170, 90,150, 84, 46, 46, 14,
+129,150, 74,211, 18,104, 17,108,169,137, 2, 0,246, 37, 74,241, 9,180,168,193,208, 2, 90, 42, 77,218,100,113,161,103,125,112,
+ 92,225,156,196,121,138,227, 54,231,185,116,241,227,223,118, 4,180, 84,154, 41,147, 39,127,192,133,176,229, 65, 62,112,225, 74,
+224, 70,193, 5,164,125,126, 43,230,204, 25,174, 5,180, 44,249,169, 2, 45,142,123, 28,243, 56, 55, 17,104,146,174, 58,254,177,
+254,177,163, 70,117, 40, 80, 8,107,223,180,133, 69,194, 74,243, 11, 63,111, 27,100,217, 43, 4,129, 22, 37, 25,170, 26, 78,149,
+100, 81,162, 97, 9, 96, 56,129,115, 34, 38, 16,193,132,235,180,234, 80,149,104,217, 2, 90, 92,149,106, 1, 45,170, 1, 89, 30,
+126,112, 59,119,238, 84, 58, 47,203, 72,116, 79, 73, 6, 59,159,170, 23,167,132,135, 32, 65, 75,117,136,186, 31,226,135,198, 73,
+250,175,191,254,226,138,131, 42, 50,197, 96, 27,198,234, 2,213,148, 64, 21, 70,251, 36,101,165,195,221, 77,124, 70, 11,104,160,
+227, 62,132,116,196, 71, 5, 89,234, 47,234,126,143, 98,105, 24,239,190,170, 80,161,194, 59,216, 72, 41,128, 67,143,234,144,190,
+204,184,210, 96, 93,185,250, 34,208, 98, 61, 9,178, 8, 12, 73,135, 31, 14, 19, 1,169,142, 54,178,172, 70, 33,184,224,184,193,
+ 54,166,248,152, 31, 26, 92, 51, 72,129, 2, 5,110, 32,147,245, 46, 33,135,253,217,218, 70,205, 30,208, 34, 48,212,146,104, 81,
+117, 8,169,154,205,149,157, 58, 0,177,239, 82, 18, 69,176, 76,126,194,142,129, 54, 97, 31, 97, 95,213,213, 65, 65,163, 2,164,
+221, 83,213,154, 28,116, 56,136,113,133,199, 1,150,110, 61,104,163,129, 93,161,202,192, 27,232,138, 34,234, 23,254,144, 63,235,
+235, 62,167,234,144, 54, 89, 4, 87,148,100,241,119,231,106,215, 80,169, 14, 3, 25, 80,164, 89,253,236,126,187,182, 77,144,119,
+111,159, 41, 96,139,146,173, 85,203, 6,227,187,172, 40, 80,189, 43, 64, 11, 59,161,233, 46, 70, 23,208, 66,255,136,156, 35,115,
+196,246, 99, 70,182, 91,126,249,194,150,213, 4, 91,148,108, 61,191, 51, 45,171, 98,179, 5, 3,121,238, 70,156, 50,182,145,162,
+ 62,108,223, 34,195, 13,122,144,183, 69, 60,104,131, 1, 28,188,230,204, 98,106,247,199,168,182,203, 46,157,223,188,130, 96,171,
+ 98,153,200,191, 30,218,147, 41,207,225,253,110,133,170, 86,138, 49,241,242,185, 21,171,202,149,142, 58,252,193,229, 44,137,232,
+212,244,179, 54,240,103, 38, 14,251,172,102,240,153,149,106,100,140, 24,197,232, 4,148,175, 27, 24, 35, 70, 42,168, 7, 83,171,
+175,166,141, 22,213,135,252,223, 51,109,218,168,195,163, 68,169, 72, 73, 22, 37, 90,182,138,167,170,207, 30, 44, 93,218,245,241,
+172, 89, 63,170, 64,139,128, 69,149,100, 17,100, 81,211,162,130, 44,142,251, 28, 3, 0,180, 94,233,161,169, 23,104, 81,227,160,
+165, 58, 84,203, 73,163,119,206, 61,150, 7, 23,197, 42,200, 98,217,105,155,202, 49, 42,102,244,232,239,245,148,179,101,173, 90,
+195,127,172, 83,231,111,149, 5, 14, 21,100,169, 54,138, 52,151, 1,112, 11,112,193, 2, 99,112,244,232, 77,245,208, 84, 85,135,
+148,104,169,116, 41,217,226,188,202, 57,149, 27,159, 56,246,115, 46,129,234,208, 38, 63, 63,115,183,250, 86,200,235, 83, 29, 90,
+214,134, 19, 56, 17, 45,129,144, 22,200, 98, 62,118, 32, 29,147,184, 23, 39, 47, 75, 27, 45, 71, 64,139,106, 26, 45,160, 69,195,
+118,250,206,162,148,136, 98,100, 74,156, 40,246, 37, 72,226, 53, 2, 14, 2, 15,138,145,249,110,172, 78,252,181,140,225,113, 31,
+ 90,172,193,138,162,158, 31, 51, 39, 86,174, 34, 40,113, 34,226,230, 10,164,100,201,146,138,170,139,192, 6, 0,140, 6,246,112,
+ 76,108,255,160, 91, 11,128,191, 43,214, 32,139,255,161, 58, 51, 67, 21,249, 22, 18,164,103, 4, 5, 76, 4, 28,122,129, 22,203,
+ 64, 21, 33, 19, 12,243,149,103,249, 81, 80, 13, 7,187, 37, 5, 8,178,172, 3, 7, 14,212,211, 70,193, 42, 1, 9,219, 21, 74,
+ 1, 9,226,184,169,128, 70,156,144,118,217, 52, 48,117, 84,255,240, 4, 90,120,143, 98, 12,207,129,148, 0, 95,181,203,224,234,
+139,160,144,210, 65,168,100,149,118,227,132,139,221,156, 10, 95,224, 7,139, 34,127,187,198,240,152,148,135, 0,240,126,176,222,
+ 21,203,190, 68, 32, 76, 91,188, 95,127,253, 85,217,205, 70, 27, 66, 72, 51,253,208,238,216, 69,254,175, 57, 62,171, 49, 60, 13,
+223,105,147, 69, 41, 22, 19,207,157, 49,134,183, 6, 47, 67, 6,119,188,249,224,174,167, 16,108, 29, 63, 56, 60, 72,141,216,190,
+109, 13,169, 89,179,166,212,175, 95,159,109,238,112, 67, 73,246, 76,145, 90,100,115,139, 56,144,191, 4, 89,163, 71, 16, 16,109,
+ 89, 70,176, 69,201, 22,213,136,222,143, 22,166,161,129,252,235,167,179, 93,233,250, 97,196,160,239, 21,160,213,229,231, 44, 79,
+237, 2,173, 64, 39,176,112,157, 49, 29,180,150, 94, 58,183,117, 41,193, 86,129, 60, 81, 58, 82,141,120, 29, 54, 91,251,214,167,
+ 72, 93,162, 72,228, 65,151,206,175, 95, 80, 40, 79,228,254,158,238,213, 98,218,163,247,173,244, 48,216,104,149, 26, 17, 51,102,
+169, 17,113,227,166, 3,128,202,161,150,123,104,180,104,233, 41,197, 26, 24, 37, 74, 62, 24,192,187,169,106, 67,236,224, 75, 55,
+ 40, 94,188,156,138,161,124,164, 72,213,109,213,115, 16,141,225,225,140,244,253,163, 71,125,207,182,109,219,156,192,128, 70,239,
+ 92, 56, 82, 16,160,130, 44,213, 76,132, 32,139,227, 62, 23,151,169,146, 39,183, 41,209,180,166,169, 23,104, 81,250,142,149, 21,
+119,153,135, 56, 66,208,180, 2, 90, 4, 47, 44, 27,133, 1, 4, 89, 43, 86,172, 80, 22,242, 76, 0, 90,116, 19,164, 73,147,118,
+ 95, 41,147, 37,123, 68,215, 66,156,159, 56,175,113,145, 77,154,234,252, 68,115,159,114,101,203,250, 99,247,135,205, 57,201, 22,
+ 63, 85,137,150, 35,160, 69,205, 78,204,168, 81, 29, 74,136,191,149,126,250,213,148,147, 64,139, 0,133, 8,153, 43, 5, 85, 74,
+ 68,228, 76, 68, 78, 53, 21, 37, 89,156,228, 56,217,113,114,226,100,170, 81,129,251,236,252,164,193,143,195, 18,112, 89, 74,180,
+250,245,235, 23, 4, 22, 64,239,190, 6,205, 32,247, 14, 92,205,176,179, 17, 20,168,146, 44,181,140, 44, 31,223, 71, 87, 16,160,
+167,181,187, 41, 62,242, 61,167,106,139, 31, 44,221, 14,208,198,135, 70,223, 52,184,239,221,187,183,162, 58,228,206, 72,130, 23,
+230, 5,205,248,142,202,137, 1,255, 17, 12,169,207, 97,245,114, 26,118, 36,231,240,236, 37, 24,148, 95, 3, 0,184, 13, 48,244,
+ 0, 19,182, 63,212,122, 79,160,138,123, 82,182,108,217,231,229,202,149,123, 9,233,139, 77, 91, 0,203,247,208, 9,169,106,147,
+ 69,222, 18,100, 89,218,100,177,140,170,141, 0,127,117,180, 81,176,106,192, 40,252, 10, 37, 67, 4,176,108, 51,218, 67,125, 78,
+160, 69,176,168, 37,209, 10, 44, 96, 62, 26,172,179, 92,148,232,177,221,185, 59,148, 18, 55,174,190,104,192, 79, 85, 33, 37, 80,
+ 77,155, 54,165,109, 22, 85,125, 14,221, 59, 0, 12,223,181,220, 93,170, 14, 58,236,239,172, 55, 93,122, 16,176, 82, 58, 6, 59,
+ 45,129,107, 14,182,189,205, 65,247,171,249,144,117, 20, 36, 84,238, 29,224,184, 84, 9,197,227, 32, 92, 15, 95, 29,158,238, 29,
+ 84,127, 95, 42,120,185,124, 97,219,202, 33,131, 59,220,108,240, 99,102,191,211, 7,234,203,157, 75,131,228,233,253,185, 50,247,
+175,118, 82,164, 72, 17,186, 17,161,209,178,205,221,134, 42, 91, 8,178, 62,153, 47, 44,203,145,217,244,151, 10,178,248, 75,208,
+ 69, 53, 34,109,182,110,222,156, 17,207,235,198,159, 73,233,250, 97,209,220,250,249, 6,246,251, 78, 1, 90, 61, 58,231,133,100,
+193,246,238, 75,181,172, 83,198, 53, 81, 64, 22,193, 22, 37, 91, 43,177, 83, 17,234,198,200, 52,144,111, 88, 47,231, 95,116,253,
+ 64, 63, 91, 57, 51, 71, 28, 5,195,121, 37, 92, 15,202,166,107, 71,167,142,166,253,226, 89,224,162, 33, 14,237,180,230,149, 46,
+ 29,125, 88,140, 24,133, 85,169, 22, 11, 66, 85,225, 12,216, 98,169,133,130,189, 65, 12,168, 5,139,193,183, 86,116,128,172,218,
+ 0, 91,153,236,128,141,191,221, 59,136, 12,120,188,104, 81,251, 7,147, 38,213, 75,153, 34,197, 75,206, 61,150, 32,139,243,138,
+ 10,178,184, 8,227, 56,136,124, 54,199, 80,128,141, 96, 52,227, 68,143,254,144,223, 59,231, 58,123,170, 67,142,165, 92,108,161,
+113,232,172,217, 22, 40, 10, 70,147, 46, 28,184, 48,229,193,178, 80,195, 64,250, 92,180, 17,100,209,158,144, 54,174, 28, 83, 18,
+ 39, 76,120, 84, 15, 77,214,125,209,200,145,173,147,185,184,188,227,226,159, 52, 45, 65, 22,231, 39,110,216,225, 66, 59, 62, 34,
+153,232,165,249, 49,208, 70,203, 17,208,162,253,111,244,104,209, 52,231,164, 47,222,233,190,174, 23, 90, 74,181,180, 75,198, 9,
+156, 64, 75, 15,200, 82, 39, 39, 27,147,184,245,118,221,102,144,144,188,227,118, 81, 2, 53,130, 55, 26, 47, 18, 0, 17,104, 81,
+ 2,193,173,254,148,208,192,195, 51, 39, 49,162,124,235,184,107, 54, 29,150, 66,194,225, 75,117, 33, 69,181,170,241, 59,223, 65,
+219, 49, 30,124, 15,108,138,104, 71,165,215, 97,105, 37,168, 7,223,114,130,165,248,148,182, 57,203,151, 47, 87,212, 71, 52,132,
+167,202,144, 9,124, 98, 25, 43,217,224,168,117, 57, 11,192, 1,235, 69,128,170,215, 52, 36, 39, 15,212,157, 29, 16,205, 6,192,
+112,247, 21, 60,208, 43,246, 0,112,232,249, 26,147,132, 46,135,165,108, 39,126,196,228, 37,219,139, 31, 24, 15,214,157,192,139,
+252,228,225, 68, 27, 5,171, 10,156,116, 94,225, 74,145, 70,235,180, 77, 35, 47, 96,159,165, 37,209, 10,209, 70,232, 27,143, 45,
+ 69,232,182, 84,135, 4,173,129, 54, 90,116,195, 96,125,216,106,247,188,168,255, 73,168,118, 95,115,224, 34, 79,169, 66,230, 96,
+ 67, 27, 55,130, 33, 0, 87, 31,248, 57, 59, 3, 98,154, 14, 75,209,222,123,108, 57,210,165,100,148,117,231,198, 7, 2, 89,238,
+184, 36,248,230, 32, 9,218,214,187, 77,191, 57, 39,147,223,138,195, 82,123,224, 5,109, 91, 36,127,238,100,143, 61,214,214, 8,
+224,110,196, 69, 51, 43, 9,140,224, 9,172,237,129,172,160, 54, 82,129,214,148,177, 77, 20, 73,150, 10,178,168, 70,164,253,214,
+160, 65,101, 34,115, 55,226,202,149,131,162,210,253,195,168, 81,229,227,117,237,144,211,143, 33,122,186,118,200,245,145,129,168,
+ 3, 59,106,176,118, 87,203,122,250,216,156,165, 4, 91, 4,135, 42, 40,101,160,105,130,170, 79,112,253, 64, 63, 91,116,106,170,
+250,221,170,135, 93,138, 52,160,183, 69, 83,123,212,214,149,227,179,247, 79,168, 0, 75,193, 93, 67,169, 73,149, 42, 69,131, 33,
+124,113, 2, 40,218, 96,169,165,163, 52, 11, 41, 21, 65, 22,193, 22,239, 19,104, 97, 97,105,105,239, 22,172,156,116, 46,122, 98,
+202,148,222, 64, 44,191, 61, 91,177,162, 13, 93, 56,168,243, 19,199, 39,130, 44,130, 14, 46,140, 85,144,197,241,198,106, 78,178,
+ 75, 51,107,234,212,199,168, 22,164,102,134,223, 59,199, 59, 2, 46,154,140,112,236,167,118,133, 82,242, 74,149, 42, 81,203,194,
+200, 37,234, 97,151,102,195, 50,101, 22,211,133, 3, 23,249,148,180, 19, 24, 17,100,113, 65, 72,144, 69, 77, 3,231,186, 66, 5,
+ 11,250, 49,170,129, 30,154,172,251, 67, 56,106,237, 94,175,222,239,240, 73,232,207, 5, 38,203,202,185,132,227, 19,233,114, 12,
+101,121, 49,135,124, 4, 77,213,230,205, 33, 63, 73, 51,125,218,180, 14, 85,135,180, 77, 5, 77, 75, 97,202,231,232, 75,186, 58,
+241, 87,154,201,177,195, 82, 91,133,230, 4,206, 78, 75,209, 36, 59, 52, 19,213, 92,236,196,156,140, 40,197, 98,167,180,220, 81,
+161, 3,104,241, 85, 52,246,156, 10, 71,149, 31,185,219,142, 31, 8, 85, 82,148, 18,177, 33, 9,184,240,110,118,144,169,129,121,
+245, 76,184,204, 83,150,206, 72, 49,193,154,185,202, 97,199,102, 98, 71,132,116,195, 63, 80,146,101,207,120,217, 94,135,169, 76,
+105, 85,135, 14, 29,204,148, 98,176, 3,115,130,165, 3,196, 6, 13, 26,144,166,179, 97,125, 34,224,153, 22,168,223, 67, 24,126,
+251, 19,180, 16, 28, 64, 21,229, 69, 80, 0, 41,153, 63,234,240, 16,187,229, 90,160, 62,186, 66,240,208, 27,191,106,131,198,250,
+ 18, 96,168,254,165,216, 78, 84,113,133,162,141,130,120, 14,231,165,215, 57, 64,208,185, 40, 12,229, 21, 32, 19, 24,126,199, 81,
+ 95, 15,193, 79,168, 69, 55, 82, 5,173, 30,148, 52,210,200,146, 54,115, 52,176, 39, 56,162,212,176, 94,189,122,156, 36, 55,218,
+ 32,238,232,163,102, 8,158, 25, 72, 39, 24, 77, 0,210, 67,198,231, 60, 5,195,247,185,160,163, 59, 4, 15, 12,225,203,227,253,
+111, 84,137,160, 90, 86,242,151,101,103,123, 81,170,201, 65,141,174, 71, 0, 66, 95,129,190,181,103,252,207, 49,248,124, 86,154,
+223, 74, 8, 30, 71,224, 5,237, 16, 3, 14,126,135,229,200,154,228,124,146, 36,177,182,226,191,163,157,145, 33,128,214,153,163,
+179,151, 17,108, 81,178, 69, 53,162,189, 32,210,129, 1,168,251,119,108,233,246,188,113,157, 68,191,218,155, 28,173, 99, 66, 90,
+123,209,103,192,105, 21, 92,209,131, 60, 99, 34,242, 63, 93, 66,216,163, 25, 78,147,203,103,237, 75,129,101,140, 64, 55, 15,176,
+173, 42,180,171,127,255,200, 84, 21,210,224, 29,233, 59,134,219,129, 23,248,202, 80, 43,230, 34,248,162, 74, 17,118, 93, 13, 3,
+129,152,229,152,103, 93, 78, 37, 4,207,222, 65,131,122,127,122,255,190, 63,253,100,113,110,178, 4, 89, 28, 83, 44, 65,150, 22,
+208,226, 24,171,210,244,121,241,226,247, 70,181,106,173,201,157, 43,151, 47,165, 80, 28, 59,105,130,194, 77, 58,180,161, 34,224,
+ 74, 16, 55,174, 15,158,233,130, 20, 36,149,195,185,221,114,126,240,245,253,213, 53, 67,134,251, 0,104,202,166, 28,210,229, 88,
+199,141, 91,156,235, 40,189,135,153, 72, 0,198, 43,198,146,213, 93,119,250,201,122,187,127,127,139,190, 63,254, 56, 4,134,239,
+239,160,122, 12,160, 13,169, 42,201,162, 0,128, 11,108,104,165,184, 67, 48,109, 96,155, 56,228, 39,105,102,117,115,123,166,250,
+ 30,228,194,156,130, 11, 2, 67, 2, 56, 74,239, 73, 19,223,152,165, 52,239,115,244,165,112,234,230,255, 8, 25,231,129, 22, 3,
+ 68,115, 18,103,162,147, 75, 38,238, 88, 83, 19,237,177,152, 8,174,212, 4, 0,225, 76, 80,105, 14,132, 43,161, 34, 11,224,228,
+ 77, 21, 15,118,114, 5,224,218, 10,189,131,164, 13, 86,198,165,253, 21,141,221,185,179,144,137,231,129, 54, 89,142,212,133,142,
+ 58, 76,188, 64,154, 7,209,201,222, 49,129,230,193, 64,154,142, 2, 96, 59,162, 25, 19, 64, 96, 2, 64,204, 83,124,116, 1,240,
+201,245, 0,124,125,138,213,130,211, 65,165, 97,132,175,180,211,103,106, 35, 19,156,152,186, 19, 92, 82, 29, 75, 53, 29,165,142,
+ 0, 92,238, 26,221,216, 86,221,147, 0,160, 93,128,221,216, 91,170, 34, 57, 72,114, 80,228,234,145, 96, 24, 3, 90, 64,233,210,
+165, 95, 3,136, 94, 0,237, 36, 78, 2,173,208,126, 85, 33,202, 9,176, 85, 6,170,209,199,240,203,230,203, 21, 50, 65,151,234,
+167,135,146, 82, 74, 35,225,121,220, 39, 48,200,116,153,127,170,156,161,173,176,173, 73,252, 91, 9, 42,173, 5, 94,156,224, 73,
+ 8,160, 69,245,161,154, 40,229,114, 4,180, 44,239,217, 5, 90, 80,169, 42,170, 85,203,100,165,102, 85,157,154, 50, 92, 15, 65,
+ 22,255, 91,213,225,115, 76,100, 95,138,102, 4, 0,171,242, 0, 81, 45,135,197,142,157,157,198,238,148, 94,225, 87, 9, 26,175,
+ 74,177,134, 68,140, 88,175,103,164, 72,220, 0,144, 82, 71,221,149, 32,200, 19,210,164,233,151, 54, 85,170, 55, 4, 86, 20, 0,
+ 80,133, 72,205, 5, 23,152,214,170,127, 71, 18, 45, 21, 20,170, 52,111,108,216,208,227,236,174, 93,191,126, 95,177,226, 14,216,
+224,126,224, 34,144, 96, 40,109,234,212, 31, 32, 29,152,135,252,182,230, 16, 91,252, 12, 42,231,186,113,227,134,100,202,152,241,
+ 62, 54, 78,153,213,112,118, 52, 65,160, 26,178,120,177, 98,244,238,238,233,108,221, 89,206, 23, 23, 47,246,240,123,246,172,251,
+166, 21, 43,134, 96, 39,226,211, 18,197,139,155,185,200,166, 36,139,170, 72,218,145, 98,193, 74,233,147,186, 89,195, 97, 57, 73,
+115, 80,175, 94,139, 10, 66,186, 70,119, 59, 28,251,168, 17, 33,240, 34,136,131,109,234,123,204, 53,143, 33, 4,168, 97,175,207,
+ 59,241,253,253,155,179, 58,167, 58, 12, 39, 78,232,249,168, 11,226, 93,148, 96, 48,241, 92,235,208, 67, 83,139,134,245,253,127,
+138,102, 90,116,222,109, 48,122,247, 64,129,212,149,135,163,178,255, 19,229,140,140,143,111, 38, 60,187, 95, 4, 80,186,152, 51,
+103,206,153, 40, 96, 8, 95, 55, 58, 6, 73,102,225, 71, 95, 10, 3, 64,111,168,233,182,160,238,119, 33,129,186, 11, 80,191, 5,
+ 0,182, 55,239, 89, 12, 12,255,100, 27,177,156, 85, 80,198, 53, 88, 76,156,199, 96,253, 0, 64,246, 1,202,121, 30, 0,153, 94,
+161, 41,117,176,231, 21,252,159,104, 35,103,251, 59,243, 7,149, 51, 71, 38, 83,109, 71,128,192,146,184,133, 61,151, 2, 34,248,
+172,147, 3,111, 68,250,201, 10,244,149,165,233, 26,193,178,156,214,239,214, 99, 35,102,135, 49, 65,117, 87,141,225, 9,174,212,
+164, 37,209,210, 3,180,244, 54, 72, 14, 4,160,134, 20,237, 87,134,237,177,241,204, 55,215,151,172,235, 0, 96,149, 12,206, 72,
+107, 64,245,215,147, 14, 73, 33, 65,106,141,243, 62, 86, 54, 89,186,164,247, 42,109,218,125,165,128,199,247, 84, 73,147,190, 70,
+242, 73,237,226,226,147, 38, 89,178,215, 52,124,167, 77,150,131,197,191, 93,126,146,230, 32,104, 69,160,242,108,129,242,245,109,
+ 31, 57,242,240, 52, 17, 34,108,195,138,111, 53, 12, 59,179, 58,104, 79, 77,154,216,113,249, 83,145,104,209, 54,100,192,120, 23,
+ 43, 70,140,247, 72,239,146, 65, 40, 1, 65, 64, 39,208,117,186,238, 44, 39,119, 98,210,237, 5, 19,203,156,211,100, 26, 0,155,
+172, 27, 84, 23, 98, 17,248,158, 32,139, 18,122, 61,223,166,101,221,155, 71,142, 60, 54, 99,212,168,199, 83, 39, 76,120,203, 37,
+ 81,162,167,160,249, 0,229, 60, 12, 58,127, 34,101,210, 57,206,235,237,254, 70,190,112,226,192, 55, 63, 80,132,129, 15, 70,221,
+195,192,188,127,227,164, 19, 6,118, 24,125, 41, 12,204, 51,250, 82, 48, 14,252, 99,125,137, 97,120, 44,141,227, 53,154,244, 31,
+ 43,167,147, 93,237,107, 43, 39,109,178,184,104,183, 94, 8,126,109,229,116,146,205,223,100,118,231,124,106,133,161,138,223, 74,
+227, 26,229, 12, 67, 35, 27, 19,217,215, 49,145, 57,217,132, 70,159,119,146, 97, 6, 48,176,203, 1,163, 47, 25,125, 41,124, 57,
+240,239,160, 22, 12,104,241, 35,177,149,156,169,170, 61, 26,142,174,107,209, 55,104,218,110,151,208,182,151,193, 79,131,159,122,
+251,128,241,109,218,231,128, 94, 30, 90,230, 51,248,105,240,211, 22, 7,254,203,125, 73,229, 71,104,231, 51,173,111,234,159,184,
+239,188,195,210,112, 42,165,177,210, 9, 39, 70, 6,146, 49,248,105,240, 51,188, 56, 96,244,165,240,226,228,223,116, 12,126, 26,
+252, 12, 47, 14,252,151,251, 82,120,241,240, 63, 69,231, 91,238, 48,201,208, 82, 76,122, 14, 91,121,191,229,186,235,169,179,163,
+ 60,255,182,186, 59,211, 23,190, 68,221, 83,129,249, 76,122, 15,230, 77, 97,149,249, 75,148, 83,111,249,254, 75,125,201, 25,158,
+ 24,109,228, 12,183,180,243, 26,252,212,230,145, 51, 57, 62, 7, 63,157,121,191,145, 55,144, 3,182, 26, 66,239,164,101, 47,159,
+158,198,213,251, 14,181,161,172,105,142,140, 16,193,244,137, 9, 25, 16, 37,194,225, 97, 47,175,158,114, 90, 19, 78, 9, 23, 25,
+ 93,224,212,117, 49,220, 61,112, 71,138,139,147,147, 99,102,184, 71,152, 68, 39,154, 76, 60,199,243,153, 53,202,175,183,156,220,
+ 29,211, 14,110, 45,118,115, 23, 30,118,183,236,198,255,159,145,156,218, 53, 99, 81, 22,238,228, 97,248,154,161, 72,121,116,124,
+ 49, 65,229,116,201, 89,115, 69,210,156, 53,207, 32,157, 75,156,171,122,102,254,242, 63,175,235,160, 99,153, 69, 79,221,157,233,
+ 11,164,173,135,166,147,197, 12, 70,211,217,242,140, 71, 3, 5,216,232,203,159,187,156,206,214,209, 94,126,163,156,225,197,201,
+191,233, 24,252, 52,248, 25, 94, 28,248, 28,125, 41,188,202,246,237,210,193,118,247, 31, 49,201,238, 64,218,206,115, 29, 53, 9,
+ 45,128,113, 52,153,104, 53,174,229,179, 99,117,148,209,122,240, 73,198, 73, 73,117, 86,137,243, 0,108,237,159,140, 58,143,180,
+ 78,188,206,251, 22,121, 9,204, 84, 41,152, 86, 57,173,139,150, 12,161, 98, 86,194, 55,140, 59, 66,234,184,195, 17,159, 59, 2,
+ 58, 47, 71, 38, 75, 73,132, 93,154,216,130,219,168,112,145,226,158,123, 15, 28,189,122,229,218,237,135, 23, 46,223,188,189,113,
+235,206,227,185,114,231, 57,198,123, 14,248, 96, 77, 83, 1, 84,216, 26,188, 27, 91,132,239,243, 23,255,219,195,127,202, 6,196,
+186,186, 13,231,165, 94,136, 47,246,114,239,222,189, 15, 90,181,106,117, 45, 66,132, 8,116,203, 97,189, 77,223,154,166, 45, 9,
+204, 0, 56,171,221,138,144, 25, 30,112,111, 49,220,170,124,182,242, 7,209, 36,168,122,242,202, 44, 76, 56, 87,126, 3,207,207,
+232,108,111, 53,155, 86, 27,133,232, 11, 0,154,150,110, 56,190,180, 36, 51, 68,121, 80, 17, 53,118, 99, 65,156, 79, 9, 76, 60,
+231,145, 60, 70,244,232,225,213, 63,245,176, 86,139,159,122,104, 88,231, 49,104,134,134,107,246,159, 49,248,105,240, 51,188, 56,
+240, 57,250, 82,120,149,237,159,160,147, 63,240,165,156,179,105,175,101,173, 69,208, 87, 38,134, 40,129,115, 56, 79, 38,156,115,
+ 2,214, 58, 44, 27, 34,196, 36, 1,103,165,219,171, 85,171,230,110,153,120,205, 1,120,225,251, 28, 53,174,242, 14,179,217, 79,
+193, 62,164,131,208, 54,107, 0,144,186,164, 74,149, 42,161,131,194,218, 45,103,196,136, 17, 2, 54,110,220,184, 29,225, 24,220,
+173, 19,175,243,190, 51, 64,171,133,201, 20,189, 65,244,232,101,154, 1,252, 52,142, 18,165, 35, 83,243, 24, 49, 26,102,141, 31,
+127,252,253,187,119, 55, 35, 48,178, 59, 98,235,185, 35,172,130, 59,232,111,132,132,171,163, 69,185,237,213, 61, 75,209, 98, 37,
+ 78,188,126,227,243,254,222,237,187,222,191,119,233,191,189, 71,247, 65,235,166,205, 93,185,249,224,177,179, 71,178,101,203,121,
+ 4, 52, 52,195,145, 32, 15, 1,211,122,132,152,185,137,160,167, 15, 16,164,251, 5,188, 2,223,134,179,189,135,112, 90,250, 6,
+193, 74,253,251,247,239,111,166,167,124, 56,237, 52,195,187,177, 63, 60,228,159,197, 51,244,150,108,121, 88,150, 51, 8,248, 70,
+140, 24,113, 28,226, 19,198,102, 2,128, 27,166, 2, 45, 72,222,198,168,215,153,199,142, 52, 49,164, 68, 43, 87,205,119, 10,192,
+194,175,165, 68, 11,125,115, 8,125, 96,217, 73,150, 65,160,181, 6,138, 96,125, 22,253, 84,170, 87,175,126, 28,253,169, 55,128,
+231, 95, 90,229,180,211,223,178,192,193,236, 29,248, 16, 11, 22,198, 40,105,158,218,197,179,149,106, 54, 48,113,142,154,101,108,
+ 60,167,150, 51, 88,121,208,247, 24, 69,161, 95, 96,254, 25,112, 40,235,201,132,255, 8, 41,135,189,244,241,226,213, 5,208, 10,
+242,198, 31, 40,213, 10,237, 66, 64,235, 91,215,250, 54,245, 60,111, 43,143, 86, 27,133,134,174, 65, 51, 52, 92,179,255,140,193,
+ 79,131,159,225,203,129,111,147,154,186,203,208,250,215,185,218, 96,226, 58, 76,144,133, 16, 36, 4, 90,116, 98,166,117, 88, 3,
+152, 32, 80, 98, 15,192,104,128, 23,173,193,156, 19, 81,128, 10,180,212,119,192,203,183,123,169, 82,165, 56,241, 22,181, 83, 96,
+ 91,146,183, 0, 62, 15,105,203, 37, 11, 73,214,114,130, 45,252, 95,174, 94,227,125,230,227,123, 65,219, 82,205, 24, 98,240,169,
+139,176, 32, 77,162, 69,107,183,103,214,172, 86, 62, 79,158,180,195, 12,216,137,233,214,197,139,157,127,110,209,226, 56,188, 18,
+159,189,122,246,236, 46,196,213,115, 71, 56, 5,119,128, 28,119,168, 16,233,145, 88, 61,108, 14,104, 80, 19, 78,223,181,247,208,
+229,123,183,239,189,184,122,230,252,163, 65, 29,122,109, 28,220,119,248,234,223,135, 79, 89,176,112,249,150,149, 11,150,173,217,
+192, 60, 58,234,222, 5,113,189,174, 35,110,160, 63, 66, 67,152, 17,142,198,220,168, 81, 35, 51,188, 2,155,221,221,221,223, 35,
+180,131,121,198,140, 25,102,196,124, 52,119,236,216,209, 92,187,118,109, 51, 60,189,223, 64,156, 46,123, 17, 1,172,129, 65, 0,
+156, 61,238, 65, 32,109, 15,196,178,244,168, 80,161,130, 71,249,242,229, 61,106,214,172,233, 1,105,158, 7,226, 64,238,113, 6,
+184,170,146, 45,254, 90,214,141, 0, 11,225,162, 30, 1,200, 61,130, 55,247, 71,240, 68,255, 8,225, 36,148,196,123, 90,252,180,
+226,211,200,106,213,170, 6, 16,100, 33, 96,181, 55,188,196,123, 34,216,248, 89, 55,183, 76,161, 1, 48, 89, 16, 43,237, 25,189,
+ 87, 35, 10,194, 19,203,247,228, 46,223,106,232,203,215, 62,175,123, 14,249,115, 69,210,236,181,114, 91,149,193, 26,184,178,111,
+ 50,150,227, 99,132,151,242, 68, 95,172,137,252,115,174, 95,191,238,201,132,243,217,144,182, 38,133,167,253,221,104, 35,175,136,
+ 17, 34, 40,139, 14,173,254,169,245, 49,235,184,111, 76,184, 58,152,228, 68, 22,131,159, 78, 48, 75, 71, 86,131,159, 58,152,228,
+ 68,150,207,193, 79, 39, 94,255,213,101,181,150,100, 5,247,163,133, 73, 84,212,228,168,232, 24,208,215, 34, 92,138, 39, 38, 98,
+ 14,238,107,157,173, 38,164, 21, 83, 57,224,115, 50, 69,104,151,235,101,203,150,117,183,149,120, 79, 5, 47,124,198,201,247,140,
+226, 59,152, 80,198,107, 63,255,252,179, 59,164, 51,238, 8, 92, 77, 85,220, 26, 4,226, 84, 85, 45, 14,201, 82, 45, 72,208, 71,
+ 64,165,102,228,121, 32,208, 10,118,141,249,152,223, 17,193, 58,240,170,219, 35, 91,182,159,125,159, 61,107,247,254,254,253,214,
+247, 86,173,106,112,115,202,148, 58, 30,191,255,222,172, 65,229,202,171, 46, 64,132,133,152, 18,103, 55,204,155,119,110,246,212,
+169, 59, 17,176,216,189,103,207,158, 27,225,229,183,181, 86,253, 1,162, 14, 92,184,116,227,222,175,157,251,109, 29,221,253,183,
+205,127,142,156,228, 62,123,230,226,245,115,151,184, 47, 95,178,218, 99,225,209,147, 23, 8,180, 14,104,209,129,119,246, 19, 8,
+191,240, 8, 64,200,140,144, 56,102,132,138, 48, 99, 50, 55, 51,124, 4, 36, 88,254,136, 67,105, 70,140, 63,115,161, 66,133,204,
+ 0, 76,102,240,211, 12, 64,246, 26,180,223,216,161,173, 0, 95, 21,145,176, 77, 17,135,114, 15, 36,118, 30,119,239,222,245, 56,
+117,234,148, 7,130,125,123, 32, 32,182,146, 32, 49,115, 4,180, 66,188,194, 17,208, 66,104,142, 71,104,175, 43, 54,164, 90,150,
+ 18, 45, 45,150,152, 32, 9,205,133, 32,223,103, 33,201, 59,139, 88, 95,158,144,236,121, 34, 94,217,217,234,213,171,217, 3, 90,
+ 65, 52,241,238,118,232, 23, 15,153,224, 1,127, 56, 3,107, 51,216, 55, 15, 21,104,169,146, 44,151,156, 53,186,109,218,113,248,
+232,163, 39,207,159, 22,172,210,254,143,248,121,106,198,183, 87, 56,216,199,185, 34,136,250,198,179,103,207,122, 62,120,240,192,
+ 19,113, 56, 61, 33,105,243, 4,104, 85, 18, 98,102,122, 2,188,122,226,155, 86, 36, 92, 0, 92,199, 32, 53,204,165, 89, 89, 35,
+131,193, 1,131, 3, 6, 7,254, 65, 14,232,197, 34,255, 96, 17,195,246,106, 86, 80,139, 2, 38,138,153,144, 16, 0,107,120, 18,
+104, 49, 20,139,211, 7,128,195,239, 80, 57,109, 71,112, 94,247,244,233,211, 91,219,230,152,120,141,247,152,135,121,157,126,193,
+223, 15,168,182, 51,145, 16, 66, 37, 63,130,255,206, 65,240,102,247,213,171, 87, 83, 26,213, 75, 15, 77,123,160,202, 22,208,178,
+190,102, 77, 31, 1,204, 98, 82,146, 69,144,229,125,252,120,147,177,245,235,119,200,148, 46,221,229,116,136,150, 94,184, 80,161,
+151,189,186,119,191,119,243,220,185,147,215, 47, 94, 60,121,244,224,193, 51, 19, 48,169, 15, 25, 60,120, 11, 38,121, 70,137, 79,
+164, 85, 94,216, 82,109, 58,119,241,250,245, 81, 99,254,218,120,235,250,173, 59,203, 23,173,222,178,101,251,190,205, 79,158,191,
+188,179,231,224,169,213, 71, 79,156, 91,197, 60, 90,116,160,210,242,129, 20,205,135,146, 42,252,154, 17,122,199,140, 9,220, 12,
+105,160,185, 68,137, 18,126, 13, 27, 54, 52,119,233,210,197, 12,105,148, 25,147,183,185, 72,145, 34,102,168, 14,175, 65, 13,120,
+198, 30,109,168,216,230,168,224, 26,177, 29,111,181,104,209,194,163, 89,179,102, 30,136, 33,230, 1,233,139, 7,236,190, 60, 16,
+235,209, 3,146, 51, 15,208,247, 64,156,193, 91,129, 64, 89,115, 35,130, 35,160, 5, 21,172,181,244, 74,171,250,214,247, 35, 2,
+ 40, 53,195, 66,224,232,236,217,179, 61, 17,240,218,243,207, 63,255,244, 4, 0,246, 68, 44, 49, 79, 4,114,245,166,164,203,209,
+134, 9, 6, 15,135,189,157,160, 44, 2, 94,249,192,182, 77,137,205,198, 3,253, 92,145,104,169,146,172, 30,131,166,173,112, 45,
+218,120,196,141, 59, 15,238,111,219,119,194, 51, 73,206,154,150,193,133, 67,148,157, 18, 43,170,217, 41,193, 66,192, 90, 79, 72,
+239, 60,249,109,242,255,149, 43, 87, 60, 1, 92, 21,144, 53,116,232, 80,126,171,213,157,173,188,145,223,224,128,193, 1,131, 3,
+255, 4, 7,244, 96,145,127,162, 92, 58,222,169, 74,180,236,199, 59,212, 83,185,240, 0, 90,156, 32, 42, 86,172,184,142,224, 4,
+ 17,209,221, 41, 49, 80, 43,192,115, 94,227, 61,230, 97, 94, 29,149,211,204, 2,176,149, 85,165,155, 63,127,254, 5,154, 15, 32,
+ 67,120, 2,173, 38,209,163,151,220,243,215, 95,173,204,143, 30,181, 25, 85,175, 94,199, 36,137, 19,251, 34, 42,186, 63,130,160,
+154, 17,184,211,124,244,200, 17,255,182,173, 91,191,216,179,121,179,231,244, 73,147, 60, 75,231,203,119, 36,115,210,164,139, 80,
+140,244,122,202, 10, 3,237,254,171,214,110, 58,125,248,248,185, 83,115, 23,175, 95,235,243,246,253,107, 63, 63,255, 55,231, 46,
+223,216,117,245,230,253,157,127,205,154,187,145,121,180,104, 65, 13,122, 22,106,214, 7, 80,225,153, 41,189,130,100,132, 0,203,
+ 12,137,142, 25, 82,198,215, 4, 93, 80,247, 41,215, 10, 20, 40, 96,198, 68,111, 6,136,221, 15,186, 8,105,102,255,192,187,211,
+ 1,232,101, 86,237,176,208,206, 57,161,242, 82,164, 88,157, 59,119,246,224,127,245, 30,127,153, 31,212, 52,221, 23, 56, 2, 90,
+216, 84, 16,106,160,133,254,146, 54, 99,198,140, 11,102,206,156,225, 9, 9,156, 39,128,191, 34, 29,130,205,154,231,226,197,139,
+149,115,208, 39,128,225, 70, 0,187, 46, 64, 0,180,188, 8,180, 40,197,154, 55,111,158, 96, 35,129,146, 62,125,250, 36,136, 29,
+169, 0,173, 36,185,106,252,232,190,227,208,145,135, 94,207,158, 36,203, 91,103,192,212,121,235, 60,120,158, 52, 87,141, 14, 90,
+237, 5, 32,232, 6, 32,184, 2, 54,115,158,144, 56,122, 78,156, 56, 81, 1, 88, 88,164,120,162,191,123, 2,184, 30, 75,151, 46,
+221, 47, 90,116,140,251, 6, 7, 12, 14, 24, 28,248, 90, 56,160, 7,139,124, 45,101,181, 42,135,182,109,150,158,202,133, 7,208,
+ 98,193, 48,177,182,133, 68,192,125,231,206,157,238, 80,161,140, 87, 11,203,115, 94,227, 61,230, 9, 47,102, 98,178, 73, 7, 41,
+138, 2,224, 0, 18, 86,234,161,107, 1,180,130,236,177,104,155,101,109,163,101,113,205,174, 27,136,102,177, 99,215,247,190,123,
+183,157,215,166, 77, 13, 50,166, 73,115,125,155,135,135,255,135, 15, 31,204,239,124,125,205,176,121, 51, 63,127,246,204,188, 18,
+118, 81,205, 26, 54,188,221,184, 90,181,249, 7, 86,172,104,217, 52,118,108,152,116,233, 62, 98, 39,113, 73,182,231,252,165,107,
+215,143,159,186,184,111,229,154,205,187,119,239, 59,116,236,209,227,103,199,206, 93,188,114, 24,134,215,123, 65, 41,142, 14,106,
+ 3,155, 52,105,114, 6, 32, 72, 81, 11, 22, 43, 86, 76, 1, 89,180,209,130,234,140,134,240,126, 80,157,249,253,248,227,143,126,
+ 0, 93,119,161,190, 58,140, 93,135,199, 65, 55,154, 14,218, 65, 89, 16,156,186, 7, 34,194,123, 0,116,120,108,217,178,197,131,
+255,157,121, 94,205,235, 8,104,189,120,241,194, 90,117,168, 75,101, 72,176, 95,166, 76,153,195, 71,143, 30,245,132,138, 83, 81,
+205,221,188,121,195,243,220,185,179,158, 80, 65, 43, 18, 35,128, 39, 69,170,133,182,111,224,168,220,224,187, 23,164, 76,130,231,
+ 4, 60, 84,126, 1,176, 21, 9, 23,158, 85,128, 86,186,116,101,162, 87,106,212,103,250,235, 55,190,111,107,182,232, 63,167, 73,
+167,161, 11,120, 94,178,102, 23,168,162, 7,233, 9,186,108, 2, 56,141, 10,122,197, 33, 45, 84,164, 88,144, 14,122,162, 30,153,
+240, 61,197,197,245,152, 0,142,109, 41,201,133,132, 56,116,187, 96, 66,211, 56,198, 51, 6, 7, 12, 14, 24, 28, 8, 5, 7,244,
+ 96,145, 80,144,253, 18,143,132, 93,162, 69, 73, 3, 36, 30,126, 40, 45, 85,140,194,115, 14,228,161, 41, 61,236, 85,226, 1,240,
+172,129,125,142, 59, 38,117,130,170,194, 76, 60,231, 53,222, 99,158,208,208,182,245, 12, 86,254,205,167, 78,157,234, 14,251, 35,
+119,156,255,166,135,174, 10,180,108,237, 54,180,117,205,210,150,203,154,126,163, 40, 81,218, 67,140,209,241,254,188,121,181, 17,
+ 13,221,151,146, 44,130, 44, 63, 72,179,238,221,189,107, 62,176,127,191, 25,246, 73,230, 2,249,242, 61, 63,179,124,121,237,215,
+215,174, 53,228, 51,122,202,105,145, 39, 93,153,178, 21, 78, 61,124,252,236,242,182, 61,135, 55, 30, 61,113,118,139,247,203,215,
+167,191, 43, 91,129,198,209,153,116,210,138, 6,224,116,244,251,239,191, 63,142, 73,251, 46,126,205, 69,139, 22,125, 15, 59, 55,
+179,101, 74,152, 48,161, 25, 42,193,155,160, 73,112, 25, 67, 39,109, 37, 27, 48,111,124,216,119,109,130,125,145,199,129, 3, 7,
+ 20, 27,173, 26, 53,106,108,226,117,103,232, 48,175, 22,208,130,209,250, 35,128,185, 71,231,206,157,211, 45,221, 2, 40,153, 72,
+245, 32,108,250, 0,170,174, 41, 64,235,201,147, 39,158,207,158, 61,243, 52,155,205,138,122, 14, 32,244, 16,250,107, 99, 20,193,
+150, 15,177,160,106,196,143, 31,159,174, 48,100,217,178,101, 2, 0, 43,216, 68,160,164,107,215,174, 9, 54, 57,132, 27,208, 66,
+159,174, 7,158,162,200,199, 60,105,183,181,114,229, 74, 79,124, 67, 27,209, 39, 27, 65,253,187,133, 42,207, 85,171, 86,121, 66,
+138,230, 80,242,232, 44,255,141,252, 6, 7, 12, 14, 24, 28, 8,111, 14,124,195, 64, 43,108,172,192,228, 83, 10, 78, 52,183, 19,
+ 96,169, 7,207, 33,241,160,243,202, 80,237, 60, 0,205,166, 80,117,184,195,184,222, 29,234,167,233, 76, 60,231, 53,222, 11, 91,
+137,255,255, 52, 38,196,239, 49,201,109, 36,128,251,253,247,223,185,139,239, 59, 61,180,195, 83,162, 21, 4,180, 22, 46,172,157,
+ 32,126,124,223,183,111,223,154,153, 96, 16,110,134,116,203,188,116,233, 82,243,220, 57,115,204, 89, 50,103,126,226,119,252,120,
+101,175,243,231,235,195,237, 3,157,129, 58,117,192, 40,125,221,181,235,183, 15,159, 60,123,117,249,149, 27,119,151,223,188,115,
+119, 39,175, 57, 69, 4,238, 39,144,127, 4,129, 20,128, 2, 37, 89,102, 72,159,204,251,246,237, 51, 3,168, 42, 59, 14, 65,243,
+129, 5,205, 56, 48,180, 94, 16, 55,110,220, 97,122,222,131,182,109,188,112,225, 66, 5, 96, 97, 7,158,199,225,195,135, 61, 32,
+193,244,224,117, 61,207, 91,230,113, 4,180, 0,140, 66, 37,209, 2, 24,217,141,205, 13,138,122,144,137,224,133, 96, 11,234, 62,
+207, 49, 99,198,156,160,235, 8,168, 4,117, 69, 12, 0, 79,188,176,161, 64,176, 83, 83,160,198, 83,212,135, 83,166, 76, 17, 72,
+109,233,150, 65, 1, 90, 73,115,212,168, 21, 90,213, 33,159,167,228, 23,210, 50, 5, 96, 1,212,121, 98, 19,131,162,238, 4, 95,
+ 61, 71,142, 28,169, 72,225,184,129, 37, 80, 2,247,147,179, 60, 54,242, 27, 28, 48, 56, 96,112,192,224,192,103,228, 0, 38,157,
+ 4,152, 88, 70,112, 87, 19,140,201, 41, 25, 9, 6,180,184,186,255,227,143, 63, 60,161,250, 25,239,172, 61, 21,242,199,194,106,
+123, 57, 1, 16, 92, 5,108,103,226, 57,175,241, 94, 40,170, 21,204,121, 36,202,157, 7, 59, 12,135,194,118, 69,145,146,209, 93,
+ 2, 12,144,199, 65, 45, 20, 89, 15,237,240,180,209,162, 26,208,251,193,131,182,175,246,237,171, 79,213, 33, 36, 28,254,207,159,
+ 63, 55, 67,162, 99, 94, 6,144,133,178,153,193, 99,191, 28,153, 51, 31,251,120,227, 70,149,163, 11, 23, 54,128,186, 81,143, 67,
+216, 96, 85,201,230,150,230, 82,253, 58,149,222, 87,255,161,148, 79,169,226,185, 94,150, 45,147,255,109,214, 76,169, 47,233,169,
+175,101, 30, 0,167, 29, 72,119, 1, 20, 94,194,222,199,140,221,143,138,250,240,183,223,126, 51, 67, 50, 98, 6, 72,120,202,251,
+ 76, 0, 72, 94, 0, 38,126,200, 75, 32,238,240,128,125, 92,148,226,197,139,175, 36,200, 2,160, 38,184,250, 11,210, 35,143, 61,
+123,246,120,192, 88,124, 37,239,107,209,208, 11,180, 96, 23,165, 91,138,101, 73, 19,253,102, 39, 1,150,106,151,197,115,180,149,
+ 39, 92, 59, 80, 85, 88,195,153,242,129, 63, 15, 39, 77,154, 36,104, 95,129, 68,248, 61, 54, 24,200,180,105,211,100,250,244,233,
+ 2,169,160, 2,180,114,126,215,242,119,186,117,112,214, 24,158,207, 82,101, 8, 21,238, 33,130, 44,236, 6,245,132,221,220, 86,
+170, 8, 1, 96,143,173, 95,191,222, 19,253, 75,177, 43, 67,158,163, 84, 31,226,145, 72,206,148,223,200,107,112,192,224,128,193,
+ 1,131, 3,159,145, 3, 0, 89,245,160, 26, 60,134,201,213, 19, 19,132, 39, 86,230,158,112,128,104, 38,216, 98,130,106,207, 76,
+149, 10,253,106, 97,133,238,153, 47, 95,190,227, 84,209, 57, 83, 36, 12,254,117, 48, 57, 40,174, 28,152,120,206,107,206,208, 8,
+204,171, 58,197, 12,128, 23,244,195, 48,220, 94, 76,227,119,216,255, 40,118, 89,180,249, 2,200, 26, 75,123, 21,189,180,195, 19,
+104, 53,140, 28,185,196,182, 41, 83, 90,153,189,189,219, 78,238,208,161, 93,194, 4, 9,124, 39,140, 31,239,239,177,117,171,121,
+246,172, 89,230,214,173, 90,249, 67,165,232,179,110,242,228,134, 31,189,188,170,143,175, 94,189,121,253, 40, 81,138,232, 45, 43,
+243, 65,178, 81,166, 93,155, 38,226,227,227, 45, 79,159,220,149,141,107,167,201,252,217, 3,165,104,161, 28,194,123,206,208,130,
+196,234, 62, 36, 34,102,248,243, 50,131,127,202,206, 67, 58, 40,237,219,183,175, 2, 10, 33, 41, 81,140,248,153, 0,154,204, 48,
+192, 54,235, 1, 90,144, 38,150,129,139, 4, 69,138, 5, 48,176, 1, 60, 78,204, 95,218,107,245,238,221,219, 67,175,180, 81,173,
+139, 35,137, 22,250,102,168,128, 22,202, 52,189, 83,167, 78, 4, 41, 39,104,167,181,117,235, 86, 69,154, 5,123,180,189,206, 2,
+ 21,168,215,219,161, 63, 62,100,130,129,255,112,238, 52,132,107, 20, 1,200, 20,240, 75,149,104, 21,203, 86,178, 69,255,164, 57,
+106,246,208,235,222, 65,173, 63,202, 20, 7,146, 50,207, 51,103,206,120, 98,247,167, 39,108,176, 20,215, 37, 88,168,100,192, 14,
+207,233,104, 55, 15,252,254,197,255,206,180,191,145,215,224,128,193, 1,131, 3, 6, 7,156,230,128,106, 87,174,223, 51, 60, 61,
+191,195,193,163, 39,236, 73, 60, 33,209,160, 47,158, 19,152,132,122, 19,172, 0,128, 69,195,111, 23,122,201, 62,121,242,164, 98,
+187, 2,187, 35, 91,222,226, 29,170, 21, 49, 1,165,182,242, 2, 79,160,148, 90,163,122,214, 52, 67, 56,197, 84, 61,185,207,157,
+ 59,215, 29,101,220, 0,240,246, 11,108,128,168, 18,179,119,132, 40,103, 56, 0,173, 32,154, 45,160,142,163,123,135, 23,247,239,
+183,121,119,243,102,195,191,122,246,108,229,154, 46,221,213, 68, 9, 19,190,133,193,180, 79,230,140, 25,207,175,156, 52,169,145,
+223,221,187, 85, 79, 47, 95, 94, 23,187, 20, 91,119,182,109, 96,238,144,159,110,174,105,100,202,248,223,100,220,168,158,210,163,
+211,143, 74,114,205,144, 74,203,109, 71, 8,154, 0, 5,231,105,172,141,228, 67, 39,165, 52,136,239,209,163,135, 2,180,198,143,
+ 31,111,134, 84,202,188, 97,195, 6, 37, 13, 25, 50,196, 12,183, 25,214, 64,203,102, 57,209,111, 38, 0,148,123, 64, 85,234, 1,
+218,168,162,178,187,179, 51,192,155, 7,104,120,240,190, 51,109,228, 8,104,121,121,121,233, 1, 90, 33,202, 73,187, 67,244,151,
+174,121,243,230, 61,194, 5, 6, 23, 19, 4, 90,184,182, 89,231,103,231,168,141,178, 0,244, 62,129,148, 80,176, 11, 51,152,195,
+ 82, 85,178,165,195, 97,105, 80, 49, 8,180, 8,176,168, 42,132,115, 89,130, 65, 61, 27, 30,212,231, 67,165,242,119,242,219,212,
+201, 50,135,217,140,114,134, 7, 23,255, 79,195,224,167,193,207,240,226,192,231,232, 75,225, 85,182,127,130,142,243,158,225, 49,
+ 1,110, 39,200,130,125,137, 39, 86,226,199, 0,188,172,189, 85,115,146,204,194,123, 4, 89,129,190,181,118, 88,213, 78,171, 33,
+130, 57,180, 12,244, 94,173,101,255,162, 9,180,224, 7,106, 59,140,184,233, 9,254,103,157, 42, 77, 71, 64, 43,180,187, 14,131,
+209, 68,176,193, 12,157,210,165,251,249,233,181,107, 63,125,244,246,110,236,119,241, 98,117,223, 83,167,170,248, 93,184, 80, 73,
+238,220,169, 66, 73, 22, 65, 86,139, 4, 9,126,174,109, 50, 89,198,211,179,100,169, 93,126, 6, 73,180,222,188,144, 39, 94,119,
+100,195,154,169, 50,111,214, 0, 61, 18, 45,187, 52, 1,122,239, 18,104, 65,221,101,134,109,145, 25,190,175,204,144, 72,153, 1,
+ 90,159, 66,245,245,152, 9,146,207,103,221,186,117,211, 5,180, 42, 87,174,188, 18,182, 94,138, 23,120,168,117, 21,215, 21,252,
+173, 95,191,190, 7, 84, 93, 30, 80,235,186,227,146, 61, 3,243,160,114, 6, 5,149,214, 14,193,163,181,211,208,110,221,185, 67,
+ 15,253,103, 24,124,134,157,128, 49, 61,129,150,135,206, 47, 87,171,207,103,129, 99,216, 59,240,166, 31, 60, 4, 79,142, 26,197,
+178,150,106,254, 91,178,156, 53,190,183,241, 30,155, 52, 85,160,117,228,200, 17, 79, 24,195, 27, 64, 75,103, 3, 33,155, 86, 27,
+233,167,100, 0, 24,114,192,224,103,104,122,140,253,103,254,203,252, 12, 95, 78,126, 89,106,214,254,179,180, 61, 39, 4, 6,144,
+222, 14, 48,181, 11,231,118, 93, 13,104, 4,154,214,211, 97, 28, 5,144,182,197, 38, 91, 52,131, 84,135, 48,226,158, 23,232,253,
+221, 25,123, 20,187, 64, 43, 12,187, 14, 67,208,132, 47,128,116, 77,163, 71,111,179,180, 91,183,159, 46,109,223,222, 20,187, 11,
+ 27, 61,187,112,161,193,177, 69,139, 26, 82, 93, 72, 73,150, 3,144,165, 57,160,185,102, 76,229, 81,185, 66, 17,233,212,174,142,
+146,120,206,107, 97,144, 66,228,133, 26,241, 30, 0,213, 35,168,138, 31,193, 56,254, 17, 84, 94,143, 40,241,178,160,153, 18,182,
+ 72,251, 33,161,177,116, 96,107,179,221, 1, 6, 27, 65, 50,186, 6,224, 44, 88, 7, 68, 31,107, 88,178,100,201,213,176,245,115,
+228, 46, 33,136,230, 23, 12, 42,109,162, 15, 54,164,241, 72,221,117,126,179,122,250,188, 78, 82, 65,217,108,210,164,148,150,246,
+ 87, 52,130,199,206,205, 19, 26, 82, 91,235,119,126,177,114, 58, 91, 89, 39, 23,107,161, 33,255, 95,174,123,197,208, 48, 44, 12,
+ 99, 72,104, 95,247, 95,110,163,255,114,221, 29,246, 23, 24,137, 23, 66,170, 26,152,120,174,254,183, 60,175, 96,145,135,121,213,
+255,133, 72,220,226,153,160,235, 54,174,169,239,176,164, 85, 24,249,156,114,101, 20,218,206,239,236,115,122, 59, 76, 48, 67,246,
+ 80,126,212,206,208,208,156,116, 0, 10,218, 80,125,168, 55, 49,191,158, 9,130, 42, 65,216,108, 21,109, 26, 35, 70, 93,238, 70,
+228,238, 66, 26,190,211, 38,203,142,186,208,146,172, 46,126,186,185,185, 41,118,116, 58, 27, 75, 23, 77,157,180,212,108,159,149,
+102,144, 68, 43,103,205,115,137,115, 85,207, 12,224,117,206, 50,168,180, 19,101,253,172,229,116,162, 28, 90, 89,237,150, 19, 18,
+229,142,136,195,120, 20, 11,158,174, 90, 68,244,244, 79, 39,105,104,126, 71, 97,164,199,199,191,249, 54, 10, 3, 15, 62, 71,221,
+ 13,160, 21,134, 6,177,241,232,231,104,163,255, 50, 77,187,173,163,130,161,192,185,141, 27,243, 20, 48,244, 55,118, 10,126,174,
+230, 81,239, 89,252, 50,115,208, 51,122,159,101, 62,152,206,244,195,179,101,157,232, 62,218, 18, 45, 39,136, 57,202,250, 95,238,
+ 48, 70,221,195,169, 19, 5,146, 49,248,105,135,159,122,119,210, 26, 64, 43,136, 3, 70, 95, 50,190,205,240,226,128,209,151,194,
+139,147, 26,116, 28,129, 42, 71,160,203, 10, 88,133, 0, 90, 54,192, 88, 16,112,179, 5,202,190, 80,117,157,122,141,209, 9,157,
+ 98,151,102,102,131,159,154, 44,114, 42,131,193, 79,167,216,165,153,217,224,167, 38,139,156,202, 96,240,211, 41,118,105,102, 54,
+248,169,201, 34,167, 50,124, 14,126,218, 45,192,231, 2, 90, 42, 93, 75,192,101, 45,233,178,144,104, 57,170,179,245,110,195, 96,
+ 18, 45, 62,104, 43, 57,195,113,123, 52, 28, 93,215,162,111,208,180,221, 46,161,109, 47,131,159, 6, 63,245,246, 1,227,219,180,
+207, 1,189, 60,180,204,103,240,211,224,167, 45, 14,252,151,251,146,202, 15,221,243, 89,120, 0, 45, 91, 42, 70, 71,215,156,148,
+104, 57,191,235, 80,107,100,208,121,255,115, 32, 94,131,166, 78,230,235,204,102,240, 83, 39,163,116,102, 51,248,169,147, 81, 58,
+179, 25,252,212,201, 40,157,217, 12,126,234,100,148,206,108, 6, 63,117, 50, 42,172,217,236,216,104, 85,161,237, 20, 37, 78, 22,
+ 82,167,242,182, 64,153,154, 39, 52, 54, 90,214,234, 71, 59,117,177,148, 96,169, 59, 16,195, 90,109, 93,207, 27,157, 80, 23,155,
+116,103, 50,248,169,155, 85,186, 50, 26,252,212,197, 38,221,153, 12,126,234,102,149,174,140, 6, 63,117,177, 73,119, 38,131,159,
+186, 89,165, 43,227,231,224,167,195, 23,219,216,117, 24, 13,215,184, 27,208,114, 39, 98, 20, 59,187, 17,173,119, 18, 58,179,235,
+ 48,216,206, 69, 93,220,249,130,153, 62, 71, 67,124, 17,154,121,147, 71, 28, 90,179, 80,114, 15,166, 26, 5,147,121, 84,207,159,
+ 84, 73, 85,243, 37, 81,210, 15,121, 19,111, 85, 82,238,132, 91,191,207,149, 96,107,110, 23,211, 80, 43,190, 58, 85,206, 44, 41,
+ 77,137, 74,187,198, 88, 84, 50, 99,244, 59,129,105,126,206,120,166, 4,206,208,204,150,204,148, 61,127, 10,211,252,188,201, 77,
+103,152,120,206,107, 26,237,173,183,156, 17,114, 38, 53,181, 43,144, 46,214,158,242,121, 83, 63,204,151, 54,250,238, 28, 73, 77,
+140,199,104,203,239,149, 38, 77,215,132,166,162, 25, 18,152,220,145, 54,103, 78,100,210,179,147, 67,147,102, 40,250,181, 65, 51,
+ 20, 76,115,240,136,193, 79,131,159,225,197,129,207,218,151, 48, 17, 71, 10, 75,178,168,100, 80, 57, 65, 47, 66, 88,146, 45,154,
+225,197, 76,208,249,172,252, 12,199,114, 26,164, 48,177,182,207,225, 98,122,130,228,197,115, 29, 28, 9,214,184, 57, 82,152, 42,
+ 20, 76, 29,233, 46,210, 3,208,168,159, 61,137, 41,153,173,196,123,204,131,116,143,207, 56, 3, 54,114,166, 50, 85,201,155, 34,
+226,243,220,201, 35,188, 6,157,201, 40,103,133,162,169, 76, 49,156, 5, 27, 4, 88,220,122,176,107,122, 23,241, 61, 60, 69,222,
+ 30,152, 32,111,247,141,225, 37,217, 49,190,169,248,108,251, 77,222,108,237, 35,111, 54,247, 80,174, 85,201, 25,111,139, 51,229,
+180,204, 75,144, 85, 57,143,203,195,251, 39,220, 3, 2, 94,222,150,143,207,174,202,249, 77,147, 63,150,203, 22,255,190, 21,216,
+178,251,177,228, 73, 97,106, 93,163,120,214,171,123,119,108,189,113,237,210, 69,175, 43,103, 79, 62,216,179,110,225,249, 90, 69,
+211, 93,230, 61, 39, 38,199, 8, 4, 80,121,210, 68,219, 93, 44,115,162, 7,185, 83, 69, 81, 0, 85,174,148,145, 55,108, 91, 54,
+245,190,249,197,237, 87,239,111, 31,126,243,230,230,225,167,179,134,119,190,149, 43, 69, 36, 58, 25,141,232,108,221, 1,176,214,
+153,221,219, 6,200,214,246,146, 45,121,100, 45, 95, 95, 36,111,179,238,217, 93, 76,141, 80,190,191,180, 18,243,217,224,129,174,
+193, 39,155,139,105, 78,246,164,166, 67,160,209, 21,239,113,113,182, 47,233,248, 78,180,178,232, 42,167, 22, 17,103,219,200, 73,
+122,118,219, 40, 20,116, 44, 31, 49,234, 30, 70, 6, 26,237, 30,196, 1, 75, 80, 20, 2,104, 69,136, 16, 97,159, 94,240,165, 23,
+104, 33, 95, 49,189,224,203, 0, 90,225,219,209,191, 89,106, 0, 46, 47,228,205, 61,145,151, 55, 4,231,207,117, 84, 36,216, 32,
+ 9,224,244, 72,222, 61, 19,121,243, 80,102,246,169, 33, 83,186,215,144, 9,157,171,200,216,246,229,101,116,155,210, 50,252,167,
+162, 50,164, 73, 1, 25, 92, 63,135,136,239, 83, 17,239, 27, 82, 32, 85,164, 71,206, 12, 20,249, 82, 70,124, 30,112,115,135,200,
+165, 85,178,164,115, 62, 25, 89, 63,147,148,205, 28,243, 41,202,219,202, 6, 32, 80, 73,135, 24,204, 9,180,118,253,217, 69,126,
+ 42,159,225,158, 42,201,106,254, 93,218,187, 4, 89, 77, 75,165,188, 75, 73, 22, 83,227,226,201,239,108, 31, 94, 53, 76, 64,139,
+146,172,187,135, 87, 6,124,186,189, 75,204,155,218,201,187, 13,173,229,245,217,245,178,115,122,167, 79,101, 50, 69,159,175,245,
+ 1,102,117, 49,229,168, 85, 34,251,229, 55,175, 94,249, 61,186,123,245,245,188, 17,117, 60,231, 13,168,115,196, 99,230, 0,207,
+ 11,123,215, 94,170, 81, 56,245, 37,230,177,211, 94,150,117,143, 8, 48,177,209,125,222,216,123,239,158, 92,125,249,246,198,129,
+ 55,207,206,108,121, 52,162, 75,109,175,245,115, 71,251,188,191,184,193,255,254,159,149,204, 87, 71, 23, 48,159,255,163,164,249,
+214,198, 33,254,147,250, 52,185, 10,222,118,113,166,141,152, 55,109,124,147,187, 10,180,178,184, 68,182,142, 40, 96,171,168, 54,
+ 39, 92, 2, 44,243,205,221,242,126,255, 40,121,183,103,168,188,219,249,187,248,110,235, 43,190, 91,186,139,175,123,103,121,187,
+161,157,188, 93,219, 82,152, 47,180, 64, 11,207, 62,120,124,245,120,192,233,189,235, 63, 52,171, 90,232, 9, 64,215,188,236,127,
+ 75,225,172, 1,166, 30,176,145, 37, 99,226, 72,119,210, 36,136, 20,204, 51,124,185, 44,209,139, 55, 45, 24, 99, 96,169, 76, 49,
+203,132,182,156, 58,190, 71, 3,192,252,205, 1, 3,188, 57,217, 89, 52,178,127,115,252,180, 5,168, 8,180, 80, 79,174,155, 53,
+165, 93,206, 0, 45,228,165,202, 74, 83,218,165, 49,206,247,194,253,171,129,137,231,206, 30,182,218,136,225,238,232,196,147, 73,
+ 43,244,157,238, 49,217,217,130,253,139,242, 91,251,205, 10,157, 31, 45, 76,168,239,228,245, 29,145,153, 57, 9,180,222,233, 96,
+ 80,176,198, 45,144, 58,210, 75,121,239, 45,242,226,170, 60,221, 55, 77,228,202, 90,145,243,139, 68, 78,254, 37,114,116,188,200,
+129, 33, 34,187,251,202,211,197, 13, 0,230,110,137, 28,159, 44,121, 82, 70,244,182,122,143,195,143, 90, 1, 90, 23, 87,137,172,
+169, 43, 79,230,215, 18, 89,223, 72,222, 45,171, 37, 19,155,101,101,153,151,219, 41,115, 8,154, 84, 23,250, 30,158, 42, 4, 89,
+234, 51, 84, 21,250,108,255, 93, 8,176,212,107,148,100,189, 94,219, 86, 42,229,140, 27,106,137, 22, 84,133,119, 63, 62, 62, 35,
+230,205,237,197,111,201,247,242,120,122, 25, 57, 62,161,182,156, 90, 53, 66,168, 70,212,248, 0, 77, 80, 17, 46,222,179,117,211,
+141,199,119,175,188,126,112,125,191,247,230,209,223,157,222, 54,188,244,201,109, 3, 74, 29, 58,242, 87,231, 99,123,231,252,122,
+136,121,180,234, 78,192,180,109,241,196,187,190, 87,183,251,223,156, 86,217,124,102,104, 30,179,231,136,226,230, 75,203,251,152,
+ 31,159,222,236,119,123,106, 89,243, 35,143,145,230,167,158,171,204,167, 38,213, 52,239,234,151,219,124,106,229,144,187,121, 82,
+ 71, 61, 97,175,141,220,146,152, 74,118,249,177,240,195,201, 61,106,203,164,238, 53,101, 66,215, 26, 50,190, 75, 85, 25,220,166,
+146,244,104, 82, 86,186, 54, 44, 45,191, 53,255, 78, 70,181, 45, 43, 35, 90,151,145,225,173, 74, 73,187,239,179,189,133,106,209,
+ 58,168,182, 93,137, 22,128,207,197, 15,247,142,200,187,237,253,132,231,150,210, 45,254,247, 59, 53, 47, 44, 64, 43, 2,192,231,
+221,195, 19,107, 7, 60, 60,237, 17,240, 30, 33,142, 30,223, 56, 27, 48,101, 64,187,183,144,116, 57, 11,222,178,116, 45, 29,237,
+153,124,244,147,162,233, 34, 7,139,117,216,182, 88,204,161, 1, 47,111,189, 62,216, 45,233,138,210,153, 98, 88,135,187,250,230,
+ 38, 50, 29, 99,131,222, 44, 70,221,245,114, 74, 95, 62,131,159,127,163, 41,123, 18, 45,197,168, 90, 11,108, 57, 3,180,238,220,
+185,147, 87, 15,216,178, 55,206,195, 25,118,233,192, 50, 41,218, 19,158,195, 81,177,143,154, 16, 9,197,199, 34,221, 15,204,111,
+221, 27,130,181,123,213,170, 85, 83, 34, 67,105,144, 83, 18,207,237, 37, 68, 5, 41, 17,152,223, 33, 77,125,221,239, 95,157, 43,
+124,118, 29, 98, 34,246,188, 51,171,134, 92, 25,148,142,160,197,211, 89,150,101, 79,102,234, 51,175, 79, 85,241,252,171,185,236,
+ 30,219, 64,250,212, 47, 44, 61,127,204, 39,221,106,230,146,206, 63,100,145, 14,149, 92,165, 93,185,180,178,174,103, 1,121, 58,
+171,162,252, 86, 61,181,228, 72,102,114, 10,189, 67,213, 88, 49, 79,138,136, 47,115, 37,139,240,174, 16, 36,104,205,138,187,124,
+ 58, 59,161,178,200,218,122, 50,162, 65, 38,193,164,217, 70, 79,185, 21,160,117,112, 98, 8,160,245,198,163, 95, 8,160,245,106,
+ 85, 75, 91, 64, 75,207,107, 76,144, 52, 21, 25,210,186,226,171, 15,183,247,138,239,252, 10,242,120, 90, 25, 57, 48,184,184,172,
+236,251,157,108,156,216,201, 26,104,217,164, 9,123,172, 11, 55,206,159,122,188,106,116,141,211,123,198,150, 57,239, 57,182,196,
+197,243,127, 20,185,120,102,104,225, 51,167, 71,126,119,244,218,134,145,199,153, 71,171, 64,133, 50,196,245,244,123,118,227,245,
+213,137,101,205,247, 61,198,152, 31, 31, 93,110, 62, 52,186,178,121,115,143,108,230,253,227,234,249,159, 29,150,215,252,196,115,
+181,185, 64,150,200,230, 61,131,138,153,215,117, 72,111,222, 59,177,233,235,194, 25,226,190,177, 71, 59, 83, 66,211,140, 15, 55,
+119,138,220,217, 45,114,107,187,200,141, 45, 34,215, 54,138, 92, 94, 35,190,167,151,136,175,231, 2, 9, 56, 51, 79,228,244, 44,
+ 0,238, 63, 69, 78, 76,150,143,135,199, 74,142,228,145, 22,106,149, 87,189, 79, 96,245,225,206,126,241,221,252, 75, 8, 64,165,
+170, 22,237,168, 14, 53, 95,145, 43,177,169,122,171,162,113, 94,156, 27,156, 37,224,104,255, 76, 1,123,251,231, 10,184,178,101,
+114,192,139, 59,231, 37,103,178, 8,148,182,218,139,205,104,202,150, 44, 82,187, 76, 73, 34, 61,100, 74, 25, 63,226,240,172, 46,
+145, 30,127,122,116, 82, 25, 44, 85,160,165, 74,178,190,115,139,222,205,111, 77,163,163,159, 30, 28,123,218,165,116,204, 63,202,
+184, 69,143,175, 89, 56, 35,131,193,129,175,156, 3,241,226,197,203,152, 39, 79,158, 5,217,179,103,191,131, 64,237,126,248,245,
+203,154, 53,235,109, 94,227,189,127,170,248,142,128,214,153, 51,103, 52,193,150,173,114,219,146, 90, 33, 95,177,135, 15, 31,230,
+189,124,249,178,155, 22,216,178,199, 11, 0,170,123, 7, 14, 28,144,229,203,151, 43,233,202,149, 43,202, 24, 98,235,184,121,243,
+166, 32,196,217, 61, 45,190, 34,220, 89,169,141, 27, 55,150, 94,185,114,165,146, 80,190, 32,208,165,130, 47,245,119,255,254,253,
+165,153, 95,139,166,113,223,100, 25,235, 48,228,174, 67,119,119,247,160,112, 45,150,231,214,140,163, 68, 72,214,212, 19,153, 12,
+ 0,100, 95, 58,228,144,223,121,146, 71,222,251,252,224, 12,241, 61, 62, 75, 74,102,142,123, 55,115, 98, 83, 10,213, 78,139,231,
+ 69,211, 71,187,227,189,176,166,220,152, 86, 73,114,186, 68,216, 27,214,198,203,153,200,148, 5,192,235,244,229,201, 63,200,251,
+229,117,165, 80,234,200,151,244,208,164, 36,235,237,254,177, 66,195,119, 53, 63, 37, 89,111,182,244, 18, 26,191,171,215, 40,201,
+122,181,162,153, 84,204, 30,199, 90,162,229,240, 53,101, 76,166,200,185, 92, 76,213, 75,100,136,118,239,201,137, 85,242,238,216,
+ 12,185, 55,227, 7, 57, 56,180,132,172,236, 83, 70,230,252,218, 64,198,183, 45,249,177,180,107,116,203, 24,130, 54,105,230, 75,
+ 97, 58,116,253,244,161,135,187, 38, 54, 57,251,226,210,182,151,183,198,229,191,249,112, 92,238, 59,111, 47,186,191,190, 61,233,
+187, 51,215,151,116, 59,200, 60, 90,245,174,152, 47,173,207,203,203, 59,222, 29, 27,144,211,252,244,236, 86,115,126, 0,170, 77,
+ 61,243,152,151,182, 78, 99,158,215, 34,149,223,161,254,217,205,199,198,215, 52,175,235,158,219,188,234,231,116,230, 69,173,210,
+153,215, 15,171,123, 43, 87,202, 40,103,237,209,118, 77,108,202,215,177, 86, 62,159, 63, 58, 86,150, 49, 29, 42,201,232,159, 43,
+ 40,210,171,109,147,218,138,156,153, 43,219, 38,180,148,161, 45,138,201,224,102, 69,100, 80,211,194, 50,176,113, 65,105, 89, 62,
+227,227,140,250, 12,228,149,215, 42, 64, 11,234,195,183,235,219,218,147, 92,105, 85, 61,196,125,180, 77, 44,128,179, 81,173,139,
+197,125,118, 99,100,174, 15, 94, 19,114, 7,220, 30,147, 35,224,210,208,172, 1,199,251,187, 5, 60,191,188, 79,138,164,143,249,
+ 56,191,201, 20,197,238, 0,153, 40,210,195, 0,255, 55, 18,240,252,170, 52,204, 23,213,199,188,173,155, 64,106,165,140,143, 5,
+ 82,255, 45,209, 82, 37, 89,251,127, 73,188,162, 78,158, 24, 35, 62, 94,115,191,239,191,233,103, 79, 0,175, 42, 78, 23,218,120,
+192,224,192, 87,194, 1, 4, 57,143,129,248,165, 71, 27, 55,110,252,118,193,130, 5,114,251,246,109, 57,127,254,188,140, 29, 59,
+ 86, 16,152, 94,230,206,157, 43, 8, 38,255,182, 72,145, 34, 71,153,215,153, 98,227,243,137,140,196,221,102, 76,220, 97,198,197,
+ 14, 83,100, 36,126,143,154,113,110, 29, 1, 45,128, 14,129, 20,202, 33,216,178, 85, 94, 45,160,245,224,193, 3,135, 96,203, 30,
+ 15, 16,224,222,139,252,187,122,245,170, 92,186,116, 73, 16,127, 87,214,174, 93,171,240,112,246,236,217,178,116,233, 82,201,150,
+255, 59,165,188, 71,143, 30, 21,196,163,245,210,193,207,210,247,239,223, 47,125,253,250,117, 5,100,157, 58,117,170,244,246,237,
+219, 75, 19,124,129,182,242,155,165,224,119,138,148,139,247,248,171,131,102,152,179,232,197, 34, 97,126,209, 63, 65, 64,111,229,
+194, 3,104, 97,231, 90,209, 17,109,202, 40,234,194, 21,131,234, 8, 64, 86,115,181,206, 60,159,222, 42,167,162,246,251,165, 82,
+ 74, 97,222,240,224, 7,164, 98,101,134, 55,202, 46,178,177,153, 52, 42,156,232,147,171,171, 73, 51, 48,164, 2,180,246,142,146,
+102,165, 83,223, 85,119, 23, 54, 41,153,226,238, 27,247,110, 66,187, 44,170, 12,153, 26, 20, 73,124,231,213,178, 70,186,129, 86,
+193, 52, 81,218,150,113,139,225, 89,181, 64,138,103,243,135,180,240,125,118,198, 93,252, 46,174,147, 7,115,106,203,249,185, 63,
+203,158,233, 29,101,225,128, 6, 50,168,113,254,143, 37, 50, 68,191, 3,240, 25, 71,139, 7,121,146,155, 70,236, 89, 61,251,250,
+157,189, 11,239, 95, 25, 93,224,202,135,167, 87,204,159,158, 94,250,248,114,124,150, 7,207,150, 52,191,182,105,112,245, 3,204,
+163, 69,167,112,134,120,231,158, 94,216,241,124,207,175,121,205,135, 38,212, 51,175,234,158,223,188,240,167, 84,230, 25,141,147,
+153, 71,215, 74,252,198,163, 91, 38,243,250,142, 25,204,203,218,164, 49,207,111,145,202,188,164, 91, 17,115,251,239,221,142, 1,
+232, 12,212,162,109,121,223, 53,137, 41,239,172, 94, 48, 91, 56, 49, 85,102,116,175, 36, 4, 99,206, 60,111,157, 87,177,211,186,
+190, 93,222,174,106, 18, 4,180,194, 34,201,130, 74,176,112,129,116, 81,143,239,158,244,211, 59,191,109, 61, 3,222,205, 46, 22,
+240,126,102,129,128,183,127,230, 15,120, 58, 41, 79,192,163, 5, 63, 6, 60, 61,227, 30, 0,137, 22, 65,187, 93,137, 86,250, 68,
+145,188, 8,180, 40,197,122, 48, 49,191,124, 56, 49, 77, 73,242,233,131,228, 78,249, 55,208, 2,160,250, 17,146,172, 35,159,238,
+ 31,126, 82, 33,107,244, 1,119,199,231,243,224, 57,174,119, 8, 11, 79,140,103, 13, 14,252, 83, 28,128,196, 42,121,209,162, 69,
+159,175, 89,179, 70, 89, 84,240,151, 82,162,174, 93,187, 42, 96,128, 64,107,198,140, 25,242,250,245,107,153, 51,103,142,228,207,
+159,255, 57, 84, 95,201,181,202, 27, 8,100, 98,224, 55, 46, 82, 66,164, 68, 72, 9, 54,109,218,148,224,135, 31,126,224, 14,237,
+120, 72,241,145, 56,102, 70,119, 68,207, 17,208,186,117,235,150, 60,126,252, 88, 94,189,122,101, 23,108,217,162,109, 15,104, 61,
+125,250, 52, 47, 65,214,179,103,207,220,222,188,121, 99, 23,108,217, 43,111,252,248,241,159, 65,170, 36, 0, 63,226, 7,254,141,
+ 28, 57, 82,142, 29, 59, 38,111,223,190, 21, 31, 31, 31, 5,116,253,242,203, 47, 50,100,200, 16,133,159, 49, 99,198,212, 99, 63,
+ 93,250,248,241,227, 10,160,250, 0, 16, 53,125,250,116, 5, 80,189,127,255,190, 52,104, 42,215,127,255,253,247,210, 35, 70,140,
+ 40, 13, 32,103, 0, 45,173,206,249,247,125,199, 54, 90, 95, 18,104,177, 52, 0, 84, 27,111,175,233, 35,239,119, 13,148,242, 89,
+226, 61,200,158,221, 20,149,169,116,198,232,247,223, 46,169, 37,231,199,151, 35, 0,219,168,175,110,218,185,178, 37, 49,213,157,
+209, 30,193,189, 55,183,145,154,121, 19,248, 59,146, 66,168,212, 40,201,226, 32,177, 99, 92, 19,236, 48,236, 47,111,182,244,150,
+ 55,155,186, 41, 3,199,246, 97, 63,200,171, 53,173,229,213,202,230, 66,144,197,163, 98,182, 88,154, 18, 45, 72,175,182,175,158,
+212,219,247,221,189,147,242,233,197, 77, 49,223,218, 35,190,135, 38,202,131,185,181,228,202,242,190,178,125,212,143,210,170, 76,
+170,151, 37, 96,151, 85, 42, 83,244, 25,176, 83,138,171, 93, 59,147,137, 96,172,100,230,120,231, 30,157,218,250,196,107, 77,183,
+ 7,151, 6,100,124,122,115, 72,218, 55, 62,139,235, 60,122,176,182,231,213, 98,233,163,157,211, 67,139,128,105,201,184,238,151,
+ 79,204,237, 98, 94,241,115, 6,243,188,230, 41,204,127, 54, 74, 97, 62, 56,169,161,121,223,248, 6,254,251, 39, 54,244, 59, 50,
+165,137,255,250,129,223,251, 47,239, 95,233,110,135, 42,153,142,228, 72, 22,225,184, 30,224,106, 89,143, 44, 73, 35,205,123,178,
+101,128,200,225, 49,226,181,161,183,240,191,158,122,218,203,163, 0,173,171, 91,196,103, 41,128,123,160,141, 22,127,223,131,183,
+118,140,224,237,190, 46,103, 18,211,247, 13,138,165,124,242,120,247,228,143, 31,174,111,147,143, 87, 55,201,135,115,139,229,195,
+129,145, 1,126, 75,171, 5,152,247, 15, 15,120,127,115, 95,192,164, 95,170,189,198, 59,126,119, 84,110, 24,188,123,125,132,154,
+212,127,125, 11,217,219, 41,158,242,235,191,161,165, 34,225,130, 26, 81, 1, 90, 69,211, 69,139, 62,186, 90,236,233, 1,175,238,
+190,157, 82, 39,246,156,101, 77,227, 44,224,121,255, 10,177, 38, 39,137, 29,219,150,177,125, 88, 88,101, 60,107,112,224,179,115,
+ 32, 93,186,116,135, 9, 10,212, 99,254,252,249,130,137, 92, 98,199,142,173, 36, 75,160,229,229,229,165, 72,101, 16, 20,253,176,
+163,130, 21, 47, 94,188,250,201,147, 39,243,131,102, 60, 36, 23,164,212, 72,105,207,158, 61,155, 30,180, 51, 52,109,218, 52, 61,
+104,164, 2, 13,134, 65,113,105,217,178,101, 10,188,171,140, 61,154,142,128, 22, 84,125,226,237,237, 45, 0, 29, 74, 21, 64,131,
+ 63,193,108,186,156, 1, 90, 47, 95,190,204,171,130, 44, 63, 63, 63, 55,208,178, 9,182,236,149, 53, 78,156, 56, 47,251,244,233,
+ 35,101,203,150,149,124,249,242,201,162, 69,139,228,198,141, 27,194,121,155,124,134, 36, 74,154, 52,105, 34, 73,147, 38,149,134,
+ 13, 27, 74,212,168, 81,237,154,114, 88,188,163,116,175, 94,189, 74,127,247,221,119,165, 11, 22, 44,168,128, 41, 74,183, 8,176,
+152, 40,221, 2, 79, 75, 39, 75,150,172, 52,104, 26, 64, 75,223, 87, 19,118,160,133, 30, 27, 57,103, 50,211, 62,255,165, 85,197,
+111,124, 42,218, 78, 29, 32, 56,210,247,254,224,185,114,186,152,114,118,171,158, 45,128,134,239, 43,251,150,165, 26,242, 23,166,
+133, 29,243, 40,210,172,214,165, 92, 2,152, 39, 52,180,173,159, 97, 25, 65,123,247,237, 5,205,229,193,226,102,156,136, 53, 1,
+ 17,105, 16,104, 17,100,169, 59, 12,169, 46, 84,118, 24, 14,171, 42, 13,139,186,220,161,202,144,234,194,250,133, 18,222,241,248,
+173,184, 38,208,162, 36,107,237,180,254,239, 2,222,121,139,217,243, 47, 24,232,215,148,183, 11, 42,202,195, 89, 85, 33,201,106,
+ 35, 91, 70, 55, 20, 0,177,187,161,149,226, 1,152,186,118,170,145,247,150,207,249,245,207,110,141,206,115,235,238,152, 28,119,
+222, 29,154,242,224,231, 10,233,175,229, 72,110,202,170,135,151, 4, 76,185, 82, 68, 62, 49,165,119,253, 51, 59, 38,180,124,176,
+180,103,105,191,233,109,242,220,109, 95, 57,147,217, 50,149,207,158,192, 12,117,225, 77, 72,141, 70,234,112,157, 17,236,213, 25,
+ 93, 76, 73,123,253,152,199, 44, 7,135, 97,119, 32,130,161,239,249, 85,186, 86,207, 98,230,117, 61,101,180,149, 71, 1, 90,151,
+ 55,200,155, 5, 85,228,205,220,114,242,122, 86, 41,121,253, 87, 81,121, 61, 45,191,211, 64, 11,180,118, 28,236,151,197,207,127,
+107,215,128, 15,167,231, 2,104,185,203,199,187, 7,229,227,189,195,242,201,251,150,220, 59,190,225, 67,141, 34,169, 31,163, 79,
+ 13, 43,147,206,241,170, 57,121,188,136, 94, 84, 23, 62,255,171,184, 76,174, 21, 67, 94,204, 40,161,164,143, 23,150,138, 91, 82,
+ 3,104,133,182,189,141,231,190,122, 14,184,194, 22,235, 49, 36, 57, 10, 80, 57,125,250,180, 2,174, 44,211,137, 19, 39, 20,137,
+209,197,139, 23, 37, 83,166, 76,180,117,116,117, 84, 43,168,195, 92, 33,181,105,229,239,239, 15,149,135,164, 66,202, 4, 48,148,
+107,247,238,221,185,199,141, 27,151, 27, 42,202,156,120,103, 54,208,200,212,160, 65,131,212,153, 51,103,230,174,224, 12,161, 1,
+ 90,207,159, 63, 23, 95, 95, 95, 73,146, 36,201, 89,238, 68, 84,147, 37,216,114, 22,104, 81,146, 69,144, 5,208, 84, 2,207, 22,
+ 83,147,165, 20, 76, 15,208,202,149, 43,151, 98,163, 53,117,206, 10,169,210,176,139, 20, 43, 85, 65, 1, 94,127,252,241,135, 64,
+197, 24,106,160, 69,245,225,228,233,115, 75,215,253,169,115,233,130, 69, 75,150, 94,184,112, 97,233, 49, 99,198,148, 6, 77, 3,
+104,233,255,220,212, 88,135,170,125, 22,255,255,255, 0, 50, 46, 67,116, 28,152,128,169,130, 31,144, 8,229,173,224, 22,237,194,
+234,174, 57,176, 26, 63, 33,242,250,162, 92,218, 60, 86,106, 21, 79,119, 3,182, 44,214,187,195,116, 21, 11, 19,218,226, 83, 83,
+126, 84, 86,249, 21,178,198,122,206,228,191,162,142, 28, 29, 81,154,147,163,189, 29,114,186,104,171,153, 20, 59,155,164,166, 13,
+155,135,213, 84,118, 51,206,234, 84,156,160,142,110, 30, 52, 15,101,135, 33,124,101,133,216, 97,184,166, 77, 48,195,119, 74,178,
+188, 23, 84, 67, 29, 98,110,118, 68, 20, 59,201, 78,250,121, 93, 22, 51,118,192,153, 87,213,145,247,139, 42,195,224,191,188,156,
+ 24, 81, 74,246, 78,239, 32,189,106,100,241, 5, 32,170,165, 89, 48, 7, 25, 96,240,190,231,209,145,165, 87,159,204,171,123,230,
+249,130, 58,167,158,236,154,124,138,215,156,161, 73,224, 68, 0,149, 39,117,180, 91,249,211, 68,243,255, 62,119,162,247,247,118,
+ 77, 55,191, 58,177,200,236,125,112,186,217,219, 99,144,185, 76,198,168, 15, 84,154,148,166,149,202, 24,101, 65,217, 76, 81,135,
+233,121, 15, 36,107, 3,206,206,110, 41,159,118,245,149, 86,101,211,201,199,109, 93,229,228,228, 58,194,235,122,158,183,149,135,
+ 64,203,255,194, 26,121, 61,187,116, 48,137,214,187, 61,195,156, 2, 90,148,116,230, 73, 17,225,209,219,191, 10, 40,170, 66, 38,
+179, 7, 0,215,229,117,242,241,213,131,128,137,253, 91,191, 1,160, 93,229,192, 85, 70,176,226, 37,141, 19,209,235,225,164, 2,
+114,107, 76, 78, 25, 87, 61,134,162, 62,188, 50, 44,179,248,175,107, 42, 80, 43, 42, 18,173,210,153,162,215, 50, 84,135,161,109,
+121,227,185,175,149, 3, 80,119,229,129,164,228,249,139, 23, 47,228,211,167, 79, 10,216,154, 57,115,166,146,120, 78,105, 17,237,
+142, 0, 28,158,198,138, 21,203,122,151,173,173,106, 69, 72,145, 34, 69,137, 86,173, 90, 53,199,115,216,221, 36, 69, 33,121, 42,
+ 6,181,100,145,209,163, 71, 23,233,220,185,179, 34,129,105,219,182,109,190, 28, 57,114, 84,140, 17, 35, 6,231, 37,187,106,125,
+ 71, 18,173, 18, 37, 74, 40,101, 38,208,178,149,143,215,108, 21,208, 18, 52,169,231,200, 87, 12,160, 45,111,198,140, 25,203, 82,
+146, 69,160,101, 43, 31,175,217,107, 75, 74,180,122,247,238,173, 72,180, 8,180,150, 45, 91, 38, 63,118, 24, 35,213,106,183,150,
+239,178,100,147, 14,181,170,139,135,135,135,128,231,161, 6, 90,148,104,125, 87,171, 77,233,106, 13,219,151,142, 29, 63,126,233,
+106,213,170,149,222,178,101, 75,105,208,252,210, 64,203, 33, 22,249, 90,251,123,152,202, 69, 9, 7,128,201,136,238,223,167,250,
+120,108,228,119,114,176,175,155,124,124,114, 76, 1, 90, 47, 96,204,254,246,214, 97,153, 57,162, 75, 64,158,148,145, 39, 18,212,
+ 56,243, 50, 76,142, 25,155, 20,119,249, 32,107, 27,200,218, 30, 5,149, 68,105, 86,195,194, 9, 63,240,158, 51,180,172,243, 18,
+ 44, 80, 66, 86, 33,123,252,231,187, 39, 52, 17, 74, 79,246,140,173,167, 24,215,235, 81, 27,146, 30,129, 22, 29,146, 90, 26,190,
+211, 38,235,213,170,159, 66, 2,173,121,223,107, 2, 45,216, 91, 61, 10,120,251, 68,252,214, 52, 85, 92, 56,120,207, 42, 43,158,
+ 35, 75,203, 26,212,123,195,164,174, 82, 38,115,172,103,101,254, 54,230, 12,237, 17,161,164,107,140,107,173,171,230,127,223,184,
+172,155, 79,213, 60, 9, 94,214, 46,156,226, 45,212,144,215,156, 37, 88, 58, 67,148, 29, 72,119, 43,102,143,236,125,112, 65, 15,
+243,225, 73,213,205,207,167,228, 55,191,152,156,207,252,126,215, 0,115,245,156, 49,158,150, 76, 31,229, 46, 83,149,156,241,189,
+206,173, 29,230, 87, 54, 83,148,237, 90,239,129,139,250,168,117, 10, 37,247,150,157, 61,101,239,232,234,226,154,200,116,110,215,
+176, 74, 34,238, 45,165,106,238, 4, 47,120, 95,139,134, 93,160,117,126,133,188,254,179, 80,152,108,180,234,194,136, 22,146,212,
+ 71,190,179, 10, 7,188,159, 93, 52, 8,108,125, 56, 54, 53, 96,225,160,102, 62,232,151, 78,237,128, 77, 16, 51,226,195, 75, 67,
+ 50,201,189,241,121,165,188, 91,148,247, 79,167, 23,149,107, 35,178,202,245,145,217, 36, 85,252,191,129, 86,203, 34, 49,127,167,
+ 91, 7,195, 24, 62, 52, 45,111, 60,243, 53,115, 0,182, 66, 5,176, 91,237, 2,164, 45,247, 96,243,244, 73, 85, 37,242, 28,118,
+ 70,247, 0,156,206, 69,137, 18, 5, 67,178,238,131, 96,196, 13, 18,176, 58, 80,149,213,156, 56,113, 98,117, 72, 94,106, 79,154,
+ 52,169, 6, 0, 86, 69, 0,187,114,112, 69, 80,149,121, 28,129, 44,190,205, 30,208,226,173,136, 17, 35, 14,254, 59,139,109,181,
+161,179, 64, 11,180,212, 50,209,159,150,211, 54, 90,150, 64,139,170,195,105,211,166, 73,149, 90, 77,165,118,129, 66,210,173, 64,
+ 14,153,211,170,177, 28, 57,114, 68, 81,203,134, 86,117, 72, 27,173,239, 42, 84, 41, 29, 63,113,178,210,160,163,128,214,195,135,
+ 15, 43,231, 95, 82,117,168,187, 39,124,157, 25, 29,239, 58,180, 51,121,181, 47,148,218,228, 63,167, 85, 38,217, 51,164,172,236,
+235, 16, 71, 38, 86, 53, 73,233, 12,166,243,101,179,197, 61,190, 98, 84, 51,249,136,109,251,215,247, 45,150,157,243, 7, 72,249,
+ 92, 73, 62, 16,220, 56, 83,255,108, 73, 77,127,238, 26, 80, 92, 78, 12,200, 46,199,126,203, 38, 60,231, 53,103,104, 48, 47,189,
+199, 99,103,225, 11,120,131,127, 87, 58, 83, 28,175,142,213,178,125, 90, 63,178,177,248, 31,153, 8, 95, 92, 19,101,255,148,230,
+146, 39, 69,164,195,144, 70,196,214, 75, 91,217, 97,184,185,167,141, 29,134, 77,130, 25,190, 83,146,229, 61,167,162,148,207, 28,
+ 93, 83,162,229,115, 1,134,239,251,134,137,247,236,178,114,114,116, 25, 89,221, 53,175,204,233,249,189, 76,235,245,163,208, 64,
+ 94,111,217,108,229,195,234, 43, 89,139,154, 37,197,239,181,151,188,121,116, 69, 78, 47,233,139,122,115, 55,100, 60,129, 95,149,
+ 50,206,208,134,196,234,254,199, 75,171,205, 31, 47,174, 54,203,181, 77,102,247,174,169,204,151,135,185,153,159, 79,200, 97,246,
+117,255,217,188,121, 78, 27,179,220,223,167,164,219,219, 39,152,229,208,112,179, 30,160,149, 41,177,169, 33, 85,197,178,181,131,
+252, 84, 38,213, 59,183, 68,166,148,205, 75,166,120, 71,176,189,168, 83, 94,193,125, 91,222,219, 53,139, 78,137,150,223,153, 37,
+242,106,114, 14,167, 36, 88,182, 8, 67,122,187,111, 78,139,116,111,222, 44,253,241,147,223,202,186, 1,239,231, 20, 13, 48,159,
+ 95, 17, 80, 52,125,244, 71,249, 19, 40,198,182,186,143,120, 49, 35,182,139, 27, 35,226, 67,166, 56,209, 35, 14,231, 78, 67,239,
+153, 37,229,226, 96, 87,129,180, 75,149,104, 21,107, 82, 48,102,127, 72,182,122, 24,238, 29,116,179,214,200,248,237,112,128,210,
+159,166, 0, 84,179, 1,130,246, 48,241,156,215,144, 52,119, 7,218,169, 38,159,163, 31, 40, 58, 97, 46, 24,152,120,206,107,186,
+104, 58,144,104, 41,182, 88,160, 19,110, 64,203, 66,186, 21, 42,160, 5, 55, 24,207,105,163, 85,174, 92, 57, 41, 86,172, 24,119,
+107,202, 60, 24,189,247,172, 85, 85, 22,182,108, 40, 87, 15,238,151,193,131, 7, 11,242, 73,163, 70,141, 4,210, 60,107,223,147,
+182,216, 24,100,163,133,141, 11, 10,152,194, 46,198,210, 85,170, 84, 81,206,207,157, 59, 87, 26,198,245, 95, 92,162,245,237,116,
+107,135, 37,213,239,168, 20,160,233,217,171, 93, 35,228,213,246,193,178,176, 81, 28,169,155,195,228,135, 9,173, 7, 87,253,120,
+ 5,195,180,180,111,245, 67,158,183,135, 22,253, 46,114,239,128,200,221,189,182,188,197, 59,116,142, 71,119, 14,245, 11, 38, 8,
+ 16, 72,122,196,251,186,240,156,215, 52,152, 29,130,102, 9,215, 56, 47,228,233,121,145, 7,135,229,214,198,161, 34, 23,151,139,
+156, 91, 40, 87, 87,255, 42,157,170,101,253, 4,245,225,124, 13, 99,240, 16, 52, 21,160,229,222, 85, 26, 21, 75,166,236, 48,164,
+ 77, 22,119, 24,190, 92,214, 80,104,151, 69,149, 33, 65, 86,157,252,241,110,191,152,249,157, 45,160, 21,220, 43, 62,108,180,166,
+118,175, 1,239,234, 27,229,234,226,142,178,177,127, 73,153,215,167,154,252, 53,164,163,116,173,153,195,151, 54, 92, 58, 58,153,
+ 35,126, 70,200,145, 44,162,204, 31,253,139,204, 26,210, 78,134,181, 41,175, 36,212, 93, 96,187,224, 72, 82, 20,130,102,177,180,
+145,207,215,200,151,240, 73,195, 50, 9,125,182, 76,105,110, 30,223, 36,177,249,209, 31,217, 20,160,245,118,105,109,243,152, 6,
+ 73,204,239, 38,101, 82,210,142, 30,153,205,178,184,172, 53,208,178, 89,206,252,169,163, 30,121,187,186,153,220,248,171,166,192,
+125,131, 2,168,249,123,109, 74, 37,241, 89, 82, 83,242,165,138,114,196, 1, 15, 28, 58, 44,245, 59,181, 64, 94,142,203,160,168,
+ 14,157,240,153, 21,130,102,174,148,166, 84, 0,251,127, 85,202, 22,203,107,215,240, 42,239,253,246, 14, 11, 48,159, 94, 24, 64,
+167,165, 58,218,135, 89, 28,181, 81, 22,248, 7,123,114,110, 64,122, 73, 28,251,111,160,165, 30,170,100,235,111,135,165,209, 13,
+135,165,255,103,141,225, 96, 83,103,199,211,153,205,224,231,223, 40, 74,143,247,119,187, 96,203,130,215, 65,252,180,167, 18,180,
+178,195,178, 11,182,108,209,228, 53, 72,180,206,174, 94,189, 90, 14, 29, 58, 36,220,125, 56,107,214, 44, 25, 56,112,160,108,219,
+182, 77,176,115, 80, 81,199,194, 46, 77, 96,171, 38,163, 70,141, 34,208,178,229,110, 39, 88,187, 71,142, 28,185, 40,158, 83,164,
+ 86,244,147, 69,144, 69, 96, 69, 35,120,238, 70,228,127, 2,174,241,227,199,151,238,215,175, 95,105,230,183,209,191, 62, 71, 95,
+210,217,141,191,218,108,122,230,241,255, 23,158,241, 12, 9,178,238,244, 52, 73,254, 84, 38,127,168, 84, 66, 24, 22,230,134, 68,
+ 2,147,167, 31, 65,150, 28,159, 68,160, 21,108,242,208,152,116,148,151, 33, 44,207, 43,130, 44, 62,143,243,215, 58,216, 23,162,
+113,139,103,136,233, 45, 15,142, 42, 52, 22,245, 40, 39,115,250,213,134,119,241, 44, 31,105,235, 5,135,147,153, 67, 67,147, 42,
+ 67,126,101,219,135,125, 47,175, 86,183, 20,250,202, 34,200,226,225,241,107, 49,241,158,247,131,120,207,169, 36, 47,160, 2,228,
+ 97, 67,162, 21, 18, 16, 98,215,225,136,159,138,251, 28, 95,208, 75,246, 47, 25, 41,115, 6, 54,151,110,181,114,249,114, 55,162,
+142, 50, 58,156,196, 41,181,234,218,164,130,248,189,130, 68,235,225, 21, 57,181,184,183,236,155,212,148,210, 55, 45,137,150,221,
+143,165, 4, 84,131, 7,167,212, 55, 63, 95,209,210,252,118,101, 67,243,155,133,223,155,125,103,149, 52,183, 41, 17,247,233,247,
+ 89,163, 61,102,170,155, 55,250,179, 35,221, 93,116, 1, 45, 72,175,188,101, 93, 67, 25, 80, 59,163,164, 79, 96,202,197, 10,241,
+247,183,154, 25, 20,181, 49,156,203, 98,247,178, 93,187, 10,155,229,164, 52,235,221,238,193,242,114, 76, 26,121, 57, 42,153,120,
+ 15, 79,228,140, 84,203,110,221,179,165, 48,229, 5,237,181, 63,149, 78,253,236,194,162,206,102, 0,184,135, 97,109,163,192,231,
+179,196,140, 26,225, 78,244, 40, 17,130,133,224, 1,184,130,100, 43,198,111,112,235,240,253, 23, 26,208, 62,199, 32,105,208,212,
+217, 73,116,102, 51,248,169,147, 81, 58,179, 89,130,162,111, 6,104,161,110, 69, 8,182, 18, 38, 76,248, 24,201, 11,118, 83, 94,
+216, 28,240, 28,170,217,215,209,162, 69,243, 1,176,122, 5, 21,223,115,228,121,140,107, 4, 89,182,236,166,173,251, 82,226, 64,
+240,228,208, 43, 60,104,169, 32, 43,241, 23, 26,151,116, 54,229, 87,153, 45,116,170, 67, 37,120, 52,131, 72, 59, 8, 32,205,123,
+129,249,108, 5,154,214, 28, 40, 2, 3, 77, 63, 7,200,122,206,128,208, 58,216, 23,130, 38,105, 32,144, 52, 85,135,175,225,125,
+126, 28,119,238,233,113,103, 96,111, 5,193,235,185, 93, 76, 67, 85, 95, 89,234, 14, 67,238, 50,164, 36, 75,149,102, 17, 92,169,
+137,249,173,202,110,179,238,148, 92,209, 48,158, 54, 91,252,213, 41,201, 82, 73, 59,228, 39,192,128, 71,153,244, 38, 74, 31,149,
+196,115, 94,211,224,169,125,176,129, 77, 16,165, 50, 70,187, 87, 33, 75,204, 71, 21, 50,199,120, 84,222, 45,250,163,114,153,162,
+ 61,162,196, 75,165, 73,176, 93, 34,125,228,253,165, 93,163, 88, 58, 86,181, 73, 19,210,202,223,235, 23, 78,252, 58, 91,210,136,
+227, 44,203,148, 41,145,233, 55, 92,127,149,213, 37,226,111, 14,202,106, 87,162,101, 29, 80, 58, 44, 18, 45,235,247,131,118, 69,
+164,109,232,227,115,117,244, 77,135, 96, 88,231,243,182,178,105,126, 71,161,160,109,208, 12, 5,211,156,237,159, 97,124,133,209,
+ 70, 97,100,160,189, 49, 89,143, 68, 75, 85, 33,210,102,203, 58,191,173,185, 67,143, 68, 43,208,232, 93,177,217,178,206,239,104,
+ 62, 10, 7, 54,124, 43,125, 41, 28,170,250,223, 35,241,173, 52,238,191,170,156,110,110,110,138,239, 23,157,221,237, 95, 85,119,
+157,117,214, 5, 92,157,164,101,208, 52,130, 53,135,178,203,216,125,204,248, 54,195,151,163, 78, 73,180, 28,129,177,176, 0, 45,
+ 29,187, 14,255,203,237, 30,190, 45,254,101,169, 57,246,163,245, 25,203,242, 95,238, 48, 70,221,195,183, 99, 25,252, 52,248, 25,
+ 94, 28, 48,250, 82,120,113,242,111, 58, 6, 63, 13,126,134, 47, 7,190, 77,106,225, 19, 84, 58, 20,117, 55, 62,192, 80, 48,205,
+193, 35, 6, 63, 13,126,134, 23, 7,140,190, 20, 94,156, 52,192,134,209,151,140,190, 20,190, 28,248, 54,169, 57,180,209,226, 71,
+ 98, 43, 57, 83, 85,123, 52, 28, 93,215,162,111,208,180,221, 46,161,109, 47,131,159, 6, 63,245,246, 1,227,219,180,207, 1,189,
+ 60,180,204,103,240,211,224,167, 45, 14,252,151,251,146,202,143,208,206,103, 90,223,212,127,234,190,177,210, 9,223,230, 54,248,
+105,240, 51,188, 56, 96,244,165,240,226,164, 33,209, 50,250,146,209,151,194,151, 3,223, 38, 53,195, 70, 75,163,221,140,129, 34,
+124, 59,182,193, 79,131,159,225,197, 1,163, 47,133, 23, 39, 13, 64,104,244,165,175,191, 47,133,111, 9,191, 44, 53, 3,104, 25,
+ 64,203, 46, 7,140,193, 39,124, 63, 70,131,159, 6, 63,195,139, 3, 70, 95, 10, 47, 78, 26, 32,243, 91,233, 75,225,219,226, 95,
+150,154,227,160,210,159,177, 44,223, 74,227, 26,229, 12,223, 78, 96,240,211,224,103,120,113,192,232, 75,225,197, 73, 3,108, 24,
+125,233,235,239, 75,225, 91,194,255, 8, 53,163, 99,135,111, 67, 27,252, 52,248, 25, 94, 28, 48,250, 82,120,113,210, 0, 48, 70,
+ 95, 50,250, 82,248,114,224,219,164,230,188,103,248,112,170,167,241, 1,134, 19, 35, 3,201, 24,252, 52,248, 25, 94, 28, 48,250,
+ 82,120,113,210, 0, 90, 70, 95, 50,250, 82,248,114,192,160,102,112,192,224,128,193, 1,131, 3, 6, 7, 12, 14, 24, 28, 48, 56,
+ 96,112,192, 1, 7,130, 27,199,187,187,187, 43,225, 90,212, 95,131,117, 6, 7, 12, 14, 24, 28, 48, 56, 96,112,192,224,128,193,
+129, 47,201,129,127, 25, 22, 49,128,214,151,236, 60,198,187, 12, 14, 24, 28, 48, 56, 96,112,192,224,128,193, 1,199, 28,248,198,
+129,150, 99, 27,173,111,188,114, 70,223, 53, 56, 96,112,192,224,128,193, 1,131, 3, 6, 7,190,113, 14,252,171,177, 8, 42, 87,
+134, 21,228,239, 55,222, 78, 70,241, 13, 14, 24, 28, 48, 56, 96,112,192,224,128,193,129,111,144, 3,255,122, 44, 98,216,103,125,
+131,189,210, 40,178,193, 1,131, 3, 6, 7, 12, 14, 24, 28,248, 23,113,192,192, 34,255,162,198, 52,170, 98,112,192,224,128,193,
+ 1,131, 3, 6, 7, 12, 14, 24, 28, 8, 39, 14,252, 99, 33,120,194,169,252, 6, 25,131, 3, 6, 7, 12, 14, 24, 28, 48, 56, 96,
+112,192,224,192, 87,203, 1, 21,104, 89,255,126,246, 2, 27,142,236,194,151,197, 6, 63, 13,126,134, 23, 7,140,190, 20, 94,156,
+252,155,142,193, 79,131,159,225,197,129,255,114, 95, 10, 47, 30,254, 19,116, 12,207,240, 26, 92,255, 47,119,108,163,238,225,251,
+ 73, 26,252, 52,248, 25, 94, 28, 48,250, 82,120,113,210, 0,195,223, 74, 95, 10,223, 22,255,143, 80,251, 86, 26,215, 40,103,248,
+118, 72,131,159, 6, 63,195,139, 3, 70, 95, 10, 47, 78, 26, 96,195,232, 75, 95,127, 95, 10,223, 18,126, 89,106,148,104, 85, 11,
+124, 37,127,173,109,182, 62, 91,105,140,142, 29,190,172, 53,248,105,240, 51,188, 56, 96,244,165,240,226,164, 1, 96,140,190,100,
+244,165,240,229,192,183, 75, 45, 69, 32,192,226,239, 23, 59,140, 15, 48,124, 89,109,240,211,224,103,120,113,192,232, 75,225,197,
+ 73, 3,104, 25,125,201,232, 75,225,203,129,111,147,154, 97,163,165,209,110,198, 64, 17,190, 29,219,224,167,193,207,240,226,128,
+209,151,194,139,147, 6, 32, 52,250,210,215,223,151,194,183,132, 95, 17, 53,118, 62, 91,201,153, 34,218,163,225,232,186, 22,125,
+131,166,237,118, 9,109,123, 25,252, 52,248,169,183, 15, 24,223,166,125, 14,232,229,161,101, 62,131,159, 6, 63,109,113,224,191,
+220,151, 84,126,132,118, 62,211,250,166,254,137,251,134, 68,203,144,104,217,229,128,177,202, 11,223, 79,210,224,167,193,207,240,
+226,128,209,151,194,139,147,134, 52,239, 91,233, 75,225,219,226,255, 86,106,249, 77,166,152, 22,117,251, 86, 26,215, 40,167,118,
+135, 76,134, 44, 76,122, 14,131,159,122,184,164, 63,143,193, 79,253,188,210,147,211,224,167, 30, 46,233,207, 99,240, 83, 63,175,
+244,228,252, 47,243, 83, 15,127,190,149, 60,159,103,215, 97,118,147,169,245,132, 92, 73, 63,230, 50,153, 98, 5,114,194,110,135,
+ 73,154, 52,233,140,244,233,211,251,226,247,137,139,139,203, 99, 53,225,255, 99,164, 71, 22,105,191, 21, 87,109,210,140, 22, 45,
+218,196,180,105,211,190, 77,152, 48,225,147, 68,137, 18,121, 37, 78,156,216, 43, 73,146, 36, 74, 2, 45, 37,225, 29, 74,194,189,
+ 19,122,104,134,177, 53, 63,239,199, 34, 18, 41,137,139,139,103,138, 20, 41,188,156, 77, 46,201,146, 29,118, 18, 12,143,140, 16,
+193,244,137, 9,207,141,212,193,151,207, 91,119, 29, 5,208,153, 37,168,156, 98, 50, 69,210,147,114,154, 76, 9,162,152, 76,237,
+ 35, 70,140,120, 41, 90,196,136, 29,213,103,156,228,103,176,226,249, 29, 53,101,242, 63, 98,170,103, 62,106,106,203, 95,254,255,
+ 7,251,103,157, 40, 81,162, 44,194, 55,178, 30,101,232,138,228,194, 95,254,231,117,156,215,113,192, 91,135,237, 94, 42,175,169,
+ 79,133,194, 81,174,150,200,107,106, 73, 26,101,242,155, 18,227,124,118,133,194,145,175,149,204, 99,106,109,135,174, 35,154, 17,
+240, 76,196,192,196,115,189, 71, 16,205,149,104,119,189,169, 97,194,132,217,127,202,146,254,113,219,220,174,135,234,186,184,164,
+231,115, 97,105,119, 29,133,253,226,223, 17,198,203, 22, 24, 35, 31, 98,188,124,136,113,180,133,142, 50, 50,139,158,114,254,138,
+124, 99, 3, 19,207,181, 14, 45,154,119, 64, 0,159,159,146,120,174,231,208,162,169,135,134,117,158,127, 3,205, 63,215,174, 93,
+ 43,175, 94,189,146,129, 3, 7, 10,218,254, 22, 42, 73,144, 16, 77,131, 33,214,117, 15, 45,157,208,240,253, 91,120, 38,252,129,
+ 86, 14,147,233,135, 63, 42, 23,249,244, 97,222,208, 0,173,193, 7, 31,243,156,102,205,154,153, 5,199,229,203,151,197,223,223,
+ 95, 62,124,248, 32, 31, 63,126, 84, 18,207,213,148, 42, 85,170, 7, 86, 28, 13,209,177, 49,233, 77,250,241,199, 31,223,144,222,
+137, 19, 39,228,221,187,119,226,231,231,167,208,125,255,254,189,242,223, 50, 37, 75,150,204,203, 17,205,120,241,226,157, 0, 96,
+243, 98, 34,104, 83,129, 27,193,155, 37,128,179, 4,113,200,163, 23,188, 85,198,187,247,234, 72,204,103,255,163, 6,208, 34,192,
+ 98,157,157, 61, 82,167, 78,125, 79,171,141, 44,238, 39, 35,192, 82,223,129,243,128,232,209,163,167,181,188,143,115,107, 73,151,
+230,224,147, 50,101,202, 31, 81,254, 29, 72,219,121,174,227,171, 9, 70, 51,110,220,184, 39,200,255,228,201,147, 63, 81, 19,104,
+ 61,177, 76,160,251, 68, 77,108,115,180,167,221, 54,114, 4,178,246,152, 76,145,163,155, 76,229, 34, 71,138,228, 14, 58,175,207,
+158, 61,171,240, 3,253,238, 65, 88,129, 22, 65,149,239, 1,211,175,207,118, 71, 63,234,115,107,212, 43,254,242,191, 21,216,210,
+228,167, 14,254,233,153, 32,154,227, 56,237,229,229,245,224,229,203,151,143,254,250,235,175, 43, 49, 98,196, 56,192, 95,254,231,
+117,222, 7,161, 14,118,222,103,183,156,197,242,154,138,182,170,147,194,247,244,186,166,190,229, 10, 69, 62, 85, 34,151,169, 90,
+197, 98, 81, 31, 76,237,155,221,119,223,172,146,190,101, 11, 68, 60,231, 36,205, 8,145, 35, 71, 46,142,197, 85, 75, 76, 12,205,
+ 2, 83, 83,252, 42, 9,125, 66, 73,104,243,122,142,190, 35,189, 32, 43, 77,140, 24,197,235,101, 76,235,123,103,200, 32, 57,219,
+181,179,180,116, 77,243,154, 96,203,137,239, 40, 20, 77,164, 11,192, 56, 75,215, 97, 95, 34,200,226,216,107, 54,155, 5, 99,221,
+ 67,157,196,245,244,207,177,248,100,148, 4,154, 76, 90,135, 22,205,160, 97, 15,132, 8,182,244, 28,142,104,198,136, 28, 49, 98,
+143, 88,209,162,109,143, 30, 57,242, 19, 38,158,227, 90, 79, 16,142,225,128,184, 86, 57,245,148, 75,207,183, 25, 26, 58,150,207,
+ 56, 42,103, 28,124, 51, 55, 39, 78,156, 40,190,190,190, 74,226, 57,175,129, 64, 28, 39,234, 30, 90, 58, 97,173,219,215,242,252,
+231,181,209,130, 36,171,224, 47,121,221,222,155,151, 79,252,228, 95, 39,157,101,167, 15,209,184, 4, 89, 53,190,255, 62,232, 35,
+201,159, 57,179,244,111,214, 76, 70,117,236, 32, 19,186,119, 81,210,196,110,191,200,244,222,189,228,241,227,199,162, 3,104,141,
+169, 83,167,206,115,149, 96,203,150, 45,101,243,230,205,114,244,232, 81, 57,127,254,188, 92,189,122, 85,110,221,186, 37, 15, 30,
+ 60,144, 39, 79,158, 8, 38, 12,209, 2, 90, 4, 88, 4,102,234, 17, 16, 16,160, 0, 64, 14, 62, 4,112,188,199,206,248,246,237,
+ 91, 37,113, 37, 64, 73,153, 85,107,219,235,216,123,153,159,229,185,127,255,190,220,187,119, 79,238,222,189, 43,119,238,220,145,
+219,183,111, 43,101,189,121,243, 38,121,184,215,209, 4, 97,178, 0, 90,195,134, 14,145, 33, 3,123,203,136,161,189,149,223,254,
+253,250, 74,223,190, 33,211,148, 41, 83,228,211,167, 79,228,105,168,129, 86,181,106,213,164,122,245,234,199, 1,104,122, 71,138,
+ 20,233, 47, 59,146, 46,205,193, 7, 0,104,143,143,143,143, 39, 19,206,119,235,248, 82,130,209,100, 27, 61,124,248, 80, 94,188,
+120, 33,222,222,222, 74, 98,219, 50,145,191, 76,175, 95,191, 86, 18,239, 1, 36, 8,222, 99, 23,180,219, 2, 90, 16,229,100,192,
+ 64, 59,178, 80,161, 66, 47, 70,142, 28,249,174,102,205,154, 82,187,118,109, 57,121,242,164,140, 25, 51,230, 67,132, 8, 17,124,
+209,247, 19,242, 89, 7, 19,110,127,220,187,134,116, 21,169,151,117, 61, 41,193, 34,184, 58,178,161,161,210,221,248,203,255,188,
+238,128,166, 14,118,105,102, 9,209, 70, 88, 96,172, 3,175, 30,162,110,151,126,250,233,167, 51, 88,168, 60, 66,145, 30,241,151,
+255,121,157,247, 99,199,142,189,198, 14,117,187,237, 94, 42,159,105,231,206, 69, 63,249, 30, 94,217,202, 23,146,173, 7,245,202,
+199,125,117,104, 81, 13,223,131, 11, 43,251,182,173,157,216, 23, 18,173,174, 78,208,164,244,170,120,195,134, 13,155,163,124,109,
+ 47, 94,188,216,150,191,232,219,109,241,141,182,197,183,169, 36,244,173,182, 4, 91,142,190, 35, 61, 64, 43,182,201,148, 61,125,
+250, 84,190, 19,187,180, 23,243, 31,163,196,167, 89,125, 57,148, 45,131,180,201,144,244,208,151,110, 35,205, 86,213,206,224,240,
+219,164, 36,139,253,144, 99, 82,246,236,217, 95,226, 59,123,132,164,181, 50,215,252,222, 81,172,175, 25,104, 21,142, 22, 57,242,
+253, 21, 11,167,125,188,123,243,140,248,191,127, 44,103,207, 28,149,139,103, 15,201,146, 89,147, 62,240, 30,202, 95,216,137,254,
+169,221, 10,142,115,232,225,167,179,239,176, 73, 51,121,241, 14,181, 83,148,236,252, 36,101,137,142, 79, 18,184,126,247,218, 37,
+ 69,186,143,148,106,113,252,164,148, 11, 47,249, 83, 15,208, 74, 94,164, 67,237,228,197, 59, 61, 73, 94,172,227,147,120, 25,191,
+123,157,212, 57, 58,206,214,229,191,151, 31, 19,141,107,131, 52, 46,222,239,150, 77,248,232,223, 44,183,120,151,142, 97, 23,104,
+ 81, 93,136, 21,177,191,165, 4,166,115,221,186,226,185, 96,150,220,223,188, 74,188,247,109, 20,239,189, 72,187,221,101,215,180,
+ 73,242,232,209, 35, 77,160,149, 38, 77, 26, 69,146,165, 30,191,255,254,187,236,216,177, 67, 78,157, 58, 21, 2,100,113,194, 37,
+ 48,194,224,235, 16, 20,113, 18, 39,189,237,219,183,203,238,221,187,101,223,190,125,114,232,208, 33, 57,118,236,152, 50,201,158,
+ 57,115, 70, 46, 92,184, 32, 87,174, 92,145,235,215,175, 11, 6,116,103,128, 22, 37, 85,175,222,188,121,163, 12,102, 60, 71,218,
+107,145, 94, 61,125,250,212, 41,160, 69,112,229,115,111,129,248, 93,255, 89, 94,223,153, 39,143, 31, 92,151,213,107,215, 75,243,
+182, 93,165,220, 15,245,101,208,176,209, 10,128,131,100, 66, 1,139, 78, 2, 45,118,234,145,213,170, 85, 13, 32,200,154, 60,121,
+178, 55,128,167, 39,234,127,214,205, 45, 83, 16,223, 3,213,138,170,100, 75,115,160, 0,232, 57, 76,144,181,105,211, 38, 2, 45,
+ 75, 85,166,189,143, 40, 4,208, 34,200,114,119,119, 23,208, 80,192,245,214,173, 91,101,219,182,109,178,115,231, 78,233, 50,253,
+172,180,156,112, 94,234,247, 89, 34, 7, 15, 30, 84, 64, 59, 36,121,154, 64,171,140,201, 20, 59,138,201,212, 44,106,148, 40,167,
+211,165, 75,247,186,124,249,242, 31,213, 74, 66,122, 18, 0,245,217, 11, 72,178,110, 71,141, 24,177, 55,196, 25, 46,142, 36, 90,
+232,155, 37,144, 55,216,202, 27,234,114, 31, 53,129,158, 79,191, 54,137,252,188, 46, 12, 13,176,236,195,175,174,143,240,161, 26,
+241, 31,152,196,235, 67,138,177, 17,239,237,131, 84,191, 73,147, 38,167, 9,180,248,203,255, 72,221, 33,185,117,199,175, 45, 41,
+ 17,139,107,179,221, 1,162,126,232,222, 50,151,239,245,125, 3,125,103,141,168,236, 91,190, 72, 20,223,189,139, 27,251,158,219,
+208,220,183, 89,181, 68, 62,165,242,152,154,235, 25,204, 3,243, 16,100, 21,169, 91,183,110, 83,130, 43,166, 37, 75,150,180, 69,
+155,183, 61,119,238, 92,219, 27, 55,110,180,197,119,213, 22, 11,153,182, 88, 88,133, 25,104, 17,100,165, 74,147,216,231,204, 25,
+ 79, 44,140,110,202,248,186, 85,229,121,169, 2,114,169, 72,110,105,145, 58,233,227,127,160,141,194, 58,201, 56,250, 54,179, 64,
+ 51,224,205, 69, 37,192,171,112, 28,226,120,153, 32, 65, 2, 45,201, 86, 48,154,144,130,114,124, 85,212,122,129,231, 44,243,239,
+ 48,239, 24,195,196,243,192, 74, 56, 82, 39, 90,210,188,163,210,195, 47,207,121,216,186,166,197, 27, 91,117, 47, 84,184, 80,158,
+ 55, 15,238, 94,148, 11,231,119,202,155,151,219,228,195,251,189,210,177, 67, 93,233,213,179,181,188,245,185, 37, 15,239, 92,144,
+156,217,179,188, 1,113, 91, 96, 75,115,172,211, 42,148,141,251, 95,140, 38,128,209,243,230,127, 28,147,246,211, 47, 43,169,221,
+228,115,146, 54,231,119, 50,120,240, 96,101, 72,202,153, 51, 39,205, 69, 18,217,169, 67, 80, 57,147, 21,237,240,188, 82,255, 3,
+ 82,125,232, 25, 37, 85, 29,116, 66, 92, 50,151,254,155,142,217, 75, 26, 86,207,248,233,212, 34, 83,245, 15, 71, 76,101,152,204,
+135, 77,133,228,168, 98,150, 16,116, 96, 44, 47,227,232,127, 40,248,248,165, 31, 81,157,149, 90, 74,182,254, 46, 3, 39, 42,171,
+202,233, 21,195,154,242,154, 76, 73,202,197,143,117,251,229,220, 17, 31,204, 93,202,201, 43,128,172,243,133,162,218,125,158, 54,
+ 89,150, 19, 10,207,199,118,238, 36,231,150,205, 23,175, 29,171,131,110, 17,112,237,158, 62,209, 30,208, 10,198, 60,218,100, 17,
+252,180,111,223, 94, 6, 13, 26, 36,243,230,205,147,195,135, 15, 43, 42, 73,130, 11, 74,141, 40,201, 82, 65, 22,213,137, 84,185,
+ 57,106, 1,170, 10, 89, 24,130,172,189,123,247,202,175,191,254, 42,125,250,244, 17, 79, 79,207, 16, 32,139, 82, 40, 14, 70, 54,
+ 36, 90,142, 94,177,151,146, 22,150, 15,153,246, 90,101, 84, 85,139,182, 84,135,255,207,106, 33,209, 26, 62,164,151,188,187,218,
+246,111, 73,219,149, 54,114, 7,171,178, 14,221,126, 11,226,103,250,172, 5,229,210,165, 75, 50,125,250,116, 69, 34,103, 5,180,
+ 52, 59, 35,242,231, 42, 92,184,240,217,254,253,251,159, 5,143, 61, 7, 12, 24,224,137,213,206,217,234,213,171,217, 3, 90,154,
+ 52,209, 6,107, 15, 28, 56,224,185,114,229, 74,218,153,173,213,124,192, 42, 3,193, 48,219,180, 94,189,122, 66, 0,104,157,154,
+143, 59, 47,231,239,248, 72,129,106, 61, 41,129, 83, 36,136, 54, 36, 90, 65, 84,177,131, 35,127,132,248,110, 7,163, 39,202,240,
+118,220,184,113, 31,159, 61,123, 38, 85,171, 86,229, 64, 35,144,146,190, 3, 15, 94, 70,138, 24,113, 30,243,217,146,126,217, 42,
+191,155,155,219, 45,130,245,229,203,151, 43,137,192,220,250,248,244,124,133,188,244, 44,169, 72,178,120,240,247,224,252, 56,126,
+ 86, 18, 45,103,217, 19, 94,249,127, 2, 33, 2,175, 86, 97, 33, 88, 50,175,105,245,177,205, 3,125,111, 31, 25,231,219,173, 69,
+118,223, 97,221,139,248, 94,217,209,221,119,249,196,106,148,110, 93, 47,157,215,180,167,114,241,104,143,113,174,231, 61, 17, 1,
+152, 91,168, 32,139,191,224,109, 91, 44,134,218,226,155,111,139,239, 49, 8,100,161, 13,219,162,205,109, 73,180,130,170,227, 72,
+162, 69,144,149, 34,117, 28,159,121,238, 53,229,175, 5, 93,101,207,190, 29, 50,127,254, 12, 25,221,176,182,180,204,225,246,142,
+ 54, 91, 97,225,203, 87,246,108, 22,104, 6, 94,112,124,228,184,196,177,194,195,195, 67,214,172, 89, 35,241,227,199,215, 2, 90,
+214, 85, 9,182,184, 8,188, 73, 91,186,200,129,137,231, 60,244, 74,185,108,209, 11, 15,246, 69,139, 17, 53,234,157, 71,247, 47,
+203,246,109,127,201,243,167,103,241,158, 79,242,233,227, 3,169, 95,191,178, 84, 40, 95, 76,250,246,249, 25,230, 39,247,229,214,
+213,243, 18, 40,217,114,164, 70, 12,143, 50,125, 81, 26,214, 18,173,164,201,210,124,236,222,189,187, 34,164, 88,191,126, 61,231,
+167,169,122, 10,100, 45,209, 74,146, 60,205,199,158, 61,123,202,237,107, 71,229,240,214,126, 50,127,144,233,244,147,237,166,249,
+106,122,177,203, 52,214,247,176,169,166, 37,216, 82,177,136, 10,184,172,177,137,158,114,252,195,121,212,197,113, 72, 9,176, 69,
+229, 20,128,164,183,114,153,161,187,205, 23, 45,234,205,251, 19,122,155,205, 3, 27,202,155, 50, 49,228, 98,225,104, 1, 29,147,
+ 68,252,104,181,243, 48,168,238, 52,124,191,118,237,154, 20,203,145, 67,122, 53,106, 36, 19,186,116,145,141, 99, 70,203,141,117,
+203,228,229,190, 13, 65, 31,211, 75, 39,128, 22, 65, 17, 1, 6,165, 25,148,100, 28, 57,114, 68,145, 54, 89,131, 44, 74,157, 56,
+136, 80, 13,168, 7,104, 49, 31, 37, 89, 84,183, 53,110,220, 88, 58,117,234,164,232,173, 45, 37, 89, 4, 89, 4,114, 4, 90, 54,
+212,145,142,218, 92, 81, 31, 98,245,109, 79,114,165,221, 95, 44,128, 22, 37, 90, 79,174,252, 41,111, 46,182,148,199,151,166,201,
+149,139,158,210,178,125, 79,153,189,223, 95,218,204,121, 33, 41, 51,230, 82, 36,124,211,166, 77, 83,192,152, 19, 64, 43, 34, 38,
+170,102,101,203,150, 61, 58,123,246,108,207, 69,139, 22,121,254,249,231,159,158, 99,199,142,245,196, 74,197, 19, 18, 50,111, 74,
+186,156, 48,146, 15,170, 23,218, 96, 38,248, 7,236,234, 73,160, 53, 83,187,194,193,115, 16,104, 81, 77,104,239, 32,208,186,124,
+255,173, 2,180,168, 98,164,138, 22,239,177, 59, 97, 64, 13,248,114,240,116,119,137,233, 86, 75,230,204, 95, 34,171, 86,173,250,
+ 8,213,168,151,151,232,216, 0, 0,255,244, 73, 68, 65, 84, 55,236,178, 14, 71, 53,153,126,172, 11, 59, 13, 71,118, 92,182,202,
+ 79,123, 62,182, 49, 65, 63, 37, 4, 84,101,159, 62,125, 90,182,108,217, 34, 11, 23, 46, 84, 36,140,171, 22,143,148, 51, 30,141,
+228,192,162,228,242,240,236, 32,185,187, 59,183, 12,105, 31,213,199,134, 65,188,179, 44,250,106,242, 67,162,117,244,206,169, 57,
+190,247, 78,254,229, 91,175,138,139,239,254,213,221, 21,233,214, 8, 0,174, 95,154,186,250, 30, 95,221,194,247,228,154, 38,190,
+229, 10, 70, 60,169,163,208, 17, 49,241, 55,165,186,144,146, 44, 38, 72, 52,219, 98,177,165, 72,179, 84, 73, 22, 65, 22,190,177,
+ 80, 3, 45, 21,100,205,223, 84, 75, 22,110,171, 32,163,231,102,151,198,173, 75,200,216,113,163, 5,106,196,119,180,217,178, 50,
+134,215, 81,244,175, 43, 11, 36,251,237,176, 64,228,198,163,139, 42,200,162,217,194,138, 21, 43,104,159,245,132,146, 44,240,250,
+ 17, 84,202, 90,170, 67, 61, 64,203, 86,229,195, 3,104, 69,137, 21,195,212, 61, 93,178, 8,251, 93, 83,196,127,144, 46, 86,164,
+253,177, 34, 71,236,142,151, 65, 48,237,248,128,180,185,227,166,181,115, 62,124,240,191, 40, 31,252,175, 67,195,112, 81,186,119,
+107, 34,205,154, 86,151,183,111, 78, 35, 93,194, 2,253,170, 20, 42, 82, 88,170,213,168, 35,157,219,119,248, 24,104,179,165, 69,
+250, 91,187, 79,219,170, 59,191,253,246,155,204,157, 59, 87,150, 45, 91,166, 8, 45,220, 18, 39,254, 56,209,100,122,250,151,201,
+ 84, 91,103,133, 20, 58, 88,136, 43,125,104,195,134, 13, 50,123, 82, 59,153,210, 55,230,235,219,238,166, 99,183, 54,152, 20, 19,
+ 31,254,222,223, 98, 58, 76,176, 69,201,150, 74, 59,180, 88, 68,103,217,190, 68, 54,109,137,150,117, 37,181, 74,229, 22, 37,218,
+173,147,125, 90, 4,124,152,208, 69,222,150,141, 5, 81,122,180,143,205,226, 71, 16, 44,241,186,218,123, 22, 96,228, 49,193,206,
+239, 63,253, 36,167, 33,121, 58,191,104,145,220, 88,185, 66,158,122,184, 43,234, 66,157,170,195, 96,228, 57,153, 17, 60,208, 8,
+ 30, 70,202,138,212,128,131, 5, 1, 16,237,114, 40,245,176, 4, 89,108,104, 45,160, 69,154, 20,159, 83, 93,216,170, 85, 43,101,
+ 66,228,228, 8,181,103,144,186, 80, 5, 89, 84, 73,209, 94,203, 89,160, 69,144,192, 85, 3, 42,179, 55,176, 66,250, 36, 89,106,
+237, 45,128, 86,191,190,125,228,194, 89,216, 20,156, 59, 36,103, 79, 29,146, 83, 39, 61,165, 81,139,142, 50,107,159,191,180,158,
+253, 66,146,166,206,172,212,101,234,212,169, 10, 47, 0,158, 44,109,180,108, 54, 23, 6,225,180, 25, 51,102, 92, 48,115,230, 12,
+ 79,240,214, 19,170, 57, 79,244, 17,207,117,235,214,121, 46, 94,188, 88, 57, 7,111, 9,146, 40,241,208,235,246, 33,220,128, 22,
+ 1, 54,121,200, 85, 55,213,133, 84, 23,239,218,181, 75,246,236,217,163, 0,228, 58, 61, 22, 75,145, 90,125,164,120,173,158,138,
+ 90,145,237,133, 54,114, 4,180, 94, 31,184,248, 82, 42,182,250,227, 67,132,164,133,124,160, 26,252, 53,149,201,148, 82,207, 78,
+ 68, 43, 27,173,160, 58,178,140, 4,254,224,153, 32,143, 0, 20,200,176, 97,195,148,149, 34, 37,108, 52, 58,230,194, 99,209,236,
+129, 50,107, 76, 37, 89, 63,187,170,236, 88,217, 78,242,102,141,249, 76,235,251,251,204,247,107,130,254, 58, 76,176,231, 96,112,
+238,129,115,238, 18, 4,246, 48,181,228,127, 94,231,125, 36,230,211, 60, 42, 21,141,113,195,235,242,106,223, 71,231, 23,251, 54,
+170,150,210,247,206,241,169,138,116,171,103,171, 92,190,167, 55,119,247,157, 61,188,146,111,157,114,113, 95,107,168, 16,213,247,
+ 68, 0, 95,155,208, 30, 11, 18,231,182,144,138, 42, 32, 11,124,108, 11,117,162,162, 46, 84, 65, 22,237,180, 66, 35,209, 34,200,
+ 74,153, 54,206, 27, 75,144,213,109,112, 30,233,214,247, 71, 73,147, 62,185, 15,239,171,146, 48,205,202,127,197, 25, 40,133,103,
+ 31,228,193, 95,142,155,148,188, 98,252,163, 74, 52, 75,104,139,110, 75,117,104, 71,157,168,119, 39,226, 29,148, 69, 81, 69, 34,
+241, 92, 61, 92, 51,164,142,123,107,215,234,129,159,124, 30,108,151, 0,175, 99, 47, 94,239, 95, 47,155,134,118,253,148, 46, 97,
+ 28, 26,114,187, 58,170, 67,204,104,209, 54,191,120,122, 85, 62,248,237, 3, 7, 2,160, 46,172, 39,117,235, 86,146,114,101,139,
+138,217,143, 38, 33,183,228,217,243,219,210,173, 87, 47,137,159, 52,181,244,255,117,144,208, 64, 62,180,124,249,138,159,155, 74,
+ 96, 4,213,187, 80,154,149, 39,113, 98, 25, 31, 57,178, 60,138, 26, 85,238, 70,137, 34,211, 77,166,231, 58,203,174,208,161,246,
+132,210, 44,244,175, 59, 61, 26,155,198, 62,216,106, 90, 68,112,181,114, 20, 44,139,113,240,151,255, 41,221,162, 26, 81,165, 77,
+ 12, 66,105,150,229,175,206,247,126,253,217,172, 43,102,173, 39,181, 85,131,152, 73, 51,255,188,166,233,247, 1, 31, 48, 65,188,
+171, 16, 95, 46, 21,138,230, 87, 59,142, 99,144, 69, 58,152,148, 31, 17,192,252,209,177,163, 60,196,100,227, 5,198, 62,195, 36,
+248,108,203,102,121,190,109,179,188,216,177, 73, 73, 60,223, 57,217,174,141, 86,176, 34, 17, 20, 81,162,196, 78, 98, 15,100, 81,
+ 93, 70, 9,149,122,232, 1, 90,180,101,162,148,236,187,239,190, 83,108,179, 40,201, 34,208,226, 68,174,130, 44, 78,162,156, 56,
+185, 2,128, 61,207, 19, 39, 90,123, 47, 1, 32, 37, 29,120,230, 21,210, 94,254,210, 38, 45,240, 92,155,148, 5,208,234,221,187,
+183, 82,198,253,251,247,203,172, 89,179,148,213, 72,145,146, 21,100,226,230,167,210, 10, 64, 43, 73, 42, 55, 5,132, 80, 58, 71,
+149,165, 22,208,162,170,176, 76,153, 50,135,177,161,192, 19,210, 32, 79,128, 2,207,155, 55,111,120,158, 59,119,214, 19,116, 60,
+ 97,151,230, 9,192,172, 72,181,192,203, 6,218,133, 13,153, 35,172, 18, 45, 21,104, 81, 53,167,130, 44,213,158, 14,147,175,236,
+219,127, 64,214,174,219, 32, 27, 54,186, 43, 32,153,147,136,134, 68,235, 61,129,214,200,149, 80,231,166, 40,195, 29,133,159, 32,
+209,210, 76,200,231,231, 8,104,113,224,161, 81, 41, 84,164,180,111, 83, 64,223,243,231,207, 21,245, 54, 87,124, 4,192, 4,138,
+253,250,245,147, 95,126,249, 69,217, 94, 13, 99,115,135,170,237,208,240,219,137,103,218, 84,168, 80,225, 62,164,111,102,150, 19,
+131,230,135,142, 29, 59,178,111,159,229, 47,255,243, 58,239, 51, 31,174,247,208,162, 93,167,130,203,203,103, 55, 61,124,159, 92,
+ 89,239,219,177,105, 78,223, 7,103,231, 43,210,173,110, 63,229,242,189,117,104,148,239, 79,181, 83,251,186, 36, 54,177, 31,169,
+ 42, 37,135, 36, 9,180,168, 50,164, 77, 22,213,133,170, 93, 22,129, 22, 19, 37, 89, 4, 89,248,238,157, 6, 90, 42,200, 90, 96,
+ 33,201,234, 58, 40, 55, 64, 86, 29,201,232,150,194,219, 18,100,125,235, 18, 45,238,218,229, 56, 71,169, 43, 23,169, 28, 31, 40,
+201, 2,243,131,129, 44, 76,152,109,160, 6,127,136,197,215, 47, 90,109,237,224,126,120,171,255,162,164, 73, 17,227,198,203,219,
+ 27, 3,228, 22,236,128, 14,166, 19,153,147, 96,175,180,201, 34, 50,171,167, 60, 94, 62, 49, 32, 77,188, 24, 55, 80, 30,187,146,
+ 45,236, 44,244,162,225,251, 7,191,253,114,226,248,174, 32,144,149, 59,119, 86,121,243,230,150, 60,125,118, 91,238, 62,188, 43,
+155,182,239,150, 40,113,146, 73,179,214,157,133,187, 17,195,192,131,175,241,209, 68,185,114,229, 82,236, 80,105, 79, 5,247, 53,
+126,211, 35, 68,120, 50, 51, 66, 4, 47, 38, 72,179,158,232,148,104, 5,163,131,138,114,195, 76, 84, 2, 41, 2, 42, 91,154, 7,
+107,160, 69,230, 56, 43,240,249, 26, 25,106,183, 76,206, 84, 46,110,178,172, 63, 12,253, 99,202,235,251,231,207,202,221,138, 46,
+114,170, 80,180, 15,149, 99,106,131, 44, 75,160,133,115,105, 80,174,156,146,168, 66, 84,192, 22,210,250, 81,163,148,107,252,221,
+ 57, 73, 31,208,226, 96, 65,195,114,130, 22, 78,166, 84, 17, 81,146, 69, 67,105, 74,111,172, 65,150, 94,137, 22,237,186,176,211,
+ 74,217,189,167,170, 11, 39, 76,152,160, 72,133, 40, 45,163, 68,130, 0,135,187, 27, 33,225,145, 70,141, 26,189,115,162,209,247,
+178,124, 84, 39,145, 54, 85, 74, 4,138, 28,236, 66, 11,180, 40,197,129, 90, 79, 81,147,209,165,197,236,217,115,164,126,231,241,
+210,114,214,115, 72,180,220,148, 9,158, 19, 61,165, 64, 90, 64, 11, 3,234, 68,170, 7, 1,222, 0,170,174, 41, 64, 11,252,240,
+132,164,192, 19, 3,179, 39, 85,126, 0,160,135, 0,200, 26,163,188,206,248, 47, 82, 88,132,221, 76,177, 99,198,140,233,199,126,
+192,196,115, 87, 87,215,184, 78,240,207, 68,160, 69,245, 43,213,197, 4,145,150, 32,139,224,133, 32,152,109,115,252,248,113,197,
+182,142,155, 22, 32,209,122,100,239, 29, 0, 76, 94,203,246, 61, 86,128, 86,218,162,205, 21, 35,123, 30, 93,160,222,166,253,159,
+122, 96,167,155, 64,205, 18,244,159, 96,204, 17,208,226,202, 14,160, 85,138, 23, 47,206, 93, 92,202, 6,136,213,176,123,169,211,
+164,189,228, 43, 90, 14,246, 95,173, 20,176, 69,113, 59,212, 52,138,173,217, 63, 9,180, 96,236,191, 15, 59, 96, 63, 1,172, 63,
+207,157, 59,247,157,159,127,254,217,139,223, 16, 15,254,242, 63,175,243, 62,250,193, 39, 72,184,182,217,225, 41, 37, 96,244,141,
+181,239,187,194,241,125,174,157, 94,235,123,229,196, 50,223,202, 37, 98,249, 94, 56, 56,195,247,220,190,201,190,181,203, 39,242,
+ 61,187,115,184,111,181,210,241,124, 43, 85,170,244, 44,106,212,168,231,145,191,154, 86, 63, 32,208, 34,200,154, 49, 99, 70, 91,
+124,159, 10,184,178, 78, 4, 89,148,122, 57, 35,209,178, 13,178,114, 41, 32,203, 53,115,202, 16, 32,235, 91, 7, 90, 0, 85,237,
+144, 30, 97,162,125, 73,201, 60, 55,149,160, 15,134,144,118, 55,104,208,224,110,224,134,159,235, 90,109,243,165,128, 86,196,136,
+166, 14,203, 55,116,123,253,233,209,148,251,178, 39,174, 40,137, 64,171, 81,114, 97,122, 54,125,250,141, 49, 45, 6,121, 71, 52,
+ 69,180,231,138,196, 68,160,117,225,252, 49, 69,146,117,227,218, 22,168, 10,207,202,155, 87,216, 4,240,236,138, 36, 72,236, 34,
+ 49,226, 38,145,152,241,147, 75,241,114,213,229,128,231, 53, 57,122,234,218,191, 17,104,177,201, 38, 91,249,209,186,141,107,122,
+252,104, 89, 55,183, 53,157, 91,206, 72,180, 2,129,214, 94,203,223, 48,244,183,111,243,209,252,153, 51, 14, 45, 87,172,224,195,
+ 10,149,107,153,253,205, 31, 3, 46,222,245,145,193,237,186,191, 41, 21, 35,114, 64,166, 40, 49, 38,235,169,149, 42,209, 82, 39,
+ 88,173, 95, 59,187, 14,131,189,138, 64,139, 19,174, 53,200, 34,248,226,196, 64,119, 6,214,135,150, 68, 11,187,193,252, 49,153,
+ 72,143, 30, 61,148, 73, 90,221, 93, 72, 48,131,137, 70,217,193, 70,224, 66,155, 45,190,135, 9, 19,176, 83, 64,139, 82, 1,130,
+ 43, 84,230, 85, 32,184,122, 69, 0, 23, 90,160, 69,169,200,208,161, 67,149, 58,243, 32,128,139, 17, 51,182,164,113,205, 33,229,
+ 43,215, 80,116,230, 44, 47,223,171, 5,180,176, 91,110,247,198,141, 27, 21,245, 32, 19, 1, 23,193, 22,120,233,137, 45,254, 39,
+240,252, 16,240,221,105,117, 33, 27, 14, 32,174, 84,142, 28, 57, 40,126, 15,182,194, 45, 86,172,216,110,180,139,238,221, 54, 4,
+ 90,148,206, 81, 90, 69,201, 99,199,169,231,132,118, 89, 53,187,206, 83,164,142,220,196, 64,201, 22, 65, 12,193, 22, 85,116,142,
+128, 22,108,180,110, 80,146,149,166, 72, 83, 49, 37,202, 35,240,243,166, 72, 51,185,107,144,137,231,214,255,169, 86,198,189,143,
+122,129, 86,214,172, 89, 21, 41, 86,237,166,157,165,211,111, 83,165, 64,193,210,146,219, 37,137, 12,237,219,155, 54, 97, 18, 43,
+ 86, 44,197, 0,255,159, 4, 90,104,151,166,216, 25,198,193,110, 16, 82, 98,164,158,216, 76,240,128,141,197, 95,254, 15,188,254,
+ 27, 64, 22,243, 53,178,245,237, 3,128,174,234,213,171,215,115,168,157, 95,156, 61,121,248,249,148,145,237, 94, 77, 24,218,242,
+245,174, 45,203,188,213,243,165,115,134,191, 28,209,175,222,235, 77,107,102,122,227, 91,127, 6, 53,240,115, 0,189,179, 90, 99,
+ 9,236, 64, 20,160, 5,233,173, 77,160, 5, 96,208,150,137, 82, 47,189, 64, 11,206,130, 50,167, 76, 23,231,205,130,205,181,131,
+108,178,186, 14,114, 12,178,190,117,160,165,242,153,246,142, 4, 82, 75,151, 46, 21,168,133,173,129, 86, 12,244,219,167,148,124,
+225,155,240,198,247,123, 5, 60,109,239,168,141,190,132,234, 48,113, 50,211,214, 59, 47, 23,203, 5,113,147,155, 79,163,156, 12,
+216, 31,247, 6,129,214,203,218,121,111,108,202, 55,250,228,230,114,115,101,207,240, 77,146, 32,114,220,173,246,202, 74,213,225,
+193,125, 30,210,164, 73, 13,153, 55,119,148,248,189,187, 1,183, 6, 55,197,235,201,109,137, 28, 61,158, 68,142,149, 88,162,198,
+ 77, 46,211,230,174,145,253, 39,111,201,230, 45, 7,254,173,170,195, 88,248,166,110,216,240,163, 69,137,160,234,124, 92,235,179,
+228,253, 16,116,150,205,238, 46, 83,251,197,124,121,103,147,233,168,150,141,150,158, 23,124,229,121,172,109, 25,157,179,109,116,
+203,152,170, 74,219,134,181, 94,223, 61,239, 41, 91,254,250, 67,186,253, 62, 49,224,175,141,151, 94,167,200, 90,250,105,156, 36,
+110, 37,244, 86,158,170, 27,170, 14,171,148,171, 35,253,126, 25, 19, 34,109,217,176, 71,152,120,239,167,134, 93,116,237, 58,164,
+199,119, 2, 45, 74,178, 8,128, 40, 41,114, 4,178,244, 72,180, 8,222, 56,137,219, 50,124,167,116,131, 54, 55,148,102,209,176,
+153,246, 97,180,111,176,225, 50,194, 17, 91,246,114, 87, 27,221, 68, 88, 0,171, 80,219,104, 97, 66, 83,202, 68, 96, 72,251, 31,
+234,200, 33, 97, 19, 72,137,148, 93,152,115,230,204,145,153, 51,103, 10,118,211, 41, 91,182,181,128, 22,238,239, 36,192, 82,237,
+178,120, 14,128,230, 9,137, 24, 85,133, 53,244,182,183,101, 62,128,183, 4,160, 59,162, 93,187,118,158,152, 80, 61,173,129, 22,
+165,100,127,252,241,135, 39,118,148,141,135,170, 34,169,214, 59, 84,160,133,237,232,194,100,105,252, 78,176,162, 94,231,111,253,
+250,245, 21,123, 56, 26,254,218,163, 75,176,132, 73,222,107, 18, 36,169, 0,100,108, 79,242,137, 27, 7, 4,101, 23,128,111, 24,
+ 65,167,151, 12, 25, 50, 40,124,205,148, 41,147, 64, 10,195,237,235,244,197, 97,233, 71, 43,232, 21, 44,163,181, 68,139, 54, 48,
+ 5, 74, 85,149,130, 69, 42,200,119,110,110, 82,223, 45,157,116,251,161,162, 34,113,131, 68,231,107, 0, 90,182, 88,212, 25, 23,
+247, 33,233, 86, 29,149, 40, 81,226, 38,164,167,248,140, 94,191,134,106,255, 53,250,207, 11,130, 41, 91, 9,160,248, 25,250,238,
+ 51,244,141,231, 0,155,151,181,218,158, 64, 11,223, 78, 91, 24,238,182,197,142,224, 96,210, 44, 75,144,229, 12,208, 74,159, 46,
+245,246, 39,207,111,190,244, 56,210,203,151,134,239,191, 12,204,233, 80,146,245,111,176,209, 82,249, 12,163,247,118, 52,122,135,
+ 19,224,135,113,226,196,105,110,193,255,232,232,247, 39, 48,182, 6,112,156,227, 56, 75,205, 1,248,127, 87,163,141,244,170, 9,
+131,140,225, 1,238,199, 59,160, 25,130, 94,130, 36,166,219, 47, 63,109,150, 83, 18, 67, 60,197, 36,158, 1, 17,158,143, 88,222,
+118,229,130,124, 51,158,175,201, 61, 85,214, 21,248, 83,206, 78, 60, 36,241, 34,197,161,116,198,230, 65, 99,248,201,227,134,127,
+252,181,127, 47,169, 89,171,138,188,124,117, 75, 30,123,221,145, 91,247,239, 74, 20, 5,100,165,144,130,165,170,201,158, 19, 55,
+101, 31,128,214,160,129,163, 62,252,219,140,225, 83,148,232,220, 48,101,201,206, 79, 29,248,209,210, 37, 68,113, 41,218,185, 97,
+242,226,157,159, 90,251,209,122,253,252,154, 28,220,220, 71, 22, 12, 54,157,210,218,117,168,245,221,127, 3,247,173,119, 29,234,
+ 7, 90,156, 32, 11,102,207,252,248,236, 78,119,217,183,112,178,204,233, 84, 71, 10,230,204,254, 60,121,214,146, 87,157, 1, 89,
+100, 18, 38,174,135, 92, 25, 53,109,210, 83,102,205,220, 23, 34,237,217,125, 89,152,120,239,183, 95,103, 58, 5,180, 44, 65, 22,
+ 85,103,182, 36, 89,122,109,180, 8,180,104,247,165, 74,178, 44, 13,223, 9,142, 96,171,162,216,101,113,240,209,187,147,209,170,
+147,236,165,106,146,110, 41, 44,128,150,115,253,200,194, 70,139, 64,107,193,130, 5,138,141,197,247,112, 6, 75,128, 64,233, 9,
+125,138, 17, 56,140, 31, 63, 94,160, 10, 20, 0, 25, 5,140, 2, 44, 57, 52,134,199,253,233,216,101,233, 9,137,208, 9,218,105,
+ 65, 98,164, 72,179, 50,103,206,188, 23,133,180, 9, 42, 28, 21, 30,125,168, 30,192,201, 49,236,106,241,132, 65,184,231,252,249,
+243, 61,177,114, 54, 19,108, 49, 97,160, 55, 83, 53, 73,191, 90, 80, 5,122,230,203,151,239, 56,234, 96, 57,224,135, 32, 79,219,
+ 60, 2,106, 53,130, 64,179,177,103,229,204,141,151,202, 46, 67,130,110, 53,202,128,250,203, 9,130, 97,158,180,128, 22,119,221,
+148, 46, 93, 90,202, 65,133, 93,177, 98, 69,133,159,116, 15, 65, 71,165, 92,241,113, 7,106,211,166, 77,131,212,202, 0, 6, 94,
+122,128, 22, 36,118, 66, 41, 41, 92,100, 72,243, 22, 63, 73,158,148, 41,164,158, 91, 90, 25,245, 93, 17, 89, 50,122,132,162,170,
+ 4,208,251,167,128, 22,213,191, 84,177,208,192,189, 93, 96, 27, 91,254,215,101, 59,101,201,219, 34, 69,138,220, 0,198,122, 3,
+181,248,115,236, 0,126, 97, 11,112,169, 0, 11, 46, 58,158, 97, 1,243, 2, 46, 84, 94,128, 7,150, 78, 64,109, 54, 23,129, 22,
+ 85,131,214,134,239,214, 32, 75, 47,208,130,203,142,188,232,151,215, 95,123,223,145,251, 55,118,203,180, 57,117,222, 57, 82, 23,
+ 90,186,132,112,238,163,253, 54,114, 99,252,251, 9,139,141, 27, 0, 95,138,122,152, 82,114,168,105,205,220, 53,142, 5,200,101,
+124, 71, 90, 19,200,103, 7, 90,241, 19,155,220,175,189,152, 40,231,197,245,211,194,119, 25,247, 39,188, 50,235,185,105,205,190,
+189, 17,154,191,124, 94,167,242,193,253,155,202,207,251,180,173,247,106,137, 27, 41, 22,253,190,217, 59,162, 65,170,117,231,222,
+205, 11, 48,122,191, 41,245, 26, 52,144,152,241,146, 74,172, 4, 41,229,200,153, 27,178,247,248, 85, 89,181,245,152,184,100, 42,
+ 42, 5, 74, 87,151,232, 81,163,114, 51,205,191,204,189, 67,199, 23, 63,141,245,252,191, 31,173,169, 23, 36, 67,222, 74, 65,126,
+180,104,191,133, 58,219,243,163, 21,196,215,100,197, 58,190,168,252,235,161, 32, 63, 90,213, 6,159,148,228,217, 43, 56,229, 71,
+235,219,248, 58, 28,150,210,121,207,240, 48,238,142,158, 35, 83,186, 46,121,179,184, 62,152, 63,162,239,167,237,127,142, 80, 64,
+ 22, 83,158,204,233,237, 74, 6,172,138, 17, 76, 21, 68, 63, 70, 4, 65,246,128,214,150,205,231,132, 73, 3,104, 5,163,201,157,
+ 51,148, 62, 81, 37,198,137, 87, 11,100,217,145,104, 5,163, 73, 41, 25,129, 22,165, 12,150, 32,139,210, 32, 26,177,243, 61, 42,
+200, 82, 1,157, 13,117,164, 61, 53,152,226,176,148, 64,139, 59, 37,121,142,228,216,103,214,255,153,250,127,154, 22, 64,139, 0,
+138,210, 42, 38,158, 91,167,209,163, 71, 11,147,106,195,101, 5,180, 66,148,147,246, 82, 24, 80,187,230,205,155,247, 8,129, 17,
+ 65, 16,129, 22,174,109,214,249, 49, 88,183,251,110, 24,220,122, 66,125,231, 9, 9,143, 39,128,204, 9,122,150, 71,138,137,119,
+ 69,195,111, 23,122,155,135, 11, 10,197, 6, 12, 3,187, 45,111,241,193,104,170, 64, 75, 85, 15, 54,234,183, 84,138,253,216, 79,
+202,212,239,171,236, 68,164,180,145,160,152,234, 89, 74, 38,237, 0,173, 32,154,170, 68, 11,110, 44, 4,238, 44, 20,144, 85,165,
+ 74, 21,197,102,138, 32,149,246,121,180,113, 35,152,165,143,161,214,173, 91, 11, 1,174, 13,160, 21, 68, 19, 18,173,199,163, 96,
+111, 72,149, 35,129, 86,193,130, 5, 5, 0, 68, 49,222, 31,208,163,187,116,170, 92, 78, 22, 0,100, 81,186, 9,199,168,130,208,
+ 70,202,134, 11,168, 14,173, 1,161,110,149,170,206,246, 97, 54, 75,154,173, 96, 63,118, 12,223, 6,237,117,142,225,222, 10,254,
+ 90,252,215, 43,201, 10,162, 9,105,193,200,225,195,135,191,132,205,224, 27,168,196, 95,194,254,240, 57,210, 11,124, 67,175, 32,
+117,125, 6,251,199,103,144, 52, 62, 67,127,120,129,157, 78,222, 80, 39, 63,135,250,118, 19,222,141, 80,169,193,142, 16,117, 39,
+208,162,177, 59,190,197, 32,195,119,122,132,135, 20, 87, 81, 23, 90, 38, 59,170,195, 32,154, 4, 77,217,179,101,217,250,228,193,
+ 41,255, 27,231,215,202,254,173,163,101,242,184,246,175,236,217,100, 89,251,221,178, 40,233,231,110, 35, 39,154,214, 97, 86,205,
+114, 2,104,221,231,152,202, 49,138, 82, 44, 44,212,252,113,141,174, 55,128, 73,109, 30,193,104,134,147,234,208,146,230, 29,188,
+213,122,215, 97,187,209,115, 26, 61,153,254,114,239, 19,211,133,149,162, 36, 0, 45, 83,139, 87,194,212,236, 79,159,251, 45,170,
+118, 39, 48,226,194, 65, 61,108,213,189, 80,129, 60,185,222, 92,191, 12, 91, 89, 44,198, 82,164,203, 42, 81,227,165,146, 67,167,
+111,203,110, 72,178,220,242, 85,148, 60,197,170, 74, 38,215,204,111, 65,228, 95,231,176, 84,149,104,165, 46,213,217, 43,129, 91,
+249, 87,137,147,165,253,208,173, 91, 55,101,188, 92,189,122, 53,121,238,200,143, 86, 16, 63, 85,137, 86,138,226,157,189,226,103,
+ 34,157,244, 31,168, 97,161,201, 6,125,177,105,208, 9,175,190,253,237,209,201,229,154,238, 90,199, 90,229,223,173, 24,214, 77,
+214, 12,237,162, 0,172, 49, 45,190,151,242,249,179,121,231,115,203, 56, 92,103,141, 66, 0, 45, 2,152,150, 63,245, 87, 36, 86,
+214,105,204,232, 69,194,164, 94,215,227, 25,158, 64,139,246, 5, 42,200,162, 4, 67,235,208, 2, 69, 4, 90, 28,104, 72, 87, 13,
+179, 67, 23, 14,106, 12, 69, 74,229, 40, 73,209,216,201,104,111, 64,219, 75,131,104,218, 13,113,167, 32, 13,182,193,203,189, 78,
+243,211, 2,104,177, 28, 44, 15,165,107, 44, 35,203,204,242,211,240,157,170, 84, 2, 68,110, 16,160,161, 60,237,192,180,128,150,
+ 90, 22,128,153, 20,152,168,134,193,248,251, 4, 0, 11,129, 22,183,250,235, 57,130,213, 29,239,219, 78,144,133, 85,177, 39,212,
+111,199, 64, 51,183, 53, 17,228,201,194,123, 4, 89,129,190,181,118, 56,154,112, 9,180, 88, 39,214,141,253,132,245,226,230, 2,
+110, 40,160,207, 48,130,100,170, 11, 41,149,100, 10, 84, 29,218, 5, 48, 4, 90, 80, 95,120,161,140,130,221,116, 10,200,162, 10,
+146, 97,119, 84,245, 35, 55, 66,112,131, 4,109,179,160,230, 82,182, 48, 59, 2, 90, 80,195, 28,133,244, 78,177, 21,163,221, 24,
+ 13,247,105, 7,195,231, 56,248,176, 76, 52,226, 87,164, 92, 0, 88,148, 60,210, 57, 46, 0,215, 81, 71,117,215,211, 0, 58,242,
+ 88,182,209, 26,130, 42, 0,149,211,252,133,125,222, 53,254,194,238, 80,249, 15, 90,192, 23,186, 14,235, 62, 95, 10,252,217,130,
+ 29,149,222,168,235,107, 72,182, 94,162,109,158, 67,130,245, 28,210, 86,111,216, 20,190,196, 38,129, 23,176,245, 34,128, 47,101,
+231, 13, 54,129, 22, 37, 90,234,238, 66,130, 44, 26,190, 91,131, 44, 7, 18,173, 32,154, 41, 92,162,183,204,146, 35,225,219,223,
+251,215,253,176,116,118,119,255,202,101,179, 95,143, 25, 61,242, 86,218,108,233, 9,207,163, 49,137,235, 98,154,131, 76,154,160,
+ 40, 20, 47,208,164, 9,105,214, 88,168,204, 95, 96,145,240,158,139, 21,168, 20,185,211,206, 30,200, 98, 17, 52,105, 34,143, 94,
+ 41,151, 90, 37, 45,154,145, 35, 38,136,115,185,167,231,142, 15,173, 31,158,144,180, 87, 55, 73,156, 13, 7,247,167,234,246, 70,
+106, 76,242,149,154, 67, 78,251, 71,140,158,144,106,104, 58, 73,213,162, 89, 24,210,170,251,147,198, 78, 48, 79,255,115,158,148,
+253,190,174, 28, 60,113, 85, 70,252, 49, 67,242, 23, 41, 23, 16, 61,106, 52,126, 3,255,202, 16, 60,129,140,137,129, 69,225, 21,
+ 2, 35, 74,244,105,207, 59,100,200, 16,201,244,183, 31,173,103,216,117, 72,199,197,182, 14,235, 54, 34,157,203, 92,128,210, 68,
+130, 82,122,238,202,215, 65, 39, 20,221,248,171,124, 68,245,163,101,233, 79,203,113, 65,115,185,165,247,204,151,205,245, 73,126,
+166, 44, 25,189,242,102,206,112, 39,127,214, 12,251, 51,103, 76,165, 87,250, 18,226, 3,100,220, 66, 2, 34, 78,140,122,147, 86,
+172, 67,250,175, 34, 8,162, 36, 75, 15,200,210, 35,209, 98,128,104, 2, 56, 53,241, 29,106,162, 45,150,154, 8,216,212,132, 21,
+ 95, 88,130, 74,235,229,233,255, 59,118, 32,208,114, 22,100, 49,166, 34,202,239, 76,172, 67, 26,176,103, 69, 26,143, 68, 71,128,
+122, 14,107,128,205, 0,210,219,145,118, 1,100,213,181, 71, 0,247, 28, 5,154, 14, 70, 19, 6,188,135,208, 62,247,212,132,246,
+185,103,153, 88, 71,203, 68,112,137, 54, 58,100,245,238, 32,154, 42,208,162, 4,138,142,251, 8,126,184,227,148, 17, 1,104,143,
+199,193,131, 0,201, 50,113, 96,162,225,186,149,234,208,178,156,185, 9,182, 80,214,199, 52, 56,134, 42, 70, 73,184,246, 12,160,
+238, 45, 0,198,123, 36, 63,216,102,189, 5, 32,121, 70, 73, 86, 32,200,178, 6,162, 90,147,142,158, 54,177,206, 99, 73,147,225,
+117, 86, 35,205,183,146,100, 49,206, 25,183,105,235,117, 88,104,175,156,165,160, 42,222, 10, 62,122, 67,210,248, 10,146,213, 87,
+ 63,252,240,195, 11,236, 54,221, 2,218,246, 0,150,221,201, 17,109, 94,149, 82, 45, 38,180,177,195,132, 60,181,108, 48, 39,168,
+156,185, 10,199,127, 55,102,126, 78,113,205, 18,247, 77,188, 56,209,182, 82,141,168, 7, 96,217,176,209,250,220,109, 20,154, 54,
+214, 51, 57,218,163, 27, 3,124,246,230, 38, 27, 44,106,180,252,238,233,169,123,120, 3, 45,150, 59, 67,196,132,241,207,149, 29,
+247,251,219, 54,167,183,203,208,115,215,111, 53, 24,123, 77,242,213, 31,239, 19, 33, 70, 34,250,122,203, 96,239,123,183, 81,105,
+203,160,210, 79,255, 99, 65,165,199, 17, 96,113,225,207,241, 45, 23,108, 84, 71, 68,138, 36,247, 97, 51,250, 16, 9,131,192, 11,
+157, 64,107, 28, 23,150, 92,232,114,220,204,173,159,142,174,190,141, 14, 84, 8,169,106, 96, 42,140, 95,108, 53,149,178,129,255,
+203,227,151,215,212,251,252, 45, 98,117, 63,138,174, 23,133, 62,147,125,207,240,161,167,169,235, 73,235,201,241, 44, 6, 70,234,
+249,117, 39,124,228,214,222,162,131,209,196,253, 19,182,128,143, 37, 8,178, 62,119, 2, 20,233,170,164,206, 78, 24, 22, 90, 33,
+ 39, 29, 0, 45,151,100,201,142,112, 39, 29, 19, 13,189,173, 19, 38, 25,122,125, 14,150, 80,247, 71,137,147, 36,217,107, 81, 24,
+ 61,131,164,179,101,255,230,104, 18, 44, 97, 85,235, 9,160,227,165, 38,170, 64,212, 4, 80,224,165, 38, 74,177,130, 82,204,152,
+176,197,117, 24, 84,218, 89,222,133,101,114,116,230, 93,182,218,136,182, 88, 84,181,208, 86,139, 54, 90,206,218,102,105,181,123,
+ 41, 0,205,181, 0, 93, 12,185,164, 5,176,236, 2, 45,103, 42,169,245,109,166, 76, 27,195, 61, 79,145,248,239, 40,217,114, 6,
+ 96,253, 7,128,150, 9, 99,199, 56,164,195, 24, 99,181,108,178,180,218,221,100,199, 97,169,163,166,212,164, 25,248, 48,109, 70,
+219,152, 18,196,221, 96,138,155,240,154, 41, 90,226, 13,202,127,219,182,164,122,105, 58,211,197,190,117,154,244,127,165,108,205,
+231, 2, 51,135,201,228, 63,205,194,143,214,140,191, 61,195,235,145,104,133,133,142, 46,126, 19, 68, 33,163,162, 66,198, 34,184,
+ 31,254, 87,225,175,197,255,160,251,188,198,252, 86,247,131,188,208,235,122,161,243,153,156,183,209,114,254, 29, 54,159,248,214,
+ 59, 97, 88,216, 96,212, 61, 44,220, 11,249,172,193, 79,131,159,225,197, 1,163, 47,133, 23, 39,255,166, 99,240,211,224,103,248,
+114,192, 6, 53, 21,104, 57,250,181,188,103, 39,223,103, 47,231, 63,241, 2,227, 3, 12, 95,174, 27,252, 52,248, 25, 94, 28, 48,
+250, 82,120,113,210, 0, 27, 70, 95, 50,250, 82,248,114,192, 9,160,165, 74,185, 84,181,161, 42,205,178,148,128,169,215, 62,115,
+ 33,237,199, 58, 12, 92,141,240, 67,177, 78,206,148,201,214,243, 90,215,180,232,107, 61, 31,154, 50, 27, 52, 67,182,179, 35,158,
+ 24,109,100,159, 3, 70, 95, 50,250,146,222, 62, 96,124, 71,198,119,100,139, 3,122,251,143,101,190,127, 75, 95, 82,235, 97,143,
+ 7, 33,234,249, 13, 72,180,190, 14, 27, 45,173, 30,162,243,190,177,122,210,201, 40,157,217, 12,126,234,100,148,206,108, 6, 63,
+117, 50, 74,103, 54,131,159, 58, 25,165, 51,155,193, 79,157,140,210,153,205,224,167, 78, 70,133, 53,155, 13, 27, 45,197, 38,203,
+158,186,240, 31, 80, 29, 58,148,104,217,172, 63, 98,108, 71,186,127,127,101,194,167, 79, 55, 39, 99,226, 57,175, 57,201, 44,163,
+ 19, 58,201, 48,141,236,223, 42, 63, 25,174, 71,111,200, 30,123,121,191,213,186,135, 71, 15, 48,234, 30, 30, 92,252, 63, 13,131,
+159, 6, 63,195,139, 3, 70, 95, 10, 47, 78,106,208,177,218,117,200, 29,136,234, 46,195, 10,129,106, 67, 94, 83,119, 38, 90,158,
+ 7,221,255, 66, 69,213,247, 26, 2, 42,130,171,199,143, 23,149,121,252,120, 65,135,191,211,162, 50,188,230, 36,216, 10,234,132,
+ 73, 92, 92, 24,190, 37,200, 29,130,195, 93,129,200, 11,156, 26, 41, 88,250,119, 12,146,122, 1, 71, 88,192,134,222,119, 88,138,
+110,245,117,140,192, 92,140,115,152, 51,103,206,118, 8,179,178, 0,142, 46, 59,216,136,123,104, 57,248,140,140, 16,193,244,137,
+ 9,143,143,212,120,145,163,188, 90, 3, 90,102,236, 4,156, 4, 23, 9,123,152,120,142,119,101,254,151, 2, 87,173,246,162,207,
+163,198,112, 29,177, 29, 59,114, 95,227,188,155,141, 7,180,248,169, 62, 66, 63, 68,125,224,189,255, 52,194, 15,249, 96,199,224,
+105,252,239,139, 20, 69, 15,205, 65, 93, 82, 20,219,183,165,241, 22,254,218, 42,244,160, 30, 41, 18, 31,217, 86,111,210,136,142,
+ 41,237,121,159,118, 84, 78,238,138,100,249,152,120,174, 55,192,185,222,186,179,200,172,103, 29, 36, 58,110,228,175,173,122, 51,
+159, 30,154, 69,145,143,158,202, 55, 35,149,213,106, 68,157, 52,117,144, 9,150, 69, 79, 57,213, 7, 98, 99, 71,243, 52,164,251,
+112,179,195,152,129,169,237,188,204, 25,154,122,203,107,143, 38,219,154,125,233,231,192, 95, 75, 63, 89, 90,180, 29,150, 19,187,
+ 43,171,161,174, 91,177,211,114, 43,207,181,136, 5,222,255,146,117, 15, 42, 18,220,195, 76,132, 83,241,183,244,214, 79, 55, 68,
+150,238,135,108,236,170,215,219, 63,117, 86, 57, 40,219,231,168,187,179,101,248,154,242, 59,183,235,144,210, 43, 2,171, 51,167,
+122,254,181,121, 83,249,151, 76, 60,231, 53,222, 75,158,181,118,218, 52, 5,234,109, 78, 95,184,241,227,100,121,234,124, 76, 93,
+160,193, 99,151, 60,117, 54,243,186, 85,173,131, 26,130,192,202,255,205, 21,241,125,126, 72,204,190,119,130,124,170,216, 58, 81,
+ 28,138,134, 2,104, 37, 76,232, 26, 55,118,138,156, 3, 18,164,205,115, 48, 94,154, 28,111,226,166,202,241, 38,126,234,188, 7,
+ 99,167,200, 49,136,247, 28,180,136,102,135,201,154,216,148, 60, 75, 98, 83,247, 44, 73, 76, 30,252,229,127,141, 22,182,166,169,
+ 23,112,132, 5,108, 88, 62, 59, 86,103, 15,212,172,187, 37, 29, 12,184, 9, 17, 46,101, 57, 60,241,111,132,131, 84,119, 56, 34,
+221, 88,171, 86,173, 21,184,158,210, 34,159, 74, 51, 25, 1,150,218,198, 56, 15,192,160, 48, 25,237, 59,210, 58,241, 58,239, 91,
+228, 37, 48,179,148,130,217, 45, 39,182,142, 55, 42, 92,164,184,231,222, 3, 71,175, 94,185,118,251,225,133,203, 55,111,111,220,
+186,243,120,174,220,121,142,241, 94, 40,219, 61, 2, 2, 35, 55, 4, 96, 91,138,116, 54, 48, 45,229, 53,208,115, 52,161, 7, 43,
+ 39, 6,192,125,140, 45,233, 76,194, 51, 7,236,125, 71, 58,218,180, 30,226,211,189,165, 3, 84,122,176,103,156, 75,240,154,193,
+160,173, 15,107,126, 42,128, 10,245, 60,141,182,240,129, 43,139, 83,248,223, 31, 3,250,158,191,254,250,235, 38,188,235, 63,131,
+195,213,183,112,188,250, 24,190,118, 46, 5, 6,148,182,158,228, 66,180, 81,215, 42,201,183, 28,219, 57,226, 45,127,109,149,253,
+183, 14, 25,123, 28,222,217,243, 22,127,157,156,196, 35, 34, 92,207, 20,132,119,122,139,137,229, 25,210,211,192, 73,135, 19,207,
+ 19,240, 80, 73, 0,136,182, 98, 39,234,233,243, 89, 81,158,177,120,254,197,136, 17, 35,148, 40, 3,244, 49, 4,160, 73,159, 66,
+252,182,120,223,242,208, 67,115, 29, 66, 96, 5, 48,138, 5,248,171,199,249,175, 37,205, 44,120,217, 34, 36,198,157, 84, 53, 11,
+ 4,107,164,195, 20, 4,220,224,149,127, 58, 22, 64, 15,113,237, 55, 29,237,110,183, 75, 1,164, 47, 89,187,118,237, 71,250,234,
+163,115, 96,252,223,239,100, 27,217,163,221, 18, 46, 84,206, 51, 74, 2,248,201,246,105,109,227,155,178,230, 39, 65, 94, 75,180,
+199, 82, 68,106,112,135, 3, 92,119,248,177,115,135, 51,213,165,188,142,100, 15, 4,234,110, 35,130, 44, 56,126, 86,162, 83, 0,
+104,217, 13, 70, 29,138,118,183,203,227,208,240, 19,237, 59, 9,206,133,223,112,172,132, 19, 96,161, 3,109, 70, 40, 81, 29,104,
+219,112,200,205,215,232,233,159,225, 90, 78,103,137,253,139,242,107,185, 67,249,187,170,127, 75,179, 22,116, 32,192,122,251,246,
+ 50, 60,141, 95, 22,158,243, 26,239,165, 47,210,216,179,231,136,249, 1,199,206,223,145, 71, 47,222, 11,127,219,246,255, 43, 32,
+121,190,122, 12, 22,108,179, 99,179,241, 9,178,228,209, 32,185,180, 46,161, 60,123,245, 94, 6, 46,185, 38, 21,122,122, 72,177,
+214,139,164,241,239,107, 64,235,173, 50,207,134, 6,104,197,118,201, 92, 54,110,202,220, 79,219,245, 26,107,222,114,120,171, 92,
+186,125, 70, 46,222,186, 34,107,182,157,144, 86,221, 71,155,227,165,202,253,148,121,156,233,216,249, 83,152, 98,102, 78,108,106,
+156,221, 37,194,182,118, 85,115,126,218,247,103, 71,121,177,127,146,236,155,214, 86,186,213,206,245,137,215,121,159,249, 52, 6,
+180, 16,128, 3,222,199, 15, 33,188,203, 30,203,196,107,161, 5, 27,120,191,242, 14,179,217, 79,225, 33,233, 32,182,222, 86,240,
+178, 23, 38,121, 71,177,170,108,126,128, 24,205,163, 65, 36, 82,188,105,236,216,117, 27, 69,137,210,158,169,113,236,216,245,139,
+166, 73, 51,226,193,253,251,155,225,117,222, 29,158,230,221,225,128,210,125,203,150, 45, 27, 17, 66,165,139, 5, 15,108, 2,173,
+136, 17, 35, 4,192,235,248,118,120,126,119,183, 78,188,206,251,161, 0, 90, 89,138, 22, 43,113,226,245, 27,159,247,247,110,223,
+245,254,189, 75,255,237,125,251, 12,223, 56,107,225,218,173, 7,143,157, 61,146, 45, 91,206, 35, 40, 23, 39, 41, 91,135,189,193,
+ 39, 45, 38, 66, 79, 0, 21, 51,189,202,211,195,190, 26,146, 2, 32,243, 61,239,129,152,245,162, 66,165,111, 13,180,188, 46,239,
+218, 38,247,207,156,148, 59, 39,142, 42, 30,252, 57, 48, 50, 93,216,234, 46,103, 54,172,145, 83,171,151, 43, 94,253,153, 24, 87,
+ 46, 99,198,140,156, 36,117, 79, 16, 22, 25, 83, 66,210,232, 79,143,204,171, 86,173, 82,130,140, 35,140, 18, 1,107, 39,141,254,
+ 25, 25,225,111,118, 13, 26, 52,232,218,174, 93,187,188,224,213,217, 7,161,151,238,195, 35,254, 3,128, 12, 31,180,175, 25,206,
+ 70,205,168,187,185, 77,155, 54,102,132,115, 50, 55,107,214,140,146,173, 62,246,202, 73, 9, 86, 55,128,171,250,223,151,148, 55,
+175, 30, 10,127,249,223, 82,178, 85, 5,161,158, 58, 87,207,253,244,252,137, 69,159,248,203,255, 26,229, 84,111, 99,174,137, 56,
+ 5,177, 13,189,217, 95, 24, 98,137, 7, 39, 27,203,232, 8,116,142, 76,159,125, 58,105, 90,102, 27,245,243,207, 63, 43,222,252,
+217,246,164,163, 38,134, 75, 98,104, 18,198,190,196, 3,163,108,244,121, 59, 93, 77,185,236,110, 1,180,172, 35, 31,104,245,207,
+ 21, 55,111,222,148, 49, 99,198, 88,134, 51,217, 67,208,198,132,135,247, 4, 18,104, 73,231,186,140, 8, 1, 32,227,143,107,214,
+139, 2,189, 19,110, 36,128,215, 87,156,188,201, 83, 70,155, 0,248,176, 23, 43, 84, 47, 77,150,101, 58,163, 42, 48, 68, 22, 35,
+100, 32, 52,151, 32, 66, 0,203, 63,215,170,172,150, 52,155,163,239,185, 31, 62,124,216, 29,223,143, 59,154, 58, 40,193, 89,181,
+ 59,192,160, 59, 34, 56, 80, 82,232, 48, 62, 42,238, 59, 44, 39, 37, 89,160,237,137,114,121, 2,168,238,129,147, 97, 15, 56,175,
+214,114,214,171,183,238,142,250,133,245, 61, 71, 52,199,160,223, 63, 87,199, 73,240, 69, 9,115,195,254,169, 30, 6,208,114,134,
+213,225,154,215, 57,137,150, 22,208, 74,154,179,166,188,120, 27, 32, 47,223, 73, 80,226,127, 94,183, 55,240,178,241, 41,201, 34,
+200,186,117,114,136,220,127,230, 35, 21,123,178, 95,255,125,100,174,210, 95,110, 61,126,173,156, 99,112,252, 16, 45, 70,140,113,
+166,168, 81,107,153,210,166, 77,174, 72,183,254,127,132,232,132, 4, 80, 25,242,148,246,221,142,112, 54, 94, 47, 94,203,189, 39,
+207,229,240,185, 51,114, 4, 0,240,248,197, 71,114,232,236,121, 89,180,113,177,184,230, 47,249, 46, 86,146,204,182,188,176,135,
+160, 9,201,213,252,182,149, 51,191,223, 59,181,181,188, 4,184,242, 61, 62, 43, 68,122,178,107,156,108, 28,217, 80,154,150, 73,
+247,158,249,237,213, 29,215, 9,130,130, 64, 4, 1,197,166, 77,155, 14, 1,108,236,177, 76,188,102, 5, 54, 2,248,172,206,193,
+ 92,121,135, 10,180,212,119, 44, 92,184,112, 79,169, 82,165, 60,192,211,146,118,186, 84,136,186, 55, 53,153,210, 55,141, 30,189,
+205,206,105,211, 90,121, 63,120,208, 22, 51, 88, 71, 32,184, 78,247, 46, 93,234,216,237,231,159,143,156,221,181,235,236,149, 51,
+103,118,115,224,131, 71, 97,119, 4,216,118,207,147, 39,207, 98, 59,229,164,148, 45,128,229, 1, 64,185,100, 33,201, 90, 78,176,
+133,255,203,213,107,188,207,124,204, 15, 90,214,106, 70,155,131, 15,212,132,211,119,237, 61,116,249,222,237,123, 47,110,156,191,
+232, 53,229,247,145, 59,166,142,153,182,121,236,228,249, 43,150,175,219,177,110,201,202,117, 27,153, 71,111,221,145, 47, 45,192,
+137, 23, 87,138, 28,188, 56, 25, 48,156, 15, 61, 30,211,123, 50,195,232, 44, 94, 48, 95,210,164, 74, 69, 48,100, 11,108,133, 0,
+ 90,247,207,156,146, 46,113, 76, 74, 82, 39, 70, 78,132,234, 53,254, 50,166, 28, 19, 39,181, 76,153, 50,133, 22,104,213,101,156,
+ 50, 2, 45,172,244, 95,161,124, 4, 66,169,116,212,189, 15, 66,226, 92, 93,180,104,145,185,101,203,150,230,186,117,235, 42, 9,
+222,157,205,152,196,222, 99,226, 54, 67, 50,102, 6,120, 51, 35,216,184,185, 70,141, 26,102,132,214,184, 9,143,246,148,122, 89,
+ 30, 65,117,167,186,144,146, 44,130, 44, 30,252,229,127, 94,167,154,144, 18,172,182, 63,228,125, 54,126,104, 55,241,247,123, 35,
+227,134,116,149,214, 63,228,123,198,235, 84, 39, 58,232,243, 84, 17,142, 67,249,158,168, 99, 7, 64,161,210, 46,140,107,201,182,
+ 98,244,131, 7, 15, 30,168, 82,152,208, 0, 45, 47, 2, 12,130, 97, 70,156, 80, 67,124,241,151, 33,174, 8,182,216, 63, 80, 14,
+ 47, 59,229, 44, 9,144,115, 23, 19,162, 88, 38,134,116, 42, 83,166,140,146, 24,172,156,161,157, 8,216, 24,230,169, 80,161, 66,
+111, 64,171,136, 61,126, 2, 88,206,219,183,111,159, 82,101,130, 64,228,235,137,116,148,101, 98,194,249, 97,164, 44, 0,218, 62,
+140,186,193,208, 94,232,247,182, 36, 80,186,129, 1, 66, 98, 29,103,127,100,228, 13,134,186,106,219,182,237, 43, 70, 56, 0, 0,
+219,141,119,209,240, 87, 61,244,208,100, 48,230,233, 44, 59,121, 55,115,230, 76,133, 7, 24, 59,148,242, 51, 96, 59,238, 83,178,
+101,139,230, 34,130, 43, 68,254,112, 71,187, 4, 3, 90,252,143,246,160,100,157, 64,139, 18, 63, 71,135,163,114,166, 67,168,177,
+221,140,233,138, 80, 94,158,168,175, 39,192,165, 39, 36,104, 90,146, 45, 61,117,215, 40, 86,136,219,118,105, 66, 93,248,127, 68,
+ 5,166, 48,196,205,189,123,247,148,113,195, 0, 90,206,178,249, 31,206,175,165, 58, 36,160,122,250,230,147,220,122, 98, 22,175,
+215, 31,229,200, 21,111,153,185,233,170, 45,160, 21, 84, 19, 2, 45,118,132, 91,143, 94,203,205,135,175,228, 6, 82,169,214,115,
+101,132,251, 91,105, 60,253,153,164, 43,249,179, 92,190,171, 44, 80, 5,158,106, 17,179,238,116, 0, 68,196,239,176,178,240,143,
+ 27, 47,158,181,119,248, 32,186, 84, 9,198, 79,147,235,217,182,163, 59,101,219,137,197,178,247,212, 78,121, 4, 16,119,253,190,
+183,236, 63,117, 79,254, 88, 56, 75,126,250,181,186, 12,155,214, 69,166, 46, 24, 33,201, 50,103,127,149, 32, 65,134,120, 90, 44,
+ 6,112, 82,202,242,225,249,117,241,187,178,197, 38,208,122,119,126,181, 60, 58,182, 66,142, 46, 25, 32,204,239,136, 38, 6, 74,
+ 56,220,253, 27,112,228,203,151,239, 46, 2, 13,239,177,149,120, 79, 5, 27,120,198, 81, 64, 79, 91,175, 27,197,119, 48,129,223,
+119, 48,168,237, 65, 44,189, 61,136,171,200,119,121, 88,169,247,108, 22, 23,203,183,180, 93, 50,101,250,217,231,201,147,118,126,
+ 0, 89, 15,215,172,169,127,115,202,148, 58, 7,135, 15,111,212,165,113,227, 37,231, 78,159, 62,245,234,197,139,179,238,243,231,
+159,155, 51,117,234, 46,138,241, 17,159,143, 18, 45,170, 52,108, 30, 84, 11, 82, 98, 69, 64,165,102,224,121, 32,208, 10,118,141,
+249,152, 95,171,125,212,251,152, 76, 14, 92,184,116,227,222,168,190,195,118,205, 26, 49,126,207,138,153, 11,119,173, 93,229,190,
+109,229,198, 93,235,150,111,220,181,228,232,201, 11, 27,152, 71, 39,189, 8,148, 86,113,224,130,228, 65,145,102,112,162,101, 12,
+ 69, 6,149, 30, 60,120,176,252,218,179,135,204,153, 60, 73,230, 77,157,194, 56,135,148,108, 57,180, 11,162,237, 4, 37, 89,150,
+ 64,139, 32,139,193,201,173,129, 22,227, 83,114,192,116,115,115,179, 6, 90, 58,139,111,202,207,137,123,239,222,189, 2,251, 57,
+ 74,178,104, 19,164,121, 64,189,122, 10,161, 86, 30, 67, 74,101, 70,208,108,179, 10,184, 42, 87,174,108, 6,112,243, 71, 0,109,
+243,202,149, 43,205,249,243,231, 55,131,190, 25,125,201,140,120,143,175, 81,127,130, 3,155, 7, 37, 87, 84, 23, 90, 74,180,248,
+159,215,105,147, 69,117,225,185,227,139, 63, 17,100,241,224,239, 89,252,231,117,222,183, 67,150,188,142, 12,117,225,223, 43,178,
+192,131,113,213, 8, 66, 40,117,100, 16,120, 21,100, 17,212,162,159,217, 2, 90, 90, 60, 81,198, 42, 85,154,201,208, 94,170,196,
+145,225, 69,166, 77,155, 38, 12, 77, 3, 34,150, 64,203,146,230, 12,130, 7,235,131,224,141,129,154, 25,115,148,160,154,253,128,
+253,140,253,141,113, 47,161, 10, 93,232,160, 96, 9,208,151,174, 19, 68, 18, 0, 50,230, 38,218, 71, 42, 85,170,164,196,230,100,
+ 80,242,114,229,202, 41,177, 51, 9,180,138, 22, 45,106, 6,173,108, 90, 21,117,112, 63, 7,192,172,247,230,205,155, 21, 32,196,
+ 50,114,225,193, 58, 96,209, 17, 0,233,143, 30,213, 39,219,107, 44, 22,121,190, 80,117, 41,227, 58,165, 89, 3, 7, 14, 36,239,
+168,242, 75,143, 52, 31, 65,198, 21,137, 25, 64,205, 5, 59,229, 81,128, 22,213,133,148,164, 19, 92, 49, 65,250,171, 72,185, 32,
+137,117, 71,255,212, 3,180,236, 85, 87, 1, 89,104, 99, 79,244, 31, 74,178, 61, 17,152,222, 19,241, 72, 61, 25, 58, 42, 12, 60,
+ 12,247, 71,169, 30,103, 31,160, 36,139,146, 64,124,171, 10,240, 87,165,228,236,167,118, 36, 90,154,101, 41, 83,198, 20, 57,187,
+107,194, 31,139, 23,116,221, 83,172, 64,198, 3,217, 92, 19, 52,113,117, 53, 69,211,124,208,200,160,114, 32,127,224,137,101,204,
+195,255,115,135, 43, 96,254, 83,127,181,140,225, 9,180, 30,120,127,148, 69,123,158, 72,143, 25,103,164,124,143,173, 82,243, 87,
+ 15, 93, 64,235,210,157, 23,114, 17,233,194,237,231, 82,176,254,152, 32,160,149, 34, 95, 61, 57,125,253,169, 50, 54,101,118,203,
+ 40,251,118, 44,146,123,183,206, 97, 53,229, 67, 61,254,125,123,109, 73,155,172,190, 19,250,125,244,188,186, 79, 6,206,105, 44,
+ 30, 71,214,200, 75, 31, 63, 57, 7, 90,251, 79,223,147,214, 3,234,202, 79,253,154, 72,189,206, 53,100,252,204,126,210,162, 75,
+189, 79,113,147,231, 28,170,213, 55, 84,160,245,254,244, 98,249,244,206, 91, 62,249, 60, 17,191, 91,123,229,221,201,249,242,238,
+234, 54,121,126,237,176, 92,217,187, 84,214, 14,169, 45,107, 7,215,214, 4, 90,124, 31, 86,130,195,176,114, 59, 4, 85,204, 30,
+172, 76,198, 91,151,129,215,120,143,121,152, 87,171,140,118,238,171,198,240,145, 0, 88, 10,103,201,146,101, 25, 6,141, 61,144,
+ 76,236,129, 10,241,119, 71, 52,169, 46,108, 22, 61,122,107, 44,137,219,189,244,244,108, 62,189,121,243,182,217, 93, 93,207,101,
+202,144,225, 69,177,162, 69,189,123,117,235,118,239,230,217,179, 39,111, 92,188,120,242,216,193,131,103, 38, 13, 24,112,246,143,
+ 81,163,182, 64, 2,180, 12,118, 65,118,109,214,236,129, 42, 91, 64,203,250,154, 22, 15, 16, 55,112,211,185,139,215,111,204,152,
+181,108, 39, 84,135, 15,119,110,217,181,239,208,145, 83,123,159,191,120,117,111,207,129, 83,171,142, 28, 63,187,156,121,180,232,
+240, 62,237,175,176,210,254,160, 6,228,102, 95,228,196,200,201, 21,131,185,244,235,222, 85,186,183,108, 33, 93,126,172, 37, 43,
+167, 77,150,159,126,172,253, 62,208,102,203, 46,121, 2, 45,170, 11, 85, 73,150, 37,184, 34,144,227,132,203,247,245,119, 77, 38,
+131,242,102,146,195,139,230,132, 5,104, 65, 8, 28,117, 19, 37, 60,156,188, 96,188,254, 10, 5, 67, 84, 13,199, 7, 6,111,159,
+197,139, 23,251,192,214, 78, 1, 89, 4, 84,136, 69,104, 46, 89,178,164, 25, 65,159,253, 32,149, 81,212,134,144,188,152, 33, 29,
+ 53, 67, 90, 99, 70,192,233, 43,176,211,178,150,104,133,120, 17,213,133,148,100,245,248, 33,197,238,227,187, 26, 78, 92, 48, 62,
+119, 74, 74,172, 40,185,234, 88, 45,247,211, 32,137, 22, 36, 91,144,104, 61,229,117, 7,134,241, 10,208,162, 84,133,224, 23,101,
+ 22,214,149, 96, 0,253, 70, 81, 67, 89,130, 44,242, 54, 20, 64,139, 18, 51, 5,104,145, 38, 19, 37,101, 4, 47, 12,180,203,126,
+192,180,117,235, 86, 71, 64, 43, 31,128,206,107,107,137, 22,131,134, 83, 58,132,197,137,128,215, 2,201,160,192,116, 64, 9, 94,
+ 14,158, 19, 92,107, 25,200,187, 98, 33,246,138,160, 68, 85,147,146, 30,251, 15, 65,155, 10,226,184, 32, 0, 45,107,181,174, 86,
+ 55,176,188,159, 13,210,182, 23,156,180, 25,172,157, 18, 40, 6,107,191,116,233,146,156, 63,127, 94,137,137,135, 54,184,171, 65,
+ 48, 34,190,141, 13,180, 19,100,255,231, 65,181,248, 31,127,252, 33, 88, 64, 82, 5, 25, 53,240,249,148,148,232,241, 40, 91,182,
+172,189,197,170, 2,180, 84,115, 3,148,197, 29, 18, 39,247, 46, 93,186,184, 3,184, 41, 9, 96, 91, 5, 90,212,126,204,198,184,
+247, 20,191,189,237,149, 17,224,175, 54,190, 77, 15,140,179, 43, 85,144, 5,213,172, 39, 2, 42,123, 66, 93,184,157,146, 44,204,
+ 59, 30, 0,191, 83, 49,142,122, 98,124,187, 4,213, 41, 23,108, 85,156, 97,100,120,231, 69, 89,158, 18,168,179, 95,210,110,144,
+106, 67,130, 96, 53,118, 48,239,161,207, 63,115,230,189,110,110,113, 18,103,115, 75,212,175,118,245,210, 79,166, 79, 25, 43,235,
+215, 98,225,178,107,189, 76,159, 60, 76,234, 84, 47,245, 50,123,150, 36, 35,179,166,143,111,207, 84,194,153, 87,105,230,181,198,
+ 34,154, 15,124, 93, 25,172,253,104, 5,183,213,178, 85, 57, 71,238, 29, 8,180,238,120,189,151, 5,187, 30, 75,183, 63, 79, 75,
+217,110, 91,164,122, 63,125, 64,235, 20, 0,208,242,141, 59,165, 67,199,206,242,125,213, 90,210,109,226, 78, 69,162,149, 40, 75,
+ 69, 57,124,225,129,242,193,101,114, 77, 39, 19, 71, 54,151,141,171, 38, 66, 13,112, 83,226, 37, 72,128,208, 98,182,143, 84,185,
+114,157,112, 63,176, 66,150,110,159, 34,155, 15,173,151, 27, 15,188,229,244,213, 39,178,219,243,174,172,222,117, 69,166,175, 62,
+ 41,131,102, 30,144,110, 19,182, 75,203,158, 77,228,183,209,253, 37, 94,234,124,180,219,113,120,168, 64,235,229,162, 90,242,114,
+201,143,226,123,104,162,124,244,190, 45, 18,240, 73,238,156,218, 33,235,134,213,149,201,245,147,201,164,186, 73,100,213,239, 85,
+117, 1, 45, 76,104, 46, 88,129,238,160,186, 16,182, 46,123,240, 65,228, 85, 11,193,115, 94,227, 61,230, 97, 94,173, 50,234,185,
+143, 15, 51,135, 74, 23,131, 52, 3, 7,219, 61,234, 71,137, 82,100,235,248,241,173,252,158, 60,105, 59,179, 69,139, 54, 46,152,
+128, 1,252,252,253,253,252,204,126,239,223,155, 15, 31, 58,228,223,182, 77,155, 23,251, 54,111,246, 92, 48,119,174,103,173,114,
+229, 14, 23,118,115,163,234,207,158, 13,148,242,174,207, 9,180, 96, 84,219,127,157,187,199,153, 83,231,175,158, 91,183,105,183,
+199,251,247,126, 62,254,254,102,223, 51, 23,175,109,191,120,245,230,150, 9,147,255, 92,207, 60,122,120, 69,195,119,218,193, 80,
+ 42,194, 21, 34, 39,174,147, 39, 79, 42,106,152, 62, 93,187, 72,183, 22,205,164, 83,173,106,210,190, 66, 25, 25,217,188,177, 76,
+233,219,139, 82, 45,174,204,237, 30, 4, 90,164, 69,160,101, 75, 93,200, 73,146,105,112, 62, 55, 25, 85, 58,191, 28, 89, 50,207,
+ 89,160, 85, 19,147, 2,251,179,106,248,156, 14,146,203,167, 0,214,138, 90, 6, 32,243, 18,238, 69,119, 84, 70, 74,180, 32,165,
+184, 71,160, 5, 35,122, 51, 84, 58, 4, 88,102,168,179,204, 80, 69,189, 6, 24, 48, 67, 98, 98,134,148,204, 92,176, 96, 65,229,
+220,213,213,245, 16,104,106, 78,230,234,174,195,145,189,221,102, 29,220,214,241,204,152, 95,115, 14, 80,203, 66,155,172, 54, 80,
+ 23, 82,178,213,177, 90, 30,123, 54, 90,214, 69,143,136,137,240, 49,129, 6,109,168,246,239,223,175,180, 17, 39, 28, 72, 96, 20,
+117, 33,121, 77,144, 69, 64,162, 19,104,197,128,212,115, 2,212,173,143, 17,139,241, 19,120,246,137, 65,113, 15, 29, 58, 20, 4,
+182, 8,236,104, 12,175, 2, 45,130, 59, 20,204,158, 68,203, 22,187,203,118,238,220, 89,233, 3,129,170,191, 50,122,250,164,141,
+ 60, 69,177,176,185,134,111, 90, 32,105, 20, 72, 32,149,250, 18,196, 53,109,218,148,192,237, 19, 54, 48,204,198,115,206,186,226,
+ 81, 37,179, 89, 85,144,197, 73,155,146, 54,242,151,252,224, 60,193,111, 1,234,227, 15,232,115, 83, 28,148,159, 54,116,115,103,
+205,154,165,140,231, 83,167, 78, 21,244, 39,197,190,140,160,128, 54,100,120,182, 13, 18,223, 57, 19,224, 70,145,150,161, 13, 28,
+ 74,180, 44,237, 58, 41,221, 66,125,131,128, 22,205, 23, 64,139,230, 11, 75, 40,125,230, 1, 91, 71, 95,252,143, 98,171,156, 24,
+ 23,183,211,240,157,120,154,191, 4, 89, 0,107, 4, 89,219,144, 63, 93,224, 51,191, 66,114,171, 72,180,201, 7, 38, 44, 64, 62,
+226,222,231, 80, 23, 58,236, 14, 89,178, 36,200,153, 59,123,242,217,169, 83,167, 10, 32,216,101,155, 16,252,242,156, 11, 1,158,
+171, 41, 93,186,180, 82, 40, 95,218, 77, 57, 50, 39,200,229,136,104,246, 76,241,243, 20,202,155,110,126,247, 95, 90,125,220,230,
+177, 73, 54,187,175,147,206, 29,127,146,252,121, 50, 72,175,206,223,203,140, 41,253,100,239,206, 53,226,177,121,133,116,255,165,
+ 69, 64,177, 66, 25, 54,107,209, 12,101,159, 14,122,236, 27, 7, 90,214,146,172,144, 70,241,106, 5,237, 48, 42, 9, 86, 48, 75,
+129,240,189,152, 18,167,202, 34,155,220,247,200,248, 5, 7,165,253,184,125, 82,166,235,102,169,218,103,171, 46,137,214,225,243,
+247,165,125,135, 78,138, 40,158, 31,114, 6, 87, 55, 73,146,165,188,228,171,216, 74,118, 29,191,170,124, 32,174, 25,211,201,152,
+ 65,141,228,232,129,245,178,102,205,106,179, 41, 74, 20, 6,184,181,121,100, 40,156,229,221,185,235,103, 97,139,117, 95,206,223,
+120, 42,158,151, 30,203,246, 99,183,101,249,246, 75, 82,181, 77, 78, 41,223, 40,163,148,169,147, 90, 74, 84, 77, 38,181, 59,118,
+146,177, 11,118, 73,156, 20, 57,222,106,117,136, 96, 64,139, 96, 43, 48,249,223,220,163,128, 43,203,180,242,183,239,117, 1, 45,
+190, 19, 3,127,103, 72, 77,246,192,166,100, 15, 6, 2, 4, 70,255,251,224, 57,175,241, 30,243,104,149, 79,239,125,168, 89, 50,
+ 96, 64, 82, 0, 28, 36, 20,155, 29, 61,215, 44,118,236, 31, 95,220,189,219,198,107,203,150,250, 89, 93, 93, 47, 65,141,231,255,
+ 1, 40, 1,118, 41,230,183, 62, 62,102, 12,232,230, 53,171, 87,251,183,106,214,236, 78,219,134, 13,151, 29, 94,183,174, 21,141,
+229,181,202, 98, 1,180,130,236,177,104,155,101,109,163,101,113, 77,203, 13,132,229, 43, 99,187, 36, 75,190,231,242,213, 27, 55,
+ 79,157,187,118,100,221, 6,143,253, 91,119,236, 57,120,253,230,131, 93,199, 78,158,221,141, 9, 97, 47, 50,199,209, 42, 35,239,
+115,103, 33, 7,124, 14,168, 52,176,230,170,241,200,145, 35,114,104,231, 14,233,218,172,169,180,175,254,189,116, 0,200,234, 86,
+182,164, 12,248,190,156, 44, 31, 58,128, 64,235,172, 35,218, 42,208,178,165, 46, 84, 65, 22,223, 57,230,187,130, 50,177, 90, 89,
+ 57,182,114,177,100,206,156, 89,175,234,176, 64,225,194,133,253, 41,117,160,250, 8,229,136, 31, 88,150, 92, 80,185,191, 39, 16,
+ 33, 56,192, 53, 6,138,118,116,244,193,228,122, 14,106, 66, 51,164, 10,102,170,157, 64,215, 12, 80, 17, 44,213,175, 95,255, 85,
+245,234,213,175, 66,242,122, 28,196,104,124,173,107,107,125,183,186,169, 98,140,238, 82,228,204,201, 3, 99,223,240,151,255,213,
+194,232,216,117,104, 93,238, 8,144, 44, 60,162, 10,139,147, 12,213,133,148,100,113, 2,175, 87,175,158,146, 84,144, 69, 9, 10,
+164,184, 90,170,195, 24, 0, 88, 55, 48, 57,251,211,254,138, 7,219,106,210,164, 73, 2,169, 72, 16,216,178, 6, 90,129,227,165,
+110,160, 5,233,206, 70,168,240, 21,201, 3,213,156,248,191, 94, 79,159,180,147,135, 0,133,109,221,156, 82, 51,170, 31,209, 46,
+108,231, 50, 72,148,104,115, 83,193, 24,164, 5, 72, 14, 23, 65,184, 79, 23, 14, 11,177,176,123, 13,245,255, 94,244, 3,111,142,
+205,228, 39,235,204,201,155, 27, 43, 32,249,121, 8, 16,114, 9, 64,244, 41,230, 2, 26,174,199,118, 80,182,185,228, 31, 15, 2,
+ 83,208, 13,160,170, 21,192,157,193,128, 21,105, 32,192, 44, 65,213,244,113,227,198, 41,249, 2,165,112,173,236,208, 92, 68, 85,
+161, 35,160, 5, 91, 84, 74,173,111,171, 32,139,101, 70,127, 37, 79, 8, 58, 67, 28,168,207,118,238, 46, 68,223,241, 68, 29, 61,
+ 1, 6, 21, 73, 22, 50,166, 11,204,252, 11,213,115, 84, 31, 67,165,206,141, 69,143,169,170,227,156,133,111, 94,151,132, 60, 12,
+237, 27,236,209,172,110,137, 70, 53,111, 82, 75,250,245,237, 35,169, 83,167, 86, 76, 3,152,248,125, 83, 85,204,132, 77, 44,178,
+110,221, 58,101,167,113,158,220, 57,101,223,238, 13, 2, 53,224, 57,123,101,200,230,154,112,236,192,223,123,162,126, 23,101,197,
+178, 5,210,184, 65, 53,201,153, 53,165,228,200,146, 66, 73,221,126, 46, 31,148, 70, 15,110, 45,219, 54, 45, 16,207, 99,219, 37,
+171,107,194, 19,225, 85, 47,123,116, 52,176,200,231,126,253,231,163,175,129, 34, 9,178,188,182,111,223,254, 81, 53, 12, 93,137,
+ 78,156, 54, 85,106, 25,208,111,154,180,234,183, 76, 74,180, 95, 35,223,247,222,162, 11,104,237, 60,118, 69,126,238,128,221,123,
+ 24,204,160, 87,151,244, 25, 50,200,214,253,103,101,203,190,211,178,105,239,169, 64,160,149, 86,134,246,255, 81, 30,220,187,202,
+ 78,254,206, 20, 51,166,170,251, 12,193,132, 68, 25,179,251,156,188,124, 70,214,238, 62, 40, 19, 22, 79,151,121, 27, 55,203,162,
+173, 23,100,194,210, 99, 82,179, 93, 69, 41, 93,235,111,144,197, 84,169,121, 13, 25, 50,107,119,152,128, 22, 85,135,214, 64,107,
+ 69,255,202,186,129, 22, 6,170,248, 0, 60, 30, 39, 78,156,216,243,203, 47,191, 16, 84, 21,103,226, 57,175,241, 30,243,132, 87,
+107, 67, 68,222, 6,131,200, 30,180, 31, 85,135, 14,213,145,141,163, 68,249,217,236,231,215,241,254,188,121,181, 19, 37, 76,248,
+ 22,106, 9, 5,100, 81,154,133,201,220,124, 96,255,126,243,238, 93,187,204,133, 10, 22,124,113,108,225,194,186,175,111,222,108,
+200,221,136, 90,101, 85,129,150,173,221,134,182,174, 89,218,114,105,209, 14,188,159,174, 92,133,202,167, 30,121, 61,191,188,101,
+199,254,117,123,246, 31, 91,229,245,244,197,225, 34, 69,139, 19, 16,100,210, 73, 67, 1, 90,180,127,128, 20, 79, 25,200, 32,193,
+147,131, 59,182,203,190,117,107,164,221, 15,149,130, 64,214,176,106, 21,100, 97,155,166,114,100,134, 98,167,165, 9,180,184,187,
+ 80, 85, 25, 90,170, 11,127,203,146, 74,134, 22,200, 42, 99,202, 22, 82,164, 47, 76,148,126,233, 4, 90, 73, 32,185,122, 72,144,
+193,213, 45, 38, 9, 85,141,199, 73,150,234,194,141,156,236, 40, 85,192,185,150,171, 15,101,215, 33,212,130,167, 90,180,104,113,
+173, 74,149, 42,126, 0, 90,239, 96,252,108,182, 76,232,150,126,144, 84,208, 94,210,158, 31,173, 16,172, 38,168, 42,148, 33, 85,
+159,222, 29, 26,202,141, 43, 59,133,191, 69, 92,211,244, 81,193, 22,213,132,180,201,178, 50,128,119,216,100, 4, 90, 4, 89,112,
+ 59,161, 76,220,148,100,169, 32, 75,253, 37,200,162,109,149, 22,208,162, 36, 11,210,160,255, 91, 18, 99, 4, 34, 80,163,196,140,
+147, 63,248,161, 0,110,107,160,133, 69,136, 51, 18,173,140, 21, 43, 86, 12,160, 90,147,210, 7, 74,223, 96, 16,207, 13, 31, 25,
+244,246, 77,171,124, 4, 90,253, 97,163, 21,192, 69, 1, 65,209,134, 13, 27,216,111, 8, 42,251, 65,205,245,152,118,100,176, 49,
+ 18,168,119,215, 56,122, 7,250,205, 20, 60,139,234,126, 82,236, 17,177, 33, 71, 1, 23, 4, 88,236, 87,180,127, 3,191, 9,252,
+245,126, 71,173, 96,179,169,140,227,163, 70,141, 82,118, 19,162,223,120,210,142,136,223, 21, 22, 0, 74,187,193,208, 62,128, 18,
+ 46, 30,236,167,204,135,100,207,222,209, 33,208,130,116,111, 83,182,108,217, 30, 90,130, 44,214, 93, 89,180,187,186, 82,133, 24,
+114,222,192,110, 66,212,221, 3, 18,219, 61, 0,170,158,168, 55,237,177,212,133,232, 20,240, 48,128,118,111,120,158,101, 35, 96,
+ 53,149, 46, 93,154, 99, 34, 65,231,193, 80,182, 91,168, 30,203,145, 37,177,215,195, 91,135,101,221, 42,152, 21,100,202,168, 72,
+ 6, 1, 44,149,249,147,210,192, 5, 11, 22, 40, 42,217, 17,195,135,202,230,141, 75,229,236,137,205,178,125,211, 60,201,238,150,
+200,238, 66,128,247,238, 92, 63, 44, 11,231,142,147,162, 5,221,130, 0,150, 53,208,234,251, 75, 53, 89,183, 98,130, 92, 60,237,
+ 33, 91, 55,206,150,108,110, 9,239,132,170, 18, 58, 31,250,198, 37, 90,106, 45,109,187,119,112, 84, 57, 72, 4,150, 96, 53,130,
+ 49,235,163, 50, 0,209,136,151,226,249,113, 99,199, 73,233,188,197,164,109,251, 41, 82,178,229,124,236, 32,220,164, 11,104,185,
+239, 57, 41, 83,231, 44,149,114,229, 43,160, 19,103,146,246,191,244,150,181,219, 14,203,234,173, 7,101,213,150, 3,127,139,124,
+ 51,164,149,223,122, 84,135,212,235,189, 64,196,235,111,234,220,217,174, 65, 94,252,212,249, 14, 44,217,120, 68,166, 46,159, 36,
+ 63,118,201, 47,213,219,230,148,223,167,173,148, 62, 83,118, 75,187, 97,171,229,135,150,141,131,128, 86,189, 30,147,164,205,111,
+243,156, 87, 29, 90, 72,180,222,238, 27, 19, 2,104, 45,239, 87, 73, 55,208, 98, 75, 0, 72,180,130, 29,214, 30,168, 61,246, 96,
+213, 60,159,137,231,188,198,123, 58,251,164,102, 54,208,170,209,184,113,227,221, 52,134,199,174, 50,210,174,232,232, 33, 21,104,
+ 61, 90,188,184, 86,146,196,137, 33,196,242, 81, 36, 89, 24,200,205, 59,118,236, 48, 47, 91,186,212,188,112,193, 2,115,182, 44,
+ 89,158,189, 61,126,188,178,207,245,235,245,156, 1, 90,150, 59, 12,195, 81,162,165, 84, 9, 19,230,186, 43,215,111, 31, 58,234,
+121, 97,193,233,243,215,231, 94,186,122, 99, 11,175,105, 50,201, 34, 3,213,128,156, 64,255,252,243, 79,101, 2,239,217,169,131,
+244,105,221, 74,250, 53,105, 32,171, 70, 12,150,205, 35, 6,201,238, 17, 3,228,192,176,126,114,116,228, 0,217, 62,118,132, 46,
+213,225,217,141,107,131,128,150,106,147, 69, 41,214,208, 66,217, 20,144, 53,169, 70,121, 5,100,113, 16, 39,208,210, 99, 12, 15,
+117,232,118, 24, 2, 43,118, 47, 88,140, 8,118,125,250,193,216,216, 23, 96, 73, 1, 29,180, 39, 34, 64,224, 47,170,168, 37,209,
+ 34, 23, 20, 63, 90, 4, 82,144,240,248, 99,178, 52, 67,117,102,198,100,107, 70,223, 52,195,230,203, 12,126, 90,218, 74, 38, 6,
+191,184,163,115,162, 45, 30,211, 22,139,106, 66, 74,176, 8,174,182,109,156,171,124,219,219, 54,206, 81,192, 22,175,243,254,172,
+209,185, 82, 13,234, 26, 63,254,174,245,117,254,232,211, 54,129,230, 38, 21,190, 11, 19,221, 35, 2, 1,130,200,126,253,250,133,
+ 0, 89,148,100, 48,241,208, 2, 90, 84, 23,146,239,150, 7,129, 16, 37,154,180,205, 3, 32, 8, 6,180, 8, 96,168,150, 13, 4,
+ 7,246, 84, 93,214, 44,153, 68,192, 66,186,148,234,176,236, 51,102,204, 96,187,216,228,157, 86,159, 69, 27,141,101,255, 36,112,
+ 35, 45,170, 13, 9,142,232, 50,129,187,208,216, 47,104, 71,245,219,111,191,241, 29, 14, 23, 87, 88,136,221, 35,200,162,186,156,
+210, 26,170,203,217,111, 40,117,163,253, 27, 65, 45,104,184,105,149, 73,189, 15, 27,193,243,164,177,116,233, 82,190,123, 30, 18,
+109,222, 26, 80,218,194,131,187, 13,105,196,207, 93,188, 60,168, 86,196,125,130, 44,230,179,119, 76, 3, 24,114,135, 4, 88, 49,
+136,231,226,108,228,200,145,199, 1,148,158, 67,210,244, 1,125,208, 79, 5, 89,252,165, 10,149, 7,164,179, 31, 64,176,159,163,
+178, 67,136,176, 29,227,156, 39,202,235,137,190, 64,160,213,147,188, 85, 15,242, 24,128,139,160,120, 30,129, 55,237,205,240, 62,
+ 61, 27, 1,244,178, 76, 51, 95,182, 76, 9, 1,180, 14,202,217, 99, 43,229,214,229, 61,178,114,233, 44,233,221,171,167, 96, 76,
+151, 1, 3, 6, 64,106,221, 67,150, 45,154, 33,183,175,236,151,131,187,151, 74,207,206,181,100,228,144,206,194,231,236, 17,231,
+189, 71,183, 15,200,201,195, 75, 21,154,147,198,254, 42,249,115,167, 15, 2, 92,189, 58, 85,145,101,243, 6,203,141, 11,187,197,
+ 99,195, 12,233,214,177,198,223, 52, 13,160,165,217, 94,200,160,207,143,150, 37, 37,170, 10, 41, 82,231, 74,156, 98,111,174,114,
+232, 71,134, 91,221, 83, 38,133, 1,111,207,113, 82,173,221, 36,201, 80,174,199, 71,151, 60,117, 41, 65,176,121,168,187, 14,131,
+141,104,118,254,100,200,144, 70, 70, 13,105, 5,219,149,151,146, 48, 81,162,243, 86,238, 29,130,209,167, 49,124,211, 78,195,204,
+123, 78,156,151,106,109,114, 72,229,102,217,164,199,196,237,210,110,228, 86,105, 60, 96,131, 84,235,190, 68, 74, 84, 75, 9,201,
+ 86, 70, 72,188,182, 74,201, 90,157,253,157, 49,134,247,217, 49, 48, 72,109, 72,245,225,155,205, 61,130, 1,173,153,173,178,200,
+178,190, 21,156, 2, 90, 0,143,177, 10, 20, 40,176,137, 0,168, 67,135, 14,135,152,120,206,107,188,167,167, 37,173,242, 4,243,
+ 6,143,193, 51, 63, 86,100, 99, 33,250, 86,118, 28,162,173,104,124,255, 39, 86,209, 14, 85, 61,170,234,208,231,240,225,186,153,
+ 51,100,184,186, 98,249,114,127, 0,107,243,129, 3, 7,204,176,129, 48,207,197, 22,127,216,103,248,231,206,158,253,148,239,213,
+171,223,159, 88,190,188,129,147,170, 67,205, 93,135,206, 26,195,171,124,200,230,150,230, 66,253, 58,149,222, 87,255,161,148, 79,
+233, 18,185, 95,150,251,174,192,219,172,153, 82,235,157, 8, 21, 50, 52,108,135, 29,205,123,130,173, 95,218,181,145,142,245,235,
+ 74,235, 74,229, 20, 73,214,238, 9,163,101,223,232,193,178,111, 72, 63,185,189,166,175, 92,154, 61, 90, 70,181,110, 97,214, 99,
+ 12,127,106,205, 10, 5,104,117,141, 31, 73,177,199, 82,125, 50,141, 41, 87, 88, 38,215,170, 40, 51,155,213, 81, 64, 22,191,179,
+ 64,160,197,201,205,209, 17, 11,134,212,138,187, 16,170,208, 8,182, 72,147,182, 58,156, 44, 57,105,210, 80,182,123,247,238, 2,
+ 64, 70, 3, 94,213,240,216, 33, 81,236,184, 60, 2,240,244, 0,147,143, 55,128,132, 25,188, 80,252,103, 97,226, 81,118, 29,210,
+222,137, 96,139, 9,170,110, 47, 72,253,252, 49, 57, 81,221, 18,226,160,225, 59,109,178,168, 46,164, 36,203,242,224,127, 94,231,
+125,230,235, 82, 35, 97,235, 35, 59, 7, 63,239,136, 95, 61,125,159, 64,139,245,163, 51,214,254,253,251, 7, 3, 90,150, 32, 75,
+ 7,208,138, 72,155, 44,203,178, 81,242, 66,105, 38, 1, 21, 85, 50,168,159,178,176,164,155, 15, 74, 16, 8, 16, 32,117, 38, 56,
+ 32, 95,243,233, 40,111, 76, 72,154, 94,211,237, 68,160, 11,131,251,240, 67,166,128, 33,108, 86,160,215,126, 91, 62,248, 28,145,
+141, 13,201,138, 63, 1, 0, 37, 68, 48, 13,160,225,243, 12, 72, 32, 63,241, 63, 65, 18,251, 47,202, 72, 91, 34,250,249,114,216,
+246, 52, 8,103,127,161,161, 59,159,165, 13, 22,213, 80,244,193, 6, 62,211,104, 93, 43,186, 66,176,178,162, 28,202, 46, 56, 26,
+249,227,134,234,196, 56, 42, 36,166,247, 9, 2, 9,234,120, 80, 61, 73,137, 23,174,211,182,202, 17,200, 34,253,140, 72,163, 97,
+219,166,184,113, 64,223, 60,206,221,181,108, 19, 30,124, 31, 15,130, 44,228, 91,133, 52, 29,253,211, 27,191,189,180,218,135,126,
+178,104,244,142,118,222,138,111,121, 42, 65, 22,203,216,181,107, 87,101, 23, 39, 54, 41, 8,118,217, 10,190, 3,229, 58, 36,156,
+ 4, 93,213,181,232,134,231,125,130,162, 7, 55,247,201,225,173,191,201,169,125,227,229,198,197,173, 0, 64, 59,101,234,164, 81,
+ 74,186,114,110, 7, 0,211, 26, 25,216,183,137, 52,172, 93, 80,154,214, 47, 38,195, 7,117,208, 4, 90, 42,205,147,123,199,202,
+165, 83,235,229, 58,104,246,239,213, 90,122,119,109, 38,215,206,109,147,163,251,150,203,239,189, 26, 5,167,249,153,129, 86,120,
+242,237, 31,164, 21, 58,160,165,238,106,161,141, 1, 7, 32,126,132, 68,210, 9, 18, 38,249,228,146,187,230,135,100,121,234,221,
+ 74,154,187,238,194, 36,217,235, 90,250,124, 10, 86, 79,171, 16, 60,126,208,219, 67,162,149, 65,210,165, 75, 45,233,131, 82, 26,
+172, 32,211, 72,230, 76,105,100,225,156, 17,114,254,220,217,128, 24, 49, 99, 78,118, 4,180,232,222, 33, 78,138, 92, 79,255, 90,
+190, 79,254, 92,177, 70, 42, 52,200, 38, 63, 13, 94, 37, 13,126, 93, 47, 85,187,175,148,239,218, 47,145,106, 45,202,201,208, 9,
+ 61,164,231,232, 69, 18, 39,101,206,231, 58,221, 59, 92,153,220,255, 39,121,251,240,146,248, 95,223, 33,175,215,183, 87, 0,215,
+171, 21, 77, 21,160, 53,179,101,102, 89,131,221,134,179,123,125, 47,181, 10, 36, 37,208,186,226, 76,195, 98,210,106,128,213,173,
+226,202,129,137,231,188,230, 12,141,192,188,170, 55,120,250,169, 58, 14,201,198, 58, 26,191,195, 14, 66,177,203,162,205, 23, 86,
+229,211, 64, 91,115, 64,167, 49,252,182,137, 19, 91,153,189,189,219,206,238,218,181, 53,165, 90,127, 78,159,238, 79,117, 33, 37,
+ 89,191,116,233,226,159, 32,126,252,183,203, 70,143,110,250,241,225,195,234, 83, 27, 52,104,218, 48,114,228, 18, 90,101,254,156,
+198,240,124, 55, 84,104,101,218,181,105,130,109,232,222,242,244,201, 93,217,184,118,154,204,159, 61, 80,138, 22,202, 33,188,167,
+ 85, 62,139,251, 17,232,178, 97, 9, 38,211, 41, 16,195, 19,100,117,164, 77,214,119, 37, 20,144,117, 96,120, 95,185,187,190,143,
+220,219, 56, 92,118, 14,237, 47,113,116,186,119, 32, 16, 82, 37, 89, 3,178,167,149,225, 69,115,200, 31, 21,138, 6, 73,177, 8,
+178,150,247,233,130, 13, 22,191,202,133,157, 30,148,104,105, 1, 45, 19,108, 92,142, 17,108, 16,104,117,236,216, 81,241, 73, 68,
+ 73, 1,218,255, 29,236,109,174,161, 78, 52,234,165, 36, 75,107, 18, 11,170, 62, 1, 20,250,140, 89, 77, 52,130,199,228,166, 0,
+ 45, 72,143,204, 88,209,155, 49,159, 41, 9, 99,129, 25, 82, 31,179, 61,160, 69, 73,149,109,137,214,220, 32,137,214,232,254,217,
+ 70,244,108,144,164, 79,173,114, 69, 63,210,207, 22,127, 59,215, 72,208,110,100,251,120, 9, 28,181, 25,129, 22,213, 92,170,225,
+ 59,199, 39,242,144,246, 74,170, 36, 75, 5, 79,122, 36, 90,170,109,150,106, 63, 53,123,246,108,101,210,230,238, 64,240,196,220,
+164, 73, 19, 69, 66,196, 9, 23,229, 34,192, 42,239, 68,159,106,195,177,146, 18, 50,124,227,148,176,228,193,228,253,129,246, 53,
+108, 55,252,167, 81,184, 51, 71, 50,218, 99,113, 39, 32, 12,179,249,124,246,192,135,243,162, 79, 28,129,209,249, 11,252,210,167,
+ 86, 30,157, 68, 83, 64,106,117, 16,224,250, 1,109,240, 8,212,233,147,140,160,144,170, 53,157, 52,130,178, 1,184, 94, 80,165,
+108, 0, 46,244,107, 69, 15,250, 27,177,152, 84,140,247,209, 63, 21, 0,131, 49,129, 32,147, 11, 47,189, 97,147,248, 14,214,105,
+ 52, 37, 89, 4, 89,116,109, 0,137,150,162, 34, 37,216,130,164,143,106, 66, 93,118,131,182,234,133,133,174,226,244, 13, 6,240,
+ 4, 83, 19,184,171, 85, 61,184, 0,130,164,140,215,155, 57,203,147,176,230, 7,208,186,127,235,242,118,185,120,124,158, 28,221,
+ 54, 72, 1, 92,103, 15, 77, 3,216,218, 6,151, 40, 27,101,204,144,118,210,168, 78, 33,105, 82,183, 8, 36, 79,117,100,200,239,
+ 63, 75,211, 6,229, 8,180,118,218,123,247,223, 52,119,200,133, 99,115,228,200,182,129, 10,205, 51, 7,167,200,245,243, 91,228,
+204,177,245, 50,114, 80, 27, 5, 96,145,102,247, 78,255,167,153, 61, 83,194, 47,106,159, 22, 86,222,125, 51,207,211, 8, 30, 98,
+239, 15,180, 93, 97,199,131, 45,145,146,184,243,132,247, 52, 42,242,255,221, 25, 22, 33,117, 48, 16, 60,126,253,234,165,220,190,
+121, 89,214,174,156, 9,233, 85, 71,105,219,172,140,180,104, 80, 88, 90, 53, 42, 42,109,154, 22,151, 3,123,221,105,216,247, 30,
+251,213,235,235,113, 88,154, 42, 91,113,223,113,243,118,200,172, 53,251,164,227,176,105,242, 99,159,181,242, 67,183,149,210,232,
+247, 13, 48,128,223, 38, 93, 71, 44, 18,151, 76, 69,222,234,117, 88, 90, 6, 31, 44, 66,237,180,203,153, 42,234,227,133,163, 59,
+203,155, 27,135,228,221,177, 25,242,122,109, 27,217,244, 71,115,217, 60,165,171,116,168,154, 83,178,185, 68,120,204,124,204,111,
+197, 11,135, 59, 83,176,211, 43,141,149, 23,248, 0, 94,211,205,207,191, 51, 6,243, 56,111,233, 8,149, 82, 44, 12,200,187, 48,
+160,245, 6,216, 8, 50, 62,182, 65, 63,168,156,170,123,135, 87,247,239,183,121, 7,251,171,217,125,251,182,204,156, 49,227, 53,
+168,143,125,227,199,139,231,235,150, 33,195,149,217,163, 71, 55,255,120,231,206, 15,167,151, 47,175,219, 48, 90,180,118, 45,108,
+239,104, 11, 86,247,112, 2, 90, 14,249,233,230,154, 70,166,140,255, 77,198,141,234, 41, 61, 58,253,168, 36,215, 12,169,236,109,
+ 23, 87,217, 96,139,102,218,244,105,210, 60,154, 51, 97,188, 44,250, 99,148, 12,107, 84, 79, 6, 84, 42, 35,251,135,253, 46, 71,
+135,255, 38, 23,103,140,148,221,131,251, 75,126,215,140, 20,203,219,218,242, 28,194, 97, 41,129,150, 42,201, 26, 81, 44,167,140,
+173, 88, 76,166,212,169, 28, 36,197,226, 68,191, 97,196,239,226, 49,121,140, 92, 57,176,135,182, 54,214, 64,203, 86, 57, 83,195,
+177,233, 11,170,242,169, 50, 10,244, 86,239, 40,204,148,117,211,135,160, 25, 40,209,122, 8,112,241,134, 0,139, 6,241, 48,166,
+ 87,128, 22,212, 83,202,127, 74,182,152,160,182, 80,126,173,128, 86, 8,154,180,197,162, 77, 86, 48, 27,173,204,127,219,104,237,
+220, 80,123, 44, 37, 89,150, 78, 77,249,159,215, 45, 10, 27,130, 38,128,228, 35,242,140,118,158, 42,200,162,132, 4,106,242, 16,
+ 50,114, 59, 64, 43,136, 38,202, 63, 17, 18, 18, 60,238,175, 72,116,168, 54,166,189, 11, 85, 90,216,253, 75,181,212, 4,148,165,
+ 18,210, 68, 36, 71, 0,203,102,255,196,243,103, 41,189,162, 52, 12,207, 47, 11,172,215, 50,170, 14,105, 95, 3,158, 59,178,241,
+179, 69, 51, 25,221, 65,208, 54,139,224,154, 99,128,147,147,137,221,239, 8, 0, 70, 81, 35,210, 78,139,170, 62,140,211,175,116,
+210,182,164,217,146,128,138,117,102,232, 34, 2, 33, 74, 29,249,159,215, 65, 79,239, 70, 23,187,229,132,157,151, 18, 66,132,180,
+ 65,111, 4,127,121,224,186, 93,191,110,129,245,112, 56,134, 0, 0,190, 37,160,194,188, 70,160,202, 99, 41,192,151, 2,176,169,
+150,199,255,154,142,198, 79,157,188,210,147, 45, 88, 57, 97, 12,223,172,108,137, 44,239,150,205, 31, 10,112,181, 81, 1, 89, 71,
+ 60,126, 87,192, 17,193, 80,163, 58,133,165,107,251,154,138,106,175, 93,203,234, 82, 48,111,106, 63, 26,208,231, 73, 23,204,214,
+215, 62,205,243, 27,228,236,193,169,114,216, 46,205,106,164,249, 46,123,166, 4,195, 92, 93, 19, 90,142, 49, 95,124,247,165, 30,
+230,253,131,121,156,243, 12,111, 85,208, 36, 84, 31,226,163,249, 72,123, 15, 38,120,143,254,128,143,144, 19, 77, 18,141, 74,217,
+ 4, 90, 9, 18, 38,220, 10,145,181, 63, 6,115,223,173, 91,183,124,120,248,224, 62,116,223,102,121,246,244, 17, 0,214, 38,153,
+ 57,117, 16, 36, 19, 15,168, 99,127,111,114,113, 73,175, 5,180, 88, 6, 53, 4,207,247,141,123,251,247, 24,181, 76, 70,204,222,
+ 45,131,254,220, 46,173,250,207,145, 18, 53, 59,249,199, 77,153,203,233, 16, 60,164,155,203,197, 20, 11, 64,106, 64,225, 12,113,
+124,214, 78,236, 38,207, 79,174,146,225,237,191,151,188,169,162,249,240, 58,239,219,225,129, 86, 39, 12,230, 45, 62,208, 27,186,
+214,160,105, 77, 51, 4,208,130, 72,253, 80,177, 98,197,232, 9,254, 23, 27,193,158,109, 21, 53, 24, 77, 58, 44,237,148, 46,221,
+207, 94, 87,174,180,252,232,237,221,216,239,226,197,234,126, 39, 79, 86,246,187,112,161, 18, 0, 86,149,143, 94, 94,213, 79,175,
+ 90, 85,183, 69,130, 4, 63, 35,136,160, 61, 99, 94,123, 64, 43, 44,187, 14,237,242, 51, 72,162,245, 6,190,132,188,238,200,134,
+ 53, 83,101,222,172, 1,122, 36, 90,246,104,166,141, 5,199,165,173,106, 87,127, 63,169,251, 47,178,236,183, 62,114,122,206,116,
+217, 49,114,144,252,209,170,153, 57, 80,146,101, 11,100,145,191, 33,128, 22, 65, 1, 37, 48, 76,199, 87, 44,150, 19,171,151,201,
+137,181, 43, 20,160,197, 68,251,172,243,144,100, 93,216,187, 83, 46,238,223, 37, 80,251, 62,180,106, 40,123,229,252, 14,147,173,
+ 98,200,140,118,231,106,219,222, 78, 48,205,118,183,204, 0,192,127, 11,182, 79,102,128, 1, 51, 0,135, 18,114, 7, 82,153, 96,
+170, 67,128,157,167,144,200, 88,171, 14,109,150,211,222,174, 67,218,102, 81, 93, 24, 36,209, 42, 91,244, 35,213,136, 86,182, 90,
+ 54,129, 22,121,105, 9,178, 84,149,148, 53,210,210, 2, 90,168,183,178,235, 16, 78, 52,253,169, 54,163,187, 8,170,246, 8,178,
+ 48,198,221,228,125,157, 3,183,205,186, 99,162,246,161, 38,128,126,179, 64,167,120, 32,173,226,116, 52,202,157,113, 0, 7,116,
+ 44,107,207,253,134, 77,160, 69, 73, 22, 37,100,148, 96,226, 89,173, 49,195,186,248,118,191, 35, 72,182,118, 3, 80, 7,208, 45,
+ 8,164, 55, 31, 32,157,114,228, 64,213,146,174, 53,205,153,140,181, 73,247, 24, 4, 88,228, 41,119,240,225, 1,189, 32, 43,196,
+119,100,249, 50, 72,202,246, 90, 74,180, 40,217,226,127, 94,215, 61, 31,217,200,136,182,122, 74, 21, 47,128,236, 7,168,100,207,
+113, 35,196,193,131, 7,249,159,223,214,247,161, 28,231,117,118,159, 96,217, 66,180, 81,174,140, 46, 73,179,186, 38,152, 90,189,
+114,254,143, 27, 86,140,145,171,103, 86,202,201,189,227,164,115,187,106, 50,102,120, 87,233,217,165,177,148, 42,154,241, 35,118,
+ 5,206,116,115, 75,100, 25,119, 86, 37,236, 20,205,209,195,224, 51,176,115, 67, 41, 81, 56,195,199,236,153, 18, 77,207,158, 46,
+137,173,126,166, 53,199,133,166,238,255,134,103,156, 87, 29, 6,214, 58,152,123,135, 64, 73,150, 22,200, 10,254,177, 88, 7,137,
+174, 91, 55,134, 41, 70,140,162,166,200,145,187, 3,120,109,193, 71,253, 28, 43, 7,127,236, 72,121,127,241,226,121,236,208,185,
+ 39,184,246, 42, 40,184,244,255,217,111,183,113,213,160,210, 52,144,135, 11,135, 55, 76,225, 21, 84, 58,163,139, 41,105,230, 36,
+166,105, 89,147, 70,120,199, 95,254, 15,203, 71, 29,248,172,222, 64,211,118, 63, 22, 14, 94,140,113, 72,160,134,129,102, 62,182,
+255,210,151,135, 51, 62,116, 66,240, 83, 13,193,179,178,111,223, 22,183,246,236,105,130,221,133,141, 94,221,184, 81,255, 20,108,
+178,168, 46,108, 20, 61,122,219,186, 38,147,171,131,250,219, 4, 90, 97,220,117,232,240,163,118,205,152,202,163,114,133, 34,210,
+169, 93, 29, 37,241,156,215,194,208, 70, 65, 65,165, 99, 99,103, 33, 19,141,229,157, 13, 42,141,201,235, 4, 93, 60, 56,147, 0,
+144,173, 35, 33, 56,170,123, 35,216,250,220,131,218,132,146, 23,103, 14, 71, 52, 51, 67,210,114, 67,181,199, 82,127, 41,241,178,
+120,129, 45, 99,120,187, 52,169, 70,180,246,163,165,210,234, 92, 43, 97, 75, 74,178,248,107,163, 2, 33,104,194,142,113, 15,210,
+ 35, 38,240,213, 97, 2, 47,109,109, 71,183,166, 73,176, 53, 17,201, 11,117,165, 31, 45,254,146,159,122, 65,150, 93, 96,128,118,
+ 25, 5, 51, 9, 58,182,157, 99, 85,183,177,144, 72,190,199,174,192, 63,244,126, 71,129,249,226, 97,195,195, 39, 74, 49, 25,202,
+ 7,215, 18, 58,211,232,200,235,168,221,147, 99,108,223,130,133,245, 93,240,130,126,178,244, 2,119,107,154, 84, 7, 54,196, 2,
+232, 20,164, 68,190,248, 61,132,255, 53,195,177,156, 85, 1, 92, 3, 84, 27, 45,254,242, 63,232, 87, 13,195,247,206, 71,127, 37,
+ 32, 36, 56,100, 34, 80, 12, 4, 89,142,212,133,159, 3,108,216,165,153, 61, 99, 18, 87, 24,164,175,104,252, 99,201,128,109,235,
+ 39,200,192,254, 63, 75,197, 50, 57, 37,107,166,132,107, 50,103, 78,236,200,158, 78, 55,205, 1,253,219, 73,133,210, 57, 2,224,
+ 30, 98, 57,223,231,100,255,116,178,153,255,117,217, 67, 13,178,194,194,137,255, 55,174, 53,208,178,245, 63, 69,138, 52, 80, 21,
+214,131, 93,214, 20,128,175,139,137,146, 36,153,226, 12,208, 10, 67, 65,117,127, 44, 78,132, 36,208, 75, 51,152, 33,123, 40, 7,
+ 10,103,104, 88,191,194,102, 57,237, 5,149,166, 77, 22,239, 57, 83, 78, 12,180,109,168, 62,212,155,152, 95,207,132,107,171, 12,
+176,111,226,228,163,165, 50, 84, 31,213,219, 70,206,116, 45,131,166, 13,110,113, 23, 34, 13,223,105,187,101,125,123, 80,231,132,
+113,185,235,144,191,161,109,119,103, 26, 72, 3,108,232,182,105,179,122,167,163,118,183, 71, 83,203, 62,201, 38, 77,120, 43,255,
+139, 33,150, 0,222,102, 58, 89,111,102,255,183,244,207,170,148, 96, 81, 93, 24, 40,201,210, 2, 89,122,235,222, 31, 11,151, 7,
+216, 9,254, 28,210, 80,218, 58,214,119,102,172, 11, 69,123,216,122, 68,179,141,224,158,161, 96,182, 76,137, 54, 6,166,194, 58,
+222,171,159,166,107,130,117, 89, 50, 38,182,235, 82,201,226, 93,154, 52,117,148,235,223,148, 37, 76,170,195,176, 48,226,115, 52,
+132, 65, 51, 44, 45, 18,242, 89,131,159, 6, 63,195,139, 3, 70, 95, 10, 47, 78,254, 77,199, 17, 63, 53, 55,183,216, 41,138,209,
+ 70, 95,174,141, 66,251,166,255,114, 27,133,150,103,255,233,231,254,203, 29,198,168,123,248,118,125,131,159, 6, 63,195,139, 3,
+ 70, 95, 10, 47, 78,106, 3,194,208,190,201,104,163,208,114,206,246,115,223, 10, 63,195,183,214, 95,158,154,165, 84, 43,216,219,
+217, 0,182,146, 51, 69,180, 71,195,209,117, 45,250, 6, 77,219,237, 18,218,246, 50,248,105,240, 83,111, 31, 48,190, 77,251, 28,
+208,203, 67,203,124, 6, 63, 13,126,218,226,192,127,185, 47,105,125, 19,223,226,125,107,251,172, 47,102,175,245,173,160,104,163,
+156,225,219,173, 13,126, 26,252, 12, 47, 14, 24,125, 41,188, 56,105, 72,159,140,190,244,245,247,165,240, 45,225,151,165,102, 0,
+ 45, 13,126, 27, 31, 96,248,118,200, 96,252,156, 92,219,148,138, 73,239, 43,236,228, 55,218, 72, 47, 3,245,229, 51,248,169,143,
+ 79,122,115, 25,252,212,203, 41,125,249, 12,126,234,227,147,222, 92,223, 10, 63,245,214,231,107,205,103, 87,117,248, 57, 11,172,
+167,113,233,243,227, 71, 36,198,164,170,137,164,181, 93, 89,139,102, 18,208,232,132,208, 14,251,153,120,142,196,107,142,142, 32,
+154,240, 33, 68,255, 96,202,206,181,192,115,238, 12, 82, 19,119, 15,209,117,130,101,226, 53, 91,187,135,130,104, 98, 23,139, 23,
+118,220,209, 27,178, 86,122, 9,255, 87, 12,254, 60, 17,187, 94,170,217, 40,176,195,186,195,239, 88,139, 10, 21, 42, 60,100,226,
+185,206,134,213,226,167, 61, 50, 69,210,164, 76,126, 57, 89, 82,132, 72, 10,185,117, 59,136,230,180,106,166,145,211,171,155, 62,
+ 50,241, 92,171, 76, 14,242, 59, 91,206,130,216,157,181, 0,238, 46, 24,162,100, 11, 18, 3, 45, 91, 31, 33,104,194,127, 78, 51,
+180,215,118,248,178,186,197, 95,254,215, 42,179,213,125,103,203,169,135,188, 65, 83, 15,151,244,231, 49,248,169,159, 87,122,114,
+ 26,252,212,195, 37,253,121,254,203,252,212,207,165,127,107,206,172,137, 77,201,225,164,179, 59,194,205,120,240,151,255, 53,234,
+ 26,172,195,252,144,213,244,161, 98, 38,147, 48, 85,205,108,250, 8, 31, 51,211,225,167,196, 29, 65,171,221,225,180,209, 29,129,
+139,221, 27, 54,108,184, 17,215,135,128,110, 25, 36, 91,110, 4,108,117, 66,250,123,105,130,180, 21, 14, 28, 63,210,199, 12,131,
+ 96, 51,254, 27,163,218, 99, 43, 52,227,126,109, 13,204, 99,203, 55,140, 37,205, 32,159,135,200, 47,117,235,214, 61,142,116, 66,
+ 77, 8, 83,113, 2,161, 62, 60,241, 59, 25,191,245,113, 93,241,230,142, 56, 19, 69, 38,102,136,106, 25,116, 55,136, 38, 1,214,
+177,197,243,229,228,234,229,114,104,238,140, 96, 62, 21,183,253,222, 83,182,255,218, 85,118,253,250,203, 11,220,216,133, 52, 30,
+113,204,154, 33,106,188, 26, 90,195,146,197, 14, 63, 64, 2, 44,214,155,129, 79,225,191,230,161,206,126, 24,154,143, 58,122,209,
+130,121,223, 61,187,123, 89,110,157,130, 39,243, 52, 46,111,241, 46,130,101,245, 80,104, 78,251,222,148,140, 0, 75, 46, 44, 17,
+166,105,213, 77,159, 38, 84, 10,234, 51,101,145,133,126,174,152,120,174,228, 7,208, 10, 80,243, 43,224, 12,215, 2,137, 58, 83,
+206, 14,112, 54,136, 40, 65, 74, 68, 13,185,127,255,190,192, 55,208, 45,208,177,222,169, 21,140, 38, 66, 21, 45,111,222,250,151,
+ 19, 27,183, 31,189,116,244,244,181, 91,107, 54, 31, 58, 86,183,113,203, 67,188,174,147,151,204,230, 76, 57,245,146, 53,104,234,
+229,148,190,124, 6, 63,245,241, 73,111, 46,131,159,122, 57,165, 47,223,127,153,159,250, 56,244,117,230, 10,189,123,135,252, 41,
+ 76, 49, 51, 39, 54, 53,206,238, 18, 97, 91,187,170, 57, 63,237,251,179,163,188,216, 63, 73,246, 77,107, 43,221,106,231,250,196,
+235,188,207,124, 54,234, 30,172,195, 16, 96,169,147,104,251, 66, 38, 57,113,226, 4,163,205,186, 91, 39, 4,176,118, 71,216, 31,
+119, 68, 77, 95, 3,154,214,254, 81,172, 59, 97, 39, 58,254, 67,108, 63,197,243,182,189,131, 65, 88, 17,210, 7,177, 21,211,249,
+129, 38,165, 92,150,135, 93,160,117,238,220, 57,177,145,182,156, 63,127,190, 51, 0, 93, 38, 18,201,130,232,246, 19,127, 40,254,
+198, 60,178, 37,157,230,169, 71, 48,160,117,114,213, 50,233, 18,219,164, 36,203,227,207, 98,217,100,113,149, 34,207,214,213,175,
+184, 3,215,199, 34, 53, 1, 48,200, 73, 34,217, 76,166,188,173, 18, 70, 60, 99,139,166,173,126, 70,160, 69,218,116,224, 87,167,
+ 78,157,151,112,104,248, 8, 78, 96,181, 12,242, 66,243, 81,151,217,182,114,214,199,171,123,151,201,222,233,157,101, 70,207, 31,
+ 37, 70,180, 40,151,173,203,105, 13,180,166,215,136, 40,201, 99,155, 38, 5,230,219,195, 32,200, 76,248,191,135,215, 92, 19,154,
+ 90, 77,171, 30, 33,168,143,132, 2,104, 69,133, 79,157, 89, 11, 22, 44, 80, 88,204, 96,185,244, 74, 77,224,141, 48, 43, 2,231,
+144,234,187, 67,180, 17, 37, 87, 4, 89,175, 94,189,121,127,239,230,189,151,191,118,255, 99,219,244,249,155,118,236, 62,114,241,
+ 88,141,186,141,246, 57, 33,217, 10, 13, 63,181,134, 13,131,166, 22,135,156,187,111,240,211, 57,126,105,229, 54,248,169,197, 33,
+231,238,255,151,249,233, 28,167,254, 13,185, 33,185,154,223,182,114,230,247,123,167,182,150,151, 0, 87,190,199,103,133, 72, 79,
+118,141,147,141, 35, 27, 74,211, 50,233,222, 51,191, 3, 0, 99,178, 6, 90, 23, 47, 94, 84,128,214,176, 26, 46,239,250,150, 50,
+ 9, 19,207, 17, 40,215, 29,192,200, 29,158,121, 25,217,125,157, 35,154,184,247,136, 82, 28, 61, 7, 3,143, 50,152, 43,159,177,
+ 71,211, 82,117,136,216, 95, 31, 17,218,228, 56,188, 14, 31,171, 89,179, 38,211,209, 26, 53,106,140,199,255,186,248, 77, 77, 26,
+208, 71,185,244, 42,144,213,203,188,124,226, 39,255, 58,233, 44, 29,101, 6, 3, 90, 7,103,255,101, 19,104, 45,172, 84,232,201,
+218,186,229,183,109,109, 89, 99, 12,234,208,136, 33,187, 2,233,166,110,149, 53,195, 83,255,153,191, 19, 24,134, 0, 6,214,253,
+ 11,129,106,179,244,234,213,203,155,188, 0, 95,229,233,211,167, 74,104, 23,120,145, 14, 38,217, 2,241,220, 3, 83, 70,154,166,
+135,166,141, 62,156,160, 84,177,130,175,166,140, 26, 40,222,247,175,202,145, 5,191,201,154,161,205,101,116,171, 74, 18, 45, 74,
+164,187,182,104, 82, 21, 72, 41, 21, 65,214,145, 5,125, 5, 97,151,200,163,214, 72, 7,125,124,124, 16, 8,218, 71, 13,212,155,
+ 18,241,196,188,119, 76,235, 36,204,203,103,172, 84,141, 90,131,143, 11,188, 89, 31,193, 33, 12,199, 66,207,206, 12,205, 1, 47,
+223,126,136,213, 23,112,249,242,101,233,221,187, 55,129,176,101, 16,236, 32,154, 84, 19,174,219,122,228,220,253,219,247,189,175,
+ 95,188,241,120,252,200,217, 91,199, 79, 93,181,118,197,230,195, 27,151,173,223,179,138,247,109,125,211, 97,228,167,222, 97, 66,
+171,238,122,233, 88,230, 51,104,134,134,107,246,159, 49,248,105,240, 51,188, 56,240, 95,238, 75,118,121,136,185,177, 16, 82, 85,
+254, 50,147,229,127,139,115,229,190,213,255,194,248, 95, 36,240, 89,222,103,226, 53,149, 94, 21,156,107,153, 44,233,105, 91,199,
+ 66, 13,119,119,119, 5, 32,168,191, 42, 69, 0, 39, 5,191,124,120,126, 93,252,174,108,177, 9,180,222,157, 95, 45,143,142,173,
+144,163, 75, 6, 8,243, 59, 42, 13, 85,135,141,243,152,132,210,172, 95,190, 75,240,254,216,177, 99, 59, 9,170, 8,176, 84, 73,
+ 87,183, 98, 38,198, 0,219, 58,114,228, 72,247,133, 11, 23, 18,104, 49, 57, 58,188,222, 28, 63, 36, 71, 93,130, 75,138, 44,129,
+ 23, 39, 89,132,246, 17,196,111,147, 57,115,230,176,140,180,195,178,123, 32,134,216, 30, 74,177, 16,175,235, 20, 50,217,117, 12,
+136, 73, 54,118,147,244,201, 47,249, 45,159,104,246,111,150, 91,188, 75,199,176, 89,127,170, 14, 45,143, 81,153,147,203,212,194,
+153,101,126,197, 2,143,113,125, 43,210, 40,164, 6, 72,140,116,111,130, 75,222,120, 53, 83, 36,190,246,126,197,164,119,254,109,
+139,106,122, 57, 39,200, 66,240,223, 23, 12,140,123,235,214, 45, 97,192,218,237,219,183, 43,129, 97, 75,150, 44, 25, 4,180, 80,
+222,100, 45,179,166,243,242,159, 61,216, 18,188,233,233, 64, 74,158, 40,145, 34, 77, 61,190,125,149, 92,219,191, 82,142, 45, 27,
+ 41,139,127,107, 36,157,107, 22, 49,199,139, 25,253, 61,110,151,179, 71,168, 99, 9,147, 91,214,244, 73,175, 48, 48, 57,131,182,
+254,244,211, 79, 74,156, 54,198,123,131, 20, 78, 32,185,164,170, 83,118,237,218, 37, 84,247, 85, 40, 85,224,109,181,236,166,130,
+186, 11,134,144,148,144, 84, 62,102,221, 73,127,231,206,157, 10,200,226, 47, 64, 22,249, 55, 31,161, 53,222, 49, 0, 51,222, 75,
+245,110, 8,155, 58, 60,127,241,220,149,123,247, 38,140,152,181,107,193,212,165,187,214,172,218,190,107,189,199,177, 77,235, 60,
+142,175, 56,122,250,198, 58,222,183, 46, 79, 88,249,233, 68,253,140,172, 6, 7, 12, 14, 24, 28,248,215,115,192, 30, 22, 97,197,
+ 9,144,254,254, 81,128, 82, 5,171,255,202, 61,139,251, 65,255, 49, 7,244, 83,243, 90,230,225,117,254, 71,108,224,165,184,239,
+ 22, 14,204,117,172, 58,212, 2, 90,239, 79, 47,150, 79,239,188,229,147,207, 19,241,187,181, 87,222,157,156, 47,239,174,110,147,
+231,215, 14,203,149,189, 75,101,237,144,218,178,118,112,109, 77,160, 21, 88,145,157,148,100, 1, 76, 41, 9,193, 81, 67, 0,173,
+ 46, 93,186,108, 5, 19,220,161, 2,210, 5,180, 94, 31,216, 21, 12,104,157,206,159, 86,110,116,110, 46,148,110, 12, 29, 58, 84,
+ 58,117,234, 36,221,187,119, 87,128, 22, 65, 8,202,225, 16,104,193,206,107, 31,129, 86,179,102,205, 8,180,108,198, 59, 43, 99,
+ 50, 69,174,156, 40,206,238, 55,243, 71,249,153,187,148,147, 87, 0, 89,231, 11, 69,213, 5,180, 38, 23,200, 36,243,202,229,123,
+184,178,102,233,205,104,224, 17, 72,245,144,148, 56, 85, 0, 89, 81, 74,199,137,177,239,229,220, 17, 62,230,222,213,228, 85, 25,
+219,224, 13, 0,165, 29,210, 35,128,148,139, 42,200,186,121,243,166, 98,147, 6, 67,248, 39,148,100, 33, 61,130,125,154,130,178,
+139,162, 30,223, 39, 77,112,230,221,178, 9,239,252,219, 20,214, 4,111,182, 58, 93,146, 92,181, 42,167, 73,158, 88,214,143,106,
+ 41,139,251, 55,144, 42,168, 7,242, 85, 65,210, 19, 19, 45, 21, 0,225, 83, 74,217, 40,113, 34, 40,100, 64,101, 6, 6,126,241,
+ 2,193,160,159, 60, 81, 64,214,224,193,131, 73,211, 86,204, 59,123,223, 65, 74, 72,155,158, 80,130, 71,122,155, 54,109, 10, 38,
+201,186,114,229,138,180,107,215,206, 31, 15, 87, 3,200,186,138,120,125,135,112, 30,217,154, 88,198,140, 25,215,159,186,112,227,
+218,138, 13,251,246,241, 75,126,243,236,180,130,141, 15,157,186,182, 97,235,174,163,203,120,223,242,153,240,224,103, 56,124,216,
+ 6, 9,131, 3, 6, 7, 12, 14,252,107, 56,160, 7,104,169, 96,202, 18, 52, 89, 3, 44, 75, 16,102,153,223, 82,170,101,249, 12,
+174,219, 10,196,237, 44, 95, 53, 37, 90,101, 88, 65, 36,224,135,255, 31,170, 68,235,229,162, 90,242,114,201,143,226,123,104,162,
+124,244,190, 45, 18,240, 73,238,156,218, 33,235,134,213,149,201,245,147,201,164,186, 73,100,213,239, 85,245, 2, 45,197, 38,203,
+ 50,192,240,128,239, 19,190,163, 36,139,233,151, 82, 49,222,171, 64,107,254,252,249,186,128,150, 42, 45,162, 84,203, 82,178,197,
+232,235,109,219,182, 85,128, 86,143, 30, 61, 20,160, 53,109,218, 52, 77,160,245,195, 15, 63,236, 39,208,106,210,164, 9,131,251,
+ 70,183,193,237, 8, 5,163, 71, 89,241,120,114, 63, 95,243,192,134,242, 6, 96,232, 98,225,104, 1,195,211, 68,218,104,171,101,
+172, 37, 90,115,202,228,185,191,162,122,201, 77,155,154,254, 48, 12,101,175,139,164,216,122,241,200, 23, 37,202,178,123,227,123,
+189,254, 48,162,165, 66,247, 82,225,104, 4, 9, 33, 14,128, 44, 47, 26,189,243,160,186,144, 32,107,253,250,245, 2,155,172,199,
+148,112, 89, 61, 16,177, 80,204,104, 27,159,255, 53,200,199,220,167,134, 66,215,217, 30, 68,144,213,250,151, 33, 31, 79,120,122,
+ 74, 42,151, 68,242,107,131,210, 1,153,147, 39,244, 5, 29,103, 2, 88,231, 65,217, 46,180,105,211, 70, 90,183,110, 45, 83,166,
+ 76, 81,108,180,198,143, 31, 47, 77,155, 54,149,234,213,171,251, 71,139, 22,109,180, 19,101,139,133, 32,184,231,104,139, 69,144,
+181,118,237, 90, 89,188,120,177, 34, 25,179,150,100,129, 95, 84,109,114,135,104, 8,144,197,247, 33,190,226,247, 61,122,255,118,
+227,214,189, 39, 55,119, 30, 62,191, 99,211,182,125, 39, 46, 92,189,187,243,250,157,199,123,234,214,111,124, 6,247, 45,227,137,
+ 89,240,179,122,168,248,233, 68, 29,141,172, 6, 7, 12, 14, 24, 28,248, 79,112,128, 24,196, 22, 22, 97,229, 29,129,167,191,111,
+ 43,146,174, 32,169,151,122,205,242,215, 34, 95, 89, 85,162, 21, 40,241, 82, 54,100,125,246,195, 90,109,200, 23, 6, 3, 90, 4,
+ 91,129,201,255,230, 30, 5, 92, 89,166,149,191,125, 31,106,160, 69,208,117,240,224,193,173,152,124,183, 18,100,169, 64, 11,106,
+190,112, 7, 90, 52,138, 70,213, 28, 74,180,176, 19,242, 0,129, 86,227,198,141, 9,180,162, 88, 51, 63, 67,244, 56,251, 78,247,
+107,101,254, 48,161,139,188, 45, 27, 75, 46, 21,137,246,225,167, 4, 17, 94, 65,149,100,105,255, 19,244, 24,129,214,218, 95,218,
+202,196,188,233,101, 86,169, 92,119,209, 25, 54, 34, 13, 65,170,131,148, 81,205,152, 62,122,220,157,199,251, 52,247,255, 48,181,
+ 23,232,198,150,203, 69,162,189,239,146, 52,162,165, 61, 85, 16, 77, 72,178,188,168, 38,187,113,227,134,156, 61,123, 86, 49,244,
+167, 36,203, 6,200, 50,177,188,231, 7,181,247,255, 48,166,157,188,253, 46,166, 66, 87, 79,135, 74,146,187, 86,137,148,121,107,
+251,166,202, 95, 87, 90,116,250, 93, 32,125,148, 86,221,134,127, 32,232,138, 19, 61,234, 60,208,208,218,117,106,239, 53, 4,175,
+223, 99,135,169, 60,126,252,152, 0,139,109, 66,209, 45, 37, 99, 76,220,117,202,128,185,142, 34,199, 71,140, 26, 53,234,198,147,
+ 39, 79, 42,234,194,205,155, 55, 43, 32,139, 54, 89, 0,212, 1,148,100,193, 30, 76, 83,146,101, 89, 64,184,116, 24,190,113,243,
+142,203, 23,111, 60, 56,190,193,227,224,166,219, 15,158,238, 94,176,120,249, 33, 92,167, 77, 89,208, 17, 90,126,234,225,185,145,
+199,224,128,193, 1,131, 3,255,101, 14,216,194, 34,228,135,181,170,208, 22,168,210, 2, 90, 22, 18,173, 74, 54,128, 89, 88,217,
+110,173, 58, 76, 17,130,160, 51, 64,139,170, 67,107,160,181,162,127,101,221, 64,139,118, 89,150, 18, 45,158, 95,186,116,201, 29,
+ 0,203,157, 42, 67, 53,205,154, 53, 75, 23,208,122,190,102, 73, 48, 73,150, 42,217,178, 37,209, 26, 55,110,156, 38,208,170, 86,
+173,218, 65, 2, 45, 0,129,201, 96, 84, 48,137, 77, 44,151, 44,141, 54,182,169,243,233,195,236,129,242,174, 66,124,185, 92, 56,
+218,187,186,113, 35,188,176, 7,178,200,104, 2,173,117, 29,127,146, 25, 37,179,223, 94,242, 67,177,245,104,224, 65, 72,181,144,
+210,171, 13, 17, 59, 89,230, 31,215,180,172,249,233,195,252, 97,242,190,114, 66,185, 82, 56,218,155, 26,177, 35, 60, 7, 93,155,
+ 72, 27, 54, 77,237, 32,189,122, 4,247, 18, 47, 9, 86,182,108,217, 66,195,247,123,214, 13,203,242,186,255, 92,239,211,135, 25,
+191,202,187,242,113, 41, 33,123,219, 46,145,109,240,102,249, 44, 65, 86,182,210,205,222,238, 63,116, 84, 8,102, 0,132,165, 73,
+135,129, 66,144, 21,214,222,136,231, 59,129,199, 31,174, 95,191, 46,247,238,221, 83,212,157, 89,179,102,189,141,235, 93, 1,106,
+ 30, 80,234, 72,233, 20,252, 96,205,119,240,174, 63,160,122, 22,244, 37,217,189,123,183, 2,178,248, 75,169, 37,158,153,223,161,
+ 67, 7,197, 38, 75, 75,146,101, 73, 31, 82,171, 24, 63,148,207,228, 63,248,247,150, 31, 26,215, 47,246,126,242,248,254,254, 53,
+171,228,216, 14,240, 26, 4,182, 21,126,182,175,239, 52, 63,195,129,103, 6, 9,131, 3, 6, 7, 12, 14,252,235, 57,160, 7,104,
+217, 2, 94,196, 98,127,227,177,255, 75,182,248,223,158,141,150,154, 63,240,126,249,207,192, 88,173, 29,255,127,191,210,158, 68,
+235,237,190, 49, 33,128,214,242,126,149, 52,129, 22,141,225,219,193, 16,158,198,239, 84, 23, 90,130, 45,107,160, 53,108,216, 48,
+119, 24,176,235, 2, 90, 79,151,204,118, 8,180, 58,119,238, 28,164, 58, 28, 61,122,180, 38,208,194,142,194,195, 0, 90, 91,232,
+ 39, 11,108, 8, 50,156,142,159, 44, 75,153,145,227,255,124,250,242,222, 29,185, 95, 41,133,156, 43, 18,253,125,229, 88,145,222,
+ 58, 2, 89, 65, 64,235,231, 38, 55,225,198, 97,237,218,250, 21, 6,160, 35,212, 64, 74,171, 54,108, 12,151, 76,133, 7,143,154,
+252,244,213,189, 59, 1, 15,127, 72, 45,231, 11, 71,127, 95, 41,102, 36, 31,123, 32,203,178, 67,192,133,131, 23,119,238,173, 88,
+177,130,134,239,193,128, 86,176,242, 86, 76, 38,103, 80,222,138, 49,181,203, 75,144,149,189, 76,243,183, 7, 14, 29, 19,184,217,
+ 80, 64, 15,124,156, 73,210,156, 53,157, 86, 57, 90,119, 94,248, 72, 27,212,191,127,127,197, 30,139,146, 56, 2, 95, 74,159,232,
+130, 1,109,174,236, 22,196, 38, 9,249,237,183,223,248, 46, 26, 43,218, 58,106, 83, 37,204,227,232,209,163,193, 36, 89, 87,175,
+ 94,117, 90,146,165,190, 0, 64,171, 76,231,246, 13, 32, 33,123, 41,111, 94, 94,145, 27,231,231,237,169, 94, 57,215, 32, 24,194,
+199,103,158,208,242,243, 51,124,192, 6, 73,131, 3, 6, 7, 12, 14,252,167, 56,128,225, 62,180,187, 14,249, 28,119, 25,170, 59,
+ 14,131,140,233, 3,175,241,126, 8,205, 85, 56, 48,215, 57,160,229,179, 99, 96,144,218,144,234,195, 55,155,123, 4, 3, 90, 51,
+ 91,101,145,101,125, 43,104, 2, 45,107,247, 14, 30, 30, 30, 59, 33, 45, 81,164, 91, 42,208,130,241,186,251,220,185,115,221,199,
+142, 29,235,158, 47, 95, 62, 2,173, 1, 26, 21,126, 64,195,106, 30,199, 82, 69,181,105,163, 69,160, 5,131,113, 25, 56,112,160,
+ 12, 26, 52,136, 19,248, 3, 71, 52,233,194,129,126,178, 0,180, 20, 23, 14,249, 51,103, 28, 90, 34,127,238, 7, 21, 42, 87,243,
+127,239,247, 33,224,226, 93, 31,153, 60,108,138,119,201, 56, 49, 63,164,141, 25, 95,211,112, 27, 18,173,235, 40,222,106,164,223,
+144,170, 33, 41,116,243,101,206,248,107,241,124, 57,238,148,173, 80,205,223,223,252, 49,224,242,189,183, 50,117,200,148, 87,101,
+ 98,199,248,144, 58,102,130,142,122, 26, 26, 64,171, 29,141,222,185,187,176,120,241,226,205,173,203, 75,186, 44,239,164,161, 83,
+ 94,148,140,173, 93, 94,130,172,156,223,181,120,123,232,200, 9,238,254, 84,236,190, 40, 41,154,191,116,173,164,204, 91,135, 54,
+ 89, 97, 57,162,163,188,239,233,211,140, 18, 56, 72,175,184, 35,114,114,193,130, 5, 63,112, 21,131,126, 32, 27, 55,110, 36, 96,
+ 52,227,250, 32, 36,155,246, 84,240,135,181, 5,198,243, 1,164,179,100,201, 18,165,124, 4,111,200,175, 72,178,224,135,205, 41,
+ 73,150,101,133,220, 92,211,200,206,245, 3,197, 99, 85,159, 61,203,254,108, 48,200,213, 53, 85, 25,203,246,119,150,159, 97, 97,
+150,241,172,193, 1,131, 3, 6, 7, 12, 14,124, 51, 28,208, 86, 29,218,170, 10, 36, 90, 87, 38,247,255, 73,222, 62,188, 36,254,
+215,119,200,235,245,237, 21,192,245,106, 69, 83, 5,104,205,108,153, 89,214, 96,183,225,236, 94,223, 75,173, 2, 73, 9,180,174,
+ 56, 98,137, 53,208, 90,185,114,229, 78, 24, 67,187, 15,174,154, 56,200,143,214,175, 21,227,189,131, 90,201, 29,146, 15,122,227,
+174, 97,111,178,181,120, 79,107, 55, 55, 55, 63, 78,212,183,122,255, 44,103, 75,102, 83, 64, 23, 15,170, 14,233,183,169, 79,159,
+ 62, 10,200, 2,128,146,216,177, 99,211,181, 65, 48,155, 27,235, 50,195, 95, 86, 61,213, 25,169, 91,198, 84, 85,218, 53,172,243,
+250,238,185, 19,178,121,234, 48,233, 57, 96,194,167,153,238,151,189, 83,100, 43,123, 39,102,138,172,249,244,116, 1, 0,173,149,
+ 40, 78,127,164, 31,144,148,221, 13,217, 50,164, 41,215,186,110,205, 87,164,187,105,234,112,233, 51,108,106,192,220,205, 87, 95,
+166,201, 85,238, 78, 12,151,108,150,134,215,122, 94, 17,148,199,186,188,221,126, 27,247,105,198,198, 75,207,147,103, 45,173, 89,
+222,164,217,107, 23,207, 95,161,245,219,195,199, 60,101,205,154, 53,220, 28, 33,123,247,238,149, 5, 75,215, 73,218, 66,245,125,
+ 8,194,156, 42, 76,200,204,241,105,143, 69, 55, 12,216,112, 64, 96,164, 74,245,178,197,138, 21,107, 39,182,217, 62,130,141,213,
+ 30,178,199,209,123,146, 36, 73,242,138,237, 11, 63,107,138, 77, 22, 64, 86, 64, 88, 36, 89,234,187, 40,209,234,244,115,125,241,
+123,231,181,231,245,139,203,131, 78, 31,232, 91, 38, 44,252, 12, 35,175,140,199, 13, 14, 24, 28, 48, 56, 96,112,224,223,206,129,
+ 50,144, 40, 32,212, 78,187,156,169,162, 62, 94, 56,186,179,188,185,113, 72,222, 29,155, 33,175,215,182,145, 77,127, 52,151,205,
+ 83,186, 74,251,170, 57, 37,155, 75,132,199,204,199,252, 86, 60, 9,230,120, 45, 88, 8,158, 44,166, 15,200,219, 31,246, 47,235,
+ 58, 21,254,191, 31, 45,158,227,250,207, 72,113,236,240,215,150, 51, 55, 26,157,205, 44, 80,160,192, 71, 74, 55, 46,215,171, 32,
+ 39,179, 37,145,142, 29, 59,202,128, 1, 3,104,212, 46, 73,147, 38,101, 24, 30, 26, 88,135, 52, 80,179, 10,155,162, 58, 35,133,
+ 55,240, 4, 5,179,187, 61, 62,179,115,163,236, 91, 56, 89,230,116,170, 35, 69,114,103,127,150, 60, 91,233,211, 58, 64, 86, 80,
+ 57, 17,191,144,126, 60,232, 20, 77,121,119,230,204,137,227,228,207,230,246,240,244,142,141,178,127,209, 84,133,110,209, 60, 57,
+158,167,206, 94,246,146, 6,200,114,232,200,206,102,121,115,101,123,150,204,173,248, 41, 7,229, 13,162,153,177,112,253,245,247,
+ 31,122, 41,234, 56, 26,151,211,171,250,194,229,235, 1,178,234, 57, 11,178,236,149, 51, 62, 54, 26, 8, 65, 17, 92,104,176,157,
+227, 59,241, 13, 89,210, 92, 71,176, 70, 59, 58, 75, 73,214,171, 87,175,156,149,100,133, 40,167,107,134, 84,163,106, 87, 47, 53,
+168,211,207, 63,150, 9, 43, 63,157,168,155, 86,214,255,178, 3, 67,163,238, 90,189,195,185,251, 6, 63,157,227,151, 86,110,131,
+159, 90, 28,250,239,220,231,252, 78,169,150,250, 11,111, 77, 78, 28,185, 92, 76,177, 0,164, 6, 20,206, 16,199,103,237,196,110,
+242,252,228, 42, 25,222,254,123,201,155, 42,154, 15,175,243,190, 19,160,200, 58,107, 44, 75, 73, 23,207, 53,138,230,168, 99,211,
+ 23,213,234, 54, 37, 10,203,217, 54, 13, 20,215, 14,176,175, 33,189,213,196, 55, 14,232, 6,163,137,103,162,231,200,148,238,151,
+188, 89, 92, 31,204, 31,209,247,211,246, 63, 71, 40, 96,136, 41, 79,230,244,214, 94,229,237,145,253, 63,128,201,152,241, 59, 72,
+ 97,146,101,207,158, 61,106,150,140,105,218,230,201,156,241,254,236,161,189, 63,238,152, 49, 42,136,110, 94,125,116,109,214, 61,
+140,229, 13,162,153, 44,119,205, 66,173,123,142,121,239,245,228,153,208,201,235,162, 21, 27, 66, 3,178,200, 15,187, 64,139,146,
+ 44,238, 94,164,195,210, 48, 0, 45, 55,196, 46,188, 50,117,234, 84,185,118,237, 90,168,109,178,236,149, 19,234,205, 28,104,255,
+ 46,161,108,127, 99,224,117, 98,108,209,145,213,224,167, 14, 38, 57,145,197,224,167, 19,204,210,145,213,224,167, 14, 38,253, 71,
+178,168, 54, 89,214,191,206, 85, 63,163,139, 41,105,230, 36,166,105, 89,147, 70,120,199, 95,254, 15, 3, 40, 10,122,212, 82,210,
+197,243,112,160, 73, 23,253,244,105,197,164,184,235,119,134,102, 46,215,116,215, 58,214, 42,255,110,197,176,110,178,122,104, 23,
+ 5, 12,141,105,241,189,148,207,159,205, 59,159, 91,198,225, 90,196, 2,239,135,248, 0,115,102, 74,119,177,125,141,114,111,151,
+ 15,237, 42,107,134,253, 34,115, 59,255, 40,227, 90, 86,149,138, 5,115,188,204,155, 37,195, 56, 29,116,109,126,212, 97, 44,111,
+ 48,154, 84, 15,182,233,245,199,251,219,119, 31, 74,134,194, 13,156,149,100,169, 85,176, 55,248, 68,201,157, 59,247, 51, 26,187,
+231,204,153,147, 42, 92,103, 12, 16,173,105, 70,131,173,214,104,134,215,161,211, 83,103,118, 23, 90,240,249,179,243, 83, 71,155,
+234,201, 98, 12,230,122,184,164, 63,143,193, 79,253,188,210,147,211,224,167, 30, 46,233,207,243, 95,230,167,126, 46,125,125, 57,
+ 67, 31, 84,218, 86, 93, 92, 93, 77,209,116,214,241,155,236, 48,185,220,210,123,230,203,230,250, 36, 63, 83,150,140, 94,121, 51,
+103,184,147, 63,107,134,253,153, 51,166,114,198,181, 65, 72,160,229,150,254, 92,254,172,174, 79, 11,100,203,244, 12,116,159,130,
+238,253,124, 89, 50, 28,207,153, 49, 93,205,176,240, 51,140,229, 13, 81,206,100,217,107, 23,204, 90,178,233, 50,218,108,233, 44,
+151,117, 54, 71,237, 94, 9,129,159, 87,224,129,239,156,164,109,143,102,161, 42, 85,170,220,182,231,241,221, 25,128,173,230, 13,
+111,126, 58, 89, 79, 91,217,191,201,239, 40, 28,234, 77, 18, 70,221,195,137,145,246, 22,128,225, 64,222,104,163,112, 96,162,214,
+ 2, 48,140,175,248, 86,218, 40,140,213,252,111, 62,254,173, 52,174, 81,206,240,237,159, 95,154,159,116,193, 97,115,135, 98,104,
+128, 86, 24, 89,241,165,235, 30,218,226, 26,229, 12, 45,231,108, 63,103,240,211,224,103,120,113,224,191,220,151,194,139,135,255,
+ 4,157,240,149,104, 57, 81,131,255,114,135, 49,234,238, 68, 71,209,145,213,224,167, 14, 38, 57,145,197,224,167, 19,204,210,145,
+213,224,167, 14, 38, 57,145,197,224,167, 19,204,210,145,245, 91,225,167,142,170,124,155, 89,216, 0,182,146, 51,181,177, 71,195,
+209,117, 45,250, 6, 77,219,237, 18,218,246, 50,248,105,240, 83,111, 31, 48,190, 77,251, 28,208,203, 67,203,124, 6, 63, 13,126,
+218,226,192,127,185, 47,105,125, 19,223,226,125,235, 93,135,250, 28,150,134, 67, 77,191, 21, 20,109,148, 51, 28, 26,219,130,132,
+193, 79,131,159,225,197, 1,163, 47,133, 23, 39,255,166, 99,240,211,224,103,120,113,224,115,244,165,240, 42,219, 63, 65, 39,108,
+187, 13,195, 80,226,207,209, 16, 6,205, 48, 52,136,141, 71, 13,126, 26,252, 12, 47, 14, 24,125, 41,188, 56,249,239, 2, 69, 12,
+ 34,207,100,239,176,117,223,232, 75,255,205,190, 20,190,181,254,178,212,194,213, 70,203, 13,101,103,210,115,132,246, 99,233, 4,
+111,234,231,224,212,242, 19,188,180, 75,217,178,101, 7, 89,188, 44,136,102,169, 28,145, 79,124,151, 43,178,215,255, 83, 20,175,
+239,114, 71,247,250, 46,111, 76,175, 82,121, 98,158,208, 83,192,192, 60,161, 45,167,163, 87, 24, 52,181, 27, 32, 93,204,120, 73,
+207,198, 74,144,252, 74,244, 56,137,174, 68,137, 30, 7, 41,118, 80,138, 20, 53,186,135,173,118, 87,175, 37,207, 91, 59,109,146,
+ 92, 53,151, 39,201, 85,163, 36,130, 93, 47,227,111,210, 92,117,150,254,253, 91,123, 73,210,188,181,114,243, 55, 69,254,186,105,
+236, 20,229,155,107, 35, 68, 83,136, 20,150,100,143,159, 41, 83,166,116, 71,132,133, 43,246, 18,190,199,221,218,205,249,205, 75,
+ 75, 74,163,142,231,144,148,224,180, 22,233, 34,206,181,130,206,234,234, 75,101,176,105,163,129,201,212,177,153,201,116,151,137,
+231,188,246, 53,245, 79, 56,119,222,135,246,246,138, 27, 55,238, 13,150,139,191,252,207,235,161, 40,103, 7, 60,227, 27,152,120,
+110,125,216,187,175,139,159, 58,250,164,101, 22,131,166,147, 12,211,200,254, 57,248, 25,190, 37,252,134,168,101, 65, 89,233,169,
+157, 33,113, 30, 23, 42, 84, 72,178,101,203,198, 65,232,113,224, 53,222, 99, 30, 91,135,211, 13,129,208, 59, 99, 39, 77,154, 36,
+ 1, 1, 1, 65,161,116, 16, 14,103,144, 5,241, 32,154, 4, 88,114,103,143, 28,219,240,167,200,187,231, 72, 47, 68,222,191, 20,
+121,118, 81,190,203, 27,219,203, 9, 30, 91,150, 51,110,194,132, 9, 39, 36, 74,148,232, 33,156,140,122,105, 37,230, 99,126,142,
+ 71, 86,239,211,172,123,236, 88,209, 63, 68,143, 30, 37,192, 86,226, 61, 27,229, 15,162,137,247, 30, 98,217, 48,248, 5, 75, 46,
+ 46, 46, 94,106, 74,150, 44,153,151,101,130,135,122, 47, 38, 60,103, 9, 66, 29,149, 51, 70,196,200, 81,251, 70,138, 18,123,119,
+164,104, 49, 31, 69,138, 22,235, 81,228,104,113,118,243, 26,202, 22,195, 1,127, 53,235,142,103,211,165, 72,227,122,239,143, 25,
+171,165,105,151, 33,114,249,218, 77,105,209,249,119,185,122,227,182,116,232, 61, 92,249, 37,232,178,213,238,234, 53,151,188, 13,
+150, 76,156,189,246,133, 75,222,250, 15, 39,206, 94,163,252, 78,154,179,238, 57,174, 63,224,111,178,188, 13,238, 77,154,189,246,
+185, 75,190,134,139, 66,219, 63, 27,101, 78,249,182,113, 70,151,143,182, 18,239, 57,106, 35, 39,250,159, 86,214, 32,126,170, 32,
+ 11,238, 44,232,117, 88, 26, 87,204, 63,114, 92,151, 26, 29,109,165,126,117,243,143,172,155,195, 36,141,242,197,204,175, 62,103,
+143,159, 25, 51,102,188,244,241,227, 71, 4,212, 54,203,251,247,239,133,129,202,233,105, 31, 33,178,148, 0,224,174,174,174,202,
+164,171,113,232,105,247,234,160,113, 26,233, 12, 18,131,182,107, 29,142,104,198,129, 47,181, 1, 8,223,180, 59, 90,180,104, 79,
+152, 16, 98,107, 55,175,129,168,189,200, 18,124,159, 61,154,167, 17, 63, 83,241,203,246,236,217, 51,121,252,248,177,146,158, 62,
+125, 42, 49, 98,196,184, 26, 14,117, 55, 17, 88, 77, 41, 89,242,227, 27,196, 16,245,234,214, 77,250,197,139,247,129,215,244,244,
+ 79,212,207, 3,229,184,226, 76,226, 51,206,142, 75, 4, 85, 28,124,249,203,103,173,255, 59,209,231, 41,169,242, 85, 7,242, 8,
+ 17, 34,124, 64,152,173,197,136,201, 58, 31,105, 94,209,162, 69, 23,240,154,122,159,121,145, 84,201,151,158,190,164,213,119,172,
+239, 27, 52,157,229,152,227,252,159,131,159,225, 91,194, 47, 75, 45, 84, 54, 89,155,217,241, 9,172, 38, 76,152, 32, 0, 59,242,
+238,221,187, 32,240,195,129,104,219,182,109, 74, 8,148, 28, 57,114, 16,120,241, 35,177,251, 81,151,175, 86,178,115,181, 70, 21,
+132,169,112,201,188, 15,241,241,246, 65,254,136, 86,124,112,109,222,188,185,130,176, 24, 92, 24, 65,157,197,145, 68, 75, 1, 90,
+ 23,151,203,214, 46,105, 69,118,245, 18,153, 91, 80,100, 5, 2,115,111,110, 29,106,160, 69,208, 52,120,240, 96, 37,214,223,234,
+213,171,101,217,178,101,178,112,225, 66, 65,160,107,153, 49, 99,134,140, 28, 57, 82, 24,196,154,201,207,207, 79,225, 9,242,125,
+ 12, 4, 91,150,213, 9,234,132, 69, 11,164, 57, 81,188, 96, 58,175, 98,129,169,104,190,212, 10,208, 33,192, 10, 98,168,213, 9,
+239, 57, 26,208, 0,160,238, 61,135,227, 79,239, 51,103,228,197,201,147,242,226,196, 9,225,255,231,199,142, 32, 29, 66, 58, 32,
+207,143,238,147,103,135,247,200,211, 3,187,228,201,238,237,242,120,187,135,220,199, 0,175, 14,160,129,244,237,125, 44,197,163,
+ 68,139,121,247,167, 78,191,155,103, 44,217, 34,219, 15,156,149, 45,123, 79,203,164,185, 27,165,105,251,126,230,104, 49,227,222,
+197,243,246,252,108,105,126,128,209, 98,197,187,186,118,243, 30,233, 59,116,146, 36,207, 81, 78,146,101, 47, 27, 44,117,234, 59,
+ 82, 11,104, 37,116,201,249,195, 5,176,205, 55, 89,158,186,111,248,155, 92,253,205, 29,252,127,178,156, 63,156, 71, 89, 19, 58,
+226,167,189, 54, 34,192, 82,155,230,201,159,127,202, 3, 4, 37, 87, 15,222,211, 59,233, 16,220,146,239, 90,201, 10, 4,171,228,
+131, 1, 45,128,172, 2,184, 33, 0, 70,236, 35,178,229,175,254,107,229,210,170,153,150,233,244,210,254,107, 9,178, 2,252,222,
+ 4,240,183,105,161,152, 5, 8,182, 44,202, 27,172,141,210,167, 79,127,229,237,219,183,130, 32,239, 74,112,111,235, 4,160,165,
+ 5, 52, 72,218, 86,187,243, 27,159,146, 56,113, 98,246,121, 70,103, 56, 74, 32,195,119, 1, 4,156,197,255,124,241,227,199, 63,
+197, 60, 54,198, 3,123, 52,121,189, 52,162, 3,220,221,181,107,151, 15, 0,161,239,245,235,215,125, 63,125,250,228, 11, 80,228,
+139, 96,232,111, 32,133, 97,255,164,132,202,214, 97,175,127,250, 33, 32,185, 34, 69, 71,188,213,160, 68,160, 85,171,112,148,128,
+118,149, 99,249, 54,251, 46, 38,199,174,106,136,198, 16,223,138,176,102,159,103,126, 74,177, 8,178, 48,168,138,148, 41, 35, 16,
+149, 9,175,233, 41, 39, 1,214,170,117,203,101,227,150,117,178,118,227, 42, 89,190,122,137, 44, 94,190, 64,230, 45,154, 45, 51,
+231,254, 41,211,102, 76,150, 9, 83,198,202,152,241, 35,101,228, 31,195,100,200,240,129, 4,136,214,241,103, 53,203,169, 2,171,
+ 76,153, 50,249,240,156,191,150,192, 75,111,159, 71,190, 96, 64, 11,101, 17,180, 83,192,189,123,247,148,196,115, 94, 51,128, 86,
+ 8,142,106,182,145,157,254,226,232,242,183, 66, 51, 20, 85,251,106, 30, 9,149,234, 80, 56, 32,122,123,123,115, 64,183,135, 7,
+ 20,176,113,254,252,121, 5,144,160,186,214,224, 32,168,113,231,237, 29,211,121,215,227,133,194,228,113,111,190,252, 54,189,139,
+ 64,186, 98,237, 13,125,228,225,195,135,149,213,100,244,232,209,247,130, 94, 60, 71, 31,181,170, 58, 44,157, 51,202,155,138,133,
+226,251,148,206, 25,245, 77, 88, 85,135,148, 80,205,158, 61, 91,126,252,241,199, 96,131,173, 58,240, 54,105,210, 36,216, 36, 68,
+ 0,202, 21, 63,159,179, 55,240, 18, 96, 89, 50,176,106,133, 28,222, 69, 11,164,245, 74,147, 42,209, 39, 94, 39, 88,101,234,215,
+175,159,146, 40, 85,208, 2, 90,224,221, 61,239, 83,167,228,202,196,137, 65,233,218,212,201,114, 99,230, 20,185, 57,111,138,220,
+ 94, 52, 69,238, 44, 69, 90,130,243,133,184, 54,119,138, 92,159, 49, 69, 30,184,111,208, 3,180, 10,167, 74,155,217,123,225,154,
+ 93, 50,115,249, 78,249,174, 65, 95,132,226,169, 43,255,107,239, 42,192,164, 56,154,232, 5,119, 15,110, 9, 36,184,107,128,224,
+ 46,193, 9,110, 65,130,187, 6,185,224,238,238, 16,220,221,221,225, 14,119, 61,244, 56, 28,142, 91,252,174,254,247,134,157,253,
+231,150,221,157,153,227, 32, 33,217,249,190,254,102,119,166,167,166,167,218, 94, 87, 85, 87,125,159,247, 87, 41, 89,175,143,140,
+156,181, 73,198,206, 94, 39, 73, 82,252,248, 24,223,236, 40, 0,182,110,167,142, 24, 57,198,173, 51, 8,197, 83,182, 74, 61,201,
+ 82,176,146, 12, 28, 61, 93, 70, 79,249, 75, 1, 91, 51,230,175,148,125,135,143,187, 4, 90,152,156, 39, 20,173,214, 62, 96,226,
+156,117,150, 98,181,251, 90, 38,206, 93,103, 41, 94, 87, 61,123, 42,255, 75,212,251, 83, 57,151,174,221, 57, 0,245, 51,193, 85,
+ 91,250,168,142, 74,126,168,163,134,105,146, 41,117,196,227, 48, 38, 69,166,144, 0, 45,117,242,114,218,145,172, 55,236, 64,176,
+ 90,100, 27, 63, 85, 73, 22,251, 36,219, 29,128,129, 2,182, 54, 77,237,185, 66, 5, 90,199, 23,244, 92, 65,112, 21,248, 10,128,
+102,215, 32,121,115,109,119,160, 42,217,210,240, 32, 88, 29,161, 61,109,132,218,240, 2, 19, 98, 60,190,192,249,141, 54, 97,178,
+ 13,112,164, 86,180, 83, 41, 58,170,247,241,236,211,254,254,254,130,160,221,143,208,175,222, 1, 16,201,250,245,235, 37,123,246,
+236, 65, 69,138, 20,121,203,254,222,184,113, 99,142, 31, 4, 91,246,135, 35,154, 37, 96, 78,240,200,130,227,221,187,119, 22,140,
+ 83,150,149, 43, 87, 90, 64, 71,249,205,107,144, 68, 89,210,166, 77,251, 16,196, 28, 62,239,100,104,126,237,235,235,251,254,232,
+209,163,114,238,220, 57,185,113,227,134, 34,209,227, 24, 87,191,112,120,145, 77,233,165, 77,229, 68, 50,124,234,218,115,153,178,
+100, 31,207, 88,152,206,248,233,108,232, 39,168,162, 36,139, 32, 11, 31,108, 26,104,109,219,182, 77, 16, 31,214,101,202,147, 39,
+143,252,252,243,207,130,168, 9,186, 64, 11,253, 98, 5, 36,224, 7,180, 9, 82,242,231,221,186,117,123,207,122,226,193, 51,255,
+243, 58,243, 97, 49,176,194, 4,200,108, 73,169, 21, 1, 21, 52, 33, 62, 88, 60, 47, 64, 90,200,244,235,175,191, 46,230, 53,222,
+ 99, 30,208,212,170, 22,117,199,144, 16, 76,175,110,154, 33, 96,154,139, 71, 62, 7, 63,157,190, 14, 77, 49, 39, 18, 36, 41,182,
+ 84, 66,243, 59, 47,126,231,177,254,215, 94,103,126, 94,215, 62,107,255,159,207, 70, 67,130,164, 70,161,205,184,196,113, 67,192,
+ 42,215, 18,173,117,235,214,137,154, 52,196,149, 78,198,112, 41, 28,120, 46, 94,188,168,136,209,169, 86,240,243,243,147,237,219,
+183,203,184,113,227,164, 3, 6,141,142, 29, 59,202,164, 73,147, 84,155, 6,135,229, 83, 37, 90,191,212, 41, 33,127,206,234, 34,
+203,207,205,144,138, 13,202,190,199, 64,173,198, 32, 12,151, 57,115,230, 7,124,231,200,145, 35, 73,139, 42, 6, 67, 7,104,116,
+222,113,202,210,151,103, 67, 15,184,200, 68,192, 68,169, 85,149, 42, 85, 12, 1, 45, 74, 0, 8, 52, 29, 0, 45,219, 91, 56, 97,
+107, 39,216, 43,231,119,203,177,131,139,165, 82,197,114, 10,168,122,252,248,177, 2, 46,239,223,191,175,240,152,103, 39, 64,203,
+ 70,147, 64,139, 82,172, 96, 64,107, 18,128,214,140,241,114,125, 46, 0,214,162,241,182, 87, 18,112,241,218,213,233, 0, 90,107,
+ 86,217, 3, 45,123,110, 68, 14, 27, 33,138,207,140,197, 91,164, 93,255, 57,146,162, 80, 27, 73,148,181,178,141, 86,170,124,181,
+ 36,119,245, 63,165,237,192,133, 50,124,218,106,129,100,203, 7, 4, 92,169, 17, 29,114, 59, 66,164,168,183,106,212,168, 33, 80,
+213, 72,219,142, 93,165,107,223, 97, 50,108,194,108, 5,104, 77,153,179, 76,118, 31,240,178, 7, 90,193,232, 64,154,113, 13, 82,
+ 54,128,172, 62,150,158,131,166, 88,138,212,236,101,233, 51,108,134,242,191,223,168, 57,150, 18,117, 61, 45, 67, 38, 44,176,148,
+109, 52,208,178,121,207,113, 11, 36,142,215, 92,181, 13,251, 58,186,138, 58, 58,126,104,177,252, 89,190,140,248, 33,166,162, 22,
+ 96,241,247,241,100,201,196,137, 68,203,225,107, 84,160,197, 56,143,142, 36, 70,188,206,195, 9,208,210,210, 84, 36, 89,228, 27,
+233,176, 95,158, 57,115,154,146, 53, 81,129,214, 7, 73,214,115,121,177,163,191,220,239, 31, 95,158, 46,168, 33, 79, 87, 52,127,
+195,235, 70,250, 7,213,136, 90,213, 61, 65, 29,193, 6,165, 80, 92,124,177,189,178,141,222,188,121, 83, 0,190,174,184,162, 9,
+190,123,243,153, 93,187,118, 9,192,144,162,142,100, 28, 77, 6, 45,223,188,121,179, 82,255,231,207,159, 23, 72,219, 4,117, 74,
+201,150,222, 17, 3,234,193,219, 40,139, 5, 99,145, 5,101, 81, 0, 22, 37, 89,252,189,111,223, 62, 75,193,130, 5,149,107,120,
+143, 5,106,197,219, 32,104,175,214,119,246,142, 87,215,174, 93,123,199, 96,229, 56, 43,223, 8, 44,167,212, 11, 36, 90,210,180,
+100,148, 87,191, 87, 76, 97,217,236,245,244,237,168,153,155, 47,160,174, 42,233, 21,214,254, 62,213,132, 61, 98,197, 10,164, 36,
+139,169,195, 55,223, 4,186, 80, 29, 6,123,156,210, 41, 74,178,170,254, 90, 73, 41, 19,207,246,233,215, 58,213,164,110,195,218,
+210,184,105, 3, 69,170,229, 64,162, 21,140, 38,198,145, 3, 0,235,151,192,207, 75, 80, 23, 95, 66,253, 92, 2, 47, 47, 33, 78,
+236, 83, 68, 92, 80,144, 22,207,117,234,212,121,230,227,227,115, 9, 82,168, 75,124,198,204,119,103,203,150,109, 38,158, 21, 0,
+171,165,104,179,105,181,137,215,120,143,121,204,208,116,231,253,119,114,192, 9, 22, 81, 62,150, 32,136, 39, 53,105,255, 99, 81,
+209, 67,253,239, 40,159,246,154, 21, 76,217,104, 89,159, 45,199, 51,105, 67,189,189, 16,121,140,218,161,155,175, 8,126,164,230,
+ 41, 27,208, 34,216,210,166, 70,141, 26, 73,211,166, 77,165,101,203,150,210,182,109, 91, 5,104, 17,116, 89, 25,224,242,197, 88,
+141,133, 79,241, 93,138,109, 19,183,141,148, 1,243,123, 11,140,112,123, 89, 31,248,133, 0,139, 7, 1, 23,174, 25,246,244, 29,
+154, 64,139, 42,192,134, 13, 27, 74,235,214,173,165, 69,139, 22,202,119,242, 63, 6, 26, 14, 20,138, 58,147,171, 93,130,171,147,
+ 80,219, 29, 58,116,136,121,222, 57, 80, 29,218,248,144, 55, 71,114,191, 11,167,183,203,234, 5, 61,101,229, 95,221,101,217,220,
+174,178,100, 86,103,169, 80,190,180, 50,113,181,105,211, 70,121, 95,171, 86,173,148,196, 73,215, 8,208,122,136,119,127, 4,180,
+ 0,166, 20,160, 5,112,165, 30, 10,208,154,243, 1,104,221, 94,185,220,229,100, 30, 38, 76,132,110, 53,155,116,125, 51,109,201,
+ 14, 73, 89,184,173,164, 46,222, 81,146,229,168,102,163,149,246,231,122, 82,160,206, 96, 41,210, 96,184, 12,157,185, 89,106, 52,
+233,242, 58, 92,132,200, 84, 3,155, 58, 8,180, 60, 7,141,145,170,144, 28, 82,106,218,162, 77,123,233, 6,176, 69,160, 53, 97,
+230, 98,217,190,247,176, 75,160, 21, 59,118,108, 31, 20,202,178,113,227, 70, 11, 84,216, 22,168,144, 44,187,119,239,182,236,223,
+191,223,130, 58,177, 96,113, 96, 57,126,252,184,229,212,169, 83,202,132,140,213, 56, 1,161,211,227, 67, 29,109,179,213,209,114,
+212,209,210,217, 93,196, 19, 64,235, 22,164,141,246, 64,235, 72,216,176, 82,251,123,135,170, 67,135,239, 32,128, 34,120,129,180,
+225,137,106, 43,167, 61,243, 58,193, 12,175,185, 42,167, 42,209, 2,168, 8, 36, 96, 57,127,254, 92, 32,251,157, 35,137,214,235,
+243,235,130,158,206,175, 42,207,150,214,127,231, 64,162,229,244, 53, 84, 35, 82, 37,238, 76,141,168, 5,138,144,116,233,217,110,
+101,160, 36,107,213,170, 85,194, 68,147, 0, 21,100, 81, 58,131, 58,147,189,123,247, 50,248,251, 27, 20, 40,187, 94, 35,162,253,
+ 21, 0,218, 11, 74,173, 8,172, 32,113, 10, 6,178, 42, 86,172,104,153, 57,115,166, 5,101, 84,164, 90,125,250,244,121, 22, 33,
+ 66, 4,218,108, 25, 57, 14, 1,244,189, 39,200,130,100, 75,233,155,170, 84, 7,124,167,154,211, 3, 42,208, 68,125,134,207, 59,
+186,229,216,243,119,153,179,230, 28,102,132,168, 54, 15, 12,235,194,231,142, 30,253,222,190,149, 43,131, 6,215,173,251, 62,111,
+140, 24, 62,133, 13,142,117, 4, 77, 52,105, 80, 37, 90,236,148, 90,233, 22,108,158, 32, 40, 43, 44, 37, 75,150,148,242,229,203,
+ 83, 10,101, 4,104,237,199,119, 94, 2, 79, 47,161, 94, 46, 1, 12, 95,130,118,226, 18,198,243,171, 80, 23, 43,170, 12,212,241,
+251,126,253,250,249,240, 58, 15, 87, 64, 11, 38, 13,123, 48,166,223,210,166,100,201,146, 5, 64,122,201, 58,182,164, 72,145,226,
+ 30, 19,218,152, 23, 1, 23,129, 22,121,141,239,152,102,150,151,238,252,255, 94, 14,216, 97, 17,229, 67,181, 64, 74, 11,150,236,
+ 1,150,253, 61,251,231, 62,144,250, 0,218,156, 61,139,235, 73, 67,192, 93,125, 27, 45, 7, 31,102, 10,104,141, 26, 53,202, 16,
+208, 98,225,209, 9,107,180, 29,218, 90,198,111, 25, 35, 63,164, 73,181, 15,151, 98, 82, 85, 72,169, 14,213, 12,248, 63,216,204,
+ 71, 58, 2, 90, 0,107,155, 97, 95,118,209, 81,226, 61, 23,244, 67,203, 24,222,246,138, 60,217,146,249,157,246,222, 36,243,167,
+181,151,121, 83,218,202,156, 73,173,101,214,248,150, 82,182, 76, 9, 69,253,115,224,192, 1,193, 74, 92,246,236,217,163,172,252,
+ 1, 26,116,129, 22,190,249, 22, 7,210,108,223,125, 39,189, 32,125, 75,151, 36,137,172,233,209, 21,234,193,113,138,154,144,234,
+ 66,170, 13,189, 39, 13,146, 14, 85,202, 74,253,226,133,100,107,191,222,114,115,233, 98,151, 64, 43,108,196,104, 59, 70,207, 92,
+ 45,213,219,142,149, 31, 74,116,148, 52, 37,218, 75,210,204,101, 36,113,250,194,146, 44, 99, 81,201, 84,188,137, 20,109, 56, 66,
+ 74, 53, 29, 35, 77,251,254, 37,127,142, 91, 38,145,163,199,217, 97,166,190,152,151, 64,107,214,194,181,210,187,255, 72, 69,114,
+ 72,105, 73,164,232,241,108,118, 90,191,181,247,116, 9,180, 0,108, 21,160,181,117,235, 86,203,206,157, 59, 45,224,157, 5,124,
+180, 28, 62,124, 88,153,100,161,210,181, 64, 50, 97,193,196, 73, 13,147, 46,208, 98, 29,157,242,222, 24,188,142, 38,180, 18,207,
+114,165,109, 32, 83, 85, 29,178,172,180,219, 49, 3,180, 8,160, 40, 13,118, 6,164,184,105,129, 19, 59,207,174,120, 73, 59, 43,
+213, 70,235,228,137, 19,111, 57, 88,184,178,209,122, 56,191,214,123, 39, 54, 90, 78, 95,163, 85, 35,170,234, 68,103,103,157,221,
+136,138,225, 59,192,207, 59,126, 27, 65, 22, 64,207, 43, 92, 59,201, 4, 48,240,154,215,217,254,209, 79,169, 2,229,117,151, 6,
+242,144, 80,237, 2, 48,183, 64,250,162,128, 44, 74,174, 84, 73, 86,185,114,229, 44, 11, 22, 44,176, 0, 32, 90,188,188,188, 44,
+151, 47, 95, 86,192, 55,212,204,187, 12,182, 79, 6,160,223,139,244, 20,233,153, 38, 81,130,147, 79,165, 81,190,106,253,153,219,
+ 79, 90,164, 98,141,198,243,245,232, 66,213,214, 3,252, 60,137,243, 25,140,113, 27,160, 34,187,130,128,234, 74,155,226,152,139,
+250,166,125,150, 86, 5,233,148, 36,129, 22,109,178,180, 82, 44,210,169, 86,179,178,212,174,255,171,212,111, 92, 87,154, 52,111,
+132, 69, 75,115,105,215,177,181, 12, 25, 49,200, 16,208, 2, 31, 21,160,181,102,205,154, 75, 75,150, 44,185, 52,119,238,220, 75,
+ 35, 70,140,184,138, 0,240, 10,208,202,154, 53,235,123, 0, 86, 31,216,170, 94,194,194,229, 18,234,124,191,179, 66,178,253,238,
+159, 57, 69,142, 47, 95, 44, 94,139,254, 82, 36,161,108,247, 76,187,198,143,148, 93, 99,135,203,202, 14, 45,184,192,126,228, 6,
+ 90,122,173,231,191,121,223, 17,200, 34, 39, 84, 80,244,225,231, 7,245,161,250,219,254,236, 12, 92,217, 63,195,231,236, 37, 90,
+214,255, 69, 67,192,125,215, 54, 90, 78, 62,204, 20,208, 26, 62,124,184, 75,160, 5,155,138, 54, 52, 50,117,148, 40, 37,226, 32,
+204,131,198,240,248,192,212,102, 62,146, 64,107,234,146,195, 35,112,238,195,223, 76,185,114,229,186, 79,122,148,196,105, 15, 26,
+177, 19,124,153,161,255,169,121,115,103, 77,226,231,125,112,141, 76, 29,221, 76,198, 13,105, 40,163,250,215,151, 97,125,107, 75,
+159,174, 85,101,112,223,122,226,217,253, 87,233,213,185,154,116,111, 95, 73, 58,181, 42, 47,237,154,151,150, 31,190,139, 27,148,
+ 35,115,194,119,185,178, 38,122,238,232,253, 4, 90,237,219,183,167,109,131,253, 86,116,151,255,185,113,193,149,122, 10, 59, 11,
+111, 45,223,124, 68,242,253,234, 41, 25,202,117,151, 44, 69,106, 99,101, 79, 91,243, 15, 71,198, 66,117,164,116,179,177, 82,161,
+213, 68,169,213,101,166, 76, 90,188, 71,162, 68,139,125,203, 25,143,162,198, 73,180, 57,102,194,239, 47,198,248, 54,229,197,232,
+241,146, 95,140, 22, 39,201, 69,186,115,136, 17, 63,197,227,168, 49,227, 1,164,197,150,194,197, 75, 11,196, 78, 4, 86,210,182,
+199, 16,169,219,162,167,116,251,115,180, 33,160,197,137,148,157,197, 89,226,100,203, 3, 19,157, 75,137, 22,235,200, 11,117, 52,
+101, 84, 51, 25, 51,232, 67,253, 12,232, 89, 67,122,183,253, 69,250,253,129,186,234, 82, 67, 58,213,202, 39,109,170,229,150, 86,
+ 77, 74, 74,211,122, 69, 36,127,166, 68, 65, 89, 51,124,251, 46,123,134,248, 14,235, 72,203, 19, 78, 64, 80,209, 56, 5, 82,188,
+ 79,240,102, 4,104, 89,193,150,178,235,240,215, 18,217, 70, 12,110, 89,161,131,163,212,165, 90,182, 17, 46,118, 29,126,106,179,
+ 54,242,252, 97,218,102,241, 80,213,133, 86, 3,120,229, 89,168,167,174, 80, 53, 7,112, 44, 0, 70,202,134, 27,128, 9, 69,114,
+228,236,192,243, 15,160,202,180, 16,108,169, 42, 67,130, 46,236, 98,179, 76,153, 50,197, 6,178, 40,201,132,221,163, 5, 82, 52,
+ 11,104, 82, 66, 30,106, 71,217,202,117,103, 17,104,253, 82,173,145,179,221,172,182,119,193,164,224, 18, 68,255, 2, 3, 37, 65,
+ 25,165, 93,187,118,138,164, 92, 5, 90, 5, 10, 20, 16, 0,231,215,120, 96, 6,146, 75,137, 30,129,214,236,217,179,131, 73,180,
+184, 89,137, 52, 48,190, 82,197, 39, 0,181, 82,189,122,117, 69, 2, 79,123, 79, 3,170,195,253,144,252, 41, 64, 11,188,186, 4,
+160,122,105,252,248,241, 87, 0,130,159,215,170, 85, 75, 81, 29,214,174, 93, 59, 16,255,253,135, 14, 29,122, 13,210, 98, 93,160,
+ 69,144,213, 54,154,135,146,104,227,198, 68,117,115,215,120, 17,229,143, 68,209,100,215,200, 65,193,128,150, 91,117, 24,106, 77,
+243,171, 39,228, 12,100,241,195,236,193, 83,104, 0, 45, 29,154,102,249,249,105, 54, 90, 70, 84,135,131, 6, 13,114, 9,180,160,
+102,107, 19, 12,241,216,253,161, 90,133,110, 29,232,222,193,236,215, 17, 88,249, 62,126,183,133, 96,139,182, 90, 76,133,138, 20,
+123,200, 45,234, 84, 71, 66,218,109,179, 65, 99, 69,234, 0,173, 24, 88, 1,143,134,196,196,144,123, 7,230, 99,126,148,217,169,
+ 29, 72,174, 44, 73,252, 14,238, 89, 33, 35, 7,212,147, 65,189,107,200,203, 23, 15, 12,165,103,143,174, 74,214, 12,241, 29,185,
+121,160, 84,240,214,162,217,107,164,117,131,222,210,170,126,175, 96,169,109,195, 94,210,190,113, 47,153, 55,117,137,146,248,155,
+215,152,207,179,203, 40, 73,150, 36,137, 83,169, 9,128,214,237,197, 27, 14, 73,193, 58, 3, 37, 91,165,222,146,250,167, 95, 37,
+105,250, 66,182,218,202, 90,172,129, 84,108, 61, 73,170,182,159, 38, 13,122,206,147, 9,139,246, 74,148,232,177,105, 7,227,240,
+136,157, 40,213, 69, 62, 60,117,237, 73,133,198,210,173, 39,148,243,142, 67,103,148,243,233,139,215,149,243,132,153, 75, 36, 92,
+196,104,207, 93,248,209, 10, 70, 31, 19,152, 15, 30,179,169, 10, 41,193, 80, 85,133, 80,237, 90, 96,187,100,185,122,245,170, 5,
+131,184,133,246, 60,122, 64, 43, 87,150,196,126, 7,118, 47,151, 17,253,235, 74,191,158,213, 12,213, 15,235, 81,169,163,244,223,
+ 58,172, 35,123,160, 69,219, 70,186,222,112,196, 40, 94,199, 78, 44,167,247,213,103, 62,197,135,150,221,174, 67,179,221, 44, 36,
+249, 15, 19, 92,178,207, 65,197,171,236, 82,182, 7, 90, 84, 81, 82, 21, 73,144, 69,219, 40, 61,160, 21, 62,124,248, 7,172, 87,
+ 2, 40,240, 83,169,231,107, 0,211, 43,163, 69,179, 92,158, 58,213, 2,149,190,162, 46,230,117,216,144, 89, 96,208, 30,250, 64,
+171, 82,157,217, 4, 90, 21,170,214,159,167,195,148,145,148,214, 94,168, 95, 95,150, 98,158,240,196,142, 85, 38, 44, 2,109, 64,
+139,191,123,245,234,165, 44, 64,209,167, 57,134,218,111, 16,178,189,130,160,137,187, 11, 85, 27,173, 26,181,171,194, 30,171, 86,
+176,145,180, 67,231,182,210,181, 71,103,249,163,111, 15, 25, 49,122,152, 17,160,181, 15,237,238,210,166, 77,155, 20,181,225,180,
+105,211,174,148, 46, 93,250, 53, 52, 20, 65, 90, 99,248, 49, 99,198, 4,193,175,225,107, 0,177,235,122, 18,173,163, 11,231, 5,
+ 3, 90, 4, 89, 52, 15, 32,200,250, 51,101, 28,217, 5,219, 49,168,147, 95, 83,109, 8, 99,248, 27, 78,140,225, 67,210,222,220,
+207,124,229, 28, 8, 45, 27, 45, 59, 0,149, 91,253,255, 1,175, 57,151,134,241,190, 85,162,165,231, 55, 47,212, 56,173,116, 96,
+ 14,130,122, 64,171,115,231,206, 2, 29,126,136, 37, 90, 88,137, 5,161,243,210, 81, 96,235,144,148,222,145, 68, 43, 67,134, 12,
+231, 1,168,174,155, 85, 29, 18, 52,193, 93, 3,198, 24,219,102, 51,219, 64,198,107,176, 13, 81, 92, 59, 80, 20,206,213, 56,141,
+123,225,246, 33,208, 10,182, 28, 22, 63,103,230,196,126,187,183, 45,150,126,221,171, 66,106, 85, 78,153,196, 79, 29,152,104, 40,
+ 57,155,196, 9,180,214,175,246,146,161,253, 86,200,144, 63,151, 59, 76,243,103,239, 22, 38,237,253, 73,163, 55,184,148,104,133,
+139, 20,125,215,224, 73,203,165,110,231, 41,146,167, 70, 63, 41, 80,123,144,164, 47,248,255,193, 60,103,169,198, 82,173,195,116,
+169,213,117,182,180, 31,186, 82,250,140, 89, 38,209, 98,198,115,170,154, 33,208,234, 63,223, 91,202,117, 93, 38, 37,218,204,146,
+ 66, 77,198,201, 79,117, 6, 73,142,170, 61, 36, 83,217, 54,146,166, 72, 67,249, 46,111, 53, 89,180,106,139, 75, 9,150, 61, 99,
+ 85,160, 69, 85, 33, 59,135,179, 4, 99,107, 5,104, 65, 82,228, 82,162,149, 51,115, 34,191, 93, 91, 23,137,103,183, 42,210,181,
+109,217, 80,169, 35,109,153, 9,164,104, 60,238, 12,104,209, 31, 26, 12,141,133,103, 87,125,192, 25,208, 82,213,137, 60,187, 2,
+ 99,142,104, 91, 85,133, 78,157,149,218,239, 54,212, 81, 23,106, 95,161,168, 14, 49,153,190, 37,200,226, 6, 26,168,247,222, 52,
+105,210,228, 6, 19, 36, 39,239, 8,180, 8,178, 96, 95,100, 72,117, 8, 67,248,221, 84, 25,114,119, 33,129, 20, 85,199, 48, 55,
+ 80, 64,214,178,176, 97, 45, 87,167, 79,183, 92,191,126, 93, 1,216, 4, 98,180,223, 67, 91,217,237,130,167,121,113,143,234, 66,
+101,247,166, 53,241, 55,175,241,222, 71, 71,249, 42,245,230, 18,104, 65,178, 53, 87,103,188,242,163, 57, 0,205, 33,104,236,207,
+197, 40,129, 22,237, 90, 9,176,152,248, 91, 5, 96,180,207, 4, 61,167,245, 79,160,197,197, 40,237,178,104,143, 85,168, 80, 33,
+ 41, 81,162, 4,121, 42,149, 43, 87, 86,236, 71,235,213,171, 39,224,173, 98, 63, 75, 0,167, 39,209, 66, 93,238,133, 77,154, 13,
+104, 77,158, 60,249, 42,164, 87,138,202,176,106,213,170, 65,252,205, 51,255,255,242,203, 47,239, 49,214,249,232, 1, 45,170, 11,
+ 85, 73, 86,251, 24, 97,164, 11, 36, 89,189, 18, 71,231, 14, 89,101,188,228,216,137,241, 89, 40,201,114,225,222, 33, 36, 83,129,
+251,153,127, 49, 7,208, 4, 21,192,164, 73,218,221,133,188,167,238, 58,228,111, 53, 47,205, 1,136,174,180,207,106,239,171, 52,
+236,105,133, 15, 1, 43,213, 88,135, 90, 21,162, 46,153,139,180,157, 32,168,128,250,229, 35, 99,120,136,253,149,206, 76,183, 4,
+ 3, 6, 12, 80,196,214,160,104, 88, 37,135,206,154,175,110,135, 58, 50,126,235, 88,201, 91, 36,207, 19, 60,171,245,169,245, 13,
+128, 68,253,148,223,167,216, 88,188, 82,193,151,197,127, 41,224,233,170,180,161,108, 12,127,151,128, 10,171, 98, 73,151, 46,157,
+195, 29, 98,170, 49, 48,239,211, 32,158, 42, 31, 74,182,156,149, 49, 71,166, 68,126, 91, 55,252, 37, 93,219,148,145,214, 77,138,
+134,202, 36, 78,160, 53, 98,216, 52,201,144, 46,183,164, 75,147,211, 97, 42, 92,176,140, 48,105,239, 55,168,211,209,181, 49,124,
+184, 8, 61,170, 53,234,242,102,244,156, 45, 82,176,238, 96, 41, 80,179,175,124,151,181,184, 13,108,166,203, 93, 86,170,182, 25,
+ 39, 13,122, 45,144,161,179,118, 74,245, 38,221, 94,195,222,138,187, 53, 28, 30, 4, 90,207, 45,111,228,177,255, 43,121,252,220,
+162, 0,173, 71, 79, 95,200,195, 39,254,242,224,241,115, 5,104, 93,187,121, 87, 46, 93,187, 25, 34,160, 69,123, 28, 74, 48,176,
+129, 64,217,101, 70,127, 74,156,104,177, 74,183,192,254, 77,153,108, 49,153,235, 2, 45,214,209,150, 13,243,164, 75,235,210,210,
+178,113,161, 80,169, 35, 43, 67,226, 3,228,173, 0,216,120,206,126,228, 0, 72,225, 82,124,229, 62, 55, 65,132, 4,104,217,251,
+213,114, 5,182, 28, 85, 18,141,223, 89,193,108,247,220, 5,203,137,146,139, 8,213,105, 41,165, 17,234,174, 88, 74,221, 12, 58,
+ 47, 85, 95,149,161,120,241,226, 79,105,139, 72,195,119,218,100, 17, 92,169,118, 59,220,217, 71, 73,214,247,223,127,111,212, 24,
+222, 19, 11, 33,127,148, 83,217,244,192, 77, 16,220, 0, 65, 73, 22, 65, 22, 37, 91, 79, 96,183,197,186, 39, 24,195,174,232,167,
+176,141,114, 58,126,128, 87,167, 41,105, 84,157,148,178, 60,252, 86,130, 2,124,192, 81,123,126,161,126, 18,244, 30, 50,251,232,
+ 22,239,231,239,179,102,207, 51, 92, 15,104,209,120, 29,230, 16, 2,181,230, 71,128, 75, 5, 88, 84,247, 65,194, 35,112,117,161,
+ 11,180,232, 39,171,102,221,234,176,199,170, 35,191, 53,111, 40, 45, 90, 55,147,182, 29, 90, 73,167,174,237,165,251, 31, 93,165,
+247,159,127, 72,255, 65,127,202,144, 97,131,100,236,132,209, 70,128,214, 30, 72,255, 20,213,225,234,213,171, 47,161,156, 87,177,
+ 27, 88, 1, 90, 60, 67,205,201,221,193,202,127, 0,185,247,216, 93,238,131,177,199,165,141, 22,235, 86, 85, 23,170, 32,171,223,
+119,113, 21,144, 69, 62,243, 62,198,236,151,176,253,154,230,194, 97,169,238, 4,229,206,224,230,192, 63,140, 3, 33,138,117,152,
+ 10, 31,177, 13,250,121, 5, 72,208,237, 0,119, 33, 81,186,197, 93,135,220, 41, 71,187, 44,250,106,193,174, 18, 14, 16,219,145,
+248,140,209,227,155,220,133,114, 62,156,117,112,146, 52,237,213,144, 29, 79,117,126, 73,144, 53,171,203,200,102,178,233,198, 76,
+197,239,214,236, 61, 67,191, 24,208,162,183,117,170, 49, 9,162,140, 0, 45,230,225,224,204,231,156,125,120,182,140, 9,253,214,
+175,154, 37,173, 26, 23,150, 6, 53,243,134,202, 36, 78,160,165, 78, 86,156, 28, 93,249, 58, 11,166, 91,192, 31, 29, 23, 2,145,
+225,227,202,103,240,148, 85,210,105,232, 18,201, 95,173,155, 28, 60,236,101, 35,113,232,136,183, 84,106, 62, 84,122, 79,216, 36,
+253, 39,173,149,168, 49,227,184,116,239, 64,160,245, 44,192, 53,208,242,185,229, 43, 23, 63,246, 4,239,178, 29,129,223,138,234,
+144, 6,239,200,232, 84,162, 69, 67,105,238, 58,212,147,104,177,142,214,173,156, 41,191, 55, 44, 40,245,171,231, 10,149, 58, 66,
+185,178,193,159,209, 67,246, 29,182,169,219,183,111,219,183,147,108,176,175,121,200, 93, 87,188, 79,191, 77,216,213,102, 74,162,
+165, 1, 89,202, 78, 57,128, 34,101, 23,162, 51,176,229,136,169,112,231,112,145,109,201,145,219,137, 79,112, 94,170,188, 10,146,
+ 94, 47, 2, 23,186,112,224,134, 15, 74,119, 56,134,104,213,133,220,197,203, 77, 32,216, 73,106,200,189, 3,164, 32,183, 89,175,
+ 4,212, 4, 89, 84, 27,179, 29, 64, 50, 99,121,116,255,190, 2,174, 1,148, 44,120,143,158,123,135,136, 48,174,127, 67, 32,169,
+117, 80,202,223,188, 86, 49, 87, 88,105, 90, 34,226,139, 70, 37, 98, 61, 44, 83,177,246, 92, 72,178,230,245, 30, 54,231,232,134,
+ 35,143, 94,143,153,181,133,238, 29, 42,234, 12,118,183, 23, 46, 92, 40,176,109, 82,252,132, 65, 50,164,184,193, 33, 15,120, 86,
+ 1, 22,199, 79,128, 14,197,214, 10,244,156,170,225, 41,157, 26, 50,100,136, 2,200,160,222, 83,202, 76,127,127, 28,163, 57, 38,
+115,241,203,113,185, 83,167, 78,138,125, 22,129,156, 1,137,214, 30,170, 12, 49,142, 95,234,218,181,235, 37,236,160,190, 10,219,
+172,215,144,140,189,135,173,215,187, 82,165, 74,221,226, 25, 96,241, 61,124, 8,190,198,194,218, 16,208, 82,213,133,148,100, 17,
+100, 13, 74,147, 80, 1, 89, 42,208,210,216, 34,234,133,232, 49, 58,159,184,243,185, 57,240,119,115, 32, 68, 18, 45,181,208,117,
+208, 89,239, 79,159, 62, 93,241,159,197, 1,147,158,211,249, 31,162,100, 9, 27, 54, 44, 13, 77,235, 57,249, 66,151, 14,205, 48,
+ 80, 77,156,180,101,168, 76,221, 62, 92,190,255,225,251,189, 80, 97,164,195,202,110,106, 47,236,202, 35,192,154,184,222, 83,234,
+182,169, 44,118, 18,173,143,104, 58, 81, 29, 94, 48,161, 58,180,209,164,100,138,147,142, 81,137, 22,213, 30,156, 32, 29, 72,180,
+108, 52,179,166, 79,112,127,243,250,133, 50,200,179,165,120,246,172, 47, 1,207,125, 13,169, 13,169, 94,180, 83, 29,218,104,130,
+ 79,183, 40,109, 60,139, 73,149, 19,153, 86,183,237,234, 55, 17,147, 29,208,114, 84, 71,249, 19, 38, 75,245,100,192,196, 21,210,
+103,244, 18, 41, 94,189,181, 20,172,216, 66, 10, 87,105, 37,101,107,119,144, 62, 99, 87,200,159, 19,224,143, 43,121,106, 74, 34,
+ 29,121,135,183,209, 36,208,122,234,255,218,185, 68,171,112, 67,185,122,227,142,140,135, 75, 7,187,144, 59,246, 77, 42, 88, 57,
+ 9,180,104, 20,205, 93,133, 52,120,231, 36, 75, 85, 18, 85,133,220,214, 79, 67,105,117,119, 26,248,100, 65,219,114,164, 58,212,
+212, 81,124, 91, 29,245,237, 94, 47, 84,234, 8,106,194,133,172, 27, 2, 44,130, 9,216,183, 80, 98,101,219,161,201,251, 92,196,
+176,253, 80, 50, 58,103,206, 28, 2, 45, 71, 59, 56,109,229,180, 87, 11, 18, 84,209,175, 22, 65, 22,193, 11,141,206, 65,139, 59,
+251,168,174,250, 40, 46,162,134,169, 54,154,104, 15,155,156,197, 56,228,214,124,103,206, 75, 29,168, 16, 29, 58, 44, 37,200,128,
+183,118,110,239,127,132,109,254,111, 1,128,130,216,111, 96, 28,254, 30,210,177,167, 4, 89, 84,161,161,108, 70, 29,150,150,129,
+ 51,210, 7, 84, 15,178,158,105,179, 69, 73,102,239,222,189, 45, 88,244, 40,146, 44,130, 44, 76,230, 28,155,202, 56, 24,155,212,
+114, 70,130, 42,242, 53,165, 47,244, 21,200,177,141, 18, 59,130, 4,246,173,122,133,194, 41, 78, 74,219, 86, 73, 44, 84, 21, 50,
+ 81,146, 69,144, 5,105,214, 68, 59,239,240,142,190,189, 62,218,169,133, 32,136,223, 71, 96, 69, 80, 68,167,199, 0,183,138, 20,
+139, 0,139,134,236,248, 30,238,200,228,162, 1, 62, 77,109, 71, 48,154, 4, 77,163,177,115,175,105,139,223,164, 85,219,223,165,
+125,167,182,210,165, 71, 39,233,217,187,187,120, 98, 71,241,192, 33,253,101,216,200, 33, 50,122,220, 72,153, 48,121,188, 76,155,
+ 49, 69,215, 97, 41,234,112, 15,190,247, 18,218,143,146,208,127, 46, 1,188, 94,135,154,215, 7,106,217, 96,137,215,192,231, 43,
+104, 19,220, 41,174, 61,108,229, 36,128,218, 57,118,196, 71,234, 66, 2,172,113, 57, 83,203,228,252,233,101,239,208, 62,246,155,
+ 62,232, 65, 94, 13,189,163,210,253, 28,206, 48,221, 52, 67, 23,138,124, 14,126,134,110, 9,191, 50,106,220,126, 60, 21, 78,229,
+130, 40,254,167, 67, 79, 72, 84,104,199, 64, 39,115,142, 66,155, 24,234, 44,152,252,114, 86,111,246, 75,208,250,235,179,101,194,
+134,126,210,160, 67, 53, 25,181,252, 15, 5,100, 13,153,223, 85,146, 38, 79, 58, 15,121, 82, 56,235,212,234,117, 12, 22,173,175,
+223,125,254,145, 49, 60, 65,133,193, 93,135,182, 6, 67, 91, 43,248,225, 9,164,152,155, 59,166,120,230,234,150,131, 49, 39, 69,
+213,169, 40, 85, 33,156, 64,233,115,167,111,223,190,142,108,180,108, 52,179,164,143, 63,181, 76,241,204,175,253,124,175,203,211,
+ 71, 62,178,117,237, 56, 89, 58,167,135,203,180,122, 97, 31,169, 80, 50,195,155,220, 89, 19,159,116, 52,240, 98,194,222, 15,191,
+ 55,111, 29,217,146,217, 75,176,180,255,177,125,251, 45, 6, 67,120, 42,112, 60,152,255,255,114,184, 2,145,162,196,188, 85,173,
+ 81,231,183,125,199, 44,129,209,251, 30,153,184,120,175, 98,147, 85,227,183,174,111,163,197,140,115,203, 35, 92,184, 2, 78,218,
+113, 48,160, 85,185,207, 38,216,104, 45,213,216,104, 13,148, 28, 85, 96,163, 85,166,181,164, 1,208, 74, 95,184,142,180,198,110,
+195, 8,145,163,187, 10,243, 18,172, 83,211, 1, 41, 84, 92,138,138, 80,171, 42,228, 68, 75, 27, 30,134,101, 33,216,160, 52,139,
+249,192, 47, 71, 14, 75, 63,107, 29, 1, 52,157,226, 70, 12, 74,130, 97,143, 20,100, 93,197,219, 60,233,227, 27, 78, 17, 24,113,
+146, 71,152,171, 32,171,253,150, 75, 79,251,246,224, 73,149,104, 81,146, 69, 90,144,236, 40, 46, 31, 12, 72,180, 12, 13,146, 12,
+189,195,246, 67,137, 41,193, 7, 85,138,236, 23,236, 7, 14, 84,136,142,104, 42, 33,120,224,140,148,106, 56, 37, 4, 15,251, 36,
+253,208, 89, 13,223, 51,128, 15, 12,207, 99, 54, 4, 79, 73,124,227, 29, 72,213,159, 83,162, 5,144, 96,193, 2, 67,113,243,209,
+165, 75,151,103,144, 84,221, 1,205,146, 58,237, 51, 34,128,214, 27, 46, 32,185,176,178,119, 82, 74,137,214,111,197, 35, 88, 26,
+ 20,143,245,176, 44, 12,224,203, 84,170, 51,135,234, 66,140, 73, 85, 49,230,196,115, 54, 46,129, 47, 17, 49, 62,254,132, 60,141,
+112, 30,136, 29,128,119,105,127, 71,192, 53,108,216, 48, 65,249, 4,174, 19, 4,198,229,146, 51,103, 78, 65, 89,233,112,150,145,
+ 11,226,187, 26,235, 8,180,224,102, 65,177,135, 85,213,142, 60, 99,252, 81, 18,127,243, 94,255,254,253,133,146, 47,186,220,209,
+ 11,193,131,242,209,173,206, 37, 44,216, 46,161,237, 92,130, 13, 22,213,135, 78, 19,193,152, 46,208, 26, 51, 76,122, 37,141, 33,
+253, 82,197,179,169, 11,217,102,166,228,207, 32, 51,139,102,147,125, 31, 3, 45, 71,213,100,168,125,154,156, 71,221, 52, 77, 50,
+ 76, 39,251,231,224,103,232,150,240, 43,165,150, 15, 58,117,134, 93,241, 71, 42,104,224, 27,116, 43, 2,131, 81,183, 54,253, 27,
+218,212,132, 91,111,207,150, 63,103,180, 23,216,103, 45, 4,125,251, 88,136,124,229, 71, 52, 49,129,165, 7,157,182,170,107, 7,
+213,189,131,137, 93,135, 90,154,161,181,235, 48, 88, 57, 33,153,218,152, 59,107,210,160,220,217,146, 7, 2,120, 57, 77,216,101,
+248,158, 82, 44, 38, 59,144,101,255,237,209, 0, 30, 14, 82, 58,101, 38, 89, 65, 86, 52,125,160,165,228,136, 28, 33, 82,244,158,
+ 81, 99,196,217, 27, 57, 90,204,123, 81,144,162,199,250,118, 47, 0, 88, 79,222,115, 81,255,193,128,214,213,187,207, 21,160,117,
+249,214, 35, 41,213,114,162, 92,185,121, 95,170,181, 29, 45,215,111,251,201,111, 93, 70,200,205, 59,126,146,187, 80,153,192,240,
+ 81, 98,114,139,187,179,195, 94,162, 53, 1,134,193, 47,232,186,129, 96,138,137,182, 88, 42,176,162, 20,139, 78, 45,121,102, 62,
+240,202,101, 8, 30,190,244,255,117,148, 44, 84,234, 8, 59,228,114,192, 16,251, 12,210, 21,128,137, 13,120, 69, 50,237,199,241,
+ 62,174,159,129,202,204,225,125, 71,117,228, 72, 74,101,243,171,101,149,100, 25,180,209,210,237,155,124, 63,193,148, 51,181,162,
+131,248,135, 70,104,134,102, 80,233,216,176,191,234, 7,254,237,135, 52,232, 17, 19,248,185, 31,223,223, 15, 69,119,229,155,202,
+ 86, 78, 58, 34,165,119,122,170,119, 41,125, 36, 32, 80,213,240,160,241,145,141,150,145,246, 9,112,157, 22,180, 60, 1,248,207,
+145, 38, 0,220, 43, 72,178,246,195,217,234,122, 72, 7,131,232,224,153, 82, 44, 0,113, 46, 86,177, 33,209,169, 59,155, 96,252,
+252, 28, 65,165, 33,113, 91, 4, 73,234, 57, 0,231, 75,116,243,160, 77,170,148, 75,123,134, 77,220, 37, 60,179,197,142, 15,193,
+ 36, 90, 27, 61,187,195,133,195, 64,236, 46,236,111,179,197, 99, 27,218, 55,180,175, 2,178,246,246,235,170,235,198,196,209, 56,
+111, 96,190,209,203, 98,164,125,234,209,176,191,239,166,105,150, 99,238,252,161,206, 1, 67,141, 16, 64,161,102,170, 31,191,223,
+ 87,236,151, 2, 47,210,166,255,225, 16,254, 83,111,175, 13,128,171, 45,152, 33,154, 38, 29,150, 26,162,105,146, 59,110,154, 96,
+216,255,253,104,165,128, 31,173,164, 54, 63, 90,145, 99,198,191, 8, 7,165, 23, 35, 70,139,115, 49, 66,228,152,151, 34,186, 6,
+ 89,100,189, 61, 63,227, 96,192,159,128,201,234, 26, 93, 55,208, 6, 75, 77, 84, 19,170,137,146, 44, 43,200,114, 25, 84,218,100,
+221,186,202,254, 89,235, 61, 20,119, 29, 26, 42, 39,213,131,206,212,138,184,231,116,194,253, 27,248,249, 13,222,201,100,228,208,
+126,187,233, 93,135, 78, 94, 96,163, 9,149, 98, 36,218,156, 34, 53,134,196,168, 19, 82, 67,180,213,132,214,231,114,225,188,214,
+154,248,251,111,107, 75,214, 23, 71, 65,217, 22,219,199, 59,116,246, 31,139,134,157,120, 46,216,130, 65,219, 55, 25, 60,156,146,
+ 91,189,100, 13, 50,254,119,127,187,145,182,162,151,199, 80, 63,210, 35, 98,119,255,191, 76,211, 36,171,254, 81,217,237,253,104,
+233,123,138, 15,165,226,255,151, 27,140,251,219, 67,169, 17, 89,201,184,249,233,230,103,104,113,192,221,150, 66,139,147, 31,232,
+184,249,233,230,103,232,114,224,235,164,230, 6, 90,255,128,149, 99,104, 52, 29,247,128, 22, 26, 92,252, 63, 13, 55, 63,221,252,
+ 12, 45, 14,184,219, 82,104,113,210, 13,222,254,203,109, 41,116, 91,209,151,165,102,191,235,144,255,109, 7, 43,213, 81, 50, 83,
+ 68,103, 52, 92, 93,215,163,239,166,233,184, 94, 66, 90, 95,110,126,186,249,105,180, 13,184,251,166,115, 14, 24,229,161, 54,159,
+155,159,110,126, 58,226,192,127,185, 45,233,245, 9,247,125, 19, 28,248, 47, 35,115,247,183,155,104, 40, 6,178,186,249,105,128,
+ 73, 38,178,184,249,105,130, 89, 6,178,186,249,105,128, 73, 38,178,184,249,105,130, 89, 6,178,126, 45,252, 52,240, 41,255,216,
+ 44,110,213,161, 78,213,124, 45,141,208, 93,206,208,237, 99,110,126,186,249, 25, 90, 28,112,183,165,208,226,228, 7, 58,110,126,
+254, 55,249, 25,186, 95,253,101,169,125, 58,208,138,150, 48,125,134,111, 83,102,157, 19, 39, 89,150,147, 76,252,205,107,255, 81,
+ 0, 19, 5,223, 93, 7,219,181,183, 98,119,219,115,252,238,224,128, 15,255,134,129, 34, 38,190,171, 58, 18,183,203, 87, 65,138,
+106,176,221, 26,250,246,194, 30, 30,225,106,122,120,180,130,135,198,155, 76,252,205,107, 78,222, 97,136,166,193,242,169,217,190,
+ 8, 77,207,182,137,243,237,217, 88,103, 35,207,142,202,231,217, 41,113,188, 67, 91,106,140, 29,212, 42, 73,220, 80,250,246, 24,
+216, 53, 54,141,187, 48,113,190,129, 52, 11,116, 99,217,209,254, 34,223,110,178, 62, 28,101,119,151, 51, 20,152,168, 33,225,230,
+167,155,159,161,197,129,207,209,150, 66,171,108,127, 7, 29,151, 54, 90, 30,112,244, 87,216,234, 77, 28,243,220,199, 71,156, 20,
+153,155,228, 41, 90,245,210,182,189,199, 46,159,189,116,235,238,201,243, 55,124, 86,110,216,235,157,233,167,178,231,121,207,197,
+ 23,185,170,136,111,224, 85,190, 22,156,245, 45, 68, 58,101, 77, 11,121, 13,244, 92,109,211, 14, 70, 19,147,201, 30,134,163, 49,
+147,240,140, 83,207,198, 6,106,167, 70,138, 20, 41, 2, 24,191,140, 97, 52,224,220,148,158,214,233, 28,209,254,112,250,237,113,
+226,164,142, 17, 45,113,166, 62,177,190,203,185, 63,102,210, 76,254, 49,146,102,244,143,145, 60,231,254,104,137, 51,122,242,158,
+ 9,126,210,159,213,101, 36, 58,250,236, 98,160,236, 46, 39,178, 6,217, 61,222,213,206,226, 33, 76, 13,115,120,188,135,243,214,
+109,112, 8,185, 11,177,208,118, 33,112,248,174, 24, 49, 98,108, 6,129,206, 72, 63,232,188,203, 80, 7, 36,176, 26,255,243,207,
+239,253, 87,175, 22,191, 14, 29,164, 71,204,152,239,120, 45, 4, 96,227,155, 8, 17, 60,106, 36, 73, 18,254,175,196,137,195,159,
+ 79,146, 56,252,133,164,137,195, 47,136, 16, 33,108,109,208,114,228,139, 77,125,133,145,114,214, 65,102,198,240,100,226,111,189,
+227, 35,154,237,203, 36,218,120,100,251,160, 0,158, 29, 61,220,171,101,170, 78, 7,183,119,190,206,115, 8,190,221,254,145,168,
+112,103,113, 29,113, 0,223, 49,172, 15, 19, 28,132,190,199,181,155,200, 72,224,108,230,219,245,190,213,112,155, 71,198,200,225,
+194,132,233, 28, 53, 98,196,173,145,194,133,187,207,196,223,188,198,123, 38,218,188,217, 50,185,108,243,161, 65,204, 74,195, 72,
+ 91, 50,251, 58, 55, 77,179, 28,115,157,223,205,207,127, 56, 63,245,176, 72,232, 22,255, 11, 83, 35,200,226, 43,213,179,246,245,
+209, 18,164,203,248, 83,241,106, 23,158,249, 91, 94,249,248,220,121,210,177,213,192,173,205,218,141, 88, 53,114,250,186, 13,187,
+ 15,159, 59,148, 33, 79,169,179,204, 99,114,130, 72, 1, 71,129,222, 0, 42,111, 49,137, 43, 1, 92,233,213, 26,193, 98, 5, 65,
+ 76, 95,241, 30,232,217,123,132,119, 56, 65,208, 95,203,133, 29, 91,228,246,201, 99,114,195,235,176,192, 73,165, 18, 24,151,233,
+236,166,117,114,114,205, 10, 57,190,124,177,226,213,154,137, 1,115, 17,254,226,174, 93,121,141,118,192, 36,153, 50,101,122, 67,
+ 62, 49,164, 8, 99,138,193, 91, 62, 99,203,181,118,240,253, 14,105, 70, 75,144,166,104,140,164, 89, 31, 52,233, 62,241,237,250,
+ 3,155,229,204,181,227, 72,151,100,233,182,115,210,176,243,184,183, 49,146,102,123,192, 60,122,252,132, 99,198,159,224, 60,214,
+230,244, 29,249, 5,193,129, 95,104, 19, 0,225, 11,109, 74,158, 60,249, 11, 4,239,189, 2, 31, 54, 57, 28, 77,184, 4, 88,114,
+118,129,146,254, 40,228, 65,239,221,135,240,130, 93,106,130, 67,208, 93,136,139,182,171, 82,165, 74,187,240,188,171, 56,111,134,
+248, 73, 41, 22, 65, 22,220,162,139, 20, 46, 44,231,240, 13,188,166,247,237,118,247, 83, 37, 74, 20,254,248,136,225,205,222,172,
+ 94, 61, 91, 54,110, 92, 47, 27, 54,172,147, 85, 43,103,201,152,209,173,224, 5, 63,252,105,228,255,209, 4, 77, 74,212, 6, 34,
+141, 66,162,228,242,162, 26,235,147,191,173,215, 70, 1,184,140,196,111, 71,210, 55,219,183, 83,130,213, 1,224,234,215,178, 63,
+139,255,179,187,194, 51,255,107, 37, 91,101, 82,167,142,209,230,151, 44, 15,206,120,253, 21,200, 51,255, 27,109, 75,118,249, 20,
+ 63, 82, 88,112, 76,130, 83, 73, 37, 8,176,122,176, 79,204,157, 59, 55, 16,109,102,182,163,122,119,194,155,180,248,198, 27,240,
+155, 20, 44, 80,124,252,172, 85,242,167, 47, 88,191,111,188,140,149, 10,155, 40,103,158,200, 17, 34,220,222,186,100,114,224,163,
+155,167,228,205, 75, 63,121,118,249,152,220, 62,119, 72,230, 78, 29,245, 46, 98,184,112,140,239,231,200, 35, 62, 95, 97,168, 45,
+ 57,249, 6,103,151,221, 52, 77, 50, 76, 39,187,155,159,110,126,134, 10, 7, 92, 97,145, 80,121,193,223, 73, 68, 27, 27,207,190,
+ 28,241, 82,100,157,191,121,151,215, 69,159,235,119, 30,159, 63,113,222,183, 77,227, 94,107,126,255,125,192,194,250,237,198, 76,
+ 25, 61,123,227,252, 25, 11, 55,172,101, 30, 19, 19, 89, 10,128, 19, 63,132, 77, 81, 2,140, 34, 62,157, 48, 60, 5,227,188,205,
+158, 61, 91, 16, 79, 75,230,226,156, 44,105, 82,130, 33, 71, 96,203, 94,162,229,119,251,228,113,105, 27,221, 67, 73, 12,149,163,
+ 70,142, 87,175,241,204, 80, 58, 76, 4, 91, 63,252,240, 67, 72,129, 86,245, 14,144,188,144, 95,144,238, 60, 67,249,186, 33, 37,
+ 53,250,237, 4, 80,223,101, 43,106,217,124,228,152,220,123, 18, 32, 55,239, 63,147, 61, 39,207,201,129,115, 15,228,208, 69,254,
+190, 40,179, 87, 45,144,212,217, 11,189,140,250,109,154,210,174, 38, 50,128,197,203,136, 69, 38,139, 23, 47, 86, 18, 1,171,145,
+131,161, 70,224, 80,145, 82, 48,245,176,241,211, 30,104, 33,246, 91, 48,160, 5,233,200, 46,120,186,222,133,216,130, 4, 90, 99,
+ 92,180, 89, 67, 3, 47, 65, 21, 37, 89, 4, 89, 64,250, 33, 1, 90,169,114,230, 76,249,224,190,223, 62, 72, 22,167, 8, 2, 56,
+211,227,180,146, 24,160,119,242,164,113, 8, 21,115, 84, 10, 22,252,225, 33,202,154,214, 32, 48, 24,200, 56,158, 0, 43,140, 95,
+121,167, 80,161, 66,129,108, 51,227,198,141,163,228,242, 61,128,199, 29, 6, 71,134,227, 80,190,135, 96,203,254,176,125, 59,213,
+133,148,100, 17,100,241,224,153,255,121,157,106, 66, 74,176,154,149,203,246,112, 84,255, 14,242,230,181,191,140,236,215, 94,154,
+148,203,254,144,215,169, 78,116, 84, 71, 30,213,151,134,205, 92,210, 19,161, 90, 60, 85, 73, 29, 1, 22,127, 43, 41, 97,226, 36,
+119,181, 1,198,217,207, 24,195,143,113, 16, 33, 53,214,130, 88, 87,117,148, 22,193,132, 31,146, 14,188,191,223,215,126, 96,150,
+226,191,245,127,250,252,197,243,206,253, 38, 47,137,159,161,114, 22,187,143,119, 68, 51, 79,129,159,114,250,251,251, 94,144, 23,
+151,182,200, 91,255,237,242, 54, 96,135,120,255, 89, 91,142,141,104, 35,111, 44, 62,114,251,218, 41, 73,151,230, 7, 70,155,200,
+109,176,142, 62,117,184, 52,212, 62, 77,190,196, 77,211, 36,195,116,178,187,249,249, 31,228,167, 43, 44, 18,186,236,248, 27,168,
+185, 66,145,113,146,103, 62,123,242,188,207,173,118, 45, 7,108,234,216,164,247,234, 30,157, 70, 44,233,211,127,250,252,190, 99,
+151, 77, 31, 58,101,205,228,237,251, 78, 45, 99, 30,131,197,254,134,210, 42, 6,110,101,200, 11, 74,178, 24,154,129, 1,119, 17,
+235, 77, 9, 86,221,179,115,103,153, 49,126,156,204,156, 48,158, 19, 3, 37, 91, 46,189, 61, 83,162, 69, 73,150, 22,104,169,145,
+227,237,129, 22,129, 29, 39, 77,120,186,182, 7, 90, 6,139,239,145,163, 74,149, 42,194,120,143,152,200, 41,201,250,201,232,131,
+ 84, 9,198, 74,145,249,225,166,195,187,100,237,254,217,178,237,232, 86,185,243,232,181, 92,186, 19, 32, 59, 79, 61,150,129,179,
+230,202,175,109, 75, 74,175, 97, 77,101,204,244,126,146,240,199, 76,207, 98,199,254, 94,171,234, 9,246, 42, 72,165,238, 49, 54,
+ 27, 99,233, 81, 26, 72, 30, 50,126, 28,131, 19, 31, 63,126, 92, 16,255, 77,137,243,120,240,224, 65, 65,144, 88,105,210,254, 79,
+105,136, 88,107, 12,224,139,248,110,247, 28,149,155,170,195, 14,249, 60, 20,105, 86,191,114,113, 95,227,249, 67, 4, 87, 76,144,
+ 4,238, 2, 45, 2, 44,130, 12, 61,160,101,136, 45, 84, 19,246,136, 21, 43,144,146, 44,166, 14,223,124, 19,232, 66,117,104, 79,
+243,155, 4, 9,194,159,120,248, 96,175, 60,121, 52, 85, 86,175,248, 14, 65,121,191,161,100, 86, 73,225,194,125, 35, 75, 22,101,
+146,167, 79,230, 32, 86,229, 17, 73,148, 40, 2,219,168, 43, 53,162, 74,127, 84,229,202,149,101,231,206,157,194, 64,205,140,233,
+135,248,121, 50, 99,198, 12, 89,184,112,161, 45, 38, 94,207,158, 61,249, 30, 74,189,156, 30,148, 92, 81, 93,168,149,104,241, 63,
+175,211, 38,139,234,194,211, 71,231, 7, 18,100,241,224,249, 20,254,243, 58,239, 59, 35, 60,118,193,254,178,229,154,142,106,153,
+ 56, 71,179,236,214,111, 98, 20, 5,164,212, 17, 19, 37,253,206, 66,128, 68,149, 33,193, 55,251,246,166, 77,155,100,197,138, 21,
+130, 16, 46, 14,165,133,144,130, 53,135, 29,215, 93, 38,132,179, 25, 8, 64,121,143, 82, 60, 30, 42,208, 82, 37, 89, 9, 50, 85,
+236,176,126,219,193,195,190,247, 31, 61,200, 85,166,197,240, 88, 89, 43,197,114,193,130,200, 81, 34, 70,188,253,226,222, 69,121,
+178,127,162,188,125,122, 30, 20, 3,229,253,219,155,178,167,221, 47,178,174,110, 97, 57, 48,162, 19,198,128, 59,114,229,252, 73,
+137, 20, 62,252, 13,208,138,104,168,241,184, 51,185, 57,224,230,192,191,142, 3,174,176, 8, 6,143,156, 72,229,173, 41, 47,206,
+121,172,191,121, 86,239,149,208,228, 97, 94,251,255,218,188,188,175,253,175,253, 77,250,185,172,180,202,224,236,204,126, 86, 91,
+ 7,170,141,150,214, 86,235,255,247, 93,125, 92,220, 20, 89, 15, 28, 59,115,237,106, 23,207,233, 43, 47, 94,240,185, 54,118,220,
+210,101, 51, 22,109, 89,124,199,239,209,149, 21, 91,142,204,221,113,224,244, 66,230, 49, 82,227,180,191,154, 54,109,218, 59, 2,
+ 30,130, 44, 30,156,200, 8, 12, 24, 20,181, 91,135,246,210,225,183, 70,210,170, 70, 85, 89, 52,105,130, 52,168, 86,229,149,213,
+102,203, 41,121, 2, 45,170, 70, 84, 73,150, 22, 92,241, 29,148, 98,241,125, 61, 83, 39, 20,207,108, 63,200,193,191,102,126, 10,
+208,242, 64, 60,181, 13, 11, 22, 44,144,213, 80,121, 65, 13,247, 12, 5,115,166, 54, 13, 86,102,218,100,117, 29,253, 71,224,145,
+115, 59,165,211,232, 74,178,118,239, 82,121,250,226,157,156,188,230, 47,187, 78, 63,150,218, 29,126,145,154,237,106, 73,249,198,
+229,100,216,132,206,210,160,109,205,192, 24,137, 50,245,119,246,225, 0, 90,126, 4, 83,235,215,175,151, 85,171, 86, 41, 18, 22,
+ 74,133,160, 34,146,137, 19, 39, 10,108,171,100,192,128, 1, 10,120,101,144,217,228,169, 50, 40, 0,132,210, 26, 0, 45, 63, 23,
+245,117, 8,192,237, 16,212,184, 74, 66,160, 89, 69,138,213,166, 77,155, 93, 77,155, 54, 85,128,150, 53,141, 49, 82,231,174,242,
+ 64,127, 25, 62,119,244,232,247,246,173, 92, 25, 52,184,110,221,247,121, 99,196,240, 41,236,220, 24, 62, 24, 41,218,100,205,155,
+219,246,245,171,151,199,229,242,133,116, 72,105,164, 71,183,111,109, 64,171, 99,135,228,226,115,181,168,220,184, 86, 78, 44, 1,
+ 7,160,234,237,242, 38,106,212,176, 13, 13,148, 57, 74,152, 48, 97,110,117,239,222, 61,136, 60,164, 36, 75, 5, 89,228, 51,165,
+136, 56, 7, 33, 78,225, 45,208,162,106, 81,247,160,186,144,146,172, 78, 21, 18,239, 3,128,154, 56,217, 51, 85, 70, 74,172, 40,
+185,106, 85, 33,203, 3,155, 68, 11,146, 45, 72,180, 30,240,186, 51,195,248,194,133, 61,195, 45,219,113,161,228,218, 3,183,254,
+104,210,123,209,212, 68,121,154,247,247,248, 62, 7, 1,121,248, 72, 63,254,218,164, 72,217, 90, 79,182,108,217,162,168,200, 79,
+156, 56,161, 0, 45,150, 25,234,222, 64,244, 37,173,234,208, 86,110,132, 96,185,203, 5, 8,251, 75,222,188,121, 95, 16,152,179,
+207,240,128, 42, 90,145,104,169,146,172, 78,158, 19,151,164,254,169,206,160,171, 55,238,220,222,178,199,203,251,219, 76,149,202,
+ 56, 99, 0,237,175,182,111, 88,240,254,253,155, 51, 18,248,246,170, 4,220, 58, 45,167,134, 54,150,131, 61,107,201,171, 23, 39,
+144,206,203,179, 39, 23,101, 76,137,159,100, 98,173,106, 50,184, 69,243,119,224,125,123, 93,134,186, 51,184, 57,224,230,192,191,
+146, 3, 58, 64,171,188, 58,255, 96,124,238, 65, 16,196,255, 42,176, 82,127,107,230, 40,229,158,253,127,237, 53,251,103,181, 52,
+249, 14, 62,155, 47, 95,190,133,184,238,204,252, 68, 91, 15,234,174, 67,243,161,119, 98, 39,203, 60,104,209,234,237,167,182, 31,
+ 56,227, 53,124,242,234, 69,254, 47, 94, 62, 13,176,188,126,182,247,200,197,213,167, 47,221,218, 56,102,202, 95, 27,152,199, 72,
+173,211,240,157, 82, 24, 31, 31, 31,197,134,138, 32,235,216,177, 99,114,248,240, 97,233,218,174,173,180,107,212, 64,126,175, 82,
+ 81,154,150, 44, 34,253, 26,213,147,209, 61,186, 82,170,197,224,210, 78, 15, 2, 45,210,114,166, 46,228,132,193,244,103,246, 31,
+101, 72,161, 28,114,104,193,108,179, 64,171, 18, 86,249,135, 80,128, 94,214, 66,164, 76,154, 52,233, 3,216, 42,201,162, 69,139,
+ 36,122,244,232,231,113, 61,146,222,247, 39,206,154,213,107,245,158, 37, 50,123,221, 40, 89,189,123,149, 92,190,107,145, 99, 87,
+158,203,182, 19,143,100,241,158,123, 50,102,245, 77,233, 49,231,178,180,156,112, 90, 26,116,110, 36, 61,135,245,149, 24,201,114,
+241,189, 14, 15, 2, 45, 74, 41,180, 64,139, 18, 23, 26,232,115, 98,189,123,247,174, 98,175, 70,181,236,172, 89,179,132, 18, 24,
+130,217,126,253,250,233, 1,173, 93,104, 84,187,160,106,178, 37,168,159,118,213,173, 91,215, 6,180,216,122,173,141, 87,239,179,
+131,221,135,196,164, 7,118,105,158,196,249, 12,130, 1,111,128,141,217, 21,216,188, 41, 19, 58, 59, 24,234,242, 6, 30,112, 21,
+ 12,216, 70, 47, 73,162,240,243,238,220,217, 44,190,119, 90, 43, 32,139,233,202,197, 12,178,111,119, 38,217,191, 55, 23, 64, 86,
+ 49,185,113,189,156,220,244,169, 34, 15,252,250,201,237, 91,171, 36,105,210,112, 43,116, 10,172, 24,190, 23, 44, 88, 48,144,129,
+134,199,143, 31,207,239,124,195,107, 76,173, 90,181,122, 15,181,169,210,102,161,186,125,111,189,174,107, 32,175,238, 58, 28,208,
+249,199, 57,251,183,180, 58, 57,236,143, 12,127,170,229,160, 77, 86, 83,168, 11, 41,217,106, 85, 33,171, 51, 27, 45, 77,177, 61,
+195,212,108, 63,185,240,162, 45, 23,250,110,240,186, 63,202,115,218,174,101,113,179, 52, 92,235,145,180, 84,238,116, 37, 58,239,
+222,125,242,161, 95,178,239,211,189,153, 48,113, 82, 16, 37,113,243,231,207,151,242,229,203, 19,192,216, 27,195,219,104, 2,104,
+249, 17,104, 81,138, 69,245, 61, 37,163, 76,129,129,129, 2,187, 62, 5,104,125,155,185, 98,181,117,219, 14, 28,186,235,247,240,
+126,194,108, 85,251, 76,152,189,106, 51,127,199,207, 92,145,113, 73, 29, 30, 52,118,127,254,248,154,188,123,189, 23, 18,182,119,
+114,162,127, 61,217,219,190,162,108,250,173,164,188,125,125, 69, 94,188,184, 46, 15, 31,249,200,220, 46,237,165, 77,170,239,228,
+ 47,180, 79, 72,192,184,225,194,125,184, 57,224,230,128,155, 3,193, 56,160, 5, 65,156,127,156, 1, 45,187,235,138, 68, 75,205,
+175, 7,206, 28,189,195, 10,198,156,153, 8,105,203, 72,128,101,159,140,213, 98,188,120,105,162, 39, 73,147,247,212,241,115,215,
+174,236, 61,122, 97,247,188,165, 27,183,110,216,186,239,192,237,123,143, 15,158, 58,123,229,112,226, 31,243,156,214,217, 41,103,
+123, 17,119, 22,250,251,251, 43,234,174,179,103,207, 42,118, 35,216, 29, 37,251, 97,151,213,182,126, 61,105, 86,177,130, 2,178,
+ 90, 21, 43, 40,221,203,149,148,191, 6,244, 37,208, 58,229,170,164, 42,208,114,164, 46, 84, 65, 22,223, 57,172, 72, 46, 25, 83,
+161,168, 28, 89, 58, 95,210,164, 73, 99, 84,117,152, 51, 79,158, 60,111,110,223,190, 45, 37, 74,148,224,164, 27,203, 90,150,204,
+ 25, 50,100,120, 69, 53, 28,118,227,241,122,115, 61,110,126,159, 39,221,203,147,151, 79,203,161, 11,143,229,212,117,127, 57,114,
+233,153,108,242,126, 36,243,119,250, 74,145,106,223, 73,129,242,176, 43,178,166, 95,218,245,148,193, 11, 78, 72,244,196,153, 3,
+156,209, 37,208,106,222,188,185,228,206,157, 91,178,103,207, 46, 89,178,100,145,116,233,210, 41,128,202,207,207, 79, 81, 25,174,
+ 89,179, 70, 81,123, 17,196, 20, 43, 86,140,118,101,202,119,232, 72,180, 20, 85,161, 30,208, 10, 9,216,130,125,211, 37,105,217,
+ 82, 36,125,122,201,159, 63,191,180,107,215,142,155, 31,108, 64,139,118, 85, 80, 45,191,198, 55,207, 64,162, 90,204,233, 1, 3,
+248,115,111,223,250, 42, 82,171, 15, 32, 43,163, 92,189,148, 19,234,195, 48, 10, 8,188,116,161,140,220,242,169, 42,183,111,214,
+ 1, 24,107, 11,169,214, 81,193,174,196, 43, 58,245,164, 24,190, 19,116,236,221,187, 87,145,100, 33,255, 69, 79, 79,207,214, 35,
+ 71,142, 92, 14,160,250, 6,103,233,213,171,151,180,111, 15,123,170, 38, 77, 8, 68, 94,232,213, 61,239, 55, 43, 30, 59,230,208,
+118,121, 79, 31,219, 55,194,127, 88,187,188,167, 90, 22,254, 54,154,250,156,129, 93,135,193, 94,145,186, 76,155,136,229,155,143,
+106, 55,107,221,133,241,235,142, 60,154, 59,109,205,185,205,223, 21,108,179,123,241,246,171,151,230,239, 9,184,240,219, 24,159,
+ 19, 69,202, 55,120,158,252,251, 31,223, 69,140, 18,235,101,152,176, 17,150,104,218,238, 71,197, 69,189,248,113,241, 67,187,180,
+ 63,254,248, 67, 57, 83,117, 74, 9, 23,212,136, 10,208, 74,153,178,112,164, 82,181,187, 77,122,238,111, 9,168,212,176,231,204,
+186,173,251,207,229,239,159, 43,181, 29,167,177, 23, 11, 70,155, 59, 11,223,190,190, 7,160,181, 79, 30,159,220, 46,123, 59, 84,
+146, 13, 13,138,202,146, 74, 63,137,191,255,117,121,240,240,134,220,188, 11, 53,226,134, 77,210, 48, 65, 66,153,212,170,157,240,
+ 25, 35,252,116,231,113,115,192,205,129,255, 22, 7,180,146, 40, 87, 18, 45, 59,176, 68, 68,102, 8,104,217, 75,186, 84,137,150,
+245, 93,206, 54,168, 25,175, 4,189, 45,149, 49,190,205,144,186, 80,185, 58,151,239,250, 61,185,176,117,175,247,230,227,103, 47,
+237,125,230, 31,112,161,228, 47, 13, 47, 68, 75,244, 67, 58,163,111, 34,104,186,113,227, 6,118,134,109, 84,236,156, 14, 30, 56,
+ 32,251,182,109,147,221,107, 86, 73,147,242,101,164,153, 21,100,245,249,165,180,204,106,209, 72,246,207,152, 98, 8,104,113,119,
+161,170, 50,212,170, 11,123,165, 77, 42,253,115,166,147, 97, 69,115, 75, 64, 64,128,146, 40,253, 50, 8,180,190,133,228,234,238,
+213,171, 87, 21, 9, 6, 38,163,227,214,239,228,174, 48,170, 11,215,142, 29, 59, 86, 81,197,225,247, 8, 61, 30,196,253, 62,195,
+ 11,175,243,167,100,201, 14,111, 25, 60,103,170, 76, 91,189, 93,102,111,187, 35, 67,150, 94,151, 50,245,139, 7, 3, 90, 37, 26,
+214,150,222,179, 79, 27, 2, 90, 4, 88, 0,125,252, 38, 26,185, 11,249,187, 28,146,174,170,117, 91, 72,214, 60, 69,164, 86,173,
+218,138,141, 14, 1, 24,164, 72, 46,129, 22,109,180,104,159, 53,162,180,135,140,175, 30,239,149, 10,182, 28, 73,180, 20,116,100,
+ 78,178, 53,178, 66,133, 10,114,161,126,125, 89, 10, 32, 4,240,162,164, 92,185,168, 6,255, 32,209,226,111,130, 24,168,185, 0,
+138,146,144,175,142,140,205, 21, 86, 39, 74, 24,254,220,202,149,203, 5, 59,227,108,234,194,197, 11, 51,217,128,214,166,245,197,
+108,215, 33,145,132,164,102,134, 33,160, 69,219, 65, 74,178,232,182,131, 18, 66, 2, 45,168, 96, 23,171,223,107,127,198,198, 10,
+ 74,188, 92, 30, 29,170, 39,141,156, 51,117,146,158, 93, 91,214,146,171, 23,183, 11,207,121, 82, 39,239,193,235,124,144,106, 66,
+218,100,217, 25,192,187,164, 25, 43,101,195, 88, 57, 42,247, 29, 62,123,227,229, 69, 75,246, 62, 90,190,227,116,192,209, 93,231,
+ 94, 94,108, 63,231,217,193, 49,235, 95, 92, 88,119,228,217,157, 36,249,218,236,244, 72, 94, 49, 61, 8,185,180, 77,131, 27, 15,
+ 63,170, 11, 41,161,133,228,210,182,193,130,210, 59, 44,100, 66, 12,180, 34,135, 15,127,255,217,165,195,114,114,112, 3,121,126,
+103,187,188, 14, 56, 45, 22,255,243,242,240,222, 25,241,204,244,189,180, 77,150, 80,154, 37, 73, 36,127, 86,172, 38, 7,188, 47,
+203, 33,175, 11,110,160,165,215,152,220,247,221, 28,248, 23,115,192, 21, 22, 9,137, 68,139,172, 50, 3,180,236,243,218,131, 54,
+ 29,214,187,118, 88,106,100, 75,101,220, 20, 89,118, 93,186,126,235, 40,212,133,171,175,221,122,176,241,198,109,223, 3,188,102,
+166,206,169, 6, 92,187,118,173, 76,158, 60, 89,186,119,235, 38,157,219,180,146,174, 77,155, 72,151,186,181,100,201,208, 1,178,
+ 22,105,219,240,129,178,103,104, 95, 24,201, 14,146, 77,163,135, 26, 82, 29,158, 90,187,210, 6,180, 84,155, 44, 74,177,250,231,
+ 78,175,128,172,177, 21,139, 43, 32,203, 98,177, 40, 64,203,136, 49, 60, 64,201, 86, 74,133,104,235, 82, 31,224, 32,107,214,172,
+175, 51,103,206,108,129, 90, 73,106,212,168,161,168,224, 40,145,227, 25, 60,208,149,104,193, 79,214,190,121, 27, 78,201,200,121,
+ 99,165, 76,131,180, 82,180,122, 74,233, 50,113,147,180,155,122, 81, 26, 12, 63, 32,165,154,254,110, 3, 91,149,122, 44,150,134,
+158,107,116, 85,135,205,154, 53, 83, 36, 89, 4, 90,248, 38, 5,104,209,142,168, 74,189, 54,210,186,215, 4,201,153,171,144,100,
+ 73,240,173,252, 1,181, 44,108,227, 4,118, 69, 46,129,150,253,174, 67,216,250, 28, 34,216, 34,208,170, 87,175,222, 46, 72,116,
+ 20, 27, 45,251,131,215, 12,180, 3, 63, 74,215,200, 83,218,147, 13, 26, 52, 72, 1, 90,109,219,182, 85, 0, 22, 19,127,171, 0,
+ 12,106, 58,210,116,106, 75, 6,213,225, 95, 75,151, 78,161,254,220, 6,168,202,148, 78, 32,103, 78,149,150,179,167, 42, 74,179,
+166,233,108,215, 81,119, 50,104, 96,119,195,170, 67,238, 46, 36,232,160, 29, 30, 36,110,239,186,117,235,246,134,223, 60,120,240,
+ 96, 27, 77,170, 97,121, 36, 75,150,236,137,179,111,159, 59, 42, 75,146, 97,127,100,234, 51,180,109,222,147, 4, 87, 91,214,206,
+ 82,158,217,178,118,166, 2,182,120,157,247,167, 15,205,156,212,179,125,172, 88, 59, 86, 87, 29,222,173, 89,108,167, 27, 32,236,
+222, 19, 38, 74,154,154,137,179,255,210,107,201,234, 67, 15, 55,204,218,254,120,115,191,165,143,118,244, 94,252,236,232, 6,239,
+128, 59,223, 23,237,180,199, 35, 69,153,108, 86,144,229, 18,104, 65,210,233,199, 93,191, 83,167, 78, 5, 48,175,165,168, 15, 9,
+ 54,185, 3, 24,106, 69, 5,104,197,207, 88,177,114, 72, 84,135,119,189,118,200,129,174, 53,228,202,218,241,242,250,229, 85,216,
+ 76, 94,147, 59,183,161, 34, 79, 20, 79, 26,127, 27, 79, 26, 36, 72, 36, 43, 23,174,149,189,199,174,203,234, 53, 59,221,170, 67,
+ 3, 29,201,157,197,205,129,127, 43, 7,140,218,104, 89,237,166,202,171, 82, 39,206, 65, 86,201, 83,113, 29,137, 86,110,123,201,
+149, 51, 32,102,157,215,108,116, 13,240,220,222, 70, 43, 56,240, 50,176,165,242,155,108, 89, 82, 94,110, 82,175,224,171,198,181,
+242,189, 40, 87,252,251,167, 21, 75,167, 15,224, 53, 3, 47,183,101,161, 97, 59,140,170, 95,241,125,237,127,111, 38, 45,106,214,
+144,198,165, 75, 72,115, 72,178,182,143, 31, 37, 59, 71, 14,146, 93,131,250,202,181,213,189,229,236,188, 49, 50,176, 89,227,183,
+ 70,140,225,143,175, 88,162, 0,173,246,177,194, 42,246, 88, 4, 89,138,186,176, 88, 30, 25, 87,185,164, 76,171, 95, 85, 1, 89,
+240, 3,165, 2, 45, 95,157,114, 71,173, 88,177, 98, 16, 39, 69,238,222, 34,216, 34, 61,218,129,209,246,137,106, 22,238,238,235,
+216,177, 35,165, 68,116,126, 26, 65,143, 15, 52,134,175,221,110,212,219,237, 94, 87, 0,178, 82, 72,193, 95,146, 74,171, 73,103,
+165,193,200, 51, 82,101,192, 73, 41,222,227,128, 20,168,144, 84, 10, 85,254, 65,134, 45,241,146,124,213,186,191,209, 51,134, 87,
+129, 86,122,168,226, 84,160, 69, 87, 15, 57, 11,150,151, 92,121, 75, 72, 17,128,175, 95,127, 76, 41,237,161,134,165, 84, 14,188,
+ 52, 13,180,160, 74,219, 5, 85,228, 46, 76,190,187, 96,255,229, 16,104, 25,148,108, 41, 54,101,116,244, 58,101,202,148,143, 0,
+151, 10,176,192,119, 0,162,164, 82,164, 72, 17,151, 64, 11,198,240, 53, 71,142,104,246,102,216,176, 97, 66,127, 98,236, 20,237,
+219,253, 8,117, 97, 53,168, 11,235,202,216, 49,133,109,160,136, 46, 57,186,117,173,246, 46, 74,148,176,141,245,234, 9,247,163,
+208,133, 3,119, 28, 18, 24, 82,170, 67, 48,237,236, 64, 94,167, 64,235,232,142, 90, 99,104,147, 69,117, 33, 37, 89,218,131,255,
+121,157,247,153,175, 85,197, 56, 77, 14,109,255,243, 81, 91,156, 13,148,145, 89, 20,183, 14,113, 51,214,171,210,160,251,220, 45,
+ 75, 15, 60,219,217,123,209,163,173,203, 14, 89,174, 52,232,185,228, 88,132,239,171,209,147, 63,119, 35, 18,100,185,220,185,139,
+ 5,208, 93, 74,103, 41,197,163, 74,156,155, 61,184,161,130,246,126,112,113,161, 0,173, 76, 69, 26,247,166, 91, 7,179,198,240,
+ 27,167,142,120,239, 61,182,151,108,234, 80, 91,158, 62,187, 46,247,252,110,200,229,171, 87, 20,144, 85, 63, 97, 98,233, 94,182,
+138,236,242,186, 38,123, 0,180,122,118,239,247,214,109, 12,111,176,246,221,217,220, 28,248, 23,114,192, 21, 22,193,248,169,128,
+ 36,107,250, 9,231,132, 72,234,206, 67, 94,231,253,240,154,124,138,187, 24, 23,255,213,103, 84,186, 60,171,191,181,187, 21, 21,
+186, 6,216,237,218, 70, 75, 79,162,133, 85,109,194, 38,141,171, 19,118, 0,120, 4,202, 57,175,161,178,111,125, 3, 41,156,239,
+ 7, 78,138,133, 13, 20, 64,205,242, 13, 93, 54, 44,152, 59, 71,198, 13,236, 47,141, 74, 21, 87, 64, 86, 27,216,100, 17,100,237,
+133, 1,184,207,250, 94,114,115,195, 80,217, 50,216, 83,162, 27,116,239, 64, 32,164, 74,178,250,100, 72, 33, 3,127,202, 40,195,
+177,147, 73,149, 98, 17,100, 45,238,214, 86, 86, 13,248, 67,206,110,223, 76, 80,162, 7,180, 60, 96,228,126,132, 96,138, 64,139,
+210,149,178,101,203, 74,233,210,165, 41,217,122, 9,117, 21, 1,230, 22, 36, 74,178,140,184, 12,240,160, 29, 91,244, 36, 89, 30,
+ 76, 88,126, 92,198, 45,218, 32, 69,170,164,145,218,131, 14, 72,197,126, 39,164, 88, 15, 47,201,211,225,176,148,109, 84, 78,250,
+141,253, 67,218,141, 92, 47,209,147,100,125,164,227,222,193,207, 30,104, 97,135,152,116,233,210, 69,106, 66, 93,152, 53, 73, 98,
+169,241, 99, 10, 25, 82, 36,175,252, 53,184,191,162, 14,210, 3, 90,246,158,225,241,109, 11, 40,201,194,238,181, 93,176,159, 34,
+200, 90,254,161,221,254,255,128,159, 41, 2, 26, 79, 94,215,105, 7,183,169,138, 27, 58,116,168, 52,110,220, 88,170, 86,173,170,
+ 76,228,148,112,241,172, 2, 44, 72,136,200, 99,197, 15, 22,232,209,145,165,179, 35, 76,252,248,225, 78, 47, 88, 48, 77, 80, 70,
+137, 28, 57,156,156, 62, 89, 81, 1, 89,119,110, 53,129, 33,124, 11,168,123,163, 72,185,114,229, 32, 61,235, 42,223,198, 11, 71,
+131,118,103,225,125,180,239, 24, 69, 73, 37, 55,109, 64,162, 21,196, 29,177,148,180,241,112, 36,209, 2,208,126,229,172,128,148,
+ 84, 57,150,104,205,178, 73,180,134,246, 76, 63,168,115,205,111,187, 85, 46,246,211,123,250,217,226,185, 77,197,216,205, 7,183,
+136,105,100, 83, 0,219, 94,216,232, 25,234,205,157,182,246,210,161,101, 7, 95, 28,159,186,246,250,229, 40,233, 27,112,119, 33,
+191, 85,245,175,229,178,106, 96, 23,215, 60,114,228,200,119,153,240, 61, 3,185,211,112,201,146, 37, 50,102,204, 24,218,245,169,
+ 18,173,124,233,127,110,216, 51,126,198, 74,157,204,184,119,136, 30, 37,242,109,223,155,231,229,241,195,107, 50,187, 89, 61,105,
+155, 34,137,180, 64, 59, 61,122,242,170,236, 61,122, 73,214,108, 56, 32,127,100, 46, 45, 67, 74,214,150, 88,225, 35,112, 39,167,
+219,189,131,137, 1,213,157,213,205,129,127, 19, 7,244,176,200, 87,253,173, 6, 62,238,155, 31, 82, 37,147,157,107,251,201,206,
+ 53,127,202,226, 41, 53,149,148,250,251,164, 92, 1,187,146,230, 56,114, 58,151,226,187,228,201,125,167,143, 30, 37,115,134, 15,
+ 17,207,186, 53,165,123,153, 98, 80, 23, 14,144, 3,195, 7,200,233, 89, 35,101,203,192, 62,146,245,135, 84, 84, 27,165,112,192,
+216,143, 28,150, 18,104,169,146,172, 65,249, 50,201,136,146,249,100,124,213,210, 54, 41, 22, 37, 89,107, 6,245,150,205,227,134,
+201,197,125,187,104,207,100, 15,180, 28,149, 51, 25,236,111, 30, 63,121,242, 68,217, 38,111,245, 86,239, 42, 60,142,125, 81, 63,
+162, 73,135,165, 73,210, 23,180, 12,253,235,136, 76, 94,115, 66,154, 13, 89, 36,229,250, 30,147,162, 0, 90, 85, 6,156,144, 65,
+ 11,143, 75,171, 97, 27, 37,193, 15, 63, 5,232, 57, 44,133, 36,229, 94,159, 62,125, 20,213,161, 42,209,130,187, 9, 5,164,112,
+ 71,100,119,168,101, 91,151, 46, 38,179, 7,245, 23,184,103,128, 79,208,194,138,234,176,118,237,218,246,126,180, 92, 57, 6,164,
+ 68,132,142, 83,123, 35,149,179, 78,222, 10,232, 80, 1,151, 21,104,233,126, 59, 50,212, 7, 96,183, 16,100, 17,184, 16, 88,177,
+ 44,180, 9,194, 14, 62, 69,138,197,178, 23, 45, 90, 84,210,166, 77, 11, 91,171, 8, 22, 62,163, 33,236,168,156, 63,230,201,243,
+253,195,165, 75,167,195,190,104,138, 60,188, 63, 76,252,238,118, 17,191,123, 61,229,209,195,241,240, 14, 63, 30,146,153, 62,146,
+ 39,119,138, 71,160,227,200, 13,135, 35,154, 3, 39, 76,152,160, 0, 86,186,112,128, 31,169,247, 84, 29, 59, 59,200, 7,187,143,
+255,136, 38,109,177,114,167, 77, 81, 91,107,163,149, 55, 77,242,110,188,190,125, 77,149, 17,148,100,105,157,154,242, 63,175,235,
+124, 59,111,127,112, 86, 26,175, 68,226,148, 5, 91,111, 93,180,251,193,201,212,197, 58,237,226,127, 13,200,114, 38,205,114,233,
+176, 20,245,113,159,134,255, 88,112, 4, 51, 78, 87, 37, 91,102, 28,150,230,201,153,227,197,213, 75,231,228,210,249,115,210, 26,
+117,219, 40,249,119,114,224,132,143,236,132, 36,171,223, 79, 85,101, 96,145, 26,146, 41,245,143,220,248,225,118, 88, 26,188, 49,
+185,157,118,134,238,204,234,230,231, 63,156,159, 6,176, 72,232,126, 65,232, 82,115, 29,235, 80,239, 93,148, 90,117,233,216,216,
+ 38,209, 58,123,116,176,236, 93, 95, 95, 10,231, 79,173, 39,209,114,214,176,149, 16, 60, 13, 43,255,242,106, 84,167,246, 50,183,
+119,119, 57, 54,103,186,108,134,125,214,144,166,141,222, 90, 37, 89,142, 64, 22,139,250, 17,208, 34,144,162,227, 83,166,163, 75,
+230,139,215,242, 69,226,181,114,137, 2,180,152, 40,217, 58, 3, 73,214,217,221,219,229,220,222, 29,130,176, 52, 70, 61,195, 23,
+129, 36, 11,187,220, 3, 5,142, 74,131,240,110,219, 78, 49, 61,158,217,151, 83,205,175,134,224, 41,213,224,207, 55,109, 71,108,
+ 20,207, 57, 39,165,231,244,227,210,160,239, 42,249,169,106,247, 55,144,100, 25, 10,193,131, 9,240, 48,183,238,115,215, 38, 61,
+149,115, 7, 36,109,106,104, 91,196,157,144,127,253,245,151,226,159,108,243,230,205,210,187,119,111, 69,101, 55,106,212, 40,101,
+ 87, 25,164, 22,135, 13, 76,226,206, 62, 81, 85,201,241,190, 13,116, 57, 3, 27, 0, 42, 17, 97,216,254, 19,236,158, 26,225, 60,
+176, 78,157, 58,119,233,114,162, 17,156,167, 82,237, 71, 64, 67,176, 72,137, 97,206,156, 57,105,147, 71,183, 9, 19,144,224,253,
+ 60,216,225,172, 45,165, 70,152,157, 83,115,231,180,126,125,235,230, 10,236, 46, 60, 36, 1, 47,246,201,245,107,243, 16, 97,160,
+217,155,132, 9,194,211, 81,105, 26, 39, 31,227,136,230, 71, 33,120, 8, 10,157, 73,180,140, 0, 45,245,221,195,218,231,243,162,
+186,144,182, 89,170, 33, 60,109,179,168, 54,180, 73,180,138,254,244,158,234, 67, 59, 91, 45,167, 19, 4,162, 44,164,192,174, 83,
+ 0,248, 98, 3, 35,167,174,124, 53, 81,250, 82, 3,113,173, 80,142, 28, 57, 82, 89,129,152,179,122,212,155,116,210, 2,236,222,
+ 0,216, 12, 30,130, 39, 99,197,124,233, 10, 54,232,149, 48, 83,197,178, 14, 8, 59,163,153, 39, 74,164, 72,183,199,143, 26,243,
+110,197,228,233, 50,176,122,109,197,248,125,214,240,169,210,183, 72,249,192, 88, 17, 34,176, 63,186, 67,240,124,204, 80,189, 58,
+ 50, 48, 12,125,148,197, 77, 51, 36, 92,115,254,140,155,159,161,203,207,175,153,154,107, 99,120, 35, 95,150, 58, 85,210,205, 21,
+ 16,171,173,117,243,170, 74, 42, 93, 34,175,240,154,206,179,174, 26,161, 45,168,116, 52,236, 70,100,162,177,188,217,160,210,112,
+115,224, 69, 23, 15,102, 18, 36, 43,199, 12, 78,226,204, 86, 27,146,162, 91,176, 29, 25,109,132, 79, 70, 0,140, 26, 84,154, 6,
+242,209, 19,103,242,103, 10, 65, 80,233, 44, 4, 91,176,161,185,135,228,199,196,221, 99, 76,184,254, 16, 94,192, 3,194,133, 11,
+247, 10,233, 53, 38,204, 0,240,246, 33, 61,194, 91, 65, 86, 22, 35,229, 52,240,189,186, 64, 11,174, 60,210, 66,162,230, 9,251,
+182,115,148,172, 65, 37,247, 10,146,172,253, 40,215, 6,168,112,131,104,231, 70, 41, 22,234,145, 64,150,110, 8, 82,155, 0, 69,
+106,214, 48,145, 34,133,173, 3,247, 13,139, 16, 84,250, 98,226, 68,225, 47,225,247, 82, 56, 40,109,128, 12,148,202,133, 20,108,
+240,185, 58, 80,165,189,253, 20,137,150, 13,104,253,145,169,215, 7, 63, 90,153,250,216, 23,168, 77,229, 56,141, 41,201,226,217,
+ 40,128, 1,192, 74, 13, 64,213, 11,105, 41,126,159,204,150, 45,199, 37,156, 15,225,255, 52,164,150, 25, 51,102, 76,246,137,223,
+110,160, 9, 4,203,226,170,191,219,130, 74, 71, 13, 23,238,129, 59,168,180, 33,214,186, 39,113, 67,108, 50,156,201,205, 79,195,
+172, 50,148,241,115,240,211,208,139,255,161,153, 66,238, 71,203,254,131,104,116,141,107,122,246, 56,234, 99,159,163, 34,220, 52,
+ 67,183,149,125, 42, 63, 85, 27, 45,109,169,108, 52,177, 19, 50, 18,164, 89,249,145, 26, 67,162,213, 9,169, 33,109,254,172,153,
+115,225,188,214,154,248,219,213,241,169,229,116, 68,219, 16, 77,148,253, 24, 84,181,254,144,194,190, 81, 13,239,173,125,128, 42,
+101,123,191, 79, 78,105,210,102,139,134,239, 60,219, 23,198,179, 77,156, 24,220,117,200,179, 81,160,197,124,148,104, 1, 84, 21,
+193,185, 22, 82, 11,164,170, 72, 5,177,139,243,123,220,118,101, 4,111,232,219, 77, 54, 53, 55, 77,147, 12,251,167,182,121,147,
+159,225,174,119,147, 12,115,215,123,232, 50,236,191, 78,205,221, 1, 67,183, 5,184,249,233,230,103,104,113,192,221,150, 66,139,
+147, 31,232,184,249,233,230,103,104,113,224,191,220,150, 66,139,135,127, 7,157,208,147,104,153, 44,253,127,185,193,184,191,221,
+100, 99,113,175,242,156,114,192,221,150,220,109, 41,180, 56,224,110, 75,161,197, 73, 55,192,254, 28,109, 41,116,107,231,239,161,
+230, 48,214, 33,153,229, 40,153, 41,162, 51, 26,174,174,235,209,119,211,116, 92, 47, 33,173, 47, 55, 63,221,252, 52,218, 6,220,
+125,211, 57, 7,140,242, 80,155,207,205, 79, 55, 63, 29,113,224,191,220,150,244,250,196,215,122,223,124, 64,233, 80,248,210,207,
+129,120,221, 52, 67,161, 98, 52, 36,220,252,116,243, 51,180, 56,224,110, 75,161,197, 73,183,180,196,221,150,254,155,109, 41,116,
+191,250,203, 82,115,171, 14,221,106, 41,183, 90,202, 1, 7,220,131,121,232, 14, 68, 95, 29, 63, 17, 14, 42,172,145, 20, 54,101,
+201, 74,177, 50,213, 60, 22, 54,121,233,234,218,252,238, 5,139,194,129,175,174,222, 67,177,217,187,191, 61, 20,153,249,159, 35,
+149, 42, 85,178,140, 63,164, 76,242,123,234, 20,201, 90,165,250, 46,105,179,212,113, 62,222, 13,149, 60,121,242,216,169, 82, 38,
+111,192, 60,204,203,103,236, 24,165,215, 8, 35,194, 45, 65, 39,184,102,216,140,192,191,231,176,179,107, 51,220, 16,116, 2, 13,
+ 87,222,161,245,104,134,164,174, 92,210,132, 3,205,218, 8, 54,220, 10, 62,161,126, 67,188,195, 6, 60,195, 23, 84, 43, 56, 52,
+173,237,226,101, 46,105, 98,247, 93, 49, 4,123,110, 6,183, 1,205, 72, 7,190,174, 26,242, 63,175,135,128,102, 70,236,134, 59,
+ 14, 23, 20,167,240,172,214,117,131, 17, 94,152,225, 39, 94, 17,166, 5, 92,112,108,195,217,199,122,110,129,151,216,123,199, 55,
+ 74,179, 26,158,157, 13, 90,167,153,248, 27,137,215, 28, 29,127, 59, 77, 6, 69,103, 10,205,114,162,222, 78, 49,125, 2,205, 70,
+216,249,120,144, 9, 52, 26, 25,169,112,107, 30, 27, 63,101, 74,122,201,158,200, 67, 73,252,109,246,191, 25,176,225,140,126, 8,
+218,188,246,145,114,112,124, 75, 30, 86, 50,248,253,182,111, 55, 2,178,152, 39,233, 79, 77,238, 44, 57, 26, 36,137,114, 55,186,
+102, 4,104, 97, 32, 44,153, 35,108,216,137, 56,255,138, 50,113,247,103,120,140,111, 13,176,131,117, 22,199,185, 4, 9, 18,204,
+130, 43, 22,186, 31, 9,255,137,223,174, 60, 46,231, 60,226,188, 57,234,145,225,237, 97,143, 28,106,226,127, 94,183,163,111,180,
+ 31, 25,100,165,146,205, 8, 77,142, 17, 29,144, 90, 35, 41,193,212,117,142,143,104, 50, 60, 19, 34, 71,236, 69,180,130, 77,152,
+ 47, 54, 34,109,194,252,177,137,252,100,194,110,230, 45, 56,207, 51,194,207,104, 41, 60,210,197,205,240,141, 87,172, 31,191,217,
+ 19, 45,185, 7, 3,175,123, 68, 79,238,145, 31,191,167, 70, 77,238,177, 45,250,119, 97, 78, 69, 77,225,177, 9,169,115,244, 36,
+ 30, 63, 26,161,169,247, 65, 38,238, 27,225,167, 74, 46, 37,126,208,245,208,106,107,218,128, 51,221, 23,205,228, 39,105,222,105,
+134,166,209,162,126, 14,154, 70,223,253, 79,204,103, 47,209,162, 3,211,255, 31,154,248, 66,133,121,149,128,169,123,231,246,107,
+111, 92,185,180,238,246,245, 43,235, 54,172, 89,185, 41, 86,204,152, 43,208,168,143,192,211,104, 64,138,168, 81,253,225,247,104,
+127,204,152, 49, 22,111,217,176,118, 35,243, 48, 47,159,177, 3, 91,174, 42, 34,109,162, 68,137,142, 34,198,218,237, 27, 55,110,
+248,190,121,243,198,247,226,197,139,190, 8,214,123, 19,239, 57,138, 98,164,117,194, 73,189,202, 45,152, 40,110,152,129,105,146,
+133, 61,146, 38,166,199,145, 68, 81, 60, 6,130, 78, 65,179,157, 90,155, 31,157,251,208,213,171, 87,233,201, 60,136, 78, 81,127,
+253,245,215, 32,254, 7, 40, 34, 48,112,118,184, 44, 39,188,211, 95,164,111, 38,184,203,184, 2, 2, 56,253,120,133, 52,121, 61,
+ 4, 52,189, 30, 63,126, 44,183,111,223,166,171, 5,111,147, 45, 80,143,159, 42, 57,250, 61, 91, 13,103,175,171, 16,158,165, 21,
+ 98, 0,246,135,179,212,190, 8,149,179, 18,215,215, 33,147, 22,108,233,209,140, 3,112,177, 12,245,191,123,238,220,185,211,206,
+159, 63, 63, 15,129,171,151, 0,104, 46, 77,151, 46,221, 1,222, 3, 61,179, 19,132, 66, 19,206,117,119,207,155, 55,111,246,185,
+115,231,230, 3, 12, 47, 93,191,126,253, 50, 68, 47,216, 31, 82,154, 24,220,151, 34,128,233,118, 4,216, 30,123,235,214,173, 73,
+136,117, 57,243,240,225,195,179, 17,142,105, 55,239,133,180,156, 88, 92,236, 64,204,199,113,167, 79,159,158,130,118, 63, 11,193,
+192,231,160,238,119,155, 41, 39, 38,149,162,232,135,239,112, 8, 19, 38,154, 64, 44, 2, 2,224,247,205,150,224, 3, 44,128, 9,
+124,241,101,126, 71, 3, 47,193,207,184,113,227, 42,132, 36,241, 89, 35,131,185, 10,228, 70,140, 24, 81,201, 62, 33,212,207, 47,
+188,111,178,191, 87, 42, 86,172,216, 73, 60,211, 28,113, 49,175,163, 43, 49,224,251, 37,252,111,139,192,216,199,193,139,234, 70,
+250,145, 81,160,149,170, 80,235, 71, 75,189, 69,148,179, 70, 10,230,236,219,179,133, 9, 51,254,117,213,170,111,199,167, 79,127,
+ 24,179,116, 79, 0,172,181, 67,134, 12, 57,138, 54,233,141,177,206,251,204,153, 51,222, 93,187,118, 61, 2,176,176, 6, 52, 82,
+154,252,246, 96,217, 9,166, 94,236,247, 40,242,112,135, 71,231, 7,219, 61, 6,170,137,255,121,221, 14,108,233,245, 77,147,195,
+135,146,221, 8, 77, 79, 6, 43,239,209,163, 7,235,153, 96, 75,239,176,167,217, 17, 78,163,119,162,158,189, 49,254,120, 35,222,
+172, 55, 34,130, 40, 9, 14,171,189,225,152,218, 27,142,169,189, 1, 96, 25, 26,205,217, 97,163, 25, 53,153,199,198,191,110,252,
+ 38, 93,142, 37,146, 40, 41, 61,214, 68, 73,230,177,162,116,219, 52, 50,241,120,109, 89,112,167,169,172,124,222, 66,102, 94,171,
+ 45,157,151, 22,144,236, 85,227, 7, 2,152,113, 30,113,228,147,207,200,183,235,125,171,253,125,195, 52,209,255,119, 48, 42, 10,
+157,106,107, 19,252, 23,146,207, 35,141,244, 77,187,151,167, 68,136,185, 3,164,107,109,151, 41, 1,108,247,163,253,158,199,255,
+ 74,118,121, 13,151,211, 40, 3,236,177,136,209,231,254,161,249, 62, 14, 42,205,130,170,238,239, 41,157, 34,112,202,155, 43,251,
+180, 56,177, 99, 78, 1,227,253, 49,169, 6,190,120,241, 66, 30, 14, 30, 44,247, 16,164, 23,147, 14,131,208,190,141, 25, 51,230,
+179,120,113, 98,141,102, 94, 62,195,103, 13, 84,110, 68,130, 44, 2, 43, 76, 16,190, 8, 92,172,128, 44,196,152,243,197,164,235,
+187,109,219, 54, 95,172,246, 8,182, 28, 73,182,156, 85,110,194, 31,147,133,243, 26,217,231,215, 23, 23, 14,140,151, 23,183, 55,
+139,255,209, 85,114,118,193, 64, 25,220,164,252,139, 31, 99,125,227, 5,122,170,255, 38, 83, 13, 27, 78, 62,127,134, 36,235,126,
+251,246,237, 21,191,149,116,178,137,201,155, 33,130, 82, 26,233,212,142,242, 64, 74,166, 0, 45,158,113,255, 71,158, 9,180,172,
+255,117, 7, 10,187, 12,126,170, 67, 77, 92,103,185,204, 28,246,252, 12,131,193,127, 18, 0,213, 67,212, 1, 65,239, 13, 76,208,
+ 62,112,118,122, 31, 18,204,205, 1,150, 87,103, 30, 61,126,122,174,123,239, 97,205, 80, 79, 93, 48,200,173, 44, 83,166,204, 90,
+ 74,186, 12,212,187,146,133, 96, 2,177, 14,231, 32,150,228,188,165,203, 87,109, 92,182,114, 45, 48,214,150, 13,168,255,173, 8,
+222,125,228,207, 63,255, 92,111, 5, 28,218,239,112,217,169,153, 31, 64,120, 1,188,225, 47, 92,176,120,217,198,133, 75, 87,109,
+ 88,183,110,253, 26,128,162,245,160,185, 55, 36, 52, 9,164, 16, 17,126, 58, 6,245, 41, 94,222, 39,150,158, 60,115,110, 9,218,
+233,252,155, 55,111, 46,198, 0,191, 25,237,127,185, 21,108, 25, 46, 39, 50, 46,173, 84,169, 18,193,218,180,185,243, 23, 46,251,
+107,225,210,101, 43, 87,174, 90,136,152,143, 75, 48, 96,110,133,100,115,133,209,111, 71, 29,221, 6, 29, 89,182,108,153,146,232,
+113,223,254,176,188,252, 16, 49,129,253, 21, 96, 75, 27, 59,210,198, 79,130, 28,130, 44, 60,155,195,108,178, 3, 72, 14,235, 40,
+112,114,122, 33,184, 34,160,194,132,152,203, 62,193,153,109,110, 23, 96,203, 33, 77,196,176,244, 34,184, 2,168,182,148, 42, 85,
+234, 9,127,243,140,200, 8, 22,196, 39,181, 84,175, 94,157, 18, 82,221,126,100, 20,104,165, 44,216,194,151, 64, 43, 67,233,206,
+ 1, 8,128, 30, 78,125,206, 89,155,207,128,240, 81, 4, 89,129,213,170, 5,121,166, 77,251,100, 80,199,142, 55,223,190,125,235,
+ 13,167,189,222,104, 67,222, 8,242,238,141,177,206, 27, 13,223, 27, 19, 25,125,201, 57, 10,101,230, 72,170, 51, 2,253,208, 31,
+207,220, 69, 63,189,131,116,183, 64,142, 24,247,255,104, 26,229,249,178,225,225, 95,175, 25,245, 77, 16,219,192,230,241, 30, 47,
+110,109,244,216, 72,176, 69,201,150,209,190,233,106,224,136,153,204, 35, 85,180,239, 61, 22,125, 95, 40,202, 3, 0, 15, 45, 88,
+114, 84, 71,213, 48,102, 44, 0,189, 74, 86,154,139, 81,207, 98,157, 99, 22, 91,175, 21, 67,255,153,133,223,249, 28,188, 87, 75,
+179, 45,250,204,102,130, 44,166,106,213,170,121, 35, 42,134, 55,218,190, 55,250,187, 55, 22, 85,222, 88,248,121, 99,193,110, 6,
+104,157,220,242,178,187, 12,123,150, 92,146,230,136,246,110,252,145,186,178,214,210, 74,166,251, 23,148,113,207, 51,201,168,103,
+ 63,200,132,231,217,100,166,127, 81, 89,244,188,150,212, 26,154, 65, 32,233,218,138, 17, 63,146, 93, 89, 67, 29,108,128,190, 97,
+154, 4, 69,123,246,236, 17,206, 29,246, 9,116,180,139,110,163, 52,103, 98,188,148,157, 59,119, 18,168,205, 68,212, 14,223,167,
+ 79,159, 42, 99, 11, 4, 14,140, 69,106,102,172, 51, 51, 15, 41,121,191,242, 16, 60,246,223,251, 49,208,178, 34,201,194,204, 73,
+ 85, 32,165, 84,223,198,142, 61,177, 90,213,170, 24,167, 95, 41,227, 55, 99, 10,250, 20, 47, 46,215,243,231, 23, 50,159,137,129,
+151, 83,165, 72,241, 34,126,156, 88, 35,248, 12,159,213,235,212, 84, 23,142, 31, 63,254, 54, 72,250,130,182,175,159,159,159, 2,
+180,208,113,124, 17, 50, 70, 57, 35, 30,222, 77,171, 26,209,190,240,142, 26,204,119,105, 83, 39,184,123,247,244, 76, 80,156, 39,
+114, 18,115,198,129, 52, 34, 93, 18,137, 12, 43, 32,178, 97,128,248, 44,232, 19,244, 67,146,184,119, 65,236, 59,157, 78,237,172,
+113, 84, 64, 44,190, 64,242, 1,103,122, 49,175,168,211,138, 92, 54,108, 72,176, 46, 50,142,162,189, 68,139,215, 93,208,117, 70,
+ 51,180,128, 86, 24, 0,231,105, 0, 44, 79, 57,113, 97,242,183, 0, 92, 91, 0, 0, 44, 8,143,243,120,193,130, 5,173, 31, 62,
+126,126,254,222,131, 39,199, 59,247, 28, 88,115,238,168, 81,149,239, 92,191,254, 7,212,170,139,169, 70,212,171,119,235,253,106,
+144, 4,238, 2,168,154,115,234,220,149, 75,103, 46, 92,191,182,114,221,246, 67, 91,182,239, 62,176,119,239,190, 77,136, 43,185,
+ 12, 19,210,121,120, 56,167, 42, 76,171, 70,116,197,207,106,148,100, 97,208, 93,112,250,252,213,139,231, 46, 93,191,178, 98,237,
+182,125, 27, 55,239,100, 32,108, 11,174, 47,130, 20,225,120,158, 60,121, 76,209,204,155, 55,239,118,120,178,159,236,119,255,241,
+233, 39, 79, 95,156, 35, 45, 38, 72,181,230, 3,184, 76,193, 34,225, 32, 38,128,189,102,202,137, 21,247,118,180,239,169,190,126,
+143,110,221,127,240,248,206,146,213,155,183,173,221,176,109,211,182,109, 59, 22, 18,124,161,156,244,236,110,136, 38, 86,157,126,
+ 12,126,205,213,235, 5,196,227,244,242,242,146,229,203,151,203,172, 89,179,100,250,244,233,130,250,146,244, 57, 10, 42, 49, 46,
+ 25,170, 9, 17, 3,180, 32,252,139, 0, 45,130, 44, 45,192,114, 6,228, 84,176,101, 39, 33, 99,147,177,175,119, 85,146,181,144,
+ 32, 11,117,107, 25, 61,122,180,133,237, 21, 99,152, 2,178, 8,182,240,220, 66, 72, 8,247,227, 92,201, 85,127, 87, 1, 19, 22,
+ 83, 28,251, 14, 32,157,194,228, 63, 19, 0, 38,185, 22,132, 69, 72, 85,126,205, 95, 7, 94, 75,221, 63,150, 74,216,100,165, 27,
+234, 1, 45,208,249, 38, 19,164,109, 3,211,164,185, 14,176, 37, 11, 43, 85, 10,152, 54,104,208, 77,244, 21, 5,104, 17, 36, 96,
+172,243, 62,114,228,136,119,203,150, 45, 15,225,253, 77, 12,140, 75,163, 33,213,121,204, 49,136, 65,191,177, 0, 80, 64,244,235,
+ 39, 7,229,217,197,174,178,109, 74, 52,153,212,253, 67, 88, 44,158, 9,182, 40,221,162, 42,209, 96,223,116, 60,244, 36,246,136,
+ 2,137,207,248,156,181, 99,191,243,244,202, 46,211,252,127,150,228, 63, 69,226, 88,170, 30,246,117,148, 21,225,181,130, 56, 89,
+255,252,243,207, 12,169, 21, 5,201, 30,104, 69,134, 83,221,103, 92, 32, 64, 18, 25,136,251,153,237, 94,110,163,137, 9,126,183,
+ 10,178,120,110,209,162,133,247,138, 21, 43, 62, 2, 89,190,190,190,222, 88,192, 27,149,104,217,128,214,220,203,205,100, 97, 64,
+ 53, 25,112, 59,165, 20,239, 21, 67,146,230, 15, 23, 24, 47, 67,216, 87,105, 43, 70,148, 26,211,227,200,152,231,233,100,254,139,
+ 74,210,116, 90, 54,129, 36, 76, 27,131,212, 81,251,212,153, 22, 12,221, 54, 10,138, 72, 44, 37,210, 18,180,245, 87,139, 23, 47,
+ 22,140,217,202, 60, 77,208,133,235,212, 52, 56,171, 35,103, 5, 89, 77,201,152, 85,187,242,234,217,179,103, 2, 65,136, 64,162,
+207,248,179,171,156,213,145,161,175, 50,144,233, 43,151,104,233,171, 14,201, 3, 21, 77,210,238,106,221,234, 21,155,161,222,240,
+103,165,145,241,236,212,152, 28, 5,129,227,148,116,225,194, 5,101,149, 12,144,164,196,216,195, 4,253,100,235,198,117, 27,105,
+207,165,199, 79,136, 33, 55,163, 83,248, 58, 3, 90,232, 68,190,168, 88, 95,172,218,244, 66,252,240, 85,223, 36,137,255,205,153,
+ 59, 39,167,137, 92,234, 32,178, 59,158,200,222,196, 34,251, 83,136,116,136, 35,210, 54,186, 72,139,240,176, 59,169, 38,215,102,
+117, 12, 74, 26, 53,220, 25, 62,163, 87, 70,187,251,169, 17,184, 89, 9,178,203,163, 83,167, 78, 12,228, 76,143,224,206,194,197,
+232,146,167,218,145,141, 25, 18,140,167,176,209,186,201,179, 1,117,164, 51,186, 90,160,245, 30,161, 87, 30, 69,142, 28,121, 33,
+ 50,219,175,190, 92,150,139,146, 44, 21,100,113,226, 26, 56,112,160, 5,147,181,101,255,254,253, 22,134,245,193, 4,209,239,143,
+161,211,219,254,241,231,232,122, 7, 54,110,236,116,235,192,158, 94,207, 79,121,183, 69,222, 59,180,217,210,253,232, 15, 25,102,
+207,152, 49, 99,252,220, 69,203, 87,159,185,116,227,218,165,171,183,238,238,216,123,216,199,235,168,247,173,115,199,188,207, 92,
+ 56,117,114, 51, 0,252, 14,188,139,147,164, 43,213,172,246,117,208, 74,204,158,249,215,226,149, 27,207, 92,188,113,245,242,181,
+219, 55,183,238, 58,200, 24,135, 10, 48, 58,123,252,216, 10, 12, 22, 27, 33, 65,216,109,134, 38,164, 13,163,142,122,159, 92,242,
+232,137,255, 5,255, 23, 47,175,169,244,158, 63,125,186,245,241,131, 7,179, 1, 66,151, 66,186,197, 54,106,184,156, 80, 23,142,
+153,253,215,146,229, 0,111,119, 31, 60,124,234,183,121,231,254, 19, 7, 15, 28, 60,118,234,240,161,109,103,188,189,230,162,156,
+203,176, 66, 55, 68, 19,253,227,201,129, 3, 7,148, 32,226, 22,128, 41,212,151, 2,182,212,248,158, 80, 71, 74,155, 54,109,132,
+193,199, 1, 74, 4, 97,153,158, 57,170, 35, 85,117,104, 15,130,208, 79,217,220, 93, 75,185,130,171, 14,131,145,167,180, 75, 5,
+ 89,142,232,216,211,167,164,203, 1,208, 10, 70, 83, 43,201,194,141,205,144, 50, 91, 0, 90, 44,103,207,158,181,128,111, 22,128,
+ 76,214,249,102, 72,232,148, 69, 2, 2,150, 83, 50,238,244, 32, 96, 66,219,109, 11,245,112, 32, 64,144, 80, 5, 79,190,253,246,
+219,111,239, 16, 38,170,148, 10,168,194, 38, 47, 85,227,215,174,243,101,241,209, 64,201, 88,182,235,235, 40,169, 43,100,231, 61,
+157, 54,255, 77,106,132,201,154, 87,174, 92, 64, 96,245,234,178,224,151, 95, 2,198,245,233,115, 19, 99,167, 13,104, 17, 48, 16,
+112,161, 46, 93,217, 22,241, 53,195, 42, 87,174,204, 49, 83, 57, 32,213, 17,198, 58,165, 68,243,194,177, 5,226,115,168,169,122,
+ 43,216,217, 1,208, 50,216, 77, 63,100,139,146,194, 35, 81,188,116,225,142,183, 94,153, 78, 1, 88, 35,175,231,145,130, 45,226,
+ 75,228, 4, 30, 99,156, 16,250, 6,188, 60, 3,233,146,160,255, 72,238,220,185, 89, 31, 60, 62, 2, 90,248,158, 55,148,148,112,
+ 65,128,249,131,125,211,225,129,113,105, 51, 76, 0,188,235,213,171,231,141, 5,184, 55,128,181, 55, 98,187,126, 80,191,118,239,
+125, 51, 71,129,162, 1,241,146,165, 8,140,147, 56,197,251,168,177,147, 62, 13, 31, 37, 78, 83, 16,114, 57,198, 3, 48,217,128,
+214,132,231,217,165,251,233,196,146, 32,123,216,192,232, 73,195,250,143,157, 52,250, 12, 36,143, 71,231, 45,152,123,170,122,163,
+ 10, 15,114, 52,138, 34, 35,158,252, 32,127, 61,175, 44,153, 43,198, 9, 84,109,186, 76, 49,242,243,101, 78, 73,169, 19, 1, 17,
+219,239,194,133, 11,149,249,218, 10,180, 86,135,224,181, 54,160, 69,224, 70,154, 4, 89,192, 2,148,134,167, 12, 1, 61, 83,143,
+252,203, 36, 90,193,191, 93,131, 34, 61,121,135, 70,238,180,201,194,160,173, 72,112,184,106,230,128,222,166, 85,171,247, 88,145,
+ 63,135,244,224, 89,247,174, 93,131,216, 73, 88, 17,196, 76, 77,154, 52,121, 29, 35,122,244,217,142,140,230,237, 57, 13,144,113,
+154, 32,139, 9,246, 20, 31, 73,180, 96, 99,162, 72,181,208,249,104,224,170,119,252, 58,116,114,149,103, 47, 95, 44,187, 23,180,
+ 59,206, 35,217,151, 76,228, 96, 90,145,195,153, 69,122,126, 47,210, 53,137, 72,251, 88,242,170, 73,236, 71, 62, 51,183, 94,107,
+ 87,166,249, 83, 16,164,129,170,225, 3,229,157,203,239, 68, 89,131,216,160,121, 94,189,122, 53,109,180,230, 26, 38,242,113,198,
+239,161, 38,188,167, 21,247,242, 63,178, 49,116,138,217,195, 6,180,176,234, 80, 6, 90,130, 66, 16, 57,147, 41, 83,166, 71,168,
+ 47,170, 77,117, 59, 9,213,133, 4, 88,106,234,223,191,191, 5, 43,103, 11, 86,221, 22,148,237, 14,218, 64,223, 45, 59,118,117,
+ 95, 48,118,108,205, 27, 59,183,247,182,156, 56, 58, 85,110, 92, 93,136, 65,105,189,157, 68,203,105,249,105,248,141, 1,114,202,
+172,133,107, 86, 22,200,157,234,117,137,159, 83,191,175, 90, 50, 83, 80,221, 10,217,131, 26, 84,200, 26, 88,187, 84,198,183,207,
+ 31, 63, 94, 15,169,214, 53,171,129,188, 46, 47,152, 15, 19,237,220,185,139,215,109, 92,188,122,215,254,173,187, 15, 17, 76, 43,
+ 32,203, 62,225,253,119,116, 9, 34, 3,140,203, 79, 97,178, 24,231,125,226, 28,237,176, 28,210,178,248,251, 79,131, 84,235, 4,
+243, 26,161,201,111,135,196,110,194,204,191, 86, 45,119, 70,243,161,175,239, 12, 72,181, 78, 88, 13,228, 93,146, 69, 93,191,130,
+ 52, 68, 32,253, 19,128,117,129,189,155,178,248,217,186,117,171,236,216,177, 67,168, 82,168, 81,163, 6,195, 4, 9, 36,111, 2,
+154,148,196,126,116,184, 2, 90,186, 96, 75, 7,104, 81,101,232, 12,172,145,182, 61,125, 23,182, 90,106,185,219,170,146, 44,130,
+ 44, 92,220, 76,112, 5,192, 27, 12,100,161,253, 88, 8,182,112,191,185, 43, 38,162,237,244,111,214,172,153, 32,191, 13,160, 32,
+191, 26,102,140, 82, 27,214,173,146,190,137,147,126,127,207,105, 94, 50,121,243, 3, 9,155,178, 52,112,150, 46,208,242,192,247,
+109,157, 53,108,216, 77, 74,180, 40,217,154, 87,190,124,192,208, 46, 93,110, 66,194,168, 0, 44, 72,176, 21,208, 5,160,181,213,
+ 85, 57, 33,213,121,166, 69, 80,191,255,254,187,162, 46,102,224,248,171,167,151,202,173,163,191,203,214,201, 81,141, 72,180,140,
+ 52, 85, 37, 79,212,164, 30,153,147,230,137,120,175,207,145,108, 10,200,106, 48, 53,181,196, 77, 31,246, 86,196, 56,138, 81,187,
+179, 56,154,185, 8, 84, 49,102, 8,212,245,228, 99, 15,235, 11, 63, 82, 29,130,247,253, 88,126,130, 69, 6,189, 71,190,220,142,
+ 10, 7, 13,200,230,251,247,239,123,227,123,189, 49,238, 42, 32,107,243,150,109,167,210,101,253,201, 82,166,122,243,192, 45,120,
+254,212, 21,111, 57,119,205, 71, 86,238, 56, 39,133,202,215,122, 25, 33, 70,226,195, 30, 81,226, 5, 55, 70,214, 16,215, 2,173,
+161, 79,146,203,210, 71, 77,100,205,147, 14, 50,231, 74, 99,201, 94,250,251, 87,232,131, 94,237,218,181,163,253,151, 87,163, 54,
+181,253,170, 78,140, 45, 83,252,243, 74,199,213,185, 36, 74,114,143,190,134,153,248,153, 51, 98, 65,189,154,154, 37, 85,234, 4,
+219,196,151,159, 8,180,214,169,207, 83, 58, 70,224, 70,154,248, 12,198,161, 77,249,153, 63, 71, 17,246, 88,147,231,231,126,215,
+ 63,130, 62, 13,223, 97, 92,168,136, 33, 97, 79, 32, 29,219,183,127,207, 74, 69,225,146, 35,165,134,254,125,251,132,241,227,131,
+104,136, 71,221, 59,129, 7, 64,152, 86, 84,233,244, 59, 48,241,159,209, 2, 45, 24, 22,219, 84,135,152, 48,124, 9,180,246,237,
+219, 71, 59, 45, 87,118, 22, 10,253,232,177, 60,230,157,186, 51, 88, 46, 74, 65, 57,253, 46,186,255,139,243, 25, 14,202,145, 92,
+239,196, 11, 42,195,254,217, 36,176,119,198,119,231, 27,180, 57,184, 38,239, 20,255,109,149, 23,202,250,174,139, 36,106,216,200,
+122,171,199, 96,101,167, 58,143,188,128,161,241, 67,148,239, 50,206, 15, 8,144,116,212,124, 70,234,241, 71,172, 20,198, 97, 48,
+190,192, 51, 30,112,181,187,197,158, 30,109,162,168, 10, 26,207, 51, 7, 97,214, 21, 84, 16, 2,245,137, 64,189, 69, 81,175,242,
+ 27,182, 84, 28,196, 8,226,104,208,248,147,179,130,209, 38,139,210, 1, 74,178, 8,178, 38, 77,154,100,193,100, 96, 57,117,234,
+148, 5, 70,172,207,161, 6,216, 7,169,195,114, 95,168, 11,159,238,223,219, 33,240,234,133, 69,242,230,245, 93,216, 91,113, 23,
+162,214, 70,203,233,183, 19, 64,128,119,179, 23, 47, 93,177,224,231, 28, 73,222,158,216,182, 34,232,242,158,117,114,251,208, 38,
+121,120, 96,121, 80,179, 95,178,189,123,245,232,193,102, 76,124,215,205, 0, 45,216,104, 44, 90,181,122,221,170,181,155,246,238,
+ 58,176,231, 16,219,205, 39, 3, 45,108, 46,152, 10, 41, 9,219,138, 67, 90,111, 3, 2,102, 96, 80, 58,103, 6,104, 65,154, 49,
+109,217,178,149,243,157,209,180,220,191, 55,155,170, 83,103, 64, 75,187, 51, 80, 11,180, 32,185, 81,164,206,147,102,175,144, 34,
+149,127,151,140,217,242, 10, 87,164, 0, 58,130,126,235, 18,104, 57,179,209,178,130,160,143,192,144, 22, 56, 57, 3, 70, 90,149,
+161, 43,160,197,118,171,188,199,186,243, 81,167,211, 84,162,193, 59,109,177, 32, 41, 83, 36, 89, 4, 89,234,194, 0,245,101,225,
+117, 74,178, 8,198, 10, 21, 42,244,152,134,242,160, 89,206, 5,221, 83,246,162, 32,130, 46, 76,176,194,177,141, 18, 46, 74,237,
+ 49,209, 75,207,158,127, 60,200, 81,165,143,208, 86, 43,113,238, 70, 87,141, 0, 45, 0,164,109,232,131,222, 4, 91, 67,179,103,
+ 87,192,214,236, 50,101, 2, 60, 91,183,190,137,141, 31,222, 24,235,188, 49,214,121, 99, 81,233, 18,104, 65,170,227, 11,169,142,
+ 64,170, 35,144,234,200,168, 81,163, 20, 59, 26, 44, 90,228,250,249,245,114,247,100, 79,185,189,191,168, 2,182,120,184,176,209,
+ 50, 50, 46,121, 68, 74,225,241, 93,202, 2,145,159, 12,191,146, 71, 1, 89,149, 7, 37,151,200,137, 60, 86,120,132,243,200, 15,
+ 2,246, 27, 85,180, 52, 91, 98,131,135, 50,230, 64,154,245, 2, 55, 84,219, 51, 71, 54, 90, 81,177, 64,127,133,141, 48, 50,116,
+232, 80,142, 81, 90,251, 94, 27, 77, 2, 45, 26,187, 19,156,210,182, 13,244,189,211,103,203,103, 25, 51, 15, 11,139,251,183,197,
+247,241,107, 57,119,243,133,236, 57,243, 68,118,159,126, 36, 27,119,174,146, 14,127,118, 9,138, 18, 55, 17, 23,152, 14, 37, 91,
+144, 74, 77,251,243, 96,126,197, 70,139,105,196,179,239,101,228,179, 84,226,121, 53,185,228, 40,247, 29,170,255,165, 23, 22, 39,
+ 52,178,247,218,177,107,251,209, 84, 37, 34, 42, 42,196, 49,151,138, 83,125, 72,147,132,127,196, 65,187, 41, 10, 60, 52, 82,167,
+153,108,183, 92,100,161,128,220,121,104,246,240, 86,129,150,170,205,226,127,218,109,209, 30,204, 44, 49,119,126, 29, 14, 36,142,
+ 30,221,255, 17, 6,233, 27,165, 74, 41,170, 66, 72,111, 40, 9, 74,165,121, 44, 35,108, 73,158,221,174, 85, 75,174,102,201,162,
+228, 73, 10,195, 76, 35,140,213, 2, 45, 71, 54, 90,144,162,248, 98,213, 98, 8,104,197,142,239,225,243,224,221, 18, 57, 37, 9,
+228,132,196,148,211,146, 82,124, 94,254,116,231,221,133,106, 23, 31, 14,108,127,113, 79,189,197,119, 54,149,153, 43,107,243, 79,
+147,181, 5,166,203,241,145,123, 36,102,216,232, 70,213, 92,202,231,208, 64,157, 64,203,164,225,186, 17, 86,132, 56, 15, 36, 72,
+126, 20,207, 67,229,200, 14,165, 24,192,178,131, 81,122, 65,112,197,193,139,191,217, 73,168, 78,162,157,206,209,163, 71, 5,224,
+229,184,179,151,210,240, 29, 3,140,162, 46,164, 36, 11,157,215,178,105,195, 58, 75,149, 98, 63, 89, 42,150, 44,162,216,192, 0,
+ 20, 31, 2,136, 91,132,119,220,194, 42,106, 3,140,142, 55,113, 55, 34,104,218,187,120,112,246,154,217, 27, 54,108,152, 7,233,
+216,226, 2, 89, 98,189,190,178,103, 69,208,157,177,197,131, 30,206,170, 23, 20, 48,175, 97, 96,235,138, 57,222,137, 37,224, 48,
+164,168, 84,249, 24, 86,201, 65, 77,177, 4, 3,241,186,237, 59,118,175, 61,129,165,152,207, 49, 47, 74, 33, 20,128,244,234,216,
+145,245,242, 50, 96, 39,120, 98,138, 38,232,205, 0,120, 89,120,227,214,237,133, 80, 23,110, 87,233,189,245,127,182,243,253, 3,
+191,197, 0,153,235, 49, 1,211,158,202,112, 57,215,174, 93, 59, 11,223,190,104,211,150,237,139, 78,236,223,191,243,154,215,225,
+ 99,119,189,143, 28,127,118,226,232,174,151, 94,135,151, 74,128,255, 70,124,251, 62,103, 52, 9,108, 6, 15, 30, 92,153, 9,160,
+250,141, 42,209,194,132,173,168,188,202, 55,238, 39, 21, 42, 53,146,162,105,211, 74,163, 82,197, 20,201, 22, 84,134,159, 4,180,
+108, 96,200,129, 26,209, 21,208,114, 37,205, 34,176, 82,129,156, 74, 95,175, 51,208,133,131, 86,226, 74,117, 33, 37, 89,188, 6,
+ 3,117, 5,120,169,137, 82,216,247,239,223, 43,247,172,174, 31,156,145,183, 1,173,169, 83,167, 42,187, 55,121, 32,179, 54, 93,
+198,255, 16, 73,180, 8,180, 64,206,155, 96,107,114,255,254, 55, 85, 53,226,204,146, 37, 3,186, 52,106,116,147, 70,221,148,208,
+232, 1, 45,244, 77, 95,130, 61, 74,177,184,168,197, 51, 10,200,162,125,222,205,235, 39,228,254,181,101,242,240,188,167, 60, 62,
+215, 73,134,119,140, 26, 64,149,161,147, 93,135, 90, 62,124, 3,163,246, 42, 48,242,166, 75, 25, 27, 32,137,149,210, 35,214,183,
+153,195, 95, 30,112, 42,135, 2,178, 42, 13, 72, 70,144,197,157,192,105,244,250, 57,218,228, 84,238,126, 38, 40,196,194,251,144,
+230,101,142,128,150,199, 79, 63,253,116,134, 26, 17,238, 72, 68,222,225,142, 42, 9,155,113,182, 0, 60, 43, 32,139,234,194, 46,
+ 80, 23,214,109, 95, 63,232,188,207, 49,233, 63,253,119,121,252,252,173, 92,190, 19, 32, 59, 79,250, 73,249,134,185,164, 76,205,
+180, 50,123,209, 40, 41, 91,179,240,123,171, 26,241, 35,178,145,191,247, 72,142,111, 95, 22, 47, 99,152,203,241,210,135,125,152,
+174, 80,226, 87, 89, 74,164,124, 85,172, 90,222,103, 43,214, 46, 57, 79,128,245,203, 47,191, 40, 64,107,239,222,189, 7,126,200,
+147,216,210,235, 98, 82, 25,121, 45,159, 68, 77, 26,230,134, 94, 91,253,130,247, 43,113, 71, 32, 4, 31, 52,181, 72,201,196, 29,
+131, 86, 80,196,255,206, 14,222, 27,141,180,218,154, 54,224, 76,183, 16,103, 20, 41,169,157,113, 61, 65,189,117, 39,226, 23,252,
+180,175,238, 85,170, 45, 36, 37,169, 52,161,250,200,189, 67, 97,173, 49, 60, 63, 47, 97,180,104,207,252,176, 21,215,167, 80, 33,
+ 5, 68,165, 76,153,242, 9, 46,107, 13, 22,243, 20, 47, 94,252,185, 95,215,174,114, 45, 79,158, 15, 96, 44,118,108,251, 93, 9,
+ 14, 57,101, 4,104, 65,253, 97, 8,104,197,140,235,113,235,193,251,191,228,164,196,183, 1,173, 51,146,239,142,231,163, 41, 23,
+107,141,120,124,113,113,147, 45,255, 7, 90, 0, 91,199,135,238,150,104, 97,163, 26, 42,167, 90,120, 0,172, 11, 92,213, 82,146,
+165,149,104,193, 0,241,194,223,216, 20,246,115, 64,227,224,139, 50, 40,147, 3,197,199, 4, 91, 92,141,211,134, 78,181, 57,129,
+141,149,192,230, 73, 89,157, 3,112, 57,221,149,200,221,133, 24, 88, 44, 88, 97, 91, 0,202, 44,219,183,110,182, 84, 45,148,195,
+114,108,237, 92,203,226, 22,133, 44,149, 75, 21,177, 96,229,233,143,137,251,166,198,143, 22, 87,161,102,108,222,170, 97, 7,231,
+ 62,172,144,118, 85, 40,152,252,197,237,195,171,131, 30,142,200, 27,248, 98, 82,153,192,215,147,203, 5, 14,107, 83,149, 59, 47,
+158,230,207,159,159,131,180, 51,159, 90,246,108,175, 6,155,185,125,248,246,125,220,117,120,222,235,200,170,187,199,142,110,127,
+118,242,168, 2,142,130,110,223, 88, 70,246, 64, 34,103,111, 12,239,170,250,170,161,125,239, 2, 59, 54,209,240,253,201,253,251,
+ 54,201,214,251, 7,247,151, 6, 62,125, 60, 11, 52,239, 67, 53, 71, 80,100,184,156,116,225,128,114,110,166,225,251,153, 35,135,
+230,223, 62,114,112,221, 19,239, 67, 27, 44,135,247,175,144,155,215,102,147, 38,190,157,131,166, 67,154, 4, 40, 4, 89,148, 18,
+105,129, 22, 85,135,176,125,147, 98,101,170, 73,213,156,121,164, 83,174, 76, 50,185, 94,117, 69,229, 79,201,102,197,138, 21, 21,
+ 64,238,232,131,117,108,180,108, 2, 31,135,106, 68, 39,170, 67, 2, 48,167, 64,203,250,140, 22,104, 25, 4, 91,229, 40,161,162,
+ 68,139,160, 95,181,201,162, 36,139, 0, 11,192, 88, 49,140,231,239,201,147, 39, 91,144,247,137,213,229, 67, 37, 23, 21,109, 3,
+ 90, 4, 89,236, 59, 92,189,179,175,112, 76,204,150, 45, 91, 16, 54,229,100, 10,161,141,150,135, 10,180, 8,182,232,134,128, 54,
+ 90,148,104,209,102,107, 90,177, 98, 1,237,234,214,189,137, 5,141, 33,160, 69,219, 59,110,106,160,134, 65, 5, 89,148, 98, 82,
+122,253,232,254,101,241,127,112, 88, 49,140, 47, 83, 40,238, 35, 26,192, 59,241,163,101, 99, 5, 0,214,160, 82,221, 18, 11, 19,
+252, 69,113,247, 31, 23, 75, 97, 98,166,254,102, 71,215,237,153, 20,144,213,112, 70,106,130,172,149,184,206,157,139,186,253, 28,
+227,194, 24, 46, 0, 55,110,220,200,197,249, 9, 13,223, 91,115,131, 6,237, 5,113,205, 83,189,142,221,219, 39, 57,134, 81,250,
+138,107, 83, 28,213, 19,129, 22, 76, 54, 20, 73, 22, 55, 18,228, 44, 84,208,178, 97,255, 50,153,190,114,176,236,242,222, 43,151,
+ 0,178,246,158,125, 34, 43, 14,248, 73,143, 73,107,164,219,204,243,210,110,128,167,244, 26,210, 86, 34,197, 78,206,190,228,242,
+128,253,233, 92,168,223,188,240,142,163, 24, 67,143, 98,172, 63, 74,128, 85,180,104, 81,111,254,198,120,184,127,210,140, 9,167,
+146,231,139,242, 62,197, 79, 81, 2, 99,198,139,170,221,248,163, 71,254, 83,239,155,113,183, 96,248, 93, 58,110, 33,104,122, 65,
+208, 69,240,181,218,154, 8,202, 82, 26,126, 65, 8, 51,162,207,125,132, 69, 66, 72,234,239,120, 76,181, 79,183, 63,127, 40,139,
+ 35, 3, 52, 84,196,190, 59,119,238, 8,109,146,184,106,250,179,111,223, 64, 12, 56,187,145, 61, 39, 82, 1, 52, 78,111, 78,224,
+148,152, 80,196, 72, 26, 64,209,180, 61,209, 61,236,129, 22, 36, 13,190, 64,208,138, 93,214,154, 53,107,124, 33,241,240,133,132,
+130, 64, 75,215,246, 37, 90, 76,143,197,199,239,244,144, 11,146, 71,142, 73, 12,255,161,207, 26, 28,202,116,101,227,187, 28,215,
+182, 73, 14,207, 23,146,190,167,255,187, 50, 45,174, 31, 90, 88, 96,150,255,150,242,127,201,170,150,243, 36,114,216,200,234,246,
+ 98,221,178, 50, 3,108,151, 20, 63, 90,152, 84, 21, 27, 45, 72,113, 2,249, 31,182,108,115, 12, 17,112,158, 41, 31, 6,163,165,
+224,199,117,158,145,205,209, 54,103,103, 79, 55,162, 17, 41,213,182, 88,205, 43, 0,139,245, 69,123, 58,130, 44,238, 6,165, 4,
+139,117, 68,169, 6, 13, 83, 57, 32,235, 1, 45,170, 93, 48,160, 89,246,236,222,161,128,172,147,155, 22, 88,118,140,108, 99, 25,
+254, 75, 26, 75,227, 95, 43, 88, 32,129,180, 96,103,143, 41,137,160,230, 3, 56,144, 39, 40, 95,190,252,243, 94,189,122, 61, 60,
+188,111,227, 27,127,239,191, 2, 95, 76, 43,242,238,237,252,202,239,101,239,128,192, 71,247,239, 6,142, 25, 53,226,144, 3, 23,
+ 7,206,248,160,208,132, 74,229, 33, 38,222, 0,180,197, 19,176, 25,219,244,248,158,239,178,151, 15,238,175,144,215,175,118, 16,
+188, 96,226,221,110,150, 38, 84, 7, 15,160, 62,189, 11, 85,210, 65,240,101,153,229,217,179, 89,239, 45, 1,179, 33,246, 88, 7,
+177,161, 31, 12,153, 55, 56,112,239,224,178,156, 88, 37, 63,128,255,164,187,224,227, 33,212,221,242,199,119,239,204,126,117,255,
+222, 92,121,101,217, 64,154, 19, 38, 76,216,228,170,156, 90,160,133,254,104,105,221,186,181, 96, 55, 37,119,194, 10, 84,184,178,
+114,197, 74,233, 80,169,156,204,104,240,171, 92, 57,116, 64, 58,192, 21, 11,242, 9,118,171, 9, 36,143,175, 29, 21,206,153,131,
+ 82,123, 32,100,175,230, 83,213,152,142,104,186, 2, 90,170, 20,204, 25,125,157, 62,213, 92,117,225, 0,247, 26,138,141,150,170,
+ 70, 36,200,226,255, 1, 3, 6, 40,146, 44,158,241,191,173, 14, 61, 5,104, 17,100, 81,162, 69,144,165,149,104,129,103,205,168,
+ 34, 52,176,235,208,225,107,180, 64,139, 62,159,208, 63,189,135,117,237,122,147, 18, 45,130,173,169, 0, 91,221,126,251,237,166,
+158, 68, 11, 96,227, 30,203,166,130, 44, 46,156, 40,181,102,159,231, 2,139,227, 18, 65, 34,164,120,130,254, 73, 51, 1,221, 35,
+214, 15, 97,252, 8,166,152,234, 76,252, 94, 1, 91,144,242,180,170, 61,254,123,229, 26,213,134,176,201,242,129, 75,213, 92, 32,
+102, 84, 98,221, 68, 29,115, 96, 20,255, 10,207,197,176, 22,132, 78, 74,233, 18,130,246, 93, 42,173,232,216,172,161,140,165, 86,
+123,174,223, 28, 21,154, 64, 11, 64, 72, 1, 89,244,159,245, 93,214,100,129, 23,124, 46,139,247,165, 39,114,234,186,191,236, 56,
+245, 88, 22,237,185, 39,101,234,254, 36, 37,106,230,146,162, 53,114, 74,197, 86,205,101,208,220,221, 18, 62,122,124,127, 61, 70,
+ 96,193,178, 29, 18, 27,111, 72,155,189, 8,172, 0,220,143,220,243,245, 61, 26, 51,124,120,239,235,139, 23,123, 97, 60, 60, 0,
+ 96,187, 31,121, 14,128,255,135,161,138,223,169, 71, 51, 20,239,155,113,183, 96,248,181, 38,220, 66, 24,166, 25, 26, 25,191,114,
+ 99,120,123, 73,150, 83,247, 14, 92, 85,120,208,160, 29,206, 72, 23,194,254,225, 13, 59, 55, 59, 51, 68,244, 50,111,238,220,160,
+218,249,242, 61,111, 86,178,164,255, 81, 24, 59,178, 83, 51,209,166,161, 78,157, 58,216,153, 22,109, 10, 13,233,245, 24,142,193,
+231, 44, 6, 51,197, 24, 30,131,131, 47, 12,132,125,233,180,148, 64, 11, 6,189,190,104,204,190, 96,184, 33,160,133,119,253, 54,
+108,122,137,199,231,223,207,189,145,240,210,204, 71,177, 47,172,150,164,151,214, 73,170,203, 27, 37, 85, 87,127, 73,218,193, 95,
+ 98,183,122, 46, 17,126,123,246,104,210,216, 43,231,219, 21,110,254,144,207,232,149, 81,123, 31, 29,177, 40, 12,142, 31,170,126,
+180, 56,121, 97,103,223, 3,228, 9,137,225,186, 66, 26, 64,182, 22, 86, 76,143, 56,168,171, 98, 90,254,231,117,131,101,139, 2,
+ 0,136,249,255,133,162,159,167,116,139, 32, 11, 59,235, 20,144, 69, 99, 84,172,196, 20,144,197,213, 37,213, 13, 28,152, 93, 1,
+ 45, 24, 61,250, 16,104, 97, 64,179,212, 46, 91,192, 6,178, 70, 86, 74, 99, 41,155, 43,173,229,250,213,203, 22, 0,107, 11, 38,
+ 72,211, 64,235,199,248, 81,179,100, 73, 18,227, 66,135,198, 53,223, 31, 0,248, 43, 91,182,236,179, 92,217,211,188, 62,181,118,
+ 76,224,219,187,199,130,222,222,241, 14, 58,190,113, 90, 96,222, 28,233, 2, 99, 69,245,160,241,165, 43, 59, 16,133, 69, 25, 64,
+ 51,115,146, 24,231, 59, 55,171,253, 2, 59, 98, 45, 4, 91,168, 39, 14,138,123, 96,204,122, 14,237,242, 10,213,133, 80, 79, 28,
+116,226, 8,244, 35, 86,219,211, 4, 48,186, 79, 23, 14,220, 93, 8,122, 39,241,253,231,177, 2,223,135, 93, 95,123,157, 56, 44,
+213,165, 89,161, 66,133,251,144,148,236, 69, 57,183,162,156, 39, 65,247, 2,234,110, 63,108, 90,246,233,149, 83, 85, 29, 82,162,
+133, 9,245, 18, 37, 1,148, 90,209, 38,131, 18, 45,130,110,214, 57, 13,140,105,159,133, 69,129, 98,207, 3,155, 59,218,106,105,
+ 37, 12,186,205,204, 17, 16, 50, 40,121,242, 80,125,103,177,156,218,164, 85, 53,134,132, 62,253, 99,105, 92, 56,216,118, 23,170,
+ 42, 67, 43,184, 82,192, 22,175, 65, 10,173, 39,209, 56,197, 49,140,110, 18,216,151,232,114,133, 18, 22, 2,153,105,211,166, 81,
+213,222,142, 64,203,128, 31, 45,135,252,196,120,184,157,210, 44, 85,162,133,190,169,128, 5,218,104, 77, 44, 92,216, 6,182,146,
+ 69,138, 68,251, 73,167, 18, 35,140, 11,247, 8,166,104,255,228, 10,100,177,126,140, 2,173, 40,137, 61,102, 18, 96,105,193,214,
+143, 37,163, 6, 77,121, 90, 64,185,150,167, 65,220,160,240, 49,149,205, 4, 70, 60,185,171,223,159,145,237,142,234, 39, 0, 96,
+242,111,162,179,134, 70, 53, 35,205, 26,152,176, 3,145,115, 79, 10, 71,121,233,241, 29,245,162,128, 84,204, 69,222,241,146, 37,
+ 15, 60,123,237,166,140, 89,184, 64,134,205,158, 41,211, 55, 92,144,193, 75,175, 75,153,134,101,164, 64,249,132, 74, 42, 93, 59,
+167,116,155, 10,147, 9, 3, 64, 11, 27, 17, 22, 66,130,169,128, 44,104, 1,142, 18, 80,193,250,224,224,165,137, 19,189, 86,197,
+140,233,125, 99,233, 82, 47,188,251, 0,198,128, 3, 24, 95, 15, 66,141,203, 69,241,151, 58,204,184, 91, 48, 83,166,148,200,108,
+196, 45,132, 25,154,159,156, 87, 99, 12,175, 96,145,127,213, 97,143, 34,233,162,129,174, 26, 32, 81,122, 12, 16, 36,144, 16, 40,
+146, 19, 14, 68,119, 26, 53,146,251,189,122, 41,146, 44, 14, 80, 92, 9,110,128, 62, 30,141,239,254,158,237, 91,215,211, 53,132,
+ 14,115,194, 65,205, 65,103,157, 10,208,162, 36, 11, 18, 24,122,123, 80,128, 22,118, 10,249, 2, 52, 40, 64,203,224,174,195,240,
+ 97,227, 70,187,210,233,204,238,160, 74, 55,161, 38, 57,183, 92, 98,156, 95, 37,113, 1,184,226,182,126, 46, 49, 90, 0,100, 53,
+121, 38,249, 7,190,144,138,131, 47, 4,133,137, 20,143,158,216,195,135,160, 2,171,168,126,180, 48, 73,210,239, 75,245, 16,208,
+176, 61, 2,144,116,130,131, 98,151, 46, 93, 30, 67, 53,121,141,103, 2, 46, 94, 55, 65,119, 2,164, 56,138, 63, 51, 62, 75,144,
+197,109,252, 4, 89,144,140, 40,110, 55, 6, 13, 26,164,216,238,208,191, 18,243, 98,133,238,212,142, 14,171, 28, 31,250,204, 58,
+176,111,175,165,118,238,100,150, 13,125,235, 88,236, 65, 22, 37, 5,102,129, 86,218, 4, 81, 51, 21,205,148,194,239,232,202,153,
+178,164,117, 9,233,216,184,102, 32, 70,238,164,177, 98,120,244,143, 29,205,227, 66,148,136, 30,175,144,130, 74, 20,202, 29,216,
+191,132,199,219, 98, 25, 61,232, 74,193,229, 65,154,197, 50,166,184,119,124,221, 92,203,146,150, 69, 44, 93,154,214, 14, 32, 77,
+ 60,100, 38,172, 79,176,119,232,209, 52, 24,130,199, 20, 77,131, 33,120,108, 52,181, 64, 11,192,191, 30, 38,213,115,168,183,135,
+106,130,209,244, 19,216,107,248,195, 62,207, 2, 96,245, 20,101,190, 15,233,179, 47,126,211, 48,152,210,104,195,135, 61, 16,162,
+196, 12,215, 60,121, 93,143,136, 10,180, 20,151, 13, 90,176,165, 81, 53,134,132, 62, 61,190,211,243, 59,222,191,144,187, 10,185,
+187,144,134,239,170,186, 80, 35,201, 90, 8,143,248,180,201,171,164, 83,214, 83, 42,200,162, 68,139,210, 33, 30,112,237,192, 69,
+201, 14,236, 72, 12, 79,160,101,192, 51,188,163,215,132, 1,208,179,249,128, 34, 80,160,107, 7, 72,150, 21,195,238,223, 42, 86,
+188, 57,215,234,250,161,215, 15, 63, 60,163,223, 45, 16,113, 8,182, 8,180,216,207,245, 64, 22,203,142,141, 53,190,122,245, 99,
+189,159, 32, 74, 18,143,141, 90,176, 53,246,238, 79, 10,200,106,181, 44,157, 68, 78,236, 65, 64,241,131, 65, 90,182,108,144, 64,
+173,166, 43, 32, 26,196, 55,111,222,156,124,156,142,155,244,165,165, 30,177, 0,192,198,113,151, 44, 23,127,115,230,204,225,252,
+ 65, 79,228, 14, 15,180,109, 5,104, 17,100,113,247, 97,142,252, 37, 3,150,109, 63, 43, 61,134,181, 80, 64, 85,227,222, 67,164,
+245,164,243, 82,119,216,113, 41,214,176,129,114,173, 78,247, 63,165,118,247,133, 70, 85,135, 61, 0,128,143,194, 14,151,210,171,
+ 67, 0, 90,251,169, 46,196, 66,232,224,149,201,147,189,214,198,139,231,253,248,225,195,195,152, 3, 15, 66,138, 77,160,245, 37,
+119, 29,126, 46,119, 11,161,237, 22,194,108, 51,113,152,255, 43,151,104,185, 14, 42,109,255,113,170,195, 82, 58, 33, 77,153, 44,
+ 89, 0, 37, 38, 92,229, 41, 30, 98,211,167,151,107, 57,114, 40, 82, 44,130,172,237,232, 76,113, 99,199,246, 79,240,109,220,129,
+ 70, 28,150,194, 94,164,246, 31,127,252,113, 85, 5, 90,104,212, 10,176,194,138,194, 23,139, 8, 95,172,190, 21,208,197, 93,135,
+152, 36, 28,249,192,113,228,204, 45,107,172, 20, 73,239,180, 58,187, 43,168,141,239,113,201,124,117,139,196,187,184, 70, 1, 90,
+105,186,251, 75,245,137, 22,169, 52,244,106, 80,212,184,201,232, 11, 36,171,131, 26,214,115, 16,151, 22, 32,203,143,146, 1, 30,
+ 80,253, 80, 85, 67, 91, 39,103, 97,130,248, 10,151, 52,105,247, 69, 90,176,217,161,161,237,143, 60, 91, 61,195,187,178,251,178,
+167,153,153,219,162, 89, 23, 28,128, 9,138,185, 10,135,241,166, 34,205,128, 10, 86,177,137,160,115, 67, 74, 60,172, 59,123,166,
+218,125,191,141,166, 10,180,104,243, 82,167,124, 81, 75,141,108, 9, 45,191,228,207,100,147,100,113, 18, 51, 8,180,108, 52,127,
+ 72, 20, 45, 93, 17, 0,162, 99,235,230, 5,109, 30,210, 66, 70, 84, 76, 27,148, 62, 81, 52,218, 53, 5, 59,138,100,240,240,145,
+139, 43,222,203, 0, 15, 75,177, 76, 30, 87, 93,213, 81, 70,208, 44,158, 41,197, 93, 85,173, 57,186,114, 90, 11,104,210, 40,221,
+236, 97, 43,231,215, 66, 83,171, 58,180,151, 22,125,244,223,133,235, 5,189,246, 73, 70,218,237, 58, 84, 84,147, 58, 12, 14,214,
+ 62,179,193, 78, 11,125,166,162, 30,208, 82,223,227,132,190,195,126, 68,255, 88,148,190, 18,108,209,153, 46,129, 22,207, 6, 37,
+ 89, 54,154,152,240, 59,193,142, 43,136,198,219, 4, 89, 84,175, 83,122, 79,227,108,128,224,149,170, 31, 45,198, 56,100,172, 67,
+198, 60, 52, 18,130,135,124,130, 45, 99,249,110,221,186,237, 83, 37, 90, 52,122, 39, 88,192,132,237,141,177,206, 27,125,212,123,
+ 76,175, 94, 55,167,151, 40, 17,240, 30,187, 17,233, 73,158, 30,229, 53, 60,182,149, 19, 0,243, 30,165,109,148, 90,171,182,153,
+ 28,143,105,183,165, 26,240, 43,131,147, 62,208,178,231,103,146,143,192,214,157,159, 36, 81,142,136,247,177,195,144,121, 29,121,
+172,183,111, 6,246, 52,147, 65,226,251,138,106, 78,130, 45, 56, 47,165,227,210,183, 52,142,199, 78,237, 83, 53,107,214,124, 73,
+137, 23,191,131, 38, 13,112, 65, 67,251,223, 68, 46,198, 37, 69,117, 72,144,197,115,255,193,195,111, 22,173,216, 56,112,199,209,
+179, 82,170, 70, 26,169,215,111, 33, 60,183,159,146,178,125,142, 73,129,223, 39, 75,177, 42, 41,229,175,181, 43,229,187,172, 37,
+ 3,236,140,225,157,141,201, 63, 96, 60,223,134,113, 20,194, 53,175,131, 4, 89, 56, 19,104,237,135,166,229,192, 99, 63,191,195,
+104, 27, 7, 49, 71, 29,132,173, 50,119,135,106,119,135,235,205, 29,102,199, 36,251,185, 35,180,220, 45, 4, 43,103, 40,185,133,
+ 8,245,111,255,202,129,150,185,186,214,134,224, 73, 16, 55,238,144, 88,177, 98, 62,132,106,240, 37,108, 35,108, 14, 75, 41, 33,
+193,202, 50, 0,232,254,110,226,248,241,250, 25, 13,193,131,149,217, 17, 12, 14,116,235,239, 11,189,252, 29, 74,174,248, 27,157,
+200, 23, 78, 2,111, 66,220,172,248,213,226,117, 26, 41,154, 0, 69, 25,191,137, 31,231, 82,158,126,157, 31,215,222,191, 74,218,
+221,242,146,150,115,158, 73,197,126, 39, 36, 83,229, 33,143, 61, 34, 39,100, 28, 52,251,160,215, 42,121,151, 13, 6,246, 83,139,
+ 8, 52,105,163, 69, 59, 8,198, 58,180, 26,123, 46,114,193, 89, 61,160,165,120,134, 55,185,147,209, 17,205, 85,176,107, 83, 6,
+ 92,138,224,225,113, 95, 25,220, 48,225, 40,142, 44, 9, 10,177, 10,147,221,187,119, 11, 36,148, 28,208,156,198, 16, 84,129, 22,
+248,111,193,160, 98,185,122,229,162, 37, 0,147, 25,213,133, 42,200, 50, 11,180, 50, 38,137,177,228,232,170,153, 10,200, 26,246,
+203,143,129, 57,147,199,240,165, 26,209, 33,208, 58, 58,238, 29,129, 86,137, 76, 30,148, 58, 58, 29,204, 51, 38,137,185,228, 24,
+ 36, 89,180, 29,163,196, 45,103,178,232,190, 84,249,153,107,229, 74,238,255, 3,173,175,132,230,151, 6, 90,170,244, 74, 11,186,
+140,182,121,123, 59, 45,251, 29,138,170, 31, 45,123, 80,231,108,194,181,187, 94,201,234,249,189, 45,212,248,231, 9,180,112, 38,
+ 64,111,110, 64,146,101,171,119,130, 38, 72, 0,211, 3,112,113,172,249,191,207, 44,128, 44, 72,134,190,253,191,195,210,210,213,
+ 99,101,170,121, 44,108,202,146,149,140, 2, 45,140,117,107,185, 91,142,137,113, 14,177,240, 81,128, 2,195,240,192,187,249, 97,
+196,121,245,166,167,248,174, 24,247, 60,127,248,193,143,177, 17, 25, 35,209, 17,208, 66,223, 84,128,150, 30,200, 10, 1,208,226,
+235,108, 96,107,210,163,252, 82,164,109, 2,129,175,172,206,184,158,210, 96,159,114, 52, 46, 21, 66, 28,212,167,244,233,198, 29,
+146,112, 19,163,168,184,177, 83, 84,145,190, 83,226,197, 8, 6, 80,151,211,110,176,176,171,254,206, 64,209,140, 97,200,132, 58,
+217, 12, 41,238,230, 40,177, 19, 63,111,214,115, 90,208,226, 29,167,164,213,224, 73, 82,169,255, 9, 41,218,195, 75,234, 15, 63,
+ 42,179,215,172,146,106,191,123,190,143, 16, 19,190,180,130, 75, 8,157,142,201,144, 0,183,192, 14,238,221,144,106, 29,133,106,
+247, 16, 36,143, 7,250,245,235,119, 24,252, 62, 64, 73, 22,212,182, 7,177,168,221, 14, 45,139,189, 27,155, 80, 7, 27,218,113,
+ 9,191, 67,203,221, 66,176,114,134,146, 91,136,207,241,237, 6,155,220,191, 32,155,125, 80,233,157, 91, 55,109,128,253,213, 84,
+172,170,150, 39,137, 21,235, 54,210, 77, 12, 34,139, 98, 68,139, 50,129,234, 66, 51, 65,165,177,202,219,129, 85,204, 21,172, 32,
+174, 2,164,253,137,221, 98,151,104,159, 5, 87, 17, 87,129,178,135, 96,155,250, 69,136,111,125, 49,136,210,255, 77, 46, 87, 29,
+208,193,189,112,184,214,192, 35, 90,212, 5, 30,177, 98,220,244,136, 20,247,166, 71,132, 24, 11,148,107, 30, 88,159, 57, 63, 92,
+ 54, 24, 6,122,182,250,209,122,132, 29,115,119,161,250,124,248, 9, 1,160,149, 82,112,199,162,213, 23, 23, 39,135, 52, 88,233,
+225,175,226,155,139,182, 26,206, 14, 71,229,164,247,247,205,148, 90, 17,108,169,206,235, 56, 32,147, 30,213,133, 92, 89,194,214,
+136,210,136,134,174,248,137,129,204,135, 0, 11, 3,186,226,139, 8,198,187, 31,129, 44,179, 64, 43,111,202, 88,199,230, 54,206,
+ 31, 68,144,149, 35, 89,140,187, 84,207, 57,250,184,220,105, 61,206, 80,170,197,244, 83, 58, 15, 71, 46, 40,108,223,158,247,251,
+152,199, 22, 52, 47,160,128,172, 92,201,162,223,113, 70,211, 64, 87,252,234,104,106, 85,135,122, 18, 45, 29,231,159,166, 6,201,
+144, 0, 45,242,159, 42, 68, 35, 62,178, 92,208, 55, 82,206, 74, 24, 55, 56,169,186,242,151,165,109, 14,193,128,150,209,120,135,
+142,242,105,136,126, 84, 78, 72,239,151, 0,100,236,195,216,182, 31, 99,103, 79,140, 29,123,168, 54, 68,104,167,253,152,216,129,
+173,126,216,197,120,135,216,121,119, 32,165,135, 71,247, 28, 97,195, 78,196, 74,176,164, 35,154, 4, 90,236,219,170,102,193,145,
+ 36, 43,132, 18, 45,245,117, 73,176,187,112, 62,118, 34,222,143, 28,223, 99, 34, 46,114, 99,142,158,231,123,245, 89,103,117,148,
+ 4, 99,202,126,248,202, 82,236,181,104,194,128, 13, 12,220, 53,203,197, 42,109, 6, 67, 30, 80, 59,114,220, 36, 0, 82,199,178,
+254, 92,217,210,118,232, 26,233, 51,235,152,116,155,114, 84,106,117, 95, 32, 41, 51, 23, 9,112,226,176,212, 85, 91, 10, 11, 91,
+173,182,152,151,182,194,152,255, 48, 36,143,135, 9,142, 49,142, 30,194,124,117, 16,117,181, 21, 11, 85,110,172,176,231,137,145,
+246,105, 96, 40, 10,150, 69, 75,115, 36, 55,163,133,130,187, 5,251,114,134,212, 45,132,195,126,100,246, 3,221,249,173, 28, 32,
+216,162,100,139,106, 68,218, 93, 57, 50,114,167,209, 60,237,185,152,135,121,249,140, 29, 3, 29, 53,194,212, 88, 21,108,196,192,
+154,157,121,209,120, 43,193,174,228, 12,207,252, 15, 41, 86, 37,164,115, 16, 39, 55,117, 82, 25,159,187, 97,127,244, 90, 72,157,
+106, 3,120,180,228,153, 55,121,134,147, 56,219,255,144,148, 19,252, 44, 14, 9, 84, 45,168, 15,170, 1, 92, 85,130, 45, 85, 53,
+ 12, 68,181,176,210,112, 4, 46,245, 6, 52,130,173,249, 52,116, 7,144,189,207,179,154, 96,107,226, 71,159, 91,184, 79,149,161,
+ 35,251, 15, 27, 63,185,211, 20, 43, 70, 31, 38,238, 44,100,162, 61,150,125,194,164,241,145,234,207, 89,189,167, 79, 20,253,231,
+188, 41, 98,236,207,146, 56,250,190, 12, 9,163,165,255,132, 14,102, 43, 39,105,230, 73, 17, 11, 52, 99,236,253,175,209,212, 58,
+ 44,229,111,189,255, 46,248,109,186, 31, 89, 37, 80,158,161, 73, 83, 75,203, 9,125,211,229, 52,208,198,190, 20,205,212,152,188,
+ 23,193,238, 82, 29,235,126,193,216,183, 19,227,219, 47,214,177,238, 23, 72,211,118, 99,172,107,168, 55,134, 64,170,227, 5,208,
+114,207,154,124,105,135,197,132,255,119,153, 0,196,238,168, 9,227,169,214,127,149, 61,105, 87,223,158, 0,153,233,208,152, 99,
+ 80, 76, 3,124,212, 27,151,212,251,244,191, 72,251, 51,142, 65, 67,144, 56,182,103,213,161,111,164,142,190, 9, 31, 37,110, 11,
+186,112,160,209, 59, 83,164, 88,201,246,187, 8,193, 99,132,102, 58,240,122, 32,234,105, 21,234,110, 47,210,106,140,119,131, 80,
+214,116,122,117,100,130, 95,122, 89,181,229,140,142,204,116, 60,250,169,238, 22,140,124,187, 94,185,204,180, 37,179,180,254, 13,
+249,117,195, 15,126,174,143,252, 90, 42,215, 93,206,208,109, 1,110,126,186,249, 25, 90, 28,112,183,165,208,226,228, 7, 58,110,
+126, 26,231,167, 17,151, 22,110,126, 26,231,231,191, 61,167,107, 99,248,207,248,245,238, 70, 24,186,204,117,243,211,205,207,208,
+226,128,187, 45,133, 22, 39,221, 0,198,221,150,220,109, 41,116, 57,240,117, 82,115, 41,209, 98, 39,113,148,204,124,170, 51, 26,
+174,174,235,209,119,211,116, 92, 47, 33,173, 47, 55, 63,221,252, 52,218, 6,220,125,211, 57, 7,140,242, 80,155,207,205, 79, 55,
+ 63, 29,113,224,191,220,150,244,250,132,251,190, 9, 14,184, 87, 58, 38,152,101, 32,171,155,159, 6,152,100, 34,139,155,159, 38,
+152,101, 32,171,155,159, 6,152,100, 34,139,155,159, 38,152,101, 32,171,155,159, 6,152,100, 34,203,231,224,167,137,215,255,227,
+178,186, 85,135, 58, 85,242, 57, 26,140,155,102,232,246, 3, 55, 63,221,252, 12, 45, 14,184,219, 82,104,113,242, 3, 29, 55, 63,
+221,252, 12, 93, 14,124,221,212,190,184, 81,252,191,177, 3,210, 64,146, 49,187,246, 32,209, 3, 51,207,252,111,111, 56,105,244,
+219,185,187,103, 48, 18,119,242,145, 30,207, 3,145,184,219,196,254, 48, 74,211, 76, 51,253, 42,105,114,187, 60,118,169, 13,103,
+194,238, 43, 37, 97,215,213,112,236,156, 84, 18, 92,135, 12,199,206,161,158,159, 17, 96, 59,219,250,254, 17, 63,213,178,106,203,
+169, 45,235,103, 46,167, 51, 22,124,149,245,110,166, 97,187,200,251, 79,248,246,180,216,221,230,141, 50,134,216,233,113, 8,121,
+241, 79,248,118, 35, 69,119,151,211, 8,151,140,231,249,162,252,196,248,246, 59, 60, 9,112, 39,172,189,223, 49,227, 37,254, 58,
+115,186, 6, 89,112, 16,186,155, 73,253, 54,108, 17, 62,128,129,192,207, 76,226, 51,118,188, 9, 86,185,188,143, 73,208,207, 62,
+ 97,162,121,233,236, 61,184,199,208, 33,218,227,139, 54, 24,187,119,211, 61,194, 6, 76,226,203, 39, 78,156,248, 43,124,224,116,
+129,115,208, 14, 8,201,179, 12,215, 55, 35,105,193,150,145,114,230,131,247,233,203,240,179, 51, 4, 30,174, 91, 35, 8,116, 39,
+ 56, 66,253,179, 81,163, 70, 51,225, 64,145, 14, 86,115,253,131,190,221, 76,179, 55,242,237,102,232, 49,111, 48,154, 4, 88,112,
+164, 58,149, 9,161,160,166,194,171,243, 84,132, 82,153,138,216,156, 83,225, 11,108, 42,188,123, 79, 37,216, 10,109,160, 5,151,
+ 23, 57,240,238, 67,240,131,246, 30,231,131, 72,217,244,234,200,190,172,240, 79,102, 43, 43,130, 32,124,150,114, 26, 96,238,103,
+175, 35, 3,101, 48,146,197, 81, 57,155,192,141,201, 10,248,165,186, 3,215, 40,167,225,190,132, 33, 94,236, 61,139,187,162,173,
+247,237,177,240,240, 40,196,226, 59, 8,215, 11,119,224, 15,235, 32,255, 35,241,186,179, 67,143,166,246,185,180,133, 11, 23,102,
+ 16,116,129, 87,122,198, 94,117, 6,182,204,208, 52,194,203,143,250,145,209,135, 66,187, 31, 25,120,175,251,219, 13, 48,201, 68,
+ 22,167,252,164,235, 38,140,149, 43,144,110,192, 85,200, 27,120,191,127, 3,255,150, 55, 16, 55,118, 37,156,206,186,138, 93,236,
+148, 38,230,115, 58, 34,167, 67,238, 23,232, 67, 15,176,200,188, 9,250,116, 83,161,235, 54,196, 30,139,152,248,198,191, 59,171,
+126, 8, 30,124, 92, 97, 38,181,164, 88,133,223,162, 83, 60, 4,112,181,197, 52, 68, 0, 92, 37,248, 42,175, 51,238, 33,226,226,
+ 41, 81,227,233,177, 24, 30,142,133,207,184,154,116,128,110,111, 99,146, 81,253,234, 41,103,254, 7,240, 10, 36, 93,251,131,215,
+ 24,227, 75,111, 34, 11, 5,238, 26,237,212,173,208,128, 22, 4, 4, 88,206, 63,124,244,244, 82,165, 90,191, 87, 93,190,114,101,
+ 83,120,139, 95,130,129,115, 53,202, 65,201,150,122,232,209,140, 5,144,117, 5, 33, 58,234,122,246, 27,212,190,226,175,205,154,
+228,248,185,100,165,166, 77,127,175,140,208, 15, 3, 16, 78,103,154, 21,108,105, 37, 91,122, 52, 61,208,152, 55, 97, 98,191,200,
+132,223, 91, 12,240, 70,151,166, 1, 26,246, 89,244,104, 58,114, 30,235,202,161,236, 71, 19,132, 10, 94,224,192,113, 42, 60, 57,
+ 79,197,164,197, 0,181, 83, 17,106,104, 42, 28, 12, 78,133,163,193,169, 0,246,161, 13,180,194, 97, 80,186,189, 96,193, 2, 25,
+ 49,124, 56,227,254, 49,217,251, 44,250,232,219,213,178, 18, 84,193,241,224, 84, 56,228,157, 10, 79,230, 83, 17,126,106, 42,188,
+240,187,129,150,235, 6,102,207,207,238,136, 40,161, 56,112,164, 35, 71,134,157,162,179, 94, 56,148,124, 12, 50,169, 13,182, 85,
+ 87,237, 51, 62, 64,244,163,201,147, 39, 43,129,145, 25,160,157, 81, 21,224, 37,156,113, 72, 31,129,126,124, 39,239,208,107,243,
+182,199, 40,201,130, 31, 62, 65,123, 80, 28, 12, 99,161,197, 0,245,142,192,150, 81,154, 97, 48, 78,182, 71, 90,135, 62,191, 21,
+169, 31,232, 57, 11,157,227,138,102, 98,248,248, 58,136,197,173, 31, 19, 36, 18, 74, 2,189, 64,117, 33,204, 69, 50,198,121,193,
+127,237,162,218,104, 57, 13, 86,143,146,205, 77,211, 12,183,244,243, 58,228, 39,234,179, 9, 22, 18,111,224, 47, 76, 0,176, 4,
+206,115, 37, 75,150, 44,108,147,146, 63,127,126, 41, 94,188,248,155,162, 69,139, 54,209,107,243,249,178, 39,108,148, 47,103,162,
+219, 63,231, 74,226,203, 84, 40, 95, 26, 70, 19, 17, 56,249, 85, 66,196, 49, 33,216,253,123,248,137,188, 9, 90, 78,193,150, 53,
+168,116, 48, 44,162,255,105, 95, 73, 14, 53,190,144,182,184, 64,182,183, 24, 52,154, 97, 19, 16,251, 73, 55, 49,240,180, 30,208,
+ 2,170, 85,128, 22, 7, 48, 53,169, 64,139,128,206,254, 61, 12, 92,205, 24, 95, 95, 18,104, 85,207,232, 33, 76,244,102,205,164,
+253, 95,240,135, 40, 12,113,243,235,253,135, 79,175, 32,157, 40, 84,170, 70,145,174,117,234,228,189,126,254,124, 43,120, 18,158,
+135,114, 82,141,104, 20,104, 13,201,149, 43,215,224,158,127, 14,238,224,115,203,239,228,109,223, 7, 71,139, 84,168, 95,177, 84,
+185,170,197,127,250,233,167,108,136,173, 53,102,248,240,225, 43, 65,108,160, 9,154, 30, 8, 23,116, 17, 82, 29,101, 0,199,111,
+ 74,197,244,142, 47, 61,160,209,121, 35,189,212, 43,206, 95,173, 7,127,243,154,226,216, 81,175, 83,243,190, 10, 94,192,247,169,
+151, 47, 95,158,138, 9,113, 42,226,199, 77, 69, 32,237,169,107,215,174,157,138, 96,181,161, 14,180,146, 38, 77,154, 25,113, 58,
+ 95,143,131,151,107, 53,124, 12,206,239, 81, 28,173, 26,241, 35,126, 82,101, 72,201, 27, 1, 33, 60, 79,191,196, 10,239, 45,194,
+197, 40, 9, 65,135, 95, 0, 80,115,162, 61,105, 77,140,165,102,127, 56,170,163, 84,112,118,185, 18,233, 38,158, 15,100,194, 96,
+121, 19,255, 71,227, 97,109, 0, 95, 67,252,212,100, 74,142,223,244,176, 94,222, 73, 42, 7,207,222,206, 0,141,179,182, 20, 90,
+ 52,191, 3, 47,131, 16, 30, 69,241, 52, 94,162, 68,137,183, 21, 43, 86, 12,162,199,113,254, 71,121,219,233, 53,118,235,125, 87,
+109,190,209,226,197,139, 5,139, 29, 37, 78, 40, 34, 42, 88, 16,240, 93, 24,114,139, 1,218,241,124, 67, 35,237, 83,167, 28,149,
+ 80,238,231, 92,176, 2,116, 11, 2, 76, 19,196, 57,138,157,234,170,156,116, 82,220, 21,105, 51, 36,122, 47, 59,119,238,236, 15,
+ 41,238, 43, 44, 48,252, 59,118,236,120, 18, 64,233, 50, 38, 81,163,230, 7,148,196, 15, 64, 8, 52, 95,132, 47,122,205,152,143,
+ 28,143, 25, 67,145,139,107,134, 29, 99,100, 12, 46,174,153, 56,182, 64,178,171, 93, 84, 87, 52,200,119, 51,217,190,200,184,132,
+126,243, 22,133, 98,189,146,159, 30,122,255, 13,246, 77, 51,223,233, 40,239, 23,249,118,128,229, 22, 88,236, 43, 99, 25,164, 87,
+ 10,184,178, 79, 0, 90,130,240,123, 82,169, 82, 37, 71, 42, 64, 91, 57,243,231, 74,228,243,232,234, 12,145, 39, 75,149, 52,122,
+ 80,227, 0, 2, 45,132,233,147,209,163, 71, 11, 3,136,115, 81,132, 0,226,239,172,146, 45,135, 60,114,132, 69, 62,149,153, 95,
+240,121,123,181, 97,240,255,206,128, 22, 59,218,145, 35, 71, 4,171,111,221, 68,160, 69,112,230,234,163,112,255, 14,165, 96, 20,
+153,171,137,255, 41,209, 34,226,181,127, 15,175, 65, 10,102, 52, 18,189,250,234,134,152,108,198,226,143,209,213,109,176, 34, 19,
+ 92,161, 49,212,114,148, 48,160, 61,198, 0,220,233,215,223,255,172, 83,161, 90,179,146, 91,230,207,111,124, 99,199,230,214,143,
+ 14,236,170,139, 54,197,201,210, 76, 89, 15, 77,152, 48,161, 69,133, 58,157, 90,250, 61,124,114,254,209,147,231,231,250,244, 26,
+244,219,140, 17, 67, 27, 44, 29, 49,180,154,247,193,125,213, 17, 99,107, 23,104,234,121, 97, 15, 86,126, 2, 45, 14,146,108,216,
+ 0, 6,142, 98, 6,126,193,118,247,209,171, 20,144,197,195, 58,184,241,191,163,107,124,208,165,132,139,224,133, 42, 67, 85,154,
+ 69, 0,163,130, 23, 21,192, 96, 16,209, 2,152,147,160,233, 8,196,232,242, 3, 3,209, 22, 14, 70, 88,141, 73,231,142, 29, 95,
+243,172, 1, 90,174,188,112, 43,180,213,178, 18, 16, 18,100,177, 93, 59, 58, 88,111,200,206,114,234, 29,233, 17,112,253, 41, 36,
+ 98, 65,156,248, 72,143,147, 33,251, 79,229,202,149, 95,162,253, 19, 96,135,215, 35,226,228,126, 57, 4, 37, 47, 4,105, 75, 1,
+ 71, 9, 32,167, 48,202,238,108,133,235,236,149,161, 69,147,109,162, 34,248,191, 9, 17, 15, 70, 90,219, 72,118,134,120, 97,112,
+ 98,132,181, 97, 72,151, 79, 58, 48, 70,173, 97,248, 42, 72,154, 89, 23,197,173,196,138, 55,107,214, 76, 9,210, 14, 41,233,167,
+190, 35,109,161, 66,133, 30,158, 58,117, 74,145,196, 81, 98,182,101,203, 22,129,233, 0,105,115, 81,233,202,102, 75,253,182,140,
+ 80,107,122, 35,150,233, 37, 0,181, 64, 6,148,231,162,152,225,121, 16,206, 76,209, 58,244,234,213,235, 56,164, 83, 43, 12, 48,
+131, 32,107,208,212,169, 83,159,176, 77,214,173, 91,247, 61,191,159,113,109, 41,141, 32,136, 85,227, 21, 34, 52,141,192,188, 65,
+ 1, 91,118, 64,203,213,107,158,225, 38,121, 25,203, 64, 89,140,100, 33, 61,198, 71, 84, 18, 34, 96,188,198, 2,227, 53,234,237,
+ 53,192,234,107,244,131, 46,248, 12, 61,233,184,237, 61, 24,211,223, 89,203, 71,143,248, 97,244,254, 27, 41,224, 23,200,147, 12,
+ 99,219, 10,164,167, 72,207, 81,230, 53, 24, 99, 82,154,121, 47,198,175,120,144,100,189,197,124, 97, 3, 87, 88,248,115,252,144,
+242,229,203, 11, 2,180,219,174, 99, 81, 32, 45, 91,182,124,139, 62, 16,207,217, 59,242,231, 72,244,123,254,156, 9,125, 11,230,
+ 73,226,199, 84, 36,127, 90, 69,162,213,179,103, 79, 37,174, 37,133, 40,140,121,201,112,112, 0,120,239, 81,238,229,160, 85,204,
+158,222,191, 4,104,169, 0,235, 35,160,229,105,175, 23, 69,197,221,226, 0, 78, 20,170,149, 64, 57,251, 13, 80, 64, 80,116,219,
+ 85,101,163, 51,248, 50, 31,197,230,106,226,127, 72,173, 20,213,161, 61,109, 94, 11, 1,208,234,132, 65,114, 52, 80,243, 8,148,
+197, 52,216, 82,129, 22,218, 8, 39,148, 96, 9, 52, 79, 66, 98,210,113,217,234,181,205,255,108,214,172,200,245,141,107, 90,191,
+244, 58, 56, 74,174, 93,154, 13,160,185, 26,239,211, 74,180,244,218,253, 99, 76,140,157,114, 21,169, 81,163, 66,221, 46,181,250,
+121, 14,253,125,229,212,233, 93, 14, 45, 89,208,235,236,178,133,237,175,237,221, 89, 21,239, 39,112, 51, 3,222, 60, 0,174, 20,
+160,197,160,223, 80,115, 49,142,226, 63,229,224,224,167,224, 11,214,249,250,245,235, 85,176,165, 92,163, 10,154,170, 20,235,160,
+167, 91,102,130, 23,218,101, 65,125, 52, 21,109, 84, 1, 48, 92,125, 59, 59, 40, 29, 5,209,147,186,132, 29,100,192,160, 84, 0,
+224,237,117,219,182,109, 41, 37, 36,200,122,129,228,143,116,151, 54, 91,122, 52, 89, 86,218,101, 81,189,201,114,178,140,156, 16,
+ 17,247, 78,184, 64,225, 98,131, 64,201, 10, 64,117,203,136, 73,118, 22,250,107, 16, 37, 34,144, 98, 8,192,166,114,134,116, 79,
+ 81,225,195,174,194,130, 60,125,245,202,229,228,126,121,103, 32, 75,189,142,114,154,221, 85,227,144,230,173, 91,183,126, 70, 27,
+ 93,139,152,119, 55, 67, 64, 83, 45,254, 55,249,242,229,179, 48,144, 58,234,232,126, 8,191,217,246, 24, 65, 16,212,185,130,243,
+ 43, 92, 84, 39,236,112, 8,126,252,138,128, 8,106, 21,218, 84, 25, 61,210,194,214,229, 86,145, 34, 69, 30,193,180, 64, 73, 8,
+ 76,255,156,109,157,193,149,255,250,235, 47, 41, 93,186,180,192,222, 83, 1, 54,253,251,247, 23,128, 35, 26,200,187, 58, 34,195,
+ 62,237, 56,120,103, 33,184,226, 4, 70,224,195,122,231,248, 9,213,185, 34, 33, 67,155,184, 11,224,169,199,143, 96, 32,139, 96,
+ 11,237,230, 57,181, 12, 28, 63, 8,178,216, 79, 1,232,133, 32,139,139,110,190,131,239, 67,219,119,185,168,214,124,192, 51,107,
+159, 22,128, 34, 6,182,143,101,148,121, 78,242, 17, 96, 41,227, 4,233, 81,229,133, 57,130, 18, 65,218, 3,209, 20,229,223, 14,
+180,146, 18, 92,161, 13,188,193,124, 68, 33, 5, 23,212,111,208, 46, 95,148, 44, 89,242, 59,163,188, 5,168,223, 72,222,169,146,
+172,218,181,107,203,176, 97,195, 40,197, 13,196, 56, 23, 88,175, 94, 61,249,249,231,159, 21,176, 69, 0,214,174, 93, 59,105,221,
+186,245, 70,163,244, 49,167,251,105,129, 22,193, 22,251, 21,207,144,154, 42, 11, 11,168, 38,131, 64,175,158,150, 38,198,181,143,
+176,136,209,119,254, 3,242,233,187,119,176,183,209, 34,208,226,196,197, 1,129, 98,116,189,100, 4,104, 49, 54, 23, 87, 93, 20,
+ 77,171,137,255,209, 81, 2, 57,105,216,191,131,226,106,130, 51,147, 12,236,228,233,233, 57, 21, 42, 30,238, 60, 51, 13,182,168,
+ 42,164, 52,203, 17,208,130,225,234, 68, 12,184,123, 81,174,133, 55,206,158,109,245,104,203,250, 6,114,249,194,108,121,251,250,
+ 97,185,114,229,182,161,156, 90, 27, 45,189, 98, 31,194, 74,177,119,237,250,141, 42,214,109,216,186,210,220, 33, 35,155, 31, 94,
+ 48,183,247,205,109,155,166,222, 91,191,170,223,203,179, 39,187, 1,104,158, 3, 17,151, 18, 45, 70,179,103, 32,110, 53, 97, 37,
+226, 71, 80,193, 21, 62,130,215,222, 71,163,190,168, 38,230,213, 43, 20,239,163, 19,110, 6,128,184, 72,233, 24,129, 27, 6, 49,
+133, 70,170, 84,169, 46,194,248,248, 34, 6,180,139,208,229, 95,196,196,198,235,134,104, 90,223,171, 72,175, 56,120,179,189, 80,
+ 29,195,131,170, 8, 78, 16,214, 1, 84,171, 82,116, 90, 92,130, 23, 26,191,163,125, 78,197, 42,123, 42,165, 88,164,133, 13, 10,
+138,253, 14,129, 7,129, 27,129, 12, 39, 54, 19,210,162,143,222, 9,112,164, 76,130, 0, 5, 65,170, 36, 11,188,201, 2, 30, 56,
+179,131, 9, 70, 67, 45,171, 10, 8, 89, 78,130, 34,246, 1,126, 59,219,190, 42,229,194,131, 39,245,234, 8,210, 44, 95, 78,172,
+ 4,106, 4, 89,152,116,149,111,101, 95, 34, 95, 41, 45,193,132,249, 14, 41, 0,131,233, 93, 0, 25,246, 3, 87, 70,173,218, 87,
+126, 49,160, 5,155, 16,170,198,105, 27,178,230, 19,128,150, 7, 38,130, 39, 4, 90,152,108,158,232,241, 78,239, 62,192,208, 19,
+ 78, 8, 0,171,193,104, 97,194,121, 98, 5, 90,134,223,129,201,198,155,245,195, 67,149, 58,178,142, 86,175, 94, 45, 84, 79,206,
+158, 61, 91,153,192,176,194,127, 73, 27, 48,180, 41, 71,234, 67,251, 34,119,135,106,252, 50, 65, 22, 77, 4, 72,131, 11, 82,218,
+171, 65, 18,169,244, 41,242, 2,146,178,151,152,140,159,234,124,111, 95, 85,146,197, 51,242,238,194, 51, 47,154, 54,109,170, 0,
+192,178,101,203, 42,210,141, 53,107,214,216, 64, 22,199,104,142,203,232, 7, 46, 23,213,154,247, 62, 99, 29, 67, 2, 73, 16,105,
+ 3, 69,168,115, 69, 85, 23,130, 35, 34,158,161, 36, 43, 24, 61,216,213,177,159,247, 0,171, 13, 75,179,248,110,141,170, 80,145,
+104,233,253, 15, 65,121, 67,245, 17, 74,130, 8,178, 52, 18,117, 69,186,142,246,250, 6,224,104,131,209,151,209,246,142,128,135,
+ 64, 10,115,154,192, 76, 69,218,180,105,179, 2, 52,162, 2,176, 69, 69,253,175,192, 98,195, 38,213, 34,240,194,156,202,246,233,
+240,208,147,104, 81,176,194,118, 10,243, 14, 10, 86,130, 90,181,106, 37,243,231,207,167,228,140,166, 23,140,133,105, 59,236,177,
+136,209,111,250, 42,243, 81, 52,204,149, 13,197,210, 70, 18,118,122, 9,109,176, 92,125, 44, 6,148, 23, 4, 85, 14,146,162, 2,
+177,127, 15,175,129,230, 93,147, 12, 84,128, 86, 72,193,150, 35,160,181,102,217,130,154,249,210, 37, 59, 95,161,120,161,119, 20,
+109,194, 56,240, 32,196,235,127,161, 83,223,219,190,105,158, 84,168, 80,129, 13,156,201, 72,108, 44,245,115,134,161, 97, 79, 2,
+194,239, 93,182,112,254,156,171, 7,255,249,235,185,133,115, 58, 61, 88,183,172,255,171,117, 75,187, 99,100,222,143, 85, 37,193,
+ 27, 93, 63, 56, 61, 8,126,236, 55, 18,176,222, 56,232,114, 2, 87, 15,254,102, 94, 35,188, 36,200,162,148,133, 7, 7, 85, 78,
+222,234,196,174,130, 23, 14,242, 4, 47,152,220, 12,209,212,188, 87,177,199,226,132, 64, 21, 5,219, 13, 87,229,188,134,228,202,
+ 70, 43, 88,209, 9, 94,208, 62, 20,105, 22,236, 8,109, 64, 11,234, 57,241, 4, 45,130, 16, 21,200,240,127, 72,129, 22,118,182,
+ 41, 18, 39, 78,140,168, 47,170, 15,149, 65,206, 8, 31,213, 60,116,229,192,178,106, 1, 33, 39,115,110, 34, 97, 27,231,130,134,
+229, 51, 42,209,194, 64, 27,192,103,249,141,170, 20,139,223, 74, 94, 18, 84,178,206, 88,223,172, 43,108, 16, 16,136,254,105,236,
+186,208, 96,153, 63, 27,208,234,221,187,119, 93, 74,177, 40, 25, 67,187, 97,128, 97, 78, 18,219, 96, 79, 87, 48, 36, 64, 11, 3,
+182, 23,218,170, 31,192,127, 0,192,193, 91, 76, 28, 1,224,181, 31, 19, 87,212,234,238,102, 7, 59,151, 29,178,130,244, 0,158,
+ 3, 48,161,188,197, 98, 34, 0,109,204, 15, 11, 61,133, 30, 22, 50, 1,176, 97,122, 11,128, 16,128, 73,202,126, 39,180, 51,214,
+166,197,226,236, 1, 65, 22, 23, 63,108,155,156,104,184,168, 0, 45, 5,188,227,251,105, 96, 95,201, 42,201, 50,162, 54,220,132,
+186,126,203, 5, 4,193, 22,108, 70,149,190,206,246, 64,201,211,230,205,155, 21,169, 1,212, 60, 15, 1,180, 93,246, 77, 72,188,
+ 78, 58, 21, 1,107,110,192,102, 84, 81,249, 16,100,113,140,102,219, 50, 3,180,160,218, 18,168,179, 57,193,114,177, 34, 4, 69,
+ 80,245, 11,233,154,149, 64,145,209, 0,109,175, 85,208,166,165, 23, 18, 90,214,138,227,184, 67,201,180, 58,126,235,253, 55,216,
+149, 66, 63, 27,128,214, 35, 44,132,181,166, 11,202,111,236,124,167,186,251,133,209, 55,162,111,188,167,225, 59,129, 22,164,172,
+ 4, 81,239,209,102,108,230, 6,184, 30, 30,117,244, 30, 11, 88, 37, 15, 85,138,144, 66, 17, 20, 57, 60,156,217,104,193, 60, 70,
+105, 73,156,163,174, 93,187, 70, 59,199,183, 16,128,204, 6,160,157,201, 77, 45, 67,134, 12,225, 88, 74,187,210,127,195,161,235,
+218,129, 86,254,162,221,117,168, 2, 45, 50,199, 72, 98, 71,167, 13,150, 43,110, 81,220, 76,187, 47,237,193,255, 4, 94,156,184,
+237,223,195,107, 84,207,152,172, 1, 27,208, 34,216, 2, 82, 31,130, 65, 18,115,173,177,195, 94,117, 72,144, 85, 38,103,154, 71,
+199,214,206,149,197, 45, 10, 75,197, 18,133,222, 3,233,143,163, 26, 17,171,170,135,223,198, 86, 0, 66, 43, 36,186,126, 48,122,
+176, 67,167,197, 74, 34, 0, 3,227,102, 76,186, 99,142,237,223, 95,227,218,134, 85,181,222, 92, 57,223, 77, 94,189, 60,130,201,
+253, 4, 6,148,203,200,231,114, 59, 44, 37, 76,156, 80, 57, 16,218, 39, 14,184,218,196,188, 70, 10, 72, 73, 22,235,115,217,178,
+101, 10, 32,226, 64, 78,149, 1, 39, 10,190, 75, 5, 89,172,199, 16, 0, 45,155, 77, 22, 1, 28, 39, 33, 78, 62, 40,151, 41,160,
+ 69,240, 66, 87, 14,234,238, 61,124,155,178,109, 21,147,182, 2,224,180, 64, 6,149, 31, 34,160,197,221, 55, 4, 45,156,188,102,
+204,152,161,148,145,106, 68,218,108, 25,225,163,154,135,101, 5, 63, 21, 64,136, 73,230, 21,193, 16, 37, 16,148,188,169,229, 37,
+104, 34,152,197, 51, 39,245,104,163, 93,188,101, 29,176, 46,248,157,156,116, 89, 95,188,198, 73,144, 64,155,253, 74, 5,111,164,
+ 11,169,150,209, 65,248,179, 0,173,246,237,219, 55, 38,255, 48, 49,110,128,221, 70,125, 76, 24,111, 1, 88, 78,194,230, 75,177,
+ 7, 11, 9,208, 66, 61, 40,234, 9,237, 65, 64, 67,224, 74, 62,144,207,228, 43,119,204,233,241,148,247,157,209, 83,165, 81,228,
+ 47,121,105,148,158,245,157,180,201,122,204, 50,145, 14,193,208,188,121,243,100,232,208,161, 2, 0,200, 58, 49, 2,174,180,197,
+ 63, 77,128,197,177,146,101,225,102, 37, 26, 43,115,252,166, 20,151,198,245, 11, 23, 46, 20,216,223, 4, 2,220, 20,210,249,110,
+ 79, 71, 18, 45,218,188, 81,146,133,141, 0, 52,130, 86, 36,100,164,203, 77, 8,124, 47, 39, 77,163, 64, 11, 19,234, 51, 72, 96,
+ 21, 21, 23,109, 27,209, 79,149, 93,109,144,182, 11, 84,170, 33, 2, 90,248,166,136,232, 83,175,181, 32, 43, 36,210, 44, 35,109,
+226,159,150, 7,125,255, 17,230,230,143,128, 22,249,137, 13, 33, 70,251, 56, 77, 76, 2,213,221,133, 85,170, 84, 17, 72,152,222,
+ 96,190,212, 10, 10,194, 96,225,242, 6,155,117, 20,160,197, 60, 51,103,206, 12,116,198, 15,103,187, 14, 71,141, 26,165,204, 65,
+ 28,227, 9,178, 0, 18,125,172,115, 90, 92, 0,237,247, 84, 79, 3, 55,156, 85,233, 90,165, 89,193,176,200, 63,173, 14, 92,148,
+ 71,223,189, 3, 31,214, 26,162, 17, 20,113,192,166, 90,194, 72,226,160, 6,134,185, 4, 69,164,201, 65,130,131,159,154,248, 31,
+207, 41, 64,203,254, 61,159, 10,180,128,166, 71, 2, 32, 76,234,218,181,107, 94,163,149,165, 5, 90, 42,200, 58,185,105,161,236,
+ 24,209, 70,134,255,242,163, 20,200,252,221, 97, 12,236,255,183,221,130,241,188, 81,218,204,151,254,219, 40,217,178, 36,137,225,
+211,165, 89,157, 64, 54, 64,128, 45, 11,108, 52, 22, 3, 88,237,199,196,248, 8, 60,191, 12, 73,214, 22,172, 2,105,200,158, 79,
+143, 54, 58,204,102, 76,222, 23,213,132, 21,244, 61, 14,234, 92,121, 22, 43, 86,236,190,246, 30,243,234,209,227,125,172, 60, 55,
+187, 82, 23, 66,202,115,145, 0,139,201,164,234, 80,145,102,241, 32, 56, 32,128, 99, 7,228, 97, 86,170, 69,240, 66,215, 14,116,
+143, 64,131,120, 74, 6, 72,199, 19,244,153, 8,226,182,244,232, 97,251,111, 84, 90,164,242,135, 43,110, 78, 40, 52, 48,167,170,
+135,229, 54,194, 59, 7,121, 82, 99, 96, 60,139, 65,229, 41, 19, 64,236,107,170,160,248,237,252,102, 26, 68,115,162,164,152, 30,
+106, 43, 1,128,167,155,130,239, 93,189,139, 6,187, 52,162,174, 89,179,166,178, 26,101, 59,162,100,140,118, 94,172,123,130, 56,
+138,250,105,119,193,223, 60, 48, 64,115, 53,106, 68,173,242, 89,128,150,213, 30,139, 82, 95, 65,249, 45,152,128, 95, 15, 28, 56,
+176,230, 39,216,125, 41,192,232,241,211,231,178,255,200, 41,217,125,224,152,108,223,115, 68, 54,239, 56, 32,235,183,236,145,213,
+ 27,118,200,242, 53,224,243, 65,111,195,192, 72,165,119,208,235,140,236, 61,116, 66,118,238,243,146,109,187, 15,201,166,237,251,
+100,221,230, 93,178,106,253,118,217,119,232,184, 97,122,214, 58, 76, 6, 27,178,155, 48, 45, 8, 98,123,162, 4,114,250,244,233,
+194, 9,136,234,155, 16,180,169,141,104,247,111,104,227, 71,201, 24,199, 76, 74,181, 56,209, 66, 98,173,216, 42, 97, 76, 9, 4,
+144, 61,106,128,246, 71, 54, 90, 0,228,138, 13, 25,182,226, 43,109,148,246, 94, 42,200,226,194,128,239,227,188, 0, 94,185, 92,
+ 84,171,239, 6,200,122, 6, 96, 74, 59, 34,186,224, 16, 74,136,243,228,201,163, 2,172,206,104,154, 4,217,102, 52, 1, 10,105,
+128,172,215,148,140,169,160,237, 19,164, 89, 6,216,100, 46,139,222,206, 69,251,251,102,168,227,187,151, 67,202,244,145,234, 16,
+187, 78,223, 64,234,110, 88,117,152, 46, 93,186,135,170,125, 22, 85,135,245,235,215,151, 82,165, 74, 13, 69, 89, 40, 48,248, 6,
+194,137,161, 88, 8, 40,146, 50, 2, 45,170,250, 38, 77,154,100,216, 62, 81,245,163, 69, 91, 86, 74,151,233,163,203,222,143, 22,
+164,195,143,104, 70, 2,233,241, 51,149, 7, 42, 6,249, 74,141,226,117, 37, 90,202,138, 72,251,113,152, 16, 20, 27, 45,174,152,
+141, 36,130, 34, 61,160,165,210,164,157,130,154,248, 14, 2, 45, 78, 20,246,239,225, 53,116, 80, 67, 29, 90,211, 88, 21,137,150,
+ 10,178, 32, 18, 53, 12,178, 72, 67,171, 58, 44,155, 55,237, 77, 21,100,141,172,148, 70,242,167,142,255,128,224, 43,164, 64, 43,
+195,183, 81,179, 22,203,148,226,217,241,117,115,101, 73,203, 34,210,165,105,237, 32, 24,249,100,196,107,135, 33,113,247, 26, 39,
+ 89,158,135, 32,197, 50,211, 1,213,188,148, 90,113, 98,165, 84, 7, 3,209, 63,210, 24,158,106, 46,174,236, 57,233, 50, 17,112,
+240, 32, 96,176, 94,203,165,247,237, 88, 25,245,212,122,129,167,139, 4,210,160,148,199, 19, 52, 57, 89,240, 76,201, 14,207,102,
+128, 22, 7, 23, 74, 31, 8, 82,104, 4,108, 45,147, 94,145, 28,221,207, 12, 99,232,251,148, 60, 80, 50,198,246, 77, 91, 5,250,
+167,225,228, 72,187, 8, 26,154,178,204,234,125, 78,102, 24,120,184,251,236, 71,103, 47,228, 64, 13,181,150, 34, 97,164,132,129,
+210, 2,149,151, 60,187,184,103,196, 46,230,179, 0, 45, 2, 42,170, 8, 41,209, 98, 25, 97,155, 49, 78,107,116,255, 41, 18, 45,
+ 74,175,168, 54,229,226,141,180, 57, 22, 81,186, 75,105, 15,249, 99, 84, 2,165, 74,180, 56, 38, 81, 93,204, 49,138,244, 88, 55,
+ 4, 27, 84,195, 18,224, 24,165,135,103,147,195,214,229, 42,202,102, 25, 57,114,228, 43,128,161, 32,210,224,110,190, 1, 3, 6,
+132, 20,104,117,197, 66,236, 60,203,199, 93,144,148,142,141, 24, 49, 66,153, 8,185, 21,159, 46, 41, 58,116,232, 64, 31, 87,116,
+253, 96,228, 8, 6,182, 8,250,105,231,200,114, 18,204,115,119,184,118,227, 6,251, 21, 15,163,234,115,240,234,153, 22,100, 65,
+242,218, 19,143, 19, 96, 25, 1,253, 46,203, 15,144,245,154, 0,243,159, 4,178, 88, 96,189,157,139,246,247,141, 84,146,154, 7,
+ 32, 53, 41,164,141,207,105, 14, 64,192,138,133, 53,119,246,189,193, 98,240, 5, 54, 43, 24, 54,134,199, 24,183,155,188, 83,119,
+ 23,114,161, 71, 90, 0,194,175, 1,128,184,147, 83,145, 64, 18,100, 49, 15, 85,128, 88, 28,236, 54, 90, 86, 3,158,225, 35,162,
+ 12,239,184,163, 21,160,206,182,224, 80,113,200, 87, 10,180, 92,179,199, 17,138, 36, 40,226,100,195, 1,204, 72,226, 96,164,103,
+ 79, 69,154, 92, 13, 81,205,161, 38,254,199,115,129,124,222,254, 61,188, 22, 18,160, 5, 17,234, 88, 74,178,204,130, 44,114, 73,
+ 5, 90, 75,231,207,171, 93, 59,119, 50,217,208,183,142, 56, 5, 89,144,108, 49,191,145,198,151, 38,126,212,204, 0, 89, 79, 85,
+224, 54,186,114, 90, 73,159, 40,170,145, 85,167, 17,242,182, 60, 88,169, 40, 64,139,252,197, 36,255,143,116,239,160,217, 93,104,
+115,239,160, 1, 89,134,237,180,236, 24,163,216,155,112,114, 36,176, 98,219,217,222,171, 87, 72, 36, 90,138, 61, 13,193, 32,129,
+214, 39,128, 44, 15, 72,178,230, 17,100, 65,114,243, 12, 0,248, 42,196,240, 55,171, 87,175, 30, 4, 53,154, 2,176,152, 56, 73,
+ 98, 75,189,178, 50, 39, 0,235,222,189,251,123,172, 76,131,208, 39,198,185,170,120, 72, 18,183, 19,104,193, 48,154, 64,107,191,
+ 54,175,171,123, 6, 26, 83, 89, 72, 67,139, 56,219,121, 8, 73, 97, 81,176,217,172,123, 7, 27, 77, 74,182, 96, 0,254,155,106,
+171,197,247,132,144,166, 67,137, 22,236, 37,197,239,193, 35, 69,162,181, 98,237, 22,217,182,235,160, 97, 96,228, 72,162, 69,122,
+247, 31, 62,182, 73,180,118,236, 57,100,148, 30,141,138,207, 99,179,131, 5,128,200,130, 29, 93, 22, 44, 14,174, 98,242,122,200,
+ 29, 87, 86,213, 97, 72, 36, 90,145,160, 22,244,130,189,223, 35,170,157,169, 38,164,159,175,230,205,155, 11,252,155,113, 50,188,
+ 1,147, 6,218,144, 25, 1,213,106,115, 32,216,242,132,221,216, 93, 76,122,175,217,135,160,203, 81,220, 58,208,173,133,125,178,
+ 2, 45, 67,155,148, 48,230, 63,163,250, 41, 52, 1,150, 90,104, 72, 98, 94, 83, 10,252, 95, 2, 90,252,118,184, 90, 72,214,163,
+ 71,143, 21, 0,239, 79,225,198,231, 57,230,239, 53,176, 85, 77,105,160,111,219,178,128,119,223, 1,152,191, 39,255,180,190,179,
+ 48,103, 16,248, 40, 54,116,234,117,130,248, 21, 43, 86,188,135, 77,161, 97, 32,103,160, 44,109,105,243,202,241, 11,210, 87, 70,
+ 86, 81,142,127,129, 68,203, 94,125,248,127, 86, 56,250, 56, 0, 28,197,158,138, 29,142, 46, 30, 28,117, 56,237, 53,138,197, 29,
+236, 16, 12,230,120,141, 52, 9,172,180,207,169, 64,139,106, 15,251,119,240, 26, 6, 38,123,137,150,158, 51,183,134, 0, 89,147,
+ 77,130, 44, 27, 77,173,234,176, 96,198,148,167,106,100, 75, 40, 5,210, 36,184,251,145, 36,203,170, 62,116, 1,180,108, 52,211,
+ 39,140,150,161,120,166, 20, 79,180,210,177,156,201, 98, 60,165, 26,209, 64,131,212,102,209,251,118, 15,236,144, 83,220, 59,112,
+ 85,142,223, 95,139,195, 82,213,137,169, 97,135,165, 14,248,166, 0, 45,130,117, 74, 66,217,174, 8,152,180, 7,158, 57,105,247,
+156, 35,126, 42,210, 44, 2,213, 16,130, 44, 27, 77, 76,220,215, 41,161,130,202, 68,217, 10,143, 1,172, 61, 1,160,253,193,107,
+216, 96,161, 0, 59,128,164, 87, 60,227,217, 11,154,178, 58,116, 88, 10,233,208,118,136,229,119, 35, 95, 26,187,239, 74,229,226,
+158,154,213, 97, 91,130,180, 37, 53,129, 20, 37, 76, 78, 18,239,165,119,210,110,191, 24, 77,190, 95,149, 64,105, 37, 90,106,212,
+ 10,218, 20, 82, 45,205, 29,152, 14, 36, 80, 14,203,233, 72,162,165, 58,235, 84, 37, 90,148,240, 56,145,104, 5,163, 9,240, 59,
+ 21, 32,251, 5,164,106,150, 41, 83,166, 88, 0,186,185,131,152,147, 97, 90,168, 80,238,113,146,129, 65,247, 13,157,254,239,172,
+191,103, 4,152, 58, 14,176,118, 4, 99,183, 31,118, 5,190,129,253,204,109, 76,136,123,160, 34, 62, 14,154,148,146, 59, 59, 92,
+141, 33, 9, 24, 38, 13,234,242,247,108,255,220, 17, 75,201, 25,219,167,170,150,230,156, 64,149, 37, 22, 2, 90, 87, 54,221,156,
+189, 12,109,165, 67, 8, 37, 88,186, 99,157,134,118, 65,131,227,168, 46, 77,131,116, 92,142,201,122, 59, 23,237,239, 59,120,231,
+ 23, 41, 39,128, 86, 95,154, 31,148, 41, 83,198,161,179, 82, 74,178, 90,180,104,161,104,186, 32,125,119,228, 46,198,108, 57, 41,
+197,164, 77,226, 32,188,251, 29, 85,211,191,254,250, 43,199,217,210, 42, 15,190,114,160,165,126,134,113,247, 55, 16,253,237,199,
+ 46, 19,152, 80,189,183,133,224, 97, 39, 83,147,234, 86, 95, 61,195,191,212, 59,187,206,199,151, 6,171, 8,210,196,234, 78,113,
+216,168, 38, 78, 68, 24,148,222, 81,165, 66,112,160, 77, 48, 66,126,135, 1,138, 98,112,151, 13, 59, 4,157,195,254, 17,135, 64,
+ 11, 29,185,240,166,245, 43,171, 63,123,244,168, 56,127, 59, 76,206,109,180,108, 52, 51, 36,141,177,250, 24,212,133,180,243,162,
+116, 44, 87,178, 24, 79,168, 70, 12, 65,185,117, 27, 54,196,190,155, 52,246, 83, 70,140,182,117,105,126,134,114, 58, 82, 27,232,
+169, 11,245,202,121,146,192, 74, 77,170, 33,184, 73,160,165,170, 24, 67, 10,178,130,181,121, 74,180,224, 84,210, 38,209,130, 13,
+205, 77, 12, 44,111, 40,209,194,106,241, 45,210,187, 78,157, 58,209,150, 42, 8, 18,175,135, 80, 25, 94,131,193,232,115, 7, 18,
+ 45,189,111, 15, 65, 21,125,253, 33, 78, 8,140, 30, 61,121, 38,135,143,157,149,131, 94,167,101,223, 97,132,203,129,173,214,142,
+189, 71,100,203,206, 15,182, 90,235, 54,237, 48, 5,180,104,243,117,248,216, 57,208, 59, 3,219,175,147,178,231,224,113,216,106,
+ 29,149,173,187, 14,201,198,109,251,100,195,150,221,186, 64, 11, 96,231,103,168, 90,238, 64, 50,100,129,196,242, 49,198,189, 19,
+168,160, 20,154, 74, 74,107,112,151,161,171,122, 87, 61,195,175, 3,221,211, 72, 60, 83, 93,168, 39,201,210,107, 75,209, 0, 36,
+ 15,170,187, 55,185,235,146, 26, 7,238,192,228, 14, 79, 38,170,166,241,158,168,154,239,113, 10,180, 66,210, 48,173,207,232,149,
+ 51, 36,164,191, 36, 77,189,157,139,246,247,191,216, 28,167,125, 17, 54, 59,244, 7,152, 10, 36,160, 34,232, 81, 93,122,208,197,
+ 7, 37,175,216, 16, 21,136,157,129,253,157, 48, 59, 24, 63,177,139, 49, 53,198,177, 50, 24,199,218, 32,141,133,233,202, 6,156,
+ 47, 33, 61, 98,130,170,243, 29,129,221,216,177, 99, 21,119, 33,220,113, 8,208, 57, 43, 36, 21,249,165,159, 57,155,253,131,230,
+234, 76, 78,143,194,252,205,179,147, 50, 24, 7, 89, 86, 2,209,208,217, 14,170,157, 75,239,140,206, 71,219, 34,109,231, 11, 54,
+233, 56,163,137,119,220,192,189,178, 60,219,191, 3,157,252, 48,238, 69,179,251,160,207,218, 89, 92,249,209, 10, 41,208,202,251,
+125,172,115, 11,154, 23, 80, 65,214, 99,170, 17, 67,216, 80, 62,235,183,135,176, 76,142, 30,251, 59,202, 73,175,239, 39,117,146,
+189,103,120,135, 18,173, 79,228,131,150,166, 98,163, 69, 99,122, 46, 40,152,184,160,128, 29, 4, 85, 70,180,193,250,232,190, 19,
+ 27,173,191,131,159, 33, 97,195, 23, 45,167,234,222,193, 58,249,219, 92, 49, 24,112,239,224,176,156,164, 71,240,166,210,211,186,
+119,160, 65,175,234, 50,194,137,123, 7, 27, 77,184,223, 88, 13, 85,248, 61,168,132,175, 65,122, 69, 55, 22,246,227,162, 81,222,
+126, 81,126, 26, 45,148,131,124,157, 63,225, 89,103,143,126, 45,223,254,213,151, 19, 0, 43, 21,212,145, 7,161, 5,122, 10,219,
+209, 32, 72, 71,131,176, 65,235, 25,212,208,135,160, 46, 12,230,227,202,213, 92, 12,187,190, 52, 72, 21, 1,162,186,226, 60, 19,
+105, 63,250,193, 67,117,231, 59,237, 38,185,185,130,234,110,170, 45, 65,139,174,139, 12,249, 34,228,123, 49,255,230, 70, 42,111,
+ 61,171,191, 75,168,215, 62, 67, 27,180,145, 84,129,150,253,217,238,157,250, 14, 75, 63, 83, 33,191,186, 70,232, 44,206,161,125,
+220, 67,237,127, 39,188,179,125,123,218,132,209, 10,231, 73, 17,211, 27,187, 13,143,166, 75, 16,205,149, 88, 95,175, 26,190, 58,
+126,234,125,144,137,251, 95,235,183,167,134,157,202, 92,110, 82, 96,194,239,217,248,102,237,174, 66,189,251,100,209,215,250,237,
+ 38,170,215,105,214,175,241,219, 83, 16,108, 81,178,245,137, 12,248, 90,190,157,238,109, 66,251,248, 90,190,253, 95, 85, 78,216,
+144,134,101, 50, 88,153, 31, 73,180,176,176, 44,131,212, 6,105, 44,210, 6,164, 75, 72,143,152, 96,206,112, 25, 27, 1, 86,129,
+246, 0, 36,179,110, 77, 8,180, 24,127,149, 90, 7,130, 45,219,111,245,154,193, 50,135, 40, 27, 1,150,154, 72, 64, 5, 92, 33,
+ 34,246, 25, 30,250, 87, 53, 66,147,252,113,127,187, 73,134,233,100,119,243,211,205,207,208,226,128,187, 45,133, 22, 39, 63,208,
+169, 19,186,228, 20,106,238, 58, 10, 93,166,126, 45,252,116,250,213,127, 39,208, 50, 81, 21, 90,169,150,137,199, 62, 45,235,215,
+ 82,185,238,114,126, 90, 61,219, 63,237,230,167,155,159,161,197, 1,119, 91, 10, 45, 78,126,160,243, 57,248, 89, 54,116,139,248,
+217,202,249, 57,190,221, 77,243, 51, 84,190, 35,146,127, 39,208, 82,109,179, 84,169,150, 19, 27, 45,123,251,172, 96,255,217, 80,
+ 28, 37, 51,236,115, 70,195,213,117, 61,250,110,154,142,235, 37,164,245,229,230,167,155,159, 70,219,128,187,111, 58,231,128, 81,
+ 30,106,243,253,211,249, 89, 3, 5, 52, 98,208,206, 60,218,212, 0,255, 9,178,220,227,124,200,230,208,127, 99, 91, 82,191, 73,
+175,205,155,190,255,119, 2, 45,155, 49,124,118, 15, 79, 22,220,137,234,208, 37,208, 50,253,193, 38, 30,112,163,125, 19,204, 50,
+144,213,205, 79, 3, 76, 50,145,197,205, 79, 19,204, 50,144,213,205, 79, 3, 76, 50,145,197,205, 79, 19,204, 50,144,213,205, 79,
+ 3, 76, 50,145,229,115,240,211,233,235, 1,180,138,194,207, 96, 15,100, 80,118,133,243,183,157,173,150,137,162,155,203,106, 80,
+162, 69,162,110,213,161, 11,214,126,142, 6,227,166,105,174, 45,235,229,118,243, 83,143, 67,230,238,187,249,105,142, 95,122,185,
+221,252,212,227,144,185,251,110,126,154,227,151, 94,238,175,133,159,174,128, 86, 68, 0,171, 60,170, 49,188,117,247,161,250, 63,
+183, 30, 3,254,205,247, 93, 85,110,146, 48,225, 34,116,143, 24, 37,198,214,136,145,163,221, 83, 82,212,152, 91,195,225, 26, 24,
+146,228, 83, 64, 17,188, 41,102,168, 20, 59,202,213,210, 49, 34,222,194,239, 60, 6, 24,236,176,156,213, 61, 60, 10,212,139, 24,
+209,210, 20,126, 99, 28, 37,222, 99, 30, 39,244,191,150,134,237, 46,167,129, 6, 98, 34,139,155,159, 38,152,101, 32,171,155,159,
+ 6,152,100, 34,139,155,159, 38,152,101, 32,235,215,202,207,104,112, 61,114, 24, 62, 44,253,212,164,186, 48,225, 89,245,163,166,
+158,225, 91,141,142,112,191,181,227,135,253,183,135, 6, 77, 3, 44,255,251,179,132, 72,117,168,137, 47, 84, 56,148, 63,193, 97,
+ 35, 12, 27, 62, 82,211,216,223, 38,122,208,178,235,144,160,177,179,214,200,170,237,199,100,213,182, 99, 50,102,230,106,105,213,
+109,104, 80,188,132, 73, 30,132,143, 20,169,105, 72, 0, 76, 6,248,221, 42, 27, 61,210,147,135, 67,155,202,211,161,141,164, 76,
+244, 8, 79,120, 77,231,187, 62, 42, 39, 1, 84,179,120,241, 2, 30,195, 43,190,253, 65,103,152,116,228,250, 8,177,249,154,197,
+141, 27,224, 4,108,125,173, 29, 48, 52,154,192,191,229,219, 19, 33,176,234, 80, 12, 68, 71, 17,251,235, 1, 6, 32,111, 12, 78,
+ 35,192,160,164,159,178, 16, 8, 1,131,255, 45,252, 12,193,167,127, 22,227,109, 67,252, 76,151, 40, 90,193, 42, 63,103,188,157,
+ 39,117,188,213,105,147, 68,143,107,118, 12, 9,201,199,234, 76,100,161, 64,242,139,243,211, 85, 76, 67, 87,247, 12,213,145, 73,
+134, 4,163, 9,167,177, 94,232,223,126, 76, 12,240,205,132,254,173, 36,122,255,103,178, 7, 33,184,118, 64,167,142, 82, 35,207,
+ 86,198,120,196,179, 46, 19,243, 48, 47,232,165,118, 65, 51, 6,202, 51, 26,249,238,106,129,144,179,223,204,199,252,160, 23,195,
+ 85, 57,145,231, 16, 98,175, 6,125, 52,185, 57,184, 64, 39,229,240,239, 23, 4,218,231, 63, 55,205,207,136, 69, 76, 54,149, 16,
+101,119,109,163,245, 25,221,222,127,212, 89, 34, 68,142,190,166,112,233,234, 47,150,108, 60, 44,221,134,204,150,178,245,186, 73,
+254,202,237,164, 96,213, 14, 82,177, 81, 47,233, 54,116,174,252,181,246,144, 20, 45, 91,195, 63,114,180, 88,107, 28,124,174,203,
+ 14,152, 39,106,184,193,187, 27, 20,122, 43, 51, 26,139, 76,171, 47, 59,106,230,121,203,107,102, 6, 73, 27,200, 66, 80,213,243,
+155, 55, 75,187,196,137,165, 83,252,248,210, 11,146,173,129,137, 18,201,168, 36, 73,100, 26,226,119,221, 70, 40,138,251,240,112,
+235, 4,108,125,246,129, 34, 68, 77,225,227,135,220,229,116,192, 72, 12,194,141,224,205,248, 33,131, 74, 51, 94, 33,195,250, 48,
+184, 46,162, 21, 4, 33,158,228, 67, 12,206,205, 67,178, 16, 8, 97,157,185,235, 40,132,140,251,148, 58, 74,147, 32,218,244,103,
+123, 39,201,249,121,237,229,231,180,241, 47,166,139, 23, 37,145, 27, 96, 59,228,128,179,246,233, 42,180,150, 94,216, 45,135, 52,
+ 35, 71,142, 76,103,191,193,130,168,219,255,135, 15, 51,103, 49, 36,131,209, 36,192, 98,191,230,194,153, 96,130, 81, 73, 24, 74,
+ 78, 13,187,196,123,106, 98,160,114,134, 36,130, 51, 91, 37,156,150,230, 8, 70, 19, 11,178, 45, 92,132,107, 15,210,119,150, 16,
+243, 83,248,140, 51,154, 4, 77,158,158,158,194, 8, 19, 76,240,212, 46, 75,150, 44, 81,156,126,206,159, 63, 95, 70,143, 30,173,
+ 68, 89, 81, 35,170,176,252, 8,201, 20,104, 5, 91, 78,203, 9, 16,120,143,101,212, 11,173,199,184,180,204, 99, 13,149,199, 96,
+247,159,149,230,103,196, 34,159, 52,130, 24,244, 12,159, 24, 47,209,218,104,241,255,255,143,207,248,113,193, 26, 33, 36, 89,141,
+ 11, 20,175,226,191,108,179,151, 84,110, 62, 68,210, 21,168,249, 17,126,206, 89,178,161,212,239, 60, 94,254, 90,119, 84,138, 85,
+168,237, 31, 62, 82,148,198,174, 42, 87,123, 15,146,171,132,191,198,141, 26,240,102, 82,107,185,189,176,184,188,223,252,139,188,
+ 29, 81, 79,170,199,138, 20,192,123, 70, 6, 73,123,144,213, 49,110, 92, 89,129, 72,230,251, 99,199,150, 67,113,226,200, 81, 36,
+111, 92,219,199,235,201,147,203,157,221,187,229,238,129, 3,142,192,150,203,201, 49, 90,180,104,199,173,177,206,204, 56, 48,253,
+187, 39,220,140, 44, 51,203,110, 6,184,126, 82, 11,255,255,195,174,190,157, 13,218,209,234,152, 94,135, 19, 24,169,119,109,158,
+ 72,144,166, 54,110,220, 56,128, 3, 46, 3,247,210,179, 49, 67, 70, 48,222,157,143,143,143,220,185,115,135, 97,115, 94, 96,128,
+108,231,128,182,171,114,134, 67,140,186, 89,244, 56,142,160,173, 1, 24,180,239,227, 93,127,129,198,167,132, 77, 9, 3,154,245,
+225, 12,117, 85,145, 34, 69, 14, 33,174,226, 90,208,252, 13, 52, 25, 40,216,213,161,215,150,200, 83,238, 40,171,111, 77,197, 17,
+135,209, 21, 47,249, 46,179, 52,139,133,144, 38, 37,212, 27,144, 78,234, 36,230,113, 36,205,214, 43,167,194,183,116,241,163, 84,
+234, 92, 37,123,208,203,181,237,228,202,212, 58, 82, 44, 67,124,159, 12,137, 35, 39,119,194, 84, 67, 52, 77,246,133,175,153,166,
+ 2,164,120,240,140,164,141, 99,234,234,158,202, 34,135,223,142, 0,196, 65, 4, 22,206, 14, 2, 35,230, 49, 82, 71, 4, 90, 12,
+217,181, 96,193, 2, 65,140, 79, 89,181,106,149,192, 43,186, 18, 76,123,215,174, 93,194, 69, 22,130,119, 43,177,126,207,158, 61,
+171,128, 46, 61,160, 21, 53,106,212,103, 44,155, 10,204, 16, 48, 93, 9,116,143, 64,237,114,225,194, 5,101,252, 96,244, 7,254,
+103,220, 76,142, 41,124,198,174,188,182,111,167,132,106,250,244,233, 82,173, 90, 53, 97,128,115,251,196,128,244,170,231,117,158,
+ 89, 86,190,143,207, 57,163,201,235,144,136,249,178,156,234, 51, 44, 7,191,145,101,100,176,250,107,215,174, 41, 11,203,219,183,
+111, 11,193, 22, 1, 28,190,221, 37,208, 10, 13,154,159, 17,139,152,236,122,193,179, 27,244, 12,239,250, 29, 95,232,227,146,196,
+136,157,224,193,194,117, 7,165, 65,143, 25,146,189, 76, 11,167,157,165,120,173,110,210,126,232, 10,153,189,234,160,196, 75,144,
+228, 1, 74,239,202,102,203,246,113,249, 99, 68,248,235, 68,203,210,129,143,198, 86,150,115,155, 17,158,240,106,117,145,201,149,
+197,171, 94,222,247,249, 98, 68,152,103,132,211,180,187,162,186,144,146, 44,130,172,149, 81,163,202, 6,164,221, 0, 91, 42,200,
+ 58, 16, 51,166,108,137, 22, 77, 14, 1,124,237,250,238, 59, 5,108,221,130,116,139,207, 26,121, 7,243, 80, 60,189,115,231, 78,
+ 65, 92,194,135,248,155,211,232,115,127, 99,190,156,217,178,101,123,196,193,136,101, 15,141,114, 96,117, 90, 13,160,237, 1,207,
+ 33,164, 71, 48, 49,224,183,223,126,243, 5,192, 96,144, 91,109, 56,135,112,188,134,123, 28,112, 60,145,244,128,135, 90,132,164,
+136, 73,248,128, 32,139,131, 22, 3,159, 50,108, 4,174, 41,255, 57, 56,114, 16,226, 0,132, 32,209,108,155, 41, 13,150, 61, 2,
+ 84, 19,215,176, 18,125, 1,218, 22, 4,191,182, 60,124,248,208,130,152,120, 47,176,186,188, 1, 26,122, 96,203,209,107,194, 32,
+100,204, 28,196, 15, 61,140, 21,167, 55, 2, 1,123, 99, 96,247,158, 51,103,206, 33, 92,159,143, 7,140,122,120,182,167,157, 29,
+131,127,253, 46, 93,186,148, 70, 80,228,162, 76, 88, 57, 23,111,208,160, 65,213,126,253,250,229, 48,248,189,246,217,114, 2,152,
+214, 35, 77,240,180, 24, 2, 23, 23, 65, 28,192, 18, 77,154, 52,169, 54,112,224,192,172, 38,105,110, 96,176,102, 72, 3, 94,160,
+ 30,252,145,158, 51, 1, 0, 63,195,164,240, 20, 18,200, 39,152,108,158,236,222,189,219, 31,116, 29, 73,197, 63,122, 93,186,132,
+209, 90,118,168, 93,194,242, 71,227,114,210,163,126, 73,233, 90,187,176,116,170,254,147,116,171,145, 91,118, 14,170, 36,175,151,
+212,145, 91,147,202, 75,153, 44,223, 62,203, 20, 55,186,105,175,214, 38,191,239,107,207,206, 69,143, 50,190, 19,104,172, 95,191,
+ 94, 11,182,108, 32,235,217,179,103,202, 36,206,188, 72,174,212,136, 54,126,160, 15,109,157, 52,105, 82, 16,251, 39, 37, 76, 80,
+127,201,205,155, 55, 21,112,128,254,164, 0, 35,140, 41,246,161,182, 28,242,147,170, 66,130, 54, 21,100, 49,222, 31,203,178,104,
+209, 34, 5,100,113,113,197,224,228, 4, 32, 12,244, 78,160,133,126,101, 47,209, 10, 70, 27,239, 86,128, 22,203,166,126, 59,226,
+ 9, 74,243,230,205,165, 87,175, 94, 74,252, 64,210,229, 56,194,128,231,164,207,103,156, 85, 56, 1, 19,226,159, 74,149, 42, 85,
+ 12, 1, 45,210, 99, 89, 29, 0,173, 96,175, 80, 65, 17,199, 52,130, 44,150,135,224,207, 17,200, 34,112,115, 2,180, 66,157,230,
+ 23,194, 34,166,251, 87,168,120,134,255, 18,122, 81, 24,190,119,107,210, 97, 96,208,208, 25,155,164, 88,163, 17,146,171, 92, 43,
+ 27,208,202, 94,188,129,228, 46,213,200,246,191,100,221,158,210,176,247, 2, 25, 53,111,183,180,232, 54, 60, 48, 92,132,200,186,
+ 62, 94, 16, 60, 48,205,239, 73,226, 90,222, 77,106, 46, 39,103,253, 44, 97,195,124, 16, 47,203,222, 95, 36,112, 96, 69,105, 18,
+ 63,122, 0,243,232,113,152, 70,239, 60,168, 46, 92, 9,112,181, 62, 74, 20,121, 7,177,177, 87,227,198,178, 15,255, 15, 32,241,
+ 55,175,109,143, 30, 93,206, 37, 72, 32,103,178,103, 87, 86, 17,191, 65,189,168, 71, 95,189, 79,253, 63,223,243,224,193, 3, 6,
+ 24,126,132,112, 29,133,140, 62,107,159,143,177,215,180, 70,141,206,126, 59,137,209,166,251, 90,150,173, 64,129, 2,143,249,141,
+ 4, 24, 44,187,238, 67, 58, 25, 32,222, 47, 83,171, 86, 45,140,181,207,184, 90,123,198,255, 38,105, 18, 56, 13,154, 58,117,234,
+ 19,242,209, 10,168,180, 18,151,196, 4, 96,188,199, 60,204,139,164, 11,182, 32,177, 27,200,213, 44, 7,111, 21,100,113,213, 23,
+ 33, 66, 4,101, 0, 99,172, 66,174, 74, 57,192, 99,128,166,221,194, 24, 35,229,134,148,105, 14, 65, 22, 1, 22, 6,110,203,249,
+243,231, 45,160, 99,193,128,108, 25, 54,108,152, 63, 6,219,197, 70,232,104,243, 80,146,133, 73,236,240,243,231,207,189, 49,192,
+122,227, 29,222, 24,188,189, 3, 2, 2,188, 49,160, 31,196,127,211, 1, 78, 65, 63, 49, 64, 86, 67, 76, 6, 69, 1, 88,138,104,
+ 19,190,189, 48,212, 18,117, 1,114,180, 1,146,141, 20, 59, 41,129,219,190,125,251,138,151, 40, 81, 98, 8, 0,215, 69, 38,252,
+ 30, 10,192, 85, 18, 64,177,222,158, 61,123,146, 25, 33,100,205,115, 18,188,243,119,180,194,215, 94, 67,223, 98,189,159, 68,114,
+ 21,175, 77, 33, 89,229,167, 31,238,190, 59, 58, 93,222, 29,154, 40,111,247, 14,151,183,219, 61,229,237,198, 78,242,122,213,239,
+242,102, 67, 71,121,179,250,119,121, 61,171,180,248, 79, 41, 40, 45, 10, 38, 14, 76,255,109, 12,179,237,213,196,231,253, 43,178,
+ 42,128,138, 32,203, 14,108, 41,227, 43,129, 8,234,220,145,180, 75,239,227,179,195, 64, 59, 64,149, 24,169, 64,139, 82, 34,170,
+236,114,231,206,253, 18, 4,180,210, 51,167,244, 8,180, 8, 32,168,146, 35, 0, 98, 31, 39,168, 33, 88, 81, 65,214,153, 51,103,
+ 20, 0, 66,201, 54,250, 21,129,214,109, 87, 5, 84,129, 22, 65, 31,218,181,252, 90,163,134,120,123,121,201,101,140, 29, 76,103,
+ 65,143,223, 77,112,195,247, 32, 30,160, 75,160, 69, 21, 96,195,134, 13,165, 93,187,118,210,166, 77, 27, 65, 76, 66,249,253,247,
+223,133, 65,159, 49,190, 41,137,227, 18, 37, 81, 44, 43,129, 38,238,191,115,160, 58, 12, 86,108,240, 80, 25, 27, 89,142,162, 69,
+139, 74,190,124,249,108,137,239, 96, 26, 62,124,184,108,223,190, 93,169, 63,242, 9,225,195,124, 93,125,187,150,102,155,232, 30,
+242, 91,180,255, 39, 44,170,132,137,106, 79,190,211, 25,205, 47,129, 69,244, 26,216, 87,125, 63, 98,148,152, 91,134, 76, 94, 33,
+ 45,251,205,151, 82, 77,199, 72,145, 58,158,146,175, 18,108, 31,170,118,148, 66,213, 59, 75,225, 42, 45,109, 64,171, 76,253,222,
+210,196,115,137,252, 49, 97,163, 12,155,182, 70,162,197,140,107,175,195,254,136, 23, 63,199, 10,191,227, 90,167, 95,130,238,141,
+ 43, 43,151,119,148,180,233,240,229, 26,164, 90, 83, 75,201,133, 6, 57,131,152, 71,143,137, 42,208,234, 8,208,116,128, 18, 43,
+128, 41, 2,171, 32,116, 98,158,181,191, 79, 64,141,120, 13, 54, 91, 87, 51,101, 82,236,120, 26,127,251,173, 97,160, 69, 48,164,
+138,110, 57,113,231,202,149,235,113, 8,192,134,242, 57,177, 99,199,190,193,129,198,213,193,251,204,167,247,253,246,247, 89, 38,
+ 68,116,127,202, 21, 36, 59, 49, 1, 8,203,110,150,142, 54, 63, 0, 64, 33, 76,136, 79,185,154,164, 26, 14,146, 24, 1,144,123,
+194,235, 6,233, 6, 3, 89, 86, 32,229,233,224,217, 1, 42, 16, 51, 10,182,176,210, 59, 72, 48,121, 18,246,121,148,100, 17,100,
+113, 69,203, 65,248,238,221,187, 98,177, 88, 20,123, 14,174,110, 41,217,194,192,123,204, 72,153, 49, 8,221,133,212,201,178,109,
+219, 54,203,188,121,243, 44, 24, 80, 44,144,184, 88, 80, 47, 22,124,191,133,106, 68, 35,116,180,121, 32,101, 91, 73, 73, 22, 6,
+107,111, 12, 96,222,184,167,156, 33,242,247, 6,128,245, 78,154, 52,233,122,179, 52,145,191,116,135, 14, 29, 74,219,131, 44,245,
+ 63, 6,245, 50, 0,139, 85, 77,210, 45,219,173, 91,183, 82,104, 71,253, 57,249,106, 19,193, 22, 64,103, 57, 12,188,149, 77,208,
+ 60,137,137,239, 25,128,171,207,138, 21, 43,124,214,174, 93,235,179,101,203, 22, 31,240,211, 7,117,230,131, 9,204, 7,117,230,
+ 3,154,143, 65,243, 36, 18, 3,120,187, 60, 96,143,213,182, 65,225, 52,111, 91,149, 73, 47,151,167,213,146, 55,203, 26, 40, 0,
+ 43,232,137,143,173, 91, 5, 61,186, 42,175, 23, 84,149,151, 99, 50, 72,221,156,177, 95,167,142, 19,199,222,224, 88,239, 53,159,
+227, 62,183,181,239, 71,226,216,150,247,115,188,224, 19,104, 6, 3, 91, 27, 55,110, 84,120,201,254, 30, 66,144,165, 20, 5,227,
+216, 62,244,231, 32,173, 68,139, 11, 86,246, 89, 44,148,246, 25, 45, 47, 37,243,236,207,156,220, 17,135, 79,105,151,136,201, 39,
+144,220,115,241, 43, 57,115,230,228,184,204, 0,200,130, 54,170,244,125,163, 64,139, 0, 16, 49, 3,131,129, 44, 21,108,241, 76,
+ 30,112, 60,229, 24,227, 74,162,133, 50,133,150, 49,124, 48,182,168,160,136,146, 44,130, 44,218,129,169,137, 32, 72, 77, 4,113,
+228, 51,109,180, 48,158,216,171, 14,157,210, 36,200, 90,255,237,255,147,118,110, 98, 93, 25,165,105,180, 46,191,116, 62, 39,187,
+ 14, 85,105,191,106,171, 21,220, 70,235, 75, 20, 18, 70,240,183, 23,172, 59, 44,191,118,156, 38,229,126, 31, 47,191,180,154, 40,
+149,219, 78,145,138, 45,199, 74,161,170,237,108,245, 48,101,246, 18, 41,215,176,175,252, 62, 96,185,116, 26,185, 78,230,173,243,
+150, 40,209, 99,187, 92, 69,192,254, 42,127,159,180,137, 45,239,198, 55,144,227, 11,126,150,151,103, 43, 7, 7, 90, 94, 21, 37,
+168, 79, 17,233,150, 44, 38,109,181,242,187,250, 94, 21,104,245,132,100, 75,177,201,162, 61,150, 85,138, 69,176,165, 2,174, 99,
+ 0, 97, 4, 89, 55, 32,249,186,147, 57,179, 2, 24, 66, 2,180,118,236,216, 33,140,106,206, 85, 19, 86, 99, 79, 66,168, 70,203,
+ 8,187,159,251, 48,212, 86,196,209,246,137,215,121, 31,223,109,198, 30,204,131,101,161,212,137,157,140,171, 16,150,149,122,251,
+ 79, 4, 90, 57, 97, 75,244,152,198,155, 4,109, 44, 43, 65, 32,193, 38, 6, 57,163,106,212,190,118, 0,106, 23,190,109, 50,210,
+ 36,187,196,107,187,236,242,118,117, 85,255, 24,196,125, 57, 8, 16, 96,165, 73,147,198,161,209, 45,236,138,132,182, 29, 4, 91,
+ 88,229,221, 49,210,127, 50,102,204,232, 15,201,147, 5, 3, 58,213,203,182,132,231, 45, 48,148,181, 96, 0, 15, 48, 66, 71,155,
+ 39,127,254,252, 7,169, 46, 68, 61, 41, 32, 75, 77,144,116, 41,106, 68,148,243,136, 89,154,200, 95, 15,245,252,145, 52, 75, 5,
+ 90,152, 64,138,161,179,118, 54, 73,183, 62,213,143,224,237,105, 78,102,218, 68,201, 22, 36,165,208,243, 75, 39, 19, 52, 9,180,
+158, 16,100, 65, 98,226, 3,155,154, 96, 32, 11,147,135, 15, 84, 32, 62,224, 1,219,211, 73, 36, 93,160,133, 60, 97, 50, 36,140,
+ 62,123,109,255,106,242,102, 77, 11,121, 61,191, 50, 64,214,117, 57,118,241,190,212,234,189, 94, 73,252, 29,248,224,130,188, 28,
+154, 92,188,219,198, 19, 4,136, 39,112,252,187, 15,170,204, 85,158,158,248,187, 11,227,224,253, 10,216, 34,200,226, 2, 6, 32,
+ 93, 32,217, 12,137, 36, 75, 75, 58, 31,250,203, 11,130, 1, 2, 26, 26,148, 83,218, 4,201, 12,251, 85, 62,163, 60, 32,208, 98,
+ 31,222,180,105,147, 36, 75,150, 76, 41, 19, 1, 22,141,191,169,234,163,228,136,234,196,250,245,235, 43, 42, 53, 74,117,240, 94,
+151,253, 93,149,104, 81,194,212,174,109, 91, 69,138, 69,186, 42,200, 82,127,115,225, 74,105, 22,121,161, 3,180,140,126,142,169,
+124, 92,248,113,210,229,188,227, 10,104,145,175,148, 30,114,188, 6,208,210,147,104,217,104,186, 2, 90,124,175, 81,154,166, 62,
+234,239,207,172,106, 16,236,207, 31, 74, 6, 68, 95,216, 42,178, 43,252,185,202, 10, 63, 89,119,184,155,176, 78,151, 25, 0, 89,
+147,164, 74,187,169, 82,189,227,116, 41, 90,179,155,156, 56,125, 65, 1, 90, 83,102, 47,149,242,141, 62,128,172, 86,131, 87, 73,
+215, 49, 27,101,222,250, 99, 18, 37, 90,108,151,141,187, 72,172, 8,231,238,253, 81, 85,110, 79, 40, 33, 62,187, 75, 11,165, 88,
+234,224,163, 72,180,152,102, 23,147, 91,245, 51, 10,243,186,250, 70, 21,104,245, 7,128, 34,200, 58, 22, 47,158, 77, 93,168, 5,
+ 90,148,102, 17,100,221,198, 14,196,219,144,104,177,179,155, 1, 90,220,158,203,111,230,138,134,137,171, 49,138,171,233, 70, 32,
+132,117,144, 19, 29,225,193,193,131, 7, 21,245,150,154,248,159,215, 65,211,180, 29, 24,203, 66,213, 30, 7, 13,181,156, 4, 71,
+ 44,123, 8,203,152, 49, 79,158, 60,143, 8,220,168,134,212,150,147,252, 35,152, 75,145, 34,133, 46, 32,140, 18, 37,202, 73,151,
+226, 59, 23, 55,241, 44, 87,255, 78, 15, 12, 64,135, 9,252,184,130,165, 36,139,223,203, 1, 29,146, 61,101, 48,231,193, 29, 68,
+ 28,120,104, 95, 2,222,158, 52,194, 11, 14,108,170,218,144,146, 44, 53, 81,125,200,235, 86, 32,108,132,148, 45, 79,202,148, 41,
+ 87, 2, 20,122, 99,176,244,198,100,161, 0, 45,216,208,121, 3,244, 43, 64, 11,147,194, 58, 83, 4, 63,100,174,141,178, 5, 83,
+ 25,106,165, 91, 86, 80, 68, 53,172,153,163, 14,109,178, 92, 0,173, 18, 96,235, 64, 19, 4, 79,162,142, 30,169, 32, 11,210, 17,
+155, 36,139, 32, 11,247,124,208,158,124, 0,108,217,238, 89, 63,122, 64,235, 3,200,250,179, 50, 84,132, 45,228,233,244, 82,176,
+201,170,171,212, 53, 1, 86,198,218,115,148,196,223, 60, 94,142,207, 38,150, 62,145,165,232, 15,209, 93,142, 37, 38,190,231, 83,
+178,158, 82,199, 58,156,189, 62,133,208,103,122,214,102,147,197,126, 68, 41, 54,199, 36,107,153, 13,169,248, 28,149,139,102, 16,
+ 51,102,204, 80,128, 22,199, 18, 46,140, 48, 94,153,250,126, 2, 45,180, 17, 69, 61, 54,107,214, 44, 69,106, 93,174, 92, 57, 69,
+ 82,205,126, 79, 9, 54,105, 83, 2,195,178,115,220, 50, 3,180,168,134,116, 5,180, 56,166,162,175,233, 1,173, 24,248,214,209,
+ 40,171, 33,247, 14,204,199,252,224,153, 75,105,107,130, 4, 9,238,176, 45,115, 12,214, 3, 90, 4,133,172, 55, 44, 18, 93, 2,
+ 45, 45, 77, 61,160,229,140,230,151,192, 34, 33,105,231,170,103,120, 53,198,161, 19,137,150,189, 36, 43,184,233,198,151, 48, 64,
+139, 20, 53,230,182, 65,147,150, 75,187,193, 75,172, 32,107,134,212,236, 50, 75, 74,212,166, 23,253, 15, 71,249, 70,158,210, 2,
+ 32,171, 53, 64, 86,187, 97,107,165,255,180,157, 50,108,250, 58,137, 17, 43,238, 54,103,204,201, 28,214,163,234,132,188,169, 95,
+190, 25, 93, 83,142, 47, 45, 40,111, 46, 86,117, 12,180,206, 84, 22,233,158, 67,134,166,142,105,225, 51,206,232, 17,104,113, 34,
+ 29,145, 52,169, 2,178, 14,197,138,229, 80,117,232, 13, 53,226, 89,220, 87,129, 22, 37, 50,102,128, 22, 29,193,241,155, 85,233,
+ 19,237,129, 96,188,253, 40,132, 18, 45,229,115,168,122,131, 58,233, 33,197,193, 28, 36,120,230,127, 19, 42,185, 96,108, 97, 89,
+ 88, 38,150, 77, 45, 39, 87,165, 44,123, 72, 26, 43,236,153,110, 16,188, 16,188,177,124,246,137,131, 38, 36, 31,180, 1,187,161,
+ 67,223,243, 19, 36, 90, 29, 93,209,198, 78,164, 33, 80, 69, 5,113,160, 37,192,228, 64, 68,149, 1,129, 22, 87,180, 44, 59, 1,
+ 23,129, 22,242, 9, 6,151,241, 70,120,129, 58,152, 59,114,228, 72, 44,160, 95, 40,192,138,103,208,176,160, 9, 88,218,183,111,
+ 31, 82, 27,173,198, 83,166, 76, 57,132, 65,203, 27, 54, 33,138,141, 22,218,161, 55,104,122,119,238,220,249, 0, 64,101, 11, 35,
+101,179,203,147, 31,246, 42,197,157,169, 14, 81,110,116, 48,105,107,146,238,207,164,233, 76,117,136,242, 99, 37, 36,173, 76,208,
+ 36,208,122, 73, 97,152, 73, 0, 0, 13, 65, 73, 68, 65, 84, 72, 73, 22, 65, 22, 64,156, 15,140,122,125, 0,142,125, 48, 73, 42,
+ 32, 11, 19,164, 15,234,141,237, 84, 15,104, 41, 32,107,157,103, 69,121,179,242, 55, 89,218, 26, 32,106, 98,110,121, 61,239, 23,
+231, 64,107, 76, 70,121, 57,224, 91,169,157, 43, 14,141,237,255,238,163,136,245, 27,175,224, 92,244,239, 46,140,221,251,109, 32,
+139, 54, 75, 28, 71, 8,178,120,132,130, 84,171, 40, 38,254, 23, 52,217, 32, 88, 42, 85,170, 20,165, 89,166,190,159,182,166,236,
+207, 84, 99, 18,244, 64,189,173, 0, 64,218, 86,113,177,197, 49,128,139, 41,130, 44,190,131, 96, 3, 64,203,126, 55, 95,176, 79,
+ 86, 37, 90, 4,107, 4,111,231, 48,222,105, 85,134,252,125, 29,247, 56,134, 16,100, 17,228,185,146,104, 17, 52, 45, 95,190, 28,
+ 2,244,192,143,150,143,188,166,117, 75,193,113,138,223,131,177, 49,208, 10,182,156, 54, 7, 21, 20,209,246,140,246, 88, 90,117,
+161, 86,141, 72,108,192,177,142,239, 50, 10,180, 72,147,246, 88,218, 67,171, 70, 60,221,169,153, 83,154, 95, 2,139,132,164,143,
+132,218,174, 67,213, 8, 45, 36,133, 48,242, 12, 61,190,255,214, 97, 96,224,136,217,219,164, 70,199, 25, 82,171,203,108,169,219,
+125,158,148,170,251,135,100, 47, 92, 77,114, 20,169, 46, 21,155,244,147,214, 67, 86, 75,187,225,107,165,211,168, 13, 50, 97,201,
+ 33,105,217,125,100, 96,132, 8,145,233, 45,254,163,163, 48,118,170,148,138, 30,241,222, 83,207,106,114,125, 82, 17,185,179,191,
+236, 7,233,149,179,180,176,136, 60,168,155, 74, 74, 70,139,112,143,207, 58,162, 73,160, 69,163,202,169,240,147,181, 31, 64,106,
+ 43,118, 23,170,198,240, 84, 23, 82,146, 69,144,197,107,220,137,168, 0, 45,232,241,217,177,204, 0, 45, 52,116, 5,104,113, 34,
+231,224, 3, 53,207,195,144,218,104,105,191, 3,147,107, 25,168,224, 30, 17, 36,240,204,255, 70,234,199, 89, 30,150,137,101, 83,
+ 37,101, 28,216, 88,246,144,208,132,202,209,139,174, 13,244, 18,243,233,208,119,100,163, 53,192,193, 51,246,128,204,136, 65,124,
+ 10,238, 58,164, 42,152,106, 82, 14,182, 28,204, 50, 65,106,201,129, 86, 5, 89, 92,221, 2,132, 82, 98, 98,239,108,208, 89,209,
+ 35, 1,196,221, 24, 48, 96, 0,119,201, 89,184,243, 16,180, 21,144,133,235, 55,241, 80,136,118, 29, 2,244,254, 5,163,213,131,
+148,108,169, 59, 15, 9,178,176,178,165,113,189,161,157, 92,218, 2, 99,117, 27,191, 99,199,142, 85, 49,209,124, 36,213,194, 96,
+ 92, 20, 77,118, 40, 18, 52,240,198, 15,168, 99, 18,117,234,212,169, 10,108,167,138,217, 27,195, 67, 26, 7, 17,180,112, 84,214,
+147, 58,105, 95,120, 18,253,237, 62, 38,110, 31, 72,129,125, 32, 13,182,129, 44,212,155, 15, 36, 16,148,102,249, 96,130,160, 77,
+201, 73, 36,167,180,211, 39,138, 58,104, 93,159,242,138, 77,214,146,150,153, 37, 67,194,168,231, 79,117,255, 78, 94, 14, 75, 41,
+129,247,207,125,172, 58,244, 59, 13,105, 86, 36, 9, 24,241,163,228,253, 62,246, 5,227, 92,248,207,229, 12, 6,178,184,195, 26,
+ 28, 80, 18, 65, 86,104,128, 45,244,155, 51,244, 39,197, 29,130,176,205, 58, 99,150,195, 4, 90, 52, 19,224,216, 70, 53, 30, 23,
+147, 4, 62, 28,147,217,247, 9,178, 8, 16, 9, 94, 40,129, 33,216, 48, 10,180,104,219, 68, 41, 27,205, 66,174, 64,237,168,130,
+ 45, 21,100,113,183, 31,223, 5,219, 66, 61, 99,248,187,124, 47,203, 6,255,125,193, 92, 57,104,221, 58,240, 55,239, 83, 51, 66,
+ 9, 28, 37, 91,174,248, 1,155,208,219,172, 3,142,111,122, 64, 75,245, 11, 6,109,131, 75,137,150,150,166, 30,208,114, 70, 83,
+ 99, 12,111,216,222,217,108,189,135, 36,191, 86,130,165,238, 64,116, 64, 71,235, 67, 75,253,253,255,108, 95, 8, 69, 38,137,243,
+109,226,251, 51,150,237,133,235,134,229, 82,175,199, 60,105,216,107,129,148,109,208,199, 6,124,171, 52, 27, 32,237,135,175, 83,
+ 64, 86,191,233, 59,101,214,170,163, 18, 63, 81,114, 78,234, 14,221, 59,100, 15, 31,166,245,178,210,153, 94,189, 28, 81, 81, 78,
+172, 42, 44,239, 47, 87,179,129, 44,181, 83, 7, 3, 93,148,118,245,200, 34,115,179,197,125,201,103, 29, 49,156, 46, 26, 30,162,
+211,221,194,106, 99, 25, 12, 36,233,194, 97, 27, 12,226,143, 3, 96, 93,183,218,100,157,135,209,251,110,184,120,184, 8,131,249,
+219,104,220, 62,176,129, 58, 7,228,111,198,189,131, 10,180,216,193, 97, 31,240, 32,164, 82, 39, 71,223,128, 21, 82, 53,168,105,
+ 30,240, 28,146, 70,101,255, 12,203,198, 50,178,172, 92,249,132, 20,104,133, 70, 89, 52, 52,236,119, 29,114, 16,208, 26, 31, 38,
+224, 78, 68, 54, 46,163,134,240, 42,109,240,173, 77,141, 26, 53, 8,136, 20,213, 1,237, 56, 56,216,169, 78, 1, 57,232,194,118,
+205, 31, 60,118,105,239,229,224,123, 35,208,111, 22,109,220,192,195, 0,158, 33, 53, 36, 32, 10, 9,200, 82,201,135, 1,205, 70,
+152, 0,214, 66,141,121, 4, 32, 22, 27,101,163,176,147,155, 6, 89, 42,193,137, 19, 39,102,197,228, 83, 27,223, 95, 22,147, 76,
+ 49,240,160, 36,120, 64,169,211, 16,164,138, 33,169,199,201,147, 39,103, 35, 77, 0,164,178,104, 67,197, 33,213, 43, 1,154,191,
+130,175,195, 40,204, 54, 73,147,187, 14,239,193,152, 88, 1, 89, 88, 84,248, 96, 21,237, 3, 9, 41, 13,224, 21,144, 5,208,233,
+ 3,128,204,201,198, 37,208,170,144, 37,254,189,215,243, 43,201,146,223,211, 19,100,205, 78,155, 32, 74,249, 62, 37, 98,138,229,
+207,152,242,106,124, 86, 9, 4,176, 82, 15,254,126, 53, 46, 11,108,180,146,201,166,246, 25, 36,109,194,168,195, 77,150,251,191,
+146,221,230,222,129,147,190, 6,100, 17,124, 41, 0, 76, 5, 91, 4, 8,214,177, 58, 36,237,181, 68,152, 48, 97,222, 51,129,134,
+105,159, 99,236,127, 52, 74,231,184, 70,128, 66, 13,128, 10,178, 40,109, 87, 65, 22, 37, 69,170,239, 46,163, 64,139,166, 7, 52,
+133, 80,141,232, 57,102,144, 14, 23,106, 42,200,162,237, 44,165,103,174, 36, 90, 52,211,160,134,133, 32,202, 8,208, 98, 30,142,
+ 89,122,230, 29, 42, 40,226,130,146,187, 11, 93, 73,180,212,246, 15,160,101, 8,188,145, 38,119, 23,186,146,104, 57,163,249,133,
+176,200,223,211, 15,191,212,199,193,249,104,211,159, 75, 85,247,159,179,250,176,116, 26,177, 90,126,235,187, 88, 42, 52,246,180,
+213, 71,181,223, 7, 73,231,209, 27,165,255,244, 93, 50,119,253, 9, 41, 89,177,222,243, 72, 81,162, 55,117,198,149,202,113, 35,
+157,121,218,167,138,188, 95, 88, 82, 94, 95,159, 44,114,111,177,126,218,208, 72, 30,214, 78, 37,149,226, 68,116,184, 2, 82, 28,
+150, 34,172,142,223,225,195,114, 11,171,176,157, 48,124, 62, 15, 23, 14, 4, 89, 55, 85,155, 44, 74,177,152, 84,144,133, 45,204,
+ 77, 99,199,118, 22,138,199, 97,241, 41,213, 97, 71,134, 49, 52,109,146, 76,219, 79,253, 13, 45, 37, 39,203,202,193,131,101,255,
+ 27,222,239,232,149, 4, 91,158, 4, 84, 86, 63, 90,218,193, 58,130,213,143, 22, 1, 24,165, 93,186,174, 29,180, 47,128,232,189,
+ 13,252,100, 61,228,128, 65, 81, 56, 7, 73, 74,243,216, 87, 32,241,122,132, 65,218,140,241,246, 63,132, 93,198,139,129, 9, 39,
+ 41,128, 37, 86, 46, 66,221, 62,165, 88,237, 77, 74,157, 62,122,153,149, 38, 1, 27,105, 18, 96,181, 13, 33,205, 13,112,173,241,
+ 24, 82,135,251,152, 16,161,113,246,243, 3,112,187, 7,128,229,139,122,242, 69,185,239, 50,193, 88,158,187, 14,185, 27,207,169,
+ 68, 11,254,179, 90, 85,207, 30,239, 14, 36, 91, 99,173,109,228, 27, 0,168,205, 43,235,196, 16, 75,255,184, 98,233, 23, 83, 94,
+142,205,172, 36,203,128,120,216,113,152, 81, 46, 13,254, 73,242,124, 23,203, 55,117,194,104,223, 26,231,232,127, 46,167, 2,168,
+ 52,126,178, 62,114, 88,170, 1, 89, 33,182,213,250, 20,174, 18,104,209, 56,159, 46, 65, 88, 78, 61,119, 33,156,168, 0,180, 92,
+ 74,117, 84,135,165, 28, 39, 9,168,248,141, 80,109, 43,246,183,148,156,209,117, 12,118, 30, 51,194,132, 2,178,224, 46,197,145,
+195, 82,219,103, 81, 50, 69,147, 5,163, 18, 45,190,147,210, 56, 61,137, 22,119, 79,242,123, 56,166, 81,178, 70, 9, 28, 65, 32,
+147, 86,170,132, 62,100,155,159,245,128,150,150, 38,191,159, 32, 91, 61,168, 46, 84,211,241,230,181,157,210,252, 82, 88,228, 83,
+218,141,139,103, 93, 75,180, 62,211, 75, 29,146,133,173,214,166,159, 75, 86,123, 49,125,217,126, 25,245,215, 30,105,211,111,174,
+252,218,106,176,212,106, 61, 84, 58, 13, 89, 40,227, 23, 31,146,153,171,142, 72,225, 50, 53, 94, 68,143, 17,103,147,171,178,149,
+143, 21,225,192,149, 38, 69,131,100, 72, 37,145, 1,229, 68,254, 44, 41,210,187,136,200, 31, 5, 68,186, 33,168,119,167,236,152,
+ 30, 50, 97, 56, 79, 31, 44,157, 41,154, 40,136,207, 58,163,173,130, 45, 95,216, 11,221, 65,199, 56,137,237,190, 87,160, 58,226,
+238, 66, 26,190, 43, 9,234, 66, 69,146, 21, 2,144,197,247, 98,197,225, 5,181,207, 13,252, 52,181, 19,240, 75,214,149,131,119,
+101,100,153, 89,246,191,185, 28,246,175,167,255, 44,173,179, 82,245, 62,129,215,167,108,177,253, 14,223, 59, 13,192,242, 44,165,
+120, 88, 5, 2,115, 39,152, 1,154, 63,252,195,190,255,191, 86, 28,213, 51, 60, 85,119,174,210,110,220,207,130,244,157, 25, 6,
+101, 5,202, 78,155, 32,234,206,110,197,177, 25,166, 91, 42,121, 54, 6,118, 91,147,242,201,229,193,185,101, 98,221, 52,146, 45,
+ 73,140,155,105,226, 71,133, 91, 62,247,161,195, 1, 5,108, 33, 57, 2, 82,174,238,125, 17,198, 66,117,120, 24,210,172, 64, 74,
+181,168, 66,164, 29, 22,119,195, 17,108, 80, 2, 69, 9, 54,205, 6,212, 3, 54, 85,239, 48, 22,112,151,167,211,131,225,116,104,
+175, 75,192, 67, 73, 25, 65, 22,237, 78,105, 7, 70,201,158, 10,178,232, 95,140, 32,139, 94,233, 29,132,224,177,209,167,173, 21,
+188,213, 7, 82,125,201,178,241,204,242, 82, 2, 69, 32, 67,233, 21,193, 18, 37,112,148,192,211,132,165,111,223,190,186, 54, 90,
+116,188,202,239, 34, 13,130, 77,210,165,228, 94,253,110,251, 48, 66,204,139,205, 55, 46, 37, 90,159,131,230, 23,105, 8,161,255,
+146,144,248, 47, 12,253, 82,132,143, 18,165, 85,220, 4, 73, 31, 52,235, 52, 36,104,240,228, 85, 50,123,141,151,204, 89,115, 76,
+134, 76, 89, 35,191,119, 25, 22, 20, 63, 81,138, 7, 81,162, 68,211, 53,142,133,161, 72,234, 10, 49, 35, 28,175, 22, 45,194,203,
+106, 81,195,127, 72, 81,194,217, 82,213,200, 97, 95,218,167, 42,184, 86, 62, 70,248, 99,124,214,213,151,169, 96,139, 30,223,217,
+152,185,226,161, 72,148, 58,109,118, 36, 54,104,170, 11,205, 74,178, 66,159,155,110,138,110, 14,252,103, 57, 64, 71,164,148, 86,
+185, 74, 4, 89, 33, 81, 75,125, 3,247, 13, 53,211, 38,136,182, 50,125,130, 40, 87, 51, 38,140,122, 27,224,107, 91,218,248, 81,
+ 59,231, 72,236, 17,229, 63,203,113,243, 31, 30,210,160,210,230,223,100,254,137,104, 4, 91,220,220,195,196,197,148,214,126, 20,
+ 11, 43, 46,174,252, 0, 32,148,132,123,135,240,138,168, 58,175, 73, 77,224, 68,201, 22, 85,130,174, 18,243, 88, 65,150,171,185,
+232,179,236, 58,132, 52,239,138,118, 23, 53, 77, 35,212, 68, 85,165,253, 65,137, 23,120,225,227,234,219, 63, 7, 77,243, 85,250,
+101,158,112,178,235,240,159, 35,209,210,176, 33, 73,132, 72,209,123, 70,143, 19,127, 71,212,232,113,124,163,198,136,227, 27, 51,
+110,130, 29, 80, 21,246, 68, 30, 67, 33,119, 62, 55, 75, 9,182,104,119, 69,143,239, 52,116,183, 79,188,199, 60,159,187, 28,110,
+250,110, 14,184, 57,224,230,128,155, 3,110, 14,132, 34, 7,210,114,119,183, 10, 44, 85, 80,169, 5,150, 42,192,228, 25, 64,148,
+ 32, 75, 47,244,212,231,160, 25,138,159,252, 21,145, 82,117,168, 6,139,108,200, 64,209,164,219,253,191,149,166,193,239,102, 54,
+179,229, 52,178,203,194, 40, 77,213, 47,154,167,129,242, 26,165,105,211,221,135, 34, 77, 51,254,219,140,150, 51, 84,105,106,108,
+ 6,140,210,213, 45,167,182, 15, 25,236, 79,134,105,154,232, 75,127, 59, 77, 3,237,200, 80, 63,210,218,117, 24,220, 61,109,230,
+219,141,246, 37, 51, 52,141,246, 37, 51, 52, 67,189,125,154,240,105,228,178,156,246,109,210, 32, 93, 83, 52,217, 80, 12,244, 37,
+ 83, 52, 13,246,165,127, 4, 77, 3,125, 41,164,229,116, 53, 47, 25,106,159, 90, 31,157,154,186, 55, 50, 55, 25,248,172, 47,155,
+ 69,221,113,168,250,211,178,123,123,232,168, 12, 13, 14, 98,218,119,235, 86,132, 54,179,129,142, 98,104,224,253, 92, 52, 77, 26,
+234, 25,250,118,131,223,172,126,210,223, 70, 83, 45,128,193,242, 26, 45,231,110,235, 0,169,156,117, 14,163, 52,149,129, 33, 52,
+202,169,109,239, 38,234,222,208,128,166,150, 49,180,203,105,162,158, 12,151,243,115,208,252, 92,252,212,107, 68,214,251,134,191,
+221, 96,253,232,142, 75,142,198, 78, 3,180,205,148,211,104, 95, 50, 67,211,104, 95, 10, 81,223,212,249,126,211, 52, 63,149,159,
+206,218,121,104,150,211, 96, 95, 50,253,237, 6,198,188, 16,209, 12,141, 49, 89, 91, 54, 3,117,100,176, 11,255,189,217, 62,187,
+234,208, 36,163, 12, 85,174,102,210, 41,108,128,125,166,104, 26,160,167, 59, 72,106, 59,135, 9,176,105,168,156, 6, 87, 77,166,
+129,150,118, 21, 17,154,157,133, 43, 18, 3, 60, 53,250,237, 70, 87,225,102,234, 72,165, 25, 42, 18, 66,123, 64, 96,160,253,235,
+126,187,150,134, 1,122,134,190,221,158,166,129,122,250, 91,203,169,105,247,122,245,100,184,156, 38,250,210,223, 74,211,196,120,
+103,166,156, 70,251, 82, 72,104,134, 74, 29,169,109,210, 90, 79,158,159, 10, 96,236,199, 56, 3,125,201,208,183,107,251,142,129,
+113, 52, 68, 52, 63,117, 76,214,150,203, 96, 95, 50, 85, 78,131,125, 73,151,166,125, 91, 55, 72,215,192, 20,243,247,100,249, 34,
+ 18, 45, 3,168,217,254,235, 13, 87,132, 9,182, 25,162,105,112,229, 96, 10,192,124, 45, 52, 77, 72, 11, 12, 77,226, 38,191,219,
+ 48,205,207, 85, 78, 19,237, 84,183, 45,125,109, 64,203,192,100, 99,184,205,219,211, 50, 64,219, 48, 63, 77,180,169,191,149,166,
+137, 54,106,170,156, 6,120,105,168, 31,125,238,246,105,176, 47,233, 74,201,180,227,187, 65,158,154,162,249, 57,203,249, 41,160,
+200, 89, 61,127, 10,200,252, 90,104, 58,170, 19,131,117,111, 2, 14,252, 75,179, 26, 28, 32, 12, 15,230, 26,196,171,216, 45, 24,
+ 96,155,238,128,102, 71,179,112,104,209, 52, 49, 57, 24, 26, 36, 63, 87, 57,185, 34, 51,176, 18, 51, 85, 71, 6, 7, 50, 83, 52,
+ 63, 71, 57, 65, 83, 89, 41,107, 87,165, 46,234, 95,183, 45,105, 6, 6,163, 60, 53, 76,211, 4, 79, 13,211, 52,184,186, 53,212,
+ 62,181,131,162, 65,158, 26, 46,167,137,190,100,152,166,137,213,178, 25,154, 95, 75,189,135,122, 57, 77,244, 37, 93, 80,164,214,
+141,181,205, 27, 41,171, 41,154, 6,251,146, 41,154, 6,251, 82, 72,105,186,154,151, 76,209, 52,216,151, 76,209, 52,216,151, 12,
+245,163, 16,212,189,129, 41,251,235,202,242, 63,238, 43,130, 14,110,207,192,132, 0, 0, 0, 0, 73, 69, 78, 68,174, 66, 96,130,
0};
diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt
index 7a2f196fd6d..b312f397939 100644
--- a/source/blender/editors/gpencil/CMakeLists.txt
+++ b/source/blender/editors/gpencil/CMakeLists.txt
@@ -42,6 +42,7 @@ set(SRC
gpencil_edit.c
gpencil_ops.c
gpencil_paint.c
+ gpencil_undo.c
gpencil_intern.h
)
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 440d5ee7c4d..cfa9585868e 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -644,7 +644,7 @@ static void gp_draw_data (bGPdata *gpd, int offsx, int offsy, int winx, int winy
/* 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 ((G.f & G_GREASEPENCIL) && (gpl->flag & GP_LAYER_ACTIVE) &&
+ if (ED_gpencil_session_active() && (gpl->flag & GP_LAYER_ACTIVE) &&
(gpf->flag & GP_FRAME_PAINT))
{
/* Buffer stroke needs to be drawn with a different linestyle to help differentiate them from normal strokes. */
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 9dc764b7aac..c915bc9ea37 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -511,8 +511,8 @@ static void gp_stroke_to_bezier (bContext *C, bGPDlayer *gpl, bGPDstroke *gps, C
copy_v3_v3(p3d_prev, p3d_cur);
copy_v3_v3(p3d_cur, p3d_next);
- if (i + 1 < tot) {
- gp_strokepoint_convertcoords(C, gps, pt+1, p3d_next, subrect);
+ if (i + 2 < tot) {
+ gp_strokepoint_convertcoords(C, gps, pt + 2, p3d_next, subrect);
}
}
@@ -595,7 +595,7 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
/* check if there's data to work with */
if (gpd == NULL) {
- BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data to work on.");
+ BKE_report(op->reports, RPT_ERROR, "No Grease Pencil data to work on");
return OPERATOR_CANCELLED;
}
@@ -607,7 +607,7 @@ static int gp_convert_layer_exec (bContext *C, wmOperator *op)
break;
default: /* unsupoorted */
- BKE_report(op->reports, RPT_ERROR, "Unknown conversion option.");
+ BKE_report(op->reports, RPT_ERROR, "Unknown conversion option");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index c31de8d30a7..8000af54f53 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -37,6 +37,7 @@
/* ***************************************************** */
/* Operator Defines */
+struct bGPdata;
struct wmOperatorType;
/* drawing ---------- */
@@ -48,6 +49,7 @@ typedef enum eGPencil_PaintModes {
GP_PAINTMODE_DRAW = 0,
GP_PAINTMODE_ERASER,
GP_PAINTMODE_DRAW_STRAIGHT,
+ GP_PAINTMODE_DRAW_POLY
} eGPencil_PaintModes;
/* buttons editing --- */
@@ -61,6 +63,11 @@ void GPENCIL_OT_active_frame_delete(struct wmOperatorType *ot);
void GPENCIL_OT_convert(struct wmOperatorType *ot);
+/* undo stack ---------- */
+
+void gpencil_undo_init(struct bGPdata *gpd);
+void gpencil_undo_push(struct bGPdata *gpd);
+void gpencil_undo_finish(void);
/******************************************************* */
/* FILTERED ACTION DATA - TYPES ---> XXX DEPRECEATED OLD ANIM SYSTEM CODE! */
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index e1e4c8d5457..150e0ba90e4 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -59,6 +59,9 @@ void ED_keymap_gpencil(wmKeyConfig *keyconf)
/* 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);
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 04565eab155..842ab92ae31 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -124,6 +124,7 @@ enum {
/* Runtime flags */
enum {
GP_PAINTFLAG_FIRSTRUN = (1<<0), /* operator just started */
+ GP_PAINTFLAG_STROKEADDED = (1<<1) /* stroke was already added during draw session */
};
/* ------ */
@@ -152,7 +153,7 @@ static int gpencil_draw_poll (bContext *C)
/* check if current context can support GPencil data */
if (gpencil_data_get_pointers(C, NULL) != NULL) {
/* check if Grease Pencil isn't already running */
- if ((G.f & G_GREASEPENCIL) == 0)
+ if (ED_gpencil_session_active() == 0)
return 1;
else
CTX_wm_operator_poll_msg_set(C, "Grease Pencil operator is already active");
@@ -375,6 +376,52 @@ static short gp_stroke_addpoint (tGPsdata *p, const int mval[2], float pressure)
else
return GP_STROKEADD_NORMAL;
}
+ else if (p->paintmode == GP_PAINTMODE_DRAW_POLY) {
+ /* get pointer to destination point */
+ pt= (tGPspoint *)(gpd->sbuffer);
+
+ /* store settings */
+ pt->x= mval[0];
+ pt->y= mval[1];
+ pt->pressure= pressure;
+
+ /* if there's stroke fir 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;
+ 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->totpoints++;
+ }
+
+ 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_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);
+ }
+
+ /* convert screen-coordinates to appropriate coordinates (and store them) */
+ gp_stroke_convertcoords(p, &pt->x, &pts->x, NULL);
+
+ /* copy pressure */
+ pts->pressure= pt->pressure;
+ }
+
+ /* increment counters */
+ if (gpd->sbuffer_size == 0)
+ gpd->sbuffer_size++;
+
+ return GP_STROKEADD_NORMAL;
+ }
/* return invalid state for now... */
return GP_STROKEADD_INVALID;
@@ -395,7 +442,7 @@ static void gp_stroke_smooth (tGPsdata *p)
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) || (p->paintmode == GP_PAINTMODE_DRAW_STRAIGHT))
+ if (!(U.gp_settings & GP_PAINT_DOSMOOTH) || ELEM(p->paintmode, GP_PAINTMODE_DRAW_STRAIGHT, GP_PAINTMODE_DRAW_POLY))
return;
/* don't try if less than 2 points in buffer */
@@ -527,17 +574,28 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
return;
}
+ /* special case for poly line -- for already added stroke during session
+ coordinates are getting added to stroke immediatelly to allow more
+ interactive behavior */
+ if (p->paintmode == GP_PAINTMODE_DRAW_POLY) {
+ if (p->flags & GP_PAINTFLAG_STROKEADDED)
+ return;
+ }
+
/* allocate memory for a new stroke */
gps= MEM_callocN(sizeof(bGPDstroke), "gp_stroke");
- /* allocate enough memory for a continuous array for storage points */
- pt= gps->points= MEM_callocN(sizeof(bGPDspoint)*totelem, "gp_stroke_points");
-
/* copy appropriate settings for stroke */
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");
+
+ /* set pointer to first non-initialized point */
+ 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 */
@@ -565,6 +623,16 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
pt->pressure= ptc->pressure;
}
}
+ else if (p->paintmode == GP_PAINTMODE_DRAW_POLY) {
+ /* first point */
+ 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;
+ }
else {
float *depth_arr= NULL;
@@ -643,6 +711,8 @@ static void gp_stroke_newfrombuffer (tGPsdata *p)
MEM_freeN(depth_arr);
}
+ p->flags |= GP_PAINTFLAG_STROKEADDED;
+
/* add stroke to frame */
BLI_addtail(&p->gpf->strokes, gps);
}
@@ -891,10 +961,14 @@ static void gp_session_validatebuffer (tGPsdata *p)
bGPdata *gpd= p->gpd;
/* clear memory of buffer (or allocate it if starting a new session) */
- if (gpd->sbuffer)
+ if (gpd->sbuffer) {
+ //printf("\t\tGP - reset sbuffer\n");
memset(gpd->sbuffer, 0, sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX);
- else
+ }
+ else {
+ //printf("\t\tGP - allocate sbuffer\n");
gpd->sbuffer= MEM_callocN(sizeof(tGPspoint)*GP_STROKE_BUFFER_MAX, "gp_session_strokebuffer");
+ }
/* reset indices */
gpd->sbuffer_size = 0;
@@ -903,24 +977,21 @@ static void gp_session_validatebuffer (tGPsdata *p)
gpd->sbuffer_sflag= 0;
}
-/* init new painting session */
-static tGPsdata *gp_session_initpaint (bContext *C)
+/* (re)init new painting data */
+static int gp_session_initdata (bContext *C, tGPsdata *p)
{
- tGPsdata *p = NULL;
bGPdata **gpd_ptr = NULL;
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;
if (G.f & G_DEBUG)
printf("Error: No active view for painting \n");
- return NULL;
+ return 0;
}
- /* create new context data */
- p= MEM_callocN(sizeof(tGPsdata), "GPencil Drawing Data");
-
/* pass on current scene and window */
p->scene= CTX_data_scene(C);
p->win= CTX_wm_window(C);
@@ -942,7 +1013,7 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: 3D-View active region doesn't have any region data, so cannot be drawable \n");
- return p;
+ return 0;
}
#if 0 // XXX will this sort of antiquated stuff be restored?
@@ -951,7 +1022,7 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown \n");
- return p;
+ return 0;
}
#endif
}
@@ -972,7 +1043,7 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown \n");
- return;
+ return 0;
}
#endif
}
@@ -992,13 +1063,13 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: In active view (sequencer), active mode doesn't support Grease Pencil \n");
- return;
+ return 0;
}
if ((sseq->flag & SEQ_DRAW_GPENCIL)==0) {
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown \n");
- return;
+ return 0;
}
}
break;
@@ -1019,7 +1090,7 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: In active view, Grease Pencil not shown \n");
- return p;
+ return 0;
}
#endif
}
@@ -1031,7 +1102,7 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: Active view not appropriate for Grease Pencil drawing \n");
- return p;
+ return 0;
}
break;
}
@@ -1042,7 +1113,7 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->status= GP_STATUS_ERROR;
if (G.f & G_DEBUG)
printf("Error: Current context doesn't allow for any Grease Pencil data \n");
- return p;
+ return 0;
}
else {
/* if no existing GPencil block exists, add one */
@@ -1051,8 +1122,11 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->gpd= *gpd_ptr;
}
- /* set edit flags - so that buffer will get drawn */
- G.f |= G_GREASEPENCIL;
+ if(ED_gpencil_session_active()==0) {
+ /* initialize undo stack,
+ also, existing undo stack would make buffer drawn */
+ gpencil_undo_init(p->gpd);
+ }
/* clear out buffer (stored in gp-data), in case something contaminated it */
gp_session_validatebuffer(p);
@@ -1062,6 +1136,19 @@ static tGPsdata *gp_session_initpaint (bContext *C)
p->im2d_settings.sizex= 1;
p->im2d_settings.sizey= 1;
#endif
+
+ return 1;
+}
+
+/* init new painting session */
+static tGPsdata *gp_session_initpaint (bContext *C)
+{
+ tGPsdata *p = NULL;
+
+ /* create new context data */
+ p= MEM_callocN(sizeof(tGPsdata), "GPencil Drawing Data");
+
+ gp_session_initdata(C, p);
/* return context data for running paint operator */
return p;
@@ -1078,6 +1165,7 @@ static void gp_session_cleanup (tGPsdata *p)
/* free stroke buffer */
if (gpd->sbuffer) {
+ //printf("\t\tGP - free sbuffer\n");
MEM_freeN(gpd->sbuffer);
gpd->sbuffer= NULL;
}
@@ -1247,7 +1335,8 @@ static void gp_paint_strokeend (tGPsdata *p)
static void gp_paint_cleanup (tGPsdata *p)
{
/* finish off a stroke */
- gp_paint_strokeend(p);
+ if(p->gpd)
+ gp_paint_strokeend(p);
/* "unlock" frame */
if (p->gpf)
@@ -1260,8 +1349,8 @@ static void gpencil_draw_exit (bContext *C, wmOperator *op)
{
tGPsdata *p= op->customdata;
- /* clear edit flags */
- G.f &= ~G_GREASEPENCIL;
+ /* clear undo stack */
+ gpencil_undo_finish();
/* restore cursor to indicate end of drawing */
WM_cursor_restore(CTX_wm_window(C));
@@ -1592,6 +1681,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);
/* 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;
@@ -1609,16 +1699,57 @@ static int gpencil_area_exists(bContext *C, ScrArea *satest)
return 0;
}
+static tGPsdata *gpencil_stroke_begin(bContext *C, wmOperator *op)
+{
+ 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;
+ }
+
+ //printf("\t\tGP - start stroke \n");
+
+ /* we may need to set up paint env again if we're resuming */
+ // XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions
+ // XXX: with tablet events, we may event want to check for eraser here, for nicer tablet support
+
+ if (gp_session_initdata(C, p))
+ gp_paint_initstroke(p, p->paintmode);
+
+ p= op->customdata;
+
+ if(p->status != GP_STATUS_ERROR)
+ p->status= GP_STATUS_PAINTING;
+
+ return op->customdata;
+}
+
+static void gpencil_stroke_end(wmOperator *op)
+{
+ tGPsdata *p= op->customdata;
+
+ gp_paint_cleanup(p);
+
+ gpencil_undo_push(p->gpd);
+
+ gp_session_cleanup(p);
+
+ p->status= GP_STATUS_IDLING;
+
+ 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)
{
tGPsdata *p= op->customdata;
- //int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */
- /* currently, grease pencil conflicts with such operators as undo and set object mode
- which makes behavior of operator totally unpredictable and crash for some cases.
- the only way to solve this proper is to ger rid of pointers to data which can
- chage stored in operator custom data (sergey) */
- int estate = OPERATOR_RUNNING_MODAL;
+ int estate = OPERATOR_PASS_THROUGH; /* default exit state - not handled, so let others have a share of the pie */
// if (event->type == NDOF_MOTION)
// return OPERATOR_PASS_THROUGH;
@@ -1646,17 +1777,24 @@ 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;
/* basically, this should be mouse-button up = end stroke
* BUT what happens next depends on whether we 'painting sessions' is enabled
*/
- if (GPENCIL_SKETCH_SESSIONS_ON(p->scene)) {
+ sketch|= GPENCIL_SKETCH_SESSIONS_ON(p->scene);
+ /* polyline drawig is also 'sketching' -- all knots should be added during one session */
+ sketch|= p->paintmode == GP_PAINTMODE_DRAW_POLY;
+
+ if (sketch) {
/* end stroke only, and then wait to resume painting soon */
//printf("\t\tGP - end stroke only\n");
- gp_paint_cleanup(p);
- p->status= GP_STATUS_IDLING;
+ gpencil_stroke_end(op);
/* we've just entered idling state, so this event was processed (but no others yet) */
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);
}
else {
//printf("\t\tGP - end of stroke + op\n");
@@ -1664,35 +1802,19 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
estate = OPERATOR_FINISHED;
}
}
- else {
+ else if (event->val == KM_PRESS) {
/* not painting, so start stroke (this should be mouse-button down) */
- /* 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= gpencil_stroke_begin(C, op);
+
+ if (p->status == GP_STATUS_ERROR) {
estate = OPERATOR_CANCELLED;
}
- else {
- //printf("\t\tGP - start stroke \n");
- p->status= GP_STATUS_PAINTING;
-
- /* we may need to set up paint env again if we're resuming */
- // XXX: watch it with the paintmode! in future, it'd be nice to allow changing paint-mode when in sketching-sessions
- // XXX: with tablet events, we may event want to check for eraser here, for nicer tablet support
- gp_paint_initstroke(p, p->paintmode);
-
- if (p->status == GP_STATUS_ERROR) {
- estate = OPERATOR_CANCELLED;
- }
- }
+ } else {
+ p->status = GP_STATUS_IDLING;
}
}
-
-
/* handle mode-specific events */
if (p->status == GP_STATUS_PAINTING) {
/* handle painting mouse-movements? */
@@ -1704,7 +1826,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
/* finish painting operation if anything went wrong just now */
if (p->status == GP_STATUS_ERROR) {
- //printf("\t\t\t\tGP - add error done! \n");
+ printf("\t\t\t\tGP - add error done! \n");
estate = OPERATOR_CANCELLED;
}
else {
@@ -1721,28 +1843,6 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
estate = OPERATOR_RUNNING_MODAL;
}
}
- else if (p->status == GP_STATUS_IDLING) {
- /* standard undo/redo shouldn't be allowed to execute or else it causes crashes, so catch it here */
- // FIXME: this is a hardcoded hotkey that can't be changed
- // TODO: catch redo as well, but how?
- if (event->type == ZKEY && event->val == KM_RELEASE) {
- /* oskey = cmd key on macs as they seem to use cmd-z for undo as well? */
- if ((event->ctrl) || (event->oskey)) {
- /* just delete last stroke, which will look like undo to the end user */
- //printf("caught attempted undo event... deleting last stroke \n");
- gpencil_frame_delete_laststroke(p->gpl, p->gpf);
- /* undoing the last line can free p->gpf
- * note, could do this in a bit more of an elegant way then a search but it at least prevents a crash */
- if(BLI_findindex(&p->gpl->frames, p->gpf) == -1) {
- p->gpf= NULL;
- }
-
- /* event handled, so force refresh */
- ED_region_tag_redraw(p->ar); /* just active area for now, since doing whole screen is too slow */
- estate = OPERATOR_RUNNING_MODAL;
- }
- }
- }
/* gpencil modal operator stores area, which can be removed while using it (like fullscreen) */
if(0==gpencil_area_exists(C, p->sa))
@@ -1778,6 +1878,7 @@ static int gpencil_draw_modal (bContext *C, wmOperator *op, wmEvent *event)
static EnumPropertyItem prop_gpencil_drawmodes[] = {
{GP_PAINTMODE_DRAW, "DRAW", 0, "Draw Freehand", ""},
{GP_PAINTMODE_DRAW_STRAIGHT, "DRAW_STRAIGHT", 0, "Draw Straight Lines", ""},
+ {GP_PAINTMODE_DRAW_POLY, "DRAW_POLY", 0, "Draw Poly Line", ""},
{GP_PAINTMODE_ERASER, "ERASER", 0, "Eraser", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -1800,7 +1901,7 @@ void GPENCIL_OT_draw (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* settings for drawing */
- RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to intepret mouse movements.");
+ RNA_def_enum(ot->srna, "mode", prop_gpencil_drawmodes, 0, "Mode", "Way to intepret mouse movements");
RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
}
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
new file mode 100644
index 00000000000..1154975e3cc
--- /dev/null
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -0,0 +1,168 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Blender Foundation,
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_gpencil_types.h"
+#include "DNA_listBase.h"
+#include "DNA_windowmanager_types.h"
+
+#include "BKE_context.h"
+#include "BKE_gpencil.h"
+
+#include "BLI_listbase.h"
+
+#include "ED_gpencil.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+#include "gpencil_intern.h"
+
+#define MAXUNDONAME 64
+
+typedef struct bGPundonode {
+ struct bGPundonode *next, *prev;
+
+ char name[MAXUNDONAME];
+ struct bGPdata *gpd;
+} bGPundonode;
+
+static ListBase undo_nodes = {NULL, NULL};
+static bGPundonode *cur_node = NULL;
+
+int ED_gpencil_session_active(void)
+{
+ return undo_nodes.first != NULL;
+}
+
+int ED_undo_gpencil_step(bContext *C, int step, const char *name)
+{
+ bGPdata **gpd_ptr= NULL, *new_gpd= NULL;
+
+ gpd_ptr= gpencil_data_get_pointers(C, NULL);
+
+ 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;
+ }
+ }
+ }
+ 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;
+ }
+ }
+ }
+
+ if(new_gpd) {
+ if(gpd_ptr) {
+ if(*gpd_ptr) {
+ bGPdata *gpd= *gpd_ptr;
+ bGPDlayer *gpl, *gpld;
+
+ free_gpencil_layers(&gpd->layers);
+
+ /* copy layers */
+ gpd->layers.first= gpd->layers.last= NULL;
+
+ for (gpl= new_gpd->layers.first; gpl; gpl= gpl->next) {
+ /* make a copy of source layer and its data */
+ gpld= gpencil_layer_duplicate(gpl);
+ BLI_addtail(&gpd->layers, gpld);
+ }
+ }
+ }
+ }
+
+ WM_event_add_notifier(C, NC_SCREEN|ND_GPENCIL|NA_EDITED, NULL);
+
+ return OPERATOR_FINISHED;
+}
+
+void gpencil_undo_init(bGPdata *gpd)
+{
+ gpencil_undo_push(gpd);
+}
+
+void gpencil_undo_push(bGPdata *gpd)
+{
+ bGPundonode *undo_node;
+
+ //printf("\t\tGP - undo push\n");
+
+ if(cur_node) {
+ /* remove all un-done nodes from stack */
+ undo_node= cur_node->next;
+
+ while(undo_node) {
+ bGPundonode *next_node= undo_node->next;
+
+ free_gpencil_data(undo_node->gpd);
+ MEM_freeN(undo_node->gpd);
+
+ BLI_freelinkN(&undo_nodes, undo_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);
+
+ cur_node= undo_node;
+
+ BLI_addtail(&undo_nodes, undo_node);
+}
+
+void gpencil_undo_finish(void)
+{
+ bGPundonode *undo_node= undo_nodes.first;
+
+ while(undo_node) {
+ free_gpencil_data(undo_node->gpd);
+ MEM_freeN(undo_node->gpd);
+
+ undo_node= undo_node->next;
+ }
+
+ BLI_freelistN(&undo_nodes);
+
+ cur_node= NULL;
+}
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index a029c5c1f12..b73684d43d8 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -148,7 +148,6 @@ void ED_armature_bone_rename(struct bArmature *arm, char *oldnamep, char *newnam
void undo_push_armature(struct bContext *C, const char *name);
/* poseobject.c */
-struct Object *ED_object_pose_armature(struct Object *ob);
void ED_armature_exit_posemode(struct bContext *C, struct Base *base);
void ED_armature_enter_posemode(struct bContext *C, struct Base *base);
int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan);
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index d78d2846572..b4782a5919b 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -58,7 +58,7 @@ void CU_select_swap(struct Object *obedit);
void undo_push_curve (struct bContext *C, const char *name);
-ListBase *curve_get_editcurve(struct Object *ob);
+ListBase *object_editcurve_get(struct Object *ob);
void load_editNurb (struct Object *obedit);
void make_editNurb (struct Object *obedit);
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 07dcc959e32..bfd16487ae5 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -106,4 +106,8 @@ void paste_gpdata(void);
void snap_gplayer_frames(struct bGPDlayer *gpl, short mode);
void mirror_gplayer_frames(struct bGPDlayer *gpl, short mode);
+/* ------------ Grease-Pencil Undo System ------------------ */
+int ED_gpencil_session_active(void);
+int ED_undo_gpencil_step(struct bContext *C, int step, const char *name);
+
#endif /* ED_GPENCIL_H */
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index cb730c7ad4b..07390deb6c7 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -123,6 +123,8 @@ int EM_vertColorCheck(struct EditMesh *em);
void undo_push_mesh(struct bContext *C, const char *name);
+void paintvert_flush_flags(struct Object *ob);
+void paintvert_deselect_all_visible(struct Object *ob, int action, short flush_flags);
/* editmesh_lib.c */
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h
index cc4dd6330fb..1cbf45960d3 100644
--- a/source/blender/editors/include/ED_node.h
+++ b/source/blender/editors/include/ED_node.h
@@ -39,6 +39,7 @@ struct Material;
struct Scene;
struct Tex;
struct bContext;
+struct bNodeTree;
struct bNode;
struct bNodeTree;
struct ScrArea;
@@ -47,6 +48,7 @@ struct ScrArea;
void ED_init_node_butfuncs(void);
/* node_draw.c */
+void ED_node_tree_update(struct SpaceNode *snode, struct Scene *scene);
void ED_node_changed_update(struct ID *id, struct bNode *node);
void ED_node_generic_update(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
@@ -57,8 +59,9 @@ void ED_node_texture_default(struct Tex *tex);
void ED_node_link_intersect_test(struct ScrArea *sa, int test);
void ED_node_link_insert(struct ScrArea *sa);
-void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
+void ED_node_update_hierarchy(struct bContext *C, struct bNodeTree *ntree);
+void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
/* node ops.c */
void ED_operatormacros_node(void);
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index c646ec55506..b451e278d47 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -136,8 +136,8 @@ void ED_setflagsLatt(struct Object *obedit, int flag);
/* object_modifier.c */
enum {
MODIFIER_APPLY_DATA=1,
- MODIFIER_APPLY_SHAPE,
-} eModifier_Apply_Mode;
+ MODIFIER_APPLY_SHAPE
+};
struct ModifierData *ED_object_modifier_add(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, const char *name, int type);
int ED_object_modifier_remove(struct ReportList *reports, struct Main *bmain, struct Scene *scene, struct Object *ob, struct ModifierData *md);
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index 33d2dfcf4c5..85a8d8945bb 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -44,7 +44,6 @@ 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);
-void ED_sculpt_modifiers_changed(struct Object *ob);
/* paint_ops.c */
void ED_operatortypes_paint(void);
diff --git a/source/blender/editors/include/ED_sequencer.h b/source/blender/editors/include/ED_sequencer.h
index cd22a5c6ca4..5be1403c97b 100644
--- a/source/blender/editors/include/ED_sequencer.h
+++ b/source/blender/editors/include/ED_sequencer.h
@@ -31,8 +31,4 @@
#define SEQ_ZOOM_FAC(szoom) ((szoom) > 0.0f)? (szoom) : ((szoom) == 0.0f)? (1.0f) : (-1.0f/(szoom))
-
-/* in space_sequencer.c, for rna update function */
-void ED_sequencer_update_view(bContext *C, int view);
-
#endif /* ED_SEQUENCER_H */
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index f8682d3935b..d574ddd3030 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -53,6 +53,7 @@ struct Scene;
struct View3D;
struct ViewContext;
struct wmWindow;
+struct MVert;
/* for derivedmesh drawing callbacks, for view3d_select, .... */
diff --git a/source/blender/editors/include/UI_icons.h b/source/blender/editors/include/UI_icons.h
index f8ea9615be2..887d069fdaa 100644
--- a/source/blender/editors/include/UI_icons.h
+++ b/source/blender/editors/include/UI_icons.h
@@ -589,9 +589,9 @@ DEF_ICON(MOD_MULTIRES)
DEF_ICON(MOD_SMOKE)
DEF_ICON(MOD_SOLIDIFY)
DEF_ICON(MOD_SCREW)
+DEF_ICON(MOD_VERTEX_WEIGHT)
DEF_ICON(MOD_DYNAMICPAINT)
#ifndef DEF_ICON_BLANK_SKIP
- DEF_ICON(BLANK161)
DEF_ICON(BLANK162)
DEF_ICON(BLANK163)
DEF_ICON(BLANK164)
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 3fe012ea73e..06b44e36b69 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -653,6 +653,25 @@ void UI_exit(void);
#define UI_LAYOUT_OP_SHOW_TITLE 1
#define UI_LAYOUT_OP_SHOW_EMPTY 2
+/* flags to set which corners will become rounded:
+ *
+ * 1------2
+ * | |
+ * 8------4 */
+
+enum {
+ UI_CNR_TOP_LEFT= 1,
+ UI_CNR_TOP_RIGHT= 2,
+ UI_CNR_BOTTOM_RIGHT= 4,
+ UI_CNR_BOTTOM_LEFT= 8,
+ /* just for convenience */
+ UI_CNR_NONE= 0,
+ UI_CNR_ALL= (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT)
+};
+
+/* not apart of the corner flags but mixed in some functions */
+#define UI_RB_ALPHA (UI_CNR_ALL + 1)
+
uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, struct uiStyle *style);
void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout);
void uiBlockLayoutResolve(uiBlock *block, int *x, int *y);
@@ -780,9 +799,15 @@ void uiStyleFontDrawRotated(struct uiFontStyle *fs, struct rcti *rect, const cha
int UI_GetStringWidth(const char *str); // XXX temp
void UI_DrawString(float x, float y, const char *str); // XXX temp
void UI_DrawTriIcon(float x, float y, char dir);
-
+uiStyle* UI_GetStyle(void);
/* linker workaround ack! */
void UI_template_fix_linking(void);
+/* translation */
+int UI_translate_iface(void);
+int UI_translate_tooltips(void);
+const char *UI_translate_do_iface(const char *msgid);
+const char *UI_translate_do_tooltip(const char *msgid);
+
#endif /* UI_INTERFACE_H */
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h
index d383bc0ab78..ab5b8e8aff3 100644
--- a/source/blender/editors/include/UI_resources.h
+++ b/source/blender/editors/include/UI_resources.h
@@ -296,6 +296,9 @@ void UI_GetThemeColorType4ubv(int colorid, int spacetype, char col[4]);
// blends and shades between two color pointers
void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], float fac, int offset);
+// shade a 3 byte color (same as UI_GetColorPtrBlendShade3ubv with 0.0 factor)
+void UI_GetColorPtrShade3ubv(const unsigned char cp1[3], unsigned char col[3], int offset);
+
// get a 3 byte color, blended and shaded between two other char color pointers
void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset);
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 0dee7a3813a..2ff77d255c6 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -55,9 +55,11 @@
#include "BIF_gl.h"
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "UI_interface.h"
+#include "IMB_imbuf.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -92,19 +94,46 @@ static void ui_free_but(const bContext *C, uiBut *but);
/* ************* translation ************** */
-int ui_translate_buttons(void)
+int UI_translate_iface(void)
{
- return (U.transopts & USER_TR_BUTTONS);
+#ifdef INTERNATIONAL
+ return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE);
+#else
+ return 0;
+#endif
+}
+
+int UI_translate_tooltips(void)
+{
+#ifdef INTERNATIONAL
+ return (U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_TOOLTIPS);
+#else
+ return 0;
+#endif
}
-int ui_translate_menus(void)
+const char *UI_translate_do_iface(const char *msgid)
{
- return (U.transopts & USER_TR_MENUS);
+#ifdef INTERNATIONAL
+ if(UI_translate_iface())
+ return BLF_gettext(msgid);
+ else
+ return msgid;
+#else
+ return msgid;
+#endif
}
-int ui_translate_tooltips(void)
+const char *UI_translate_do_tooltip(const char *msgid)
{
- return (U.transopts & USER_TR_TOOLTIPS);
+#ifdef INTERNATIONAL
+ if(UI_translate_tooltips())
+ return BLF_gettext(msgid);
+ else
+ return msgid;
+#else
+ return msgid;
+#endif
}
/* ************* window matrix ************** */
@@ -228,7 +257,7 @@ void ui_block_translate(uiBlock *block, int x, int y)
static void ui_text_bounds_block(uiBlock *block, float offset)
{
- uiStyle *style= U.uistyles.first; // XXX pass on as arg
+ uiStyle *style=UI_GetStyle();
uiBut *bt;
int i = 0, j, x1addval= offset, nextcol;
int lastcol= 0, col= 0;
@@ -237,9 +266,6 @@ static void ui_text_bounds_block(uiBlock *block, float offset)
for(bt= block->buttons.first; bt; bt= bt->next) {
if(bt->type!=SEPR) {
- //int transopts= ui_translate_buttons();
- //if(bt->type==TEX || bt->type==IDPOIN) transopts= 0;
-
j= BLF_width(style->widget.uifont_id, bt->drawstr);
if(j > i) i = j;
@@ -929,7 +955,7 @@ static void ui_but_to_pixelrect(rcti *rect, const ARegion *ar, uiBlock *block, u
/* uses local copy of style, to scale things down, and allow widgets to change stuff */
void uiDrawBlock(const bContext *C, uiBlock *block)
{
- uiStyle style= *((uiStyle *)U.uistyles.first); // XXX pass on as arg
+ uiStyle style= *UI_GetStyle(); // XXX pass on as arg
ARegion *ar;
uiBut *but;
rcti rect;
@@ -1894,6 +1920,8 @@ static void ui_free_but(const bContext *C, uiBut *but)
if(but->str && but->str != but->strdata) MEM_freeN(but->str);
ui_free_link(but->link);
+ if((but->type == BUT_IMAGE) && but->poin) IMB_freeImBuf((struct ImBuf *)but->poin);
+
MEM_freeN(but);
}
@@ -2030,12 +2058,9 @@ void ui_check_but(uiBut *but)
/* if something changed in the button */
double value= UI_BUT_VALUE_UNSET;
// float okwidth; // UNUSED
-// int transopts= ui_translate_buttons();
ui_is_but_sel(but, &value);
-// if(but->type==TEX || but->type==IDPOIN) transopts= 0;
-
/* only update soft range while not editing */
if(but->rnaprop && !(but->editval || but->editstr || but->editvec)) {
UI_GET_BUT_VALUE_INIT(but, value)
@@ -2544,7 +2569,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
DynStr *dynstr;
int i, totitem, value, free;
- RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
+ RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free);
value= RNA_property_enum_get(ptr, prop);
dynstr= BLI_dynstr_new();
@@ -2579,7 +2604,7 @@ static uiBut *ui_def_but_rna(uiBlock *block, int type, int retval, const char *s
EnumPropertyItem *item;
int i, totitem, free;
- RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
+ RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free);
for(i=0; i<totitem; i++) {
if(item[i].identifier[0] && item[i].value == (int)max) {
str= item[i].name;
@@ -2707,6 +2732,11 @@ static uiBut *ui_def_but_operator(uiBlock *block, int type, const char *opname,
if ((!tip || tip[0]=='\0') && ot && ot->description) {
tip= ot->description;
+
+#ifdef INTERNATIONAL
+ if(UI_translate_tooltips())
+ tip= BLF_gettext(tip);
+#endif
}
but= ui_def_but(block, type, -1, str, x1, y1, x2, y2, NULL, 0, 0, 0, 0, tip);
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 2267f04aab4..a1275e237c1 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -58,10 +58,9 @@
/* own include */
#include "interface_intern.h"
-#define UI_RB_ALPHA 16
#define UI_DISABLED_ALPHA_OFFS -160
-static int roundboxtype= 15;
+static int roundboxtype= UI_CNR_ALL;
void uiSetRoundBox(int type)
{
@@ -69,13 +68,6 @@ void uiSetRoundBox(int type)
* if this is undone, its not that big a deal, only makes curves edges
* square for the */
roundboxtype= type;
-
- /* flags to set which corners will become rounded:
-
- 1------2
- | |
- 8------4
- */
}
@@ -98,7 +90,7 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r
glBegin(mode);
/* start with corner right-bottom */
- if(roundboxtype & 4) {
+ if(roundboxtype & UI_CNR_BOTTOM_RIGHT) {
glVertex2f(maxx-rad, miny);
for(a=0; a<7; a++) {
glVertex2f(maxx-rad+vec[a][0], miny+vec[a][1]);
@@ -108,7 +100,7 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r
else glVertex2f(maxx, miny);
/* corner right-top */
- if(roundboxtype & 2) {
+ if(roundboxtype & UI_CNR_TOP_RIGHT) {
glVertex2f(maxx, maxy-rad);
for(a=0; a<7; a++) {
glVertex2f(maxx-vec[a][1], maxy-rad+vec[a][0]);
@@ -118,7 +110,7 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r
else glVertex2f(maxx, maxy);
/* corner left-top */
- if(roundboxtype & 1) {
+ if(roundboxtype & UI_CNR_TOP_LEFT) {
glVertex2f(minx+rad, maxy);
for(a=0; a<7; a++) {
glVertex2f(minx+rad-vec[a][0], maxy-vec[a][1]);
@@ -128,7 +120,7 @@ void uiDrawBox(int mode, float minx, float miny, float maxx, float maxy, float r
else glVertex2f(minx, maxy);
/* corner left-bottom */
- if(roundboxtype & 8) {
+ if(roundboxtype & UI_CNR_BOTTOM_LEFT) {
glVertex2f(minx, miny+rad);
for(a=0; a<7; a++) {
glVertex2f(minx+vec[a][1], miny+rad-vec[a][0]);
@@ -180,7 +172,7 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
glBegin(mode);
/* start with corner right-bottom */
- if(roundboxtype & 4) {
+ if(roundboxtype & UI_CNR_BOTTOM_RIGHT) {
round_box_shade_col(coltop, coldown, 0.0);
glVertex2f(maxx-rad, miny);
@@ -199,7 +191,7 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
}
/* corner right-top */
- if(roundboxtype & 2) {
+ if(roundboxtype & UI_CNR_TOP_RIGHT) {
round_box_shade_col(coltop, coldown, (div-rad)*idiv);
glVertex2f(maxx, maxy-rad);
@@ -217,7 +209,7 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
}
/* corner left-top */
- if(roundboxtype & 1) {
+ if(roundboxtype & UI_CNR_TOP_LEFT) {
round_box_shade_col(coltop, coldown, 1.0);
glVertex2f(minx+rad, maxy);
@@ -236,7 +228,7 @@ void uiDrawBoxShade(int mode, float minx, float miny, float maxx, float maxy, fl
}
/* corner left-bottom */
- if(roundboxtype & 8) {
+ if(roundboxtype & UI_CNR_BOTTOM_LEFT) {
round_box_shade_col(coltop, coldown, rad*idiv);
glVertex2f(minx, miny+rad);
@@ -288,7 +280,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
glBegin(mode);
/* start with corner right-bottom */
- if(roundboxtype & 4) {
+ if(roundboxtype & UI_CNR_BOTTOM_RIGHT) {
round_box_shade_col(colLeft, colRight, 0.0);
glVertex2f(maxx-rad, miny);
@@ -306,7 +298,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
}
/* corner right-top */
- if(roundboxtype & 2) {
+ if(roundboxtype & UI_CNR_TOP_RIGHT) {
round_box_shade_col(colLeft, colRight, 0.0);
glVertex2f(maxx, maxy-rad);
@@ -324,7 +316,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
}
/* corner left-top */
- if(roundboxtype & 1) {
+ if(roundboxtype & UI_CNR_TOP_LEFT) {
round_box_shade_col(colLeft, colRight, (div-rad)*idiv);
glVertex2f(minx+rad, maxy);
@@ -342,7 +334,7 @@ void uiDrawBoxVerticalShade(int mode, float minx, float miny, float maxx, float
}
/* corner left-bottom */
- if(roundboxtype & 8) {
+ if(roundboxtype & UI_CNR_BOTTOM_LEFT) {
round_box_shade_col(colLeft, colRight, 1.0);
glVertex2f(minx, miny+rad);
@@ -469,19 +461,14 @@ void uiEmboss(float x1, float y1, float x2, float y2, int sel)
/* ************** SPECIAL BUTTON DRAWING FUNCTIONS ************* */
-void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *UNUSED(but), uiWidgetColors *UNUSED(wcol), rcti *rect)
+void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
{
#ifdef WITH_HEADLESS
(void)rect;
#else
- extern char datatoc_splash_png[];
- extern int datatoc_splash_png_size;
- ImBuf *ibuf;
+ ImBuf *ibuf= (ImBuf *)but->poin;
//GLint scissor[4];
//int w, h;
-
- /* hardcoded to splash, loading and freeing every draw, eek! */
- ibuf= IMB_ibImageFromMemory((unsigned char*)datatoc_splash_png, datatoc_splash_png_size, IB_rect);
if (!ibuf) return;
@@ -509,7 +496,6 @@ void ui_draw_but_IMAGE(ARegion *UNUSED(ar), uiBut *UNUSED(but), uiWidgetColors *
glScissor(scissor[0], scissor[1], scissor[2], scissor[3]);
*/
- IMB_freeImBuf(ibuf);
#endif
}
@@ -709,7 +695,7 @@ static void draw_scope_end(rctf *rect, GLint *scissor)
/* outline */
glColor4f(0.f, 0.f, 0.f, 0.5f);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_LINE_LOOP, rect->xmin-1, rect->ymin, rect->xmax+1, rect->ymax+1, 3.0f);
}
@@ -768,7 +754,7 @@ void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol)
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0.f, 0.f, 0.f, 0.3f);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin-1, rect.xmax+1, rect.ymax+1, 3.0f);
/* need scissor test, histogram can draw outside of boundary */
@@ -837,7 +823,7 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0.f, 0.f, 0.f, 0.3f);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin-1, rect.xmax+1, rect.ymax+1, 3.0f);
@@ -967,13 +953,13 @@ static float polar_to_y(float center, float diam, float ampli, float angle)
return center + diam * ampli * sinf(angle);
}
-static void vectorscope_draw_target(float centerx, float centery, float diam, float r, float g, float b)
+static void vectorscope_draw_target(float centerx, float centery, float diam, const float colf[3])
{
float y,u,v;
float tangle=0.f, tampli;
float dangle, dampli, dangle2, dampli2;
- rgb_to_yuv(r,g,b, &y, &u, &v);
+ rgb_to_yuv(colf[0], colf[1], colf[2], &y, &u, &v);
if (u>0 && v>=0) tangle=atanf(v/u);
else if (u>0 && v<0) tangle= atanf(v/u) + 2.0f * (float)M_PI;
else if (u<0) tangle=atanf(v/u) + (float)M_PI;
@@ -983,7 +969,7 @@ static void vectorscope_draw_target(float centerx, float centery, float diam, fl
/* small target vary by 2.5 degree and 2.5 IRE unit */
glColor4f(1.0f, 1.0f, 1.0, 0.12f);
- dangle= 2.5f*(float)M_PI/180.0f;
+ dangle= DEG2RADF(2.5f);
dampli= 2.5f/200.0f;
glBegin(GL_LINE_STRIP);
glVertex2f(polar_to_x(centerx,diam,tampli+dampli,tangle+dangle), polar_to_y(centery,diam,tampli+dampli,tangle+dangle));
@@ -994,9 +980,9 @@ static void vectorscope_draw_target(float centerx, float centery, float diam, fl
glEnd();
/* big target vary by 10 degree and 20% amplitude */
glColor4f(1.0f, 1.0f, 1.0, 0.12f);
- dangle= 10.0f*(float)M_PI/180.0f;
+ dangle= DEG2RADF(10.0f);
dampli= 0.2f*tampli;
- dangle2= 5.0f*(float)M_PI/180.0f;
+ dangle2= DEG2RADF(5.0f);
dampli2= 0.5f*dampli;
glBegin(GL_LINE_STRIP);
glVertex2f(polar_to_x(centerx,diam,tampli+dampli-dampli2,tangle+dangle), polar_to_y(centery,diam,tampli+dampli-dampli2,tangle+dangle));
@@ -1022,13 +1008,13 @@ static void vectorscope_draw_target(float centerx, float centery, float diam, fl
void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *recti)
{
+ const float skin_rad= DEG2RADF(123.0f); /* angle in radians of the skin tone line */
Scopes *scopes = (Scopes *)but->poin;
rctf rect;
int i, j;
- int skina= 123; /* angle in degree of the skin tone line */
float w, h, centerx, centery, diam;
float alpha;
- float colors[6][3]={{.75,0,0},{.75,.75,0},{0,.75,0},{0,.75,.75},{0,0,.75},{.75,0,.75}};
+ const float colors[6][3]={{.75,0,0},{.75,.75,0},{0,.75,0},{0,.75,.75},{0,0,.75},{.75,0,.75}};
GLint scissor[4];
rect.xmin = (float)recti->xmin+1;
@@ -1048,7 +1034,7 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wco
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0.f, 0.f, 0.f, 0.3f);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_POLYGON, rect.xmin-1, rect.ymin-1, rect.xmax+1, rect.ymax+1, 3.0f);
/* need scissor test, hvectorscope can draw outside of boundary */
@@ -1064,19 +1050,19 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wco
for(j=0; j<5; j++) {
glBegin(GL_LINE_STRIP);
for(i=0; i<=360; i=i+15) {
- float a= i*M_PI/180.0;
- float r= (j+1)/10.0f;
- glVertex2f( polar_to_x(centerx,diam,r,a), polar_to_y(centery,diam,r,a));
+ const float a= DEG2RADF((float)i);
+ const float r= (j+1)/10.0f;
+ glVertex2f(polar_to_x(centerx,diam,r,a), polar_to_y(centery,diam,r,a));
}
glEnd();
}
/* skin tone line */
glColor4f(1.f, 0.4f, 0.f, 0.2f);
- fdrawline( polar_to_x(centerx, diam, 0.5f, skina*M_PI/180.0), polar_to_y(centery,diam,0.5,skina*M_PI/180.0),
- polar_to_x(centerx, diam, 0.1f, skina*M_PI/180.0), polar_to_y(centery,diam,0.1,skina*M_PI/180.0));
+ fdrawline(polar_to_x(centerx, diam, 0.5f, skin_rad), polar_to_y(centery,diam,0.5,skin_rad),
+ polar_to_x(centerx, diam, 0.1f, skin_rad), polar_to_y(centery,diam,0.1,skin_rad));
/* saturation points */
for(i=0; i<6; i++)
- vectorscope_draw_target(centerx, centery, diam, colors[i][0], colors[i][1], colors[i][2]);
+ vectorscope_draw_target(centerx, centery, diam, colors[i]);
if (scopes->ok && scopes->vecscope != NULL) {
/* pixel point cloud */
@@ -1233,7 +1219,7 @@ void ui_draw_but_NORMAL(uiBut *but, uiWidgetColors *wcol, rcti *rect)
/* backdrop */
glColor3ubv((unsigned char*)wcol->inner);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_POLYGON, rect->xmin, rect->ymin, rect->xmax, rect->ymax, 5.0f);
/* sphere color */
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 7661fa5994b..125928c136b 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1269,7 +1269,7 @@ static int ui_textedit_delete_selection(uiBut *but, uiHandleButtonData *data)
/* note, but->block->aspect is used here, when drawing button style is getting scaled too */
static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, short x)
{
- uiStyle *style= U.uistyles.first; // XXX pass on as arg
+ uiStyle *style= UI_GetStyle(); // XXX pass on as arg
uiFontStyle *fstyle = &style->widget;
int startx= but->x1;
char *origstr;
@@ -4101,7 +4101,7 @@ static uiBlock *menu_change_shortcut(bContext *C, ARegion *ar, void *arg)
wmKeyMapItem *kmi;
PointerRNA ptr;
uiLayout *layout;
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
int kmi_id = WM_key_event_operator_id(C, but->optype->idname, but->opcontext, prop, 1, &km);
@@ -4133,7 +4133,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg)
wmKeyMapItem *kmi;
PointerRNA ptr;
uiLayout *layout;
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
IDProperty *prop= (but->opptr)? but->opptr->data: NULL;
int kmi_id;
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index ebc8725ad5d..72eb869dea0 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -347,10 +347,6 @@ typedef struct uiSafetyRct {
extern void ui_delete_linkline(uiLinkLine *line, uiBut *but);
-extern int ui_translate_buttons(void);
-extern int ui_translate_menus(void);
-extern int ui_translate_tooltips(void);
-
void ui_fontscale(short *points, float aspect);
extern void ui_block_to_window_fl(const struct ARegion *ar, uiBlock *block, float *x, float *y);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index a2e65f5e4ec..3c02f7d4bd2 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -43,6 +43,8 @@
#include "BLI_string.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_idprop.h"
@@ -334,7 +336,7 @@ static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
}
/* create buttons for an item with an RNA array */
-static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int h, int expand, int slider, int toggle, int icon_only)
+static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int UNUSED(h), int expand, int slider, int toggle, int icon_only)
{
uiStyle *style= layout->root->style;
uiBut *but;
@@ -407,7 +409,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
if (totdim != 2) return; /* only 2D matrices supported in UI so far */
w /= dim_size[0];
- h /= dim_size[1];
+ /* h /= dim_size[1]; */ /* UNUSED */
for(a=0; a<len; a++) {
col= a % dim_size[0];
@@ -475,7 +477,7 @@ static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *pt
const char *name;
int a, totitem, itemw, icon, value, free;
- RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
+ RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free);
uiBlockSetCurLayout(block, ui_item_local_sublayout(layout, layout, 1));
for(a=0; a<totitem; a++) {
@@ -630,12 +632,18 @@ PointerRNA uiItemFullO(uiLayout *layout, const char *opname, const char *name, i
if(!ot) {
ui_item_disabled(layout, opname);
- RNA_warning("uiItemFullO: unknown operator '%s'\n", opname);
+ RNA_warning("unknown operator '%s'", opname);
return PointerRNA_NULL;
}
- if(!name)
+ if(!name) {
name= ot->name;
+
+#ifdef INTERNATIONAL
+ name= UI_translate_do_iface(name);
+#endif
+ }
+
if(layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
@@ -701,7 +709,7 @@ static const char *ui_menu_enumpropname(uiLayout *layout, const char *opname, co
int totitem, free;
const char *name;
- RNA_property_enum_items(layout->root->block->evil_C, &ptr, prop, &item, &totitem, &free);
+ RNA_property_enum_items_gettexted(layout->root->block->evil_C, &ptr, prop, &item, &totitem, &free);
if(RNA_enum_name(item, retval, &name)) {
if(free) MEM_freeN(item);
return name;
@@ -737,7 +745,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
if(!ot || !ot->srna) {
ui_item_disabled(layout, opname);
- RNA_warning("uiItemsFullEnumO: %s '%s'\n", ot ? "unknown operator" : "operator missing srna", opname);
+ RNA_warning("%s '%s'", ot ? "unknown operator" : "operator missing srna", opname);
return;
}
@@ -753,7 +761,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
uiLayout *split= uiLayoutSplit(layout, 0, 0);
uiLayout *column= uiLayoutColumn(split, 0);
- RNA_property_enum_items(block->evil_C, &ptr, prop, &item, &totitem, &free);
+ RNA_property_enum_items_gettexted(block->evil_C, &ptr, prop, &item, &totitem, &free);
for(i=0; i<totitem; i++) {
if(item[i].identifier[0]) {
@@ -815,7 +823,7 @@ void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char
/* pass */
}
else {
- RNA_warning("uiItemEnumO_value: %s.%s not found.\n", RNA_struct_identifier(ptr.type), propname);
+ RNA_warning("%s.%s not found", RNA_struct_identifier(ptr.type), propname);
return;
}
@@ -841,10 +849,10 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
/* enum lookup */
if((prop= RNA_struct_find_property(&ptr, propname))) {
- RNA_property_enum_items(layout->root->block->evil_C, &ptr, prop, &item, NULL, &free);
+ RNA_property_enum_items_gettexted(layout->root->block->evil_C, &ptr, prop, &item, NULL, &free);
if(item==NULL || RNA_enum_value_from_id(item, value_str, &value)==0) {
if(free) MEM_freeN(item);
- RNA_warning("uiItemEnumO_string: %s.%s, enum %s not found.\n", RNA_struct_identifier(ptr.type), propname, value_str);
+ RNA_warning("%s.%s, enum %s not found", RNA_struct_identifier(ptr.type), propname, value_str);
return;
}
@@ -852,7 +860,7 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
MEM_freeN(item);
}
else {
- RNA_warning("uiItemEnumO_string: %s.%s not found.\n", RNA_struct_identifier(ptr.type), propname);
+ RNA_warning("%s.%s not found", RNA_struct_identifier(ptr.type), propname);
return;
}
@@ -1059,7 +1067,7 @@ void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, int flag,
if(!prop) {
ui_item_disabled(layout, propname);
- RNA_warning("uiItemR: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -1072,7 +1080,7 @@ void uiItemEnumR(uiLayout *layout, const char *name, int icon, struct PointerRNA
if(!prop || RNA_property_type(prop) != PROP_ENUM) {
ui_item_disabled(layout, propname);
- RNA_warning("uiItemEnumR: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -1087,16 +1095,16 @@ void uiItemEnumR_string(uiLayout *layout, struct PointerRNA *ptr, const char *pr
if(!prop || RNA_property_type(prop) != PROP_ENUM) {
ui_item_disabled(layout, propname);
- RNA_warning("uiItemEnumR_string: enum property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("enum property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
- RNA_property_enum_items(layout->root->block->evil_C, ptr, prop, &item, NULL, &free);
+ RNA_property_enum_items_gettexted(layout->root->block->evil_C, ptr, prop, &item, NULL, &free);
if(!RNA_enum_value_from_id(item, value, &ivalue)) {
if(free) MEM_freeN(item);
ui_item_disabled(layout, propname);
- RNA_warning("uiItemEnumR: enum property value not found: %s\n", value);
+ RNA_warning("enum property value not found: %s", value);
return;
}
@@ -1121,12 +1129,12 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname
if(!prop) {
ui_item_disabled(layout, propname);
- RNA_warning("uiItemsEnumR: enum property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("enum property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
if(RNA_property_type(prop) != PROP_ENUM) {
- RNA_warning("uiItemsEnumR: not an enum property: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("not an enum property: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
else {
@@ -1135,7 +1143,7 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname
uiLayout *split= uiLayoutSplit(layout, 0, 0);
uiLayout *column= uiLayoutColumn(split, 0);
- RNA_property_enum_items(block->evil_C, ptr, prop, &item, &totitem, &free);
+ RNA_property_enum_items_gettexted(block->evil_C, ptr, prop, &item, &totitem, &free);
for(i=0; i<totitem; i++) {
if(item[i].identifier[0]) {
@@ -1314,13 +1322,13 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
- RNA_warning("uiItemPointerR: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
type= RNA_property_type(prop);
if(!ELEM(type, PROP_POINTER, PROP_STRING)) {
- RNA_warning("uiItemPointerR: property %s must be a pointer or string.\n", propname);
+ RNA_warning("Property %s must be a pointer or string", propname);
return;
}
@@ -1328,11 +1336,11 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
if(!searchprop) {
- RNA_warning("uiItemPointerR: search collection property not found: %s.%s\n", RNA_struct_identifier(ptr->type), searchpropname);
+ RNA_warning("search collection property not found: %s.%s", RNA_struct_identifier(ptr->type), searchpropname);
return;
}
else if (RNA_property_type(searchprop) != PROP_COLLECTION) {
- RNA_warning("uiItemPointerR: search collection property is not a collection type: %s.%s\n", RNA_struct_identifier(ptr->type), searchpropname);
+ RNA_warning("search collection property is not a collection type: %s.%s", RNA_struct_identifier(ptr->type), searchpropname);
return;
}
@@ -1417,12 +1425,18 @@ void uiItemM(uiLayout *layout, bContext *UNUSED(C), const char *menuname, const
mt= WM_menutype_find(menuname, FALSE);
if(mt==NULL) {
- RNA_warning("uiItemM: not found %s\n", menuname);
+ RNA_warning("not found %s", menuname);
return;
}
- if(!name)
+ if(!name) {
name= mt->label;
+
+#ifdef INTERNATIONAL
+ name= UI_translate_do_iface(name);
+#endif
+ }
+
if(layout->root->type == UI_LAYOUT_MENU && !icon)
icon= ICON_BLANK1;
@@ -1526,7 +1540,7 @@ static void menu_item_enum_opname_menu(bContext *UNUSED(C), uiLayout *layout, vo
{
MenuItemLevel *lvl= (MenuItemLevel*)(((uiBut*)arg)->func_argN);
- uiLayoutSetOperatorContext(layout, WM_OP_EXEC_REGION_WIN);
+ uiLayoutSetOperatorContext(layout, lvl->opcontext);
uiItemsEnumO(layout, lvl->opname, lvl->propname);
}
@@ -1537,12 +1551,12 @@ void uiItemMenuEnumO(uiLayout *layout, const char *opname, const char *propname,
if(!ot) {
ui_item_disabled(layout, opname);
- RNA_warning("uiItemMenuEnumO: unknown operator '%s'\n", opname);
+ RNA_warning("unknown operator '%s'", opname);
return;
}
if(!ot->srna) {
ui_item_disabled(layout, opname);
- RNA_warning("uiItemMenuEnumO: operator missing srna '%s'\n", opname);
+ RNA_warning("operator missing srna '%s'", opname);
return;
}
@@ -1575,7 +1589,7 @@ void uiItemMenuEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propn
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
ui_item_disabled(layout, propname);
- RNA_warning("uiItemMenuEnumR: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -2794,7 +2808,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
empty= uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0;
if(empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) {
- uiItemL(layout, "No Properties.", ICON_NONE);
+ uiItemL(layout, UI_translate_do_iface(N_("No Properties")), ICON_NONE);
}
}
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index e9fad382beb..fd9386dc5ab 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -317,7 +317,7 @@ static void UI_OT_reset_default_button(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array.");
+ RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array");
}
/* Copy To Selected Operator ------------------------ */
@@ -409,7 +409,7 @@ static void UI_OT_copy_to_selected_button(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array.");
+ RNA_def_boolean(ot->srna, "all", 1, "All", "Reset to default values all elements of the array");
}
/* Reports to Textblock Operator ------------------------ */
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 3b20533dcd4..ec7456eebdc 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -173,7 +173,7 @@ static void ui_panel_copy_offset(Panel *pa, Panel *papar)
Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int *open)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
Panel *pa, *patab, *palast, *panext;
char *drawname= pt->label;
char *idname= pt->idname;
@@ -292,7 +292,7 @@ void uiEndPanel(uiBlock *block, int width, int height)
static void ui_offset_panel_block(uiBlock *block)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiBut *but;
int ofsy;
@@ -442,8 +442,12 @@ static void ui_draw_aligned_panel_header(uiStyle *style, uiBlock *block, rcti *r
Panel *panel= block->panel;
rcti hrect;
int pnl_icons;
- char *activename= panel->drawname[0]?panel->drawname:panel->panelname;
-
+ const char *activename= panel->drawname[0]?panel->drawname:panel->panelname;
+
+#ifdef INTERNATIONAL
+ activename= UI_translate_do_iface(activename);
+#endif
+
/* + 0.001f to avoid flirting with float inaccuracy */
if(panel->control & UI_PNL_CLOSE) pnl_icons=(panel->labelofs+2*PNL_ICON+5)/block->aspect + 0.001f;
else pnl_icons= (panel->labelofs+PNL_ICON+5)/block->aspect + 0.001f;
@@ -537,8 +541,8 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
/* in some occasions, draw a border */
if(panel->flag & PNL_SELECT) {
- if(panel->control & UI_PNL_SOLID) uiSetRoundBox(15);
- else uiSetRoundBox(3);
+ if(panel->control & UI_PNL_SOLID) uiSetRoundBox(UI_CNR_ALL);
+ else uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
UI_ThemeColorShade(TH_BACK, -120);
uiRoundRect(0.5f + rect->xmin, 0.5f + rect->ymin, 0.5f + rect->xmax, 0.5f + headrect.ymax+1, 8);
@@ -667,7 +671,7 @@ static int compare_panel(const void *a1, const void *a2)
/* returns 1 when it did something */
static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
Panel *pa;
PanelSort *ps, *panelsort, *psnext;
int a, tot=0, done;
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index a55ee01202c..4221f7c30ff 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -62,6 +62,7 @@
#include "UI_view2d.h"
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "ED_screen.h"
@@ -318,7 +319,7 @@ static void ui_tooltip_region_draw_cb(const bContext *UNUSED(C), ARegion *ar)
rcti bbox= data->bbox;
int a;
- ui_draw_menu_back(U.uistyles.first, NULL, &data->bbox);
+ ui_draw_menu_back(UI_GetStyle(), NULL, &data->bbox);
/* draw text */
uiStyleFontSet(&data->fstyle);
@@ -343,9 +344,10 @@ static void ui_tooltip_region_free_cb(ARegion *ar)
ar->regiondata= NULL;
}
+#define TIP_(msgid) UI_translate_do_tooltip(msgid)
ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
{
- uiStyle *style= U.uistyles.first; // XXX pass on as arg
+ uiStyle *style= UI_GetStyle();
static ARegionType type;
ARegion *ar;
uiTooltipData *data;
@@ -374,7 +376,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
EnumPropertyItem *item;
int i, totitem, free;
- RNA_property_enum_items(C, &but->rnapoin, but->rnaprop, &item, &totitem, &free);
+ RNA_property_enum_items_gettexted(C, &but->rnapoin, but->rnaprop, &item, &totitem, &free);
for(i=0; i<totitem; i++) {
if(item[i].identifier[0] && item[i].value == (int)but->hardmax) {
@@ -403,7 +405,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
prop= (but->opptr)? but->opptr->data: NULL;
if(WM_key_event_operator_string(C, but->optype->idname, but->opcontext, prop, buf, sizeof(buf))) {
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Shortcut: %s", buf);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Shortcut: %s")), buf);
data->color[data->totline]= 0x888888;
data->totline++;
}
@@ -413,7 +415,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* full string */
ui_get_but_string(but, buf, sizeof(buf));
if(buf[0]) {
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Value: %s", buf);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Value: %s")), buf);
data->color[data->totline]= 0x888888;
data->totline++;
}
@@ -425,7 +427,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
if (unit_type == PROP_UNIT_ROTATION) {
if (RNA_property_type(but->rnaprop) == PROP_FLOAT) {
float value= RNA_property_array_check(but->rnaprop) ? RNA_property_float_get_index(&but->rnapoin, but->rnaprop, but->rnaindex) : RNA_property_float_get(&but->rnapoin, but->rnaprop);
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Radians: %f", value);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Radians: %f")), value);
data->color[data->totline]= 0x888888;
data->totline++;
}
@@ -434,7 +436,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
if(but->flag & UI_BUT_DRIVEN) {
if(ui_but_anim_expression_get(but, buf, sizeof(buf))) {
/* expression */
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Expression: %s", buf);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Expression: %s")), buf);
data->color[data->totline]= 0x888888;
data->totline++;
}
@@ -442,7 +444,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* rna info */
if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s.%s", RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Python: %s.%s")), RNA_struct_identifier(but->rnapoin.type), RNA_property_identifier(but->rnaprop));
data->color[data->totline]= 0x888888;
data->totline++;
}
@@ -450,7 +452,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
if(but->rnapoin.id.data) {
ID *id= but->rnapoin.id.data;
if(id->lib && id->lib->name) {
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Library: %s", id->lib->name);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Library: %s")), id->lib->name);
data->color[data->totline]= 0x888888;
data->totline++;
}
@@ -465,7 +467,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
/* operator info */
if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s", str);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Python: %s")), str);
data->color[data->totline]= 0x888888;
data->totline++;
}
@@ -479,7 +481,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
WM_operator_poll_context(C, but->optype, but->opcontext);
poll_msg= CTX_wm_operator_poll_msg_get(C);
if(poll_msg) {
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Disabled: %s", poll_msg);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Disabled: %s")), poll_msg);
data->color[data->totline]= 0x6666ff; /* alert */
data->totline++;
}
@@ -489,7 +491,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
if ((U.flag & USER_TOOLTIPS_PYTHON) == 0) {
if(but->menu_create_func && WM_menutype_contains((MenuType *)but->poin)) {
MenuType *mt= (MenuType *)but->poin;
- BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "Python: %s", mt->idname);
+ BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), TIP_(N_("Python: %s")), mt->idname);
data->color[data->totline]= 0x888888;
data->totline++;
}
@@ -608,6 +610,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
return ar;
}
+#undef TIP_
void ui_tooltip_free(bContext *C, ARegion *ar)
{
@@ -985,7 +988,7 @@ static void ui_searchbox_region_free_cb(ARegion *ar)
ARegion *ui_searchbox_create(bContext *C, ARegion *butregion, uiBut *but)
{
- uiStyle *style= U.uistyles.first; // XXX pass on as arg
+ uiStyle *style= UI_GetStyle();
static ARegionType type;
ARegion *ar;
uiSearchboxData *data;
@@ -1235,7 +1238,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
ysize= block->maxy - block->miny+4;
/*aspect/= (float)xsize;*/ /*UNUSED*/
- if(but) {
+ {
int left=0, right=0, top=0, down=0;
int winx, winy;
// int offscreen;
@@ -2299,7 +2302,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut *but, uiMenuCreateFunc menu_func, void *arg, char *str)
{
wmWindow *window= CTX_wm_window(C);
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiPopupBlockHandle *handle;
uiPopupMenu *pup;
@@ -2348,7 +2351,7 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
/* only return handler, and set optional title */
uiPopupMenu *uiPupMenuBegin(bContext *C, const char *title, int icon)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiPopupMenu *pup= MEM_callocN(sizeof(uiPopupMenu), "popup menu");
uiBut *but;
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 8d4b4209120..5ea20b33b3a 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -47,6 +47,7 @@
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "UI_interface.h"
@@ -76,7 +77,7 @@
/* ********************************************** */
-static uiStyle *ui_style_new(ListBase *styles, const char *name)
+static uiStyle *ui_style_new(ListBase *styles, const char *name, short uifont_id)
{
uiStyle *style= MEM_callocN(sizeof(uiStyle), "new style");
@@ -85,7 +86,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->panelzoom= 1.0; /* unused */
- style->paneltitle.uifont_id= UIFONT_DEFAULT;
+ style->paneltitle.uifont_id= uifont_id;
style->paneltitle.points= 12;
style->paneltitle.kerning= 1;
style->paneltitle.shadow= 1;
@@ -94,7 +95,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->paneltitle.shadowalpha= 0.15f;
style->paneltitle.shadowcolor= 1.0f;
- style->grouplabel.uifont_id= UIFONT_DEFAULT;
+ style->grouplabel.uifont_id= uifont_id;
style->grouplabel.points= 12;
style->grouplabel.kerning= 1;
style->grouplabel.shadow= 3;
@@ -102,7 +103,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->grouplabel.shady= -1;
style->grouplabel.shadowalpha= 0.25f;
- style->widgetlabel.uifont_id= UIFONT_DEFAULT;
+ style->widgetlabel.uifont_id= uifont_id;
style->widgetlabel.points= 11;
style->widgetlabel.kerning= 1;
style->widgetlabel.shadow= 3;
@@ -111,7 +112,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widgetlabel.shadowalpha= 0.15f;
style->widgetlabel.shadowcolor= 1.0f;
- style->widget.uifont_id= UIFONT_DEFAULT;
+ style->widget.uifont_id= uifont_id;
style->widget.points= 11;
style->widget.kerning= 1;
style->widget.shadowalpha= 0.25f;
@@ -251,11 +252,19 @@ void uiStyleFontDrawRotated(uiFontStyle *fs, rcti *rect, const char *str)
}
/* ************** helpers ************************ */
+/* XXX: read a style configure */
+uiStyle* UI_GetStyle(void)
+{
+ uiStyle *style = NULL;
+ /* offset is two struct uiStyle pointers */
+ /* style = BLI_findstring( &U.uistyles, "Unifont Style", sizeof(style)*2 ) */;
+ return (style != NULL) ? style : U.uistyles.first;
+}
/* temporarily, does widget font */
int UI_GetStringWidth(const char *str)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiFontStyle *fstyle= &style->widget;
int width;
@@ -274,7 +283,7 @@ int UI_GetStringWidth(const char *str)
/* temporarily, does widget font */
void UI_DrawString(float x, float y, const char *str)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
if (style->widget.kerning == 1)
BLF_enable(style->widget.uifont_id, BLF_KERNING_DEFAULT);
@@ -313,7 +322,17 @@ void uiStyleInit(void)
for(font= U.uifonts.first; font; font= font->next) {
if(font->uifont_id==UIFONT_DEFAULT) {
+#ifdef INTERNATIONAL
+ int unifont_size;
+ unsigned char *unifont_ttf= BLF_get_unifont(&unifont_size);
+
+ if(unifont_ttf)
+ font->blf_id= BLF_load_mem_unique("default", unifont_ttf, unifont_size);
+ else
+ font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
+#else
font->blf_id= BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
+#endif
}
else {
font->blf_id= BLF_load(font->filename);
@@ -337,7 +356,7 @@ void uiStyleInit(void)
}
if(style==NULL) {
- ui_style_new(&U.uistyles, "Default Style");
+ ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT );
}
// XXX, this should be moved into a style, but for now best only load the monospaced font once.
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 04ddb130736..7795ab60099 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -70,6 +70,7 @@
#include "interface_intern.h"
#include "BLF_api.h"
+#include "BLF_translation.h"
void UI_template_fix_linking(void)
{
@@ -247,7 +248,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
switch(event) {
case UI_ID_BROWSE:
case UI_ID_PIN:
- RNA_warning("warning, id event %d shouldnt come here\n", event);
+ RNA_warning("warning, id event %d shouldnt come here", event);
break;
case UI_ID_OPEN:
case UI_ID_ADD_NEW:
@@ -308,31 +309,31 @@ static const char *template_id_browse_tip(StructRNA *type)
{
if(type) {
switch(RNA_type_to_ID_code(type)) {
- case ID_SCE: return "Browse Scene to be linked";
- case ID_OB: return "Browse Object to be linked";
- case ID_ME: return "Browse Mesh Data to be linked";
- case ID_CU: return "Browse Curve Data to be linked";
- case ID_MB: return "Browse MetaBall Data to be linked";
- case ID_MA: return "Browse Material to be linked";
- case ID_TE: return "Browse Texture to be linked";
- case ID_IM: return "Browse Image to be linked";
- case ID_LT: return "Browse Lattice Data to be linked";
- case ID_LA: return "Browse Lamp Data to be linked";
- case ID_CA: return "Browse Camera Data to be linked";
- case ID_WO: return "Browse World Settings to be linked";
- case ID_SCR: return "Choose Screen lay-out";
- case ID_TXT: return "Browse Text to be linked";
- case ID_SPK: return "Browse Speaker Data to be linked";
- case ID_SO: return "Browse Sound to be linked";
- case ID_AR: return "Browse Armature data to be linked";
- case ID_AC: return "Browse Action to be linked";
- case ID_NT: return "Browse Node Tree to be linked";
- case ID_BR: return "Browse Brush to be linked";
- case ID_PA: return "Browse Particle System to be linked";
- case ID_GD: return "Browse Grease Pencil Data to be linked";
+ case ID_SCE: return N_("Browse Scene to be linked");
+ case ID_OB: return N_("Browse Object to be linked");
+ case ID_ME: return N_("Browse Mesh Data to be linked");
+ case ID_CU: return N_("Browse Curve Data to be linked");
+ case ID_MB: return N_("Browse MetaBall Data to be linked");
+ case ID_MA: return N_("Browse Material to be linked");
+ case ID_TE: return N_("Browse Texture to be linked");
+ case ID_IM: return N_("Browse Image to be linked");
+ case ID_LT: return N_("Browse Lattice Data to be linked");
+ case ID_LA: return N_("Browse Lamp Data to be linked");
+ case ID_CA: return N_("Browse Camera Data to be linked");
+ case ID_WO: return N_("Browse World Settings to be linked");
+ case ID_SCR: return N_("Choose Screen lay-out");
+ case ID_TXT: return N_("Browse Text to be linked");
+ case ID_SPK: return N_("Browse Speaker Data to be linked");
+ case ID_SO: return N_("Browse Sound to be linked");
+ case ID_AR: return N_("Browse Armature data to be linked");
+ case ID_AC: return N_("Browse Action to be linked");
+ case ID_NT: return N_("Browse Node Tree to be linked");
+ case ID_BR: return N_("Browse Brush to be linked");
+ case ID_PA: return N_("Browse Particle System to be linked");
+ case ID_GD: return N_("Browse Grease Pencil Data to be linked");
}
}
- return "Browse ID data to be linked";
+ return N_("Browse ID data to be linked");
}
static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, StructRNA *type, int flag, const char *newop, const char *openop, const char *unlinkop)
@@ -357,7 +358,8 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
if(flag & UI_ID_PREVIEWS) {
- but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6, template_id_browse_tip(type));
+ but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*6, UI_UNIT_Y*6,
+ UI_translate_do_tooltip(template_id_browse_tip(type)));
if(type) {
but->icon= RNA_struct_ui_icon(type);
if (id) but->icon = ui_id_icon_get(C, id, 1);
@@ -369,7 +371,8 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
uiLayoutRow(layout, 1);
}
else if(flag & UI_ID_BROWSE) {
- but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y, template_id_browse_tip(type));
+ but= uiDefBlockButN(block, id_search_menu, MEM_dupallocN(template), "", 0, 0, UI_UNIT_X*1.6, UI_UNIT_Y,
+ UI_translate_do_tooltip(template_id_browse_tip(type)));
if(type) {
but->icon= RNA_struct_ui_icon(type);
/* default dragging of icon for id browse buttons */
@@ -395,12 +398,12 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
if(id->lib) {
if(id->flag & LIB_INDIRECT) {
but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_INDIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
- "Indirect library datablock, cannot change.");
+ UI_translate_do_tooltip(N_("Indirect library datablock, cannot change")));
uiButSetFlag(but, UI_BUT_DISABLED);
}
else {
but= uiDefIconBut(block, BUT, 0, ICON_LIBRARY_DATA_DIRECT, 0,0,UI_UNIT_X,UI_UNIT_Y, NULL, 0, 0, 0, 0,
- "Direct linked library datablock, click to make local.");
+ UI_translate_do_tooltip(N_("Direct linked library datablock, click to make local")));
if(!id_make_local(id, 1 /* test */) || (idfrom && idfrom->lib))
uiButSetFlag(but, UI_BUT_DISABLED);
}
@@ -413,7 +416,8 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
sprintf(str, "%d", id->us);
- but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0, "Displays number of users of this data. Click to make a single-user copy.");
+ but= uiDefBut(block, BUT, 0, str, 0,0,UI_UNIT_X + ((id->us < 10) ? 0:10), UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ UI_translate_do_tooltip(_("Displays number of users of this data. Click to make a single-user copy")));
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ALONE));
if(!id_copy(id, NULL, 1 /* test only */) || (idfrom && idfrom->lib) || !editable)
@@ -431,11 +435,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6;
if(newop) {
- but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL);
+ but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": UI_translate_do_iface(N_("New")), 0, 0, w, UI_UNIT_Y, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
}
else {
- but= uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+ but= uiDefIconTextBut(block, BUT, 0, ICON_ZOOMIN, (id)? "": _("New"), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
}
@@ -447,11 +451,11 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
int w= id?UI_UNIT_X: (flag & UI_ID_ADD_NEW)? UI_UNIT_X*3: UI_UNIT_X*6;
if(openop) {
- but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": "Open", 0, 0, w, UI_UNIT_Y, NULL);
+ but= uiDefIconTextButO(block, BUT, openop, WM_OP_INVOKE_DEFAULT, ICON_FILESEL, (id)? "": UI_translate_do_iface(N_("Open")), 0, 0, w, UI_UNIT_Y, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
}
else {
- but= uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": "Open", 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+ but= uiDefIconTextBut(block, BUT, 0, ICON_FILESEL, (id)? "": UI_translate_do_iface(N_("Open")), 0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_OPEN));
}
@@ -467,7 +471,8 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
uiButSetNFunc(but, NULL, MEM_dupallocN(template), NULL);
}
else {
- but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Unlink datablock. Shift + Click to set users to zero, data will then not be saved");
+ but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ UI_translate_do_tooltip(N_("Unlink datablock. Shift + Click to set users to zero, data will then not be saved")));
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE));
if(RNA_property_flag(template->prop) & PROP_NEVER_NULL)
@@ -490,7 +495,7 @@ static void ui_template_id(uiLayout *layout, bContext *C, PointerRNA *ptr, const
prop= RNA_struct_find_property(ptr, propname);
if(!prop || RNA_property_type(prop) != PROP_POINTER) {
- RNA_warning("uiTemplateID: pointer property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("pointer property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -551,11 +556,11 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co
propType= RNA_struct_find_property(ptr, proptypename);
if (!propID || RNA_property_type(propID) != PROP_POINTER) {
- RNA_warning("uiTemplateAnyID: pointer property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("pointer property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
if (!propType || RNA_property_type(propType) != PROP_ENUM) {
- RNA_warning("uiTemplateAnyID: pointer-type property not found: %s.%s\n", RNA_struct_identifier(ptr->type), proptypename);
+ RNA_warning("pointer-type property not found: %s.%s", RNA_struct_identifier(ptr->type), proptypename);
return;
}
@@ -594,7 +599,7 @@ void uiTemplatePathBuilder(uiLayout *layout, PointerRNA *ptr, const char *propna
/* check that properties are valid */
propPath= RNA_struct_find_property(ptr, propname);
if (!propPath || RNA_property_type(propPath) != PROP_STRING) {
- RNA_warning("uiTemplatePathBuilder: path property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("path property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -724,7 +729,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
sprintf(str, "%s parent deform", md->name);
uiDefBut(block, LABEL, 0, str, 0, 0, 185, UI_UNIT_Y, NULL, 0.0, 0.0, 0.0, 0.0, "Modifier name");
- but = uiDefBut(block, BUT, 0, "Make Real", 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0, "Convert virtual modifier to a real modifier");
+ but = uiDefBut(block, BUT, 0, UI_translate_do_iface(N_("Make Real")), 0, 0, 80, 16, NULL, 0.0, 0.0, 0.0, 0.0,
+ UI_translate_do_tooltip(N_("Convert virtual modifier to a real modifier")));
uiButSetFunc(but, modifiers_convertToReal, ob, md);
}
else {
@@ -758,7 +764,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
if ((ob->type==OB_MESH) && modifier_couldBeCage(scene, md) && (index <= lastCageIndex))
{
/* -- convert to rna ? */
- but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, "Apply modifier to editing cage during Editmode");
+ but = uiDefIconButBitI(block, TOG, eModifierMode_OnCage, 0, ICON_MESH_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
+ UI_translate_do_tooltip(N_("Apply modifier to editing cage during Editmode")));
if (index < cageIndex)
uiButSetFlag(but, UI_BUT_DISABLED);
uiButSetFunc(but, modifiers_setOnCage, ob, md);
@@ -770,7 +777,8 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
/* add disabled pre-tesselated button, so users could have
message for this modifiers */
- but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0, "This modifier could be applied on splines' points only");
+ but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
+ UI_translate_do_tooltip(N_("This modifier could be applied on splines' points only")));
uiButSetFlag(but, UI_BUT_DISABLED);
} else if (mti->type != eModifierTypeType_Constructive) {
/* constructive modifiers tesselates curve before applying */
@@ -820,17 +828,17 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
}
else {
uiLayoutSetOperatorContext(row, WM_OP_INVOKE_DEFAULT);
- uiItemEnumO(row, "OBJECT_OT_modifier_apply", "Apply", 0, "apply_as", MODIFIER_APPLY_DATA);
+ uiItemEnumO(row, "OBJECT_OT_modifier_apply", UI_translate_do_iface(N_("Apply")), 0, "apply_as", MODIFIER_APPLY_DATA);
if (modifier_sameTopology(md))
- uiItemEnumO(row, "OBJECT_OT_modifier_apply", "Apply as Shape", 0, "apply_as", MODIFIER_APPLY_SHAPE);
+ uiItemEnumO(row, "OBJECT_OT_modifier_apply", UI_translate_do_iface(N_("Apply as Shape")), 0, "apply_as", MODIFIER_APPLY_SHAPE);
}
uiBlockClearButLock(block);
uiBlockSetButLock(block, ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);
if (!ELEM5(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem, eModifierType_Cloth, eModifierType_Smoke))
- uiItemO(row, "Copy", ICON_NONE, "OBJECT_OT_modifier_copy");
+ uiItemO(row, UI_translate_do_tooltip(N_("Copy")), ICON_NONE, "OBJECT_OT_modifier_copy");
}
/* result is the layout block inside the box, that we return so that modifier settings can be drawn */
@@ -857,7 +865,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
/* verify we have valid data */
if(!RNA_struct_is_a(ptr->type, &RNA_Modifier)) {
- RNA_warning("uiTemplateModifier: Expected modifier on object.\n");
+ RNA_warning("Expected modifier on object");
return NULL;
}
@@ -865,7 +873,7 @@ uiLayout *uiTemplateModifier(uiLayout *layout, bContext *C, PointerRNA *ptr)
md= ptr->data;
if(!ob || !(GS(ob->id.name) == ID_OB)) {
- RNA_warning("uiTemplateModifier: Expected modifier on object.\n");
+ RNA_warning("Expected modifier on object");
return NULL;
}
@@ -1007,8 +1015,8 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
uiBlockSetEmboss(block, UI_EMBOSSN);
/* draw a ghost icon (for proxy) and also a lock beside it, to show that constraint is "proxy locked" */
- uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_GHOST, xco+244, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Proxy Protected");
- uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco+262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, "Proxy Protected");
+ uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_GHOST, xco+244, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Proxy Protected")));
+ uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, ICON_LOCKED, xco+262, yco, 19, 19, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Proxy Protected")));
uiBlockSetEmboss(block, UI_EMBOSS);
}
@@ -1086,7 +1094,7 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr)
/* verify we have valid data */
if(!RNA_struct_is_a(ptr->type, &RNA_Constraint)) {
- RNA_warning("uiTemplateConstraint: Expected constraint on object.\n");
+ RNA_warning("Expected constraint on object");
return NULL;
}
@@ -1094,7 +1102,7 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr)
con= ptr->data;
if(!ob || !(GS(ob->id.name) == ID_OB)) {
- RNA_warning("uiTemplateConstraint: Expected constraint on object.\n");
+ RNA_warning("Expected constraint on object");
return NULL;
}
@@ -1140,7 +1148,7 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
PointerRNA texture_ptr;
if(id && !ELEM4(GS(id->name), ID_MA, ID_TE, ID_WO, ID_LA)) {
- RNA_warning("uiTemplatePreview: Expected ID of type material, texture, lamp or world.\n");
+ RNA_warning("Expected ID of type material, texture, lamp or world");
return;
}
@@ -1194,14 +1202,14 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
RNA_pointer_create(id, &RNA_Texture, tex, &texture_ptr);
uiLayoutRow(layout, 1);
- uiDefButS(block, ROW, B_MATPRV, "Texture", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, "");
+ uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("Texture")), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_TEXTURE, 0, 0, "");
if(GS(parent->name) == ID_MA)
- uiDefButS(block, ROW, B_MATPRV, "Material", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
+ uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("Material")), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
else if(GS(parent->name) == ID_LA)
- uiDefButS(block, ROW, B_MATPRV, "Lamp", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
+ uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("Lamp")), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
else if(GS(parent->name) == ID_WO)
- uiDefButS(block, ROW, B_MATPRV, "World", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
- uiDefButS(block, ROW, B_MATPRV, "Both", 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, "");
+ uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("World")), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_OTHER, 0, 0, "");
+ uiDefButS(block, ROW, B_MATPRV, UI_translate_do_iface(N_("Both")), 0, 0,UI_UNIT_X*10,UI_UNIT_Y, pr_texture, 10, TEX_PR_BOTH, 0, 0, "");
/* Alpha buton for texture preview */
if(*pr_texture!=TEX_PR_OTHER) {
@@ -1292,21 +1300,23 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
if(coba==NULL) return;
- bt= uiDefBut(block, BUT, 0, "Add", 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband");
+ bt= uiDefBut(block, BUT, 0, UI_translate_do_iface(N_("Add")), 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ UI_translate_do_tooltip(N_("Add a new color stop to the colorband")));
uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba);
- bt= uiDefBut(block, BUT, 0, "Delete", 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Delete the active position");
+ bt= uiDefBut(block, BUT, 0, UI_translate_do_iface(N_("Delete")), 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ UI_translate_do_tooltip(N_("Delete the active position")));
uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba);
/* XXX, todo for later - convert to operator - campbell */
- bt= uiDefBut(block, BUT, 0, "F", 95+xoffs,line1_y,20,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Flip colorband");
+ bt= uiDefBut(block, BUT, 0, "F", 95+xoffs,line1_y,20,UI_UNIT_Y, NULL, 0, 0, 0, 0, UI_translate_do_tooltip(N_("Flip colorband")));
uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba);
- uiDefButS(block, NUM, 0, "", 120+xoffs,line1_y,80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, "Choose active color stop");
+ uiDefButS(block, NUM, 0, "", 120+xoffs,line1_y,80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, UI_translate_do_tooltip(N_("Choose active color stop")));
- bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4",
- 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops");
+ bt= uiDefButS(block, MENU, 0, UI_translate_do_iface(N_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4")),
+ 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, UI_translate_do_tooltip(N_("Set interpolation between color stops")));
uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
uiBlockEndAlign(block);
@@ -1335,11 +1345,13 @@ static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand
float xs= butr->xmin;
uiBlockBeginAlign(block);
- bt= uiDefBut(block, BUT, 0, "Add", xs,butr->ymin+UI_UNIT_Y,2.0f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband");
+ bt= uiDefBut(block, BUT, 0, UI_translate_do_iface(N_("Add")), xs,butr->ymin+UI_UNIT_Y,2.0f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ UI_translate_do_tooltip(N_("Add a new color stop to the colorband")));
uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba);
- bt= uiDefBut(block, BUT, 0, "Delete", xs+2.0f*unit,butr->ymin+UI_UNIT_Y,1.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Delete the active position");
+ bt= uiDefBut(block, BUT, 0, UI_translate_do_iface(N_("Delete")), xs+2.0f*unit,butr->ymin+UI_UNIT_Y,1.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0,
+ UI_translate_do_tooltip(N_("Delete the active position")));
uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba);
- bt= uiDefBut(block, BUT, 0, "F", xs+3.5f*unit,butr->ymin+UI_UNIT_Y,0.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Flip the color ramp");
+ bt= uiDefBut(block, BUT, 0, "F", xs+3.5f*unit,butr->ymin+UI_UNIT_Y,0.5f*unit,UI_UNIT_Y, NULL, 0, 0, 0, 0, UI_translate_do_tooltip(N_("Flip the color ramp")));
uiButSetNFunc(bt, colorband_flip_cb, MEM_dupallocN(cb), coba);
uiBlockEndAlign(block);
@@ -1350,8 +1362,9 @@ static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand
uiItemR(layout, &ptr, "color", 0, "", ICON_NONE);
}
- bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4",
- xs+10.0f*unit, butr->ymin+UI_UNIT_Y, unit*4, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops");
+ bt= uiDefButS(block, MENU, 0, UI_translate_do_tooltip(N_("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4")),
+ xs+10.0f*unit, butr->ymin+UI_UNIT_Y, unit*4, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0,
+ UI_translate_do_tooltip(N_("Set interpolation between color stops")));
uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
bt= uiDefBut(block, BUT_COLORBAND, 0, "", xs,butr->ymin,butr->xmax-butr->xmin,UI_UNIT_Y, coba, 0, 0, 0, 0, "");
@@ -1602,10 +1615,10 @@ static uiBlock *curvemap_clipping_func(bContext *C, struct ARegion *ar, void *cu
uiButSetFunc(bt, curvemap_buttons_setclip, cumap, NULL);
uiBlockBeginAlign(block);
- uiDefButF(block, NUM, 0, "Min X ", 0,4*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, "");
- uiDefButF(block, NUM, 0, "Min Y ", 0,3*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, "");
- uiDefButF(block, NUM, 0, "Max X ", 0,2*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, "");
- uiDefButF(block, NUM, 0, "Max Y ", 0,UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, UI_translate_do_iface(N_("Min X ")), 0,4*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmin, -100.0, cumap->clipr.xmax, 10, 0, "");
+ uiDefButF(block, NUM, 0, UI_translate_do_iface(N_("Min Y ")), 0,3*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymin, -100.0, cumap->clipr.ymax, 10, 0, "");
+ uiDefButF(block, NUM, 0, UI_translate_do_iface(N_("Max X ")), 0,2*UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.xmax, cumap->clipr.xmin, 100.0, 10, 0, "");
+ uiDefButF(block, NUM, 0, UI_translate_do_iface(N_("Max Y ")), 0,UI_UNIT_Y,width,UI_UNIT_Y, &cumap->clipr.ymax, cumap->clipr.ymin, 100.0, 10, 0, "");
uiBlockSetDirection(block, UI_RIGHT);
@@ -1654,12 +1667,12 @@ static uiBlock *curvemap_tools_func(bContext *C, struct ARegion *ar, void *cumap
block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset View", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vector Handle", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Auto Handle", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Horizontal", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 4, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Extend Extrapolated", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 5, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Curve", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Reset View")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Vector Handle")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Auto Handle")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Extend Horizontal")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 4, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Extend Extrapolated")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 5, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Reset Curve")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 50);
@@ -1676,10 +1689,10 @@ static uiBlock *curvemap_brush_tools_func(bContext *C, struct ARegion *ar, void
block= uiBeginBlock(C, ar, "curvemap_tools_func", UI_EMBOSS);
uiBlockSetButmFunc(block, curvemap_tools_dofunc, cumap_v);
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset View", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Vector Handle", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Auto Handle", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, "");
- uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Curve", 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Reset View")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Vector Handle")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Auto Handle")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 3, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, UI_translate_do_iface(N_("Reset Curve")), 0, yco-=UI_UNIT_Y, menuwidth, UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 50);
@@ -1796,24 +1809,24 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
uiBlockSetEmboss(block, UI_EMBOSSN);
- bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom in");
+ bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Zoom in")));
uiButSetFunc(bt, curvemap_buttons_zoom_in, cumap, NULL);
- bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, "Zoom out");
+ bt= uiDefIconBut(block, BUT, 0, ICON_ZOOMOUT, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Zoom out")));
uiButSetFunc(bt, curvemap_buttons_zoom_out, cumap, NULL);
if(brush)
- bt= uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, "Tools");
+ bt= uiDefIconBlockBut(block, curvemap_brush_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, UI_translate_do_tooltip(N_("Tools")));
else
- bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, "Tools");
+ bt= uiDefIconBlockBut(block, curvemap_tools_func, cumap, 0, ICON_MODIFIER, 0, 0, dx, dx, UI_translate_do_tooltip(N_("Tools")));
uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
if(cumap->flag & CUMA_DO_CLIP) icon= ICON_CLIPUV_HLT; else icon= ICON_CLIPUV_DEHLT;
- bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, "Clipping Options");
+ bt= uiDefIconBlockBut(block, curvemap_clipping_func, cumap, 0, icon, 0, 0, dx, dx, UI_translate_do_tooltip(N_("Clipping Options")));
uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
- bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, "Delete points");
+ bt= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, dx, dx, NULL, 0.0, 0.0, 0.0, 0.0, UI_translate_do_tooltip(N_("Delete points")));
uiButSetNFunc(bt, curvemap_buttons_delete, MEM_dupallocN(cb), cumap);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -1832,7 +1845,8 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
uiItemR(uiLayoutColumn(split, 0), ptr, "white_level", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
uiLayoutRow(layout, 0);
- bt=uiDefBut(block, BUT, 0, "Reset", 0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves");
+ bt=uiDefBut(block, BUT, 0, UI_translate_do_iface(N_("Reset")), 0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
+ UI_translate_do_tooltip(N_("Reset Black/White point and curves")));
uiButSetNFunc(bt, curvemap_buttons_reset, MEM_dupallocN(cb), cumap);
}
@@ -1846,12 +1860,14 @@ void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propn
PointerRNA cptr;
if(!prop) {
- RNA_warning("uiTemplateCurveMapping: curve property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("curve property not found: %s.%s",
+ RNA_struct_identifier(ptr->type), propname);
return;
}
if(RNA_property_type(prop) != PROP_POINTER) {
- RNA_warning("uiTemplateCurveMapping: curve is not a pointer: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("curve is not a pointer: %s.%s",
+ RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -1881,7 +1897,7 @@ void uiTemplateColorWheel(uiLayout *layout, PointerRNA *ptr, const char *propnam
float softmin, softmax, step, precision;
if (!prop) {
- RNA_warning("uiTemplateColorWheel: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -1951,7 +1967,7 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname,
prop= RNA_struct_find_property(ptr, propname);
if (!prop) {
- RNA_warning("uiTemplateLayer: layers property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("layers property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -1968,7 +1984,7 @@ void uiTemplateLayers(uiLayout *layout, PointerRNA *ptr, const char *propname,
if(used_ptr && used_propname) {
used_prop= RNA_struct_find_property(used_ptr, used_propname);
if (!used_prop) {
- RNA_warning("uiTemplateLayer: used layers property not found: %s.%s\n", RNA_struct_identifier(ptr->type), used_propname);
+ RNA_warning("used layers property not found: %s.%s", RNA_struct_identifier(ptr->type), used_propname);
return;
}
@@ -2131,6 +2147,18 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
//uiItemR(row, itemptr, "mute", 0, "", ICON_MUTE_IPO_OFF);
uiBlockSetEmboss(block, UI_EMBOSS);
}
+ else if(itemptr->type == &RNA_VertexGroup) {
+ bDeformGroup *dg= (bDeformGroup *)itemptr->data;
+ uiItemL(sub, name, icon);
+ /* RNA does not allow nice lock icons, use lower level buttons */
+#if 0
+ uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "lock_weight", 0, 0, 0, 0, 0, NULL);
+#else
+ uiBlockSetEmboss(block, UI_EMBOSSN);
+ uiDefIconButBitC(block, TOG, DG_LOCK_WEIGHT, 0, (dg->flag & DG_LOCK_WEIGHT) ? ICON_LOCKED : ICON_UNLOCKED, 0, 0, UI_UNIT_X, UI_UNIT_Y, &dg->flag, 0, 0, 0, 0, "Maintain relative weights while painting");
+ uiBlockSetEmboss(block, UI_EMBOSS);
+#endif
+ }
else if(itemptr->type == &RNA_KeyingSetPath) {
KS_Path *ksp = (KS_Path*)itemptr->data;
@@ -2184,7 +2212,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
pa= block->panel;
if(!pa) {
- RNA_warning("uiTemplateList: only works inside a panel.\n");
+ RNA_warning("Only works inside a panel");
return;
}
@@ -2194,28 +2222,28 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
if(ptr->data) {
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
- RNA_warning("uiTemplateList: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("Property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
}
activeprop= RNA_struct_find_property(activeptr, activepropname);
if(!activeprop) {
- RNA_warning("uiTemplateList: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), activepropname);
+ RNA_warning("Property not found: %s.%s", RNA_struct_identifier(ptr->type), activepropname);
return;
}
if(prop) {
type= RNA_property_type(prop);
if(type != PROP_COLLECTION) {
- RNA_warning("uiTemplateList: Expected collection property.\n");
+ RNA_warning("uiExpected collection property");
return;
}
}
activetype= RNA_property_type(activeprop);
if(activetype != PROP_INT) {
- RNA_warning("uiTemplateList: Expected integer property.\n");
+ RNA_warning("Expected integer property");
return;
}
@@ -2462,16 +2490,18 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
(void)ui_abs; // UNUSED
uiDefIconBut(block, BUT, handle_event, ICON_PANEL_CLOSE,
- 0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, "Stop this job");
+ 0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, UI_translate_do_tooltip(N_("Stop this job")));
uiDefBut(block, PROGRESSBAR, 0, WM_jobs_name(wm, owner),
- UI_UNIT_X, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, WM_jobs_progress(wm, owner), 0, "Progress");
+ UI_UNIT_X, 0, 100, UI_UNIT_Y, NULL, 0.0f, 0.0f, WM_jobs_progress(wm, owner), 0, UI_translate_do_tooltip(N_("Progress")));
uiLayoutRow(layout, 0);
}
if(WM_jobs_test(wm, screen))
- uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, "Capture", 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop screencast");
+ uiDefIconTextBut(block, BUT, B_STOPCAST, ICON_CANCEL, UI_translate_do_iface(N_("Capture")), 0,0,85,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
+ UI_translate_do_tooltip(N_("Stop screencast")));
if(screen->animtimer)
- uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, "Anim Player", 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Stop animation playback");
+ uiDefIconTextBut(block, BUT, B_STOPANIM, ICON_CANCEL, UI_translate_do_tooltip(N_("Anim Player")), 0,0,100,UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0,
+ UI_translate_do_tooltip(N_("Stop animation playback")));
}
/************************* Reports for Last Operator Template **************************/
@@ -2533,7 +2563,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
uiBlockSetEmboss(block, UI_EMBOSSN);
if (reports->list.first != reports->list.last)
- uiDefIconButO(block, BUT, "UI_OT_reports_to_textblock", WM_OP_INVOKE_REGION_WIN, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, "Click to see rest of reports in textblock: 'Recent Reports'");
+ uiDefIconButO(block, BUT, "UI_OT_reports_to_textblock", WM_OP_INVOKE_REGION_WIN, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, UI_translate_do_tooltip(N_("Click to see rest of reports in textblock: 'Recent Reports'")));
else
uiDefIconBut(block, LABEL, 0, icon, 2, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index a3f56192cb5..a49060eaca2 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -37,6 +37,8 @@
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
@@ -114,7 +116,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
}
case PROP_COLLECTION: {
char text[256];
- sprintf(text, "%d items", RNA_property_collection_length(ptr, prop));
+ sprintf(text, UI_translate_do_iface(N_("%d items")), RNA_property_collection_length(ptr, prop));
but= uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
uiButSetFlag(but, UI_BUT_DISABLED);
break;
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 5da875356ea..45829646145 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -79,19 +79,23 @@
/* it has outline, back, and two optional tria meshes */
typedef struct uiWidgetTrias {
- int tot;
+ unsigned int tot;
float vec[32][2];
- int (*index)[3];
+ unsigned int (*index)[3];
} uiWidgetTrias;
+/* max as used by round_box__edges */
+#define WIDGET_CURVE_RESOLU 9
+#define WIDGET_SIZE_MAX (WIDGET_CURVE_RESOLU*4)
+
typedef struct uiWidgetBase {
int totvert, halfwayvert;
- float outer_v[64][2];
- float inner_v[64][2];
- float inner_uv[64][2];
+ float outer_v[WIDGET_SIZE_MAX][2];
+ float inner_v[WIDGET_SIZE_MAX][2];
+ float inner_uv[WIDGET_SIZE_MAX][2];
short inner, outline, emboss; /* set on/off */
short shadedir;
@@ -123,7 +127,7 @@ typedef struct uiWidgetType {
/* *********************** draw data ************************** */
-static float cornervec[9][2]= {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169},
+static float cornervec[WIDGET_CURVE_RESOLU][2]= {{0.0, 0.0}, {0.195, 0.02}, {0.383, 0.067}, {0.55, 0.169},
{0.707, 0.293}, {0.831, 0.45}, {0.924, 0.617}, {0.98, 0.805}, {1.0, 1.0}};
static float jit[8][2]= {{0.468813 , -0.481430}, {-0.155755 , -0.352820},
@@ -133,7 +137,7 @@ static float jit[8][2]= {{0.468813 , -0.481430}, {-0.155755 , -0.352820},
static float num_tria_vert[3][2]= {
{-0.352077, 0.532607}, {-0.352077, -0.549313}, {0.330000, -0.008353}};
-static int num_tria_face[1][3]= {
+static unsigned int num_tria_face[1][3]= {
{0, 1, 2}};
static float scroll_circle_vert[16][2]= {
@@ -142,7 +146,7 @@ static float scroll_circle_vert[16][2]= {
{-0.382683, -0.923880}, {0.000000, -1.000000}, {0.382684, -0.923880}, {0.707107, -0.707107},
{0.923880, -0.382684}, {1.000000, -0.000000}, {0.923880, 0.382683}, {0.707107, 0.707107}};
-static int scroll_circle_face[14][3]= {
+static unsigned int scroll_circle_face[14][3]= {
{0, 1, 2}, {2, 0, 3}, {3, 0, 15}, {3, 15, 4}, {4, 15, 14}, {4, 14, 5}, {5, 14, 13}, {5, 13, 6},
{6, 13, 12}, {6, 12, 7}, {7, 12, 11}, {7, 11, 8}, {8, 11, 10}, {8, 10, 9}};
@@ -150,13 +154,13 @@ static float menu_tria_vert[6][2]= {
{-0.41, 0.16}, {0.41, 0.16}, {0, 0.82},
{0, -0.82}, {-0.41, -0.16}, {0.41, -0.16}};
-static int menu_tria_face[2][3]= {{2, 0, 1}, {3, 5, 4}};
+static unsigned int menu_tria_face[2][3]= {{2, 0, 1}, {3, 5, 4}};
static float check_tria_vert[6][2]= {
{-0.578579, 0.253369}, {-0.392773, 0.412794}, {-0.004241, -0.328551},
{-0.003001, 0.034320}, {1.055313, 0.864744}, {0.866408, 1.026895}};
-static int check_tria_face[4][3]= {
+static unsigned int check_tria_face[4][3]= {
{3, 2, 4}, {3, 4, 5}, {1, 0, 3}, {0, 2, 3}};
GLubyte checker_stipple_sml[32*32/8] =
@@ -175,6 +179,7 @@ GLubyte checker_stipple_sml[32*32/8] =
void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y3)
{
+ float tri_arr[3][2]= {{x1, y1}, {x2, y2}, {x3, y3}};
float color[4];
int j;
@@ -182,20 +187,18 @@ void ui_draw_anti_tria(float x1, float y1, float x2, float y2, float x3, float y
glGetFloatv(GL_CURRENT_COLOR, color);
color[3] *= 0.125f;
glColor4fv(color);
-
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, tri_arr);
+
/* for each AA step */
for(j=0; j<8; j++) {
glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f);
-
- glBegin(GL_POLYGON);
- glVertex2f(x1, y1);
- glVertex2f(x2, y2);
- glVertex2f(x3, y3);
- glEnd();
-
+ glDrawArrays(GL_TRIANGLES, 0, 3);
glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f);
}
+ glDisableClientState(GL_VERTEX_ARRAY);
glDisable(GL_BLEND);
}
@@ -216,7 +219,7 @@ static void widget_init(uiWidgetBase *wtb)
/* return tot */
static int round_box_shadow_edges(float (*vert)[2], rcti *rect, float rad, int roundboxalign, float step)
{
- float vec[9][2];
+ float vec[WIDGET_CURVE_RESOLU][2];
float minx, miny, maxx, maxy;
int a, tot= 0;
@@ -231,59 +234,59 @@ static int round_box_shadow_edges(float (*vert)[2], rcti *rect, float rad, int r
maxy= rect->ymax+step;
/* mult */
- for(a=0; a<9; a++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++) {
vec[a][0]= rad*cornervec[a][0];
vec[a][1]= rad*cornervec[a][1];
}
/* start with left-top, anti clockwise */
- if(roundboxalign & 1) {
- for(a=0; a<9; a++, tot++) {
+ if(roundboxalign & UI_CNR_TOP_LEFT) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= minx+rad-vec[a][0];
vert[tot][1]= maxy-vec[a][1];
}
}
else {
- for(a=0; a<9; a++, tot++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= minx;
vert[tot][1]= maxy;
}
}
- if(roundboxalign & 8) {
- for(a=0; a<9; a++, tot++) {
+ if(roundboxalign & UI_CNR_BOTTOM_LEFT) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= minx+vec[a][1];
vert[tot][1]= miny+rad-vec[a][0];
}
}
else {
- for(a=0; a<9; a++, tot++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= minx;
vert[tot][1]= miny;
}
}
- if(roundboxalign & 4) {
- for(a=0; a<9; a++, tot++) {
+ if(roundboxalign & UI_CNR_BOTTOM_RIGHT) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= maxx-rad+vec[a][0];
vert[tot][1]= miny+vec[a][1];
}
}
else {
- for(a=0; a<9; a++, tot++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= maxx;
vert[tot][1]= miny;
}
}
- if(roundboxalign & 2) {
- for(a=0; a<9; a++, tot++) {
+ if(roundboxalign & UI_CNR_TOP_RIGHT) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= maxx-vec[a][1];
vert[tot][1]= maxy-rad+vec[a][0];
}
}
else {
- for(a=0; a<9; a++, tot++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
vert[tot][0]= maxx;
vert[tot][1]= maxy;
}
@@ -294,7 +297,7 @@ static int round_box_shadow_edges(float (*vert)[2], rcti *rect, float rad, int r
/* this call has 1 extra arg to allow mask outline */
static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, float rad, float radi)
{
- float vec[9][2], veci[9][2];
+ float vec[WIDGET_CURVE_RESOLU][2], veci[WIDGET_CURVE_RESOLU][2];
float minx= rect->xmin, miny= rect->ymin, maxx= rect->xmax, maxy= rect->ymax;
float minxi= minx + 1.0f; /* boundbox inner */
float maxxi= maxx - 1.0f;
@@ -303,8 +306,10 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
float facxi= (maxxi!=minxi) ? 1.0f/(maxxi-minxi) : 0.0f; /* for uv, can divide by zero */
float facyi= (maxyi!=minyi) ? 1.0f/(maxyi-minyi) : 0.0f;
int a, tot= 0, minsize;
- const int hnum= ((roundboxalign & (1|2))==(1|2) || (roundboxalign & (4|8))==(4|8)) ? 1 : 2;
- const int vnum= ((roundboxalign & (1|8))==(1|8) || (roundboxalign & (2|4))==(2|4)) ? 1 : 2;
+ const int hnum= ((roundboxalign & (UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT))==(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT) ||
+ (roundboxalign & (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT))==(UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT)) ? 1 : 2;
+ const int vnum= ((roundboxalign & (UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT))==(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT) ||
+ (roundboxalign & (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT))==(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) ? 1 : 2;
minsize= MIN2((rect->xmax-rect->xmin)*hnum, (rect->ymax-rect->ymin)*vnum);
@@ -315,7 +320,7 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
radi= 0.5f*minsize - 1.0f;
/* mult */
- for(a=0; a<9; a++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++) {
veci[a][0]= radi*cornervec[a][0];
veci[a][1]= radi*cornervec[a][1];
vec[a][0]= rad*cornervec[a][0];
@@ -323,9 +328,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
}
/* corner left-bottom */
- if(roundboxalign & 8) {
+ if(roundboxalign & UI_CNR_BOTTOM_LEFT) {
- for(a=0; a<9; a++, tot++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
wt->inner_v[tot][0]= minxi+veci[a][1];
wt->inner_v[tot][1]= minyi+radi-veci[a][0];
@@ -350,9 +355,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
}
/* corner right-bottom */
- if(roundboxalign & 4) {
+ if(roundboxalign & UI_CNR_BOTTOM_RIGHT) {
- for(a=0; a<9; a++, tot++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
wt->inner_v[tot][0]= maxxi-radi+veci[a][0];
wt->inner_v[tot][1]= minyi+veci[a][1];
@@ -379,9 +384,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
wt->halfwayvert= tot;
/* corner right-top */
- if(roundboxalign & 2) {
+ if(roundboxalign & UI_CNR_TOP_RIGHT) {
- for(a=0; a<9; a++, tot++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
wt->inner_v[tot][0]= maxxi-veci[a][1];
wt->inner_v[tot][1]= maxyi-radi+veci[a][0];
@@ -406,9 +411,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
}
/* corner left-top */
- if(roundboxalign & 1) {
+ if(roundboxalign & UI_CNR_TOP_LEFT) {
- for(a=0; a<9; a++, tot++) {
+ for(a=0; a < WIDGET_CURVE_RESOLU; a++, tot++) {
wt->inner_v[tot][0]= minxi+radi-veci[a][0];
wt->inner_v[tot][1]= maxyi-veci[a][1];
@@ -433,7 +438,9 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl
tot++;
}
-
+
+ BLI_assert(tot <= WIDGET_SIZE_MAX);
+
wt->totvert= tot;
}
@@ -516,16 +523,10 @@ static void widget_scroll_circle(uiWidgetTrias *tria, rcti *rect, float triasize
static void widget_trias_draw(uiWidgetTrias *tria)
{
- int a;
-
- glBegin(GL_TRIANGLES);
- for(a=0; a<tria->tot; a++) {
- glVertex2fv(tria->vec[ tria->index[a][0] ]);
- glVertex2fv(tria->vec[ tria->index[a][1] ]);
- glVertex2fv(tria->vec[ tria->index[a][2] ]);
- }
- glEnd();
-
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, tria->vec);
+ glDrawElements(GL_TRIANGLES, tria->tot*3, GL_UNSIGNED_INT, tria->index);
+ glDisableClientState(GL_VERTEX_ARRAY);
}
static void widget_menu_trias(uiWidgetTrias *tria, rcti *rect)
@@ -587,33 +588,48 @@ static void shadecolors4(char *coltop, char *coldown, const char *color, short s
coldown[3]= color[3];
}
-static void round_box_shade_col4(const char col1[4], const char col2[4], const float fac)
+static void round_box_shade_col4_r(unsigned char col_r[4], const char col1[4], const char col2[4], const float fac)
{
- unsigned char col[4];
const int faci= FTOCHAR(fac);
const int facm= 255-faci;
- col[0]= (faci*col1[0] + facm*col2[0])>>8;
- col[1]= (faci*col1[1] + facm*col2[1])>>8;
- col[2]= (faci*col1[2] + facm*col2[2])>>8;
- col[3]= (faci*col1[3] + facm*col2[3])>>8;
+ col_r[0]= (faci*col1[0] + facm*col2[0])>>8;
+ col_r[1]= (faci*col1[1] + facm*col2[1])>>8;
+ col_r[2]= (faci*col1[2] + facm*col2[2])>>8;
+ col_r[3]= (faci*col1[3] + facm*col2[3])>>8;
+}
- glColor4ubv(col);
+static void widget_verts_to_quad_strip(uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX*2+2][2])
+{
+ int a;
+ for(a=0; a<totvert; a++) {
+ copy_v2_v2(quad_strip[a*2], wtb->outer_v[a]);
+ copy_v2_v2(quad_strip[a*2+1], wtb->inner_v[a]);
+ }
+ copy_v2_v2(quad_strip[a*2], wtb->outer_v[0]);
+ copy_v2_v2(quad_strip[a*2+1], wtb->inner_v[0]);
}
-static void widgetbase_outline(uiWidgetBase *wtb)
+static void widget_verts_to_quad_strip_open(uiWidgetBase *wtb, const int totvert, float quad_strip[WIDGET_SIZE_MAX*2][2])
{
int a;
-
- /* outline */
- glBegin(GL_QUAD_STRIP);
- for(a=0; a<wtb->totvert; a++) {
- glVertex2fv(wtb->outer_v[a]);
- glVertex2fv(wtb->inner_v[a]);
+ for(a=0; a<totvert; a++) {
+ quad_strip[a*2][0]= wtb->outer_v[a][0];
+ quad_strip[a*2][1]= wtb->outer_v[a][1];
+ quad_strip[a*2+1][0]= wtb->outer_v[a][0];
+ quad_strip[a*2+1][1]= wtb->outer_v[a][1] - 1.0f;
}
- glVertex2fv(wtb->outer_v[0]);
- glVertex2fv(wtb->inner_v[0]);
- glEnd();
+}
+
+static void widgetbase_outline(uiWidgetBase *wtb)
+{
+ float quad_strip[WIDGET_SIZE_MAX*2+2][2]; /* + 2 because the last pair is wrapped */
+ widget_verts_to_quad_strip(wtb, wtb->totvert, quad_strip);
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, quad_strip);
+ glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert*2 + 2);
+ glDisableClientState(GL_VERTEX_ARRAY);
}
static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
@@ -626,100 +642,124 @@ static void widgetbase_draw(uiWidgetBase *wtb, uiWidgetColors *wcol)
if(wtb->inner) {
if(wcol->shaded==0) {
if (wcol->alpha_check) {
+ float inner_v_half[WIDGET_SIZE_MAX][2];
float x_mid= 0.0f; /* used for dumb clamping of values */
/* dark checkers */
glColor4ub(UI_TRANSP_DARK, UI_TRANSP_DARK, UI_TRANSP_DARK, 255);
- glBegin(GL_POLYGON);
- for(a=0; a<wtb->totvert; a++) {
- glVertex2fv(wtb->inner_v[a]);
- }
- glEnd();
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, wtb->inner_v);
+ glDrawArrays(GL_POLYGON, 0, wtb->totvert);
+ glDisableClientState(GL_VERTEX_ARRAY);
/* light checkers */
glEnable(GL_POLYGON_STIPPLE);
glColor4ub(UI_TRANSP_LIGHT, UI_TRANSP_LIGHT, UI_TRANSP_LIGHT, 255);
glPolygonStipple(checker_stipple_sml);
- glBegin(GL_POLYGON);
- for(a=0; a<wtb->totvert; a++) {
- glVertex2fv(wtb->inner_v[a]);
- }
- glEnd();
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, wtb->inner_v);
+ glDrawArrays(GL_POLYGON, 0, wtb->totvert);
+ glDisableClientState(GL_VERTEX_ARRAY);
+
glDisable(GL_POLYGON_STIPPLE);
/* alpha fill */
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4ubv((unsigned char*)wcol->inner);
- glBegin(GL_POLYGON);
+ glEnableClientState(GL_VERTEX_ARRAY);
+
for(a=0; a<wtb->totvert; a++) {
- glVertex2fv(wtb->inner_v[a]);
x_mid += wtb->inner_v[a][0];
}
x_mid /= wtb->totvert;
- glEnd();
+
+ glVertexPointer(2, GL_FLOAT, 0, wtb->inner_v);
+ glDrawArrays(GL_POLYGON, 0, wtb->totvert);
+ glDisableClientState(GL_VERTEX_ARRAY);
/* 1/2 solid color */
glColor4ub(wcol->inner[0], wcol->inner[1], wcol->inner[2], 255);
- glBegin(GL_POLYGON);
- for(a=0; a<wtb->totvert; a++)
- glVertex2f(MIN2(wtb->inner_v[a][0], x_mid), wtb->inner_v[a][1]);
- glEnd();
+
+ for(a=0; a<wtb->totvert; a++) {
+ inner_v_half[a][0]= MIN2(wtb->inner_v[a][0], x_mid);
+ inner_v_half[a][1]= wtb->inner_v[a][1];
+ }
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, inner_v_half);
+ glDrawArrays(GL_POLYGON, 0, wtb->totvert);
+ glDisableClientState(GL_VERTEX_ARRAY);
}
else {
/* simple fill */
glColor4ubv((unsigned char*)wcol->inner);
- glBegin(GL_POLYGON);
- for(a=0; a<wtb->totvert; a++)
- glVertex2fv(wtb->inner_v[a]);
- glEnd();
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, wtb->inner_v);
+ glDrawArrays(GL_POLYGON, 0, wtb->totvert);
+ glDisableClientState(GL_VERTEX_ARRAY);
}
}
else {
char col1[4], col2[4];
+ unsigned char col_array[WIDGET_SIZE_MAX * 4];
+ unsigned char *col_pt= col_array;
shadecolors4(col1, col2, wcol->inner, wcol->shadetop, wcol->shadedown);
glShadeModel(GL_SMOOTH);
- glBegin(GL_POLYGON);
- for(a=0; a<wtb->totvert; a++) {
- round_box_shade_col4(col1, col2, wtb->inner_uv[a][wtb->shadedir]);
- glVertex2fv(wtb->inner_v[a]);
+ for(a=0; a<wtb->totvert; a++, col_pt += 4) {
+ round_box_shade_col4_r(col_pt, col1, col2, wtb->inner_uv[a][wtb->shadedir]);
}
- glEnd();
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, wtb->inner_v);
+ glColorPointer(4, GL_UNSIGNED_BYTE, 0, col_array);
+ glDrawArrays(GL_POLYGON, 0, wtb->totvert);
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glDisableClientState(GL_COLOR_ARRAY);
+
glShadeModel(GL_FLAT);
}
}
/* for each AA step */
if(wtb->outline) {
+ float quad_strip[WIDGET_SIZE_MAX*2+2][2]; /* + 2 because the last pair is wrapped */
+ float quad_strip_emboss[WIDGET_SIZE_MAX*2][2]; /* only for emboss */
+
+ widget_verts_to_quad_strip(wtb, wtb->totvert, quad_strip);
+
+ if(wtb->emboss) {
+ widget_verts_to_quad_strip_open(wtb, wtb->halfwayvert, quad_strip_emboss);
+ }
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+
for(j=0; j<8; j++) {
glTranslatef(1.0f * jit[j][0], 1.0f * jit[j][1], 0.0f);
/* outline */
glColor4ub(wcol->outline[0], wcol->outline[1], wcol->outline[2], 32);
- glBegin(GL_QUAD_STRIP);
- for(a=0; a<wtb->totvert; a++) {
- glVertex2fv(wtb->outer_v[a]);
- glVertex2fv(wtb->inner_v[a]);
- }
- glVertex2fv(wtb->outer_v[0]);
- glVertex2fv(wtb->inner_v[0]);
- glEnd();
+
+ glVertexPointer(2, GL_FLOAT, 0, quad_strip);
+ glDrawArrays(GL_QUAD_STRIP, 0, wtb->totvert*2 + 2);
/* emboss bottom shadow */
if(wtb->emboss) {
glColor4f(1.0f, 1.0f, 1.0f, 0.02f);
- glBegin(GL_QUAD_STRIP);
- for(a=0; a<wtb->halfwayvert; a++) {
- glVertex2fv(wtb->outer_v[a]);
- glVertex2f(wtb->outer_v[a][0], wtb->outer_v[a][1]-1.0f);
- }
- glEnd();
+
+ glVertexPointer(2, GL_FLOAT, 0, quad_strip_emboss);
+ glDrawArrays(GL_QUAD_STRIP, 0, wtb->halfwayvert*2);
}
glTranslatef(-1.0f * jit[j][0], -1.0f * jit[j][1], 0.0f);
}
+
+ glDisableClientState(GL_VERTEX_ARRAY);
}
/* decoration */
@@ -1611,7 +1651,8 @@ static void widget_softshadow(rcti *rect, int roundboxalign, float radin, float
uiWidgetBase wtb;
rcti rect1= *rect;
float alpha, alphastep;
- int step, tot, a;
+ int step, totvert;
+ float quad_strip[WIDGET_SIZE_MAX*2][2];
/* prevent tooltips to not show round shadow */
if( 2.0f*radout > 0.2f*(rect1.ymax-rect1.ymin) )
@@ -1620,31 +1661,32 @@ static void widget_softshadow(rcti *rect, int roundboxalign, float radin, float
rect1.ymax -= 2.0f*radout;
/* inner part */
- tot= round_box_shadow_edges(wtb.inner_v, &rect1, radin, roundboxalign & 12, 0.0f);
-
+ totvert= round_box_shadow_edges(wtb.inner_v, &rect1, radin, roundboxalign & (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT), 0.0f);
+
/* inverse linear shadow alpha */
alpha= 0.15;
alphastep= 0.67;
+ glEnableClientState(GL_VERTEX_ARRAY);
+
for(step= 1; step<=radout; step++, alpha*=alphastep) {
- round_box_shadow_edges(wtb.outer_v, &rect1, radin, 15, (float)step);
+ round_box_shadow_edges(wtb.outer_v, &rect1, radin, UI_CNR_ALL, (float)step);
glColor4f(0.0f, 0.0f, 0.0f, alpha);
-
- glBegin(GL_QUAD_STRIP);
- for(a=0; a<tot; a++) {
- glVertex2fv(wtb.outer_v[a]);
- glVertex2fv(wtb.inner_v[a]);
- }
- glEnd();
+
+ widget_verts_to_quad_strip_open(&wtb, totvert, quad_strip);
+
+ glVertexPointer(2, GL_FLOAT, 0, quad_strip);
+ glDrawArrays(GL_QUAD_STRIP, 0, totvert*2);
}
-
+
+ glDisableClientState(GL_VERTEX_ARRAY);
}
static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int direction)
{
uiWidgetBase wtb;
- int roundboxalign= 15;
+ int roundboxalign= UI_CNR_ALL;
widget_init(&wtb);
@@ -1654,11 +1696,11 @@ static void widget_menu_back(uiWidgetColors *wcol, rcti *rect, int flag, int dir
//rect->ymax += 4.0;
}
else if (direction == UI_DOWN) {
- roundboxalign= 12;
+ roundboxalign= (UI_CNR_BOTTOM_RIGHT | UI_CNR_BOTTOM_LEFT);
rect->ymin -= 4.0;
}
else if (direction == UI_TOP) {
- roundboxalign= 3;
+ roundboxalign= UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT;
rect->ymax += 4.0;
}
@@ -2008,7 +2050,7 @@ static void ui_draw_but_HSV_v(uiBut *but, rcti *rect)
widget_init(&wtb);
/* fully rounded */
- round_box_edges(&wtb, 15, rect, rad);
+ round_box_edges(&wtb, UI_CNR_ALL, rect, rad);
/* setup temp colors */
wcol_tmp.outline[0]= wcol_tmp.outline[1]= wcol_tmp.outline[2]= 0;
@@ -2107,17 +2149,15 @@ void ui_draw_link_bezier(rcti *rect)
if(ui_link_bezier_points(rect, coord_array, LINK_RESOL)) {
/* we can reuse the dist variable here to increment the GL curve eval amount*/
// const float dist= 1.0f/(float)LINK_RESOL; // UNUSED
- int i;
glEnable(GL_BLEND);
glEnable(GL_LINE_SMOOTH);
-
- glBegin(GL_LINE_STRIP);
- for(i=0; i<=LINK_RESOL; i++) {
- glVertex2fv(coord_array[i]);
- }
- glEnd();
-
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, coord_array);
+ glDrawArrays(GL_LINE_STRIP, 0, LINK_RESOL);
+ glDisableClientState(GL_VERTEX_ARRAY);
+
glDisable(GL_BLEND);
glDisable(GL_LINE_SMOOTH);
@@ -2148,7 +2188,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat
if(horizontal)
SWAP(short, wcol->shadetop, wcol->shadedown);
- round_box_edges(&wtb, 15, rect, rad);
+ round_box_edges(&wtb, UI_CNR_ALL, rect, rad);
widgetbase_draw(&wtb, wcol);
/* slider */
@@ -2176,7 +2216,7 @@ void uiWidgetScrollDraw(uiWidgetColors *wcol, rcti *rect, rcti *slider, int stat
if (state & UI_SCROLL_NO_OUTLINE)
SWAP(short, outline, wtb.outline);
- round_box_edges(&wtb, 15, slider, rad);
+ round_box_edges(&wtb, UI_CNR_ALL, slider, rad);
if(state & UI_SCROLL_ARROWS) {
if(wcol->item[0] > 48) wcol->item[0]-= 48;
@@ -2343,7 +2383,7 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
/* left part of slider, always rounded */
rect1.xmax= rect1.xmin + ceil(offs+1.0f);
- round_box_edges(&wtb1, roundboxalign & ~6, &rect1, offs);
+ round_box_edges(&wtb1, roundboxalign & ~(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT), &rect1, offs);
wtb1.outline= 0;
widgetbase_draw(&wtb1, wcol);
@@ -2354,7 +2394,7 @@ static void widget_numslider(uiBut *but, uiWidgetColors *wcol, rcti *rect, int s
offs*= (rect1.xmax + offs - rect->xmax)/offs;
else
offs= 0.0f;
- round_box_edges(&wtb1, roundboxalign & ~9, &rect1, offs);
+ round_box_edges(&wtb1, roundboxalign & ~(UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT), &rect1, offs);
widgetbase_draw(&wtb1, wcol);
VECCOPY(wcol->outline, outline);
@@ -2436,7 +2476,7 @@ static void widget_icon_has_anim(uiBut *UNUSED(but), uiWidgetColors *wcol, rcti
wtb.outline= 0;
/* rounded */
- round_box_edges(&wtb, 15, rect, 10.0f);
+ round_box_edges(&wtb, UI_CNR_ALL, rect, 10.0f);
widgetbase_draw(&wtb, wcol);
}
}
@@ -2499,7 +2539,7 @@ static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int
widget_init(&wtb);
/* half rounded */
- round_box_edges(&wtb, 15, rect, rad);
+ round_box_edges(&wtb, UI_CNR_ALL, rect, rad);
widgetbase_draw(&wtb, wcol);
}
@@ -2526,7 +2566,7 @@ static void widget_list_itembut(uiWidgetColors *wcol, rcti *rect, int UNUSED(sta
/* rounded, but no outline */
wtb.outline= 0;
- round_box_edges(&wtb, 15, rect, 4.0f);
+ round_box_edges(&wtb, UI_CNR_ALL, rect, 4.0f);
widgetbase_draw(&wtb, wcol);
}
@@ -2550,7 +2590,7 @@ static void widget_optionbut(uiWidgetColors *wcol, rcti *rect, int state, int UN
recttemp.ymax-= delta;
/* half rounded */
- round_box_edges(&wtb, 15, &recttemp, 4.0f);
+ round_box_edges(&wtb, UI_CNR_ALL, &recttemp, 4.0f);
/* decoration */
if(state & UI_SELECT) {
@@ -2650,12 +2690,12 @@ static void widget_draw_extra_mask(const bContext *C, uiBut *but, uiWidgetType *
UI_GetThemeColor3ubv(TH_BACK, col);
glColor3ubv(col);
- round_box__edges(&wtb, 15, rect, 0.0f, 4.0);
+ round_box__edges(&wtb, UI_CNR_ALL, rect, 0.0f, 4.0);
widgetbase_outline(&wtb);
}
/* outline */
- round_box_edges(&wtb, 15, rect, 5.0f);
+ round_box_edges(&wtb, UI_CNR_ALL, rect, 5.0f);
wtb.outline= 1;
wtb.inner= 0;
widgetbase_draw(&wtb, &wt->wcol);
@@ -2836,37 +2876,27 @@ static int widget_roundbox_set(uiBut *but, rcti *rect)
switch(but->flag & UI_BUT_ALIGN) {
case UI_BUT_ALIGN_TOP:
- return (12);
- break;
+ return UI_CNR_BOTTOM_LEFT | UI_CNR_BOTTOM_RIGHT;
case UI_BUT_ALIGN_DOWN:
- return (3);
- break;
+ return UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT;
case UI_BUT_ALIGN_LEFT:
- return (6);
- break;
+ return UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT;
case UI_BUT_ALIGN_RIGHT:
- return (9);
- break;
-
- case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_RIGHT:
- return (1);
- break;
- case UI_BUT_ALIGN_DOWN|UI_BUT_ALIGN_LEFT:
- return (2);
- break;
- case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_RIGHT:
- return (8);
- break;
- case UI_BUT_ALIGN_TOP|UI_BUT_ALIGN_LEFT:
- return (4);
- break;
-
+ return UI_CNR_TOP_LEFT | UI_CNR_BOTTOM_LEFT;
+ case UI_BUT_ALIGN_DOWN | UI_BUT_ALIGN_RIGHT:
+ return UI_CNR_TOP_LEFT;
+ case UI_BUT_ALIGN_DOWN | UI_BUT_ALIGN_LEFT:
+ return UI_CNR_TOP_RIGHT;
+ case UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_RIGHT:
+ return UI_CNR_BOTTOM_LEFT;
+ case UI_BUT_ALIGN_TOP | UI_BUT_ALIGN_LEFT:
+ return UI_CNR_BOTTOM_RIGHT;
default:
- return (0);
- break;
+ return 0;
}
- }
- return 15;
+ }
+
+ return UI_CNR_ALL;
}
/* conversion from old to new buttons, so still messy */
@@ -3104,14 +3134,14 @@ void ui_draw_search_back(uiStyle *UNUSED(style), uiBlock *block, rcti *rect)
uiWidgetType *wt= widget_type(UI_WTYPE_BOX);
glEnable(GL_BLEND);
- widget_softshadow(rect, 15, 5.0f, 8.0f);
+ widget_softshadow(rect, UI_CNR_ALL, 5.0f, 8.0f);
glDisable(GL_BLEND);
wt->state(wt, 0);
if(block)
- wt->draw(&wt->wcol, rect, block->flag, 15);
+ wt->draw(&wt->wcol, rect, block->flag, UI_CNR_ALL);
else
- wt->draw(&wt->wcol, rect, 0, 15);
+ wt->draw(&wt->wcol, rect, 0, UI_CNR_ALL);
}
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index 692c8940a21..9b9237f70cf 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1039,6 +1039,23 @@ void UI_ColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char c
glColor3ub(r, g, b);
}
+void UI_GetColorPtrShade3ubv(const unsigned char cp[3], unsigned char col[3], int offset)
+{
+ int r, g, b;
+
+ r= offset+(int)cp[0];
+ g= offset+(int)cp[1];
+ b= offset+(int)cp[2];
+
+ CLAMP(r, 0, 255);
+ CLAMP(g, 0, 255);
+ CLAMP(b, 0, 255);
+
+ col[0] = r;
+ col[1] = g;
+ col[2] = b;
+}
+
// get a 3 byte color, blended and shaded between two other char color pointers
void UI_GetColorPtrBlendShade3ubv(const unsigned char cp1[3], const unsigned char cp2[3], unsigned char col[3], float fac, int offset)
{
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 43bf2f59e04..18db1c8c894 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -168,7 +168,7 @@ static void view2d_masks(View2D *v2d)
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
{
short tot_changed= 0, init= 0;
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
/* initialise data if there is a need for such */
if ((v2d->flag & V2D_IS_INITIALISED) == 0) {
@@ -420,8 +420,8 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
/* check if we should restore aspect ratio (if view size changed) */
if (v2d->keepzoom & V2D_KEEPASPECT) {
- short do_x=0, do_y=0, do_cur, do_win;
- float curRatio, winRatio;
+ short do_x=0, do_y=0, do_cur /* , do_win */ /* UNUSED */;
+ float /* curRatio, */ /* UNUSED */ winRatio;
/* when a window edge changes, the aspect ratio can't be used to
* find which is the best new 'cur' rect. thats why it stores 'old'
@@ -429,7 +429,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
if (winx != v2d->oldwinx) do_x= 1;
if (winy != v2d->oldwiny) do_y= 1;
- curRatio= height / width;
+ /* curRatio= height / width; */ /* UNUSED */
winRatio= winy / winx;
/* both sizes change (area/region maximised) */
@@ -443,7 +443,7 @@ void UI_view2d_curRect_validate_resize(View2D *v2d, int resize)
else do_x= 1;
}
do_cur= do_x;
- do_win= do_y;
+ /* do_win= do_y; */ /* UNUSED */
if (do_cur) {
if ((v2d->keeptot == V2D_KEEPTOT_STRICT) && (winx != v2d->oldwinx)) {
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 434334258af..0aaf6fe3bc6 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -51,6 +51,7 @@
#include "ED_screen.h"
#include "UI_view2d.h"
+#include "UI_interface.h"
#include "PIL_time.h" /* USER_ZOOM_CONT */
@@ -444,7 +445,7 @@ static void VIEW2D_OT_scroll_down(wmOperatorType *ot)
/* rna - must keep these in sync with the other operators */
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX);
- RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll down one page.");
+ RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll down one page");
}
@@ -494,7 +495,7 @@ static void VIEW2D_OT_scroll_up(wmOperatorType *ot)
/* rna - must keep these in sync with the other operators */
RNA_def_int(ot->srna, "deltax", 0, INT_MIN, INT_MAX, "Delta X", "", INT_MIN, INT_MAX);
RNA_def_int(ot->srna, "deltay", 0, INT_MIN, INT_MAX, "Delta Y", "", INT_MIN, INT_MAX);
- RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll up one page.");
+ RNA_def_boolean(ot->srna, "page", 0, "Page", "Scroll up one page");
}
/* ********************************************************* */
@@ -1587,7 +1588,7 @@ static void VIEW2D_OT_scroller_activate(wmOperatorType *ot)
static int reset_exec(bContext *C, wmOperator *UNUSED(op))
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
ARegion *ar= CTX_wm_region(C);
View2D *v2d= &ar->v2d;
int winx, winy;
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index e371c346f36..6a263fca915 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -1335,7 +1335,7 @@ static int mesh_separate_selected(wmOperator *op, Main *bmain, Scene *scene, Bas
me= obedit->data;
em= BKE_mesh_get_editmesh(me);
if(me->key) {
- BKE_report(op->reports, RPT_WARNING, "Can't separate mesh with shape keys.");
+ BKE_report(op->reports, RPT_WARNING, "Can't separate mesh with shape keys");
BKE_mesh_end_editmesh(me, em);
return 0;
}
@@ -1659,8 +1659,8 @@ static void *editMesh_to_undoMesh(void *emv)
/* now copy vertices */
a = 0;
for(eve=em->verts.first; eve; eve= eve->next, evec++, a++) {
- VECCOPY(evec->co, eve->co);
- VECCOPY(evec->no, eve->no);
+ copy_v3_v3(evec->co, eve->co);
+ copy_v3_v3(evec->no, eve->no);
evec->f= eve->f;
evec->h= eve->h;
@@ -1761,7 +1761,7 @@ static void undoMesh_to_editMesh(void *umv, void *emv)
eve= addvertlist(em, evec->co, NULL);
evar[a]= eve;
- VECCOPY(eve->no, evec->no);
+ copy_v3_v3(eve->no, evec->no);
eve->f= evec->f;
eve->h= evec->h;
eve->keyindex= evec->keyindex;
@@ -1958,3 +1958,101 @@ void em_setup_viewcontext(bContext *C, ViewContext *vc)
vc->em= me->edit_mesh;
}
}
+
+
+/* (similar to void paintface_flush_flags(Object *ob))
+ * copy the vertex flags, most importantly selection from the mesh to the final derived mesh,
+ * use in object mode when selecting vertices (while painting) */
+void paintvert_flush_flags(Object *ob)
+{
+ Mesh *me= get_mesh(ob);
+ DerivedMesh *dm= ob->derivedFinal;
+ MVert *dm_mvert, *dm_mv;
+ int *index_array = NULL;
+ int totvert;
+ int i;
+
+ if(me==NULL || dm==NULL)
+ return;
+
+ index_array = dm->getVertDataArray(dm, CD_ORIGINDEX);
+
+ dm_mvert = dm->getVertArray(dm);
+ totvert = dm->getNumVerts(dm);
+
+ dm_mv= dm_mvert;
+
+ if(index_array) {
+ int orig_index;
+ for (i= 0; i<totvert; i++, dm_mv++) {
+ orig_index= index_array[i];
+ if(orig_index != ORIGINDEX_NONE) {
+ dm_mv->flag= me->mvert[index_array[i]].flag;
+ }
+ }
+ }
+ else {
+ for (i= 0; i<totvert; i++, dm_mv++) {
+ dm_mv->flag= me->mvert[i].flag;
+ }
+ }
+}
+/* note: if the caller passes FALSE to flush_flags, then they will need to run paintvert_flush_flags(ob) themselves */
+void paintvert_deselect_all_visible(Object *ob, int action, short flush_flags)
+{
+ Mesh *me;
+ MVert *mvert;
+ int a;
+
+ me= get_mesh(ob);
+ if(me==NULL) return;
+
+ if(action == SEL_INVERT) {
+ mvert= me->mvert;
+ a= me->totvert;
+ while(a--) {
+ if((mvert->flag & ME_HIDE) == 0) {
+ mvert->flag ^= SELECT;
+ }
+ mvert++;
+ }
+ }
+ else {
+ if (action == SEL_TOGGLE) {
+ action = SEL_SELECT;
+
+ mvert= me->mvert;
+ a= me->totvert;
+ while(a--) {
+ if((mvert->flag & ME_HIDE) == 0 && mvert->flag & SELECT) {
+ action = SEL_DESELECT;
+ break;
+ }
+ mvert++;
+ }
+ }
+
+ mvert= me->mvert;
+ a= me->totvert;
+ while(a--) {
+ if((mvert->flag & ME_HIDE) == 0) {
+ switch (action) {
+ case SEL_SELECT:
+ mvert->flag |= SELECT;
+ break;
+ case SEL_DESELECT:
+ mvert->flag &= ~SELECT;
+ break;
+ case SEL_INVERT:
+ mvert->flag ^= SELECT;
+ break;
+ }
+ }
+ mvert++;
+ }
+ }
+
+ if(flush_flags) {
+ paintvert_flush_flags(ob);
+ }
+}
diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c
index fa3619883f4..0c819cd7649 100644
--- a/source/blender/editors/mesh/editmesh_add.c
+++ b/source/blender/editors/mesh/editmesh_add.c
@@ -210,7 +210,7 @@ static int dupli_extrude_cursor(bContext *C, wmOperator *op, wmEvent *event)
copy_v3_v3(vec, min);
normalize_v3(vec);
- dot= INPR(vec, nor);
+ dot= dot_v3v3(vec, nor);
if( fabs(dot)<0.999) {
float cross[3], si, q1[4];
@@ -1486,7 +1486,7 @@ void MESH_OT_primitive_circle_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 3, 500);
+ RNA_def_int(ot->srna, "vertices", 32, 3, INT_MAX, "Vertices", "", 3, 500);
RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
RNA_def_boolean(ot->srna, "fill", 0, "Fill", "");
@@ -1527,7 +1527,7 @@ void MESH_OT_primitive_cylinder_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500);
+ RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500);
RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
RNA_def_boolean(ot->srna, "cap_ends", 1, "Cap Ends", "");
@@ -1568,7 +1568,7 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_int(ot->srna, "vertices", 32, INT_MIN, INT_MAX, "Vertices", "", 2, 500);
+ RNA_def_int(ot->srna, "vertices", 32, 2, INT_MAX, "Vertices", "", 2, 500);
RNA_def_float(ot->srna, "radius", 1.0f, 0.0, FLT_MAX, "Radius", "", 0.001, 100.00);
RNA_def_float(ot->srna, "depth", 2.0f, 0.0, FLT_MAX, "Depth", "", 0.001, 100.00);
RNA_def_boolean(ot->srna, "cap_end", 1, "Cap End", "");
@@ -1609,8 +1609,8 @@ void MESH_OT_primitive_grid_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_int(ot->srna, "x_subdivisions", 10, INT_MIN, INT_MAX, "X Subdivisions", "", 3, 1000);
- RNA_def_int(ot->srna, "y_subdivisions", 10, INT_MIN, INT_MAX, "Y Subdivisions", "", 3, 1000);
+ RNA_def_int(ot->srna, "x_subdivisions", 10, 3, INT_MAX, "X Subdivisions", "", 3, 1000);
+ RNA_def_int(ot->srna, "y_subdivisions", 10, 3, INT_MAX, "Y Subdivisions", "", 3, 1000);
RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, FLT_MAX);
ED_object_add_generic_props(ot, TRUE);
@@ -1682,8 +1682,8 @@ void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_int(ot->srna, "segments", 32, INT_MIN, INT_MAX, "Segments", "", 3, 500);
- RNA_def_int(ot->srna, "ring_count", 16, INT_MIN, INT_MAX, "Rings", "", 3, 500);
+ RNA_def_int(ot->srna, "segments", 32, 3, INT_MAX, "Segments", "", 3, 500);
+ RNA_def_int(ot->srna, "ring_count", 16, 3, INT_MAX, "Rings", "", 3, 500);
RNA_def_float(ot->srna, "size", 1.0f, 0.0, FLT_MAX, "Size", "", 0.001, 100.00);
ED_object_add_generic_props(ot, TRUE);
@@ -1721,7 +1721,7 @@ void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_int(ot->srna, "subdivisions", 2, 0, INT_MAX, "Subdivisions", "", 0, 8);
+ RNA_def_int(ot->srna, "subdivisions", 2, 1, INT_MAX, "Subdivisions", "", 1, 8);
RNA_def_float(ot->srna, "size", 1.0f, 0.0f, FLT_MAX, "Size", "", 0.001f, 100.00);
ED_object_add_generic_props(ot, TRUE);
diff --git a/source/blender/editors/mesh/editmesh_lib.c b/source/blender/editors/mesh/editmesh_lib.c
index 0afa2d01702..02b5250f67a 100644
--- a/source/blender/editors/mesh/editmesh_lib.c
+++ b/source/blender/editors/mesh/editmesh_lib.c
@@ -1002,7 +1002,7 @@ void EM_free_data_layer(EditMesh *em, CustomData *data, int type)
static void add_normal_aligned(float *nor, float *add)
{
- if( INPR(nor, add) < -0.9999f)
+ if(dot_v3v3(nor, add) < -0.9999f)
sub_v3_v3(nor, add);
else
add_v3_v3(nor, add);
@@ -1096,13 +1096,13 @@ short extrudeflag_face_indiv(EditMesh *em, short UNUSED(flag), float *UNUSED(nor
v3= addvertlist(em, efa->v3->co, efa->v3);
v1->f1= v2->f1= v3->f1= 1;
- VECCOPY(v1->no, efa->n);
- VECCOPY(v2->no, efa->n);
- VECCOPY(v3->no, efa->n);
+ copy_v3_v3(v1->no, efa->n);
+ copy_v3_v3(v2->no, efa->n);
+ copy_v3_v3(v3->no, efa->n);
if(efa->v4) {
v4= addvertlist(em, efa->v4->co, efa->v4);
v4->f1= 1;
- VECCOPY(v4->no, efa->n);
+ copy_v3_v3(v4->no, efa->n);
}
else v4= NULL;
@@ -1310,7 +1310,7 @@ static short extrudeflag_edge(Object *obedit, EditMesh *em, short UNUSED(flag),
* of the cases above to handle edges on the line of symmetry.
*/
for (; md; md=md->next) {
- if (md->type==eModifierType_Mirror) {
+ if ((md->type==eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
MirrorModifierData *mmd = (MirrorModifierData*) md;
if(mmd->flag & MOD_MIR_CLIPPING) {
@@ -1597,7 +1597,7 @@ short extrudeflag_vert(Object *obedit, EditMesh *em, short flag, float *nor, int
* of the cases above to handle edges on the line of symmetry.
*/
for (; md; md=md->next) {
- if (md->type==eModifierType_Mirror) {
+ if ((md->type==eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
MirrorModifierData *mmd = (MirrorModifierData*) md;
if(mmd->flag & MOD_MIR_CLIPPING) {
@@ -1648,8 +1648,8 @@ short extrudeflag_vert(Object *obedit, EditMesh *em, short flag, float *nor, int
sel= 1;
v1= addvertlist(em, 0, NULL);
- VECCOPY(v1->co, eve->co);
- VECCOPY(v1->no, eve->no);
+ copy_v3_v3(v1->co, eve->co);
+ copy_v3_v3(v1->no, eve->no);
v1->f= eve->f;
eve->f &= ~flag;
eve->tmp.v = v1;
@@ -2482,7 +2482,7 @@ void EM_make_hq_normals(EditMesh *em)
/* 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 */
- VECCOPY(edge_normal, EM_get_face_for_index(edge_ref->f1)->n)
+ copy_v3_v3(edge_normal, EM_get_face_for_index(edge_ref->f1)->n);
mul_v3_fl(edge_normal, M_PI/2);
}
add_v3_v3(EM_get_vert_for_index(ed_v1)->no, edge_normal );
@@ -2499,7 +2499,7 @@ void EM_make_hq_normals(EditMesh *em)
if(normalize_v3(eve->no) == 0.0f && eve->tmp.l < 0) {
/* exceptional case, totally flat */
efa= EM_get_face_for_index(-(eve->tmp.l) - 1);
- VECCOPY(eve->no, efa->n);
+ copy_v3_v3(eve->no, efa->n);
}
}
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index eb6854d2548..8c035ca46fd 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -266,6 +266,7 @@ int EM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, sho
/* method in use for face selecting too */
if(vc->obedit==NULL) {
if(paint_facesel_test(vc->obact));
+ else if(paint_vertsel_test(vc->obact));
else return 0;
}
else if(vc->v3d->drawtype<OB_SOLID || (vc->v3d->flag & V3D_ZBUF_SELECT)==0) return 0;
@@ -328,6 +329,7 @@ int EM_init_backbuf_circle(ViewContext *vc, short xs, short ys, short rads)
/* method in use for face selecting too */
if(vc->obedit==NULL) {
if(paint_facesel_test(vc->obact));
+ else if (paint_vertsel_test(vc->obact));
else return 0;
}
else if(vc->v3d->drawtype<OB_SOLID || (vc->v3d->flag & V3D_ZBUF_SELECT)==0) return 0;
@@ -827,7 +829,7 @@ static int similar_face_select__internal(EditMesh *em, int mode, float thresh)
float angle;
for(efa= em->faces.first; efa; efa= efa->next) {
if (!(efa->f & SELECT) && !efa->h) {
- angle= RAD2DEGF(angle_v2v2(base_efa->n, efa->n));
+ angle= RAD2DEGF(angle_v3v3(base_efa->n, efa->n));
if (angle/180.0f<=thresh) {
EM_select_face(efa, 1);
selcount++;
@@ -842,7 +844,7 @@ static int similar_face_select__internal(EditMesh *em, int mode, float thresh)
base_dot= dot_v3v3(base_efa->cent, base_efa->n);
for(efa= em->faces.first; efa; efa= efa->next) {
if (!(efa->f & SELECT) && !efa->h) {
- angle= RAD2DEGF(angle_v2v2(base_efa->n, efa->n));
+ angle= RAD2DEGF(angle_v3v3(base_efa->n, efa->n));
if (angle/180.0f<=thresh) {
dot=dot_v3v3(efa->cent, base_efa->n);
if (fabsf(base_dot-dot) <= thresh) {
@@ -959,7 +961,7 @@ static int similar_edge_select__internal(EditMesh *em, int mode, float thresh)
else if (eed->f2==0) /* first access, assign the face */
eed->tmp.f= efa;
else if (eed->f2==1) /* second, we assign the angle*/
- eed->tmp.fp= RAD2DEGF(angle_v2v2(eed->tmp.f->n, efa->n))/180;
+ eed->tmp.fp= RAD2DEGF(angle_v3v3(eed->tmp.f->n, efa->n))/180;
eed->f2++; /* f2==0 no face assigned. f2==1 one face found. f2==2 angle calculated.*/
}
j++;
@@ -989,7 +991,7 @@ static int similar_edge_select__internal(EditMesh *em, int mode, float thresh)
for(eed= em->edges.first; eed; eed= eed->next) {
if (!(eed->f & SELECT) && !eed->h) {
sub_v3_v3v3(dir, eed->v1->co, eed->v2->co);
- angle= RAD2DEGF(angle_v2v2(base_dir, dir));
+ angle= RAD2DEGF(angle_v3v3(base_dir, dir));
if (angle>90.0f) /* use the smallest angle between the edges */
angle= fabsf(angle-180.0f);
@@ -1086,7 +1088,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
Mesh *me= obedit->data;
EditMesh *em= BKE_mesh_get_editmesh(me);
- int selcount = similar_edge_select__internal(em, RNA_int_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold"));
+ int selcount = similar_edge_select__internal(em, RNA_enum_get(op->ptr, "type"), RNA_float_get(op->ptr, "threshold"));
if (selcount) {
/* here was an edge-mode only select flush case, has to be generalized */
@@ -1159,7 +1161,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
float angle;
for(eve= em->verts.first; eve; eve= eve->next) {
if (!(eve->f & SELECT) && !eve->h) {
- angle= RAD2DEGF(angle_v2v2(base_eve->no, eve->no));
+ angle= RAD2DEGF(angle_v3v3(base_eve->no, eve->no));
if (angle/180.0f<=thresh) {
eve->f |= SELECT;
selcount++;
@@ -1463,7 +1465,7 @@ static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
break;
case 2: /* copy image */
if (!tf_act) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers");
return;
}
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -1471,10 +1473,8 @@ static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
if (tf_act->tpage) {
tf->tpage = tf_act->tpage;
- tf->mode |= TF_TEX;
} else {
tf->tpage = NULL;
- tf->mode &= ~TF_TEX;
}
tf->tile= tf_act->tile;
change = 1;
@@ -1484,7 +1484,7 @@ static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
case 3: /* copy UV's */
if (!tf_act) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers");
return;
}
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -1497,7 +1497,7 @@ static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
break;
case 4: /* mode's */
if (!tf_act) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers");
return;
}
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -1510,7 +1510,7 @@ static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
break;
case 5: /* copy transp's */
if (!tf_act) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers");
return;
}
for(efa=em->faces.first; efa; efa=efa->next) {
@@ -1524,7 +1524,7 @@ static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
case 6: /* copy vcols's */
if (!mcol_act) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no color layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no color layers");
return;
} else {
/* guess the 4th color if needs be */
@@ -1654,10 +1654,8 @@ void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
tf = CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
if (tf_from->tpage) {
tf->tpage = tf_from->tpage;
- tf->mode |= TF_TEX;
} else {
tf->tpage = NULL;
- tf->mode &= ~TF_TEX;
}
tf->tile= tf_from->tile;
change = 1;
@@ -2807,7 +2805,7 @@ void MESH_OT_hide(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
}
void EM_reveal_mesh(EditMesh *em)
@@ -2932,7 +2930,7 @@ void MESH_OT_select_by_number_vertices(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, 3, "Type", "Type of elements to select.");
+ ot->prop= RNA_def_enum(ot->srna, "type", type_items, 3, "Type", "Type of elements to select");
}
@@ -3714,8 +3712,8 @@ void MESH_OT_select_random(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly.", 0.f, 100.0f);
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first.");
+ RNA_def_float_percentage(ot->srna, "percent", 50.f, 0.0f, 100.0f, "Percent", "Percentage of elements to select randomly", 0.f, 100.0f);
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first");
}
void EM_select_by_material(EditMesh *em, int index)
@@ -4148,7 +4146,7 @@ static int smooth_vertex(bContext *C, wmOperator *op)
* are within tolerance of the plane(s) of reflection
*/
for(md=obedit->modifiers.first; md; md=md->next) {
- if(md->type==eModifierType_Mirror) {
+ if((md->type==eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
MirrorModifierData *mmd = (MirrorModifierData*) md;
if(mmd->flag & MOD_MIR_CLIPPING) {
@@ -4283,9 +4281,9 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Smooth Iterations", "", 1, INT_MAX);
- RNA_def_boolean(ot->srna, "xaxis", 1, "X-Axis", "Smooth along the X axis.");
- RNA_def_boolean(ot->srna, "yaxis", 1, "Y-Axis", "Smooth along the Y axis.");
- RNA_def_boolean(ot->srna, "zaxis", 1, "Z-Axis", "Smooth along the Z axis.");
+ RNA_def_boolean(ot->srna, "xaxis", 1, "X-Axis", "Smooth along the X axis");
+ RNA_def_boolean(ot->srna, "yaxis", 1, "Y-Axis", "Smooth along the Y axis");
+ RNA_def_boolean(ot->srna, "zaxis", 1, "Z-Axis", "Smooth along the Z axis");
}
static int mesh_noise_exec(bContext *C, wmOperator *op)
@@ -4301,7 +4299,7 @@ static int mesh_noise_exec(bContext *C, wmOperator *op)
ma= give_current_material(obedit, obedit->actcol);
if(ma==0 || ma->mtex[0]==0 || ma->mtex[0]->tex==0) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no material or texture assigned.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no material or texture assigned");
return OPERATOR_FINISHED;
}
tex= give_current_material_texture(ma);
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 9ff2923f733..c8e3075ac60 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -494,7 +494,7 @@ static int removedoublesflag_exec(bContext *C, wmOperator *op)
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
}
- BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s.", count, (count==1)?"ex":"ices");
+ BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count==1)?"ex":"ices");
BKE_mesh_end_editmesh(obedit->data, em);
@@ -1466,8 +1466,8 @@ static void alter_co(float *co, EditEdge *edge, float smooth, float fractal, int
sub_v3_v3v3(nor, edge->v1->co, edge->v2->co);
len= 0.5f*normalize_v3(nor);
- VECCOPY(nor1, edge->v1->no);
- VECCOPY(nor2, edge->v2->no);
+ copy_v3_v3(nor1, edge->v1->no);
+ copy_v3_v3(nor2, edge->v2->no);
/* cosine angle */
fac= nor[0]*nor1[0] + nor[1]*nor1[1] + nor[2]*nor1[2] ;
@@ -2675,7 +2675,7 @@ void esubdivideflag(Object *obedit, EditMesh *em, int flag, float smooth, float
}
for (; md; md=md->next) {
- if (md->type==eModifierType_Mirror) {
+ if ((md->type==eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
MirrorModifierData *mmd = (MirrorModifierData*) md;
if(mmd->flag & MOD_MIR_CLIPPING) {
@@ -3234,13 +3234,13 @@ static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert
normal_tri_v3( noA2,v1->co, v3->co, v4->co);
if(noA1[0] == noA2[0] && noA1[1] == noA2[1] && noA1[2] == noA2[2]) normalADiff = 0.0;
- else normalADiff = RAD2DEGF(angle_v2v2(noA1, noA2));
+ else normalADiff = RAD2DEGF(angle_v3v3(noA1, noA2));
//if(!normalADiff) normalADiff = 179;
normal_tri_v3( noB1,v2->co, v3->co, v4->co);
normal_tri_v3( noB2,v4->co, v1->co, v2->co);
if(noB1[0] == noB2[0] && noB1[1] == noB2[1] && noB1[2] == noB2[2]) normalBDiff = 0.0;
- else normalBDiff = RAD2DEGF(angle_v2v2(noB1, noB2));
+ else normalBDiff = RAD2DEGF(angle_v3v3(noB1, noB2));
//if(!normalBDiff) normalBDiff = 179;
measure += (normalADiff/360) + (normalBDiff/360);
@@ -3255,10 +3255,10 @@ static float measure_facepair(EditVert *v1, EditVert *v2, EditVert *v3, EditVert
diff = 0.0;
diff = (
- fabsf(RAD2DEGF(angle_v2v2(edgeVec1, edgeVec2)) - 90) +
- fabsf(RAD2DEGF(angle_v2v2(edgeVec2, edgeVec3)) - 90) +
- fabsf(RAD2DEGF(angle_v2v2(edgeVec3, edgeVec4)) - 90) +
- fabsf(RAD2DEGF(angle_v2v2(edgeVec4, edgeVec1)) - 90)) / 360;
+ fabsf(RAD2DEGF(angle_v3v3(edgeVec1, edgeVec2)) - 90) +
+ fabsf(RAD2DEGF(angle_v3v3(edgeVec2, edgeVec3)) - 90) +
+ fabsf(RAD2DEGF(angle_v3v3(edgeVec3, edgeVec4)) - 90) +
+ fabsf(RAD2DEGF(angle_v3v3(edgeVec4, edgeVec1)) - 90)) / 360;
if(!diff) return 0.0;
measure += diff;
@@ -3887,7 +3887,7 @@ void MESH_OT_edge_rotate(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate the edge around.");
+ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate the edge around");
}
@@ -4869,7 +4869,7 @@ void mesh_set_face_flags(EditMesh *em, short mode)
/* helper to find edge for edge_rip */
static float mesh_rip_edgedist(ARegion *ar, float mat[][4], float *co1, float *co2, const int mval[2])
{
- float vec1[3], vec2[3], mvalf[2];
+ float vec1[2], vec2[2], mvalf[2];
ED_view3d_project_float(ar, co1, vec1, mat);
ED_view3d_project_float(ar, co2, vec2, mat);
@@ -5313,10 +5313,10 @@ void MESH_OT_blend_from_shape(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "shape", shape_items, 0, "Shape", "Shape key to use for blending.");
+ prop= RNA_def_enum(ot->srna, "shape", shape_items, 0, "Shape", "Shape key to use for blending");
RNA_def_enum_funcs(prop, shape_itemf);
- RNA_def_float(ot->srna, "blend", 1.0f, -FLT_MAX, FLT_MAX, "Blend", "Blending factor.", -2.0f, 2.0f);
- RNA_def_boolean(ot->srna, "add", 0, "Add", "Add rather than blend between shapes.");
+ RNA_def_float(ot->srna, "blend", 1.0f, -FLT_MAX, FLT_MAX, "Blend", "Blending factor", -2.0f, 2.0f);
+ RNA_def_boolean(ot->srna, "add", 0, "Add", "Add rather than blend between shapes");
}
/************************ Merge Operator *************************/
@@ -5957,7 +5957,7 @@ static int merge_exec(bContext *C, wmOperator *op)
recalc_editnormals(em);
- BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s.", count, (count==1)?"ex":"ices");
+ BKE_reportf(op->reports, RPT_INFO, "Removed %d vert%s", count, (count==1)?"ex":"ices");
BKE_mesh_end_editmesh(obedit->data, em);
@@ -6029,10 +6029,10 @@ void MESH_OT_merge(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "type", merge_type_items, 3, "Type", "Merge method to use.");
+ prop= RNA_def_enum(ot->srna, "type", merge_type_items, 3, "Type", "Merge method to use");
RNA_def_enum_funcs(prop, merge_type_itemf);
ot->prop= prop;
- RNA_def_boolean(ot->srna, "uvs", 0, "UVs", "Move UVs according to merge.");
+ RNA_def_boolean(ot->srna, "uvs", 0, "UVs", "Move UVs according to merge");
}
/************************ Vertex Path Operator *************************/
@@ -6236,7 +6236,7 @@ void MESH_OT_select_vertex_path(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, PATH_SELECT_EDGE_LENGTH, "Type", "Method to compute distance.");
+ ot->prop= RNA_def_enum(ot->srna, "type", type_items, PATH_SELECT_EDGE_LENGTH, "Type", "Method to compute distance");
}
/********************** Region/Loop Operators *************************/
@@ -6491,7 +6491,7 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op)
int dir= RNA_enum_get(op->ptr, "direction");
if (!EM_texFaceCheck(em)) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -6565,7 +6565,7 @@ static int mesh_mirror_uvs(bContext *C, wmOperator *op)
int axis= RNA_enum_get(op->ptr, "axis");
if (!EM_texFaceCheck(em)) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no uv/image layers");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -6653,7 +6653,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op)
int dir= RNA_enum_get(op->ptr, "direction");
if (!EM_vertColorCheck(em)) {
- BKE_report(op->reports, RPT_WARNING, "Mesh has no color layers.");
+ BKE_report(op->reports, RPT_WARNING, "Mesh has no color layers");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -6769,7 +6769,7 @@ void MESH_OT_uvs_rotate(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate UVs around.");
+ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate UVs around");
}
void MESH_OT_uvs_mirror(wmOperatorType *ot)
@@ -6787,7 +6787,7 @@ void MESH_OT_uvs_mirror(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror UVs around.");
+ RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror UVs around");
}
void MESH_OT_colors_rotate(wmOperatorType *ot)
@@ -6805,7 +6805,7 @@ void MESH_OT_colors_rotate(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate edge around.");
+ RNA_def_enum(ot->srna, "direction", direction_items, DIRECTION_CW, "Direction", "Direction to rotate edge around");
}
void MESH_OT_colors_mirror(wmOperatorType *ot)
@@ -6823,7 +6823,7 @@ void MESH_OT_colors_mirror(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror colors around.");
+ RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror colors around");
}
/********************** Subdivide Operator *************************/
@@ -6868,8 +6868,8 @@ void MESH_OT_subdivide(wmOperatorType *ot)
/* properties */
RNA_def_int(ot->srna, "number_cuts", 1, 1, INT_MAX, "Number of Cuts", "", 1, 10);
- RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor.", 0.0f, 1.0f);
- RNA_def_float(ot->srna, "fractal", 0.0, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor.", 0.0f, 1000.0f);
+ RNA_def_float(ot->srna, "smoothness", 0.0f, 0.0f, FLT_MAX, "Smoothness", "Smoothness factor", 0.0f, 1.0f);
+ RNA_def_float(ot->srna, "fractal", 0.0, 0.0f, FLT_MAX, "Fractal", "Fractal randomness factor", 0.0f, 1000.0f);
RNA_def_enum(ot->srna, "corner_cut_pattern", corner_type_items, SUBDIV_CORNER_INNERVERT, "Corner Cut Pattern", "Topology pattern to use to fill a face after cutting across its corner");
}
@@ -7343,7 +7343,7 @@ void MESH_OT_sort_faces(wmOperatorType *ot)
/* 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->description= "The faces of the active Mesh Object are sorted, based on the current view";
ot->idname= "MESH_OT_sort_faces";
/* api callbacks */
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index c9e580fbe4b..2e638294807 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -238,7 +238,6 @@ int ED_mesh_uv_texture_remove(bContext *C, Object *ob, Mesh *me)
int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mesh *me, const char *name, int active_set)
{
EditMesh *em;
- MCol *mcol;
int layernum;
if(me->edit_mesh) {
@@ -261,8 +260,6 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
if(layernum >= MAX_MCOL)
return 0;
- mcol= me->mcol;
-
if(me->mcol)
CustomData_add_layer_named(&me->fdata, CD_MCOL, CD_DUPLICATE, me->mcol, me->totface, name);
else
@@ -383,7 +380,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
if(!ima) {
- BKE_report(op->reports, RPT_ERROR, "Not an Image.");
+ BKE_report(op->reports, RPT_ERROR, "Not an Image");
return OPERATOR_CANCELLED;
}
@@ -432,7 +429,7 @@ void MESH_OT_drop_named_image(wmOperatorType *ot)
ot->flag= OPTYPE_UNDO;
/* properties */
- RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign.");
+ RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign");
RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file");
}
@@ -702,7 +699,7 @@ static void mesh_add_faces(Mesh *mesh, int len)
void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges, int faces)
{
if(mesh->edit_mesh) {
- BKE_report(reports, RPT_ERROR, "Can't add geometry in edit mode.");
+ BKE_report(reports, RPT_ERROR, "Can't add geometry in edit mode");
return;
}
@@ -718,7 +715,7 @@ void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges,
void ED_mesh_faces_add(Mesh *mesh, ReportList *reports, int count)
{
if(mesh->edit_mesh) {
- BKE_report(reports, RPT_ERROR, "Can't add faces in edit mode.");
+ BKE_report(reports, RPT_ERROR, "Can't add faces in edit mode");
return;
}
@@ -728,7 +725,7 @@ void ED_mesh_faces_add(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_edges_add(Mesh *mesh, ReportList *reports, int count)
{
if(mesh->edit_mesh) {
- BKE_report(reports, RPT_ERROR, "Can't add edges in edit mode.");
+ BKE_report(reports, RPT_ERROR, "Can't add edges in edit mode");
return;
}
@@ -738,7 +735,7 @@ void ED_mesh_edges_add(Mesh *mesh, ReportList *reports, int count)
void ED_mesh_vertices_add(Mesh *mesh, ReportList *reports, int count)
{
if(mesh->edit_mesh) {
- BKE_report(reports, RPT_ERROR, "Can't add vertices in edit mode.");
+ BKE_report(reports, RPT_ERROR, "Can't add vertices in edit mode");
return;
}
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index 763e82b8b53..526bf177ab7 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -217,7 +217,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
if(me->totvert) {
/* Add this object's materials to the base one's if they don't exist already (but only if limits not exceeded yet) */
- if(totcol < MAXMAT-1) {
+ if(totcol < MAXMAT) {
for(a=1; a<=base->object->totcol; a++) {
ma= give_current_material(base->object, a);
@@ -231,7 +231,7 @@ int join_mesh_exec(bContext *C, wmOperator *op)
}
totcol++;
}
- if(totcol>=MAXMAT-1)
+ if(totcol >= MAXMAT)
break;
}
}
@@ -574,9 +574,9 @@ int join_mesh_shapes_exec(bContext *C, wmOperator *op)
if (!ok) {
if (nonequal_verts)
- BKE_report(op->reports, RPT_WARNING, "Selected meshes must have equal numbers of vertices.");
+ BKE_report(op->reports, RPT_WARNING, "Selected meshes must have equal numbers of vertices");
else
- BKE_report(op->reports, RPT_WARNING, "No additional selected meshes with equal vertex count to join.");
+ BKE_report(op->reports, RPT_WARNING, "No additional selected meshes with equal vertex count to join");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index b007e30422d..a58d74d250c 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -268,7 +268,7 @@ void MBALL_OT_select_random_metaelems(struct wmOperatorType *ot)
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);
+ RNA_def_float_percentage(ot->srna, "percent", 0.5f, 0.0f, 1.0f, "Percent", "Percentage of metaelems to select randomly", 0.0001f, 1.0f);
}
/***************************** Duplicate operator *****************************/
@@ -412,7 +412,7 @@ void MBALL_OT_hide_metaelems(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
}
/***************************** Unhide operator *****************************/
diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt
index 14b40d55f11..b9b8ddc6305 100644
--- a/source/blender/editors/object/CMakeLists.txt
+++ b/source/blender/editors/object/CMakeLists.txt
@@ -58,8 +58,22 @@ set(SRC
object_intern.h
)
+if(WITH_GAMEENGINE)
+ list(APPEND INC
+ ../../../../extern/recastnavigation/Recast/Include
+ )
+
+ list(APPEND SRC
+ object_navmesh.cpp
+ )
+endif()
+
if(WITH_PYTHON)
add_definitions(-DWITH_PYTHON)
endif()
+if(WITH_GAMEENGINE)
+ add_definitions(-DWITH_GAMEENGINE)
+endif()
+
blender_add_lib(bf_editor_object "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript
index ca048cb59f9..cdda16582ef 100644
--- a/source/blender/editors/object/SConscript
+++ b/source/blender/editors/object/SConscript
@@ -1,12 +1,13 @@
#!/usr/bin/python
Import ('env')
-sources = env.Glob('*.c')
+sources = env.Glob('*.c') + env.Glob('*.cpp')
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc ../../blenloader'
incs += ' ../../makesrna ../../python ../../ikplugin'
incs += ' ../../render/extern/include ../../gpu' # for object_bake.c
+incs += ' #extern/recastnavigation/Recast/Include'
defs = []
@@ -19,5 +20,8 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
if env['WITH_BF_PYTHON']:
defs.append('WITH_PYTHON')
+
+if env['WITH_BF_GAMEENGINE']:
+ defs.append('WITH_GAMEENGINE')
env.BlenderLib ( 'bf_editors_object', sources, Split(incs), defs, libtype=['core'], priority=[35] )
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index fa529374bf7..0292977f816 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -400,7 +400,7 @@ static Object *effector_add_type(bContext *C, wmOperator *op, int type)
((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(curve_get_editcurve(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);
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 2055c906b41..6c553289052 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -764,7 +764,7 @@ static int childof_clear_inverse_exec (bContext *C, wmOperator *op)
bChildOfConstraint *data= (con) ? (bChildOfConstraint *)con->data : NULL;
if(data==NULL) {
- BKE_report(op->reports, RPT_ERROR, "Childof constraint not found.");
+ BKE_report(op->reports, RPT_ERROR, "Childof constraint not found");
return OPERATOR_CANCELLED;
}
@@ -987,7 +987,7 @@ 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= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
/* free constraints for all selected bones */
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
@@ -1095,7 +1095,7 @@ void POSE_OT_constraints_copy(wmOperatorType *ot)
/* identifiers */
ot->name= "Copy Constraints to Selected";
ot->idname= "POSE_OT_constraints_copy";
- ot->description = "Copy constraints to other selected bones.";
+ ot->description = "Copy constraints to other selected bones";
/* api callbacks */
ot->exec= pose_constraint_copy_exec;
@@ -1136,7 +1136,7 @@ void OBJECT_OT_constraints_copy(wmOperatorType *ot)
/* identifiers */
ot->name= "Copy Constraints to Selected";
ot->idname= "OBJECT_OT_constraints_copy";
- ot->description = "Copy constraints to other selected objects.";
+ ot->description = "Copy constraints to other selected objects";
/* api callbacks */
ot->exec= object_constraint_copy_exec;
@@ -1302,7 +1302,7 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
/* ensure not to confuse object/pose adding */
if (pchan == NULL) {
- BKE_report(op->reports, RPT_ERROR, "No active pose bone to add a constraint to.");
+ BKE_report(op->reports, RPT_ERROR, "No active pose bone to add a constraint to");
return OPERATOR_CANCELLED;
}
}
@@ -1311,15 +1311,15 @@ static int constraint_add_exec(bContext *C, wmOperator *op, Object *ob, ListBase
return OPERATOR_CANCELLED;
}
if ( (type == CONSTRAINT_TYPE_RIGIDBODYJOINT) && (list != &ob->constraints) ) {
- BKE_report(op->reports, RPT_ERROR, "Rigid Body Joint Constraint can only be added to Objects.");
+ BKE_report(op->reports, RPT_ERROR, "Rigid Body Joint Constraint can only be added to Objects");
return OPERATOR_CANCELLED;
}
if ( (type == CONSTRAINT_TYPE_KINEMATIC) && ((!pchan) || (list != &pchan->constraints)) ) {
- BKE_report(op->reports, RPT_ERROR, "IK Constraint can only be added to Bones.");
+ BKE_report(op->reports, RPT_ERROR, "IK Constraint can only be added to Bones");
return OPERATOR_CANCELLED;
}
if ( (type == CONSTRAINT_TYPE_SPLINEIK) && ((!pchan) || (list != &pchan->constraints)) ) {
- BKE_report(op->reports, RPT_ERROR, "Spline IK Constraint can only be added to Bones.");
+ BKE_report(op->reports, RPT_ERROR, "Spline IK Constraint can only be added to Bones");
return OPERATOR_CANCELLED;
}
@@ -1407,7 +1407,7 @@ static int object_constraint_add_exec(bContext *C, wmOperator *op)
short with_targets= 0;
if (!ob) {
- BKE_report(op->reports, RPT_ERROR, "No active object to add constraint to.");
+ BKE_report(op->reports, RPT_ERROR, "No active object to add constraint to");
return OPERATOR_CANCELLED;
}
@@ -1423,12 +1423,12 @@ 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= ED_object_pose_armature(ED_object_active_context(C));
+ Object *ob= 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.");
+ BKE_report(op->reports, RPT_ERROR, "No active object to add constraint to");
return OPERATOR_CANCELLED;
}
@@ -1526,7 +1526,7 @@ 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= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
bPoseChannel *pchan= get_active_posechannel(ob);
bConstraint *con= NULL;
@@ -1537,7 +1537,7 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
/* must have active bone */
if (ELEM(NULL, ob, pchan)) {
- BKE_report(op->reports, RPT_ERROR, "Must have active bone to add IK Constraint to.");
+ BKE_report(op->reports, RPT_ERROR, "Must have active bone to add IK Constraint to");
return OPERATOR_CANCELLED;
}
@@ -1546,7 +1546,7 @@ static int pose_ik_add_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(evt))
if (con->type==CONSTRAINT_TYPE_KINEMATIC) break;
}
if (con) {
- BKE_report(op->reports, RPT_ERROR, "Bone already has IK Constraint.");
+ BKE_report(op->reports, RPT_ERROR, "Bone already has IK Constraint");
return OPERATOR_CANCELLED;
}
@@ -1610,7 +1610,7 @@ 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= ED_object_pose_armature(CTX_data_active_object(C));
+ Object *ob= object_pose_armature_get(CTX_data_active_object(C));
/* only remove IK Constraints */
CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 79cbfb6574b..ec1405f74b8 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -222,7 +222,7 @@ void OBJECT_OT_hide_view_set(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
}
@@ -297,7 +297,7 @@ void OBJECT_OT_hide_render_set(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
}
/* ******************* toggle editmode operator ***************** */
@@ -2177,7 +2177,7 @@ void OBJECT_OT_logic_bricks_copy(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Copy Logic Bricks to Selected";
- ot->description = "Copy logic bricks to other selected objects.";
+ ot->description = "Copy logic bricks to other selected objects";
ot->idname= "OBJECT_OT_logic_bricks_copy";
/* api callbacks */
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index bb32869469a..ce01bef34f6 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -217,7 +217,7 @@ static void select_editlattice_hook(Object *obedit, HookModifierData *hmd)
static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, float *cent)
{
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -292,7 +292,7 @@ static int return_editcurve_indexar(Object *obedit, int *tot, int **indexar, flo
return totvert;
}
-static int object_hook_index_array(Object *obedit, int *tot, int **indexar, char *name, float *cent_r)
+static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int **indexar, char *name, float *cent_r)
{
*indexar= NULL;
*tot= 0;
@@ -302,7 +302,12 @@ static int object_hook_index_array(Object *obedit, int *tot, int **indexar, char
case OB_MESH:
{
Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
+ EditMesh *em;
+
+ load_editMesh(scene, obedit);
+ make_editMesh(scene, obedit);
+
+ em = BKE_mesh_get_editmesh(me);
/* check selected vertices first */
if( return_editmesh_indexar(em, tot, indexar, cent_r)) {
@@ -329,7 +334,7 @@ static int object_hook_index_array(Object *obedit, int *tot, int **indexar, char
static void select_editcurve_hook(Object *obedit, HookModifierData *hmd)
{
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -427,7 +432,7 @@ static void add_hook_object(Main *bmain, Scene *scene, Object *obedit, Object *o
int tot, ok, *indexar;
char name[32];
- ok = object_hook_index_array(obedit, &tot, &indexar, name, cent);
+ ok = object_hook_index_array(scene, obedit, &tot, &indexar, name, cent);
if (!ok) return; // XXX error("Requires selected vertices or active Vertex Group");
@@ -485,7 +490,7 @@ static int object_add_hook_selob_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
if (!obsel) {
- BKE_report(op->reports, RPT_ERROR, "Can't add hook with no other selected objects.");
+ BKE_report(op->reports, RPT_ERROR, "Can't add hook with no other selected objects");
return OPERATOR_CANCELLED;
}
@@ -608,7 +613,7 @@ void OBJECT_OT_hook_remove(wmOperatorType *ot)
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;
}
@@ -675,7 +680,7 @@ void OBJECT_OT_hook_reset(wmOperatorType *ot)
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);
}
@@ -731,7 +736,7 @@ void OBJECT_OT_hook_recenter(wmOperatorType *ot)
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);
}
@@ -760,7 +765,7 @@ static int object_hook_assign_exec(bContext *C, wmOperator *op)
/* assign functionality */
- if(!object_hook_index_array(ob, &tot, &indexar, name, cent)) {
+ if(!object_hook_index_array(CTX_data_scene(C), ob, &tot, &indexar, name, cent)) {
BKE_report(op->reports, RPT_WARNING, "Requires selected vertices or active vertex group");
return OPERATOR_CANCELLED;
}
@@ -794,7 +799,7 @@ void OBJECT_OT_hook_assign(wmOperatorType *ot)
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);
}
@@ -843,7 +848,7 @@ void OBJECT_OT_hook_select(wmOperatorType *ot)
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 c308d36f838..434111c1227 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -200,6 +200,8 @@ void OBJECT_OT_vertex_group_copy(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_normalize(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_normalize_all(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_levels(struct wmOperatorType *ot);
+void OBJECT_OT_vertex_group_lock(struct wmOperatorType *ot);
+void OBJECT_OT_vertex_group_fix(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_invert(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_blend(struct wmOperatorType *ot);
void OBJECT_OT_vertex_group_clean(struct wmOperatorType *ot);
@@ -223,5 +225,10 @@ void OBJECT_OT_group_remove(struct wmOperatorType *ot);
/* object_bake.c */
void OBJECT_OT_bake_image(wmOperatorType *ot);
+/* object_navmesh.cpp */
+void OBJECT_OT_create_navmesh(struct wmOperatorType *ot);
+void OBJECT_OT_assign_navpolygon(struct wmOperatorType *ot);
+void OBJECT_OT_assign_new_navpolygon(struct wmOperatorType *ot);
+
#endif /* ED_OBJECT_INTERN_H */
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 8813b0027cd..ebbc4137628 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -97,7 +97,7 @@ ModifierData *ED_object_modifier_add(ReportList *reports, Main *bmain, Scene *sc
if(mti->flags&eModifierTypeFlag_Single) {
if(modifiers_findByType(ob, type)) {
- BKE_report(reports, RPT_WARNING, "Only one modifier of this type allowed.");
+ BKE_report(reports, RPT_WARNING, "Only one modifier of this type allowed");
return NULL;
}
}
@@ -169,7 +169,7 @@ int ED_object_modifier_remove(ReportList *reports, Main *bmain, Scene *scene, Ob
break;
if(!obmd) {
- BKE_reportf(reports, RPT_ERROR, "Modifier '%s' not in object '%s'.", ob->id.name, md->name);
+ BKE_reportf(reports, RPT_ERROR, "Modifier '%s' not in object '%s'", ob->id.name, md->name);
return 0;
}
@@ -255,7 +255,7 @@ int ED_object_modifier_move_up(ReportList *reports, Object *ob, ModifierData *md
ModifierTypeInfo *nmti = modifierType_getInfo(md->prev->type);
if(nmti->flags&eModifierTypeFlag_RequiresOriginalData) {
- BKE_report(reports, RPT_WARNING, "Cannot move above a modifier requiring original data.");
+ BKE_report(reports, RPT_WARNING, "Cannot move above a modifier requiring original data");
return 0;
}
}
@@ -276,7 +276,7 @@ int ED_object_modifier_move_down(ReportList *reports, Object *ob, ModifierData *
ModifierTypeInfo *nmti = modifierType_getInfo(md->next->type);
if(nmti->type!=eModifierTypeType_OnlyDeform) {
- BKE_report(reports, RPT_WARNING, "Cannot move beyond a non-deforming modifier.");
+ BKE_report(reports, RPT_WARNING, "Cannot move beyond a non-deforming modifier");
return 0;
}
}
@@ -552,7 +552,7 @@ int ED_object_modifier_apply(ReportList *reports, Scene *scene, Object *ob, Modi
}
if (md!=ob->modifiers.first)
- BKE_report(reports, RPT_INFO, "Applied modifier was not first, result may not be as expected.");
+ 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;
@@ -724,7 +724,7 @@ static int modifier_remove_exec(bContext *C, wmOperator *op)
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->mode;
+ int mode_orig = ob ? ob->mode : 0;
if(!ob || !md || !ED_object_modifier_remove(op->reports, bmain, scene, ob, md))
return OPERATOR_CANCELLED;
@@ -1068,7 +1068,7 @@ static int multires_reshape_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if(mmd->lvl==0) {
- BKE_report(op->reports, RPT_ERROR, "Reshape can work only with higher levels of subdivisions.");
+ BKE_report(op->reports, RPT_ERROR, "Reshape can work only with higher levels of subdivisions");
return OPERATOR_CANCELLED;
}
@@ -1081,12 +1081,12 @@ static int multires_reshape_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
if(!secondob) {
- BKE_report(op->reports, RPT_ERROR, "Second selected mesh object require to copy shape from.");
+ BKE_report(op->reports, RPT_ERROR, "Second selected mesh object require to copy shape from");
return OPERATOR_CANCELLED;
}
if(!multiresModifier_reshape(scene, mmd, ob, secondob)) {
- BKE_report(op->reports, RPT_ERROR, "Objects do not have the same number of vertices.");
+ BKE_report(op->reports, RPT_ERROR, "Objects do not have the same number of vertices");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/object/object_navmesh.cpp b/source/blender/editors/object/object_navmesh.cpp
new file mode 100644
index 00000000000..ae97b40eb49
--- /dev/null
+++ b/source/blender/editors/object/object_navmesh.cpp
@@ -0,0 +1,628 @@
+/**
+* $Id$
+*
+* ***** 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) 2004 by Blender Foundation
+* All rights reserved.
+*
+* The Original Code is: all of this file.
+*
+* Contributor(s): none yet.
+*
+* ***** END GPL LICENSE BLOCK *****
+*/
+
+#include <math.h>
+#include "Recast.h"
+
+extern "C"
+{
+#include "MEM_guardedalloc.h"
+
+#include "DNA_scene_types.h"
+#include "DNA_object_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_ID.h"
+
+#include "BKE_library.h"
+#include "BKE_depsgraph.h"
+#include "BKE_context.h"
+#include "BKE_mesh.h"
+#include "BKE_modifier.h"
+#include "BKE_scene.h"
+#include "BKE_DerivedMesh.h"
+#include "BKE_cdderivedmesh.h"
+#include "BLI_editVert.h"
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+#include "ED_object.h"
+#include "BLI_math_vector.h"
+
+#include "RNA_access.h"
+
+#include "ED_mesh.h"
+
+/*mesh/mesh_intern.h */
+extern struct EditVert *addvertlist(EditMesh *em, float *vec, struct EditVert *example);
+extern struct EditFace *addfacelist(EditMesh *em, struct EditVert *v1, struct EditVert *v2, struct EditVert *v3, struct EditVert *v4, struct EditFace *example, struct EditFace *exampleEdges);
+extern void free_vertlist(EditMesh *em, ListBase *edve);
+extern void free_edgelist(EditMesh *em, ListBase *lb);
+extern void free_facelist(EditMesh *em, ListBase *lb);
+
+#include "WM_api.h"
+#include "WM_types.h"
+
+static void createVertsTrisData(bContext *C, LinkNode* obs, int& nverts, float*& verts, int &ntris, int*& tris)
+{
+ MVert *mvert;
+ int nfaces = 0, *tri, i, curnverts, basenverts, curnfaces;
+ MFace *mface;
+ float co[3], wco[3];
+ Object *ob;
+ LinkNode *oblink, *dmlink;
+ DerivedMesh *dm;
+ Scene* scene = CTX_data_scene(C);
+ LinkNode* dms = NULL;
+
+ nverts = 0;
+ ntris = 0;
+ //calculate number of verts and tris
+ for (oblink = obs; oblink; oblink = oblink->next)
+ {
+ ob = (Object*) oblink->link;
+ DerivedMesh *dm = mesh_create_derived_no_virtual(scene, ob, NULL, CD_MASK_MESH);
+ BLI_linklist_append(&dms, (void*)dm);
+
+ nverts += dm->getNumVerts(dm);
+ nfaces = dm->getNumFaces(dm);
+ ntris += nfaces;
+
+ //resolve quad faces
+ mface = dm->getFaceArray(dm);
+ for (i=0; i<nfaces; i++)
+ {
+ MFace* mf = &mface[i];
+ if (mf->v4)
+ ntris+=1;
+ }
+ }
+
+ //create data
+ verts = (float*) MEM_mallocN(sizeof(float)*3*nverts, "verts");
+ tris = (int*) MEM_mallocN(sizeof(int)*3*ntris, "faces");
+
+ basenverts = 0;
+ tri = tris;
+ for (oblink = obs, dmlink = dms; oblink && dmlink;
+ oblink = oblink->next, dmlink = dmlink->next)
+ {
+ ob = (Object*) oblink->link;
+ dm = (DerivedMesh*) dmlink->link;
+
+ curnverts = dm->getNumVerts(dm);
+ mvert = dm->getVertArray(dm);
+ //copy verts
+ for (i=0; i<curnverts; i++)
+ {
+ MVert *v = &mvert[i];
+ copy_v3_v3(co, v->co);
+ mul_v3_m4v3(wco, ob->obmat, co);
+ verts[3*(basenverts+i)+0] = wco[0];
+ verts[3*(basenverts+i)+1] = wco[2];
+ verts[3*(basenverts+i)+2] = wco[1];
+ }
+
+ //create tris
+ curnfaces = dm->getNumFaces(dm);
+ mface = dm->getFaceArray(dm);
+ for (i=0; i<curnfaces; i++)
+ {
+ MFace* mf = &mface[i];
+ tri[0]= basenverts + mf->v1; tri[1]= basenverts + mf->v3; tri[2]= basenverts + mf->v2;
+ tri += 3;
+ if (mf->v4)
+ {
+ tri[0]= basenverts + mf->v1; tri[1]= basenverts + mf->v4; tri[2]= basenverts + mf->v3;
+ tri += 3;
+ }
+ }
+ basenverts += curnverts;
+ }
+
+ //release derived mesh
+ for (dmlink = dms; dmlink; dmlink = dmlink->next)
+ {
+ dm = (DerivedMesh*) dmlink->link;
+ dm->release(dm);
+ }
+ BLI_linklist_free(dms, NULL);
+}
+
+static bool buildNavMesh(const RecastData& recastParams, int nverts, float* verts, int ntris, int* tris,
+ rcPolyMesh*& pmesh, rcPolyMeshDetail*& dmesh)
+{
+ float bmin[3], bmax[3];
+ rcHeightfield* solid;
+ unsigned char *triflags;
+ rcCompactHeightfield* chf;
+ rcContourSet *cset;
+
+ rcCalcBounds(verts, nverts, bmin, bmax);
+
+ //
+ // Step 1. Initialize build config.
+ //
+ rcConfig cfg;
+ memset(&cfg, 0, sizeof(cfg));
+ {
+/*
+ float cellsize = 0.3f;
+ float cellheight = 0.2f;
+ float agentmaxslope = M_PI/4;
+ float agentmaxclimb = 0.9f;
+ float agentheight = 2.0f;
+ float agentradius = 0.6f;
+ float edgemaxlen = 12.0f;
+ float edgemaxerror = 1.3f;
+ float regionminsize = 50.f;
+ float regionmergesize = 20.f;
+ int vertsperpoly = 6;
+ float detailsampledist = 6.0f;
+ float detailsamplemaxerror = 1.0f;
+ cfg.cs = cellsize;
+ cfg.ch = cellheight;
+ cfg.walkableSlopeAngle = agentmaxslope/M_PI*180.f;
+ cfg.walkableHeight = (int)ceilf(agentheight/ cfg.ch);
+ cfg.walkableClimb = (int)floorf(agentmaxclimb / cfg.ch);
+ cfg.walkableRadius = (int)ceilf(agentradius / cfg.cs);
+ cfg.maxEdgeLen = (int)(edgemaxlen/cellsize);
+ cfg.maxSimplificationError = edgemaxerror;
+ cfg.minRegionSize = (int)rcSqr(regionminsize);
+ cfg.mergeRegionSize = (int)rcSqr(regionmergesize);
+ cfg.maxVertsPerPoly = vertsperpoly;
+ cfg.detailSampleDist = detailsampledist< 0.9f ? 0 : cellsize * detailsampledist;
+ cfg.detailSampleMaxError = cellheight * detailsamplemaxerror;
+*/
+ cfg.cs = recastParams.cellsize;
+ cfg.ch = recastParams.cellheight;
+ cfg.walkableSlopeAngle = recastParams.agentmaxslope/((float)M_PI)*180.f;
+ cfg.walkableHeight = (int)ceilf(recastParams.agentheight/ cfg.ch);
+ cfg.walkableClimb = (int)floorf(recastParams.agentmaxclimb / cfg.ch);
+ cfg.walkableRadius = (int)ceilf(recastParams.agentradius / cfg.cs);
+ cfg.maxEdgeLen = (int)(recastParams.edgemaxlen/recastParams.cellsize);
+ cfg.maxSimplificationError = recastParams.edgemaxerror;
+ cfg.minRegionSize = (int)rcSqr(recastParams.regionminsize);
+ cfg.mergeRegionSize = (int)rcSqr(recastParams.regionmergesize);
+ cfg.maxVertsPerPoly = recastParams.vertsperpoly;
+ cfg.detailSampleDist = recastParams.detailsampledist< 0.9f ? 0 :
+ recastParams.cellsize * recastParams.detailsampledist;
+ cfg.detailSampleMaxError = recastParams.cellheight * recastParams.detailsamplemaxerror;
+
+ }
+
+ // Set the area where the navigation will be build.
+ vcopy(cfg.bmin, bmin);
+ vcopy(cfg.bmax, bmax);
+ rcCalcGridSize(cfg.bmin, cfg.bmax, cfg.cs, &cfg.width, &cfg.height);
+
+ //
+ // Step 2. Rasterize input polygon soup.
+ //
+ // Allocate voxel heightfield where we rasterize our input data to.
+ solid = new rcHeightfield;
+ if (!solid)
+ return false;
+
+ if (!rcCreateHeightfield(*solid, cfg.width, cfg.height, cfg.bmin, cfg.bmax, cfg.cs, cfg.ch))
+ return false;
+
+ // Allocate array that can hold triangle flags.
+ triflags = (unsigned char*) MEM_mallocN(sizeof(unsigned char)*ntris, "triflags");
+ if (!triflags)
+ return false;
+ // Find triangles which are walkable based on their slope and rasterize them.
+ memset(triflags, 0, ntris*sizeof(unsigned char));
+ rcMarkWalkableTriangles(cfg.walkableSlopeAngle, verts, nverts, tris, ntris, triflags);
+ rcRasterizeTriangles(verts, nverts, tris, triflags, ntris, *solid);
+ MEM_freeN(triflags);
+ MEM_freeN(verts);
+ MEM_freeN(tris);
+
+ //
+ // Step 3. Filter walkables surfaces.
+ //
+ rcFilterLedgeSpans(cfg.walkableHeight, cfg.walkableClimb, *solid);
+ rcFilterWalkableLowHeightSpans(cfg.walkableHeight, *solid);
+
+ //
+ // Step 4. Partition walkable surface to simple regions.
+ //
+
+ chf = new rcCompactHeightfield;
+ if (!chf)
+ return false;
+ if (!rcBuildCompactHeightfield(cfg.walkableHeight, cfg.walkableClimb, RC_WALKABLE, *solid, *chf))
+ return false;
+
+ delete solid;
+
+ // Prepare for region partitioning, by calculating distance field along the walkable surface.
+ if (!rcBuildDistanceField(*chf))
+ return false;
+
+ // Partition the walkable surface into simple regions without holes.
+ if (!rcBuildRegions(*chf, cfg.walkableRadius, cfg.borderSize, cfg.minRegionSize, cfg.mergeRegionSize))
+ return false;
+
+ //
+ // Step 5. Trace and simplify region contours.
+ //
+ // Create contours.
+ cset = new rcContourSet;
+ if (!cset)
+ return false;
+
+ if (!rcBuildContours(*chf, cfg.maxSimplificationError, cfg.maxEdgeLen, *cset))
+ return false;
+
+ //
+ // Step 6. Build polygons mesh from contours.
+ //
+ pmesh = new rcPolyMesh;
+ if (!pmesh)
+ return false;
+ if (!rcBuildPolyMesh(*cset, cfg.maxVertsPerPoly, *pmesh))
+ return false;
+
+
+ //
+ // Step 7. Create detail mesh which allows to access approximate height on each polygon.
+ //
+
+ dmesh = new rcPolyMeshDetail;
+ if (!dmesh)
+ return false;
+
+ if (!rcBuildPolyMeshDetail(*pmesh, *chf, cfg.detailSampleDist, cfg.detailSampleMaxError, *dmesh))
+ return false;
+
+ delete chf;
+ delete cset;
+
+ return true;
+}
+
+static Object* createRepresentation(bContext *C, rcPolyMesh*& pmesh, rcPolyMeshDetail*& dmesh, Base* base)
+{
+ float co[3], rot[3];
+ EditMesh *em;
+ int i,j, k;
+ unsigned short* v;
+ int face[3];
+ Main *bmain = CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
+ Object* obedit;
+ int createob = base==NULL;
+ zero_v3(co);
+ zero_v3(rot);
+ if (createob)
+ {
+ //create new object
+ obedit = ED_object_add_type(C, OB_MESH, co, rot, FALSE, 1);
+ }
+ else
+ {
+ obedit = base->object;
+ scene_select_base(scene, base);
+ copy_v3_v3(obedit->loc, co);
+ copy_v3_v3(obedit->rot, rot);
+ }
+
+ ED_object_enter_editmode(C, EM_DO_UNDO|EM_IGNORE_LAYER);
+ em = BKE_mesh_get_editmesh(((Mesh *)obedit->data));
+
+ if (!createob)
+ {
+ //clear
+ if(em->verts.first) free_vertlist(em, &em->verts);
+ if(em->edges.first) free_edgelist(em, &em->edges);
+ if(em->faces.first) free_facelist(em, &em->faces);
+ if(em->selected.first) BLI_freelistN(&(em->selected));
+ }
+
+ //create verts for polygon mesh
+ for(i = 0; i < pmesh->nverts; i++) {
+ v = &pmesh->verts[3*i];
+ co[0] = pmesh->bmin[0] + v[0]*pmesh->cs;
+ co[1] = pmesh->bmin[1] + v[1]*pmesh->ch;
+ co[2] = pmesh->bmin[2] + v[2]*pmesh->cs;
+ SWAP(float, co[1], co[2]);
+ addvertlist(em, co, NULL);
+ }
+
+ //create custom data layer to save polygon idx
+ CustomData_add_layer_named(&em->fdata, CD_RECAST, CD_CALLOC, NULL, 0, "recastData");
+
+ //create verts and faces for detailed mesh
+ for (i=0; i<dmesh->nmeshes; i++)
+ {
+ int uniquevbase = em->totvert;
+ unsigned short vbase = dmesh->meshes[4*i+0];
+ unsigned short ndv = dmesh->meshes[4*i+1];
+ unsigned short tribase = dmesh->meshes[4*i+2];
+ unsigned short trinum = dmesh->meshes[4*i+3];
+ const unsigned short* p = &pmesh->polys[i*pmesh->nvp*2];
+ int nv = 0;
+ for (j = 0; j < pmesh->nvp; ++j)
+ {
+ if (p[j] == 0xffff) break;
+ nv++;
+ }
+ //create unique verts
+ for (j=nv; j<ndv; j++)
+ {
+ copy_v3_v3(co, &dmesh->verts[3*(vbase + j)]);
+ SWAP(float, co[1], co[2]);
+ addvertlist(em, co, NULL);
+ }
+
+ EM_init_index_arrays(em, 1, 0, 0);
+
+ //create faces
+ for (j=0; j<trinum; j++)
+ {
+ unsigned char* tri = &dmesh->tris[4*(tribase+j)];
+ EditFace* newFace;
+ for (k=0; k<3; k++)
+ {
+ if (tri[k]<nv)
+ face[k] = p[tri[k]]; //shared vertex
+ else
+ face[k] = uniquevbase+tri[k]-nv; //unique vertex
+ }
+ newFace = addfacelist(em, EM_get_vert_for_index(face[0]), EM_get_vert_for_index(face[2]),
+ EM_get_vert_for_index(face[1]), NULL, NULL, NULL);
+
+ //set navigation polygon idx to the custom layer
+ int* polygonIdx = (int*)CustomData_em_get(&em->fdata, newFace->data, CD_RECAST);
+ *polygonIdx = i+1; //add 1 to avoid zero idx
+ }
+
+ EM_free_index_arrays();
+ }
+
+ delete pmesh; pmesh = NULL;
+ delete dmesh; dmesh = NULL;
+
+ BKE_mesh_end_editmesh((Mesh*)obedit->data, em);
+
+ DAG_id_tag_update((ID*)obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+
+
+ ED_object_exit_editmode(C, EM_FREEDATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, obedit);
+
+ if (createob)
+ {
+ obedit->gameflag &= ~OB_COLLISION;
+ obedit->gameflag |= OB_NAVMESH;
+ obedit->body_type = OB_BODY_TYPE_NAVMESH;
+ rename_id((ID *)obedit, "Navmesh");
+ }
+
+ ModifierData *md= modifiers_findByType(obedit, eModifierType_NavMesh);
+ if (!md)
+ {
+ ED_object_modifier_add(NULL, bmain, scene, obedit, NULL, eModifierType_NavMesh);
+ }
+
+ return obedit;
+}
+
+static int create_navmesh_exec(bContext *C, wmOperator *op)
+{
+ Scene* scene = CTX_data_scene(C);
+ int nverts, ntris;
+ float* verts;
+ int* tris;
+ rcPolyMesh* pmesh;
+ rcPolyMeshDetail* dmesh;
+ LinkNode* obs = NULL;
+ Base* navmeshBase = NULL;
+ //CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) //expand macros to avoid error in convertion from void*
+ {
+ ListBase ctx_data_list;
+ CollectionPointerLink *ctx_link;
+ CTX_data_selected_editable_bases(C, &ctx_data_list);
+ for(ctx_link = (CollectionPointerLink *)ctx_data_list.first;
+ ctx_link; ctx_link = (CollectionPointerLink *)ctx_link->next) {
+ Base* base= (Base*)ctx_link->ptr.data;
+ {
+ if (base->object->body_type==OB_BODY_TYPE_NAVMESH)
+ {
+ if (!navmeshBase || base==CTX_data_active_base(C))
+ navmeshBase = base;
+ }
+ else
+ BLI_linklist_append(&obs, (void*)base->object);
+ }
+ CTX_DATA_END;
+ createVertsTrisData(C, obs, nverts, verts, ntris, tris);
+ BLI_linklist_free(obs, NULL);
+ buildNavMesh(scene->gm.recastData, nverts, verts, ntris, tris, pmesh, dmesh);
+ createRepresentation(C, pmesh, dmesh, navmeshBase);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_create_navmesh(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Create navigation mesh";
+ ot->description= "Create navigation mesh for selected objects";
+ ot->idname= "OBJECT_OT_create_navmesh";
+
+ /* api callbacks */
+ ot->exec= create_navmesh_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int assign_navpolygon_poll(bContext *C)
+{
+ Object *ob= (Object *)CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
+ if (!ob || !ob->data)
+ return 0;
+ return (((Mesh*)ob->data)->edit_mesh != NULL);
+}
+
+static int assign_navpolygon_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
+
+ //do work here
+ int targetPolyIdx = -1;
+ EditFace *ef, *efa;
+ efa = EM_get_actFace(em, 0);
+ if (efa)
+ {
+ if (CustomData_has_layer(&em->fdata, CD_RECAST))
+ {
+ targetPolyIdx = *(int*)CustomData_em_get(&em->fdata, efa->data, CD_RECAST);
+ targetPolyIdx = targetPolyIdx>=0? targetPolyIdx : -targetPolyIdx;
+ if (targetPolyIdx>0)
+ {
+ //set target poly idx to other selected faces
+ ef = (EditFace*)em->faces.last;
+ while(ef)
+ {
+ if((ef->f & SELECT )&& ef!=efa)
+ {
+ int* recastDataBlock = (int*)CustomData_em_get(&em->fdata, ef->data, CD_RECAST);
+ *recastDataBlock = targetPolyIdx;
+ }
+ ef = ef->prev;
+ }
+ }
+ }
+ }
+
+ DAG_id_tag_update((ID*)obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+
+ BKE_mesh_end_editmesh((Mesh*)obedit->data, em);
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_assign_navpolygon(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Assign polygon index";
+ ot->description= "Assign polygon index to face by active face";
+ ot->idname= "OBJECT_OT_assign_navpolygon";
+
+ /* api callbacks */
+ ot->poll = assign_navpolygon_poll;
+ ot->exec= assign_navpolygon_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
+static int compare(const void * a, const void * b){
+ return ( *(int*)a - *(int*)b );
+}
+static int findFreeNavPolyIndex(EditMesh* em)
+{
+ //construct vector of indices
+ int numfaces = em->totface;
+ int* indices = new int[numfaces];
+ EditFace* ef = (EditFace*)em->faces.last;
+ int idx = 0;
+ while(ef)
+ {
+ int polyIdx = *(int*)CustomData_em_get(&em->fdata, ef->data, CD_RECAST);
+ indices[idx] = polyIdx;
+ idx++;
+ ef = ef->prev;
+ }
+ qsort(indices, numfaces, sizeof(int), compare);
+ //search first free index
+ int freeIdx = 1;
+ for (int i=0; i<numfaces; i++)
+ {
+ if (indices[i]==freeIdx)
+ freeIdx++;
+ else if (indices[i]>freeIdx)
+ break;
+ }
+ delete [] indices;
+ return freeIdx;
+}
+
+static int assign_new_navpolygon_exec(bContext *C, wmOperator *op)
+{
+ Object *obedit= CTX_data_edit_object(C);
+ EditMesh *em= BKE_mesh_get_editmesh((Mesh *)obedit->data);
+
+ EditFace *ef;
+ if (CustomData_has_layer(&em->fdata, CD_RECAST))
+ {
+ int targetPolyIdx = findFreeNavPolyIndex(em);
+ if (targetPolyIdx>0)
+ {
+ //set target poly idx to selected faces
+ ef = (EditFace*)em->faces.last;
+ while(ef)
+ {
+ if(ef->f & SELECT )
+ {
+ int* recastDataBlock = (int*)CustomData_em_get(&em->fdata, ef->data, CD_RECAST);
+ *recastDataBlock = targetPolyIdx;
+ }
+ ef = ef->prev;
+ }
+ }
+ }
+
+ DAG_id_tag_update((ID*)obedit->data, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
+
+ BKE_mesh_end_editmesh((Mesh*)obedit->data, em);
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_assign_new_navpolygon(struct wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Assign new polygon index";
+ ot->description= "Assign new polygon index to face";
+ ot->idname= "OBJECT_OT_assign_new_navpolygon";
+
+ /* api callbacks */
+ ot->poll = assign_navpolygon_poll;
+ ot->exec= assign_new_navpolygon_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+}
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 8f00f923b84..452d1aded51 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -174,6 +174,8 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_vertex_group_copy);
WM_operatortype_append(OBJECT_OT_vertex_group_normalize);
WM_operatortype_append(OBJECT_OT_vertex_group_normalize_all);
+ WM_operatortype_append(OBJECT_OT_vertex_group_lock);
+ WM_operatortype_append(OBJECT_OT_vertex_group_fix);
WM_operatortype_append(OBJECT_OT_vertex_group_invert);
WM_operatortype_append(OBJECT_OT_vertex_group_levels);
WM_operatortype_append(OBJECT_OT_vertex_group_blend);
@@ -212,8 +214,15 @@ void ED_operatortypes_object(void)
WM_operatortype_append(OBJECT_OT_bake_image);
WM_operatortype_append(OBJECT_OT_drop_named_material);
+
+#ifdef WITH_GAMEENGINE
+ WM_operatortype_append(OBJECT_OT_create_navmesh);
+ WM_operatortype_append(OBJECT_OT_assign_navpolygon);
+ WM_operatortype_append(OBJECT_OT_assign_new_navpolygon);
+#endif
}
+
void ED_operatormacros_object(void)
{
wmOperatorType *ot;
@@ -238,7 +247,7 @@ 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);
if(ot) {
- RNA_def_string(ot->srna, "name", "Cube", 24, "Name", "Object name to add.");
+ RNA_def_string(ot->srna, "name", "Cube", 24, "Name", "Object name to add");
WM_operatortype_macro_define(ot, "VIEW3D_OT_cursor3d");
WM_operatortype_macro_define(ot, "OBJECT_OT_add_named");
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index e9418ca9f9f..ec5aa19d3c0 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -95,6 +95,7 @@
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_view3d.h"
+#include "ED_mesh.h"
#include "object_intern.h"
@@ -122,7 +123,12 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
if(obedit->type==OB_MESH) {
Mesh *me= obedit->data;
- EditMesh *em = BKE_mesh_get_editmesh(me);
+ EditMesh *em;
+
+ load_editMesh(scene, obedit);
+ make_editMesh(scene, obedit);
+
+ em = BKE_mesh_get_editmesh(me);
eve= em->verts.first;
while(eve) {
@@ -140,7 +146,7 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
BKE_mesh_end_editmesh(me, em);
}
else if(ELEM(obedit->type, OB_SURF, OB_CURVE)) {
- ListBase *editnurb= curve_get_editcurve(obedit);
+ ListBase *editnurb= object_editcurve_get(obedit);
cu= obedit->data;
@@ -404,7 +410,7 @@ void OBJECT_OT_proxy_make (wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_string(ot->srna, "object", "", MAX_ID_NAME-2, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for.");
+ RNA_def_string(ot->srna, "object", "", MAX_ID_NAME-2, "Proxy Object", "Name of lib-linked/grouped object to make a proxy for");
prop= RNA_def_enum(ot->srna, "type", DummyRNA_DEFAULT_items, 0, "Type", "Group object"); /* XXX, relies on hard coded ID at the moment */
RNA_def_enum_funcs(prop, proxy_group_object_itemf);
ot->prop= prop;
@@ -1921,5 +1927,5 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot)
ot->flag= OPTYPE_UNDO;
/* properties */
- RNA_def_string(ot->srna, "name", "Material", 24, "Name", "Material name to assign.");
+ RNA_def_string(ot->srna, "name", "Material", 24, "Name", "Material name to assign");
}
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index cb1fc7541d0..a4c45e033b3 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -121,6 +121,20 @@ void ED_base_object_activate(bContext *C, Base *base)
/********************** Selection Operators **********************/
+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);
+
+ if(CTX_data_edit_object(C))
+ return 0;
+ if(obact && obact->mode)
+ return 0;
+
+ return 1;
+}
+
/************************ Select by Type *************************/
static int object_select_by_type_exec(bContext *C, wmOperator *op)
@@ -159,13 +173,13 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot)
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= object_select_by_type_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
ot->prop= RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", "");
}
@@ -341,13 +355,13 @@ void OBJECT_OT_select_linked(wmOperatorType *ot)
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= object_select_linked_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
ot->prop= RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", "");
}
@@ -667,13 +681,13 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot)
/* api callbacks */
ot->invoke= WM_menu_invoke;
ot->exec= object_select_grouped_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
}
@@ -716,13 +730,13 @@ void OBJECT_OT_select_by_layer(wmOperatorType *ot)
/* api callbacks */
/*ot->invoke = XXX - need a int grid popup*/
ot->exec= object_select_by_layer_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend", "Extend selection instead of deselecting everything first");
RNA_def_int(ot->srna, "layers", 1, 1, 20, "Layer", "", 1, 20);
}
@@ -754,7 +768,7 @@ void OBJECT_OT_select_inverse(wmOperatorType *ot)
/* api callbacks */
ot->exec= object_select_inverse_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -815,7 +829,7 @@ void OBJECT_OT_select_all(wmOperatorType *ot)
/* api callbacks */
ot->exec= object_select_all_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -864,12 +878,12 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
/* api callbacks */
ot->exec= object_select_same_group_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_string(ot->srna, "group", "", 32, "Group", "Name of the group to select.");
+ RNA_def_string(ot->srna, "group", "", 32, "Group", "Name of the group to select");
}
/**************************** Select Mirror ****************************/
@@ -917,12 +931,12 @@ void OBJECT_OT_select_mirror(wmOperatorType *ot)
/* api callbacks */
ot->exec= object_select_mirror_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
}
@@ -974,13 +988,13 @@ void OBJECT_OT_select_name(wmOperatorType *ot)
/* api callbacks */
ot->exec= object_select_name_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_string(ot->srna, "name", "", 0, "Name", "Object name to select.");
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first.");
+ RNA_def_string(ot->srna, "name", "", 0, "Name", "Object name to select");
+ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
}
/**************************** Select Random ****************************/
@@ -1022,14 +1036,14 @@ void OBJECT_OT_select_random(wmOperatorType *ot)
/* api callbacks */
/*ot->invoke= object_select_random_invoke XXX - need a number popup ;*/
ot->exec = object_select_random_exec;
- ot->poll= ED_operator_objectmode;
+ ot->poll= objects_selectable_poll;
/* flags */
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);
- RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first.");
+ RNA_def_boolean(ot->srna, "extend", FALSE, "Extend Selection", "Extend selection instead of deselecting everything first");
}
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index fd2e7fd7c99..962aac06474 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -309,7 +309,7 @@ void OBJECT_OT_shape_key_add(wmOperatorType *ot)
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.");
+ RNA_def_boolean(ot->srna, "from_mix", 1, "From Mix", "Create the new shape key from the existing mix of keys");
}
static int shape_key_remove_exec(bContext *C, wmOperator *UNUSED(op))
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 78f3537bea9..4c29490b0f0 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -399,13 +399,13 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
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.");
+ BKE_report(reports, RPT_ERROR, "Can't apply to a multi user mesh, doing nothing");
return OPERATOR_CANCELLED;
}
}
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.");
+ BKE_report(reports, RPT_ERROR, "Can't apply to a multi user armature, doing nothing");
return OPERATOR_CANCELLED;
}
}
@@ -413,18 +413,18 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
Curve *cu;
if(ID_REAL_USERS(ob->data) > 1) {
- BKE_report(reports, RPT_ERROR, "Can't apply to a multi user curve, doing nothing.");
+ BKE_report(reports, RPT_ERROR, "Can't apply to a multi user curve, doing nothing");
return OPERATOR_CANCELLED;
}
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.");
+ BKE_report(reports, RPT_ERROR, "Neither rotation nor location could be applied to a 2d curve, doing nothing");
return OPERATOR_CANCELLED;
}
if(cu->key) {
- BKE_report(reports, RPT_ERROR, "Can't apply to a curve with vertex keys, doing nothing.");
+ BKE_report(reports, RPT_ERROR, "Can't apply to a curve with vertex keys, doing nothing");
return OPERATOR_CANCELLED;
}
}
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 52ba9460818..797cf428969 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -49,6 +49,7 @@
#include "DNA_scene_types.h"
#include "DNA_particle_types.h"
+#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
@@ -60,6 +61,7 @@
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_report.h"
+#include "BKE_DerivedMesh.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -701,6 +703,10 @@ static void vgroup_normalize(Object *ob)
MDeformWeight *dw;
MDeformVert *dvert, **dvert_array=NULL;
int i, def_nr, dvert_tot=0;
+
+ Mesh *me = ob->data;
+ MVert *mvert = me->mvert;
+ const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot);
@@ -712,6 +718,11 @@ static void vgroup_normalize(Object *ob)
def_nr= ob->actdef-1;
for(i = 0; i < dvert_tot; i++) {
+
+ if(use_vert_sel && !(mvert[i].flag & SELECT)) {
+ continue;
+ }
+
dvert = dvert_array[i];
dw = defvert_find_index(dvert, def_nr);
if(dw) {
@@ -721,6 +732,11 @@ static void vgroup_normalize(Object *ob)
if(weight_max > 0.0f) {
for(i = 0; i < dvert_tot; i++) {
+
+ if(use_vert_sel && !(mvert[i].flag & SELECT)) {
+ continue;
+ }
+
dvert = dvert_array[i];
dw = defvert_find_index(dvert, def_nr);
if(dw) {
@@ -736,6 +752,401 @@ static void vgroup_normalize(Object *ob)
if (dvert_array) MEM_freeN(dvert_array);
}
+/* This adds the indices of vertices to a list if they are not already present
+It returns the number that it added (0-2)
+It relies on verts having -1 for unassigned indices
+*/
+static int tryToAddVerts(int *verts, int length, int a, int b) {
+ char containsA = FALSE;
+ char containsB = FALSE;
+ int added = 0;
+ int i;
+ for(i = 0; i < length && (!containsA || !containsB); i++) {
+ if(verts[i] == a) {
+ containsA = TRUE;
+ } else if(verts[i] == b) {
+ containsB = TRUE;
+ } else if(verts[i] == -1) {
+ if(!containsA) {
+ verts[i] = a;
+ containsA = TRUE;
+ added++;
+ } else if(!containsB){
+ verts[i] = b;
+ containsB = TRUE;
+ added++;
+ }
+ }
+ }
+ return added;
+}
+
+/* This finds all of the vertices connected to vert by an edge
+and returns an 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) {
+ int length = 0;
+ int *tverts;
+ int *verts = NULL;
+ MFace *mf = me->mface;
+ int totface = me->totface;
+ int found = 0;
+ int i;
+ for(i = 0; i < totface; i++, mf++) {
+ if(vert == mf->v1 || vert == mf->v2 || vert == mf->v3 || (mf->v4 &&vert == mf->v4)) {
+ length+=2;
+ }
+ }
+ if(!length) {
+ return 0;
+ }
+ tverts = MEM_mallocN(sizeof(int)*length, "tempSurroundingVerts");
+ mf = me->mface;
+ for(i = 0; i < length; i++) {
+ tverts[i] = -1;
+ }
+ for(i = 0; i < totface; i++, mf++) {
+ int a=-1, b=-1;
+ if(mf->v1 == vert) {
+ a = mf->v2;
+ if(mf->v4) {
+ b = mf->v4;
+ } else {
+ b = mf->v3;
+ }
+ } else if(mf->v2 == vert) {
+ a = mf->v1;
+ b = mf->v3;
+ } else if(mf->v3 == vert) {
+ a = mf->v2;
+ if(mf->v4) {
+ b = mf->v4;
+ } else {
+ b = mf->v1;
+ }
+ } else if (mf->v4 && mf->v4 == vert){
+ a = mf->v1;
+ b = mf->v3;
+ } else {
+ continue;
+ }
+ found += tryToAddVerts(tverts, length, a, b);
+ }
+ if(found) {
+ verts = MEM_mallocN(sizeof(int)* found, "surroundingVerts");
+ for(i = 0; i < found; i++) {
+ verts[i] = tverts[i];
+ }
+ *count = found;
+ }
+ MEM_freeN(tverts);
+ return verts;
+}
+
+/* get a single point in space by averaging a point cloud (vectors of size 3)
+coord is the place the average is stored, points is the point cloud, count is the number of points in the cloud
+*/
+static void getSingleCoordinate(MVert *points, int count, float coord[3]) {
+ int i;
+ zero_v3(coord);
+ for(i = 0; i < count; i++) {
+ add_v3_v3(coord, points[i].co);
+ }
+ mul_v3_fl(coord, 1.0f/count);
+}
+
+/* find the closest point on a plane to another point and store it in dst */
+/* coord is a point on the plane */
+/* point is the point that you want the nearest of */
+/* norm is the plane's normal, and d is the last number in the plane equation 0 = ax + by + cz + d */
+static void getNearestPointOnPlane(const float norm[3], const float coord[3], const float point[3], float dst_r[3])
+{
+ float temp[3];
+ float dotprod;
+
+ sub_v3_v3v3(temp, point, coord);
+ dotprod= dot_v3v3(temp, norm);
+
+ dst_r[0] = point[0] - (norm[0] * dotprod);
+ dst_r[1] = point[1] - (norm[1] * dotprod);
+ dst_r[2] = point[2] - (norm[2] * dotprod);
+}
+
+/* distance of two vectors a and b of size length */
+static float distance(float* a, float *b, int length) {
+ int i;
+ float sum = 0;
+ for(i = 0; i < length; i++) {
+ sum += (b[i]-a[i])*(b[i]-a[i]);
+ }
+ return sqrt(sum);
+}
+
+/* given a plane and a start and end position,
+compute the amount of vertical distance relative to the plane and store it in dists,
+then get the horizontal and vertical change and store them in changes
+*/
+static void getVerticalAndHorizontalChange(float *norm, float d, float *coord, float *start, float distToStart, float *end, float (*changes)[2], float *dists, int index) {
+ // A=Q-((Q-P).N)N
+ // D = (a*x0 + b*y0 +c*z0 +d)
+ float projA[3] = {0}, projB[3] = {0};
+
+ getNearestPointOnPlane(norm, coord, start, projA);
+ getNearestPointOnPlane(norm, coord, end, projB);
+ // (vertical and horizontal refer to the plane's y and xz respectively)
+ // vertical distance
+ dists[index] = norm[0]*end[0] + norm[1]*end[1] + norm[2]*end[2] + d;
+ // vertical change
+ changes[index][0] = dists[index] - distToStart;
+ //printf("vc %f %f\n", distance(end, projB, 3)-distance(start, projA, 3), changes[index][0]);
+ // horizontal change
+ changes[index][1] = distance(projA, projB, 3);
+}
+
+// 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) {
+ ob->derivedDeform->needsFree = 1;
+ ob->derivedDeform->release(ob->derivedDeform);
+ ob->derivedDeform = NULL;
+ }
+ else if(dm) {
+ dm->needsFree = 1;
+ dm->release(dm);
+ }
+}
+
+// recalculate the deformation
+static DerivedMesh* dm_deform_recalc(Scene *scene, Object *ob) {
+ return mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
+}
+
+/* by changing nonzero weights, try to move a vertex in me->mverts with index 'index' to distToBe distance away from the provided plane
+strength can change distToBe so that it moves towards distToBe by that percentage
+cp changes how much the weights are adjusted to check the distance
+
+index is the index of the vertex being moved
+norm and d are the plane's properties for the equation: ax + by + cz + d = 0
+coord is a point on the plane
+*/
+static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, int index, float norm[3], float coord[3], float d, float distToBe, float strength, float cp) {
+ DerivedMesh *dm;
+ MDeformWeight *dw;
+ MVert m;
+ MDeformVert *dvert = me->dvert+index;
+ int totweight = dvert->totweight;
+ float oldw = 0;
+ float oldPos[3] = {0};
+ float vc, hc, dist;
+ int i, k;
+ float (*changes)[2] = MEM_mallocN(sizeof(float *)*totweight*2, "vertHorzChange");
+ float *dists = MEM_mallocN(sizeof(float)*totweight, "distance");
+ int *upDown = MEM_callocN(sizeof(int)*totweight, "upDownTracker");// track if up or down moved it closer for each bone
+ int *dwIndices = MEM_callocN(sizeof(int)*totweight, "dwIndexTracker");
+ float distToStart;
+ int bestIndex = 0;
+ char wasChange;
+ char wasUp;
+ int lastIndex = -1;
+ float originalDistToBe = distToBe;
+ do {
+ wasChange = FALSE;
+ dm = dm_deform_recalc(scene, ob);
+ dm->getVert(dm, index, &m);
+ oldPos[0] = m.co[0];
+ oldPos[1] = m.co[1];
+ oldPos[2] = m.co[2];
+ distToStart = norm[0]*oldPos[0] + norm[1]*oldPos[1] + norm[2]*oldPos[2] + d;
+
+ if(distToBe == originalDistToBe) {
+ distToBe += distToStart - distToStart*strength;
+ }
+ for(i = 0; i < totweight; i++) {
+ dwIndices[i] = i;
+ dw = (dvert->dw+i);
+ vc = hc = 0;
+ if(!dw->weight) {
+ changes[i][0] = 0;
+ changes[i][1] = 0;
+ dists[i] = distToStart;
+ continue;
+ }
+ for(k = 0; k < 2; k++) {
+ if(dm) {
+ dm_deform_clear(dm, ob); dm = NULL;
+ }
+ oldw = dw->weight;
+ if(k) {
+ dw->weight *= 1+cp;
+ } else {
+ dw->weight /= 1+cp;
+ }
+ if(dw->weight == oldw) {
+ changes[i][0] = 0;
+ changes[i][1] = 0;
+ dists[i] = distToStart;
+ break;
+ }
+ if(dw->weight > 1) {
+ dw->weight = 1;
+ }
+ dm = dm_deform_recalc(scene, ob);
+ dm->getVert(dm, index, &m);
+ getVerticalAndHorizontalChange(norm, d, coord, oldPos, distToStart, m.co, changes, dists, i);
+ dw->weight = oldw;
+ if(!k) {
+ vc = changes[i][0];
+ hc = changes[i][1];
+ dist = dists[i];
+ } else {
+ if(fabs(dist - distToBe) < fabs(dists[i] - distToBe)) {
+ upDown[i] = 0;
+ changes[i][0] = vc;
+ changes[i][1] = hc;
+ dists[i] = dist;
+ } else {
+ upDown[i] = 1;
+ }
+ if(fabs(dists[i] - distToBe) > fabs(distToStart - distToBe)) {
+ changes[i][0] = 0;
+ changes[i][1] = 0;
+ dists[i] = distToStart;
+ }
+ }
+ }
+ }
+ // sort the changes by the vertical change
+ for(k = 0; k < totweight; k++) {
+ float tf;
+ int ti;
+ bestIndex = k;
+ for(i = k+1; i < totweight; i++) {
+ dist = dists[i];
+
+ if(fabs(dist) > fabs(dists[i])) {
+ bestIndex = i;
+ }
+ }
+ // switch with k
+ if(bestIndex != k) {
+ ti = upDown[k];
+ upDown[k] = upDown[bestIndex];
+ upDown[bestIndex] = ti;
+
+ ti = dwIndices[k];
+ dwIndices[k] = dwIndices[bestIndex];
+ dwIndices[bestIndex] = ti;
+
+ tf = changes[k][0];
+ changes[k][0] = changes[bestIndex][0];
+ changes[bestIndex][0] = tf;
+
+ tf = changes[k][1];
+ changes[k][1] = changes[bestIndex][1];
+ changes[bestIndex][1] = tf;
+
+ tf = dists[k];
+ dists[k] = dists[bestIndex];
+ dists[bestIndex] = tf;
+ }
+ }
+ 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)) {
+ bestIndex = i;
+ break;
+ }
+ }
+ if(bestIndex != -1) {
+ wasChange = TRUE;
+ // it is a good place to stop if it tries to move the opposite direction
+ // (relative to the plane) of last time
+ if(lastIndex != -1) {
+ if(wasUp != upDown[bestIndex]) {
+ wasChange = FALSE;
+ }
+ }
+ lastIndex = bestIndex;
+ wasUp = upDown[bestIndex];
+ dw = (dvert->dw+dwIndices[bestIndex]);
+ oldw = dw->weight;
+ if(upDown[bestIndex]) {
+ dw->weight *= 1+cp;
+ } else {
+ dw->weight /= 1+cp;
+ }
+ if(dw->weight > 1) {
+ dw->weight = 1;
+ }
+ if(oldw == dw->weight) {
+ wasChange = FALSE;
+ }
+ if(dm) {
+ dm_deform_clear(dm, ob); dm = NULL;
+ }
+ }
+ }while(wasChange && (distToStart-distToBe)/fabs(distToStart-distToBe) == (dists[bestIndex]-distToBe)/fabs(dists[bestIndex]-distToBe));
+ MEM_freeN(upDown);
+ MEM_freeN(changes);
+ MEM_freeN(dists);
+ MEM_freeN(dwIndices);
+}
+
+/* this is used to try to smooth a surface by only adjusting the nonzero weights of a vertex
+but it could be used to raise or lower an existing 'bump.' */
+static void vgroup_fix(Scene *scene, Object *ob, float distToBe, float strength, float cp)
+{
+ int i;
+
+ Mesh *me = ob->data;
+ MVert *mvert = me->mvert;
+ const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
+ int *verts = NULL;
+ for(i = 0; i < me->totvert && mvert; i++, mvert++) {
+
+ if(use_vert_sel && (mvert->flag & SELECT)) {
+
+ int count=0;
+ if((verts = getSurroundingVerts(me, i, &count))) {
+ MVert m;
+ MVert *p = MEM_callocN(sizeof(MVert)*(count), "deformedPoints");
+ int k;
+
+ DerivedMesh *dm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
+ for(k = 0; k < count; k++) {
+ dm->getVert(dm, verts[k], &m);
+ p[k] = m;
+ }
+
+ if(count >= 3) {
+ float d /*, dist */ /* UNUSED */, mag;
+ float coord[3] = {0};
+ float norm[3] = {0};
+ getSingleCoordinate(p, count, coord);
+ dm->getVert(dm, i, &m);
+ norm[0] = m.co[0]-coord[0];
+ norm[1] = m.co[1]-coord[1];
+ norm[2] = m.co[2]-coord[2];
+ mag = sqrt(norm[0]*norm[0] + norm[1]*norm[1] + norm[2]*norm[2]);
+ if(mag) {// zeros fix
+ mul_v3_fl(norm, 1.0f/mag);
+
+ d = -norm[0]*coord[0] -norm[1]*coord[1] -norm[2]*coord[2];
+ /* dist = (norm[0]*m.co[0] + norm[1]*m.co[1] + norm[2]*m.co[2] + d); */ /* UNUSED */
+ moveCloserToDistanceFromPlane(scene, ob, me, i, norm, coord, d, distToBe, strength, cp);
+ }
+ }
+
+ MEM_freeN(verts);
+ MEM_freeN(p);
+ }
+ }
+ }
+}
+
static void vgroup_levels(Object *ob, float offset, float gain)
{
bDeformGroup *dg;
@@ -743,6 +1154,10 @@ static void vgroup_levels(Object *ob, float offset, float gain)
MDeformVert *dvert, **dvert_array=NULL;
int i, def_nr, dvert_tot=0;
+ Mesh *me = ob->data;
+ MVert *mvert = me->mvert;
+ const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
+
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot);
dg = BLI_findlink(&ob->defbase, (ob->actdef-1));
@@ -751,6 +1166,11 @@ static void vgroup_levels(Object *ob, float offset, float gain)
def_nr= ob->actdef-1;
for(i = 0; i < dvert_tot; i++) {
+
+ if(use_vert_sel && !(mvert[i].flag & SELECT)) {
+ continue;
+ }
+
dvert = dvert_array[i];
dw = defvert_find_index(dvert, def_nr);
if(dw) {
@@ -772,6 +1192,11 @@ static void vgroup_normalize_all(Object *ob, int lock_active)
int i, dvert_tot=0;
float tot_weight;
+
+ Mesh *me = ob->data;
+ MVert *mvert = me->mvert;
+ const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
+
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot);
if(dvert_array) {
@@ -781,6 +1206,10 @@ static void vgroup_normalize_all(Object *ob, int lock_active)
for(i = 0; i < dvert_tot; i++) {
float lock_iweight= 1.0f;
int j;
+
+ if(use_vert_sel && !(mvert[i].flag & SELECT)) {
+ continue;
+ }
tot_weight= 0.0f;
dw_act= NULL;
@@ -821,6 +1250,11 @@ static void vgroup_normalize_all(Object *ob, int lock_active)
else {
for(i = 0; i < dvert_tot; i++) {
int j;
+
+ if(use_vert_sel && !(mvert[i].flag & SELECT)) {
+ continue;
+ }
+
tot_weight= 0.0f;
dvert = dvert_array[i];
@@ -848,12 +1282,45 @@ 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) {
+ if(dg->flag & DG_LOCK_WEIGHT) {
+ action= SEL_DESELECT;
+ break;
+ }
+ }
+ }
+
+ for(dg= ob->defbase.first; dg; dg= dg->next) {
+ switch(action) {
+ case SEL_SELECT:
+ dg->flag |= DG_LOCK_WEIGHT;
+ break;
+ case SEL_DESELECT:
+ dg->flag &= ~DG_LOCK_WEIGHT;
+ break;
+ case SEL_INVERT:
+ dg->flag ^= DG_LOCK_WEIGHT;
+ break;
+ }
+ }
+}
+
static void vgroup_invert(Object *ob, int auto_assign, int auto_remove)
{
bDeformGroup *dg;
MDeformWeight *dw;
MDeformVert *dvert, **dvert_array=NULL;
int i, def_nr, dvert_tot=0;
+
+ Mesh *me = ob->data;
+ MVert *mvert = me->mvert;
+ const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot);
@@ -864,6 +1331,10 @@ static void vgroup_invert(Object *ob, int auto_assign, int auto_remove)
for(i = 0; i < dvert_tot; i++) {
+
+ if(use_vert_sel && !(mvert[i].flag & SELECT)) {
+ continue;
+ }
dvert = dvert_array[i];
if(auto_assign) {
@@ -976,6 +1447,10 @@ static void vgroup_clean(Object *ob, float eul, int keep_single)
MDeformWeight *dw;
MDeformVert *dvert, **dvert_array=NULL;
int i, def_nr, dvert_tot=0;
+
+ Mesh *me = ob->data;
+ MVert *mvert = me->mvert;
+ const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot);
@@ -985,6 +1460,10 @@ static void vgroup_clean(Object *ob, float eul, int keep_single)
def_nr= ob->actdef-1;
for(i = 0; i < dvert_tot; i++) {
+
+ if(use_vert_sel && !(mvert[i].flag & SELECT)) {
+ continue;
+ }
dvert = dvert_array[i];
dw= defvert_find_index(dvert, def_nr);
@@ -1006,12 +1485,21 @@ static void vgroup_clean_all(Object *ob, float eul, int keep_single)
MDeformWeight *dw;
MDeformVert *dvert, **dvert_array=NULL;
int i, dvert_tot=0;
+
+ Mesh *me = ob->data;
+ MVert *mvert = me->mvert;
+ const int use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
ED_vgroup_give_parray(ob->data, &dvert_array, &dvert_tot);
if(dvert_array) {
for(i = 0; i < dvert_tot; i++) {
int j;
+
+ if(use_vert_sel && !(mvert[i].flag & SELECT)) {
+ continue;
+ }
+
dvert = dvert_array[i];
j= dvert->totweight;
@@ -1591,7 +2079,7 @@ void OBJECT_OT_vertex_group_remove(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups.");
+ RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups");
}
static int vertex_group_assign_exec(bContext *C, wmOperator *op)
@@ -1623,7 +2111,7 @@ void OBJECT_OT_vertex_group_assign(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "new", 0, "New", "Assign vertex to new vertex group.");
+ RNA_def_boolean(ot->srna, "new", 0, "New", "Assign vertex to new vertex group");
}
static int vertex_group_remove_from_exec(bContext *C, wmOperator *op)
@@ -1662,7 +2150,7 @@ void OBJECT_OT_vertex_group_remove_from(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups.");
+ RNA_def_boolean(ot->srna, "all", 0, "All", "Remove from all vertex groups");
}
static int vertex_group_select_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1771,8 +2259,8 @@ void OBJECT_OT_vertex_group_levels(wmOperatorType *ot)
/* flags */
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);
+ 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);
}
static int vertex_group_normalize_exec(bContext *C, wmOperator *UNUSED(op))
@@ -1829,7 +2317,83 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
/* flags */
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.");
+ RNA_def_boolean(ot->srna, "lock_active", TRUE, "Lock Active", "Keep the values of the active group while normalizing others");
+}
+
+static int vertex_group_fix_exec(bContext *C, wmOperator *op)
+{
+ 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;
+
+ while(md) {
+ if(md->type == eModifierType_Mirror && (md->mode&eModifierMode_Realtime)) {
+ break;
+ }
+ md = md->next;
+ }
+
+ if(md && md->type == eModifierType_Mirror) {
+ BKE_report(op->reports, RPT_ERROR_INVALID_CONTEXT, "This operator does not support an active mirror modifier");
+ return OPERATOR_CANCELLED;
+ }
+ 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);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
+{
+ /* identifiers */
+ 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).";
+
+ /* api callbacks */
+ ot->poll= vertex_group_poll;
+ ot->exec= vertex_group_fix_exec;
+
+ /* flags */
+ 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);
+ RNA_def_float(ot->srna, "accuracy", 1.0f, 0.05f, FLT_MAX, "Change Sensitivity", "Changes the amount weights are altered with each iteration: lower values are slower.", 0.05f, 1.f);
+}
+
+
+static int vertex_group_lock_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_active_object(C);
+
+ int action = RNA_enum_get(op->ptr, "action");
+
+ vgroup_lock_all(ob, action);
+
+ return OPERATOR_FINISHED;
+}
+
+void OBJECT_OT_vertex_group_lock(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "Change the Lock On Vertex Groups";
+ ot->idname= "OBJECT_OT_vertex_group_lock";
+
+ /* api callbacks */
+ ot->poll= vertex_group_poll;
+ ot->exec= vertex_group_lock_exec;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ WM_operator_properties_select_all(ot);
}
static int vertex_group_invert_exec(bContext *C, wmOperator *op)
@@ -1859,8 +2423,8 @@ void OBJECT_OT_vertex_group_invert(wmOperatorType *ot)
/* flags */
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.");
- RNA_def_boolean(ot->srna, "auto_remove", TRUE, "Remove Weights", "Remove verts from groups that have zero weight after inverting.");
+ RNA_def_boolean(ot->srna, "auto_assign", TRUE, "Add Weights", "Add verts from groups that have zero weight before inverting");
+ RNA_def_boolean(ot->srna, "auto_remove", TRUE, "Remove Weights", "Remove verts from groups that have zero weight after inverting");
}
@@ -1925,9 +2489,9 @@ void OBJECT_OT_vertex_group_clean(wmOperatorType *ot)
/* flags */
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.");
- RNA_def_boolean(ot->srna, "keep_single", FALSE, "Keep Single", "Keep verts assigned to at least one group when cleaning.");
+ 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");
+ RNA_def_boolean(ot->srna, "keep_single", FALSE, "Keep Single", "Keep verts assigned to at least one group when cleaning");
}
@@ -1959,8 +2523,8 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "mirror_weights", TRUE, "Mirror Weights", "Mirror weights.");
- RNA_def_boolean(ot->srna, "flip_group_names", TRUE, "Flip Groups", "Flip vertex group names.");
+ RNA_def_boolean(ot->srna, "mirror_weights", TRUE, "Mirror Weights", "Mirror weights");
+ RNA_def_boolean(ot->srna, "flip_group_names", TRUE, "Flip Groups", "Flip vertex group names");
}
@@ -2102,7 +2666,7 @@ void OBJECT_OT_vertex_group_set_active(wmOperatorType *ot)
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;
}
@@ -2154,7 +2718,7 @@ static int vgroup_do_remap(Object *ob, char *name_array, wmOperator *op)
}
}
else {
- BKE_report(op->reports, RPT_ERROR, "Editmode lattice isnt supported yet.");
+ BKE_report(op->reports, RPT_ERROR, "Editmode lattice isnt supported yet");
MEM_freeN(sort_map_update);
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 4b0c1cb1222..74e91cf32ea 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -1526,7 +1526,7 @@ void PARTICLE_OT_select_linked(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked keys rather than selecting them.");
+ RNA_def_boolean(ot->srna, "deselect", 0, "Deselect", "Deselect linked keys rather than selecting them");
RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "", 0, 16384);
}
@@ -1713,7 +1713,7 @@ void PARTICLE_OT_hide(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
}
/*************************** reveal operator **************************/
@@ -2403,7 +2403,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
if(totremoved == 0)
return OPERATOR_CANCELLED;
- BKE_reportf(op->reports, RPT_INFO, "Remove %d double particles.", totremoved);
+ BKE_reportf(op->reports, RPT_INFO, "Remove %d double particles", totremoved);
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
@@ -2579,7 +2579,7 @@ void PARTICLE_OT_delete(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", delete_type_items, DEL_PARTICLE, "Type", "Delete a full particle or only keys.");
+ ot->prop= RNA_def_enum(ot->srna, "type", delete_type_items, DEL_PARTICLE, "Type", "Delete a full particle or only keys");
}
/*************************** mirror operator **************************/
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index bd53de20871..11796d01620 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -594,7 +594,7 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom
}
/* if there's more than one domain, cancel */
else if (fsDomain && ob != fsDomain) {
- BKE_report(reports, RPT_ERROR, "There should be only one domain object.");
+ BKE_report(reports, RPT_ERROR, "There should be only one domain object");
return 0;
}
}
@@ -612,17 +612,17 @@ static int fluid_validate_scene(ReportList *reports, Scene *scene, Object *fsDom
fsDomain = newdomain;
if (!fsDomain) {
- BKE_report(reports, RPT_ERROR, "No domain object found.");
+ BKE_report(reports, RPT_ERROR, "No domain object found");
return 0;
}
if (channelObjCount>=255) {
- BKE_report(reports, RPT_ERROR, "Cannot bake with more then 256 objects.");
+ BKE_report(reports, RPT_ERROR, "Cannot bake with more then 256 objects");
return 0;
}
if (fluidInputCount == 0) {
- BKE_report(reports, RPT_ERROR, "No fluid input objects in the scene.");
+ BKE_report(reports, RPT_ERROR, "No fluid input objects in the scene");
return 0;
}
@@ -889,7 +889,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
/* make sure it corresponds to startFrame setting (old: noFrames = scene->r.efra - scene->r.sfra +1) */;
noFrames = scene->r.efra - 0;
if(noFrames<=0) {
- BKE_report(reports, RPT_ERROR, "No frames to export - check your animation range settings.");
+ BKE_report(reports, RPT_ERROR, "No frames to export - check your animation range settings");
fluidbake_free_data(channels, fobjects, fsset, fb);
return 0;
}
@@ -993,7 +993,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
if(!invert_m4_m4(invDomMat, domainMat)) {
BLI_snprintf(debugStrBuffer,256,"fluidsimBake::error - Invalid obj matrix?\n");
elbeemDebugOut(debugStrBuffer);
- BKE_report(reports, RPT_ERROR, "Invalid object matrix.");
+ BKE_report(reports, RPT_ERROR, "Invalid object matrix");
fluidbake_free_data(channels, fobjects, fsset, fb);
return 0;
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 42a163d3da5..0b350e3afd0 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -203,7 +203,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
struct Object *camera_override= v3d ? V3D_CAMERA_LOCAL(v3d) : NULL;
if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.imtype)) {
- BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected.");
+ BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return OPERATOR_CANCELLED;
}
@@ -477,7 +477,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.imtype)) {
- BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected.");
+ BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 3256112426b..5a8e930e1a4 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -260,12 +260,12 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
return 0;
if(!is_view_context && scene->camera==NULL) {
- BKE_report(op->reports, RPT_ERROR, "Scene has no camera.");
+ BKE_report(op->reports, RPT_ERROR, "Scene has no camera");
return 0;
}
if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.imtype)) {
- BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected.");
+ BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return 0;
}
@@ -611,7 +611,7 @@ void RENDER_OT_opengl(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "animation", 0, "Animation", "Render files from the animation range of this scene");
RNA_def_boolean(ot->srna, "write_still", 0, "Write Image", "Save rendered the image to the output path (used only when animation is disabled)");
- RNA_def_boolean(ot->srna, "view_context", 1, "View Context", "Use the current 3D view for rendering, else use scene settings.");
+ RNA_def_boolean(ot->srna, "view_context", 1, "View Context", "Use the current 3D view for rendering, else use scene settings");
}
/* function for getting an opengl buffer from a View3D, used by sequencer */
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 1b24d660411..72cc4ec2afa 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -52,6 +52,7 @@
#include "BKE_animsys.h"
#include "BKE_context.h"
+#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_font.h"
#include "BKE_global.h"
@@ -129,7 +130,7 @@ static int material_slot_remove_exec(bContext *C, wmOperator *op)
/* Removing material slots in edit mode screws things up, see bug #21822.*/
if(ob == CTX_data_edit_object(C)) {
- BKE_report(op->reports, RPT_ERROR, "Unable to remove material slot in edit mode.");
+ BKE_report(op->reports, RPT_ERROR, "Unable to remove material slot in edit mode");
return OPERATOR_CANCELLED;
}
@@ -176,7 +177,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= ED_curve_editnurbs((Curve*)ob->data);
+ ListBase *nurbs= curve_editnurbs((Curve*)ob->data);
if(nurbs) {
for(nu= nurbs->first; nu; nu= nu->next)
@@ -234,7 +235,7 @@ static int material_slot_de_select(bContext *C, int select)
}
}
else if ELEM(ob->type, OB_CURVE, OB_SURF) {
- ListBase *nurbs= ED_curve_editnurbs((Curve*)ob->data);
+ ListBase *nurbs= curve_editnurbs((Curve*)ob->data);
Nurb *nu;
BPoint *bp;
BezTriple *bezt;
@@ -529,7 +530,7 @@ void SCENE_OT_render_layer_add(wmOperatorType *ot)
static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C), *sce;
SceneRenderLayer *rl;
int act= scene->r.actlay;
@@ -541,15 +542,17 @@ static int render_layer_remove_exec(bContext *C, wmOperator *UNUSED(op))
MEM_freeN(rl);
scene->r.actlay= 0;
-
- if(scene->nodetree) {
- bNode *node;
- for(node= scene->nodetree->nodes.first; node; node= node->next) {
- if(node->type==CMP_NODE_R_LAYERS && node->id==NULL) {
- if(node->custom1==act)
- node->custom1= 0;
- else if(node->custom1>act)
- node->custom1--;
+
+ for(sce = CTX_data_main(C)->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)
+ node->custom1--;
+ }
}
}
}
@@ -753,7 +756,7 @@ void TEXTURE_OT_envmap_save(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER; /* no undo since this doesnt modify the env-map */
/* properties */
- prop= RNA_def_float_array(ot->srna, "layout", 12, default_envmap_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face. Order is [+Z -Z +Y -X -Y +X]. Use -1 to skip a face.", 0.0f, 0.0f);
+ prop= RNA_def_float_array(ot->srna, "layout", 12, default_envmap_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face - order is [+Z -Z +Y -X -Y +X] (use -1 to skip a face)", 0.0f, 0.0f);
RNA_def_property_flag(prop, PROP_HIDDEN);
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH);
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index bc97cd9d3ff..8951df9221e 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -43,6 +43,8 @@
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_screen.h"
@@ -233,28 +235,28 @@ static void region_draw_azone_tab(AZone *az)
/* add code to draw region hidden as 'too small' */
switch(az->edge) {
case AE_TOP_TO_BOTTOMRIGHT:
- uiSetRoundBox(3 + 16);
+ 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);
break;
case AE_BOTTOM_TO_TOPLEFT:
- uiSetRoundBox(12 + 16);
+ 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);
break;
case AE_LEFT_TO_TOPRIGHT:
- uiSetRoundBox(9 + 16);
+ uiSetRoundBox(UI_CNR_TOP_LEFT | 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, (float)az->y1, (float)az->x2, (float)az->y2, 4.0f);
break;
case AE_RIGHT_TO_TOPLEFT:
- uiSetRoundBox(6 + 16);
+ uiSetRoundBox(UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_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);
@@ -1347,7 +1349,7 @@ void ED_area_prevspace(bContext *C, ScrArea *sa)
static const char *editortype_pup(void)
{
- return(
+ const char *types= N_(
"Editor type:%t"
"|3D View %x1"
@@ -1382,6 +1384,8 @@ static const char *editortype_pup(void)
"|Python Console %x18"
);
+
+ return UI_translate_do_iface(types);
}
static void spacefunc(struct bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
@@ -1403,8 +1407,7 @@ int ED_area_header_switchbutton(const bContext *C, uiBlock *block, int yco)
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,
- "Displays current editor type. "
- "Click for menu of available types");
+ UI_translate_do_tooltip(N_("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 */
@@ -1449,7 +1452,7 @@ 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= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiBlock *block;
PanelType *pt;
Panel *panel;
@@ -1637,7 +1640,7 @@ void ED_region_panels_init(wmWindowManager *wm, ARegion *ar)
void ED_region_header(const bContext *C, ARegion *ar)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiBlock *block;
uiLayout *layout;
HeaderType *ht;
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index f73ede19724..2e8dc32ad6d 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -238,7 +238,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if(CTX_data_equals(member, "visible_pose_bones")) {
- Object *obpose= ED_object_pose_armature(obact);
+ Object *obpose= object_pose_armature_get(obact);
bArmature *arm= (obpose) ? obpose->data : NULL;
bPoseChannel *pchan;
@@ -254,7 +254,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
}
else if(CTX_data_equals(member, "selected_pose_bones")) {
- Object *obpose= ED_object_pose_armature(obact);
+ Object *obpose= object_pose_armature_get(obact);
bArmature *arm= (obpose) ? obpose->data : NULL;
bPoseChannel *pchan;
@@ -289,7 +289,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
else if(CTX_data_equals(member, "active_pose_bone")) {
bPoseChannel *pchan;
- Object *obpose= ED_object_pose_armature(obact);
+ Object *obpose= object_pose_armature_get(obact);
pchan= get_active_posechannel(obpose);
if (pchan) {
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 66a67d7c4f2..a2be1e8fa6f 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -52,6 +52,7 @@
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
+#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
@@ -346,7 +347,7 @@ int ED_operator_posemode(bContext *C)
if (obact && !(obact->mode & OB_MODE_EDIT)) {
Object *obpose;
- if((obpose= ED_object_pose_armature(obact))) {
+ if((obpose= object_pose_armature_get(obact))) {
if((obact == obpose) || (obact->mode & OB_MODE_WEIGHT_PAINT)) {
return 1;
}
@@ -1732,14 +1733,16 @@ 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);
int delta;
delta = RNA_int_get(op->ptr, "delta");
- CTX_data_scene(C)->r.cfra += delta;
- CTX_data_scene(C)->r.subframe = 0.f;
+ scene->r.cfra += delta;
+ scene->r.subframe = 0.f;
- sound_seek_scene(C);
+ sound_seek_scene(bmain, scene);
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, CTX_data_scene(C));
@@ -1764,6 +1767,7 @@ 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;
@@ -1787,7 +1791,7 @@ static int frame_jump_exec(bContext *C, wmOperator *op)
else
CFRA= PSFRA;
- sound_seek_scene(C);
+ sound_seek_scene(bmain, scene);
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
}
@@ -1807,7 +1811,7 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot)
ot->flag= OPTYPE_UNDO;
/* rna */
- RNA_def_boolean(ot->srna, "end", 0, "Last Frame", "Jump to the last frame of the frame range.");
+ RNA_def_boolean(ot->srna, "end", 0, "Last Frame", "Jump to the last frame of the frame range");
}
@@ -1816,6 +1820,7 @@ 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};
@@ -1870,7 +1875,7 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
/* free temp stuff */
BLI_dlrbTree_free(&keys);
- sound_seek_scene(C);
+ sound_seek_scene(bmain, scene);
WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene);
@@ -2796,6 +2801,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
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;
@@ -2872,7 +2878,7 @@ static int screen_animation_step(bContext *C, wmOperator *UNUSED(op), wmEvent *e
}
if (sad->flag & ANIMPLAY_FLAG_JUMPED)
- sound_seek_scene(C);
+ sound_seek_scene(bmain, scene);
/* since we follow drawflags, we can't send notifier but tag regions ourselves */
ED_update_for_newframe(CTX_data_main(C), scene, screen, 1);
@@ -3017,7 +3023,7 @@ static void SCREEN_OT_animation_cancel(wmOperatorType *ot)
ot->poll= ED_operator_screenactive;
- RNA_def_boolean(ot->srna, "restore_frame", TRUE, "Restore Frame", "Restore the frame when animation was initialized.");
+ RNA_def_boolean(ot->srna, "restore_frame", TRUE, "Restore Frame", "Restore the frame when animation was initialized");
}
/* ************** border select operator (template) ***************************** */
@@ -3092,7 +3098,7 @@ static int fullscreen_back_exec(bContext *C, wmOperator *op)
if (sa->full) break;
}
if (!sa) {
- BKE_report(op->reports, RPT_ERROR, "No fullscreen areas were found.");
+ BKE_report(op->reports, RPT_ERROR, "No fullscreen areas were found");
return OPERATOR_CANCELLED;
}
@@ -3480,8 +3486,8 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", UPARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", 1);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", DOWNARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", 0);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", 1);
- RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "end", 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", RIGHTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 1);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_frame_jump", LEFTARROWKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "end", 0);
WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", UPARROWKEY, KM_PRESS, 0, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_keyframe_jump", DOWNARROWKEY, KM_PRESS, 0, 0)->ptr, "next", 0);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index d69c1d9c447..eb919261127 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -60,6 +60,7 @@
#include "DNA_brush_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
@@ -716,7 +717,7 @@ static int project_paint_PickColor(const ProjPaintState *ps, float pt[2], float
* 1 : occluded
2 : occluded with w[3] weights set (need to know in some cases) */
-static int project_paint_occlude_ptv(float pt[3], float v1[3], float v2[3], float v3[3], float w[3], int is_ortho)
+static int project_paint_occlude_ptv(float pt[3], float v1[4], float v2[4], float v3[4], float w[3], int is_ortho)
{
/* if all are behind us, return false */
if(v1[2] > pt[2] && v2[2] > pt[2] && v3[2] > pt[2])
@@ -748,7 +749,7 @@ static int project_paint_occlude_ptv(float pt[3], float v1[3], float v2[3], floa
static int project_paint_occlude_ptv_clip(
const ProjPaintState *ps, const MFace *mf,
- float pt[3], float v1[3], float v2[3], float v3[3],
+ float pt[3], float v1[4], float v2[4], float v3[4],
const int side )
{
float w[3], wco[3];
@@ -4663,7 +4664,7 @@ static void paint_brush_init_tex(Brush *brush)
if(brush) {
MTex *mtex= &brush->mtex;
if(mtex->tex && mtex->tex->nodetree)
- ntreeBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */
+ ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */
}
}
@@ -4805,7 +4806,7 @@ static void paint_brush_exit_tex(Brush *brush)
if(brush) {
MTex *mtex= &brush->mtex;
if(mtex->tex && mtex->tex->nodetree)
- ntreeEndExecTree(mtex->tex->nodetree);
+ ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1);
}
}
@@ -5177,7 +5178,7 @@ void PAINT_OT_grab_clone(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
/* properties */
- RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates.", -1.0f, 1.0f);
+ RNA_def_float_vector(ot->srna, "delta", 2, NULL, -FLT_MAX, FLT_MAX, "Delta", "Delta offset of clone image in 0.0..1.0 coordinates", -1.0f, 1.0f);
}
/******************** sample color operator ********************/
@@ -5258,7 +5259,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates.", 0, 16384);
+ RNA_def_int_vector(ot->srna, "location", 2, NULL, 0, INT_MAX, "Location", "Cursor location in region coordinates", 0, 16384);
}
/******************** set clone cursor operator ********************/
@@ -5308,7 +5309,7 @@ void PAINT_OT_clone_cursor_set(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates.", -10000.0f, 10000.0f);
+ RNA_def_float_vector(ot->srna, "location", 3, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in world space coordinates", -10000.0f, 10000.0f);
}
/******************** texture paint toggle operator ********************/
@@ -5333,14 +5334,14 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if (object_data_is_libdata(ob)) {
- BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata.");
+ BKE_report(op->reports, RPT_ERROR, "Can't edit external libdata");
return OPERATOR_CANCELLED;
}
me= get_mesh(ob);
if(!(ob->mode & OB_MODE_TEXTURE_PAINT) && !me) {
- BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects.");
+ BKE_report(op->reports, RPT_ERROR, "Can only enter texture paint mode for mesh objects");
return OPERATOR_CANCELLED;
}
@@ -5408,6 +5409,15 @@ int facemask_paint_poll(bContext *C)
return paint_facesel_test(CTX_data_active_object(C));
}
+int vert_paint_poll(bContext *C)
+{
+ return paint_vertsel_test(CTX_data_active_object(C));
+}
+
+int mask_paint_poll(bContext *C)
+{
+ return paint_facesel_test(CTX_data_active_object(C)) || paint_vertsel_test(CTX_data_active_object(C));
+}
/* use project paint to re-apply an image */
static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
{
@@ -5421,12 +5431,12 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
project_state_init(C, OBACT, &ps);
if(ps.ob==NULL || ps.ob->type != OB_MESH) {
- BKE_report(op->reports, RPT_ERROR, "No active mesh object.");
+ BKE_report(op->reports, RPT_ERROR, "No active mesh object");
return OPERATOR_CANCELLED;
}
if(image==NULL) {
- BKE_report(op->reports, RPT_ERROR, "Image could not be found.");
+ BKE_report(op->reports, RPT_ERROR, "Image could not be found");
return OPERATOR_CANCELLED;
}
@@ -5434,7 +5444,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
ps.reproject_ibuf= BKE_image_get_ibuf(image, NULL);
if(ps.reproject_ibuf==NULL || ps.reproject_ibuf->rect==NULL) {
- BKE_report(op->reports, RPT_ERROR, "Image data could not be found.");
+ BKE_report(op->reports, RPT_ERROR, "Image data could not be found");
return OPERATOR_CANCELLED;
}
@@ -5445,7 +5455,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
/* type check to make sure its ok */
if(view_data->len != PROJ_VIEW_DATA_SIZE || view_data->subtype != IDP_FLOAT) {
- BKE_report(op->reports, RPT_ERROR, "Image project data invalid.");
+ BKE_report(op->reports, RPT_ERROR, "Image project data invalid");
return OPERATOR_CANCELLED;
}
}
@@ -5458,7 +5468,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
ps.source= PROJ_SRC_IMAGE_CAM;
if(scene->camera==NULL) {
- BKE_report(op->reports, RPT_ERROR, "No active camera set.");
+ BKE_report(op->reports, RPT_ERROR, "No active camera set");
return OPERATOR_CANCELLED;
}
}
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 5a0ee19d6c9..f671b7b1713 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -122,6 +122,11 @@ void PAINT_OT_face_select_inverse(struct wmOperatorType *ot);
void PAINT_OT_face_select_hide(struct wmOperatorType *ot);
void PAINT_OT_face_select_reveal(struct wmOperatorType *ot);
+void PAINT_OT_vert_select_all(struct wmOperatorType *ot);
+void PAINT_OT_vert_select_inverse(struct wmOperatorType *ot);
+int vert_paint_poll(struct bContext *C);
+int mask_paint_poll(struct bContext *C);
+
int facemask_paint_poll(struct bContext *C);
/* stroke operator */
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index 69af50415cc..287d204115c 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -373,6 +373,10 @@ void ED_operatortypes_paint(void)
WM_operatortype_append(PAINT_OT_weight_sample);
WM_operatortype_append(PAINT_OT_weight_sample_group);
+ /* vertex selection */
+ WM_operatortype_append(PAINT_OT_vert_select_all);
+ WM_operatortype_append(PAINT_OT_vert_select_inverse);
+
/* vertex */
WM_operatortype_append(PAINT_OT_vertex_paint_toggle);
WM_operatortype_append(PAINT_OT_vertex_paint);
@@ -607,6 +611,17 @@ void ED_keymap_paint(wmKeyConfig *keyconf)
WM_keymap_verify_item(keymap, "PAINT_OT_weight_from_bones", WKEY, KM_PRESS, 0, 0);
+
+ /*Weight paint's Vertex Selection Mode */
+ keymap= WM_keymap_find(keyconf, "Weight Paint Vertex Selection", 0, 0);
+ keymap->poll= vert_paint_poll;
+ WM_keymap_add_item(keymap, "PAINT_OT_vert_select_all", AKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "PAINT_OT_vert_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_select_border", BKEY, KM_PRESS, 0, 0);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_CTRL, 0);
+ RNA_boolean_set(WM_keymap_add_item(keymap, "VIEW3D_OT_select_lasso", EVT_TWEAK_A, KM_ANY, KM_SHIFT|KM_CTRL, 0)->ptr, "deselect", 1);
+ WM_keymap_add_item(keymap, "VIEW3D_OT_select_circle", CKEY, KM_PRESS, 0, 0);
+
/* Image/Texture Paint mode */
keymap= WM_keymap_find(keyconf, "Image Paint", 0, 0);
keymap->poll= image_texture_paint_poll;
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 09873566d4a..767001ff163 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -322,8 +322,8 @@ static int load_tex(Sculpt *sd, Brush* br, ViewContext* vc)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
if (br->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
}
return 1;
@@ -447,9 +447,9 @@ static void paint_draw_alpha_overlay(Sculpt *sd, Brush *brush,
if(brush->mtex.brush_map_mode == MTEX_MAP_MODE_FIXED) {
/* brush rotation */
glTranslatef(0.5, 0.5, 0);
- glRotatef((double)((brush->flag & BRUSH_RAKE) ?
- sd->last_angle : sd->special_rotation) * (180.0/M_PI),
- 0.0, 0.0, 1.0);
+ glRotatef((double)RAD2DEGF((brush->flag & BRUSH_RAKE) ?
+ sd->last_angle : sd->special_rotation),
+ 0.0, 0.0, 1.0);
glTranslatef(-0.5f, -0.5f, 0);
/* scale based on tablet pressure */
@@ -683,7 +683,7 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *ev
/* TODO: as sculpt and other paint modes are unified, this
separation will go away */
if(stroke->vc.obact->sculpt) {
- float delta[3];
+ float delta[2];
brush_jitter_pos(brush, mouse_in, mouse);
@@ -691,13 +691,14 @@ static void paint_brush_stroke_add_step(bContext *C, wmOperator *op, wmEvent *ev
brush_jitter_pos isn't written in the best way to
be reused here */
if(brush->flag & BRUSH_JITTER_PRESSURE) {
- sub_v3_v3v3(delta, mouse, mouse_in);
- mul_v3_fl(delta, pressure);
- add_v3_v3v3(mouse, mouse_in, delta);
+ sub_v2_v2v2(delta, mouse, mouse_in);
+ mul_v2_fl(delta, pressure);
+ add_v2_v2v2(mouse, mouse_in, delta);
}
}
- else
- copy_v3_v3(mouse, mouse_in);
+ else {
+ copy_v2_v2(mouse, mouse_in);
+ }
/* TODO: can remove the if statement once all modes have this */
if(stroke->get_location)
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 09f5c32bea0..d332dc6ec0d 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -1,3 +1,32 @@
+/*
+ * $Id$
+ *
+ * ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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/editors/sculpt_paint/paint_utils.c
* \ingroup edsculpt
*/
@@ -358,6 +387,49 @@ void PAINT_OT_face_select_all(wmOperatorType *ot)
WM_operator_properties_select_all(ot);
}
+
+static int vert_select_all_exec(bContext *C, wmOperator *op)
+{
+ Object *ob= CTX_data_active_object(C);
+ paintvert_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), TRUE);
+ ED_region_tag_redraw(CTX_wm_region(C));
+ return OPERATOR_FINISHED;
+}
+
+
+void PAINT_OT_vert_select_all(wmOperatorType *ot)
+{
+ ot->name= "Vertex Selection";
+ ot->description= "Change selection for all vertices";
+ ot->idname= "PAINT_OT_vert_select_all";
+
+ ot->exec= vert_select_all_exec;
+ ot->poll= vert_paint_poll;
+
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ WM_operator_properties_select_all(ot);
+}
+
+static int vert_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Object *ob= CTX_data_active_object(C);
+ paintvert_deselect_all_visible(ob, SEL_INVERT, TRUE);
+ ED_region_tag_redraw(CTX_wm_region(C));
+ return OPERATOR_FINISHED;
+}
+
+void PAINT_OT_vert_select_inverse(wmOperatorType *ot)
+{
+ ot->name= "Vertex Select Invert";
+ ot->description= "Invert selection of vertices";
+ ot->idname= "PAINT_OT_vert_select_inverse";
+
+ ot->exec= vert_select_inverse_exec;
+ ot->poll= vert_paint_poll;
+
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
static int face_select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= CTX_data_active_object(C);
@@ -399,7 +471,7 @@ void PAINT_OT_face_select_hide(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
}
static int face_select_reveal_exec(bContext *C, wmOperator *UNUSED(op))
@@ -421,5 +493,5 @@ void PAINT_OT_face_select_reveal(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected objects");
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 3da19ba7346..11a46bb373b 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -64,6 +64,7 @@
#include "RNA_enum_types.h"
#include "BKE_DerivedMesh.h"
+#include "BKE_armature.h"
#include "BKE_action.h"
#include "BKE_brush.h"
#include "BKE_context.h"
@@ -390,25 +391,27 @@ void vpaint_fill(Object *ob, unsigned int paintcol)
void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
{
Mesh *me;
- MFace *mface;
MDeformWeight *dw, *uw;
int *indexar;
- int index, vgroup;
- unsigned int faceverts[5]={0,0,0,0,0};
- unsigned char i;
- int vgroup_mirror= -1;
+ unsigned int index;
+ int vgroup, vgroup_mirror= -1;
int selected;
+ int use_vert_sel;
+
me= ob->data;
if(me==NULL || me->totface==0 || me->dvert==NULL || !me->mface) return;
selected= (me->editflag & ME_EDIT_PAINT_MASK);
+
+ use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
indexar= get_indexarray(me);
if(selected) {
- for(index=0, mface=me->mface; index<me->totface; index++, mface++) {
- if((mface->flag & ME_FACE_SEL)==0)
+ MFace *mf;
+ for(index=0, mf= me->mface; index<me->totface; index++, mf++) {
+ if((mf->flag & ME_FACE_SEL)==0)
indexar[index]= 0;
else
indexar[index]= index+1;
@@ -430,22 +433,25 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
for(index=0; index<me->totface; index++) {
if(indexar[index] && indexar[index]<=me->totface) {
- mface= me->mface + (indexar[index]-1);
- /* just so we can loop through the verts */
- faceverts[0]= mface->v1;
- faceverts[1]= mface->v2;
- faceverts[2]= mface->v3;
- faceverts[3]= mface->v4;
- for (i=0; i<3 || faceverts[i]; i++) {
- if(!((me->dvert+faceverts[i])->flag)) {
- dw= defvert_verify_index(me->dvert+faceverts[i], vgroup);
+ MFace *mf= &me->mface[indexar[index]-1];
+ unsigned int fidx= mf->v4 ? 3:2;
+
+ do {
+ unsigned int vidx= *(&mf->v1 + fidx);
+
+ if(!me->dvert[vidx].flag) {
+ if(use_vert_sel && !(me->mvert[vidx].flag & SELECT)) {
+ continue;
+ }
+
+ dw= defvert_verify_index(&me->dvert[vidx], vgroup);
if(dw) {
- uw= defvert_verify_index(wp->wpaint_prev+faceverts[i], vgroup);
+ uw= defvert_verify_index(wp->wpaint_prev+vidx, vgroup);
uw->weight= dw->weight; /* set the undo weight */
dw->weight= paintweight;
-
+
if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */
- int j= mesh_get_x_mirror_vert(ob, faceverts[i]);
+ int j= mesh_get_x_mirror_vert(ob, vidx);
if(j>=0) {
/* copy, not paint again */
if(vgroup_mirror != -1) {
@@ -460,16 +466,19 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
}
}
}
- (me->dvert+faceverts[i])->flag= 1;
+ me->dvert[vidx].flag= 1;
}
- }
+
+
+ } while (fidx--);
}
}
-
- index=0;
- while (index<me->totvert) {
- (me->dvert+index)->flag= 0;
- index++;
+
+ {
+ MDeformVert *dv= me->dvert;
+ for(index= me->totvert; index != 0; index--, dv++) {
+ dv->flag= 0;
+ }
}
MEM_freeN(indexar);
@@ -792,7 +801,7 @@ static float calc_vp_alpha_dl(VPaint *vp, ViewContext *vc, float vpimat[][3], fl
return alpha;
}
-static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float alpha, float paintval, int flip)
+static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float alpha, float paintval, int flip, int multipaint)
{
Brush *brush = paint_brush(&wp->paint);
int tool = brush->vertexpaint_tool;
@@ -830,7 +839,10 @@ static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float
if (dw->weight > paintval)
dw->weight = paintval*alpha + dw->weight*(1.0f-alpha);
}
- CLAMP(dw->weight, 0.0f, 1.0f);
+ /* delay clamping until the end so multi-paint can function when the active group is at the limits */
+ if(multipaint == FALSE) {
+ CLAMP(dw->weight, 0.0f, 1.0f);
+ }
/* if no spray, clip result with orig weight & orig alpha */
if((wp->flag & VP_SPRAY)==0) {
@@ -857,15 +869,17 @@ static void wpaint_blend(VPaint *wp, MDeformWeight *dw, MDeformWeight *uw, float
else
testw = uw->weight;
}
- CLAMP(testw, 0.0f, 1.0f);
-
- if( testw<uw->weight ) {
- if(dw->weight < testw) dw->weight= testw;
- else if(dw->weight > uw->weight) dw->weight= uw->weight;
- }
- else {
- if(dw->weight > testw) dw->weight= testw;
- else if(dw->weight < uw->weight) dw->weight= uw->weight;
+
+ if(multipaint == FALSE) {
+ CLAMP(testw, 0.0f, 1.0f);
+ if( testw<uw->weight ) {
+ if(dw->weight < testw) dw->weight= testw;
+ else if(dw->weight > uw->weight) dw->weight= uw->weight;
+ }
+ else {
+ if(dw->weight > testw) dw->weight= testw;
+ else if(dw->weight < uw->weight) dw->weight= uw->weight;
+ }
}
}
@@ -980,7 +994,7 @@ static EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C, PointerRNA
const int totgroup= BLI_countlist(&vc.obact->defbase);
if(totgroup) {
MFace *mf= ((MFace *)me->mface) + index-1;
- int fidx= mf->v4 ? 3:2;
+ unsigned int fidx= mf->v4 ? 3:2;
int *groups= MEM_callocN(totgroup*sizeof(int), "groups");
int found= FALSE;
@@ -1062,6 +1076,7 @@ void PAINT_OT_weight_sample_group(wmOperatorType *ot)
}
+#if 0 /* UNUSED */
static void do_weight_paint_auto_normalize(MDeformVert *dvert,
int paint_nr, char *map)
{
@@ -1096,41 +1111,600 @@ static void do_weight_paint_auto_normalize(MDeformVert *dvert,
}
}
}
+#endif
+
+/* the active group should be involved in auto normalize */
+static void do_weight_paint_auto_normalize_all_groups(MDeformVert *dvert, char *map, char do_auto_normalize)
+{
+// MDeformWeight *dw = dvert->dw;
+ float sum=0.0f, fac=0.0f;
+ int i, tot=0;
+
+ if (do_auto_normalize == FALSE)
+ return;
+
+ for (i=0; i<dvert->totweight; i++) {
+ if (map[dvert->dw[i].def_nr]) {
+ tot += 1;
+ sum += dvert->dw[i].weight;
+ }
+ }
+
+ if (!tot || sum == 1.0f)
+ return;
+
+ fac = sum;
+ fac = fac==0.0f ? 1.0f : 1.0f / fac;
+
+ for (i=0; i<dvert->totweight; i++) {
+ if (map[dvert->dw[i].def_nr]) {
+ dvert->dw[i].weight *= fac;
+ }
+ }
+}
+
+/*
+See if the current deform vertex has a locked group
+*/
+static char has_locked_group(MDeformVert *dvert, const char *lock_flags)
+{
+ int i;
+ for(i = 0; i < dvert->totweight; i++) {
+ if(lock_flags[dvert->dw[i].def_nr] && dvert->dw[i].weight > 0.0f) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+/*
+ * gen_lck_flags gets the status of "flag" for each bDeformGroup
+ *in ob->defbase and returns an array containing them
+ */
+static char *gen_lock_flags(Object* ob, int defbase_tot)
+{
+ char is_locked = FALSE;
+ int i;
+ //int defbase_tot = BLI_countlist(&ob->defbase);
+ char *lock_flags = MEM_mallocN(defbase_tot*sizeof(char), "defflags");
+ bDeformGroup *defgroup;
+
+ for(i = 0, defgroup = ob->defbase.first; i < defbase_tot && defgroup; defgroup = defgroup->next, i++) {
+ lock_flags[i] = ((defgroup->flag & DG_LOCK_WEIGHT) != 0);
+ is_locked |= lock_flags[i];
+ }
+ if(is_locked){
+ return lock_flags;
+ }
+
+ MEM_freeN(lock_flags);
+ return NULL;
+}
+
+static int has_locked_group_selected(int defbase_tot, char *defbase_sel, char *lock_flags)
+{
+ int i;
+ for(i = 0; i < defbase_tot; i++) {
+ if(defbase_sel[i] && lock_flags[i]) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+
+#if 0 /* UNUSED */
+static int has_unselected_unlocked_bone_group(int defbase_tot, char *defbase_sel, int selected, char *lock_flags, char *vgroup_validmap)
+{
+ int i;
+ if(defbase_tot == selected) {
+ return FALSE;
+ }
+ for(i = 0; i < defbase_tot; i++) {
+ if(vgroup_validmap[i] && !defbase_sel[i] && !lock_flags[i]) {
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+#endif
+
+
+static void multipaint_selection(MDeformVert *dvert, float change, char *defbase_sel, int defbase_tot)
+{
+ int i;
+ MDeformWeight *dw;
+ float val;
+ /* make sure they are all at most 1 after the change */
+ for(i = 0; i < defbase_tot; i++) {
+ if(defbase_sel[i]) {
+ dw = defvert_find_index(dvert, i);
+ if(dw && dw->weight) {
+ val = dw->weight * change;
+ if(val > 1) {
+ /* TODO: when the change is reduced, you need to recheck
+ * the earlier values to make sure they are not 0
+ * (precision error) */
+ change = 1.0f/dw->weight;
+ }
+ /* the value should never reach zero while multi-painting if it
+ * was nonzero beforehand */
+ if(val <= 0) {
+ return;
+ }
+ }
+ }
+ }
+ /* apply the valid change */
+ for(i = 0; i < defbase_tot; i++) {
+ if(defbase_sel[i]) {
+ dw = defvert_find_index(dvert, i);
+ if(dw && dw->weight) {
+ dw->weight = dw->weight * change;
+ }
+ }
+ }
+}
+
+/* move all change onto valid, unchanged groups. If there is change left over,
+ * then return it.
+ * assumes there are valid groups to shift weight onto */
+static float redistribute_change(MDeformVert *ndv, char *change_status, int changeme, int changeto, float totchange, float total_valid, char do_auto_normalize)
+{
+ float was_change;
+ float change;
+ float oldval;
+ MDeformWeight *ndw;
+ int i;
+ do {
+ /* assume there is no change until you see one */
+ was_change = FALSE;
+ /* change each group by the same amount each time */
+ change = totchange/total_valid;
+ for(i = 0; i < ndv->totweight && total_valid && totchange; i++) {
+ ndw = (ndv->dw+i);
+ /* change only the groups with a valid status */
+ if(change_status[ndw->def_nr] == changeme) {
+ oldval = ndw->weight;
+ /* if auto normalize is active, don't worry about upper bounds */
+ if(do_auto_normalize == FALSE && ndw->weight + change > 1) {
+ totchange -= 1-ndw->weight;
+ ndw->weight = 1;
+ /* stop the changes to this group */
+ change_status[ndw->def_nr] = changeto;
+ total_valid--;
+ }
+ else if(ndw->weight + change < 0) { /* check the lower bound */
+ totchange -= ndw->weight;
+ ndw->weight = 0;
+ change_status[ndw->def_nr] = changeto;
+ total_valid--;
+ }
+ else {/* a perfectly valid change occurred to ndw->weight */
+ totchange -= change;
+ ndw->weight += change;
+ }
+ /* see if there was a change */
+ if(oldval != ndw->weight) {
+ was_change = TRUE;
+ }
+ }
+ }
+ /* don't go again if there was no change, if there is no valid group,
+ * or there is no change left */
+ } while(was_change && total_valid && totchange);
+ /* left overs */
+ return totchange;
+}
+
+/* observe the changes made to the weights of groups.
+ * make sure all locked groups on the vertex have the same deformation
+ * by moving the changes made to groups onto other unlocked groups */
+static void enforce_locks(MDeformVert *odv, MDeformVert *ndv, int defbase_tot,
+ const char *lock_flags, const char *vgroup_validmap, char do_auto_normalize)
+{
+ float totchange = 0.0f;
+ float totchange_allowed = 0.0f;
+ float left_over;
+
+ int total_valid = 0;
+ int total_changed = 0;
+ unsigned int i;
+ MDeformWeight *ndw;
+ MDeformWeight *odw;
+ MDeformWeight *ndw2;
+ MDeformWeight *odw2;
+ int designatedw = -1;
+ int designatedw_changed = FALSE;
+ float storedw;
+ char *change_status;
+ char new_weight_has_zero = FALSE;
+
+ if(!lock_flags || !has_locked_group(ndv, lock_flags)) {
+ return;
+ }
+ /* record if a group was changed, unlocked and not changed, or locked */
+ change_status = MEM_callocN(sizeof(char)*defbase_tot, "unlocked_unchanged");
+
+ for(i = 0; i < defbase_tot; i++) {
+ ndw = defvert_find_index(ndv, i);
+ odw = defvert_find_index(odv, i);
+ /* the weights are zero, so we can assume a lot */
+ if(!ndw || !odw) {
+ if (!lock_flags[i] && vgroup_validmap[i]){
+ defvert_verify_index(odv, i);
+ defvert_verify_index(ndv, i);
+ total_valid++;
+ change_status[i] = 1; /* can be altered while redistributing */
+ }
+ continue;
+ }
+ /* locked groups should not be changed */
+ if(lock_flags[i]) {
+ ndw->weight = odw->weight;
+ }
+ else if(ndw->weight != odw->weight) { /* changed groups are handled here */
+ totchange += ndw->weight - odw->weight;
+ change_status[i] = 2; /* was altered already */
+ total_changed++;
+ if(ndw->weight == 0) {
+ new_weight_has_zero = TRUE;
+ }
+ else if(designatedw == -1){
+ designatedw = i;
+ }
+ } /* unchanged, unlocked bone groups are handled here */
+ else if (vgroup_validmap[i]){
+ totchange_allowed += ndw->weight;
+ total_valid++;
+ change_status[i] = 1; /* can be altered while redistributing */
+ }
+ }
+ /* if there was any change, redistribute it */
+ if(total_changed) {
+ /* auto normalize will allow weights to temporarily go above 1 in redistribution */
+ if(vgroup_validmap && total_changed < 0 && total_valid) {
+ totchange_allowed = total_valid;
+ }
+ /* there needs to be change allowed, or you should not bother */
+ if(totchange_allowed) {
+ /* the way you modify the unlocked+unchanged groups is different depending
+ * on whether or not you are painting the weight(s) up or down */
+ if(totchange < 0) {
+ totchange_allowed = total_valid - totchange_allowed;
+ }
+ else {
+ totchange_allowed *= -1;
+ }
+ left_over = 0;
+ if(fabsf(totchange_allowed) < fabsf(totchange)) {
+ /* this amount goes back onto the changed, unlocked weights */
+ left_over = fabsf(fabsf(totchange) - fabsf(totchange_allowed));
+ if(totchange > 0) {
+ left_over *= -1;
+ }
+ }
+ else {
+ /* all of the change will be permitted */
+ totchange_allowed = -totchange;
+ }
+ /* move the weight evenly between the allowed groups, move excess back onto the used groups based on the change */
+ totchange_allowed = redistribute_change(ndv, change_status, 1, -1, totchange_allowed, total_valid, do_auto_normalize);
+ left_over += totchange_allowed;
+ if(left_over) {
+ /* more than one nonzero weights were changed with the same ratio, so keep them changed that way! */
+ if(total_changed > 1 && !new_weight_has_zero && designatedw >= 0) {
+ /* this dw is special, it is used as a base to determine how to change the others */
+ ndw = defvert_find_index(ndv, designatedw);
+ odw = defvert_find_index(odv, designatedw);
+ storedw = ndw->weight;
+ for(i = 0; i < ndv->totweight; i++) {
+ if(change_status[ndw->def_nr] == 2) {
+ odw2 = &odv->dw[i];
+ ndw2 = &ndv->dw[i];
+ if(!designatedw_changed) {
+ ndw->weight = (totchange_allowed + odw->weight + odw2->weight)/(1.0f + ndw2->weight/ndw->weight);
+ designatedw_changed = TRUE;
+ }
+ ndw2->weight = ndw->weight * ndw2->weight / storedw;
+ }
+ }
+ }
+ /* a weight was changed to zero, only one weight was changed,
+ * or designatedw is still -1 put weight back as evenly as possible */
+ else {
+ redistribute_change(ndv, change_status, 2, -2, left_over, total_changed, do_auto_normalize);
+ }
+ }
+ }
+ else {
+ /* reset the weights */
+ unsigned int i;
+ MDeformWeight *dw_old= odv->dw;
+ MDeformWeight *dw_new= ndv->dw;
+
+ for (i= odv->totweight; i != 0; i--, dw_old++, dw_new++) {
+ dw_new->weight= dw_old->weight;
+ }
+ }
+ }
+
+ MEM_freeN(change_status);
+}
-static void do_weight_paint_vertex(VPaint *wp, Object *ob, int index,
- float alpha, float paintweight, int flip,
- int vgroup_mirror, char *validmap)
+/* multi-paint's initial, potential change is computed here based on the user's stroke */
+static float get_mp_change(MDeformVert *odv, char *defbase_sel, float brush_change)
+{
+ float selwsum = 0.0f;
+ unsigned int i;
+ MDeformWeight *dw= odv->dw;
+
+ for (i= odv->totweight; i != 0; i--, dw++) {
+ if(defbase_sel[dw->def_nr]) {
+ selwsum += dw->weight;
+ }
+ }
+ if(selwsum && selwsum+brush_change > 0) {
+ return (selwsum+brush_change)/selwsum;
+ }
+ return 0.0f;
+}
+
+/* change the weights back to the wv's weights
+ * it assumes you already have the correct pointer index */
+static void reset_to_prev(MDeformVert *wv, MDeformVert *dvert)
+{
+ MDeformWeight *dw= dvert->dw;
+ MDeformWeight *w;
+ unsigned int i;
+ for (i= dvert->totweight; i != 0; i--, dw++) {
+ w= defvert_find_index(wv, dw->def_nr);
+ /* if there was no w when there is a d, then the old weight was 0 */
+ dw->weight = w ? w->weight : 0.0f;
+ }
+}
+
+static void clamp_weights(MDeformVert *dvert)
+{
+ MDeformWeight *dw= dvert->dw;
+ unsigned int i;
+ for (i= dvert->totweight; i != 0; i--, dw++) {
+ CLAMP(dw->weight, 0.0f, 1.0f);
+ }
+}
+
+/* struct to avoid passing many args each call to do_weight_paint_vertex()
+ * this _could_ be made a part of the operators 'WPaintData' struct, or at
+ * least a member, but for now keep its own struct, initialized on every
+ * paint stroke update - campbell */
+typedef struct WeightPaintInfo {
+
+ int defbase_tot;
+
+ /* both must add up to 'defbase_tot' */
+ int defbase_tot_sel;
+ int defbase_tot_unsel;
+
+ int vgroup_mirror; /* mirror group or -1 */
+
+ char *lock_flags; /* boolean array for locked bones,
+ * length of defbase_tot */
+ char *defbase_sel; /* boolean array for selected bones,
+ * length of defbase_tot */
+
+ char *vgroup_validmap; /* same as WeightPaintData.vgroup_validmap,
+ * only added here for convenience */
+
+ char do_flip;
+ char do_multipaint;
+ char do_auto_normalize;
+} WeightPaintInfo;
+
+/* fresh start to make multi-paint and locking modular */
+/* returns TRUE if it thinks you need to reset the weights due to
+ * normalizing while multi-painting */
+static int apply_mp_locks_normalize(Mesh *me, const WeightPaintInfo *wpi,
+ const unsigned int index,
+ MDeformWeight *dw, MDeformWeight *tdw,
+ float change, float oldChange,
+ float oldw, float neww)
+{
+ MDeformVert *dv= &me->dvert[index];
+ MDeformVert dv_test= {NULL};
+
+ dv_test.dw= MEM_dupallocN(dv->dw);
+ dv_test.flag = dv->flag;
+ dv_test.totweight = dv->totweight;
+ /* do not multi-paint if a locked group is selected or the active group is locked
+ * !lock_flags[dw->def_nr] helps if nothing is selected, but active group is locked */
+ if( (wpi->lock_flags == NULL) ||
+ ((wpi->lock_flags[dw->def_nr] == FALSE) &&
+ has_locked_group_selected(wpi->defbase_tot, wpi->defbase_sel, wpi->lock_flags) == FALSE))
+ {
+ if(wpi->do_multipaint && wpi->defbase_tot_sel > 1) {
+ if(change && change!=1) {
+ multipaint_selection(dv, change, wpi->defbase_sel, wpi->defbase_tot);
+ }
+ }
+ else { /* this lets users paint normally, but don't let them paint locked groups */
+ dw->weight = neww;
+ }
+ }
+ clamp_weights(dv);
+
+ enforce_locks(&dv_test, dv, wpi->defbase_tot, wpi->lock_flags, wpi->vgroup_validmap, wpi->do_auto_normalize);
+
+ do_weight_paint_auto_normalize_all_groups(dv, wpi->vgroup_validmap, wpi->do_auto_normalize);
+
+ if(oldChange && wpi->do_multipaint && wpi->defbase_tot_sel > 1) {
+ if(tdw->weight != oldw) {
+ if(neww > oldw) {
+ if(tdw->weight <= oldw) {
+ MEM_freeN(dv_test.dw);
+ return TRUE;
+ }
+ }
+ else {
+ if(tdw->weight >= oldw) {
+ MEM_freeN(dv_test.dw);
+ return TRUE;
+ }
+ }
+ }
+ }
+ MEM_freeN(dv_test.dw);
+ return FALSE;
+}
+
+/* within the current dvert index, get the dw that is selected and has a weight
+ * above 0, this helps multi-paint */
+static int get_first_selected_nonzero_weight(MDeformVert *dvert, char *defbase_sel)
+{
+ int i;
+ MDeformWeight *dw= dvert->dw;
+ for(i=0; i< dvert->totweight; i++, dw++) {
+ if(defbase_sel[dw->def_nr] && dw->weight > 0.0f) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+
+static char *wpaint_make_validmap(Object *ob);
+
+
+static void do_weight_paint_vertex( /* vars which remain the same for every vert */
+ VPaint *wp, Object *ob, const WeightPaintInfo *wpi,
+ /* vars which change on each stroke */
+ const unsigned int index, float alpha, float paintweight
+ )
{
Mesh *me= ob->data;
+
MDeformWeight *dw, *uw;
int vgroup= ob->actdef-1;
-
+
if(wp->flag & VP_ONLYVGROUP) {
- dw= defvert_find_index(me->dvert+index, vgroup);
+ dw= defvert_find_index(&me->dvert[index], vgroup);
uw= defvert_find_index(wp->wpaint_prev+index, vgroup);
}
else {
- dw= defvert_verify_index(me->dvert+index, vgroup);
+ dw= defvert_verify_index(&me->dvert[index], vgroup);
uw= defvert_verify_index(wp->wpaint_prev+index, vgroup);
}
if(dw==NULL || uw==NULL)
return;
-
- wpaint_blend(wp, dw, uw, alpha, paintweight, flip);
- do_weight_paint_auto_normalize(me->dvert+index, vgroup, validmap);
- if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */
- int j= mesh_get_x_mirror_vert(ob, index);
- if(j>=0) {
- /* copy, not paint again */
- if(vgroup_mirror != -1)
- uw= defvert_verify_index(me->dvert+j, vgroup_mirror);
- else
- uw= defvert_verify_index(me->dvert+j, vgroup);
-
- uw->weight= dw->weight;
+ /* TODO: De-duplicate the simple weight paint - jason */
+ /* ... or not, since its <10 SLOC - campbell */
+
+ /* If there are no locks or multipaint,
+ * then there is no need to run the more complicated checks */
+ if( (wpi->do_multipaint == FALSE || wpi->defbase_tot_sel <= 1) &&
+ (wpi->lock_flags == NULL || has_locked_group(&me->dvert[index], wpi->lock_flags) == FALSE))
+ {
+ wpaint_blend(wp, dw, uw, alpha, paintweight, wpi->do_flip, FALSE);
+ do_weight_paint_auto_normalize_all_groups(&me->dvert[index], wpi->vgroup_validmap, wpi->do_auto_normalize);
+
+ if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */
+ int j= mesh_get_x_mirror_vert(ob, index);
+ if(j>=0) {
+ /* copy, not paint again */
+ uw= defvert_verify_index(me->dvert+j, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
+
+ uw->weight= dw->weight;
- do_weight_paint_auto_normalize(me->dvert+j, vgroup, validmap);
+ do_weight_paint_auto_normalize_all_groups(me->dvert+j, wpi->vgroup_validmap, wpi->do_auto_normalize);
+ }
+ }
+ }
+ else {
+ /* use locks and/or multipaint */
+ float oldw;
+ float neww;
+ float testw=0;
+ float change = 0;
+ float oldChange = 0;
+ int i;
+ MDeformWeight *tdw = NULL, *tuw;
+ MDeformVert dv= {NULL};
+
+ oldw = dw->weight;
+ wpaint_blend(wp, dw, uw, alpha, paintweight, wpi->do_flip, wpi->do_multipaint && wpi->defbase_tot_sel >1);
+ neww = dw->weight;
+ dw->weight = oldw;
+
+ /* setup multi-paint */
+ if(wpi->defbase_tot_sel > 1 && wpi->do_multipaint) {
+ dv.dw= MEM_dupallocN(me->dvert[index].dw);
+ dv.flag = me->dvert[index].flag;
+ dv.totweight = me->dvert[index].totweight;
+ tdw = dw;
+ tuw = uw;
+ change = get_mp_change(wp->wpaint_prev+index, wpi->defbase_sel, neww - oldw);
+ if(change) {
+ if(!tdw->weight) {
+ i = get_first_selected_nonzero_weight(&me->dvert[index], wpi->defbase_sel);
+ if(i>=0) {
+ tdw = &(me->dvert[index].dw[i]);
+ tuw = defvert_verify_index(wp->wpaint_prev+index, tdw->def_nr);
+ }
+ else {
+ change = 0;
+ }
+ }
+ if(change && tuw->weight && tuw->weight * change) {
+ if(tdw->weight != tuw->weight) {
+ oldChange = tdw->weight/tuw->weight;
+ testw = tuw->weight*change;
+ if( testw > tuw->weight ) {
+ if(change > oldChange) {
+ /* reset the weights and use the new change */
+ reset_to_prev(wp->wpaint_prev+index, &me->dvert[index]);
+ }
+ else {
+ /* the old change was more significant, so set
+ * the change to 0 so that it will not do another multi-paint */
+ change = 0;
+ }
+ }
+ else {
+ if(change < oldChange) {
+ reset_to_prev(wp->wpaint_prev+index, &me->dvert[index]);
+ }
+ else {
+ change = 0;
+ }
+ }
+ }
+ }
+ else {
+ change = 0;
+ }
+ }
+ }
+
+ if(apply_mp_locks_normalize(me, wpi, index, dw, tdw, change, oldChange, oldw, neww)) {
+ reset_to_prev(&dv, &me->dvert[index]);
+ change = 0;
+ oldChange = 0;
+ }
+ if(dv.dw) {
+ MEM_freeN(dv.dw);
+ }
+ /* dvert may have been altered greatly */
+ dw = defvert_find_index(&me->dvert[index], vgroup);
+
+ if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */
+ int j= mesh_get_x_mirror_vert(ob, index);
+ if(j>=0) {
+ /* copy, not paint again */
+ uw= defvert_verify_index(me->dvert+j, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
+
+ //uw->weight= dw->weight;
+
+ apply_mp_locks_normalize(me, wpi, j, uw, tdw, change, oldChange, oldw, neww);
+ }
}
}
}
@@ -1227,16 +1801,15 @@ struct WPaintData {
/*variables for auto normalize*/
int auto_normalize;
char *vgroup_validmap; /*stores if vgroups tie to deforming bones or not*/
+ char *lock_flags;
+ int defbase_tot;
};
static char *wpaint_make_validmap(Object *ob)
{
bDeformGroup *dg;
ModifierData *md;
- char *validmap;
- bPose *pose;
- bPoseChannel *chan;
- ArmatureModifierData *amd;
+ char *vgroup_validmap;
GHash *gh = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "wpaint_make_validmap gh");
int i = 0, step1=1;
@@ -1248,7 +1821,7 @@ static char *wpaint_make_validmap(Object *ob)
if (!i)
return NULL;
- validmap = MEM_callocN(i, "wpaint valid map");
+ vgroup_validmap= MEM_callocN(i, "wpaint valid map");
/*now loop through the armature modifiers and identify deform bones*/
for (md = ob->modifiers.first; md; md= !md->next && step1 ? (step1=0), modifiers_getVirtualModifierList(ob) : md->next) {
@@ -1257,10 +1830,11 @@ static char *wpaint_make_validmap(Object *ob)
if (md->type == eModifierType_Armature)
{
- amd = (ArmatureModifierData*) md;
+ ArmatureModifierData *amd= (ArmatureModifierData*) md;
if(amd->object && amd->object->pose) {
- pose = amd->object->pose;
+ bPose *pose= amd->object->pose;
+ bPoseChannel *chan;
for (chan=pose->chanbase.first; chan; chan=chan->next) {
if (chan->bone->flag & BONE_NO_DEFORM)
@@ -1278,13 +1852,13 @@ static char *wpaint_make_validmap(Object *ob)
/*add all names to a hash table*/
for (dg=ob->defbase.first, i=0; dg; dg=dg->next, i++) {
if (BLI_ghash_lookup(gh, dg->name) != NULL) {
- validmap[i] = 1;
+ vgroup_validmap[i] = TRUE;
}
}
BLI_ghash_free(gh, NULL, NULL);
- return validmap;
+ return vgroup_validmap;
}
static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
@@ -1318,7 +1892,9 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
/*set up auto-normalize, and generate map for detecting which
vgroups affect deform bones*/
wpd->auto_normalize = ts->auto_normalize;
- if (wpd->auto_normalize)
+ wpd->defbase_tot = BLI_countlist(&ob->defbase);
+ wpd->lock_flags = gen_lock_flags(ob, wpd->defbase_tot);
+ if (wpd->auto_normalize || ts->multipaint || wpd->lock_flags)
wpd->vgroup_validmap = wpaint_make_validmap(ob);
// if(qual & LR_CTRLKEY) {
@@ -1385,14 +1961,19 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
float mat[4][4];
float paintweight;
int *indexar;
- int totindex, index, totw, flip;
+ int totw;
+ unsigned int index, totindex;
float alpha;
float mval[2], pressure;
-
+ int use_vert_sel;
+
+ /* intentionally dont initialize as NULL, make sure we initialize all members below */
+ WeightPaintInfo wpi;
+
/* cannot paint if there is no stroke data */
if (wpd == NULL) {
- // XXX: force a redraw here, since even though we can't paint,
- // at least view won't freeze until stroke ends
+ /* XXX: force a redraw here, since even though we can't paint,
+ * at least view won't freeze until stroke ends */
ED_region_tag_redraw(CTX_wm_region(C));
return;
}
@@ -1407,17 +1988,39 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
/* load projection matrix */
mul_m4_m4m4(mat, ob->obmat, vc->rv3d->persmat);
- flip = RNA_boolean_get(itemptr, "pen_flip");
pressure = RNA_float_get(itemptr, "pressure");
RNA_float_get_array(itemptr, "mouse", mval);
mval[0]-= vc->ar->winrct.xmin;
mval[1]-= vc->ar->winrct.ymin;
-
+
+
+
+ /* *** setup WeightPaintInfo - pass onto do_weight_paint_vertex *** */
+ wpi.defbase_tot= wpd->defbase_tot;
+ wpi.defbase_sel= MEM_mallocN(wpi.defbase_tot*sizeof(char), "wpi.defbase_sel");
+ wpi.defbase_tot_sel= get_selected_defgroups(ob, wpi.defbase_sel, wpi.defbase_tot);
+ if(wpi.defbase_tot_sel == 0 && ob->actdef) wpi.defbase_tot_sel = 1;
+ wpi.defbase_tot_unsel= wpi.defbase_tot - wpi.defbase_tot_sel;
+ wpi.vgroup_mirror= wpd->vgroup_mirror;
+ wpi.lock_flags= wpd->lock_flags;
+ wpi.vgroup_validmap= wpd->vgroup_validmap;
+ wpi.do_flip= RNA_boolean_get(itemptr, "pen_flip");
+ wpi.do_multipaint= (ts->multipaint != 0);
+ wpi.do_auto_normalize= (ts->auto_normalize != 0);
+ /* *** done setting up WeightPaintInfo *** */
+
+
+
swap_m4m4(wpd->vc.rv3d->persmat, mat);
-
+
+ use_vert_sel= (me->editflag & ME_EDIT_VERT_SEL) != 0;
+
/* which faces are involved */
if(wp->flag & VP_AREA) {
+ /* Ugly hack, to avoid drawing vertex index when getting the face index buffer - campbell */
+ me->editflag &= ~ME_EDIT_VERT_SEL;
totindex= sample_backbuf_area(vc, indexar, me->totface, mval[0], mval[1], brush_size(brush));
+ me->editflag |= use_vert_sel ? ME_EDIT_VERT_SEL : 0;
}
else {
indexar[0]= view3d_sample_backbuf(vc, mval[0], mval[1]);
@@ -1460,30 +2063,40 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
for(index=0; index<totindex; index++) {
if(indexar[index] && indexar[index]<=me->totface) {
MFace *mface= me->mface + (indexar[index]-1);
-
- (me->dvert+mface->v1)->flag= 1;
- (me->dvert+mface->v2)->flag= 1;
- (me->dvert+mface->v3)->flag= 1;
- if(mface->v4) (me->dvert+mface->v4)->flag= 1;
+
+ if(use_vert_sel) {
+ me->dvert[mface->v1].flag = (me->mvert[mface->v1].flag & SELECT);
+ me->dvert[mface->v2].flag = (me->mvert[mface->v2].flag & SELECT);
+ me->dvert[mface->v3].flag = (me->mvert[mface->v3].flag & SELECT);
+ if(mface->v4) me->dvert[mface->v4].flag = (me->mvert[mface->v4].flag & SELECT);
+ }
+ else {
+ me->dvert[mface->v1].flag= 1;
+ me->dvert[mface->v2].flag= 1;
+ me->dvert[mface->v3].flag= 1;
+ if(mface->v4) me->dvert[mface->v4].flag= 1;
+ }
if(brush->vertexpaint_tool==VP_BLUR) {
MDeformWeight *dw, *(*dw_func)(MDeformVert *, const int);
+ unsigned int fidx= mface->v4 ? 3:2;
if(wp->flag & VP_ONLYVGROUP)
dw_func= (MDeformWeight *(*)(MDeformVert *, const int))defvert_find_index;
else
dw_func= defvert_verify_index;
-
- dw= dw_func(me->dvert+mface->v1, ob->actdef-1);
- if(dw) {paintweight+= dw->weight; totw++;}
- dw= dw_func(me->dvert+mface->v2, ob->actdef-1);
- if(dw) {paintweight+= dw->weight; totw++;}
- dw= dw_func(me->dvert+mface->v3, ob->actdef-1);
- if(dw) {paintweight+= dw->weight; totw++;}
- if(mface->v4) {
- dw= dw_func(me->dvert+mface->v4, ob->actdef-1);
- if(dw) {paintweight+= dw->weight; totw++;}
- }
+
+ do {
+ unsigned int vidx= *(&mface->v1 + fidx);
+
+ dw= dw_func(me->dvert+vidx, ob->actdef-1);
+ if(dw) {
+ paintweight+= dw->weight;
+ totw++;
+ }
+
+ } while (fidx--);
+
}
}
}
@@ -1494,52 +2107,28 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
for(index=0; index<totindex; index++) {
if(indexar[index] && indexar[index]<=me->totface) {
- MFace *mface= me->mface + (indexar[index]-1);
-
- if((me->dvert+mface->v1)->flag) {
- alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*mface->v1, mval, pressure);
- if(alpha) {
- do_weight_paint_vertex(wp, ob, mface->v1,
- alpha, paintweight, flip, wpd->vgroup_mirror,
- wpd->vgroup_validmap);
- }
- (me->dvert+mface->v1)->flag= 0;
- }
-
- if((me->dvert+mface->v2)->flag) {
- alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*mface->v2, mval, pressure);
- if(alpha) {
- do_weight_paint_vertex(wp, ob, mface->v2,
- alpha, paintweight, flip, wpd->vgroup_mirror,
- wpd->vgroup_validmap);
- }
- (me->dvert+mface->v2)->flag= 0;
- }
-
- if((me->dvert+mface->v3)->flag) {
- alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*mface->v3, mval, pressure);
- if(alpha) {
- do_weight_paint_vertex(wp, ob, mface->v3,
- alpha, paintweight, flip, wpd->vgroup_mirror,
- wpd->vgroup_validmap);
- }
- (me->dvert+mface->v3)->flag= 0;
- }
-
- if((me->dvert+mface->v4)->flag) {
- if(mface->v4) {
- alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*mface->v4, mval, pressure);
+ MFace *mf= me->mface + (indexar[index]-1);
+ unsigned int fidx= mf->v4 ? 3:2;;
+ do {
+ unsigned int vidx= *(&mf->v1 + fidx);
+
+ if(me->dvert[vidx].flag) {
+ alpha= calc_vp_alpha_dl(wp, vc, wpd->wpimat, wpd->vertexcosnos+6*vidx, mval, pressure);
if(alpha) {
- do_weight_paint_vertex(wp, ob, mface->v4,
- alpha, paintweight, flip, wpd->vgroup_mirror,
- wpd->vgroup_validmap);
+ do_weight_paint_vertex(wp, ob, &wpi, vidx, alpha, paintweight);
}
- (me->dvert+mface->v4)->flag= 0;
+ me->dvert[vidx].flag= 0;
}
- }
+ } while (fidx--);
}
}
-
+
+
+ /* *** free wpi members */
+ MEM_freeN(wpi.defbase_sel);
+ /* *** dont freeing wpi members */
+
+
swap_m4m4(vc->rv3d->persmat, mat);
DAG_id_tag_update(ob->data, 0);
@@ -1559,7 +2148,9 @@ static void wpaint_stroke_done(bContext *C, struct PaintStroke *stroke)
if (wpd->vgroup_validmap)
MEM_freeN(wpd->vgroup_validmap);
-
+ if(wpd->lock_flags)
+ MEM_freeN(wpd->lock_flags);
+
MEM_freeN(wpd);
}
@@ -1633,7 +2224,7 @@ static int weight_paint_set_exec(bContext *C, wmOperator *UNUSED(op))
Object *obact = CTX_data_active_object(C);
wpaint_fill(scene->toolsettings->wpaint, obact, scene->toolsettings->vgroup_weight);
- ED_region_tag_redraw(CTX_wm_region(C)); // XXX - should redraw all 3D views
+ ED_region_tag_redraw(CTX_wm_region(C)); /* XXX - should redraw all 3D views */
return OPERATOR_FINISHED;
}
@@ -1645,7 +2236,7 @@ void PAINT_OT_weight_set(wmOperatorType *ot)
/* api callbacks */
ot->exec= weight_paint_set_exec;
- ot->poll= facemask_paint_poll;
+ ot->poll= mask_paint_poll; /* it was facemask_paint_poll */
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
@@ -1781,12 +2372,12 @@ static int vpaint_stroke_test_start(bContext *C, struct wmOperator *op, wmEvent
return 1;
}
-static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, int index, const float mval[2], float pressure, int UNUSED(flip))
+static void vpaint_paint_face(VPaint *vp, VPaintData *vpd, Object *ob, const unsigned int index, const float mval[2], float pressure, int UNUSED(flip))
{
ViewContext *vc = &vpd->vc;
Brush *brush = paint_brush(&vp->paint);
Mesh *me = get_mesh(ob);
- MFace *mface= ((MFace*)me->mface) + index;
+ MFace *mface= &me->mface[index];
unsigned int *mcol= ((unsigned int*)me->mcol) + 4*index;
unsigned int *mcolorig= ((unsigned int*)vp->vpaint_prev) + 4*index;
float alpha;
@@ -1971,6 +2562,6 @@ void PAINT_OT_weight_from_bones(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights.");
+ ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "Method to use for assigning weights");
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 2ee49f71a78..0bdb027a903 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -48,6 +48,7 @@
#include "BLI_rand.h"
#include "DNA_meshdata_types.h"
+#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_brush_types.h"
@@ -101,33 +102,6 @@ void ED_sculpt_force_update(bContext *C)
multires_force_update(ob);
}
-void ED_sculpt_modifiers_changed(Object *ob)
-{
- 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;
- }
-
- sculpt_free_deformMats(ob->sculpt);
- } else {
- PBVHNode **nodes;
- int n, totnode;
-
- BLI_pbvh_search_gather(ss->pbvh, NULL, NULL, &nodes, &totnode);
-
- for(n = 0; n < totnode; n++)
- BLI_pbvh_node_mark_update(nodes[n]);
-
- MEM_freeN(nodes);
- }
-}
-
/* 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)
@@ -2693,17 +2667,6 @@ static void sculpt_update_tex(Sculpt *sd, SculptSession *ss)
}
}
-void sculpt_free_deformMats(SculptSession *ss)
-{
- if(ss->orig_cos) MEM_freeN(ss->orig_cos);
- if(ss->deform_cos) MEM_freeN(ss->deform_cos);
- if(ss->deform_imats) MEM_freeN(ss->deform_imats);
-
- ss->orig_cos = NULL;
- ss->deform_cos = NULL;
- ss->deform_imats = NULL;
-}
-
void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_fmap)
{
DerivedMesh *dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
@@ -2740,7 +2703,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_
if(!ss->orig_cos) {
int a;
- sculpt_free_deformMats(ss);
+ free_sculptsession_deformMats(ss);
if(ss->kb) ss->orig_cos = key_to_vertcos(ob, ss->kb);
else ss->orig_cos = mesh_getVertexCos(ob->data, NULL);
@@ -2751,7 +2714,7 @@ void sculpt_update_mesh_elements(Scene *scene, Sculpt *sd, Object *ob, int need_
for(a = 0; a < ((Mesh*)ob->data)->totvert; ++a)
invert_m3(ss->deform_imats[a]);
}
- } else sculpt_free_deformMats(ss);
+ } else free_sculptsession_deformMats(ss);
/* if pbvh is deformed, key block is already applied to it */
if (ss->kb && !BLI_pbvh_isDeformed(ss->pbvh)) {
@@ -3033,7 +2996,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
copy_v3_v3(cache->true_location, cache->orig_grab_location);
sd->draw_anchored = 1;
- copy_v3_v3(sd->anchored_initial_mouse, cache->initial_mouse);
+ copy_v2_v2(sd->anchored_initial_mouse, cache->initial_mouse);
sd->anchored_size = cache->pixel_radius;
}
}
@@ -3273,7 +3236,7 @@ static void sculpt_brush_init_tex(Sculpt *sd, SculptSession *ss)
/* init mtex nodes */
if(mtex->tex && mtex->tex->nodetree)
- ntreeBeginExecTree(mtex->tex->nodetree); /* has internal flag to detect it only does it once */
+ ntreeTexBeginExecTree(mtex->tex->nodetree, 1); /* has internal flag to detect it only does it once */
/* TODO: Shouldn't really have to do this at the start of every
stroke, but sculpt would need some sort of notification when
@@ -3329,7 +3292,7 @@ static void sculpt_restore_mesh(Sculpt *sd, SculptSession *ss)
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) VECCOPY(vd.no, unode->no[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;
@@ -3454,7 +3417,7 @@ static void sculpt_brush_exit_tex(Sculpt *sd)
MTex *mtex= &brush->mtex;
if(mtex->tex && mtex->tex->nodetree)
- ntreeEndExecTree(mtex->tex->nodetree);
+ ntreeTexEndExecTree(mtex->tex->nodetree->execdata, 1);
}
static void sculpt_stroke_done(bContext *C, struct PaintStroke *UNUSED(stroke))
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 33970ea0179..c1da29aeb27 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -67,7 +67,7 @@ int sculpt_poll(struct bContext *C);
void sculpt_update_mesh_elements(struct Scene *scene, struct Sculpt *sd, struct Object *ob, int need_fmap);
/* Deformed mesh sculpt */
-void sculpt_free_deformMats(struct SculptSession *ss);
+void free_sculptsession_deformMats(struct SculptSession *ss);
/* Stroke */
struct SculptStroke *sculpt_stroke_new(const int max);
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index c4ea5c9478c..13b6fef3004 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -199,7 +199,7 @@ static void sculpt_undo_restore(bContext *C, ListBase *lb)
Mesh *me= ob->data;
mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
- sculpt_free_deformMats(ss);
+ free_sculptsession_deformMats(ss);
tag_update|= 1;
}
@@ -300,7 +300,7 @@ SculptUndoNode *sculpt_undo_push_node(Object *ob, PBVHNode *node)
BLI_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_ALL) {
copy_v3_v3(unode->co[vd.i], vd.co);
- if(vd.no) VECCOPY(unode->no[vd.i], vd.no)
+ if(vd.no) copy_v3_v3_short(unode->no[vd.i], vd.no);
else normal_float_to_short_v3(unode->no[vd.i], vd.fno);
if(vd.vert_indices) unode->index[vd.i]= vd.vert_indices[vd.i];
diff --git a/source/blender/editors/sound/sound_intern.h b/source/blender/editors/sound/sound_intern.h
index b17ef99132f..cde0b3c4479 100644
--- a/source/blender/editors/sound/sound_intern.h
+++ b/source/blender/editors/sound/sound_intern.h
@@ -36,7 +36,5 @@
struct wmOperatorType;
-void SOUND_OT_open(wmOperatorType *ot);
-
#endif /* ED_SOUND_INTERN_H */
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 70884d47c23..5b72e87f95a 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -119,7 +119,7 @@ static int open_exec(bContext *C, wmOperator *op)
info = AUD_getInfo(sound->playback_handle);
if (info.specs.channels == AUD_CHANNELS_INVALID) {
- sound_delete(C, sound);
+ sound_delete(bmain, sound);
if(op->customdata) MEM_freeN(op->customdata);
BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
return OPERATOR_CANCELLED;
@@ -175,7 +175,7 @@ static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
return WM_operator_filesel(C, op, event);
}
-void SOUND_OT_open(wmOperatorType *ot)
+static void SOUND_OT_open(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Open Sound";
@@ -192,11 +192,11 @@ void SOUND_OT_open(wmOperatorType *ot)
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH);
- RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory.");
- RNA_def_boolean(ot->srna, "mono", FALSE, "Mono", "Mixdown the sound to mono.");
+ RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
+ RNA_def_boolean(ot->srna, "mono", FALSE, "Mono", "Mixdown the sound to mono");
}
-void SOUND_OT_open_mono(wmOperatorType *ot)
+static void SOUND_OT_open_mono(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Open Sound Mono";
@@ -213,8 +213,8 @@ void SOUND_OT_open_mono(wmOperatorType *ot)
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH);
- RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory.");
- RNA_def_boolean(ot->srna, "mono", TRUE, "Mono", "Mixdown the sound to mono.");
+ RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
+ RNA_def_boolean(ot->srna, "mono", TRUE, "Mono", "Mixdown the sound to mono");
}
/******************** mixdown operator ********************/
@@ -436,7 +436,7 @@ static void mixdown_draw(bContext *C, wmOperator *op)
}
#endif // WITH_AUDASPACE
-void SOUND_OT_mixdown(wmOperatorType *ot)
+static void SOUND_OT_mixdown(wmOperatorType *ot)
{
#ifdef WITH_AUDASPACE
static EnumPropertyItem format_items[] = {
@@ -496,7 +496,7 @@ void SOUND_OT_mixdown(wmOperatorType *ot)
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH);
#ifdef WITH_AUDASPACE
- RNA_def_int(ot->srna, "accuracy", 1024, 1, 16777216, "Accuracy", "Sample accuracy. Important for animation data. The lower the value, the more accurate.", 1, 16777216);
+ RNA_def_int(ot->srna, "accuracy", 1024, 1, 16777216, "Accuracy", "Sample accuracy, important for animation data (the lower the value, the more accurate)", 1, 16777216);
RNA_def_enum(ot->srna, "container", container_items, AUD_CONTAINER_FLAC, "Container", "File format");
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");
@@ -569,7 +569,7 @@ static int sound_unpack_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if(G.fileflags & G_AUTOPACK)
- BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save.");
+ BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpackSound(CTX_data_main(C), op->reports, sound, method);
@@ -593,7 +593,7 @@ static int sound_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
return OPERATOR_CANCELLED;
if(G.fileflags & G_AUTOPACK)
- BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save.");
+ BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpack_menu(C, "SOUND_OT_unpack", sound->id.name+2, sound->name, "sounds", sound->packedfile);
@@ -616,8 +616,8 @@ static void SOUND_OT_unpack(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack.");
- RNA_def_string(ot->srna, "id", "", MAX_ID_NAME-2, "Sound Name", "Sound datablock name to unpack."); /* XXX, weark!, will fail with library, name collisions */
+ RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack");
+ RNA_def_string(ot->srna, "id", "", MAX_ID_NAME-2, "Sound Name", "Sound datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */
}
/* ******************************************************* */
@@ -659,7 +659,7 @@ static int update_animation_flags_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void SOUND_OT_update_animation_flags(wmOperatorType *ot)
+static void SOUND_OT_update_animation_flags(wmOperatorType *ot)
{
/*
This operator is needed to set a correct state of the sound animation
@@ -691,7 +691,7 @@ static int bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
update_animation_flags_exec(C, NULL);
- for(cfra = scene->r.sfra; cfra <= scene->r.efra; cfra++)
+ 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);
@@ -703,7 +703,7 @@ static int bake_animation_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void SOUND_OT_bake_animation(wmOperatorType *ot)
+static void SOUND_OT_bake_animation(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Update animation cache";
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index b5dfdcdc668..60662334e20 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -535,7 +535,7 @@ void ACTION_OT_paste (wmOperatorType *ot)
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 merking pasted keys and existing");
+ RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing");
}
/* ******************** Insert Keyframes Operator ************************* */
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index aa29e54f436..dc81fb1e8bc 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -580,7 +580,7 @@ void ACTION_OT_select_linked (wmOperatorType *ot)
/* identifiers */
ot->name = "Select Linked";
ot->idname= "ACTION_OT_select_linked";
- ot->description = "Select keyframes occurring the same F-Curves as selected ones";
+ ot->description = "Select keyframes occurring in the same F-Curves as selected ones";
/* api callbacks */
ot->exec= actkeys_select_linked_exec;
@@ -1139,7 +1139,7 @@ static void mouse_action_keys (bAnimContext *ac, const int mval[2], short select
static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
bAnimContext ac;
- ARegion *ar;
+ /* ARegion *ar; */ /* UNUSED */
short selectmode, column;
/* get editor data */
@@ -1147,7 +1147,7 @@ static int actkeys_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
return OPERATOR_CANCELLED;
/* get useful pointers from animation context data */
- ar= ac.ar;
+ /* ar= ac.ar; */ /* UNUSED */
/* select mode is either replace (deselect all, then add) or add/extend */
if (RNA_boolean_get(op->ptr, "extend"))
diff --git a/source/blender/editors/space_buttons/CMakeLists.txt b/source/blender/editors/space_buttons/CMakeLists.txt
index 631e2adea34..a9aaf6a6d58 100644
--- a/source/blender/editors/space_buttons/CMakeLists.txt
+++ b/source/blender/editors/space_buttons/CMakeLists.txt
@@ -21,6 +21,7 @@
set(INC
../include
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
diff --git a/source/blender/editors/space_buttons/SConscript b/source/blender/editors/space_buttons/SConscript
index a4270f1f59a..740353bc1f0 100644
--- a/source/blender/editors/space_buttons/SConscript
+++ b/source/blender/editors/space_buttons/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('*.c')
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../makesrna ../../render/extern/include ../../blenloader'
diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c
index e631718b0cb..b18b5373240 100644
--- a/source/blender/editors/space_buttons/buttons_header.c
+++ b/source/blender/editors/space_buttons/buttons_header.c
@@ -37,6 +37,7 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
#include "BKE_context.h"
@@ -124,24 +125,23 @@ void buttons_header_buttons(const bContext *C, ARegion *ar)
#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); \
+ 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, UI_translate_do_tooltip(_tip)); \
uiButClearFlag(but, UI_BUT_UNDO); \
} \
-
- BUTTON_HEADER_CTX(BCONTEXT_RENDER, ICON_SCENE, "Render")
- BUTTON_HEADER_CTX(BCONTEXT_SCENE, ICON_SCENE_DATA, "Scene");
- BUTTON_HEADER_CTX(BCONTEXT_WORLD, ICON_WORLD, "World");
- BUTTON_HEADER_CTX(BCONTEXT_OBJECT, ICON_OBJECT_DATA, "Object");
- BUTTON_HEADER_CTX(BCONTEXT_CONSTRAINT, ICON_CONSTRAINT, "Object Constraints");
- BUTTON_HEADER_CTX(BCONTEXT_MODIFIER, ICON_MODIFIER, "Object Modifiers");
- BUTTON_HEADER_CTX(BCONTEXT_DATA, sbuts->dataicon, "Object Data");
- BUTTON_HEADER_CTX(BCONTEXT_BONE, ICON_BONE_DATA, "Bone");
- BUTTON_HEADER_CTX(BCONTEXT_BONE_CONSTRAINT, ICON_CONSTRAINT_BONE, "Bone Constraints");
- BUTTON_HEADER_CTX(BCONTEXT_MATERIAL, ICON_MATERIAL, "Material");
- BUTTON_HEADER_CTX(BCONTEXT_TEXTURE, ICON_TEXTURE, "Textures");
- BUTTON_HEADER_CTX(BCONTEXT_PARTICLE, ICON_PARTICLES, "Particles");
- BUTTON_HEADER_CTX(BCONTEXT_PHYSICS, ICON_PHYSICS, "Physics");
+ BUTTON_HEADER_CTX(BCONTEXT_RENDER, ICON_SCENE, N_("Render"))
+ BUTTON_HEADER_CTX(BCONTEXT_SCENE, ICON_SCENE_DATA, N_("Scene"));
+ BUTTON_HEADER_CTX(BCONTEXT_WORLD, ICON_WORLD, N_("World"));
+ BUTTON_HEADER_CTX(BCONTEXT_OBJECT, ICON_OBJECT_DATA, N_("Object"));
+ BUTTON_HEADER_CTX(BCONTEXT_CONSTRAINT, ICON_CONSTRAINT, N_("Object Constraints"));
+ BUTTON_HEADER_CTX(BCONTEXT_MODIFIER, ICON_MODIFIER, N_("Object Modifiers"));
+ BUTTON_HEADER_CTX(BCONTEXT_DATA, sbuts->dataicon, N_("Object Data"));
+ BUTTON_HEADER_CTX(BCONTEXT_BONE, ICON_BONE_DATA, N_("Bone"));
+ BUTTON_HEADER_CTX(BCONTEXT_BONE_CONSTRAINT, ICON_CONSTRAINT_BONE, N_("Bone Constraints"));
+ BUTTON_HEADER_CTX(BCONTEXT_MATERIAL, ICON_MATERIAL, N_("Material"));
+ BUTTON_HEADER_CTX(BCONTEXT_TEXTURE, ICON_TEXTURE, N_("Textures"));
+ BUTTON_HEADER_CTX(BCONTEXT_PARTICLE, ICON_PARTICLES, N_("Particles"));
+ BUTTON_HEADER_CTX(BCONTEXT_PHYSICS, ICON_PHYSICS, N_("Physics"));
#undef BUTTON_HEADER_CTX
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 4707baa279b..cb2b5c47ff3 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -54,6 +54,14 @@
#include "console_intern.h"
+/* so when we type - the view scrolls to the bottom */
+static void console_scroll_bottom(ARegion *ar)
+{
+ View2D *v2d= &ar->v2d;
+ v2d->cur.ymin = 0.0;
+ v2d->cur.ymax =(float)v2d->winy;
+}
+
static void console_textview_update_rect(SpaceConsole *sc, ARegion *ar)
{
View2D *v2d= &ar->v2d;
@@ -339,9 +347,14 @@ static int move_exec(bContext *C, wmOperator *op)
}
if(done) {
- ED_area_tag_redraw(CTX_wm_area(C));
+ ScrArea *sa= CTX_wm_area(C);
+ ARegion *ar= CTX_wm_region(C);
+
+ ED_area_tag_redraw(sa);
+ console_scroll_bottom(ar);
}
-
+
+
return OPERATOR_FINISHED;
}
@@ -357,7 +370,7 @@ void CONSOLE_OT_move(wmOperatorType *ot)
ot->poll= ED_operator_console_active;
/* properties */
- RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to.");
+ RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
}
#define TAB_LENGTH 4
@@ -391,7 +404,9 @@ static int insert_exec(bContext *C, wmOperator *op)
console_textview_update_rect(sc, ar);
ED_area_tag_redraw(CTX_wm_area(C));
-
+
+ console_scroll_bottom(ar);
+
return OPERATOR_FINISHED;
}
@@ -427,7 +442,7 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
ot->poll= ED_operator_console_active;
/* properties */
- RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");
+ RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
}
@@ -478,6 +493,8 @@ static int delete_exec(bContext *C, wmOperator *op)
console_textview_update_rect(sc, ar);
ED_area_tag_redraw(CTX_wm_area(C));
+
+ console_scroll_bottom(ar);
return OPERATOR_FINISHED;
}
@@ -495,7 +512,7 @@ void CONSOLE_OT_delete(wmOperatorType *ot)
ot->poll= ED_operator_console_active;
/* properties */
- RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete.");
+ RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete");
}
@@ -589,6 +606,8 @@ static int history_cycle_exec(bContext *C, wmOperator *op)
console_textview_update_rect(sc, ar);
ED_area_tag_redraw(CTX_wm_area(C));
+ console_scroll_bottom(ar);
+
return OPERATOR_FINISHED;
}
@@ -604,7 +623,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
ot->poll= ED_operator_console_active;
/* properties */
- RNA_def_boolean(ot->srna, "reverse", 0, "Reverse", "reverse cycle history");
+ RNA_def_boolean(ot->srna, "reverse", 0, "Reverse", "Reverse cycle history");
}
@@ -612,6 +631,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
static int history_append_exec(bContext *C, wmOperator *op)
{
SpaceConsole *sc= CTX_wm_space_console(C);
+ ARegion *ar= CTX_wm_region(C);
ScrArea *sa= CTX_wm_area(C);
ConsoleLine *ci= console_history_verify(C);
char *str= RNA_string_get_alloc(op->ptr, "text", NULL, 0); /* own this text in the new line, dont free */
@@ -637,6 +657,8 @@ static int history_append_exec(bContext *C, wmOperator *op)
ED_area_tag_redraw(sa);
+ console_scroll_bottom(ar);
+
return OPERATOR_FINISHED;
}
@@ -652,8 +674,8 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
ot->poll= ED_operator_console_active;
/* properties */
- RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");
- RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, "Cursor", "The index of the cursor.", 0, 10000);
+ RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
+ RNA_def_int(ot->srna, "current_character", 0, 0, INT_MAX, "Cursor", "The index of the cursor", 0, 10000);
RNA_def_boolean(ot->srna, "remove_duplicates", 0, "Remove Duplicates", "Remove duplicate items in the history");
}
@@ -706,8 +728,8 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
ot->poll= ED_operator_console_active;
/* properties */
- RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");
- RNA_def_enum(ot->srna, "type", console_line_type_items, CONSOLE_LINE_OUTPUT, "Type", "Console output type.");
+ RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
+ RNA_def_enum(ot->srna, "type", console_line_type_items, CONSOLE_LINE_OUTPUT, "Type", "Console output type");
}
@@ -825,6 +847,8 @@ static int paste_exec(bContext *C, wmOperator *UNUSED(op))
console_textview_update_rect(sc, ar);
ED_area_tag_redraw(CTX_wm_area(C));
+ console_scroll_bottom(ar);
+
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index c8fa049f5eb..5a965fc076b 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -138,8 +138,17 @@ static void console_main_area_init(wmWindowManager *wm, ARegion *ar)
wmKeyMap *keymap;
ListBase *lb;
+ const int prev_y_min= ar->v2d.cur.ymin; /* so resizing keeps the cursor visible */
+
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_CUSTOM, ar->winx, ar->winy);
+ /* always keep the bottom part of the view aligned, less annoying */
+ if(prev_y_min != ar->v2d.cur.ymin) {
+ const float cur_y_range= ar->v2d.cur.ymax - ar->v2d.cur.ymin;
+ ar->v2d.cur.ymin= prev_y_min;
+ ar->v2d.cur.ymax= prev_y_min + cur_y_range;
+ }
+
/* own keymap */
keymap= WM_keymap_find(wm->defaultconf, "Console", SPACE_CONSOLE, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index 9fecfda7764..b2b734159ff 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -50,6 +50,7 @@
#include "BKE_main.h"
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "IMB_imbuf_types.h"
@@ -181,7 +182,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
but = uiDefButTextO(block, TEX, "FILE_OT_directory", 0, "",
min_x, line1_y, line1_w-chan_offs, btn_h,
params->dir, 0.0, (float)FILE_MAX-1, 0, 0,
- "File path.");
+ UI_translate_do_tooltip(N_("File path")));
uiButSetCompleteFunc(but, autocomplete_directory, NULL);
uiButSetFlag(but, UI_BUT_NO_UTF8);
@@ -189,7 +190,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
but = uiDefBut(block, TEX, B_FS_FILENAME, "",
min_x, line2_y, line2_w-chan_offs, btn_h,
params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0,
- overwrite_alert ?"File name, overwrite existing." : "File name.");
+ UI_translate_do_tooltip(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
uiButSetCompleteFunc(but, autocomplete_file, NULL);
uiButSetFlag(but, UI_BUT_NO_UTF8);
@@ -209,13 +210,13 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMOUT,
min_x + line2_w + separator - chan_offs, line2_y,
btn_fn_w, btn_h,
- "Decrement the filename number");
+ UI_translate_do_tooltip(N_("Decrement the filename number")));
RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", -1);
but = uiDefIconButO(block, BUT, "FILE_OT_filenum", 0, ICON_ZOOMIN,
min_x + line2_w + separator + btn_fn_w - chan_offs, line2_y,
btn_fn_w, btn_h,
- "Increment the filename number");
+ UI_translate_do_tooltip(N_("Increment the filename number")));
RNA_int_set(uiButGetOperatorPtrRNA(but), "increment", 1);
uiBlockEndAlign(block);
}
@@ -226,9 +227,9 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
uiDefButO(block, BUT, "FILE_OT_execute", WM_OP_EXEC_REGION_WIN, params->title,
max_x - loadbutton, line1_y, loadbutton, btn_h,
params->title);
- uiDefButO(block, BUT, "FILE_OT_cancel", WM_OP_EXEC_REGION_WIN, "Cancel",
+ uiDefButO(block, BUT, "FILE_OT_cancel", WM_OP_EXEC_REGION_WIN, UI_translate_do_iface(N_("Cancel")),
max_x - loadbutton, line2_y, loadbutton, btn_h,
- "Cancel");
+ UI_translate_do_tooltip(N_("Cancel")));
}
uiEndBlock(C, block);
@@ -239,7 +240,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
static void draw_tile(int sx, int sy, int width, int height, int colorid, int shade)
{
UI_ThemeColorShade(colorid, shade);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiRoundBox((float)sx, (float)(sy - height), (float)(sx + width), (float)sy, 5.0f);
}
@@ -295,7 +296,7 @@ static void file_draw_icon(uiBlock *block, char *path, int sx, int sy, int icon,
static void file_draw_string(int sx, int sy, const char* string, float width, int height, short align)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiFontStyle fs = style->widgetlabel;
rcti rect;
char fname[FILE_MAXFILE];
@@ -507,7 +508,7 @@ void file_draw_list(const bContext *C, ARegion *ar)
draw_tile(sx, sy-1, layout->tile_w+4, sfile->layout->tile_h+layout->tile_border_y, colorid, shade);
}
}
- uiSetRoundBox(0);
+ uiSetRoundBox(UI_CNR_NONE);
if ( FILE_IMGDISPLAY == params->display ) {
is_icon = 0;
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 1b0893e50e0..e61d7693d19 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -164,22 +164,26 @@ static FileSelect file_select_do(bContext* C, int selected_idx)
SpaceFile *sfile= CTX_wm_space_file(C);
FileSelectParams *params = ED_fileselect_get_params(sfile);
int numfiles = filelist_numfiles(sfile->files);
+ struct direntry* file;
/* make the selected file active */
- if ( (selected_idx >= 0) && (selected_idx < numfiles)) {
- struct direntry* file = filelist_file(sfile->files, selected_idx);
+ if ( (selected_idx >= 0) &&
+ (selected_idx < numfiles) &&
+ (file= filelist_file(sfile->files, selected_idx)))
+ {
params->active_file = selected_idx;
- if(file && S_ISDIR(file->type)) {
+ if(S_ISDIR(file->type)) {
/* the path is too long and we are not going up! */
- if (strcmp(file->relname, "..") && strlen(params->dir) + strlen(file->relname) >= FILE_MAX )
- {
+ if (strcmp(file->relname, "..") && strlen(params->dir) + strlen(file->relname) >= FILE_MAX ) {
// XXX error("Path too long, cannot enter this directory");
- } else {
- if (strcmp(file->relname, "..")==0) {
- /* avoids /../../ */
- BLI_parent_dir(params->dir);
- } else {
+ }
+ else {
+ if (strcmp(file->relname, "..")==0) {
+ /* avoids /../../ */
+ BLI_parent_dir(params->dir);
+ }
+ else {
BLI_cleanup_dir(G.main->name, params->dir);
strcat(params->dir, file->relname);
BLI_add_slash(params->dir);
@@ -189,8 +193,7 @@ static FileSelect file_select_do(bContext* C, int selected_idx)
retval = FILE_SELECT_DIR;
}
}
- else if (file)
- {
+ else {
if (file->relname) {
BLI_strncpy(params->file, file->relname, FILE_MAXFILE);
}
@@ -354,8 +357,8 @@ void FILE_OT_select(wmOperatorType *ot)
ot->poll= ED_operator_file_active;
/* rna */
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first.");
- RNA_def_boolean(ot->srna, "fill", 0, "Fill", "Select everything beginning with the last selection.");
+ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "fill", 0, "Fill", "Select everything beginning with the last selection");
}
static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op))
@@ -767,7 +770,7 @@ void FILE_OT_execute(struct wmOperatorType *ot)
ot->exec= file_exec;
ot->poll= file_operator_poll;
- RNA_def_boolean(ot->srna, "need_active", 0, "Need Active", "Only execute if there's an active selected file in the file list.");
+ RNA_def_boolean(ot->srna, "need_active", 0, "Need Active", "Only execute if there's an active selected file in the file list");
}
@@ -977,7 +980,7 @@ void FILE_OT_smoothscroll(wmOperatorType *ot)
/* identifiers */
ot->name= "Smooth Scroll";
ot->idname= "FILE_OT_smoothscroll";
- ot->description="Smooth scroll to make editable file visible.";
+ ot->description="Smooth scroll to make editable file visible";
/* api callbacks */
ot->invoke= file_smoothscroll_invoke;
@@ -1017,7 +1020,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;
}
@@ -1031,7 +1034,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;
}
}
@@ -1040,7 +1043,7 @@ int file_directory_new_exec(bContext *C, wmOperator *op)
BLI_recurdir_fileops(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;
}
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 959b1ddf1b5..37dce293d77 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -37,6 +37,8 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_userdef_types.h"
@@ -144,7 +146,7 @@ static void file_panel_bookmarks(const bContext *C, Panel *pa)
if(sfile) {
row= uiLayoutRow(pa->layout, 0);
- uiItemO(row, "Add", ICON_ZOOMIN, "file.bookmark_add");
+ uiItemO(row, UI_translate_do_iface(N_("Add")), ICON_ZOOMIN, "file.bookmark_add");
uiItemL(row, NULL, ICON_NONE);
file_panel_category(C, pa, FS_CATEGORY_BOOKMARKS, &sfile->bookmarknr, ICON_BOOKMARKS, 1, 0);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 7382188d62a..c7ada4a5801 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1158,8 +1158,8 @@ void filelist_from_main(struct FileList *filelist)
/* XXXXX TODO: if databrowse F4 or append/link filelist->hide_parent has to be set */
if (!filelist->hide_parent) filelist->numfiles+= 1;
- filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry));
-
+ filelist->filelist= filelist->numfiles > 0 ? (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry)) : NULL;
+
files = filelist->filelist;
if (!filelist->hide_parent) {
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 6773dfb6b2d..1e113abfcd2 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -376,7 +376,7 @@ float file_shorten_string(char* string, float w, int front)
shortened = 1;
}
if (shortened) {
- int slen = strlen(s);
+ int slen = strlen(s);
BLI_strncpy(temp+3, s, slen+1);
temp[slen+4] = '\0';
BLI_strncpy(string, temp, slen+4);
@@ -393,7 +393,7 @@ float file_shorten_string(char* string, float w, int front)
if (shortened) {
int slen = strlen(string);
if (slen > 3) {
- BLI_strncpy(string+slen-3, "...", 4);
+ BLI_strncpy(string+slen-3, "...", 4);
}
}
}
@@ -403,7 +403,7 @@ float file_shorten_string(char* string, float w, int front)
float file_string_width(const char* str)
{
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiStyleFontSet(&style->widget);
return BLF_width(style->widget.uifont_id, str);
}
@@ -413,12 +413,12 @@ float file_font_pointsize(void)
#if 0
float s;
char tmp[2] = "X";
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiStyleFontSet(&style->widget);
s = BLF_height(style->widget.uifont_id, tmp);
return style->widget.points;
#else
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
uiStyleFontSet(&style->widget);
return style->widget.points * UI_DPI_FAC;
#endif
diff --git a/source/blender/editors/space_graph/CMakeLists.txt b/source/blender/editors/space_graph/CMakeLists.txt
index 80205ad5564..28383b29b36 100644
--- a/source/blender/editors/space_graph/CMakeLists.txt
+++ b/source/blender/editors/space_graph/CMakeLists.txt
@@ -21,6 +21,7 @@
set(INC
../include
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
diff --git a/source/blender/editors/space_graph/SConscript b/source/blender/editors/space_graph/SConscript
index 75d0927192b..fe8846d2c30 100644
--- a/source/blender/editors/space_graph/SConscript
+++ b/source/blender/editors/space_graph/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('*.c')
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
+incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' #/intern/audaspace/intern ../../blenloader'
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index f3a70c496ef..28fd1cd3304 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -46,6 +46,8 @@
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_fcurve.h"
@@ -673,7 +675,7 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* 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, "Delete target variable.");
+ 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, "Delete target variable");
uiButSetFunc(but, driver_delete_var_cb, driver, dvar);
uiBlockSetEmboss(block, UI_EMBOSS);
@@ -750,7 +752,8 @@ static void graph_panel_modifiers(const bContext *C, Panel *pa)
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, "Add Modifier", 10, 0, 150, 20, "Adds a new F-Curve Modifier for the active F-Curve");
+ uiDefButO(block, BUT, "GRAPH_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, UI_translate_do_iface(N_("Add Modifier")), 10, 0, 150, 20,
+ UI_translate_do_tooltip(N_("Adds a new F-Curve Modifier for the active F-Curve")));
/* copy/paste (as sub-row)*/
row= uiLayoutRow(row, 1);
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 900aa6f6197..90bfadd0b5a 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -763,7 +763,7 @@ void GRAPH_OT_paste (wmOperatorType *ot)
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 merking pasted keys and existing");
+ RNA_def_enum(ot->srna, "merge", keyframe_paste_merge_items, KEYFRAME_PASTE_MERGE_MIX, "Type", "Method of merging pasted keys and existing");
}
/* ******************** Duplicate Keyframes Operator ************************* */
@@ -1677,13 +1677,13 @@ 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 */
@@ -2134,7 +2134,7 @@ static int graph_fmodifier_add_exec(bContext *C, wmOperator *op)
if (fcm)
set_active_fmodifier(&fcu->modifiers, fcm);
else {
- BKE_report(op->reports, RPT_ERROR, "Modifier couldn't be added. See console for details.");
+ BKE_report(op->reports, RPT_ERROR, "Modifier couldn't be added, see console for details");
break;
}
}
@@ -2167,7 +2167,7 @@ void GRAPH_OT_fmodifier_add (wmOperatorType *ot)
/* id-props */
ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
- RNA_def_boolean(ot->srna, "only_active", 1, "Only Active", "Only add F-Modifier to active F-Curve.");
+ RNA_def_boolean(ot->srna, "only_active", 1, "Only Active", "Only add F-Modifier to active F-Curve");
}
/* ******************** Copy F-Modifiers Operator *********************** */
@@ -2213,7 +2213,7 @@ void GRAPH_OT_fmodifier_copy (wmOperatorType *ot)
/* identifiers */
ot->name= "Copy F-Modifiers";
ot->idname= "GRAPH_OT_fmodifier_copy";
- ot->description= "Copy the F-Modifier(s) of the active F-Curve.";
+ ot->description= "Copy the F-Modifier(s) of the active F-Curve";
/* api callbacks */
ot->exec= graph_fmodifier_copy_exec;
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 0d7cdf94bc7..46918407447 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -41,6 +41,7 @@
#include "BLI_utildefines.h"
#include "BKE_context.h"
+#include "BKE_main.h"
#include "BKE_sound.h"
#include "UI_view2d.h"
@@ -70,6 +71,7 @@
/* 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);
@@ -78,7 +80,7 @@ static void graphview_cursor_apply(bContext *C, wmOperator *op)
*/
CFRA= RNA_int_get(op->ptr, "frame");
SUBFRA=0.f;
- sound_seek_scene(C);
+ sound_seek_scene(bmain, scene);
/* set the cursor value */
sipo->cursorVal= RNA_float_get(op->ptr, "value");
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index b8c5d79df18..40380db03d4 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -585,7 +585,7 @@ void GRAPH_OT_select_linked (wmOperatorType *ot)
/* identifiers */
ot->name = "Select Linked";
ot->idname= "GRAPH_OT_select_linked";
- ot->description = "Select keyframes occurring the same F-Curves as selected ones";
+ ot->description = "Select keyframes occurring in the same F-Curves as selected ones";
/* api callbacks */
ot->exec= graphkeys_select_linked_exec;
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 4011f038be8..71d9dd3adcb 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -510,7 +510,7 @@ static void image_pack_cb(bContext *C, void *ima_v, void *iuser_v)
else {
ImBuf *ibuf= BKE_image_get_ibuf(ima, iuser_v);
if (ibuf && (ibuf->userflags & IB_BITMAPDIRTY)) {
- // XXX error("Can't pack painted image. Save image or use Repack as PNG.");
+ // XXX error("Can't pack painted image. Save image or use Repack as PNG");
} else {
ima->packedfile = newPackedFile(NULL, ima->name); /* XXX report errors */
ED_undo_push(C, "Pack image");
@@ -587,7 +587,7 @@ static void uiblock_layer_pass_arrow_buttons(uiLayout *layout, RenderResult *rr,
if(rr==NULL || iuser==NULL)
return;
if(rr->layers.first==NULL) {
- uiItemL(row, "No Layers in Render Result.", ICON_NONE);
+ uiItemL(row, "No Layers in Render Result", ICON_NONE);
return;
}
@@ -784,7 +784,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
uiItemR(col, userptr, "frame_duration", 0, str, ICON_NONE);
if(ima->anim) {
block= uiLayoutGetBlock(col);
- but= uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence.");
+ but= uiDefBut(block, BUT, 0, "Match Movie Length", 0, 0, UI_UNIT_X*2, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Set the number of frames to match the movie or sequence");
uiButSetFunc(but, set_frames_cb, ima, iuser);
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 68f9e4d033e..45bd1d58a53 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -303,7 +303,7 @@ void IMAGE_OT_view_pan(wmOperatorType *ot)
/* properties */
RNA_def_float_vector(ot->srna, "offset", 2, NULL, -FLT_MAX, FLT_MAX,
- "Offset", "Offset in floating point units, 1.0 is the width and height of the image.", -FLT_MAX, FLT_MAX);
+ "Offset", "Offset in floating point units, 1.0 is the width and height of the image", -FLT_MAX, FLT_MAX);
}
/********************** view zoom operator *********************/
@@ -434,7 +434,7 @@ void IMAGE_OT_view_zoom(wmOperatorType *ot)
/* properties */
RNA_def_float(ot->srna, "factor", 0.0f, 0.0f, FLT_MAX,
- "Factor", "Zoom factor, values higher than 1.0 zoom in, lower values zoom out.", -FLT_MAX, FLT_MAX);
+ "Factor", "Zoom factor, values higher than 1.0 zoom in, lower values zoom out", -FLT_MAX, FLT_MAX);
}
/********************** NDOF operator *********************/
@@ -696,7 +696,7 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot)
/* properties */
RNA_def_float(ot->srna, "ratio", 0.0f, 0.0f, FLT_MAX,
- "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out.", -FLT_MAX, FLT_MAX);
+ "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out", -FLT_MAX, FLT_MAX);
}
/**************** load/replace/save callbacks ******************/
@@ -777,7 +777,7 @@ static int open_exec(bContext *C, wmOperator *op)
if(!ima) {
if(op->customdata) MEM_freeN(op->customdata);
- BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s.", str, errno ? strerror(errno) : "Unsupported image format");
+ BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s", str, errno ? strerror(errno) : "Unsupported image format");
return OPERATOR_CANCELLED;
}
@@ -1208,7 +1208,7 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
/* properties */
/* format options */
- RNA_def_enum(ot->srna, "file_format", image_file_type_items, R_PNG, "File Type", "File type to save image as.");
+ RNA_def_enum(ot->srna, "file_format", image_file_type_items, R_PNG, "File Type", "File type to save image as");
RNA_def_enum(ot->srna, "color_mode", image_color_mode_items, R_PLANES24, "Channels", "Image channels to save");
prop= RNA_def_int(ot->srna, "file_quality", 90, 0, 100, "Quality", "", 0, 100);
RNA_def_property_subtype(prop, PROP_PERCENTAGE);
@@ -1234,7 +1234,7 @@ static int save_exec(bContext *C, wmOperator *op)
save_image_doit(C, sima, op, &simopts, FALSE);
}
else {
- BKE_reportf(op->reports, RPT_ERROR, "Can not save image, path '%s' is not writable.", simopts.filepath);
+ BKE_reportf(op->reports, RPT_ERROR, "Can not save image, path '%s' is not writable", simopts.filepath);
return OPERATOR_CANCELLED;
}
@@ -1269,12 +1269,12 @@ static int save_sequence_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if(sima->image->source!=IMA_SRC_SEQUENCE) {
- BKE_report(op->reports, RPT_ERROR, "Can only save sequence on image sequences.");
+ BKE_report(op->reports, RPT_ERROR, "Can only save sequence on image sequences");
return OPERATOR_CANCELLED;
}
if(sima->image->type==IMA_TYPE_MULTILAYER) {
- BKE_report(op->reports, RPT_ERROR, "Can't save multilayer sequences.");
+ BKE_report(op->reports, RPT_ERROR, "Can't save multilayer sequences");
return OPERATOR_CANCELLED;
}
@@ -1284,7 +1284,7 @@ static int save_sequence_exec(bContext *C, wmOperator *op)
tot++;
if(tot==0) {
- BKE_report(op->reports, RPT_WARNING, "No images have been changed.");
+ BKE_report(op->reports, RPT_WARNING, "No images have been changed");
return OPERATOR_CANCELLED;
}
@@ -1306,7 +1306,7 @@ static int save_sequence_exec(bContext *C, wmOperator *op)
BLI_path_abs(name, bmain->name);
if(0 == IMB_saveiff(ibuf, name, IB_rect | IB_zbuf | IB_zbuffloat)) {
- BKE_reportf(op->reports, RPT_ERROR, "Could not write image %s.", name);
+ BKE_reportf(op->reports, RPT_ERROR, "Could not write image %s", name);
break;
}
@@ -1450,14 +1450,14 @@ void IMAGE_OT_new(wmOperatorType *ot)
ot->flag= OPTYPE_UNDO;
/* properties */
- RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME-2, "Name", "Image datablock name.");
- RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width.", 1, 16384);
- RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height.", 1, 16384);
- prop= RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, "Color", "Default fill color.", 0.0f, 1.0f);
+ RNA_def_string(ot->srna, "name", "untitled", MAX_ID_NAME-2, "Name", "Image datablock name");
+ RNA_def_int(ot->srna, "width", 1024, 1, INT_MAX, "Width", "Image width", 1, 16384);
+ RNA_def_int(ot->srna, "height", 1024, 1, INT_MAX, "Height", "Image height", 1, 16384);
+ prop= RNA_def_float_color(ot->srna, "color", 4, NULL, 0.0f, FLT_MAX, "Color", "Default fill color", 0.0f, 1.0f);
RNA_def_property_float_array_default(prop, default_color);
- RNA_def_boolean(ot->srna, "alpha", 1, "Alpha", "Create an image with an alpha channel.");
- RNA_def_boolean(ot->srna, "uv_test_grid", 0, "UV Test Grid", "Fill the image with a grid for UV map testing.");
- RNA_def_boolean(ot->srna, "float", 0, "32 bit Float", "Create image with 32 bit floating point bit depth.");
+ RNA_def_boolean(ot->srna, "alpha", 1, "Alpha", "Create an image with an alpha channel");
+ RNA_def_boolean(ot->srna, "uv_test_grid", 0, "UV Test Grid", "Fill the image with a grid for UV map testing");
+ RNA_def_boolean(ot->srna, "float", 0, "32 bit Float", "Create image with 32 bit floating point bit depth");
}
/********************* invert operators *********************/
@@ -1558,7 +1558,7 @@ static int pack_test(bContext *C, wmOperator *op)
return 0;
if(ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
- BKE_report(op->reports, RPT_ERROR, "Packing movies or image sequences not supported.");
+ BKE_report(op->reports, RPT_ERROR, "Packing movies or image sequences not supported");
return 0;
}
@@ -1575,7 +1575,7 @@ static int pack_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if(!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
- BKE_report(op->reports, RPT_ERROR, "Can't pack edited image from disk, only as internal PNG.");
+ BKE_report(op->reports, RPT_ERROR, "Can't pack edited image from disk, only as internal PNG");
return OPERATOR_CANCELLED;
}
@@ -1627,7 +1627,7 @@ void IMAGE_OT_pack(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "as_png", 0, "Pack As PNG", "Pack image as lossless PNG.");
+ RNA_def_boolean(ot->srna, "as_png", 0, "Pack As PNG", "Pack image as lossless PNG");
}
/********************* unpack operator *********************/
@@ -1649,12 +1649,12 @@ static int image_unpack_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
if(ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
- BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported.");
+ BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported");
return OPERATOR_CANCELLED;
}
if(G.fileflags & G_AUTOPACK)
- BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save.");
+ BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
/* XXX unpackImage frees image buffers */
ED_preview_kill_jobs(C);
@@ -1677,12 +1677,12 @@ static int image_unpack_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
return OPERATOR_CANCELLED;
if(ima->source==IMA_SRC_SEQUENCE || ima->source==IMA_SRC_MOVIE) {
- BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported.");
+ BKE_report(op->reports, RPT_ERROR, "Unpacking movies or image sequences not supported");
return OPERATOR_CANCELLED;
}
if(G.fileflags & G_AUTOPACK)
- BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save.");
+ BKE_report(op->reports, RPT_WARNING, "AutoPack is enabled, so image will be packed again on file save");
unpack_menu(C, "IMAGE_OT_unpack", ima->id.name+2, ima->name, "textures", ima->packedfile);
@@ -1704,8 +1704,8 @@ void IMAGE_OT_unpack(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack.");
- RNA_def_string(ot->srna, "id", "", MAX_ID_NAME-2, "Image Name", "Image datablock name to unpack."); /* XXX, weark!, will fail with library, name collisions */
+ RNA_def_enum(ot->srna, "method", unpack_method_items, PF_USE_LOCAL, "Method", "How to unpack");
+ RNA_def_string(ot->srna, "id", "", MAX_ID_NAME-2, "Image Name", "Image datablock name to unpack"); /* XXX, weark!, will fail with library, name collisions */
}
/******************** sample image operator ********************/
@@ -2049,7 +2049,7 @@ void IMAGE_OT_curves_point_set(wmOperatorType *ot)
ot->poll= space_image_main_area_poll;
/* properties */
- RNA_def_enum(ot->srna, "point", point_items, 0, "Point", "Set black point or white point for curves.");
+ RNA_def_enum(ot->srna, "point", point_items, 0, "Point", "Set black point or white point for curves");
}
/******************** record composite operator *********************/
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index afab4ede229..e345caf1359 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -595,7 +595,7 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
tf = EM_get_active_mtface(em, NULL, NULL, 1); /* partially selected face is ok */
- if(tf && (tf->mode & TF_TEX)) {
+ if(tf) {
/* don't need to check for pin here, see above */
sima->image= tf->tpage;
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index e09565d38e9..6c5a6f78e90 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -151,7 +151,7 @@ static int unpack_all_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event)
count = countPackedFiles(bmain);
if(!count) {
- BKE_report(op->reports, RPT_WARNING, "No packed files. Autopack disabled.");
+ BKE_report(op->reports, RPT_WARNING, "No packed files. Autopack disabled");
G.fileflags &= ~G_AUTOPACK;
return OPERATOR_CANCELLED;
}
@@ -186,7 +186,7 @@ void FILE_OT_unpack_all(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "method", unpack_all_method_items, PF_USE_LOCAL, "Method", "How to unpack.");
+ RNA_def_enum(ot->srna, "method", unpack_all_method_items, PF_USE_LOCAL, "Method", "How to unpack");
}
/********************* make paths relative operator *********************/
@@ -196,7 +196,7 @@ static int make_paths_relative_exec(bContext *C, wmOperator *op)
Main *bmain= CTX_data_main(C);
if(!G.relbase_valid) {
- BKE_report(op->reports, RPT_WARNING, "Can't set relative paths with an unsaved blend file.");
+ BKE_report(op->reports, RPT_WARNING, "Can't set relative paths with an unsaved blend file");
return OPERATOR_CANCELLED;
}
@@ -228,7 +228,7 @@ static int make_paths_absolute_exec(bContext *C, wmOperator *op)
Main *bmain= CTX_data_main(C);
if(!G.relbase_valid) {
- BKE_report(op->reports, RPT_WARNING, "Can't set absolute paths with an unsaved blend file.");
+ BKE_report(op->reports, RPT_WARNING, "Can't set absolute paths with an unsaved blend file");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/space_info/info_report.c b/source/blender/editors/space_info/info_report.c
index c8bda434227..d0a80cddf56 100644
--- a/source/blender/editors/space_info/info_report.c
+++ b/source/blender/editors/space_info/info_report.c
@@ -160,7 +160,7 @@ void INFO_OT_select_pick(wmOperatorType *ot)
/* ot->flag= OPTYPE_REGISTER; */
/* properties */
- RNA_def_int(ot->srna, "report_index", 0, 0, INT_MAX, "Report", "The index of the report.", 0, INT_MAX);
+ RNA_def_int(ot->srna, "report_index", 0, 0, INT_MAX, "Report", "The index of the report", 0, INT_MAX);
}
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 0abfd4b71a1..182e5242a1d 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -42,6 +42,7 @@
#include "BLI_utildefines.h"
#include "BKE_anim.h"
+#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_DerivedMesh.h"
#include "BKE_key.h"
@@ -51,7 +52,6 @@
#include "ED_info.h"
#include "ED_armature.h"
#include "ED_mesh.h"
-#include "ED_curve.h" /* for ED_curve_editnurbs */
#include "BLI_editVert.h"
@@ -193,7 +193,7 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
BezTriple *bezt;
BPoint *bp;
int a;
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
for(nu=nurbs->first; nu; nu=nu->next) {
if(nu->type == CU_BEZIER) {
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index bd2e8077eab..75e13b24ede 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -41,6 +41,8 @@
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_screen.h"
@@ -278,7 +280,7 @@ static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
uiItemStringO(layout, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath);
}
} else {
- uiItemL(layout, "No Recent Files", ICON_NONE);
+ uiItemL(layout, UI_translate_do_iface(N_("No Recent Files")), ICON_NONE);
}
}
diff --git a/source/blender/editors/space_logic/CMakeLists.txt b/source/blender/editors/space_logic/CMakeLists.txt
index 44471902040..f4bb255e11f 100644
--- a/source/blender/editors/space_logic/CMakeLists.txt
+++ b/source/blender/editors/space_logic/CMakeLists.txt
@@ -21,10 +21,11 @@
set(INC
../include
- ../interface
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
+ ../../editors/interface
../../makesdna
../../makesrna
../../windowmanager
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index 638bfe57608..b7f9af09348 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -43,6 +43,7 @@
#include "BKE_context.h"
#include "BKE_main.h"
#include "BKE_sca.h"
+#include "BKE_material.h" //for texface convert
#include "ED_logic.h"
#include "ED_object.h"
@@ -57,6 +58,11 @@
#include "logic_intern.h"
+// temporary new includes for texface functions
+#include "DNA_mesh_types.h"
+#include "DNA_material_types.h"
+#include "DNA_meshdata_types.h"
+
/* ************* Generic Operator Helpers ************* */
static int edit_sensor_poll(bContext *C)
{
@@ -322,7 +328,7 @@ static void LOGIC_OT_sensor_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add");
+ ot->prop= prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, SENS_ALWAYS, "Type", "Type of sensor to add");
RNA_def_enum_funcs(prop, rna_Sensor_type_itemf);
RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Sensor to add");
RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Sensor to");
@@ -437,7 +443,7 @@ static void LOGIC_OT_controller_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add");
+ ot->prop= RNA_def_enum(ot->srna, "type", controller_type_items, CONT_LOGIC_AND, "Type", "Type of controller to add");
RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Controller to add");
RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Controller to");
}
@@ -539,7 +545,7 @@ static void LOGIC_OT_actuator_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add");
+ ot->prop= prop= RNA_def_enum(ot->srna, "type", DummyRNA_NULL_items, CONT_LOGIC_AND, "Type", "Type of actuator to add");
RNA_def_enum_funcs(prop, rna_Actuator_type_itemf);
RNA_def_string(ot->srna, "name", "", 32, "Name", "Name of the Actuator to add");
RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Actuator to");
@@ -687,6 +693,36 @@ static void LOGIC_OT_actuator_move(wmOperatorType *ot)
RNA_def_enum(ot->srna, "direction", logicbricks_move_direction, 1, "Direction", "Move Up or Down");
}
+/* ************* TexFace Converter Operator ************* */
+static int texface_convert_exec(bContext *C, wmOperator *UNUSED(op))
+{
+ Main *bmain= CTX_data_main(C);
+ do_version_tface(bmain, 0);
+
+ return OPERATOR_FINISHED;
+}
+
+static int texface_convert_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+{
+ return texface_convert_exec(C, op);
+}
+
+ static void LOGIC_OT_texface_convert(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "TexFace to Material Converter";
+ ot->description = "Convert old texface settings into material. It may create new materials if needed";
+ ot->idname= "LOGIC_OT_texface_convert";
+
+ /* api callbacks */
+ ot->invoke= texface_convert_invoke;
+ ot->exec= texface_convert_exec;
+// ot->poll= texface_convert_poll;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+}
+
void ED_operatortypes_logic(void)
{
@@ -699,4 +735,5 @@ void ED_operatortypes_logic(void)
WM_operatortype_append(LOGIC_OT_actuator_remove);
WM_operatortype_append(LOGIC_OT_actuator_add);
WM_operatortype_append(LOGIC_OT_actuator_move);
+ WM_operatortype_append(LOGIC_OT_texface_convert);
}
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 920e93cc0fc..3a4371e8bb9 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -718,6 +718,8 @@ static const char *actuator_name(int type)
return "State";
case ACT_ARMATURE:
return "Armature";
+ case ACT_STEERING:
+ return "Steering";
}
return "unknown";
}
@@ -2167,31 +2169,55 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
/* 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, "");
- 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.");
+ 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, ((ID *)sa->sound)->name+2, 0.0, 21.0, 0, 0, "");
- 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, 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, 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.");
+ 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,
+ ((ID *)sa->sound)->name+2, 0.0, 21.0, 0, 0, "");
+ 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,
+ 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,
+ 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");
if(sa->flag & ACT_SND_3D_SOUND)
{
- uiDefButF(block, NUM, 0, "Minimum Gain: ", xco+10, yco-110, wval, 19, &sa->sound3D.min_gain, 0.0, 1.0, 0.0, 0.0, "The minimum gain of the sound, no matter how far it is away.");
- uiDefButF(block, NUM, 0, "Maximum Gain: ", xco+10, yco-132, wval, 19, &sa->sound3D.max_gain, 0.0, 1.0, 0.0, 0.0, "The maximum gain of the sound, no matter how near it is.");
- uiDefButF(block, NUM, 0, "Reference Distance: ", xco+10, yco-154, wval, 19, &sa->sound3D.reference_distance, 0.0, FLT_MAX, 0.0, 0.0, "The reference distance is the distance where the sound has a gain of 1.0.");
- uiDefButF(block, NUM, 0, "Maximum Distance: ", xco+10, yco-176, wval, 19, &sa->sound3D.max_distance, 0.0, FLT_MAX, 0.0, 0.0, "The maximum distance at which you can hear the sound.");
- uiDefButF(block, NUM, 0, "Rolloff: ", xco+wval+10, yco-110, wval, 19, &sa->sound3D.rolloff_factor, 0.0, 5.0, 0.0, 0.0, "The rolloff factor defines the influence factor on volume depending on distance.");
- uiDefButF(block, NUM, 0, "Cone Outer Gain: ", xco+wval+10, yco-132, wval, 19, &sa->sound3D.cone_outer_gain, 0.0, 1.0, 0.0, 0.0, "The gain outside the outer cone. The gain in the outer cone will be interpolated between this value and the normal gain in the inner cone.");
- uiDefButF(block, NUM, 0, "Cone Outer Angle: ", xco+wval+10, yco-154, wval, 19, &sa->sound3D.cone_outer_angle, 0.0, 360.0, 0.0, 0.0, "The angle of the outer cone.");
- uiDefButF(block, NUM, 0, "Cone Inner Angle: ", xco+wval+10, yco-176, wval, 19, &sa->sound3D.cone_inner_angle, 0.0, 360.0, 0.0, 0.0, "The angle of the inner cone.");
+ uiDefButF(block, NUM, 0, "Minimum Gain: ", xco+10, yco-110, wval, 19,
+ &sa->sound3D.min_gain, 0.0, 1.0, 0.0, 0.0,
+ "The minimum gain of the sound, no matter how far it is away");
+ uiDefButF(block, NUM, 0, "Maximum Gain: ", xco+10, yco-132, wval, 19,
+ &sa->sound3D.max_gain, 0.0, 1.0, 0.0, 0.0,
+ "The maximum gain of the sound, no matter how near it is");
+ uiDefButF(block, NUM, 0, "Reference Distance: ", xco+10, yco-154, wval, 19,
+ &sa->sound3D.reference_distance, 0.0, FLT_MAX, 0.0, 0.0,
+ "The reference distance is the distance where the sound has a gain of 1.0");
+ uiDefButF(block, NUM, 0, "Maximum Distance: ", xco+10, yco-176, wval, 19,
+ &sa->sound3D.max_distance, 0.0, FLT_MAX, 0.0, 0.0,
+ "The maximum distance at which you can hear the sound");
+ uiDefButF(block, NUM, 0, "Rolloff: ", xco+wval+10, yco-110, wval, 19,
+ &sa->sound3D.rolloff_factor, 0.0, 5.0, 0.0, 0.0,
+ "The rolloff factor defines the influence factor on volume depending on distance");
+ uiDefButF(block, NUM, 0, "Cone Outer Gain: ", xco+wval+10, yco-132, wval, 19,
+ &sa->sound3D.cone_outer_gain, 0.0, 1.0, 0.0, 0.0,
+ "The gain outside the outer cone. The gain in the outer cone will be "
+ "interpolated between this value and the normal gain in the inner cone");
+ uiDefButF(block, NUM, 0, "Cone Outer Angle: ", xco+wval+10, yco-154, wval,
+ 19, &sa->sound3D.cone_outer_angle, 0.0, 360.0, 0.0, 0.0,
+ "The angle of the outer cone");
+ uiDefButF(block, NUM, 0, "Cone Inner Angle: ", xco+wval+10, yco-176, wval,
+ 19, &sa->sound3D.cone_inner_angle, 0.0, 360.0, 0.0, 0.0,
+ "The angle of the inner cone");
}
}
MEM_freeN((void *)str);
}
else {
- uiDefButO(block, BUT, "sound.open", 0, "Load Sound", xco+10, yco-22, width-20, 19, "Load a sound file.");
+ uiDefButO(block, BUT, "sound.open", 0, "Load Sound", xco+10, yco-22, width-20, 19, "Load a sound file");
}
yco-= ysize;
@@ -3989,40 +4015,6 @@ static void draw_actuator_game(uiLayout *layout, PointerRNA *ptr)
uiItemR(layout, ptr, "filename", 0, NULL, ICON_NONE);
}
-/* The IPO/Fcurve actuator has been deprecated, so this is no longer used */
-static void draw_actuator_ipo(uiLayout *layout, PointerRNA *ptr)
-{
- Object *ob;
- PointerRNA settings_ptr;
- uiLayout *row, *subrow, *col;
-
- ob = (Object *)ptr->id.data;
- RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
-
- row= uiLayoutRow(layout, 0);
- uiItemR(row, ptr, "play_type", 0, "", ICON_NONE);
- subrow= uiLayoutRow(row, 1);
- uiItemR(subrow, ptr, "use_force", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
- uiItemR(subrow, ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
-
- col = uiLayoutColumn(subrow, 0);
- uiLayoutSetActive(col, (RNA_boolean_get(ptr, "use_additive") || RNA_boolean_get(ptr, "use_force")));
- uiItemR(col, ptr, "use_local", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
-
- row= uiLayoutRow(layout, 0);
- if((RNA_enum_get(ptr, "play_type") == ACT_IPO_FROM_PROP))
- uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
-
- else {
- uiItemR(row, ptr, "frame_start", 0, NULL, ICON_NONE);
- uiItemR(row, ptr, "frame_end", 0, NULL, ICON_NONE);
- }
- uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NONE);
-
- row= uiLayoutRow(layout, 0);
- uiItemPointerR(row, ptr, "frame_property", &settings_ptr, "properties", NULL, ICON_NONE);
-}
-
static void draw_actuator_message(uiLayout *layout, PointerRNA *ptr, bContext *C)
{
Object *ob;
@@ -4379,6 +4371,48 @@ static void draw_actuator_visibility(uiLayout *layout, PointerRNA *ptr)
uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NONE);
}
+static void draw_actuator_steering(uiLayout *layout, PointerRNA *ptr)
+{
+ uiLayout *row;
+ uiLayout *col;
+
+ uiItemR(layout, ptr, "mode", 0, NULL, 0);
+ uiItemR(layout, ptr, "target", 0, NULL, 0);
+ uiItemR(layout, ptr, "navmesh", 0, NULL, 0);
+
+ row = uiLayoutRow(layout, 0);
+ uiItemR(row, ptr, "distance", 0, NULL, 0);
+ uiItemR(row, ptr, "velocity", 0, NULL, 0);
+ row = uiLayoutRow(layout, 0);
+ uiItemR(row, ptr, "acceleration", 0, NULL, 0);
+ uiItemR(row, ptr, "turn_speed", 0, NULL, 0);
+
+ row = uiLayoutRow(layout, 0);
+ col = uiLayoutColumn(row, 0);
+ uiItemR(col, ptr, "facing", 0, NULL, 0);
+ col = uiLayoutColumn(row, 0);
+ uiItemR(col, ptr, "facing_axis", 0, NULL, 0);
+ if (!RNA_boolean_get(ptr, "facing"))
+ {
+ uiLayoutSetActive(col, 0);
+ }
+ col = uiLayoutColumn(row, 0);
+ uiItemR(col, ptr, "normal_up", 0, NULL, 0);
+ if (!RNA_pointer_get(ptr, "navmesh").data)
+ {
+ uiLayoutSetActive(col, 0);
+ }
+
+ row = uiLayoutRow(layout, 0);
+ uiItemR(row, ptr, "self_terminated", 0, NULL, 0);
+ if (RNA_enum_get(ptr, "mode")==ACT_STEERING_PATHFOLLOWING)
+ {
+ uiItemR(row, ptr, "update_period", 0, NULL, 0);
+ row = uiLayoutRow(layout, 0);
+ }
+ uiItemR(row, ptr, "show_visualization", 0, NULL, 0);
+}
+
static void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C)
{
uiLayout *box;
@@ -4440,6 +4474,8 @@ static void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C)
case ACT_VISIBILITY:
draw_actuator_visibility(box, ptr);
break;
+ case ACT_STEERING:
+ draw_actuator_steering(box, ptr);
}
}
@@ -4512,7 +4548,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
/* ****************** Controllers ****************** */
xco= 420; yco= 170; width= 300;
- layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, U.uistyles.first);
+ layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, UI_GetStyle());
row = uiLayoutRow(layout, 1);
uiDefBlockBut(block, controller_menu, NULL, "Controllers", xco-10, yco, 300, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */
@@ -4615,7 +4651,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
/* ****************** Sensors ****************** */
xco= 10; yco= 170; width= 340;
- layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, U.uistyles.first);
+ layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, UI_GetStyle());
row = uiLayoutRow(layout, 1);
uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco, 300, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */
@@ -4681,7 +4717,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
/* ****************** Actuators ****************** */
xco= 800; yco= 170; width= 340;
- layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, U.uistyles.first);
+ layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, xco, yco, width, 20, UI_GetStyle());
row = uiLayoutRow(layout, 1);
uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco, 300, UI_UNIT_Y, ""); /* replace this with uiLayout stuff later */
diff --git a/source/blender/editors/space_nla/CMakeLists.txt b/source/blender/editors/space_nla/CMakeLists.txt
index b05d157365d..819e80d7b2e 100644
--- a/source/blender/editors/space_nla/CMakeLists.txt
+++ b/source/blender/editors/space_nla/CMakeLists.txt
@@ -21,6 +21,7 @@
set(INC
../include
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
diff --git a/source/blender/editors/space_nla/SConscript b/source/blender/editors/space_nla/SConscript
index 51ce829ed8d..6738f3380b4 100644
--- a/source/blender/editors/space_nla/SConscript
+++ b/source/blender/editors/space_nla/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('*.c')
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
+incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader'
env.BlenderLib ( 'bf_editors_space_nla', sources, Split(incs), [], libtype=['core'], priority=[85] )
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index 4392e49e5d7..5e1f2745559 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -45,6 +45,8 @@
#include "BLI_editVert.h"
#include "BLI_rand.h"
+#include "BLF_translation.h"
+
#include "BKE_nla.h"
#include "BKE_context.h"
#include "BKE_screen.h"
@@ -446,7 +448,8 @@ static void nla_panel_modifiers(const bContext *C, Panel *pa)
// 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, "Add Modifier", 10, 0, 150, 20, "Adds a new F-Modifier for the active NLA Strip");
+ uiDefButO(block, BUT, "NLA_OT_fmodifier_add", WM_OP_INVOKE_REGION_WIN, UI_translate_do_iface(N_("Add Modifier")), 10, 0, 150, 20,
+ UI_translate_do_tooltip(N_("Adds a new F-Modifier for the active NLA Strip")));
/* copy/paste (as sub-row)*/
row= uiLayoutRow(row, 1);
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 8775d256b80..fb23533636c 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -430,7 +430,7 @@ void NLA_OT_tracks_add (wmOperatorType *ot)
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.");
+ RNA_def_boolean(ot->srna, "above_selected", 0, "Above Selected", "Add a new NLA Track above every existing selected one");
}
/* ******************** Delete Tracks Operator ***************************** */
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 0c9c7877ddc..6af43e7618d 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -376,7 +376,7 @@ static void nla_draw_strip (SpaceNla *snla, AnimData *adt, NlaTrack *nlt, NlaStr
if (nonSolo == 0) {
/* strip is in normal track */
glColor3fv(color);
- uiSetRoundBox(15); /* all corners rounded */
+ uiSetRoundBox(UI_CNR_ALL); /* all corners rounded */
uiDrawBoxShade(GL_POLYGON, strip->start, yminc, strip->end, ymaxc, 0.0, 0.5, 0.1);
}
@@ -811,7 +811,7 @@ static void draw_nla_channel_list_gl (bAnimContext *ac, ListBase *anim_data, Vie
offset += 7 * indent;
/* only on top two corners, to show that this channel sits on top of the preceding ones */
- uiSetRoundBox((1|2));
+ uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
/* draw slightly shifted up vertically to look like it has more separtion from other channels,
* but we then need to slightly shorten it so that it doesn't look like it overlaps
diff --git a/source/blender/editors/space_nla/nla_edit.c b/source/blender/editors/space_nla/nla_edit.c
index 08026e8a1d2..d7dfea0b7e7 100644
--- a/source/blender/editors/space_nla/nla_edit.c
+++ b/source/blender/editors/space_nla/nla_edit.c
@@ -147,7 +147,7 @@ static int nlaedit_enable_tweakmode_exec (bContext *C, wmOperator *op)
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.");
+ BKE_report(op->reports, RPT_ERROR, "No active strip(s) to enter tweakmode on");
return OPERATOR_CANCELLED;
}
@@ -398,7 +398,7 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
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.");
+ BKE_report(op->reports, RPT_ERROR, "No valid Action to add");
//printf("Add strip - actname = '%s' \n", actname);
return OPERATOR_CANCELLED;
}
@@ -416,7 +416,7 @@ static int nlaedit_add_actionclip_exec (bContext *C, wmOperator *op)
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.");
+ BKE_report(op->reports, RPT_ERROR, "No active track(s) to add strip to");
return OPERATOR_CANCELLED;
}
@@ -590,7 +590,7 @@ static int nlaedit_add_transition_exec (bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
else {
- BKE_report(op->reports, RPT_ERROR, "Needs at least a pair of adjacent selected strips with a gap between them.");
+ BKE_report(op->reports, RPT_ERROR, "Needs at least a pair of adjacent selected strips with a gap between them");
return OPERATOR_CANCELLED;
}
}
@@ -1315,7 +1315,7 @@ 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.",
+ "Too many clusters of strips selected in NLA Track (%s): needs exactly 2 to be selected",
nlt->name);
}
else if (sa == NULL) {
@@ -1324,7 +1324,7 @@ 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.",
+ "Too few clusters of strips selected in NLA Track (%s): needs exactly 2 to be selected",
nlt->name);
}
else {
@@ -1619,7 +1619,7 @@ void NLA_OT_action_sync_length (wmOperatorType *ot)
/* identifiers */
ot->name= "Sync Action Length";
ot->idname= "NLA_OT_action_sync_length";
- ot->description= "Synchronise the length of the referenced Action with the lengths used in the strip";
+ ot->description= "Synchronise the length of the referenced Action with the length used in the strip";
/* api callbacks */
ot->exec= nlaedit_sync_actlen_exec;
@@ -1629,7 +1629,7 @@ void NLA_OT_action_sync_length (wmOperatorType *ot)
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.");
+ ot->prop= RNA_def_boolean(ot->srna, "active", 1, "Active Strip Only", "Only sync the active length for the active strip");
}
/* ******************** Apply Scale Operator ***************************** */
@@ -2021,7 +2021,7 @@ static int nla_fmodifier_add_exec(bContext *C, wmOperator *op)
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.",
+ "Modifier couldn't be added to (%s : %s) (see console for details)",
nlt->name, strip->name);
}
}
@@ -2042,7 +2042,7 @@ void NLA_OT_fmodifier_add (wmOperatorType *ot)
/* identifiers */
ot->name= "Add F-Modifier";
ot->idname= "NLA_OT_fmodifier_add";
- ot->description= "Add F-Modifier of the specified type to the selected NLA-Strips";
+ ot->description= "Add a F-Modifier of the specified type to the selected NLA-Strips";
/* api callbacks */
ot->invoke= nla_fmodifier_add_invoke;
@@ -2054,7 +2054,7 @@ void NLA_OT_fmodifier_add (wmOperatorType *ot)
/* id-props */
ot->prop= RNA_def_enum(ot->srna, "type", fmodifier_type_items, 0, "Type", "");
- RNA_def_boolean(ot->srna, "only_active", 0, "Only Active", "Only add F-Modifier of the specified type to the active strip.");
+ RNA_def_boolean(ot->srna, "only_active", 0, "Only Active", "Only add a F-Modifier of the specified type to the active strip");
}
/* ******************** Copy F-Modifiers Operator *********************** */
diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c
index c33316620eb..05d38a63109 100644
--- a/source/blender/editors/space_nla/nla_select.c
+++ b/source/blender/editors/space_nla/nla_select.c
@@ -226,7 +226,7 @@ static void borderselect_nla_strips (bAnimContext *ac, rcti rect, short mode, sh
SpaceNla *snla = (SpaceNla *)ac->sl;
View2D *v2d= &ac->ar->v2d;
rctf rectf;
- float ymin=(float)(-NLACHANNEL_HEIGHT(snla)), 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);
@@ -479,7 +479,7 @@ void NLA_OT_select_leftright (wmOperatorType *ot)
/* identifiers */
ot->name= "Select Left/Right";
ot->idname= "NLA_OT_select_leftright";
- ot->description= "Select strips to the left or the right of the current frame ";
+ ot->description= "Select strips to the left or the right of the current frame";
/* api callbacks */
ot->invoke= nlaedit_select_leftright_invoke;
@@ -606,8 +606,8 @@ static void mouse_nla_strips (bContext *C, bAnimContext *ac, const int mval[2],
static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
bAnimContext ac;
- Scene *scene;
- ARegion *ar;
+ /* Scene *scene; */ /* UNUSED */
+ /* ARegion *ar; */ /* UNUSED */
// View2D *v2d; /*UNUSED*/
short selectmode;
@@ -616,8 +616,8 @@ static int nlaedit_clickselect_invoke(bContext *C, wmOperator *op, wmEvent *even
return OPERATOR_CANCELLED;
/* get useful pointers from animation context data */
- scene= ac.scene;
- ar= ac.ar;
+ /* scene= ac.scene; */ /* UNUSED */
+ /* ar= ac.ar; */ /* UNUSED */
// v2d= &ar->v2d;
/* select mode is either replace (deselect all, then add) or add/extend */
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 0474d1f3bb1..f34cef4d2aa 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -53,9 +53,10 @@
#include "BKE_image.h"
#include "BKE_library.h"
#include "BKE_main.h"
+#include "BKE_node.h"
-#include "CMP_node.h"
-#include "SHD_node.h"
+#include "NOD_composite.h"
+#include "NOD_shader.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
@@ -81,6 +82,143 @@
#include "node_intern.h"
+// XXX interface.h
+extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);
+
+/* ****************** SOCKET BUTTON DRAW FUNCTIONS ***************** */
+
+static void node_sync_cb(bContext *UNUSED(C), void *snode_v, void *node_v)
+{
+ SpaceNode *snode= snode_v;
+
+ if(snode->treetype==NTREE_SHADER) {
+ nodeShaderSynchronizeID(node_v, 1);
+ // allqueue(REDRAWBUTSSHADING, 0);
+ }
+}
+
+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)
+{
+ 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);
+}
+
+typedef struct SocketComponentMenuArgs {
+ PointerRNA ptr;
+ int x, y, width;
+ uiButHandleFunc cb;
+ void *arg1, *arg2;
+} SocketComponentMenuArgs;
+/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */
+static uiBlock *socket_component_menu(bContext *C, ARegion *ar, void *args_v)
+{
+ SocketComponentMenuArgs *args= (SocketComponentMenuArgs*)args_v;
+ uiBlock *block;
+ uiLayout *layout;
+
+ block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS);
+ uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
+
+ layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, U.uistyles.first), 0);
+
+ uiItemR(layout, &args->ptr, "default_value", UI_ITEM_R_EXPAND, "", ICON_NONE);
+
+ return block;
+}
+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)
+{
+ 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, "");
+}
+
+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)
+{
+ 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, "");
+}
+
+/* ****************** BASE DRAW FUNCTIONS FOR NEW OPERATOR NODES ***************** */
+
+#if 0 /* UNUSED */
+static void node_draw_socket_new(bNodeSocket *sock, float size)
+{
+ float x=sock->locx, y=sock->locy;
+
+ /* 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
+ };
+ /* 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,
+ };
+ int a;
+
+ glColor3ub(180, 180, 180);
+
+ glBegin(GL_POLYGON);
+ for(a=0; a<16; a++)
+ glVertex2f(x+size*si[a], y+size*co[a]);
+ glEnd();
+
+ glColor4ub(0, 0, 0, 150);
+ glEnable(GL_BLEND);
+ 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_BLEND);
+}
+#endif
+
/* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
static void node_buts_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
@@ -169,7 +307,7 @@ static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA
if(_sample_col) {
cumap->flag |= CUMA_DRAW_SAMPLE;
- VECCOPY(cumap->sample, _sample_col);
+ copy_v3_v3(cumap->sample, _sample_col);
}
else
cumap->flag &= ~CUMA_DRAW_SAMPLE;
@@ -192,11 +330,12 @@ static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *
bNode *node= ptr->data;
rctf *butr= &node->butr;
bNodeSocket *sock= node->outputs.first; /* first socket stores normal */
+ float *nor= ((bNodeSocketValueVector*)sock->default_value)->value;
uiBut *bt;
bt= uiDefButF(block, BUT_NORMAL, B_NODE_EXEC, "",
(short)butr->xmin, (short)butr->xmin, butr->xmax-butr->xmin, butr->xmax-butr->xmin,
- sock->ns.vec, 0.0f, 1.0f, 0, 0, "");
+ nor, 0.0f, 1.0f, 0, 0, "");
uiButSetFunc(bt, node_normal_cb, ntree, node);
}
#if 0 // not used in 2.5x yet
@@ -287,6 +426,469 @@ static void node_buts_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *pt
uiItemR(layout, ptr, "operation", 0, "", ICON_NONE);
}
+static int node_resize_area_default(bNode *node, int x, int y)
+{
+ if (node->flag & NODE_HIDDEN) {
+ rctf totr= node->totr;
+ /* right part of node */
+ totr.xmin= node->totr.xmax-20.0f;
+ return BLI_in_rctf(&totr, x, y);
+ }
+ else {
+ /* rect we're interested in is just the bottom right corner */
+ rctf totr= node->totr;
+ /* bottom right corner */
+ totr.xmin= totr.xmax-10.0f;
+ totr.ymax= totr.ymin+10.0f;
+ return BLI_in_rctf(&totr, x, y);
+ }
+}
+
+/* ****************** BUTTON CALLBACKS FOR COMMON NODES ***************** */
+
+/* width of socket columns in group display */
+#define NODE_GROUP_FRAME 120
+
+/* based on settings in node, sets drawing rect info. each redraw! */
+/* note: this assumes only 1 group at a time is drawn (linked data) */
+/* in node->totr the entire boundbox for the group is stored */
+static void node_update_group(const bContext *C, bNodeTree *ntree, bNode *gnode)
+{
+ if (!(gnode->flag & NODE_GROUP_EDIT)) {
+ node_update_default(C, ntree, gnode);
+ }
+ else {
+ bNodeTree *ngroup= (bNodeTree *)gnode->id;
+ bNode *node;
+ bNodeSocket *sock, *gsock;
+ float locx, locy;
+ rctf *rect= &gnode->totr;
+ float node_group_frame= U.dpi*NODE_GROUP_FRAME/72;
+ int counter;
+ int dy;
+
+ /* get "global" coords */
+ nodeSpaceCoords(gnode, &locx, &locy);
+
+ /* center them, is a bit of abuse of locx and locy though */
+ node_update_nodetree(C, ngroup, locx, locy);
+
+ rect->xmin = rect->xmax = locx;
+ rect->ymin = rect->ymax = locy;
+
+ counter= 1;
+ for(node= ngroup->nodes.first; node; node= node->next) {
+ if(counter) {
+ *rect= node->totr;
+ counter= 0;
+ }
+ else
+ BLI_union_rctf(rect, &node->totr);
+ }
+
+ /* add some room for links to group sockets */
+ rect->xmin -= 4*NODE_DY;
+ rect->xmax += 4*NODE_DY;
+ rect->ymin-= NODE_DY;
+ rect->ymax+= NODE_DY;
+
+ /* input sockets */
+ dy = 0.5f*(rect->ymin+rect->ymax) + NODE_DY*(BLI_countlist(&gnode->inputs)-1);
+ gsock=ngroup->inputs.first;
+ sock=gnode->inputs.first;
+ while (gsock || sock) {
+ while (sock && !sock->groupsock) {
+ sock->locx = rect->xmin - node_group_frame;
+ sock->locy = dy;
+
+ /* prevent long socket lists from growing out of the group box */
+ if (dy-3*NODE_DYS < rect->ymin)
+ rect->ymin = dy-3*NODE_DYS;
+ if (dy+3*NODE_DYS > rect->ymax)
+ rect->ymax = dy+3*NODE_DYS;
+ dy -= 2*NODE_DY;
+
+ sock = sock->next;
+ }
+ while (gsock && (!sock || sock->groupsock!=gsock)) {
+ gsock->locx = rect->xmin;
+ gsock->locy = dy;
+
+ /* prevent long socket lists from growing out of the group box */
+ if (dy-3*NODE_DYS < rect->ymin)
+ rect->ymin = dy-3*NODE_DYS;
+ if (dy+3*NODE_DYS > rect->ymax)
+ rect->ymax = dy+3*NODE_DYS;
+ dy -= 2*NODE_DY;
+
+ gsock = gsock->next;
+ }
+ while (sock && gsock && sock->groupsock==gsock) {
+ gsock->locx = rect->xmin;
+ sock->locx = rect->xmin - node_group_frame;
+ sock->locy = gsock->locy = dy;
+
+ /* prevent long socket lists from growing out of the group box */
+ if (dy-3*NODE_DYS < rect->ymin)
+ rect->ymin = dy-3*NODE_DYS;
+ if (dy+3*NODE_DYS > rect->ymax)
+ rect->ymax = dy+3*NODE_DYS;
+ dy -= 2*NODE_DY;
+
+ sock = sock->next;
+ gsock = gsock->next;
+ }
+ }
+
+ /* output sockets */
+ dy = 0.5f*(rect->ymin+rect->ymax) + NODE_DY*(BLI_countlist(&gnode->outputs)-1);
+ gsock=ngroup->outputs.first;
+ sock=gnode->outputs.first;
+ while (gsock || sock) {
+ while (sock && !sock->groupsock) {
+ sock->locx = rect->xmax + node_group_frame;
+ sock->locy = dy - NODE_DYS;
+
+ /* prevent long socket lists from growing out of the group box */
+ if (dy-3*NODE_DYS < rect->ymin)
+ rect->ymin = dy-3*NODE_DYS;
+ if (dy+3*NODE_DYS > rect->ymax)
+ rect->ymax = dy+3*NODE_DYS;
+ dy -= 2*NODE_DY;
+
+ sock = sock->next;
+ }
+ while (gsock && (!sock || sock->groupsock!=gsock)) {
+ gsock->locx = rect->xmax;
+ gsock->locy = dy - NODE_DYS;
+
+ /* prevent long socket lists from growing out of the group box */
+ if (dy-3*NODE_DYS < rect->ymin)
+ rect->ymin = dy-3*NODE_DYS;
+ if (dy+3*NODE_DYS > rect->ymax)
+ rect->ymax = dy+3*NODE_DYS;
+ dy -= 2*NODE_DY;
+
+ gsock = gsock->next;
+ }
+ while (sock && gsock && sock->groupsock==gsock) {
+ gsock->locx = rect->xmax;
+ sock->locx = rect->xmax + node_group_frame;
+ sock->locy = gsock->locy = dy - NODE_DYS;
+
+ /* prevent long socket lists from growing out of the group box */
+ if (dy-3*NODE_DYS < rect->ymin)
+ rect->ymin = dy-3*NODE_DYS;
+ if (dy+3*NODE_DYS > rect->ymax)
+ rect->ymax = dy+3*NODE_DYS;
+ dy -= 2*NODE_DY;
+
+ sock = sock->next;
+ gsock = gsock->next;
+ }
+ }
+ }
+}
+
+static void update_group_input_cb(bContext *UNUSED(C), void *UNUSED(snode_v), void *ngroup_v)
+{
+ bNodeTree *ngroup= (bNodeTree*)ngroup_v;
+
+ ngroup->update |= NTREE_UPDATE_GROUP_IN;
+ ntreeUpdateTree(ngroup);
+}
+
+static void update_group_output_cb(bContext *UNUSED(C), void *UNUSED(snode_v), void *ngroup_v)
+{
+ bNodeTree *ngroup= (bNodeTree*)ngroup_v;
+
+ ngroup->update |= NTREE_UPDATE_GROUP_OUT;
+ ntreeUpdateTree(ngroup);
+}
+
+static void draw_group_socket_name(SpaceNode *snode, bNode *gnode, bNodeSocket *sock, int in_out, float xoffset, float yoffset)
+{
+ bNodeTree *ngroup= (bNodeTree*)gnode->id;
+ uiBut *bt;
+
+ if (sock->flag & SOCK_DYNAMIC) {
+ bt = uiDefBut(gnode->block, TEX, 0, "",
+ sock->locx+xoffset, sock->locy+1+yoffset, 72, NODE_DY,
+ sock->name, 0, 31, 0, 0, "");
+ if (in_out==SOCK_IN)
+ uiButSetFunc(bt, update_group_input_cb, snode, ngroup);
+ else
+ uiButSetFunc(bt, update_group_output_cb, snode, ngroup);
+ }
+ else {
+ uiDefBut(gnode->block, LABEL, 0, sock->name,
+ sock->locx+xoffset, sock->locy+1+yoffset, 72, NODE_DY,
+ NULL, 0, 31, 0, 0, "");
+ }
+}
+
+static void draw_group_socket(const bContext *C, SpaceNode *snode, bNodeTree *ntree, bNode *gnode, bNodeSocket *sock, bNodeSocket *gsock, int index, int in_out)
+{
+ bNodeTree *ngroup= (bNodeTree*)gnode->id;
+ bNodeSocketType *stype= ntreeGetSocketType(gsock ? gsock->type : sock->type);
+ uiBut *bt;
+ float offset;
+ int draw_value;
+ float node_group_frame= U.dpi*NODE_GROUP_FRAME/72;
+ float socket_size= NODE_SOCKSIZE*U.dpi/72;
+ float arrowbutw= 0.8f*UI_UNIT_X;
+ /* layout stuff for buttons on group left frame */
+ float colw= 0.6f*node_group_frame;
+ float col1= 6 - node_group_frame;
+ float col2= col1 + colw+6;
+ float col3= - arrowbutw - 6;
+ /* layout stuff for buttons on group right frame */
+ float cor1= 6;
+ float cor2= cor1 + arrowbutw + 6;
+ float cor3= cor2 + arrowbutw + 6;
+
+ /* node and group socket circles */
+ if (sock)
+ node_socket_circle_draw(ntree, sock, socket_size);
+ if (gsock)
+ node_socket_circle_draw(ngroup, gsock, socket_size);
+
+ /* socket name */
+ offset = (in_out==SOCK_IN ? col1 : cor3);
+ if (!gsock)
+ offset += (in_out==SOCK_IN ? node_group_frame : -node_group_frame);
+
+ /* draw both name and value button if:
+ * 1) input: not internal
+ * 2) output: (node type uses const outputs) and (group output is unlinked)
+ */
+ draw_value = 0;
+ switch (in_out) {
+ case SOCK_IN:
+ draw_value = !(gsock && (gsock->flag & SOCK_INTERNAL));
+ break;
+ case SOCK_OUT:
+ if (gnode->typeinfo->flag & NODE_CONST_OUTPUT)
+ draw_value = !(gsock && gsock->link);
+ break;
+ }
+ if (draw_value) {
+ /* both name and value buttons */
+ if (gsock) {
+ draw_group_socket_name(snode, gnode, gsock, in_out, offset, 0);
+ if (stype->buttonfunc)
+ stype->buttonfunc(C, gnode->block, ngroup, NULL, gsock, "", gsock->locx+offset, gsock->locy-NODE_DY, colw);
+ }
+ else {
+ draw_group_socket_name(snode, gnode, sock, in_out, offset, 0);
+ if (stype->buttonfunc)
+ stype->buttonfunc(C, gnode->block, ngroup, NULL, sock, "", sock->locx+offset, sock->locy-NODE_DY, colw);
+ }
+ }
+ else {
+ /* only name, no value button */
+ if (gsock)
+ draw_group_socket_name(snode, gnode, gsock, in_out, offset, -NODE_DYS);
+ else
+ draw_group_socket_name(snode, gnode, sock, in_out, offset, -NODE_DYS);
+ }
+
+ if (gsock && (gsock->flag & SOCK_DYNAMIC)) {
+ /* up/down buttons */
+ offset = (in_out==SOCK_IN ? col2 : cor2);
+ uiBlockSetDirection(gnode->block, UI_TOP);
+ uiBlockBeginAlign(gnode->block);
+ bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_up", 0, ICON_TRIA_UP,
+ gsock->locx+offset, gsock->locy, arrowbutw, arrowbutw, "");
+ if (!gsock->prev || !(gsock->prev->flag & SOCK_DYNAMIC))
+ uiButSetFlag(bt, UI_BUT_DISABLED);
+ RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
+ RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", in_out);
+ bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_down", 0, ICON_TRIA_DOWN,
+ gsock->locx+offset, gsock->locy-arrowbutw, arrowbutw, arrowbutw, "");
+ if (!gsock->next || !(gsock->next->flag & SOCK_DYNAMIC))
+ uiButSetFlag(bt, UI_BUT_DISABLED);
+ RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
+ RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", in_out);
+ uiBlockEndAlign(gnode->block);
+ uiBlockSetDirection(gnode->block, 0);
+
+ /* remove button */
+ offset = (in_out==SOCK_IN ? col3 : cor1);
+ uiBlockSetEmboss(gnode->block, UI_EMBOSSN);
+ bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_remove", 0, ICON_X,
+ gsock->locx+offset, gsock->locy-0.5f*arrowbutw, arrowbutw, arrowbutw, "");
+ RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
+ RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", in_out);
+ uiBlockSetEmboss(gnode->block, UI_EMBOSS);
+ }
+}
+
+/* groups are, on creation, centered around 0,0 */
+static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *gnode)
+{
+ if (!(gnode->flag & NODE_GROUP_EDIT)) {
+ node_draw_default(C, ar, snode, ntree, gnode);
+ }
+ else {
+ bNodeTree *ngroup= (bNodeTree *)gnode->id;
+ bNodeSocket *sock, *gsock;
+ uiLayout *layout;
+ PointerRNA ptr;
+ rctf rect= gnode->totr;
+ float node_group_frame= U.dpi*NODE_GROUP_FRAME/72;
+ float group_header= 26*U.dpi/72;
+
+ int index;
+
+ /* backdrop header */
+ glEnable(GL_BLEND);
+ uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
+ UI_ThemeColorShadeAlpha(TH_NODE_GROUP, 0, -70);
+ uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymax, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD);
+
+ /* backdrop body */
+ UI_ThemeColorShadeAlpha(TH_BACK, -8, -70);
+ uiSetRoundBox(UI_CNR_NONE);
+ uiDrawBox(GL_POLYGON, rect.xmin, rect.ymin, rect.xmax, rect.ymax, BASIS_RAD);
+
+ /* input column */
+ UI_ThemeColorShadeAlpha(TH_BACK, 10, -50);
+ uiSetRoundBox(UI_CNR_BOTTOM_LEFT);
+ uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymin, rect.xmin, rect.ymax, BASIS_RAD);
+
+ /* output column */
+ UI_ThemeColorShadeAlpha(TH_BACK, 10, -50);
+ uiSetRoundBox(UI_CNR_BOTTOM_RIGHT);
+ uiDrawBox(GL_POLYGON, rect.xmax, rect.ymin, rect.xmax+node_group_frame, rect.ymax, BASIS_RAD);
+
+ /* input column separator */
+ glColor4ub(200, 200, 200, 140);
+ glBegin(GL_LINES);
+ glVertex2f(rect.xmin, rect.ymin);
+ glVertex2f(rect.xmin, rect.ymax);
+ glEnd();
+
+ /* output column separator */
+ glColor4ub(200, 200, 200, 140);
+ glBegin(GL_LINES);
+ glVertex2f(rect.xmax, rect.ymin);
+ glVertex2f(rect.xmax, rect.ymax);
+ glEnd();
+
+ /* group node outline */
+ uiSetRoundBox(UI_CNR_ALL);
+ glColor4ub(200, 200, 200, 140);
+ 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_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, U.uistyles.first);
+ RNA_pointer_create(&ntree->id, &RNA_Node, gnode, &ptr);
+ uiTemplateIDBrowse(layout, (bContext*)C, &ptr, "node_tree", NULL, NULL, NULL);
+ uiBlockLayoutResolve(gnode->block, NULL, NULL);
+
+ /* draw the internal tree nodes and links */
+ node_draw_nodetree(C, ar, snode, ngroup);
+
+ /* group sockets */
+ gsock=ngroup->inputs.first;
+ sock=gnode->inputs.first;
+ index = 0;
+ while (gsock || sock) {
+ while (sock && !sock->groupsock) {
+ draw_group_socket(C, snode, ntree, gnode, sock, NULL, index, SOCK_IN);
+ sock = sock->next;
+ }
+ while (gsock && (!sock || sock->groupsock!=gsock)) {
+ draw_group_socket(C, snode, ntree, gnode, NULL, gsock, index, SOCK_IN);
+ gsock = gsock->next;
+ ++index;
+ }
+ while (sock && gsock && sock->groupsock==gsock) {
+ draw_group_socket(C, snode, ntree, gnode, sock, gsock, index, SOCK_IN);
+ sock = sock->next;
+ gsock = gsock->next;
+ ++index;
+ }
+ }
+ gsock=ngroup->outputs.first;
+ sock=gnode->outputs.first;
+ index = 0;
+ while (gsock || sock) {
+ while (sock && !sock->groupsock) {
+ draw_group_socket(C, snode, ntree, gnode, sock, NULL, index, SOCK_OUT);
+ sock = sock->next;
+ }
+ while (gsock && (!sock || sock->groupsock!=gsock)) {
+ draw_group_socket(C, snode, ntree, gnode, NULL, gsock, index, SOCK_OUT);
+ gsock = gsock->next;
+ ++index;
+ }
+ while (sock && gsock && sock->groupsock==gsock) {
+ draw_group_socket(C, snode, ntree, gnode, sock, gsock, index, SOCK_OUT);
+ sock = sock->next;
+ gsock = gsock->next;
+ ++index;
+ }
+ }
+
+ uiEndBlock(C, gnode->block);
+ uiDrawBlock(C, gnode->block);
+ gnode->block= NULL;
+ }
+}
+
+static void node_common_buts_whileloop(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+{
+ uiItemR(layout, ptr, "max_iterations", 0, NULL, 0);
+}
+
+static void node_update_frame(const bContext *UNUSED(C), bNodeTree *UNUSED(ntree), bNode *node)
+{
+ float locx, locy;
+
+ /* get "global" coords */
+ nodeSpaceCoords(node, &locx, &locy);
+
+ node->prvr.xmin= locx + NODE_DYS;
+ node->prvr.xmax= locx + node->width- NODE_DYS;
+
+ node->totr.xmin= locx;
+ node->totr.xmax= locx + node->width;
+ node->totr.ymax= locy;
+ node->totr.ymin= locy - node->height;
+}
+
+static void node_common_set_butfunc(bNodeType *ntype)
+{
+ switch(ntype->type) {
+ case NODE_GROUP:
+// ntype->uifunc= node_common_buts_group;
+ ntype->drawfunc= node_draw_group;
+ ntype->drawupdatefunc= node_update_group;
+ break;
+ case NODE_FORLOOP:
+// ntype->uifunc= node_common_buts_group;
+ ntype->drawfunc= node_draw_group;
+ ntype->drawupdatefunc= node_update_group;
+ break;
+ case NODE_WHILELOOP:
+ ntype->uifunc= node_common_buts_whileloop;
+ ntype->drawfunc= node_draw_group;
+ ntype->drawupdatefunc= node_update_group;
+ break;
+ case NODE_FRAME:
+ ntype->drawupdatefunc= node_update_frame;
+ break;
+ }
+}
+
/* ****************** BUTTON CALLBACKS FOR SHADER NODES ***************** */
static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
@@ -294,14 +896,14 @@ static void node_browse_text_cb(bContext *C, void *ntree_v, void *node_v)
Main *bmain= CTX_data_main(C);
bNodeTree *ntree= ntree_v;
bNode *node= node_v;
- ID *oldid;
+ /* ID *oldid; */ /* UNUSED */
if(node->menunr<1) return;
if(node->id) {
node->id->us--;
}
- oldid= node->id;
+ /* oldid= node->id; */ /* UNUSED */
node->id= BLI_findlink(&bmain->text, node->menunr-1);
id_us_plus(node->id);
BLI_strncpy(node->name, node->id->name+2, sizeof(node->name));
@@ -470,8 +1072,6 @@ static void node_shader_set_butfunc(bNodeType *ntype)
case NODE_DYNAMIC:
ntype->uifunc= node_shader_buts_dynamic;
break;
- default:
- ntype->uifunc= NULL;
}
if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc;
}
@@ -1225,8 +1825,6 @@ static void node_composit_set_butfunc(bNodeType *ntype)
case CMP_NODE_SEPYCCA:
ntype->uifunc=node_composit_buts_ycc;
break;
- default:
- ntype->uifunc= NULL;
}
if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc;
@@ -1381,9 +1979,6 @@ static void node_texture_set_butfunc(bNodeType *ntype)
case TEX_NODE_OUTPUT:
ntype->uifunc = node_texture_buts_output;
break;
-
- default:
- ntype->uifunc= NULL;
}
if (ntype->uifuncbut == NULL) ntype->uifuncbut = ntype->uifunc;
}
@@ -1392,24 +1987,60 @@ static void node_texture_set_butfunc(bNodeType *ntype)
void ED_init_node_butfuncs(void)
{
+ bNodeTreeType *treetype;
bNodeType *ntype;
-
- /* shader nodes */
- ntype= node_all_shaders.first;
- while(ntype) {
- node_shader_set_butfunc(ntype);
- ntype= ntype->next;
- }
- /* composit nodes */
- ntype= node_all_composit.first;
- while(ntype) {
- node_composit_set_butfunc(ntype);
- ntype= ntype->next;
+ bNodeSocketType *stype;
+ int i;
+
+ /* node type ui functions */
+ for (i=0; i < NUM_NTREE_TYPES; ++i) {
+ treetype = ntreeGetType(i);
+ if (treetype) {
+ for (ntype= treetype->node_types.first; ntype; ntype= ntype->next) {
+ /* default ui functions */
+ ntype->drawfunc = node_draw_default;
+ ntype->drawupdatefunc = node_update_default;
+ ntype->uifunc = NULL;
+ ntype->uifuncbut = NULL;
+ ntype->resize_area_func = node_resize_area_default;
+
+ node_common_set_butfunc(ntype);
+
+ switch (i) {
+ case NTREE_COMPOSIT:
+ node_composit_set_butfunc(ntype);
+ break;
+ case NTREE_SHADER:
+ node_shader_set_butfunc(ntype);
+ break;
+ case NTREE_TEXTURE:
+ node_texture_set_butfunc(ntype);
+ break;
+ }
+ }
+ }
}
- ntype = node_all_textures.first;
- while(ntype) {
- node_texture_set_butfunc(ntype);
- ntype= ntype->next;
+
+ /* socket type ui functions */
+ for (i=0; i < NUM_SOCKET_TYPES; ++i) {
+ stype = ntreeGetSocketType(i);
+ if (stype) {
+ switch(stype->type) {
+ case SOCK_FLOAT:
+ case SOCK_INT:
+ case SOCK_BOOLEAN:
+ stype->buttonfunc = node_socket_button_default;
+ break;
+ case SOCK_VECTOR:
+ stype->buttonfunc = node_socket_button_components;
+ break;
+ case SOCK_RGBA:
+ stype->buttonfunc = node_socket_button_color;
+ break;
+ default:
+ stype->buttonfunc = NULL;
+ }
+ }
}
}
@@ -1840,6 +2471,69 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int t
}
}
+static void node_link_straight_points(View2D *UNUSED(v2d), SpaceNode *snode, bNodeLink *link, float coord_array[][2])
+{
+ if(link->fromsock) {
+ coord_array[0][0]= link->fromsock->locx;
+ coord_array[0][1]= link->fromsock->locy;
+ }
+ else {
+ if(snode==NULL) return;
+ coord_array[0][0]= snode->mx;
+ coord_array[0][1]= snode->my;
+ }
+ if(link->tosock) {
+ coord_array[1][0]= link->tosock->locx;
+ coord_array[1][1]= link->tosock->locy;
+ }
+ else {
+ if(snode==NULL) return;
+ coord_array[1][0]= snode->mx;
+ coord_array[1][1]= snode->my;
+ }
+}
+
+void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 )
+{
+ float coord_array[2][2];
+ float linew;
+ int i;
+
+ node_link_straight_points(v2d, snode, link, coord_array);
+
+ /* store current linewidth */
+ glGetFloatv(GL_LINE_WIDTH, &linew);
+
+ glEnable(GL_LINE_SMOOTH);
+
+ if(do_triple) {
+ UI_ThemeColorShadeAlpha(th_col3, -80, -120);
+ glLineWidth(4.0f);
+
+ glBegin(GL_LINES);
+ glVertex2fv(coord_array[0]);
+ glVertex2fv(coord_array[1]);
+ glEnd();
+ }
+
+ UI_ThemeColor(th_col1);
+ glLineWidth(1.5f);
+
+ glBegin(GL_LINE_STRIP);
+ for (i=0; i < LINK_RESOL; ++i) {
+ float t= (float)i/(float)(LINK_RESOL-1);
+ if(do_shaded)
+ UI_ThemeColorBlend(th_col1, th_col2, t);
+ glVertex2f((1.0f-t)*coord_array[0][0]+t*coord_array[1][0], (1.0f-t)*coord_array[0][1]+t*coord_array[1][1]);
+ }
+ glEnd();
+
+ glDisable(GL_LINE_SMOOTH);
+
+ /* restore previuos linewidth */
+ glLineWidth(linew);
+}
+
/* note; this is used for fake links in groups too */
void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
{
@@ -1868,7 +2562,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
}
else {
/* check cyclic */
- if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) {
+ if((link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) && (link->flag & NODE_LINK_VALID)) {
/* special indicated link, on drop-node */
if(link->flag & NODE_LINKFLAG_HILITE) {
th_col1= th_col2= TH_ACTIVE;
@@ -1890,6 +2584,5 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
}
node_draw_link_bezier(v2d, snode, link, th_col1, do_shaded, th_col2, do_triple, th_col3);
+// node_draw_link_straight(v2d, snode, link, th_col1, do_shaded, th_col2, do_triple, th_col3);
}
-
-
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index 4b989a78fab..7b14e35e8fe 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -116,10 +116,12 @@ static void active_node_panel(const bContext *C, Panel *pa)
uiItemS(layout);
uiItemR(layout, &ptr, "name", 0, NULL, ICON_NODE);
uiItemS(layout);
-
+
/* draw this node's settings */
if (node->typeinfo && node->typeinfo->uifuncbut)
node->typeinfo->uifuncbut(layout, (bContext *)C, &ptr);
+ else if (node->typeinfo && node->typeinfo->uifunc)
+ node->typeinfo->uifunc(layout, (bContext *)C, &ptr);
}
/* ******************* node buttons registration ************** */
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 950b3c72fe7..e713ed5a678 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -70,8 +70,8 @@
#include "RNA_access.h"
-#include "CMP_node.h"
-#include "SHD_node.h"
+#include "NOD_composite.h"
+#include "NOD_shader.h"
#include "node_intern.h"
@@ -81,6 +81,15 @@
// XXX interface.h
extern void ui_dropshadow(rctf *rct, float radius, float aspect, int select);
+/* XXX update functions for node editor are a mess, needs a clear concept */
+void ED_node_tree_update(SpaceNode *snode, Scene *scene)
+{
+ snode_set_context(snode, scene);
+
+ if(snode->nodetree && snode->nodetree->id.us==0)
+ snode->nodetree->id.us= 1;
+}
+
void ED_node_changed_update(ID *id, bNode *node)
{
bNodeTree *nodetree, *edittree;
@@ -123,24 +132,25 @@ static int has_nodetree(bNodeTree *ntree, bNodeTree *lookup)
return 0;
}
+typedef struct NodeUpdateCalldata {
+ bNodeTree *ntree;
+ bNode *node;
+} NodeUpdateCalldata;
+static void node_generic_update_cb(void *calldata, ID *owner_id, bNodeTree *ntree)
+{
+ NodeUpdateCalldata *cd= (NodeUpdateCalldata*)calldata;
+ /* check if nodetree uses the group stored in calldata */
+ if (has_nodetree(ntree, cd->ntree))
+ ED_node_changed_update(owner_id, cd->node);
+}
void ED_node_generic_update(Main *bmain, bNodeTree *ntree, bNode *node)
{
- Material *ma;
- Tex *tex;
- Scene *sce;
-
+ bNodeTreeType *tti= ntreeGetType(ntree->type);
+ NodeUpdateCalldata cd;
+ cd.ntree = ntree;
+ cd.node = node;
/* look through all datablocks, to support groups */
- for(ma=bmain->mat.first; ma; ma=ma->id.next)
- if(ma->nodetree && ma->use_nodes && has_nodetree(ma->nodetree, ntree))
- ED_node_changed_update(&ma->id, node);
-
- for(tex=bmain->tex.first; tex; tex=tex->id.next)
- if(tex->nodetree && tex->use_nodes && has_nodetree(tex->nodetree, ntree))
- ED_node_changed_update(&tex->id, node);
-
- for(sce=bmain->scene.first; sce; sce=sce->id.next)
- if(sce->nodetree && sce->use_nodes && has_nodetree(sce->nodetree, ntree))
- ED_node_changed_update(&sce->id, node);
+ tti->foreach_nodetree(bmain, &cd, node_generic_update_cb);
if(ntree->type == NTREE_TEXTURE)
ntreeTexCheckCyclics(ntree);
@@ -204,14 +214,19 @@ static void node_uiblocks_init(const bContext *C, bNodeTree *ntree)
}
/* based on settings in node, sets drawing rect info. each redraw! */
-static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
+static void node_update_basis(const bContext *C, bNodeTree *ntree, bNode *node)
{
uiLayout *layout;
PointerRNA ptr;
bNodeSocket *nsock;
- float dy= node->locy;
+ float locx, locy;
+ float dy;
int buty;
+ /* get "global" coords */
+ nodeSpaceCoords(node, &locx, &locy);
+ dy= locy;
+
/* header */
dy-= NODE_DY;
@@ -222,14 +237,14 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
/* output sockets */
for(nsock= node->outputs.first; nsock; nsock= nsock->next) {
if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
- nsock->locx= node->locx + node->width;
+ nsock->locx= locx + node->width;
nsock->locy= dy - NODE_DYS;
dy-= NODE_DY;
}
}
- node->prvr.xmin= node->locx + NODE_DYS;
- node->prvr.xmax= node->locx + node->width- NODE_DYS;
+ node->prvr.xmin= locx + NODE_DYS;
+ node->prvr.xmax= locx + node->width- NODE_DYS;
/* preview rect? */
if(node->flag & NODE_PREVIEW) {
@@ -286,21 +301,22 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
node->butr.ymax= 0;
RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
-
+
layout= uiBlockLayout(node->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL,
- node->locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, U.uistyles.first);
-
+ locx+NODE_DYS, dy, node->butr.xmax, NODE_DY, UI_GetStyle());
+
node->typeinfo->uifunc(layout, (bContext *)C, &ptr);
+
uiBlockEndAlign(node->block);
uiBlockLayoutResolve(node->block, NULL, &buty);
-
+
dy= buty - NODE_DYS/2;
}
/* input sockets */
for(nsock= node->inputs.first; nsock; nsock= nsock->next) {
if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
- nsock->locx= node->locx;
+ nsock->locx= locx;
nsock->locy= dy - NODE_DYS;
dy-= NODE_DY;
}
@@ -310,19 +326,23 @@ static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
if(node->inputs.first || (node->flag & (NODE_OPTIONS|NODE_PREVIEW))==0 )
dy-= NODE_DYS/2;
- node->totr.xmin= node->locx;
- node->totr.xmax= node->locx + node->width;
- node->totr.ymax= node->locy;
- node->totr.ymin= MIN2(dy, node->locy-2*NODE_DY);
+ node->totr.xmin= locx;
+ node->totr.xmax= locx + node->width;
+ node->totr.ymax= locy;
+ node->totr.ymin= MIN2(dy, locy-2*NODE_DY);
}
/* based on settings in node, sets drawing rect info. each redraw! */
static void node_update_hidden(bNode *node)
{
bNodeSocket *nsock;
+ float locx, locy;
float rad, drad, hiddenrad= HIDDEN_RAD;
int totin=0, totout=0, tot;
+ /* get "global" coords */
+ nodeSpaceCoords(node, &locx, &locy);
+
/* calculate minimal radius */
for(nsock= node->inputs.first; nsock; nsock= nsock->next)
if(!(nsock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL)))
@@ -336,9 +356,9 @@ static void node_update_hidden(bNode *node)
hiddenrad += 5.0f*(float)(tot-4);
}
- node->totr.xmin= node->locx;
- node->totr.xmax= node->locx + 3*hiddenrad + node->miniwidth;
- node->totr.ymax= node->locy + (hiddenrad - 0.5f*NODE_DY);
+ node->totr.xmin= locx;
+ node->totr.xmax= locx + 3*hiddenrad + node->miniwidth;
+ node->totr.ymax= locy + (hiddenrad - 0.5f*NODE_DY);
node->totr.ymin= node->totr.ymax - 2*hiddenrad;
/* output sockets */
@@ -364,6 +384,14 @@ static void node_update_hidden(bNode *node)
}
}
+void node_update_default(const bContext *C, bNodeTree *ntree, bNode *node)
+{
+ if(node->flag & NODE_HIDDEN)
+ node_update_hidden(node);
+ else
+ node_update_basis(C, ntree, node);
+}
+
static int node_get_colorid(bNode *node)
{
if(node->typeinfo->nclass==NODE_CLASS_INPUT)
@@ -383,138 +411,42 @@ static int node_get_colorid(bNode *node)
return TH_NODE;
}
-/* based on settings in node, sets drawing rect info. each redraw! */
-/* note: this assumes only 1 group at a time is drawn (linked data) */
-/* in node->totr the entire boundbox for the group is stored */
-static void node_update_group(const bContext *C, bNodeTree *UNUSED(ntree), bNode *gnode)
-{
- bNodeTree *ngroup= (bNodeTree *)gnode->id;
- bNode *node;
- bNodeSocket *sock, *gsock;
- rctf *rect= &gnode->totr;
- float node_group_frame= U.dpi*NODE_GROUP_FRAME/72;
- int counter;
- int dy;
-
- rect->xmin = rect->xmax = gnode->locx;
- rect->ymin = rect->ymax = gnode->locy;
-
- /* center them, is a bit of abuse of locx and locy though */
- for(node= ngroup->nodes.first; node; node= node->next) {
- node->locx+= gnode->locx;
- node->locy+= gnode->locy;
-
- if(node->flag & NODE_HIDDEN)
- node_update_hidden(node);
- else
- node_update(C, ngroup, node);
- node->locx-= gnode->locx;
- node->locy-= gnode->locy;
- }
- counter= 1;
- for(node= ngroup->nodes.first; node; node= node->next) {
- if(counter) {
- *rect= node->totr;
- counter= 0;
- }
- else
- BLI_union_rctf(rect, &node->totr);
- }
-
- /* add some room for links to group sockets */
- rect->xmin -= 4*NODE_DY;
- rect->xmax += 4*NODE_DY;
- rect->ymin-= NODE_DY;
- rect->ymax+= NODE_DY;
-
- /* input sockets */
- dy = 0.5f*(rect->ymin+rect->ymax) + NODE_DY*(BLI_countlist(&gnode->inputs)-1);
- for(gsock=ngroup->inputs.first, sock=gnode->inputs.first; gsock; gsock=gsock->next, sock=sock->next) {
- gsock->locx = rect->xmin;
- sock->locx = rect->xmin - node_group_frame;
- sock->locy = gsock->locy = dy;
-
- /* prevent long socket lists from growing out of the group box */
- if (dy-3*NODE_DYS < rect->ymin)
- rect->ymin = dy-3*NODE_DYS;
- if (dy+3*NODE_DYS > rect->ymax)
- rect->ymax = dy+3*NODE_DYS;
-
- dy -= 2*NODE_DY;
- }
-
- /* output sockets */
- dy = 0.5f*(rect->ymin+rect->ymax) + NODE_DY*(BLI_countlist(&gnode->outputs)-1);
- for(gsock=ngroup->outputs.first, sock=gnode->outputs.first; gsock; gsock=gsock->next, sock=sock->next) {
- gsock->locx = rect->xmax;
- sock->locx = rect->xmax + node_group_frame;
- sock->locy = gsock->locy = dy - NODE_DYS;
-
- /* prevent long socket lists from growing out of the group box */
- if (dy-3*NODE_DYS < rect->ymin)
- rect->ymin = dy-3*NODE_DYS;
- if (dy+3*NODE_DYS > rect->ymax)
- rect->ymax = dy+3*NODE_DYS;
-
- dy -= 2*NODE_DY;
- }
-}
-
/* note: in cmp_util.c is similar code, for node_compo_pass_on() */
/* note: in node_edit.c is similar code, for untangle node */
static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node)
{
- bNodeSocket *valsock= NULL, *colsock= NULL, *vecsock= NULL;
- bNodeSocket *sock;
+ static int types[]= { SOCK_FLOAT, SOCK_VECTOR, SOCK_RGBA };
bNodeLink link= {NULL};
- int a;
-
- /* connect the first value buffer in with first value out */
- /* connect the first RGBA buffer in with first RGBA out */
+ int i;
- /* test the inputs */
- for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
- if(nodeCountSocketLinks(snode->edittree, sock)) {
- if(sock->type==SOCK_VALUE && valsock==NULL) valsock= sock;
- if(sock->type==SOCK_VECTOR && vecsock==NULL) vecsock= sock;
- if(sock->type==SOCK_RGBA && colsock==NULL) colsock= sock;
- }
- }
+ /* connect the first input of each type with first output of the same type */
- /* outputs, draw lines */
glEnable(GL_BLEND);
glEnable( GL_LINE_SMOOTH );
- if(valsock || colsock || vecsock) {
- for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) {
- if(nodeCountSocketLinks(snode->edittree, sock)) {
- link.tosock= sock;
-
- if(sock->type==SOCK_VALUE && valsock) {
- link.fromsock= valsock;
- node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE);
- valsock= NULL;
- }
- if(sock->type==SOCK_VECTOR && vecsock) {
- link.fromsock= vecsock;
- node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE);
- vecsock= NULL;
- }
- if(sock->type==SOCK_RGBA && colsock) {
- link.fromsock= colsock;
- node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE);
- colsock= NULL;
- }
+ link.fromnode = link.tonode = node;
+ for (i=0; i < 3; ++i) {
+ /* find input socket */
+ for (link.fromsock=node->inputs.first; link.fromsock; link.fromsock=link.fromsock->next)
+ if (link.fromsock->type==types[i] && nodeCountSocketLinks(snode->edittree, link.fromsock))
+ break;
+ if (link.fromsock) {
+ for (link.tosock=node->outputs.first; link.tosock; link.tosock=link.tosock->next)
+ if (link.tosock->type==types[i] && nodeCountSocketLinks(snode->edittree, link.tosock))
+ break;
+
+ if (link.tosock) {
+ node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE);
}
}
}
+
glDisable(GL_BLEND);
glDisable( GL_LINE_SMOOTH );
}
-/* nice AA filled circle */
/* this might have some more generic use */
-static void circle_draw(float x, float y, float size, int col[3])
+static void node_circle_draw(float x, float y, float size, char *col)
{
/* 16 values of sin function */
static float si[16] = {
@@ -550,37 +482,10 @@ static void circle_draw(float x, float y, float size, int col[3])
glDisable(GL_BLEND);
}
-static void socket_circle_draw(bNodeSocket *sock, float size)
-{
- int col[3];
-
- if(sock->type==-1) {
- col[0]= 0; col[1]= 0; col[2]= 0;
- }
- else if(sock->type==SOCK_VALUE) {
- col[0]= 160; col[1]= 160; col[2]= 160;
- }
- else if(sock->type==SOCK_VECTOR) {
- col[0]= 100; col[1]= 100; col[2]= 200;
- }
- else if(sock->type==SOCK_RGBA) {
- col[0]= 200; col[1]= 200; col[2]= 40;
- }
- else {
- col[0]= 100; col[1]= 200; col[2]= 100;
- }
-
- circle_draw(sock->locx, sock->locy, size, col);
-}
-
-static void node_sync_cb(bContext *UNUSED(C), void *snode_v, void *node_v)
+void node_socket_circle_draw(bNodeTree *UNUSED(ntree), bNodeSocket *sock, float size)
{
- SpaceNode *snode= snode_v;
-
- if(snode->treetype==NTREE_SHADER) {
- nodeShaderSynchronizeID(node_v, 1);
- // allqueue(REDRAWBUTSSHADING, 0);
- }
+ bNodeSocketType *stype = ntreeGetSocketType(sock->type);
+ node_circle_draw(sock->locx, sock->locy, size, stype->ui_color);
}
/* ************** Socket callbacks *********** */
@@ -639,89 +544,12 @@ static void node_draw_preview(bNodePreview *preview, rctf *prv)
}
-typedef struct SocketVectorMenuArgs {
- PointerRNA ptr;
- int x, y, width;
- uiButHandleFunc cb;
- void *arg1, *arg2;
-} SocketVectorMenuArgs;
-
-/* NOTE: this is a block-menu, needs 0 events, otherwise the menu closes */
-static uiBlock *socket_vector_menu(bContext *C, ARegion *ar, void *args_v)
-{
- SocketVectorMenuArgs *args= (SocketVectorMenuArgs*)args_v;
- uiBlock *block;
- uiLayout *layout;
-
- block= uiBeginBlock(C, ar, "socket menu", UI_EMBOSS);
- uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
-
- layout= uiLayoutColumn(uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, args->x, args->y+2, args->width, NODE_DY, U.uistyles.first), 0);
-
- uiItemR(layout, &args->ptr, "default_value", UI_ITEM_R_EXPAND, "", ICON_NONE);
-
- return block;
-}
-
-static void node_draw_socket_button(bNodeTree *ntree, bNodeSocket *sock, const char *name,
- uiBlock *block, int x, int y, int width,
- uiButHandleFunc cb, void *arg1, void *arg2)
-{
- uiBut *bt= NULL;
- PointerRNA ptr;
- int labelw;
- SocketVectorMenuArgs *args;
-
- RNA_pointer_create(&ntree->id, &RNA_NodeSocket, sock, &ptr);
-
- switch (sock->type) {
- case SOCK_VALUE:
- bt=uiDefButR(block, NUM, B_NODE_EXEC, name,
- x, y+1, width, NODE_DY-2,
- &ptr, "default_value", 0, sock->ns.min, sock->ns.max, -1, -1, NULL);
- if (cb)
- uiButSetFunc(bt, cb, arg1, arg2);
- break;
-
- case SOCK_VECTOR:
- args= MEM_callocN(sizeof(SocketVectorMenuArgs), "SocketVectorMenuArgs");
-
- args->ptr = ptr;
- args->x = x;
- args->y = y;
- args->width = width;
- args->cb = cb;
- args->arg1 = arg1;
- args->arg2 = arg2;
-
- uiDefBlockButN(block, socket_vector_menu, args, name,
- x, y+1, width, NODE_DY-2,
- "");
- break;
-
- case SOCK_RGBA:
- labelw= width - 40;
-
- bt=uiDefButR(block, COL, B_NODE_EXEC, "",
- x, y+2, (labelw>0 ? 40 : width), NODE_DY-2,
- &ptr, "default_value", 0, sock->ns.min, sock->ns.max, -1, -1, NULL);
- if (cb)
- uiButSetFunc(bt, cb, arg1, arg2);
-
- 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;
- }
-}
-
static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node)
{
bNodeSocket *sock;
rctf *rct= &node->totr;
float iconofs;
- float socket_size= NODE_SOCKSIZE*U.dpi/72;
+ /* float socket_size= NODE_SOCKSIZE*U.dpi/72; */ /* UNUSED */
float iconbutw= 0.8f*UI_UNIT_X;
int color_id= node_get_colorid(node);
char showname[128]; /* 128 used below */
@@ -740,7 +568,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
return;
}
- uiSetRoundBox(15-4);
+ uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_LEFT);
ui_dropshadow(rct, BASIS_RAD, snode->aspect, node->flag & SELECT);
/* header */
@@ -752,7 +580,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
if(node->flag & NODE_MUTED)
UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
- uiSetRoundBox(3);
+ uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
uiRoundBox(rct->xmin, rct->ymax-NODE_DY, rct->xmax, rct->ymax, BASIS_RAD);
/* show/hide icons, note this sequence is copied in do_header_node() node_state.c */
@@ -809,13 +637,8 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
else
UI_ThemeColor(TH_TEXT); */
- if (node->label[0]!='\0')
- BLI_strncpy(showname, node->label, sizeof(showname));
- else if (node->typeinfo->labelfunc)
- BLI_strncpy(showname, node->typeinfo->labelfunc(node), sizeof(showname));
- else
- BLI_strncpy(showname, node->typeinfo->name, sizeof(showname));
-
+ BLI_strncpy(showname, nodeLabel(node), sizeof(showname));
+
//if(node->flag & NODE_MUTED)
// sprintf(showname, "[%s]", showname);
@@ -825,7 +648,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
/* body */
UI_ThemeColor4(TH_NODE);
glEnable(GL_BLEND);
- uiSetRoundBox(8);
+ uiSetRoundBox(UI_CNR_BOTTOM_LEFT);
uiRoundBox(rct->xmin, rct->ymin, rct->xmax, rct->ymax-NODE_DY, BASIS_RAD);
glDisable(GL_BLEND);
@@ -841,7 +664,7 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
UI_ThemeColorShadeAlpha(TH_TEXT_HI, 0, -40);
else
UI_ThemeColorShadeAlpha(TH_TEXT_HI, -20, -120);
- uiSetRoundBox(15-4); // round all corners except lower right
+ 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 );
@@ -855,37 +678,45 @@ 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) {
- if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
- socket_circle_draw(sock, socket_size);
-
- if(node->block && sock->link==NULL) {
- node_draw_socket_button(ntree, sock, sock->name, node->block, sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY, node_sync_cb, snode, node);
- }
- else {
- uiDefBut(node->block, LABEL, 0, sock->name, (short)(sock->locx+7), (short)(sock->locy-9.0f),
- (short)(node->width-NODE_DY), NODE_DY, NULL, 0, 0, 0, 0, "");
- }
+ bNodeSocketType *stype= ntreeGetSocketType(sock->type);
+
+ if(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))
+ continue;
+
+ node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE);
+
+ if (sock->link) {
+ uiDefBut(node->block, LABEL, 0, sock->name, sock->locx+NODE_DYS, sock->locy-NODE_DYS, node->width-NODE_DY, NODE_DY,
+ NULL, 0, 0, 0, 0, "");
+ }
+ else {
+ if (stype->buttonfunc)
+ stype->buttonfunc(C, node->block, ntree, node, sock, 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) {
- if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))) {
- float slen;
- int ofs= 0;
-
- socket_circle_draw(sock, socket_size);
-
- UI_ThemeColor(TH_TEXT);
- slen= snode->aspect*UI_GetStringWidth(sock->name);
- while(slen > node->width) {
- ofs++;
- slen= snode->aspect*UI_GetStringWidth(sock->name+ofs);
- }
-
- uiDefBut(node->block, LABEL, 0, sock->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, "");
+ PointerRNA sockptr;
+ float slen;
+ int ofs;
+
+ RNA_pointer_create((ID*)ntree, &RNA_NodeSocket, sock, &sockptr);
+
+ if(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL))
+ continue;
+
+ node_socket_circle_draw(ntree, sock, NODE_SOCKSIZE);
+
+ ofs= 0;
+ UI_ThemeColor(TH_TEXT);
+ slen= snode->aspect*UI_GetStringWidth(sock->name);
+ while(slen > node->width) {
+ ofs++;
+ slen= snode->aspect*UI_GetStringWidth(sock->name+ofs);
}
+ uiDefBut(node->block, LABEL, 0, sock->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, "");
}
/* preview */
@@ -914,7 +745,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
char showname[128]; /* 128 is used below */
/* shadow */
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
ui_dropshadow(rct, hiddenrad, snode->aspect, node->flag & SELECT);
/* body */
@@ -956,12 +787,7 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
UI_ThemeColor(TH_TEXT);
if(node->miniwidth>0.0f) {
- if (node->label[0]!='\0')
- BLI_strncpy(showname, node->label, sizeof(showname));
- else if (node->typeinfo->labelfunc)
- BLI_strncpy(showname, node->typeinfo->labelfunc(node), sizeof(showname));
- else
- BLI_strncpy(showname, node->typeinfo->name, sizeof(showname));
+ BLI_strncpy(showname, nodeLabel(node), sizeof(showname));
//if(node->flag & NODE_MUTED)
// sprintf(showname, "[%s]", showname);
@@ -984,12 +810,12 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
/* sockets */
for(sock= node->inputs.first; sock; sock= sock->next) {
if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL)))
- socket_circle_draw(sock, socket_size);
+ node_socket_circle_draw(snode->nodetree, sock, socket_size);
}
for(sock= node->outputs.first; sock; sock= sock->next) {
if(!(sock->flag & (SOCK_HIDDEN|SOCK_UNAVAIL)))
- socket_circle_draw(sock, socket_size);
+ node_socket_circle_draw(snode->nodetree, sock, socket_size);
}
uiEndBlock(C, node->block);
@@ -997,7 +823,43 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
node->block= NULL;
}
-static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree)
+void node_draw_default(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node)
+{
+ if(node->flag & NODE_HIDDEN)
+ node_draw_hidden(C, ar, snode, node);
+ else
+ node_draw_basis(C, ar, snode, ntree, node);
+}
+
+static void node_update(const bContext *C, bNodeTree *ntree, bNode *node)
+{
+ if (node->typeinfo->drawupdatefunc)
+ node->typeinfo->drawupdatefunc(C, ntree, node);
+}
+
+void node_update_nodetree(const bContext *C, bNodeTree *ntree, float offsetx, float offsety)
+{
+ bNode *node;
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ /* XXX little hack */
+ node->locx += offsetx;
+ node->locy += offsety;
+
+ node_update(C, ntree, node);
+
+ node->locx -= offsetx;
+ node->locy -= offsety;
+ }
+}
+
+static void node_draw(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *node)
+{
+ if (node->typeinfo->drawfunc)
+ node->typeinfo->drawfunc(C, ar, snode, ntree, node);
+}
+
+void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree)
{
bNode *node;
bNodeLink *link;
@@ -1013,212 +875,11 @@ static void node_draw_nodetree(const bContext *C, ARegion *ar, SpaceNode *snode,
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
- /* not selected first */
- for(a=0, node= ntree->nodes.first; node; node= node->next, a++) {
+ /* draw nodes, last nodes in front */
+ for(a=0, node= ntree->nodes.first; node; node=node->next, a++) {
node->nr= a; /* index of node in list, used for exec event code */
- if(!(node->flag & SELECT)) {
- if(node->flag & NODE_GROUP_EDIT);
- else if(node->flag & NODE_HIDDEN)
- node_draw_hidden(C, ar, snode, node);
- else
- node_draw_basis(C, ar, snode, ntree, node);
- }
- }
-
- /* selected */
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
- if(node->flag & NODE_GROUP_EDIT);
- else if(node->flag & NODE_HIDDEN)
- node_draw_hidden(C, ar, snode, node);
- else
- node_draw_basis(C, ar, snode, ntree, node);
- }
- }
-}
-
-static void group_verify_cb(bContext *UNUSED(C), void *UNUSED(snode_v), void *ngroup_v)
-{
- bNodeTree *ngroup= (bNodeTree*)ngroup_v;
-
- nodeGroupVerify(ngroup);
-}
-
-/* groups are, on creation, centered around 0,0 */
-static void node_draw_group(const bContext *C, ARegion *ar, SpaceNode *snode, bNodeTree *ntree, bNode *gnode)
-{
- bNodeTree *ngroup= (bNodeTree *)gnode->id;
- bNodeSocket *sock;
- uiLayout *layout;
- PointerRNA ptr;
- uiBut *bt;
- rctf rect= gnode->totr;
- float socket_size= NODE_SOCKSIZE*U.dpi/72;
- float node_group_frame= U.dpi*NODE_GROUP_FRAME/72;
- float group_header= 26*U.dpi/72;
- float arrowbutw= 0.8f*UI_UNIT_X;
- /* layout stuff for buttons on group left frame */
- float col1= 6, colw1= 0.6f*node_group_frame;
- float col2= col1 + colw1+6;
- float col3= node_group_frame - arrowbutw - 6;
- /* layout stuff for buttons on group right frame */
- float cor1= 6;
- float cor2= cor1 + arrowbutw + 6;
- float cor3= cor2 + arrowbutw + 6, corw3= node_group_frame - cor3-6;
-
- int index;
-
- /* backdrop header */
- glEnable(GL_BLEND);
- uiSetRoundBox(3);
- UI_ThemeColorShadeAlpha(TH_NODE_GROUP, 0, -70);
- uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymax, rect.xmax+node_group_frame, rect.ymax+group_header, BASIS_RAD);
-
- /* backdrop body */
- UI_ThemeColorShadeAlpha(TH_BACK, -8, -70);
- uiSetRoundBox(0);
- uiDrawBox(GL_POLYGON, rect.xmin, rect.ymin, rect.xmax, rect.ymax, BASIS_RAD);
-
- /* input column */
- UI_ThemeColorShadeAlpha(TH_BACK, 10, -50);
- uiSetRoundBox(8);
- uiDrawBox(GL_POLYGON, rect.xmin-node_group_frame, rect.ymin, rect.xmin, rect.ymax, BASIS_RAD);
-
- /* output column */
- UI_ThemeColorShadeAlpha(TH_BACK, 10, -50);
- uiSetRoundBox(4);
- uiDrawBox(GL_POLYGON, rect.xmax, rect.ymin, rect.xmax+node_group_frame, rect.ymax, BASIS_RAD);
-
- /* input column separator */
- glColor4ub(200, 200, 200, 140);
- glBegin(GL_LINES);
- glVertex2f(rect.xmin, rect.ymin);
- glVertex2f(rect.xmin, rect.ymax);
- glEnd();
-
- /* output column separator */
- glColor4ub(200, 200, 200, 140);
- glBegin(GL_LINES);
- glVertex2f(rect.xmax, rect.ymin);
- glVertex2f(rect.xmax, rect.ymax);
- glEnd();
-
- /* group node outline */
- uiSetRoundBox(15);
- glColor4ub(200, 200, 200, 140);
- 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_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, U.uistyles.first);
- RNA_pointer_create(&ntree->id, &RNA_Node, gnode, &ptr);
- uiTemplateIDBrowse(layout, (bContext*)C, &ptr, "node_tree", NULL, NULL, NULL);
- uiBlockLayoutResolve(gnode->block, NULL, NULL);
-
- /* draw the internal tree nodes and links */
- node_draw_nodetree(C, ar, snode, ngroup);
-
- /* group sockets */
- for(sock=ngroup->inputs.first, index=0; sock; sock=sock->next, ++index) {
- float locx= sock->locx - node_group_frame;
-
- socket_circle_draw(sock, socket_size);
- /* small hack to use socket_circle_draw function with offset */
- sock->locx -= node_group_frame;
- socket_circle_draw(sock, socket_size);
- sock->locx += node_group_frame;
-
- bt = uiDefBut(gnode->block, TEX, 0, "",
- locx+col1, sock->locy+1, colw1, NODE_DY,
- sock->name, 0, 31, 0, 0, "");
- uiButSetFunc(bt, group_verify_cb, snode, ngroup);
-
- node_draw_socket_button(ngroup, sock, "", gnode->block,
- locx+col1, sock->locy-NODE_DY, colw1,
- NULL, NULL, NULL);
-
- uiBlockSetDirection(gnode->block, UI_TOP);
- uiBlockBeginAlign(gnode->block);
- bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_up", 0, ICON_TRIA_UP,
- locx+col2, sock->locy, arrowbutw, arrowbutw, "");
- if (!sock->prev)
- uiButSetFlag(bt, UI_BUT_DISABLED);
- RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
- RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_IN);
- bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_down", 0, ICON_TRIA_DOWN,
- locx+col2, sock->locy-arrowbutw, arrowbutw, arrowbutw, "");
- if (!sock->next)
- uiButSetFlag(bt, UI_BUT_DISABLED);
- RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
- RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_IN);
- uiBlockEndAlign(gnode->block);
- uiBlockSetDirection(gnode->block, 0);
-
- uiBlockSetEmboss(gnode->block, UI_EMBOSSN);
- bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_remove", 0, ICON_X,
- locx+col3, sock->locy-0.5f*arrowbutw, arrowbutw, arrowbutw, "");
- RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
- RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_IN);
- uiBlockSetEmboss(gnode->block, UI_EMBOSS);
- }
-
- for(sock=ngroup->outputs.first, index=0; sock; sock=sock->next, ++index) {
- float locx= sock->locx;
-
- socket_circle_draw(sock, socket_size);
- /* small hack to use socket_circle_draw function with offset */
- sock->locx += node_group_frame;
- socket_circle_draw(sock, socket_size);
- sock->locx -= node_group_frame;
-
- uiBlockSetEmboss(gnode->block, UI_EMBOSSN);
- bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_remove", 0, ICON_X,
- locx+col1, sock->locy-0.5f*arrowbutw, arrowbutw, arrowbutw, "");
- RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
- RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_OUT);
- uiBlockSetEmboss(gnode->block, UI_EMBOSS);
-
- uiBlockSetDirection(gnode->block, UI_TOP);
- uiBlockBeginAlign(gnode->block);
- bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_up", 0, ICON_TRIA_UP,
- locx+cor2, sock->locy, arrowbutw, arrowbutw, "");
- if (!sock->prev)
- uiButSetFlag(bt, UI_BUT_DISABLED);
- RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
- RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_OUT);
- bt = uiDefIconButO(gnode->block, BUT, "NODE_OT_group_socket_move_down", 0, ICON_TRIA_DOWN,
- locx+cor2, sock->locy-arrowbutw, arrowbutw, arrowbutw, "");
- if (!sock->next)
- uiButSetFlag(bt, UI_BUT_DISABLED);
- RNA_int_set(uiButGetOperatorPtrRNA(bt), "index", index);
- RNA_enum_set(uiButGetOperatorPtrRNA(bt), "in_out", SOCK_OUT);
- uiBlockEndAlign(gnode->block);
- uiBlockSetDirection(gnode->block, 0);
-
- if (sock->link) {
- bt = uiDefBut(gnode->block, TEX, 0, "",
- locx+cor3, sock->locy-NODE_DYS+1, corw3, NODE_DY,
- sock->name, 0, 31, 0, 0, "");
- uiButSetFunc(bt, group_verify_cb, snode, ngroup);
- }
- else {
- bt = uiDefBut(gnode->block, TEX, 0, "",
- locx+cor3, sock->locy+1, corw3, NODE_DY,
- sock->name, 0, 31, 0, 0, "");
- uiButSetFunc(bt, group_verify_cb, snode, ngroup);
-
- node_draw_socket_button(ngroup, sock, "", gnode->block, locx+cor3, sock->locy-NODE_DY, corw3, NULL, NULL, NULL);
- }
+ node_draw(C, ar, snode, ntree, node);
}
-
- uiEndBlock(C, gnode->block);
- uiDrawBlock(C, gnode->block);
- gnode->block= NULL;
}
void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
@@ -1260,27 +921,19 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
if(node->flag & NODE_GROUP_EDIT)
node_uiblocks_init(C, (bNodeTree *)node->id);
}
-
- node_uiblocks_init(C, snode->nodetree);
+ node_uiblocks_init(C, snode->nodetree);
- /* for now, we set drawing coordinates on each redraw */
- for(node= snode->nodetree->nodes.first; node; node= node->next) {
- if(node->flag & NODE_GROUP_EDIT)
- node_update_group(C, snode->nodetree, node);
- else if(node->flag & NODE_HIDDEN)
- node_update_hidden(node);
- else
- node_update(C, snode->nodetree, node);
- }
-
+ node_update_nodetree(C, snode->nodetree, 0.0f, 0.0f);
node_draw_nodetree(C, ar, snode, snode->nodetree);
-
+
+ #if 0
/* active group */
for(node= snode->nodetree->nodes.first; node; node= node->next) {
if(node->flag & NODE_GROUP_EDIT)
node_draw_group(C, ar, snode, snode->nodetree, node);
}
+ #endif
}
/* temporary links */
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 508cb82ee1b..7cb8351cd12 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -40,9 +40,11 @@
#include "MEM_guardedalloc.h"
+#include "DNA_ID.h"
#include "DNA_object_types.h"
#include "DNA_material_types.h"
#include "DNA_node_types.h"
+#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "BLI_math.h"
@@ -58,11 +60,17 @@
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_material.h"
+#include "BKE_modifier.h"
#include "BKE_paint.h"
#include "BKE_screen.h"
#include "BKE_texture.h"
#include "BKE_report.h"
+
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_storage_types.h"
+
#include "RE_pipeline.h"
#include "IMB_imbuf_types.h"
@@ -74,11 +82,13 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "RNA_enum_types.h"
#include "WM_api.h"
#include "WM_types.h"
#include "UI_interface.h"
+#include "UI_resources.h"
#include "UI_view2d.h"
#include "IMB_imbuf.h"
@@ -88,9 +98,9 @@
#include "node_intern.h"
static EnumPropertyItem socket_in_out_items[] = {
- { SOCK_IN, "IN", 0, "In", "" },
- { SOCK_OUT, "OUT", 0, "Out", "" },
- { 0, NULL, 0, NULL, NULL}
+ { SOCK_IN, "SOCK_IN", 0, "Input", "" },
+ { SOCK_OUT, "SOCK_OUT", 0, "Output", "" },
+ { 0, NULL, 0, NULL, NULL },
};
/* ***************** composite job manager ********************** */
@@ -227,7 +237,7 @@ static bNode *editnode_get_active(bNodeTree *ntree)
/* check for edited group */
for(node= ntree->nodes.first; node; node= node->next)
- if(node->flag & NODE_GROUP_EDIT)
+ if(nodeGroupEditGet(node))
break;
if(node)
return nodeGetActive((bNodeTree *)node->id);
@@ -258,7 +268,7 @@ bNode *node_tree_get_editgroup(bNodeTree *nodetree)
/* get the groupnode */
for(gnode= nodetree->nodes.first; gnode; gnode= gnode->next)
- if(gnode->flag & NODE_GROUP_EDIT)
+ if(nodeGroupEditGet(gnode))
break;
return gnode;
}
@@ -269,6 +279,7 @@ void ED_node_shader_default(Material *ma)
{
bNode *in, *out;
bNodeSocket *fromsock, *tosock;
+ bNodeTemplate ntemp;
/* but lets check it anyway */
if(ma->nodetree) {
@@ -277,12 +288,14 @@ void ED_node_shader_default(Material *ma)
return;
}
- ma->nodetree= ntreeAddTree("Shader Nodetree", NTREE_SHADER, FALSE);
+ ma->nodetree= ntreeAddTree("Shader Nodetree", NTREE_SHADER, 0);
- out= nodeAddNodeType(ma->nodetree, SH_NODE_OUTPUT, NULL, NULL);
+ ntemp.type = SH_NODE_OUTPUT;
+ out= nodeAddNode(ma->nodetree, &ntemp);
out->locx= 300.0f; out->locy= 300.0f;
- in= nodeAddNodeType(ma->nodetree, SH_NODE_MATERIAL, NULL, NULL);
+ ntemp.type = SH_NODE_MATERIAL;
+ in= nodeAddNode(ma->nodetree, &ntemp);
in->locx= 10.0f; in->locy= 300.0f;
nodeSetActive(ma->nodetree, in);
@@ -291,7 +304,7 @@ void ED_node_shader_default(Material *ma)
tosock= out->inputs.first;
nodeAddLink(ma->nodetree, in, fromsock, out, tosock);
- ntreeSolveOrder(ma->nodetree); /* needed for pointers */
+ ntreeUpdateTree(ma->nodetree);
}
/* assumes nothing being done in ntree yet, sets the default in/out node */
@@ -300,6 +313,7 @@ void ED_node_composit_default(Scene *sce)
{
bNode *in, *out;
bNodeSocket *fromsock, *tosock;
+ bNodeTemplate ntemp;
/* but lets check it anyway */
if(sce->nodetree) {
@@ -308,14 +322,16 @@ void ED_node_composit_default(Scene *sce)
return;
}
- sce->nodetree= ntreeAddTree("Compositing Nodetree", NTREE_COMPOSIT, FALSE);
+ sce->nodetree= ntreeAddTree("Compositing Nodetree", NTREE_COMPOSIT, 0);
- out= nodeAddNodeType(sce->nodetree, CMP_NODE_COMPOSITE, NULL, NULL);
+ ntemp.type = CMP_NODE_COMPOSITE;
+ out= nodeAddNode(sce->nodetree, &ntemp);
out->locx= 300.0f; out->locy= 400.0f;
out->id= &sce->id;
id_us_plus(out->id);
- in= nodeAddNodeType(sce->nodetree, CMP_NODE_R_LAYERS, NULL, NULL);
+ ntemp.type = CMP_NODE_R_LAYERS;
+ in= nodeAddNode(sce->nodetree, &ntemp);
in->locx= 10.0f; in->locy= 400.0f;
in->id= &sce->id;
id_us_plus(in->id);
@@ -326,7 +342,7 @@ void ED_node_composit_default(Scene *sce)
tosock= out->inputs.first;
nodeAddLink(sce->nodetree, in, fromsock, out, tosock);
- ntreeSolveOrder(sce->nodetree); /* needed for pointers */
+ ntreeUpdateTree(sce->nodetree);
// XXX ntreeCompositForceHidden(sce->nodetree);
}
@@ -337,6 +353,7 @@ void ED_node_texture_default(Tex *tx)
{
bNode *in, *out;
bNodeSocket *fromsock, *tosock;
+ bNodeTemplate ntemp;
/* but lets check it anyway */
if(tx->nodetree) {
@@ -345,12 +362,14 @@ void ED_node_texture_default(Tex *tx)
return;
}
- tx->nodetree= ntreeAddTree("Texture Nodetree", NTREE_TEXTURE, FALSE);
+ tx->nodetree= ntreeAddTree("Texture Nodetree", NTREE_TEXTURE, 0);
- out= nodeAddNodeType(tx->nodetree, TEX_NODE_OUTPUT, NULL, NULL);
+ ntemp.type = TEX_NODE_OUTPUT;
+ out= nodeAddNode(tx->nodetree, &ntemp);
out->locx= 300.0f; out->locy= 300.0f;
- in= nodeAddNodeType(tx->nodetree, TEX_NODE_CHECKER, NULL, NULL);
+ ntemp.type = TEX_NODE_CHECKER;
+ in= nodeAddNode(tx->nodetree, &ntemp);
in->locx= 10.0f; in->locy= 300.0f;
nodeSetActive(tx->nodetree, in);
@@ -358,43 +377,53 @@ void ED_node_texture_default(Tex *tx)
tosock= out->inputs.first;
nodeAddLink(tx->nodetree, in, fromsock, out, tosock);
- ntreeSolveOrder(tx->nodetree); /* needed for pointers */
+ ntreeUpdateTree(tx->nodetree);
}
/* id is supposed to contain a node tree */
void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype)
{
- bNode *node= NULL;
- short idtype= GS(id->name);
-
- if(idtype == ID_MA) {
- *ntree= ((Material*)id)->nodetree;
- if(treetype) *treetype= NTREE_SHADER;
- }
- else if(idtype == ID_SCE) {
- *ntree= ((Scene*)id)->nodetree;
- if(treetype) *treetype= NTREE_COMPOSIT;
- }
- else if(idtype == ID_TE) {
- *ntree= ((Tex*)id)->nodetree;
- if(treetype) *treetype= NTREE_TEXTURE;
+ if (id) {
+ bNode *node= NULL;
+ short idtype= GS(id->name);
+
+ if(idtype == ID_NT) {
+ *ntree= (bNodeTree*)id;
+ if(treetype) *treetype= (*ntree)->type;
+ }
+ else if(idtype == ID_MA) {
+ *ntree= ((Material*)id)->nodetree;
+ if(treetype) *treetype= NTREE_SHADER;
+ }
+ else if(idtype == ID_SCE) {
+ *ntree= ((Scene*)id)->nodetree;
+ if(treetype) *treetype= NTREE_COMPOSIT;
+ }
+ else if(idtype == ID_TE) {
+ *ntree= ((Tex*)id)->nodetree;
+ if(treetype) *treetype= NTREE_TEXTURE;
+ }
+ else {
+ if(treetype) *treetype= 0;
+ return;
+ }
+
+ /* find editable group */
+ if(edittree) {
+ if(*ntree)
+ for(node= (*ntree)->nodes.first; node; node= node->next)
+ if(nodeGroupEditGet(node))
+ break;
+
+ if(node && node->id)
+ *edittree= (bNodeTree *)node->id;
+ else
+ *edittree= *ntree;
+ }
}
else {
+ *ntree= NULL;
if(treetype) *treetype= 0;
- return;
- }
-
- /* find editable group */
- if(edittree) {
- if(*ntree)
- for(node= (*ntree)->nodes.first; node; node= node->next)
- if(node->flag & NODE_GROUP_EDIT)
- break;
-
- if(node && node->id)
- *edittree= (bNodeTree *)node->id;
- else
- *edittree= *ntree;
}
}
@@ -403,8 +432,6 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
{
Object *ob= OBACT;
- snode->nodetree= NULL;
- snode->edittree= NULL;
snode->id= snode->from= NULL;
if(snode->treetype==NTREE_SHADER) {
@@ -418,12 +445,10 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
}
}
else if(snode->treetype==NTREE_COMPOSIT) {
- snode->from= NULL;
snode->id= &scene->id;
- /* bit clumsy but reliable way to see if we draw first time */
- if(snode->nodetree==NULL)
- ntreeCompositForceHidden(scene->nodetree, scene);
+ /* update output sockets based on available layers */
+ ntreeCompositForceHidden(scene->nodetree, scene);
}
else if(snode->treetype==NTREE_TEXTURE) {
Tex *tx= NULL;
@@ -461,9 +486,14 @@ void snode_set_context(SpaceNode *snode, Scene *scene)
}
}
}
+ else {
+ if (snode->nodetree && snode->nodetree->type == snode->treetype)
+ snode->id = &snode->nodetree->id;
+ else
+ snode->id = NULL;
+ }
- if(snode->id)
- node_tree_from_ID(snode->id, &snode->nodetree, &snode->edittree, NULL);
+ node_tree_from_ID(snode->id, &snode->nodetree, &snode->edittree, NULL);
}
static void snode_tag_changed(SpaceNode *snode, bNode *node)
@@ -574,19 +604,221 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
}
}
-/* when links in groups change, inputs/outputs change, nodes added/deleted... */
-void node_tree_verify_groups(bNodeTree *nodetree)
+static int compare_nodes(bNode *a, bNode *b)
{
- bNode *gnode;
+ bNode *parent;
+ /* These tell if either the node or any of the parent nodes is selected.
+ * A selected parent means an unselected node is also in foreground!
+ */
+ int a_select=(a->flag & NODE_SELECT), b_select=(b->flag & NODE_SELECT);
+ int a_active=(a->flag & NODE_ACTIVE), b_active=(b->flag & NODE_ACTIVE);
+
+ /* if one is an ancestor of the other */
+ /* XXX there might be a better sorting algorithm for stable topological sort, this is O(n^2) worst case */
+ for (parent = a->parent; parent; parent=parent->parent) {
+ /* if b is an ancestor, it is always behind a */
+ if (parent==b)
+ return 1;
+ /* any selected ancestor moves the node forward */
+ if (parent->flag & NODE_ACTIVE)
+ a_active = 1;
+ if (parent->flag & NODE_SELECT)
+ a_select = 1;
+ }
+ for (parent = b->parent; parent; parent=parent->parent) {
+ /* if a is an ancestor, it is always behind b */
+ if (parent==a)
+ return 0;
+ /* any selected ancestor moves the node forward */
+ if (parent->flag & NODE_ACTIVE)
+ b_active = 1;
+ if (parent->flag & NODE_SELECT)
+ b_select = 1;
+ }
+
+ /* if one of the nodes is in the background and the other not */
+ if ((a->flag & NODE_BACKGROUND) && !(b->flag & NODE_BACKGROUND))
+ return 0;
+ else if (!(a->flag & NODE_BACKGROUND) && (b->flag & NODE_BACKGROUND))
+ return 1;
- gnode= node_tree_get_editgroup(nodetree);
+ /* if one has a higher selection state (active > selected > nothing) */
+ if (!b_active && a_active)
+ return 1;
+ else if (!b_select && (a_active || a_select))
+ return 1;
- /* does all materials */
- if(gnode)
- nodeGroupVerify((bNodeTree *)gnode->id);
+ return 0;
+}
+/* Sorts nodes by selection: unselected nodes first, then selected,
+ * then the active node at the very end. Relative order is kept intact!
+ */
+void node_sort(bNodeTree *ntree)
+{
+ /* merge sort is the algorithm of choice here */
+ bNode *first_a, *first_b, *node_a, *node_b, *tmp;
+ int totnodes= BLI_countlist(&ntree->nodes);
+ int k, a, b;
+ k = 1;
+ while (k < totnodes) {
+ first_a = first_b = ntree->nodes.first;
+
+ do {
+ /* setup first_b pointer */
+ for (b=0; b < k && first_b; ++b) {
+ first_b = first_b->next;
+ }
+ /* all batches merged? */
+ if (first_b==NULL)
+ break;
+
+ /* merge batches */
+ node_a = first_a;
+ node_b = first_b;
+ a = b = 0;
+ while (a < k && b < k && node_b) {
+ if (compare_nodes(node_a, node_b)==0) {
+ node_a = node_a->next;
+ ++a;
+ }
+ else {
+ tmp = node_b;
+ node_b = node_b->next;
+ ++b;
+ BLI_remlink(&ntree->nodes, tmp);
+ BLI_insertlinkbefore(&ntree->nodes, node_a, tmp);
+ }
+ }
+
+ /* setup first pointers for next batch */
+ first_b = node_b;
+ for (; b < k; ++b) {
+ /* all nodes sorted? */
+ if (first_b==NULL)
+ break;
+ first_b = first_b->next;
+ }
+ first_a = first_b;
+ } while (first_b);
+
+ k = k << 1;
+ }
+}
+
+static int inside_rctf(rctf *bounds, rctf *rect)
+{
+ return (bounds->xmin <= rect->xmin && bounds->xmax >= rect->xmax
+ && bounds->ymin <= rect->ymin && bounds->ymax >= rect->ymax);
+}
+
+static void node_frame_attach_nodes(bNodeTree *UNUSED(ntree), bNode *frame)
+{
+ bNode *node;
+
+ /* only check nodes on top of the frame for attaching */
+ for (node=frame->next; node; node=node->next) {
+ if (node->parent==frame) {
+ /* detach nodes that went outside the frame */
+ if (!inside_rctf(&frame->totr, &node->totr))
+ nodeDetachNode(node);
+ }
+ else if (node->flag & NODE_SELECT && node->parent==NULL) {
+ /* attach selected, still unparented nodes */
+ if (inside_rctf(&frame->totr, &node->totr))
+ nodeAttachNode(node, frame);
+ }
+ }
+}
+
+void ED_node_update_hierarchy(bContext *UNUSED(C), bNodeTree *ntree)
+{
+ bNode *node;
+
+ /* XXX This does not work due to layout functions relying on node->block,
+ * which only exists during actual drawing. Can we rely on valid totr rects?
+ */
+ /* make sure nodes have correct bounding boxes after transform */
+// node_update_nodetree(C, ntree, 0.0f, 0.0f);
+
+ /* all selected nodes are re-parented */
+ for (node=ntree->nodes.last; node; node=node->prev) {
+ if (node->flag & NODE_SELECT && node->parent)
+ nodeDetachNode(node);
+ }
+
+ /* update higher Z-level nodes first */
+ for (node=ntree->nodes.last; node; node=node->prev) {
+ /* XXX callback? */
+ if (node->type==NODE_FRAME)
+ node_frame_attach_nodes(ntree, node);
+ }
}
+/* ***************** generic operator functions for nodes ***************** */
+
+#if 0 /* UNUSED */
+
+static int edit_node_poll(bContext *C)
+{
+ return ED_operator_node_active(C);
+}
+
+static void edit_node_properties(wmOperatorType *ot)
+{
+ /* XXX could node be a context pointer? */
+ RNA_def_string(ot->srna, "node", "", 32, "Node", "");
+ RNA_def_int(ot->srna, "socket", 0, 0, MAX_SOCKET, "Socket", "", 0, MAX_SOCKET);
+ RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Side", "");
+}
+
+static int edit_node_invoke_properties(bContext *C, wmOperator *op)
+{
+ if (!RNA_property_is_set(op->ptr, "node")) {
+ bNode *node= CTX_data_pointer_get_type(C, "node", &RNA_Node).data;
+ if (!node)
+ return 0;
+ else
+ RNA_string_set(op->ptr, "node", node->name);
+ }
+
+ if (!RNA_property_is_set(op->ptr, "in_out"))
+ RNA_enum_set(op->ptr, "in_out", SOCK_IN);
+
+ if (!RNA_property_is_set(op->ptr, "socket"))
+ RNA_int_set(op->ptr, "socket", 0);
+
+ return 1;
+}
+
+static void edit_node_properties_get(wmOperator *op, bNodeTree *ntree, bNode **rnode, bNodeSocket **rsock, int *rin_out)
+{
+ bNode *node;
+ bNodeSocket *sock=NULL;
+ char nodename[32];
+ int sockindex;
+ int in_out;
+
+ RNA_string_get(op->ptr, "node", nodename);
+ node = nodeFindNodebyName(ntree, nodename);
+
+ in_out = RNA_enum_get(op->ptr, "in_out");
+
+ sockindex = RNA_int_get(op->ptr, "socket");
+ switch (in_out) {
+ case SOCK_IN: sock = BLI_findlink(&node->inputs, sockindex); break;
+ case SOCK_OUT: sock = BLI_findlink(&node->outputs, sockindex); break;
+ }
+
+ if (rnode)
+ *rnode = node;
+ if (rsock)
+ *rsock = sock;
+ if (rin_out)
+ *rin_out = in_out;
+}
+#endif
+
/* ***************** Edit Group operator ************* */
void snode_make_group_editable(SpaceNode *snode, bNode *gnode)
@@ -594,8 +826,8 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode)
bNode *node;
/* make sure nothing has group editing on */
- for(node= snode->nodetree->nodes.first; node; node= node->next)
- node->flag &= ~NODE_GROUP_EDIT;
+ for(node=snode->nodetree->nodes.first; node; node=node->next)
+ nodeGroupEditClear(node);
if(gnode==NULL) {
/* with NULL argument we do a toggle */
@@ -603,34 +835,30 @@ void snode_make_group_editable(SpaceNode *snode, bNode *gnode)
gnode= nodeGetActive(snode->nodetree);
}
- if(gnode && gnode->type==NODE_GROUP && gnode->id) {
- if(gnode->id->lib)
- ntreeMakeLocal((bNodeTree *)gnode->id);
-
- gnode->flag |= NODE_GROUP_EDIT;
- snode->edittree= (bNodeTree *)gnode->id;
+ if (gnode) {
+ snode->edittree = nodeGroupEditSet(gnode, 1);
/* deselect all other nodes, so we can also do grabbing of entire subtree */
for(node= snode->nodetree->nodes.first; node; node= node->next)
node->flag &= ~SELECT;
gnode->flag |= SELECT;
-
}
else
snode->edittree= snode->nodetree;
-
- ntreeSolveOrder(snode->nodetree);
}
static int node_group_edit_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceNode *snode = CTX_wm_space_node(C);
- bNode *gnode;
ED_preview_kill_jobs(C);
- gnode= nodeGetActive(snode->edittree);
- snode_make_group_editable(snode, gnode);
+ if (snode->nodetree==snode->edittree) {
+ bNode *gnode= nodeGetActive(snode->nodetree);
+ snode_make_group_editable(snode, gnode);
+ }
+ else
+ snode_make_group_editable(snode, NULL);
WM_event_add_notifier(C, NC_SCENE|ND_NODES, NULL);
@@ -643,7 +871,8 @@ static int node_group_edit_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e
bNode *gnode;
gnode= nodeGetActive(snode->edittree);
- if(gnode && gnode->type==NODE_GROUP && gnode->id && gnode->id->lib) {
+ /* XXX callback? */
+ if(gnode && gnode->id && GS(gnode->id->name)==ID_NT && gnode->id->lib) {
uiPupMenuOkee(C, op->type->idname, "Make group local?");
return OPERATOR_CANCELLED;
}
@@ -674,9 +903,9 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op)
SpaceNode *snode = CTX_wm_space_node(C);
int in_out= -1;
char name[32]= "";
- int type= SOCK_VALUE;
+ int type= SOCK_FLOAT;
bNodeTree *ngroup= snode->edittree;
- bNodeSocket *sock;
+ /* bNodeSocket *sock; */ /* UNUSED */
ED_preview_kill_jobs(C);
@@ -691,9 +920,10 @@ static int node_group_socket_add_exec(bContext *C, wmOperator *op)
else
return OPERATOR_CANCELLED;
- sock = nodeGroupAddSocket(ngroup, name, type, in_out);
+ /* using placeholder subtype first */
+ /* sock = */ /* UNUSED */ node_group_add_socket(ngroup, name, type, in_out);
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(ngroup);
snode_notify(C, snode);
@@ -716,7 +946,7 @@ void NODE_OT_group_socket_add(wmOperatorType *ot)
RNA_def_enum(ot->srna, "in_out", socket_in_out_items, SOCK_IN, "Socket Type", "Input or Output");
RNA_def_string(ot->srna, "name", "", 32, "Name", "Group socket name");
- RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_VALUE, "Type", "Type of the group socket");
+ RNA_def_enum(ot->srna, "type", node_socket_type_items, SOCK_FLOAT, "Type", "Type of the group socket");
}
/* ***************** Remove Group Socket operator ************* */
@@ -743,8 +973,8 @@ static int node_group_socket_remove_exec(bContext *C, wmOperator *op)
sock = (bNodeSocket*)BLI_findlink(in_out==SOCK_IN ? &ngroup->inputs : &ngroup->outputs, index);
if (sock) {
- nodeGroupRemoveSocket(ngroup, sock, in_out);
- node_tree_verify_groups(snode->nodetree);
+ node_group_remove_socket(ngroup, sock, in_out);
+ ntreeUpdateTree(ngroup);
snode_notify(C, snode);
}
@@ -756,7 +986,7 @@ void NODE_OT_group_socket_remove(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Remove Group Socket";
- ot->description = "Removed node group socket";
+ ot->description = "Remove a node group socket";
ot->idname = "NODE_OT_group_socket_remove";
/* api callbacks */
@@ -801,6 +1031,8 @@ static int node_group_socket_move_up_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
BLI_remlink(&ngroup->inputs, sock);
BLI_insertlinkbefore(&ngroup->inputs, prev, sock);
+
+ ngroup->update |= NTREE_UPDATE_GROUP_IN;
}
else if (in_out==SOCK_OUT) {
sock = (bNodeSocket*)BLI_findlink(&ngroup->outputs, index);
@@ -810,8 +1042,10 @@ static int node_group_socket_move_up_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
BLI_remlink(&ngroup->outputs, sock);
BLI_insertlinkbefore(&ngroup->outputs, prev, sock);
+
+ ngroup->update |= NTREE_UPDATE_GROUP_OUT;
}
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(ngroup);
snode_notify(C, snode);
@@ -867,6 +1101,8 @@ static int node_group_socket_move_down_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
BLI_remlink(&ngroup->inputs, sock);
BLI_insertlinkafter(&ngroup->inputs, next, sock);
+
+ ngroup->update |= NTREE_UPDATE_GROUP_IN;
}
else if (in_out==SOCK_OUT) {
sock = (bNodeSocket*)BLI_findlink(&ngroup->outputs, index);
@@ -876,8 +1112,10 @@ static int node_group_socket_move_down_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
BLI_remlink(&ngroup->outputs, sock);
BLI_insertlinkafter(&ngroup->outputs, next, sock);
+
+ ngroup->update |= NTREE_UPDATE_GROUP_OUT;
}
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(ngroup);
snode_notify(C, snode);
@@ -924,7 +1162,7 @@ static int node_group_ungroup_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_WARNING, "Not a group");
return OPERATOR_CANCELLED;
}
- else if(!nodeGroupUnGroup(snode->edittree, gnode)) {
+ else if(!node_group_ungroup(snode->edittree, gnode)) {
BKE_report(op->reports, RPT_WARNING, "Can't ungroup");
return OPERATOR_CANCELLED;
}
@@ -952,70 +1190,16 @@ void NODE_OT_group_ungroup(wmOperatorType *ot)
/* ************************** Node generic ************** */
-/* allows to walk the list in order of visibility */
-bNode *next_node(bNodeTree *ntree)
-{
- static bNode *current=NULL, *last= NULL;
-
- if(ntree) {
- /* set current to the first selected node */
- for(current= ntree->nodes.last; current; current= current->prev)
- if(current->flag & NODE_SELECT)
- break;
-
- /* set last to the first unselected node */
- for(last= ntree->nodes.last; last; last= last->prev)
- if((last->flag & NODE_SELECT)==0)
- break;
-
- if(current==NULL)
- current= last;
-
- return NULL;
- }
- /* no nodes, or we are ready */
- if(current==NULL)
- return NULL;
-
- /* now we walk the list backwards, but we always return current */
- if(current->flag & NODE_SELECT) {
- bNode *node= current;
-
- /* find previous selected */
- current= current->prev;
- while(current && (current->flag & NODE_SELECT)==0)
- current= current->prev;
-
- /* find first unselected */
- if(current==NULL)
- current= last;
-
- return node;
- }
- else {
- bNode *node= current;
-
- /* find previous unselected */
- current= current->prev;
- while(current && (current->flag & NODE_SELECT))
- current= current->prev;
-
- return node;
- }
-
- return NULL;
-}
-
/* is rct in visible part of node? */
static bNode *visible_node(SpaceNode *snode, rctf *rct)
{
- bNode *tnode;
+ bNode *node;
- for(next_node(snode->edittree); (tnode=next_node(NULL));) {
- if(BLI_isect_rctf(&tnode->totr, rct, NULL))
+ for(node=snode->edittree->nodes.last; node; node=node->prev) {
+ if(BLI_isect_rctf(&node->totr, rct, NULL))
break;
}
- return tnode;
+ return node;
}
/* **************************** */
@@ -1318,8 +1502,9 @@ void NODE_OT_backimage_sample(wmOperatorType *ot)
/* ********************** size widget operator ******************** */
typedef struct NodeSizeWidget {
- float mxstart;
- float oldwidth;
+ float mxstart, mystart;
+ float oldwidth, oldheight;
+ float oldminiwidth;
} NodeSizeWidget;
static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event)
@@ -1338,13 +1523,16 @@ static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event)
if (node) {
if(node->flag & NODE_HIDDEN) {
- node->miniwidth= nsw->oldwidth + mx - nsw->mxstart;
+ node->miniwidth= nsw->oldminiwidth + mx - nsw->mxstart;
CLAMP(node->miniwidth, 0.0f, 100.0f);
}
else {
node->width= nsw->oldwidth + mx - nsw->mxstart;
CLAMP(node->width, UI_DPI_FAC*node->typeinfo->minwidth, UI_DPI_FAC*node->typeinfo->maxwidth);
}
+ /* height works the other way round ... */
+ node->height= nsw->oldheight - my + nsw->mystart;
+ CLAMP(node->height, node->typeinfo->minheight, node->typeinfo->maxheight);
}
ED_region_tag_redraw(ar);
@@ -1358,6 +1546,8 @@ static int node_resize_modal(bContext *C, wmOperator *op, wmEvent *event)
MEM_freeN(nsw);
op->customdata= NULL;
+ ED_node_update_hierarchy(C, snode->edittree);
+
return OPERATOR_FINISHED;
}
@@ -1371,35 +1561,21 @@ static int node_resize_invoke(bContext *C, wmOperator *op, wmEvent *event)
bNode *node= editnode_get_active(snode->edittree);
if(node) {
- rctf totr;
-
/* convert mouse coordinates to v2d space */
UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1],
&snode->mx, &snode->my);
- totr= node->totr;
-
- if(node->flag & NODE_HIDDEN) {
- /* right part of node */
- totr.xmin= node->totr.xmax-20.0f;
- }
- else {
- /* bottom right corner */
- totr.xmin= totr.xmax-10.0f;
- totr.ymax= totr.ymin+10.0f;
- }
-
- if(BLI_in_rctf(&totr, snode->mx, snode->my)) {
+ if(node->typeinfo->resize_area_func(node, snode->mx, snode->my)) {
NodeSizeWidget *nsw= MEM_callocN(sizeof(NodeSizeWidget), "size widget op data");
op->customdata= nsw;
nsw->mxstart= snode->mx;
+ nsw->mystart= snode->my;
/* store old */
- if(node->flag & NODE_HIDDEN)
- nsw->oldwidth= node->miniwidth;
- else
- nsw->oldwidth= node->width;
+ nsw->oldwidth= node->width;
+ nsw->oldheight= node->height;
+ nsw->oldminiwidth= node->miniwidth;
/* add modal handler */
WM_event_add_modal_handler(C, op);
@@ -1598,7 +1774,7 @@ static void node_link_viewer(SpaceNode *snode, bNode *tonode)
link->fromnode= tonode;
link->fromsock= sock;
}
- ntreeSolveOrder(snode->edittree);
+ ntreeUpdateTree(snode->edittree);
snode_tag_changed(snode, node);
}
}
@@ -1905,6 +2081,7 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace)
ListBase *nodelist = MEM_callocN(sizeof(ListBase), "items_list");
bNodeListItem *nli;
bNode *node;
+ bNodeLink *link;
int i, numlinks=0;
for(node= snode->edittree->nodes.first; node; node= node->next) {
@@ -1941,7 +2118,15 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace)
/* then we can connect */
if (replace)
nodeRemSocketLinks(snode->edittree, sock_to);
- nodeAddLink(snode->edittree, node_fr, sock_fr, node_to, sock_to);
+
+ link = nodeAddLink(snode->edittree, node_fr, sock_fr, node_to, sock_to);
+ /* validate the new link */
+ ntreeUpdateTree(snode->edittree);
+ if (!(link->flag & NODE_LINK_VALID)) {
+ nodeRemLink(snode->edittree, link);
+ continue;
+ }
+
snode_tag_changed(snode, node_to);
++numlinks;
break;
@@ -1949,8 +2134,7 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace)
}
if (numlinks > 0) {
- node_tree_verify_groups(snode->nodetree);
- ntreeSolveOrder(snode->edittree);
+ ntreeUpdateTree(snode->edittree);
}
BLI_freelistN(nodelist);
@@ -1958,28 +2142,13 @@ void snode_autoconnect(SpaceNode *snode, int allow_multiple, int replace)
}
/* can be called from menus too, but they should do own undopush and redraws */
-bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, int type, float locx, float locy)
+bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, bNodeTemplate *ntemp, float locx, float locy)
{
bNode *node= NULL, *gnode;
node_deselectall(snode);
- if(type>=NODE_DYNAMIC_MENU) {
- node= nodeAddNodeType(snode->edittree, type, NULL, NULL);
- }
- else if(type>=NODE_GROUP_MENU) {
- if(snode->edittree!=snode->nodetree) {
- // XXX error("Can not add a Group in a Group");
- return NULL;
- }
- else {
- bNodeTree *ngroup= BLI_findlink(&bmain->nodetree, type-NODE_GROUP_MENU);
- if(ngroup)
- node= nodeAddNodeType(snode->edittree, NODE_GROUP, ngroup, NULL);
- }
- }
- else
- node= nodeAddNodeType(snode->edittree, type, NULL, NULL);
+ node = nodeAddNode(snode->edittree, ntemp);
/* generics */
if(node) {
@@ -1993,7 +2162,7 @@ bNode *node_add_node(SpaceNode *snode, Main *bmain, Scene *scene, int type, floa
node->locy -= gnode->locy;
}
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(snode->edittree);
ED_node_set_active(bmain, snode->edittree, node);
if(snode->nodetree->type==NTREE_COMPOSIT) {
@@ -2094,9 +2263,8 @@ static int node_duplicate_exec(bContext *C, wmOperator *op)
break;
}
- ntreeSolveOrder(ntree);
+ ntreeUpdateTree(snode->edittree);
- node_tree_verify_groups(snode->nodetree);
snode_notify(C, snode);
snode_dag_update(C, snode);
@@ -2185,17 +2353,25 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
if( link->tosock!= tsock && (!tnode || (tnode!=node && link->tonode!=tnode)) ) {
link->tonode= tnode;
link->tosock= tsock;
- if (link->prev==NULL && link->next==NULL)
+ if (link->prev==NULL && link->next==NULL) {
BLI_addtail(&snode->edittree->links, link);
- ntreeSolveOrder(snode->edittree); /* for interactive red line warning */
+ }
+
+ snode->edittree->update |= NTREE_UPDATE_LINKS;
+ ntreeUpdateTree(snode->edittree);
}
}
}
else {
- BLI_remlink(&snode->edittree->links, link);
- link->prev = link->next = NULL;
- link->tonode= NULL;
- link->tosock= NULL;
+ if (link->tonode || link->tosock) {
+ BLI_remlink(&snode->edittree->links, link);
+ link->prev = link->next = NULL;
+ link->tonode= NULL;
+ link->tosock= NULL;
+
+ snode->edittree->update |= NTREE_UPDATE_LINKS;
+ ntreeUpdateTree(snode->edittree);
+ }
}
}
else {
@@ -2205,18 +2381,25 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
if( link->fromsock!= tsock && (!tnode || (tnode!=node && link->fromnode!=tnode)) ) {
link->fromnode= tnode;
link->fromsock= tsock;
- if (link->prev==NULL && link->next==NULL)
+ if (link->prev==NULL && link->next==NULL) {
BLI_addtail(&snode->edittree->links, link);
- ntreeSolveOrder(snode->edittree); /* for interactive red line warning */
+ }
+
+ snode->edittree->update |= NTREE_UPDATE_LINKS;
+ ntreeUpdateTree(snode->edittree);
}
}
}
}
else {
- BLI_remlink(&snode->edittree->links, link);
- link->prev = link->next = NULL;
- link->fromnode= NULL;
- link->fromsock= NULL;
+ if (link->tonode || link->tosock) {
+ BLI_remlink(&snode->edittree->links, link);
+ link->prev = link->next = NULL;
+ link->fromnode= NULL;
+ link->fromsock= NULL;
+ snode->edittree->update |= NTREE_UPDATE_LINKS;
+ ntreeUpdateTree(snode->edittree);
+ }
}
}
/* hilight target sockets only */
@@ -2244,23 +2427,26 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
else if (outside_group_rect(snode) && (link->tonode || link->fromnode)) {
/* automatically add new group socket */
if (link->tonode && link->tosock) {
- link->fromsock = nodeGroupExposeSocket(snode->edittree, link->tosock, SOCK_IN);
+ link->fromsock = node_group_expose_socket(snode->edittree, link->tosock, SOCK_IN);
link->fromnode = NULL;
- if (link->prev==NULL && link->next==NULL)
+ if (link->prev==NULL && link->next==NULL) {
BLI_addtail(&snode->edittree->links, link);
+ }
+ snode->edittree->update |= NTREE_UPDATE_GROUP_IN | NTREE_UPDATE_LINKS;
}
else if (link->fromnode && link->fromsock) {
- link->tosock = nodeGroupExposeSocket(snode->edittree, link->fromsock, SOCK_OUT);
+ link->tosock = node_group_expose_socket(snode->edittree, link->fromsock, SOCK_OUT);
link->tonode = NULL;
- if (link->prev==NULL && link->next==NULL)
+ if (link->prev==NULL && link->next==NULL) {
BLI_addtail(&snode->edittree->links, link);
+ }
+ snode->edittree->update |= NTREE_UPDATE_GROUP_OUT | NTREE_UPDATE_LINKS;
}
}
else
nodeRemLink(snode->edittree, link);
- ntreeSolveOrder(snode->edittree);
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(snode->edittree);
snode_notify(C, snode);
snode_dag_update(C, snode);
@@ -2335,7 +2521,7 @@ static int node_link_invoke(bContext *C, wmOperator *op, wmEvent *event)
ED_preview_kill_jobs(C);
nldrag->in_out= node_link_init(snode, nldrag);
-
+
if(nldrag->in_out) {
op->customdata= nldrag;
@@ -2408,7 +2594,7 @@ static int node_make_link_exec(bContext *C, wmOperator *op)
snode_autoconnect(snode, 1, replace);
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(snode->edittree);
snode_notify(C, snode);
snode_dag_update(C, snode);
@@ -2482,8 +2668,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
}
}
- ntreeSolveOrder(snode->edittree);
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(snode->edittree);
snode_notify(C, snode);
snode_dag_update(C, snode);
@@ -2608,7 +2793,7 @@ void ED_node_link_insert(ScrArea *sa)
link->flag &= ~NODE_LINKFLAG_HILITE;
nodeAddLink(snode->edittree, select, socket_best_match(&select->outputs, sockto->type), node, sockto);
- ntreeSolveOrder(snode->edittree); /* needed for pointers */
+ ntreeUpdateTree(snode->edittree); /* needed for pointers */
snode_tag_changed(snode, select);
ED_node_changed_update(snode->id, select);
}
@@ -2819,14 +3004,14 @@ static int node_group_make_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(C);
- gnode= nodeMakeGroupFromSelected(snode->nodetree);
+ gnode= node_group_make_from_selected(snode->nodetree);
if(gnode==NULL) {
BKE_report(op->reports, RPT_WARNING, "Can not make Group");
return OPERATOR_CANCELLED;
}
else {
nodeSetActive(snode->nodetree, gnode);
- ntreeSolveOrder(snode->nodetree);
+ ntreeUpdateTree(snode->nodetree);
}
snode_notify(C, snode);
@@ -2972,7 +3157,7 @@ static int node_socket_toggle_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(snode->edittree);
snode_notify(C, snode);
@@ -3056,7 +3241,7 @@ static int node_delete_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(snode->edittree);
snode_notify(C, snode);
snode_dag_update(C, snode);
@@ -3126,7 +3311,7 @@ static void node_delete_reconnect(bNodeTree* tree, bNode* node)
deliveringvecsocket = link->fromsock;
}
break;
- case SOCK_VALUE:
+ case SOCK_FLOAT:
if (valsocket == NULL) {
valsocket = link->tosock;
deliveringvalnode = link->fromnode;
@@ -3147,7 +3332,7 @@ static void node_delete_reconnect(bNodeTree* tree, bNode* node)
numberOfConnectedOutputSockets ++;
if (!first) first = link;
switch(sock->type) {
- case SOCK_VALUE:
+ case SOCK_FLOAT:
if (deliveringvalsocket) {
link->fromnode = deliveringvalnode;
link->fromsock = deliveringvalsocket;
@@ -3205,7 +3390,7 @@ static int node_delete_reconnect_exec(bContext *C, wmOperator *UNUSED(op))
}
}
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(snode->edittree);
snode_notify(C, snode);
snode_dag_update(C, snode);
@@ -3235,7 +3420,7 @@ static int node_show_cycles_exec(bContext *C, wmOperator *UNUSED(op))
SpaceNode *snode= CTX_wm_space_node(C);
/* this is just a wrapper around this call... */
- ntreeSolveOrder(snode->edittree);
+ ntreeUpdateTree(snode->nodetree);
snode_notify(C, snode);
return OPERATOR_FINISHED;
@@ -3265,7 +3450,9 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
SpaceNode *snode= CTX_wm_space_node(C);
bNode *node;
Image *ima= NULL;
- int ntype=0;
+ bNodeTemplate ntemp;
+
+ ntemp.type = -1;
/* check input variables */
if (RNA_property_is_set(op->ptr, "filepath"))
@@ -3278,7 +3465,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
ima= BKE_add_image_file(path);
if(!ima) {
- BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s.", path, errno ? strerror(errno) : "Unsupported image format");
+ BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s", path, errno ? strerror(errno) : "Unsupported image format");
return OPERATOR_CANCELLED;
}
}
@@ -3289,7 +3476,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
ima= (Image *)find_id("IM", name);
if(!ima) {
- BKE_reportf(op->reports, RPT_ERROR, "Image named \"%s\", not found.", name);
+ BKE_reportf(op->reports, RPT_ERROR, "Image named \"%s\", not found", name);
return OPERATOR_CANCELLED;
}
}
@@ -3297,14 +3484,17 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
node_deselectall(snode);
if (snode->nodetree->type==NTREE_COMPOSIT)
- ntype = CMP_NODE_IMAGE;
+ ntemp.type = CMP_NODE_IMAGE;
+ if (ntemp.type < 0)
+ return OPERATOR_CANCELLED;
+
ED_preview_kill_jobs(C);
- node = node_add_node(snode, bmain, scene, ntype, snode->mx, snode->my);
+ node = node_add_node(snode, bmain, scene, &ntemp, snode->mx, snode->my);
if (!node) {
- BKE_report(op->reports, RPT_WARNING, "Could not add an image node.");
+ BKE_report(op->reports, RPT_WARNING, "Could not add an image node");
return OPERATOR_CANCELLED;
}
@@ -3347,8 +3537,70 @@ void NODE_OT_add_file(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH); //XXX TODO, relative_path
- RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign.");
+ RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign");
}
+/********************** New node tree operator *********************/
+static int new_node_tree_exec(bContext *C, wmOperator *op)
+{
+ SpaceNode *snode;
+ bNodeTree *ntree;
+ PointerRNA ptr, idptr;
+ PropertyRNA *prop;
+ int treetype;
+ char treename[MAX_ID_NAME-2] = "NodeTree";
+
+ /* retrieve state */
+ snode= CTX_wm_space_node(C);
+
+ if (RNA_property_is_set(op->ptr, "type"))
+ treetype = RNA_enum_get(op->ptr, "type");
+ else
+ treetype = snode->treetype;
+
+ if (RNA_property_is_set(op->ptr, "name"))
+ RNA_string_get(op->ptr, "name", treename);
+
+ ntree = ntreeAddTree(treename, treetype, 0);
+ if(!ntree)
+ return OPERATOR_CANCELLED;
+
+ /* hook into UI */
+ uiIDContextProperty(C, &ptr, &prop);
+ if(prop) {
+ RNA_id_pointer_create(&ntree->id, &idptr);
+ RNA_property_pointer_set(&ptr, prop, idptr);
+ /* RNA_property_pointer_set increases the user count,
+ * fixed here as the editor is the initial user.
+ */
+ --ntree->id.us;
+ RNA_property_update(C, &ptr, prop);
+ }
+ else if(snode) {
+ Scene *scene= CTX_data_scene(C);
+ snode->nodetree = ntree;
+
+ ED_node_tree_update(snode, scene);
+ }
+
+ return OPERATOR_FINISHED;
+}
+
+void NODE_OT_new_node_tree(wmOperatorType *ot)
+{
+ /* identifiers */
+ ot->name= "New node tree";
+ ot->idname= "NODE_OT_new_node_tree";
+
+ /* api callbacks */
+ ot->exec= new_node_tree_exec;
+ ot->poll= ED_operator_node_active;
+
+ /* flags */
+ ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
+
+ RNA_def_enum(ot->srna, "type", nodetree_type_items, NTREE_COMPOSIT, "Tree Type", "");
+ RNA_def_string(ot->srna, "name", "NodeTree", MAX_ID_NAME-2, "Name", "");
+}
diff --git a/source/blender/editors/space_node/node_header.c b/source/blender/editors/space_node/node_header.c
index 634e49dc515..996e05afdef 100644
--- a/source/blender/editors/space_node/node_header.c
+++ b/source/blender/editors/space_node/node_header.c
@@ -44,25 +44,29 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
+#include "BKE_global.h"
#include "BKE_screen.h"
#include "BKE_node.h"
#include "BKE_main.h"
+#include "RNA_access.h"
+
#include "WM_api.h"
#include "WM_types.h"
-
#include "UI_interface.h"
-#include "UI_resources.h"
#include "UI_interface_icons.h"
+#include "UI_resources.h"
#include "UI_view2d.h"
#include "node_intern.h"
/* ************************ add menu *********************** */
-static void do_node_add(bContext *C, void *UNUSED(arg), int event)
+static void do_node_add(bContext *C, bNodeTemplate *ntemp)
{
Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
@@ -89,7 +93,7 @@ static void do_node_add(bContext *C, void *UNUSED(arg), int event)
else node->flag &= ~NODE_TEST;
}
- node= node_add_node(snode, bmain, scene, event, snode->mx, snode->my);
+ node= node_add_node(snode, bmain, scene, ntemp, snode->mx, snode->my);
/* select previous selection before autoconnect */
for(node= snode->edittree->nodes.first; node; node= node->next) {
@@ -105,73 +109,116 @@ static void do_node_add(bContext *C, void *UNUSED(arg), int event)
snode_dag_update(C, snode);
}
-static void node_auto_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
+static void do_node_add_static(bContext *C, void *UNUSED(arg), int event)
+{
+ bNodeTemplate ntemp;
+ ntemp.type = event;
+ do_node_add(C, &ntemp);
+}
+
+static void do_node_add_group(bContext *C, void *UNUSED(arg), int event)
+{
+ SpaceNode *snode= CTX_wm_space_node(C);
+ bNodeTemplate ntemp;
+
+ if (event>=0) {
+ ntemp.ngroup= BLI_findlink(&G.main->nodetree, event);
+ ntemp.type = ntemp.ngroup->nodetype;
+ }
+ else {
+ ntemp.type = -event;
+ switch (ntemp.type) {
+ case NODE_GROUP:
+ ntemp.ngroup = ntreeAddTree("Group", snode->treetype, ntemp.type);
+ break;
+ case NODE_FORLOOP:
+ ntemp.ngroup = ntreeAddTree("For Loop", snode->treetype, ntemp.type);
+ break;
+ case NODE_WHILELOOP:
+ ntemp.ngroup = ntreeAddTree("While Loop", snode->treetype, ntemp.type);
+ break;
+ default:
+ ntemp.ngroup = NULL;
+ }
+ }
+ if (!ntemp.ngroup)
+ return;
+
+ do_node_add(C, &ntemp);
+}
+
+#if 0 /* disabled */
+static void do_node_add_dynamic(bContext *C, void *UNUSED(arg), int event)
+{
+ bNodeTemplate ntemp;
+ ntemp.type = NODE_DYNAMIC;
+ do_node_add(C, &ntemp);
+}
+#endif
+
+static int node_tree_has_type(int treetype, int nodetype)
+{
+ bNodeTreeType *ttype= ntreeGetType(treetype);
+ bNodeType *ntype;
+ for (ntype=ttype->node_types.first; ntype; ntype=ntype->next) {
+ if (ntype->type==nodetype)
+ return 1;
+ }
+ return 0;
+}
+
+static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
{
Main *bmain= CTX_data_main(C);
SpaceNode *snode= CTX_wm_space_node(C);
bNodeTree *ntree;
int nodeclass= GET_INT_FROM_POINTER(arg_nodeclass);
- int tot= 0, a;
+ int event;
ntree = snode->nodetree;
-
+
if(!ntree) {
uiItemS(layout);
return;
}
-
- /* mostly taken from toolbox.c, node_add_sublevel() */
- if(nodeclass==NODE_CLASS_GROUP) {
- bNodeTree *ngroup= bmain->nodetree.first;
- for(; ngroup; ngroup= ngroup->id.next)
- if(ngroup->type==ntree->type)
- tot++;
- }
- else {
- bNodeType *type = ntree->alltypes.first;
- while(type) {
- if(type->nclass == nodeclass)
- tot++;
- type= type->next;
- }
- }
- if(tot==0) {
+ if (nodeclass==NODE_CLASS_GROUP) {
+ bNodeTree *ngroup;
+
+ uiLayoutSetFunc(layout, do_node_add_group, NULL);
+
+ /* XXX hack: negative numbers used for empty group types */
+ if (node_tree_has_type(ntree->type, NODE_GROUP))
+ uiItemV(layout, "New Group", 0, -NODE_GROUP);
+ if (node_tree_has_type(ntree->type, NODE_FORLOOP))
+ uiItemV(layout, "New For Loop", 0, -NODE_FORLOOP);
+ if (node_tree_has_type(ntree->type, NODE_WHILELOOP))
+ uiItemV(layout, "New While Loop", 0, -NODE_WHILELOOP);
uiItemS(layout);
- return;
- }
-
- uiLayoutSetFunc(layout, do_node_add, NULL);
-
- if(nodeclass==NODE_CLASS_GROUP) {
- bNodeTree *ngroup= bmain->nodetree.first;
-
- for(tot=0, a=0; ngroup; ngroup= ngroup->id.next, tot++) {
- if(ngroup->type==ntree->type) {
- uiItemV(layout, ngroup->id.name+2, ICON_NONE, NODE_GROUP_MENU+tot);
- a++;
+
+ for(ngroup=bmain->nodetree.first, event=0; ngroup; ngroup= ngroup->id.next, ++event) {
+ /* only use group trees */
+ if (ngroup->type==ntree->type && ELEM3(ngroup->nodetype, NODE_GROUP, NODE_FORLOOP, NODE_WHILELOOP)) {
+ uiItemV(layout, ngroup->id.name+2, 0, event);
}
}
}
+ else if (nodeclass==NODE_DYNAMIC) {
+ /* disabled */
+ }
else {
- bNodeType *type;
- int script=0;
-
- for(a=0, type= ntree->alltypes.first; type; type=type->next) {
- if(type->nclass == nodeclass && type->name) {
- if(type->type == NODE_DYNAMIC) {
- uiItemV(layout, type->name, ICON_NONE, NODE_DYNAMIC_MENU+script);
- script++;
- }
- else
- uiItemV(layout, type->name, ICON_NONE, type->type);
-
- a++;
- }
+ bNodeType *ntype;
+
+ uiLayoutSetFunc(layout, do_node_add_static, NULL);
+
+ for (ntype=ntreeGetType(ntree->type)->node_types.first; ntype; ntype=ntype->next) {
+ if(ntype->nclass==nodeclass && ntype->name)
+ uiItemV(layout, ntype->name, 0, ntype->type);
}
}
}
+#define IFACE_(msgid) UI_translate_do_iface(msgid)
static void node_menu_add(const bContext *C, Menu *menu)
{
SpaceNode *snode= CTX_wm_space_node(C);
@@ -181,36 +228,40 @@ static void node_menu_add(const bContext *C, Menu *menu)
uiLayoutSetActive(layout, 0);
if(snode->treetype==NTREE_SHADER) {
- uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
- uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
- uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
- uiItemMenuF(layout, "Vector", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
- uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
- uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
- uiItemMenuF(layout, "Dynamic", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC));
+ uiItemMenuF(layout, IFACE_(N_("Input")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
+ uiItemMenuF(layout, IFACE_(N_("Output")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
+ uiItemMenuF(layout, IFACE_(N_("Color")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
+ uiItemMenuF(layout, IFACE_(N_("Vector")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
+ uiItemMenuF(layout, IFACE_(N_("Convertor")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
+ uiItemMenuF(layout, IFACE_(N_("Group")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
+ uiItemMenuF(layout, IFACE_(N_("Dynamic")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_DYNAMIC));
+ uiItemMenuF(layout, IFACE_(N_("Layout")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
}
else if(snode->treetype==NTREE_COMPOSIT) {
- uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
- uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
- uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
- uiItemMenuF(layout, "Vector", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
- uiItemMenuF(layout, "Filter", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER));
- uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
- uiItemMenuF(layout, "Matte", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE));
- uiItemMenuF(layout, "Distort", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
- uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
+ uiItemMenuF(layout, IFACE_(N_("Input")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
+ uiItemMenuF(layout, IFACE_(N_("Output")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
+ uiItemMenuF(layout, IFACE_(N_("Color")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
+ uiItemMenuF(layout, IFACE_(N_("Vector")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_VECTOR));
+ uiItemMenuF(layout, IFACE_(N_("Filter")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_FILTER));
+ uiItemMenuF(layout, IFACE_(N_("Convertor")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
+ uiItemMenuF(layout, IFACE_(N_("Matte")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_MATTE));
+ uiItemMenuF(layout, IFACE_(N_("Distort")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
+ uiItemMenuF(layout, IFACE_(N_("Group")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
+ uiItemMenuF(layout, IFACE_(N_("Layout")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
}
else if(snode->treetype==NTREE_TEXTURE) {
- uiItemMenuF(layout, "Input", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
- uiItemMenuF(layout, "Output", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
- uiItemMenuF(layout, "Color", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
- uiItemMenuF(layout, "Patterns", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN));
- uiItemMenuF(layout, "Textures", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
- uiItemMenuF(layout, "Convertor", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
- uiItemMenuF(layout, "Distort", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
- uiItemMenuF(layout, "Group", 0, node_auto_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
+ uiItemMenuF(layout, IFACE_(N_("Input")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_INPUT));
+ uiItemMenuF(layout, IFACE_(N_("Output")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OUTPUT));
+ uiItemMenuF(layout, IFACE_(N_("Color")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_OP_COLOR));
+ uiItemMenuF(layout, IFACE_(N_("Patterns")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_PATTERN));
+ uiItemMenuF(layout, IFACE_(N_("Textures")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_TEXTURE));
+ uiItemMenuF(layout, IFACE_(N_("Convertor")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_CONVERTOR));
+ uiItemMenuF(layout, IFACE_(N_("Distort")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_DISTORT));
+ uiItemMenuF(layout, IFACE_(N_("Group")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_GROUP));
+ uiItemMenuF(layout, IFACE_(N_("Layout")), 0, node_add_menu, SET_INT_IN_POINTER(NODE_CLASS_LAYOUT));
}
}
+#undef IFACE_
void node_menus_register(void)
{
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 4cfde22b8a0..3751d8efae8 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -33,6 +33,8 @@
#ifndef ED_NODE_INTERN_H
#define ED_NODE_INTERN_H
+#include "UI_interface.h"
+
/* internal exports only */
struct ARegion;
@@ -40,6 +42,7 @@ struct ARegionType;
struct View2D;
struct bContext;
struct wmWindowManager;
+struct bNodeTemplate;
struct bNode;
struct bNodeSocket;
struct bNodeLink;
@@ -64,6 +67,11 @@ void node_header_buttons(const bContext *C, ARegion *ar);
void node_menus_register(void);
/* node_draw.c */
+void node_socket_circle_draw(struct bNodeTree *ntree, struct bNodeSocket *sock, float size);
+void node_draw_default(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node);
+void node_update_default(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node);
+void node_update_nodetree(const struct bContext *C, struct bNodeTree *ntree, float offsetx, float offsety);
+void node_draw_nodetree(const struct bContext *C, struct ARegion *ar, struct SpaceNode *snode, struct bNodeTree *ntree);
void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d);
/* node_buttons.c */
@@ -90,6 +98,7 @@ void NODE_OT_select_same_type_prev(wmOperatorType *ot);
void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link);
void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 );
int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, float coord_array[][2], int resol);
+void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 );
void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage);
void draw_nodespace_color_info(struct ARegion *ar, int color_manage, int channels, int x, int y, char *cp, float *fp);
@@ -97,10 +106,10 @@ void draw_nodespace_color_info(struct ARegion *ar, int color_manage, int channel
void node_tree_from_ID(ID *id, bNodeTree **ntree, bNodeTree **edittree, int *treetype);
void snode_notify(bContext *C, SpaceNode *snode);
void snode_dag_update(bContext *C, SpaceNode *snode);
-bNode *next_node(bNodeTree *ntree);
-bNode *node_add_node(SpaceNode *snode, struct Main *bmain, Scene *scene, int type, float locx, float locy);
+bNode *node_add_node(struct SpaceNode *snode, struct Main *bmain, struct Scene *scene, struct bNodeTemplate *ntemp, float locx, float locy);
void snode_set_context(SpaceNode *snode, Scene *scene);
void snode_make_group_editable(SpaceNode *snode, bNode *gnode);
+void node_sort(struct bNodeTree *ntree);
void node_deselectall(SpaceNode *snode);
int node_select_same_type(SpaceNode *snode);
int node_select_same_type_np(SpaceNode *snode, int dir);
@@ -146,6 +155,8 @@ void NODE_OT_backimage_sample(wmOperatorType *ot);
void NODE_OT_add_file(struct wmOperatorType *ot);
+void NODE_OT_new_node_tree(struct wmOperatorType *ot);
+
extern const char *node_context_dir[];
// XXXXXX
diff --git a/source/blender/editors/space_node/node_ops.c b/source/blender/editors/space_node/node_ops.c
index 4bb0283690b..153d703ddf6 100644
--- a/source/blender/editors/space_node/node_ops.c
+++ b/source/blender/editors/space_node/node_ops.c
@@ -96,6 +96,8 @@ void node_operatortypes(void)
WM_operatortype_append(NODE_OT_backimage_sample);
WM_operatortype_append(NODE_OT_add_file);
+
+ WM_operatortype_append(NODE_OT_new_node_tree);
}
void ED_operatormacros_node(void)
@@ -193,6 +195,5 @@ void node_keymap(struct wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "NODE_OT_read_fullsamplelayers", RKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "NODE_OT_render_changed", ZKEY, KM_PRESS, 0, 0);
-
transform_keymap_for_space(keyconf, keymap, SPACE_NODE);
}
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c
index ca673277739..e2b0b9c65d0 100644
--- a/source/blender/editors/space_node/node_select.c
+++ b/source/blender/editors/space_node/node_select.c
@@ -62,7 +62,7 @@ static bNode *node_under_mouse(bNodeTree *ntree, int mx, int my)
{
bNode *node;
- for(next_node(ntree); (node=next_node(NULL));) {
+ for(node=ntree->nodes.last; node; node=node->prev) {
/* node body (header and scale are in other operators) */
if (BLI_in_rctf(&node->totr, mx, my))
return node;
@@ -93,8 +93,10 @@ static bNode *node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, cons
}
else
node->flag ^= SELECT;
-
+
ED_node_set_active(bmain, snode->edittree, node);
+
+ node_sort(snode->edittree);
}
return node;
@@ -107,7 +109,7 @@ static int node_select_exec(bContext *C, wmOperator *op)
ARegion *ar= CTX_wm_region(C);
int mval[2];
short extend;
- bNode *node= NULL;
+ /* bNode *node= NULL; */ /* UNUSED */
/* get settings from RNA properties for operator */
mval[0] = RNA_int_get(op->ptr, "mouse_x");
@@ -116,7 +118,7 @@ static int node_select_exec(bContext *C, wmOperator *op)
extend = RNA_boolean_get(op->ptr, "extend");
/* perform the select */
- node= node_mouse_select(bmain, snode, ar, mval, extend);
+ /* node= */ /* UNUSED*/ node_mouse_select(bmain, snode, ar, mval, extend);
/* send notifiers */
WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
@@ -139,7 +141,7 @@ void NODE_OT_select(wmOperatorType *ot)
/* identifiers */
ot->name= "Select";
ot->idname= "NODE_OT_select";
- ot->description= "Select node under cursor";
+ ot->description= "Select the node under the cursor";
/* api callbacks */
ot->invoke= node_select_invoke;
@@ -182,6 +184,8 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
}
}
+ node_sort(snode->edittree);
+
WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
return OPERATOR_FINISHED;
@@ -252,6 +256,8 @@ static int node_select_all_exec(bContext *C, wmOperator *UNUSED(op))
node->flag |= NODE_SELECT;
}
+ node_sort(snode->edittree);
+
WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -292,6 +298,8 @@ static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op))
node->flag |= NODE_SELECT;
}
+ node_sort(snode->edittree);
+
WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -332,6 +340,8 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op))
node->flag |= NODE_SELECT;
}
+ node_sort(snode->edittree);
+
WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -358,6 +368,9 @@ static int node_select_same_type_exec(bContext *C, wmOperator *UNUSED(op))
SpaceNode *snode = CTX_wm_space_node(C);
node_select_same_type(snode);
+
+ node_sort(snode->edittree);
+
WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -366,7 +379,7 @@ void NODE_OT_select_same_type(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Same Type";
- ot->description = "Select all the same type";
+ ot->description = "Select all the nodes of the same type";
ot->idname = "NODE_OT_select_same_type";
/* api callbacks */
@@ -384,7 +397,11 @@ static int node_select_same_type_next_exec(bContext *C, wmOperator *UNUSED(op))
SpaceNode *snode = CTX_wm_space_node(C);
node_select_same_type_np(snode, 0);
+
+ node_sort(snode->edittree);
+
WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+
return OPERATOR_FINISHED;
}
@@ -392,7 +409,7 @@ void NODE_OT_select_same_type_next(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Same Type Next";
- ot->description = "Select the next node of the same type.";
+ ot->description = "Select the next node of the same type";
ot->idname = "NODE_OT_select_same_type_next";
/* api callbacks */
@@ -408,6 +425,9 @@ static int node_select_same_type_prev_exec(bContext *C, wmOperator *UNUSED(op))
SpaceNode *snode = CTX_wm_space_node(C);
node_select_same_type_np(snode, 1);
+
+ node_sort(snode->edittree);
+
WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
@@ -416,7 +436,7 @@ void NODE_OT_select_same_type_prev(wmOperatorType *ot)
{
/* identifiers */
ot->name = "Select Same Type Prev";
- ot->description = "Select the prev node of the same type.";
+ ot->description = "Select the prev node of the same type";
ot->idname = "NODE_OT_select_same_type_prev";
/* api callbacks */
diff --git a/source/blender/editors/space_node/node_state.c b/source/blender/editors/space_node/node_state.c
index 601ffbd313d..13a5f3cb3dc 100644
--- a/source/blender/editors/space_node/node_state.c
+++ b/source/blender/editors/space_node/node_state.c
@@ -69,30 +69,14 @@ void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set)
sock->flag &= ~SOCK_HIDDEN;
}
else {
- bNode *gnode= node_tree_get_editgroup(snode->nodetree);
-
- /* hiding inside group should not break links in other group users */
- if(gnode) {
- nodeGroupSocketUseFlags((bNodeTree *)gnode->id);
- for(sock= node->inputs.first; sock; sock= sock->next)
- if(!(sock->flag & SOCK_IN_USE))
- if(sock->link==NULL)
- sock->flag |= SOCK_HIDDEN;
- for(sock= node->outputs.first; sock; sock= sock->next)
- if(!(sock->flag & SOCK_IN_USE))
- if(nodeCountSocketLinks(snode->edittree, sock)==0)
- sock->flag |= SOCK_HIDDEN;
+ /* hide unused sockets */
+ for(sock= node->inputs.first; sock; sock= sock->next) {
+ if(sock->link==NULL)
+ sock->flag |= SOCK_HIDDEN;
}
- else {
- /* hide unused sockets */
- for(sock= node->inputs.first; sock; sock= sock->next) {
- if(sock->link==NULL)
- sock->flag |= SOCK_HIDDEN;
- }
- for(sock= node->outputs.first; sock; sock= sock->next) {
- if(nodeCountSocketLinks(snode->edittree, sock)==0)
- sock->flag |= SOCK_HIDDEN;
- }
+ for(sock= node->outputs.first; sock; sock= sock->next) {
+ if(nodeCountSocketLinks(snode->edittree, sock)==0)
+ sock->flag |= SOCK_HIDDEN;
}
}
}
@@ -100,7 +84,7 @@ void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set)
static void node_hide_unhide_sockets(SpaceNode *snode, bNode *node)
{
node_set_hidden_sockets(snode, node, !node_has_hidden_sockets(node));
- node_tree_verify_groups(snode->nodetree);
+ ntreeUpdateTree(snode->edittree);
}
static int do_header_node(SpaceNode *snode, bNode *node, float mx, float my)
@@ -168,7 +152,7 @@ static int node_toggle_visibility(SpaceNode *snode, ARegion *ar, const int mval[
UI_view2d_region_to_view(&ar->v2d, mval[0], mval[1], &mx, &my);
- for(next_node(snode->edittree); (node=next_node(NULL));) {
+ for(node=snode->edittree->nodes.last; node; node=node->prev) {
if(node->flag & NODE_HIDDEN) {
if(do_header_hidden_node(node, mx, my)) {
ED_region_tag_redraw(ar);
@@ -230,12 +214,11 @@ void NODE_OT_visibility_toggle(wmOperatorType *ot)
static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNode* snode)
{
bNode *node;
- rctf *cur, *tot;
+ rctf *cur;
float oldwidth, oldheight, width, height;
int first= 1;
cur= &ar->v2d.cur;
- tot= &ar->v2d.tot;
oldwidth= cur->xmax - cur->xmin;
oldheight= cur->ymax - cur->ymin;
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index 3c5f4a163a2..0990afa4fe6 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -439,14 +439,30 @@ static int node_context(const bContext *C, const char *member, bContextDataResul
else if(CTX_data_equals(member, "selected_nodes")) {
bNode *node;
- for(next_node(snode->edittree); (node=next_node(NULL));) {
- if(node->flag & NODE_SELECT) {
- CTX_data_list_add(result, &snode->edittree->id, &RNA_Node, node);
+ if(snode->edittree) {
+ for(node=snode->edittree->nodes.last; node; node=node->prev) {
+ if(node->flag & NODE_SELECT) {
+ CTX_data_list_add(result, &snode->edittree->id, &RNA_Node, node);
+ }
}
}
CTX_data_type_set(result, CTX_DATA_TYPE_COLLECTION);
return 1;
}
+ else if(CTX_data_equals(member, "active_node")) {
+ bNode *node;
+
+ if(snode->edittree) {
+ for(node=snode->edittree->nodes.last; node; node=node->prev) {
+ if(node->flag & NODE_ACTIVE) {
+ CTX_data_pointer_set(result, &snode->edittree->id, &RNA_Node, node);
+ break;
+ }
+ }
+ }
+ CTX_data_type_set(result, CTX_DATA_TYPE_POINTER);
+ return 1;
+ }
return 0;
}
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index 7df15fb5703..8f4b8e7c59b 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -97,7 +97,7 @@ static void outliner_height(SpaceOops *soops, ListBase *lb, int *h)
TreeElement *te= lb->first;
while(te) {
TreeStoreElem *tselem= TREESTORE(te);
- if((tselem->flag & TSE_CLOSED)==0)
+ if(TSELEM_OPEN(tselem,soops))
outliner_height(soops, &te->subtree, h);
(*h) += UI_UNIT_Y;
te= te->next;
@@ -112,7 +112,7 @@ static void outliner_width(SpaceOops *soops, ListBase *lb, int *w)
// TreeStoreElem *tselem= TREESTORE(te);
// XXX fixme... te->xend is not set yet
- if(tselem->flag & TSE_CLOSED) {
+ if(!TSELEM_OPEN(tselem,soops)) {
if (te->xend > *w)
*w = te->xend;
}
@@ -135,7 +135,7 @@ static void outliner_rna_width(SpaceOops *soops, ListBase *lb, int *w, int start
if(startx+100 > *w)
*w = startx+100;
- if((tselem->flag & TSE_CLOSED)==0)
+ if(TSELEM_OPEN(tselem,soops))
outliner_rna_width(soops, &te->subtree, w, startx+UI_UNIT_X);
te= te->next;
}
@@ -519,7 +519,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
}
}
- if((tselem->flag & TSE_CLOSED)==0) outliner_draw_restrictbuts(block, scene, ar, soops, &te->subtree);
+ if(TSELEM_OPEN(tselem,soops)) outliner_draw_restrictbuts(block, scene, ar, soops, &te->subtree);
}
}
@@ -560,7 +560,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
ptr= &te->rnaptr;
prop= te->directdata;
- if(!(RNA_property_type(prop) == PROP_POINTER && (tselem->flag & TSE_CLOSED)==0))
+ 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) {
@@ -571,7 +571,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
}
}
- if((tselem->flag & TSE_CLOSED)==0) 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);
}
}
@@ -828,7 +828,7 @@ static void outliner_draw_keymapbuts(uiBlock *block, ARegion *ar, SpaceOops *soo
}
}
- if((tselem->flag & TSE_CLOSED)==0) outliner_draw_keymapbuts(block, ar, soops, &te->subtree);
+ if(TSELEM_OPEN(tselem,soops)) outliner_draw_keymapbuts(block, ar, soops, &te->subtree);
}
}
@@ -871,7 +871,7 @@ static void outliner_buttons(const bContext *C, uiBlock *block, ARegion *ar, Spa
}
}
- if((tselem->flag & TSE_CLOSED)==0) outliner_buttons(C, block, ar, soops, &te->subtree);
+ if(TSELEM_OPEN(tselem,soops)) outliner_buttons(C, block, ar, soops, &te->subtree);
}
}
@@ -1008,6 +1008,10 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
UI_icon_draw(x, y, ICON_MOD_SOLIDIFY); break;
case eModifierType_Screw:
UI_icon_draw(x, y, ICON_MOD_SCREW); break;
+ case eModifierType_WeightVGEdit:
+ case eModifierType_WeightVGMix:
+ case eModifierType_WeightVGProximity:
+ UI_icon_draw(x, y, ICON_MOD_VERTEX_WEIGHT); break;
case eModifierType_DynamicPaint:
UI_icon_draw(x, y, ICON_MOD_DYNAMICPAINT); break;
default:
@@ -1184,7 +1188,7 @@ static void outliner_draw_iconrow(bContext *C, uiBlock *block, Scene *scene, Spa
if(active) {
float ufac= UI_UNIT_X/20.0f;
- uiSetRoundBox(15);
+ 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);
glEnable(GL_BLEND); /* roundbox disables */
@@ -1239,6 +1243,18 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
glEnable(GL_BLEND);
+ /* start by highlighting search matches
+ * 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))
+ {
+ /* TODO - add search highlight colour to theme? */
+ glColor4f(0.2f, 0.5f, 0.2f, 0.3f);
+ 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) {
@@ -1303,7 +1319,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
/* active circle */
if(active) {
- uiSetRoundBox(15);
+ 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 */
@@ -1319,10 +1335,10 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
icon_x = startx+5*ufac;
// icons a bit higher
- if(tselem->flag & TSE_CLOSED)
- UI_icon_draw((float)icon_x, (float)*starty+2*ufac, ICON_DISCLOSURE_TRI_RIGHT);
- else
+ 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);
}
offsx+= UI_UNIT_X;
@@ -1358,7 +1374,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
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->flag & TSE_CLOSED) {
+ 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 dont draw */
@@ -1384,7 +1400,7 @@ static void outliner_draw_tree_element(bContext *C, uiBlock *block, Scene *scene
te->ys= (float)*starty;
te->xend= startx+offsx;
- if((tselem->flag & TSE_CLOSED)==0) {
+ if(TSELEM_OPEN(tselem,soops)) {
*starty-= UI_UNIT_Y;
for(ten= te->subtree.first; ten; ten= ten->next)
@@ -1417,7 +1433,7 @@ static void outliner_draw_hierarchy(SpaceOops *soops, ListBase *lb, int startx,
*starty-= UI_UNIT_Y;
- if((tselem->flag & TSE_CLOSED)==0)
+ if(TSELEM_OPEN(tselem,soops))
outliner_draw_hierarchy(soops, &te->subtree, startx+UI_UNIT_X, starty);
}
@@ -1441,12 +1457,12 @@ static void outliner_draw_struct_marks(ARegion *ar, SpaceOops *soops, ListBase *
tselem= TREESTORE(te);
/* selection status */
- if((tselem->flag & TSE_CLOSED)==0)
+ 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);
*starty-= UI_UNIT_Y;
- if((tselem->flag & TSE_CLOSED)==0) {
+ 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);
@@ -1467,7 +1483,7 @@ static void outliner_draw_selection(ARegion *ar, SpaceOops *soops, ListBase *lb,
glRecti(0, *starty+1, (int)ar->v2d.cur.xmax, *starty+UI_UNIT_Y-1);
}
*starty-= UI_UNIT_Y;
- if((tselem->flag & TSE_CLOSED)==0) outliner_draw_selection(ar, soops, &te->subtree, starty);
+ if(TSELEM_OPEN(tselem,soops)) outliner_draw_selection(ar, soops, &te->subtree, starty);
}
}
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 2b451a48748..6bfe370d105 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -213,12 +213,12 @@ void OUTLINER_OT_item_openclose(wmOperatorType *ot)
ot->poll= ED_operator_outliner_active;
- RNA_def_boolean(ot->srna, "all", 1, "All", "Close or open all items.");
+ RNA_def_boolean(ot->srna, "all", 1, "All", "Close or open all items");
}
/* Rename --------------------------------------------------- */
-void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem, ReportList *reports)
+static void do_item_rename(ARegion *ar, TreeElement *te, TreeStoreElem *tselem, ReportList *reports)
{
/* can't rename rna datablocks entries */
if(ELEM3(tselem->type, TSE_RNA_STRUCT, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM))
@@ -669,7 +669,7 @@ void OUTLINER_OT_scroll_page(wmOperatorType *ot)
ot->poll= ED_operator_outliner_active;
/* properties */
- RNA_def_boolean(ot->srna, "up", 0, "Up", "Scroll up one page.");
+ RNA_def_boolean(ot->srna, "up", 0, "Up", "Scroll up one page");
}
/* Search ------------------------------------------------------- */
@@ -687,7 +687,7 @@ static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te,
te->ys= (float)(*starty);
*starty-= UI_UNIT_Y;
- if((tselem->flag & TSE_CLOSED)==0) {
+ 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);
@@ -765,7 +765,7 @@ static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *so
}
else {
/* pop up panel - no previous, or user didn't want search after previous */
- strcpy(name, "");
+ 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);
// }
@@ -869,7 +869,7 @@ void OUTLINER_OT_show_one_level(wmOperatorType *ot)
/* no undo or registry, UI option */
/* properties */
- RNA_def_boolean(ot->srna, "open", 1, "Open", "Expand all entries one level deep.");
+ RNA_def_boolean(ot->srna, "open", 1, "Open", "Expand all entries one level deep");
}
/* Show Hierarchy ----------------------------------------------- */
@@ -910,7 +910,7 @@ static void tree_element_show_hierarchy(Scene *scene, SpaceOops *soops, ListBase
}
else tselem->flag |= TSE_CLOSED;
- if(tselem->flag & TSE_CLOSED); else tree_element_show_hierarchy(scene, soops, &te->subtree);
+ if(TSELEM_OPEN(tselem,soops)) tree_element_show_hierarchy(scene, soops, &te->subtree);
}
}
@@ -969,7 +969,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
ListBase hierarchy = {NULL, NULL};
LinkData *ld;
TreeElement *tem, *temnext, *temsub;
- TreeStoreElem *tse, *tsenext;
+ TreeStoreElem *tse /* , *tsenext */ /* UNUSED */;
PointerRNA *ptr, *nextptr;
PropertyRNA *prop;
char *newpath=NULL;
@@ -1018,7 +1018,7 @@ static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreEle
char buf[128], *name;
temnext= (TreeElement*)(ld->next->data);
- tsenext= TREESTORE(temnext);
+ /* tsenext= TREESTORE(temnext); */ /* UNUSED */
nextptr= &temnext->rnaptr;
name= RNA_struct_name_get_alloc(nextptr, buf, sizeof(buf));
@@ -1175,7 +1175,7 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, ReportL
}
/* go over sub-tree */
- if ((tselem->flag & TSE_CLOSED)==0)
+ if (TSELEM_OPEN(tselem,soops))
do_outliner_drivers_editop(soops, &te->subtree, reports, mode);
}
}
@@ -1343,7 +1343,7 @@ static void do_outliner_keyingset_editop(SpaceOops *soops, KeyingSet *ks, ListBa
}
/* go over sub-tree */
- if ((tselem->flag & TSE_CLOSED)==0)
+ if (TSELEM_OPEN(tselem,soops))
do_outliner_keyingset_editop(soops, ks, &te->subtree, mode);
}
}
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index 61507d1ffe5..215ab508ab6 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -126,6 +126,27 @@ typedef struct TreeElement {
#define OL_RNA_COL_SPACEX (UI_UNIT_X*2.5f)
+/* Outliner Searching --
+
+ Are we looking for something in the outliner?
+ If so finding matches in child items makes it more useful
+
+ - We want to flag parents to act as being open to filter child matches
+ - and also flag matches so we can highlight them
+ - Flags are stored in TreeStoreElem->flag
+ - Flag options defined in DNA_outliner_types.h
+ - SO_SEARCH_RECURSIVE defined in DNA_space_types.h
+
+ - NOT in datablocks view - searching all datablocks takes way too long
+ to be useful
+ - not searching into RNA items helps but isn't the complete solution
+ */
+
+#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)) )
+
/* outliner_tree.c ----------------------------------------------- */
void outliner_free_tree(ListBase *lb);
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c
index 2c0a8c34747..42fe14cd59c 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -134,7 +134,7 @@ static int outliner_select(SpaceOops *soops, ListBase *lb, int *index, short *se
change |= 1;
}
}
- else if ((tselem->flag & TSE_CLOSED)==0) {
+ else if (TSELEM_OPEN(tselem,soops)) {
/* Only try selecting sub-elements if we haven't hit the right element yet
*
* Hack warning:
@@ -867,7 +867,7 @@ void OUTLINER_OT_item_activate(wmOperatorType *ot)
ot->poll= ED_operator_outliner_active;
- RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection for activation.");
+ RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection for activation");
}
/* ****************************************************** */
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index b3170f9cd1e..78907fbd1ed 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -145,7 +145,7 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb,
}
}
}
- if((tselem->flag & TSE_CLOSED)==0) {
+ if(TSELEM_OPEN(tselem,soops)) {
set_operation_types(soops, &te->subtree,
scenelevel, objectlevel, idlevel, datalevel);
}
@@ -250,7 +250,7 @@ static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops *
operation_cb(C, scene, te, tsep, tselem);
}
}
- if((tselem->flag & TSE_CLOSED)==0) {
+ if(TSELEM_OPEN(tselem,soops)) {
outliner_do_libdata_operation(C, scene, soops, &te->subtree, operation_cb);
}
}
@@ -342,7 +342,7 @@ static void singleuser_action_cb(bContext *C, Scene *UNUSED(scene), TreeElement
if (id) {
IdAdtTemplate *iat = (IdAdtTemplate *)tsep->id;
- PointerRNA ptr = {{0}};
+ PointerRNA ptr = {{NULL}};
PropertyRNA *prop;
RNA_pointer_create(&iat->id, &RNA_AnimData, iat->adt, &ptr);
@@ -397,7 +397,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->flag & TSE_CLOSED)==0) {
+ if(TSELEM_OPEN(tselem,soops)) {
outliner_do_object_operation(C, scene_act, soops, &te->subtree, operation_cb);
}
}
@@ -504,7 +504,7 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li
operation_cb(event, te, tselem);
}
}
- if((tselem->flag & TSE_CLOSED)==0) {
+ if(TSELEM_OPEN(tselem,soops)) {
outliner_do_data_operation(soops, type, event, &te->subtree, operation_cb);
}
}
@@ -857,7 +857,7 @@ static void outliner_do_id_set_operation(SpaceOops *soops, int type, ListBase *l
operation_cb(te, tselem, tsep, newid);
}
}
- if ((tselem->flag & TSE_CLOSED)==0) {
+ if (TSELEM_OPEN(tselem,soops)) {
outliner_do_id_set_operation(soops, type, &te->subtree, newid, operation_cb);
}
}
@@ -899,7 +899,7 @@ static int outliner_action_set_exec(bContext *C, wmOperator *op)
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.");
+ BKE_report(op->reports, RPT_ERROR, "No valid Action to add");
return OPERATOR_CANCELLED;
}
else if (act->idroot == 0) {
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index 8904dcc360f..9fe0ed0543f 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -473,7 +473,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_POSE_CHANNEL, a);
ten->name= pchan->name;
ten->directdata= pchan;
- pchan->prev= (bPoseChannel *)ten;
+ pchan->temp= (void *)ten;
if(pchan->constraints.first) {
//Object *target;
@@ -506,19 +506,13 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
pchan= (bPoseChannel *)ten->directdata;
if(pchan->parent) {
BLI_remlink(&tenla->subtree, ten);
- par= (TreeElement *)pchan->parent->prev;
+ par= (TreeElement *)pchan->parent->temp;
BLI_addtail(&par->subtree, ten);
ten->parent= par;
}
}
ten= nten;
}
- /* restore prev pointers */
- pchan= ob->pose->chanbase.first;
- if(pchan) pchan->prev= NULL;
- for(; pchan; pchan= pchan->next) {
- if(pchan->next) pchan->next->prev= pchan;
- }
}
/* Pose Groups */
@@ -775,7 +769,7 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
ebone->temp= ten;
}
/* make hierarchy */
- ten= te->subtree.first;
+ ten= arm->edbo->first ? ((EditBone *)arm->edbo->first)->temp : NULL;
while(ten) {
TreeElement *nten= ten->next, *par;
ebone= (EditBone *)ten->directdata;
@@ -827,6 +821,10 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
check_persistant(soops, te, id, type, index);
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));
@@ -981,6 +979,9 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
else
te->name= (char*)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;
+
iterprop= RNA_struct_iterator_property(ptr->type);
tot= RNA_property_collection_length(ptr, iterprop);
@@ -989,7 +990,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
if(!tselem->used)
tselem->flag &= ~TSE_CLOSED;
- if(!(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);
}
@@ -1010,11 +1011,14 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
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(proptype == PROP_POINTER) {
pptr= RNA_property_pointer_get(ptr, prop);
if(pptr.data) {
- if(!(tselem->flag & TSE_CLOSED))
+ if(TSELEM_OPEN(tselem,soops))
outliner_add_element(soops, &te->subtree, (void*)&pptr, te, TSE_RNA_STRUCT, -1);
else
te->flag |= TE_LAZY_CLOSED;
@@ -1023,7 +1027,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
else if(proptype == PROP_COLLECTION) {
tot= RNA_property_collection_length(ptr, prop);
- if(!(tselem->flag & TSE_CLOSED)) {
+ 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);
@@ -1035,7 +1039,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
else if(ELEM3(proptype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
tot= RNA_property_array_length(ptr, prop);
- if(!(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_ARRAY_ELEM, a);
}
@@ -1068,7 +1072,7 @@ static TreeElement *outliner_add_element(SpaceOops *soops, ListBase *lb, void *i
te->directdata= idv;
te->name= km->idname;
- if(!(tselem->flag & TSE_CLOSED)) {
+ if(TSELEM_OPEN(tselem,soops)) {
a= 0;
for (kmi= km->items.first; kmi; kmi= kmi->next, a++) {
@@ -1147,7 +1151,7 @@ static int need_add_seq_dup(Sequence *seq)
static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *te, short index)
{
- TreeElement *ch;
+ /* TreeElement *ch; */ /* UNUSED */
Sequence *p;
p= seq;
@@ -1158,7 +1162,7 @@ static void outliner_add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *t
}
if(!strcmp(p->strip->stripdata->name, seq->strip->stripdata->name))
- ch= outliner_add_element(soops, &te->subtree, (void*)p, te, TSE_SEQUENCE, index);
+ /* ch= */ /* UNUSED */ outliner_add_element(soops, &te->subtree, (void*)p, te, TSE_SEQUENCE, index);
p= p->next;
}
}
@@ -1368,7 +1372,10 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb)
*/
tselem= TREESTORE(te);
- if ((tselem->flag & TSE_CLOSED) || outliner_filter_tree(soops, &te->subtree)==0) {
+ /* flag as not a found item */
+ tselem->flag &= ~TSE_SEARCHMATCH;
+
+ if ((!TSELEM_OPEN(tselem,soops)) || outliner_filter_tree(soops, &te->subtree)==0) {
outliner_free_tree(&te->subtree);
BLI_remlink(lb, te);
@@ -1377,6 +1384,11 @@ static int outliner_filter_tree(SpaceOops *soops, ListBase *lb)
}
}
else {
+ tselem= TREESTORE(te);
+
+ /* flag as a found item - we can then highlight it */
+ tselem->flag |= TSE_SEARCHMATCH;
+
/* filter subtree too */
outliner_filter_tree(soops, &te->subtree);
}
@@ -1399,6 +1411,14 @@ void outliner_build_tree(Main *mainvar, Scene *scene, SpaceOops *soops)
TreeStoreElem *tselem;
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)
+ soops->search_flags |= SO_SEARCH_RECURSIVE;
+ else
+ soops->search_flags &= ~SO_SEARCH_RECURSIVE;
+
if(soops->tree.first && (soops->storeflag & SO_TREESTORE_REDRAW))
return;
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c
index 2fe16b3a85d..b390b7dbdb5 100644
--- a/source/blender/editors/space_sequencer/sequencer_add.c
+++ b/source/blender/editors/space_sequencer/sequencer_add.c
@@ -464,7 +464,7 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH|WM_FILESEL_FILES);
sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
- RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory.");
+ RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
}
/* add image operator */
@@ -647,7 +647,7 @@ static int sequencer_add_effect_strip_exec(bContext *C, wmOperator *op)
if(seq->plugin==NULL) {
BLI_remlink(ed->seqbasep, seq);
seq_free_sequence(scene, seq);
- BKE_reportf(op->reports, RPT_ERROR, "Sequencer plugin \"%s\" could not load.", path);
+ BKE_reportf(op->reports, RPT_ERROR, "Sequencer plugin \"%s\" could not load", path);
return OPERATOR_CANCELLED;
}
} else if (seq->type == SEQ_COLOR) {
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 299fe9df460..0f5398f24a7 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -99,7 +99,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[
UI_GetThemeColor3ubv(TH_SEQ_SCENE, col);
if(seq->scene==curscene) {
- UI_GetColorPtrBlendShade3ubv(col, col, col, 1.0, 20);
+ UI_GetColorPtrShade3ubv(col, col, 20);
}
break;
@@ -299,7 +299,7 @@ static void drawmeta_contents(Scene *scene, Sequence *seqm, float x1, float y1,
glRectf(x1_chan, y1_chan, x2_chan, y2_chan);
- UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -30);
+ UI_GetColorPtrShade3ubv(col, col, -30);
glColor4ubv(col);
fdrawbox(x1_chan, y1_chan, x2_chan, y2_chan);
@@ -473,7 +473,7 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
/* feint pinstripes, helps see exactly which is extended and which isn't,
* especially when the extension is very small */
if (seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
- else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16);
+ else UI_GetColorPtrShade3ubv(col, col, -16);
glColor3ubv((GLubyte *)col);
@@ -490,8 +490,8 @@ static void draw_seq_extensions(Scene *scene, ARegion *ar, Sequence *seq)
/* feint pinstripes, helps see exactly which is extended and which isn't,
* especially when the extension is very small */
- if (seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 24);
- else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -16);
+ if (seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, 24);
+ else UI_GetColorPtrShade3ubv(col, col, -16);
glColor3ubv((GLubyte *)col);
@@ -584,8 +584,8 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa
glBegin(GL_QUADS);
if(seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; }
- else if(seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -50);
- else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 0);
+ else if(seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -50);
+ /* else UI_GetColorPtrShade3ubv(col, col, 0); */ /* DO NOTHING */
glColor3ubv(col);
@@ -594,7 +594,7 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa
if(seq->flag & SEQ_INVALID_EFFECT) { col[0]= 255; col[1]= 0; col[2]= 255; }
else if(seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 5);
- else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -5);
+ else UI_GetColorPtrShade3ubv(col, col, -5);
glColor3ubv((GLubyte *)col);
@@ -610,8 +610,8 @@ static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, floa
glVertex2f(x1,ymid2);
glVertex2f(x2,ymid2);
- if(seq->flag & SELECT) UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, -15);
- else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 25);
+ if(seq->flag & SELECT) UI_GetColorPtrShade3ubv(col, col, -15);
+ else UI_GetColorPtrShade3ubv(col, col, 25);
glColor3ubv((GLubyte *)col);
@@ -697,10 +697,10 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline
col[0]= 255; col[1]= col[2]= 40;
}
else
- UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 120+outline_tint);
+ UI_GetColorPtrShade3ubv(col, col, 120+outline_tint);
}
else
- UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, outline_tint);
+ UI_GetColorPtrShade3ubv(col, col, outline_tint);
glColor3ubv((GLubyte *)col);
@@ -914,7 +914,7 @@ void draw_image_seq(const bContext* C, Scene *scene, ARegion *ar, SpaceSeq *sseq
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_LINE_LOOP, x1, y1, x2, y2, 12.0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index df347506e74..bd93a1270f6 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -188,7 +188,7 @@ static void proxy_endjob(void *UNUSED(customdata))
}
-void seq_proxy_build_job(const bContext *C, Sequence * seq)
+static void seq_proxy_build_job(const bContext *C, Sequence * seq)
{
wmJob * steve;
ProxyJob *pj;
@@ -1161,7 +1161,7 @@ void SEQUENCER_OT_mute(struct wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Mute unselected rather than selected strips.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Mute unselected rather than selected strips");
}
@@ -1208,7 +1208,7 @@ void SEQUENCER_OT_unmute(struct wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "UnMute unselected rather than selected strips.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "UnMute unselected rather than selected strips");
}
@@ -1386,7 +1386,7 @@ void SEQUENCER_OT_reassign_inputs(struct wmOperatorType *ot)
/* identifiers */
ot->name= "Reassign Inputs";
ot->idname= "SEQUENCER_OT_reassign_inputs";
- ot->description="Reassign the inputs for the effects strip";
+ ot->description="Reassign the inputs for the effect strip";
/* api callbacks */
ot->exec= sequencer_reassign_inputs_exec;
@@ -1422,7 +1422,7 @@ void SEQUENCER_OT_swap_inputs(struct wmOperatorType *ot)
/* identifiers */
ot->name= "Swap Inputs";
ot->idname= "SEQUENCER_OT_swap_inputs";
- ot->description="Swap the first two inputs for the effects strip";
+ ot->description="Swap the first two inputs for the effect strip";
/* api callbacks */
ot->exec= sequencer_swap_inputs_exec;
@@ -1483,9 +1483,13 @@ static int sequencer_cut_exec(bContext *C, wmOperator *op)
sort_seq(scene);
}
- WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
-
- return OPERATOR_FINISHED;
+ if(changed) {
+ WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
+ return OPERATOR_FINISHED;
+ }
+ else {
+ return OPERATOR_CANCELLED;
+ }
}
@@ -1801,7 +1805,7 @@ void SEQUENCER_OT_images_separate(wmOperatorType *ot)
/* identifiers */
ot->name= "Separate Images";
ot->idname= "SEQUENCER_OT_images_separate";
- ot->description="On image sequences strips, it return a strip for each image";
+ ot->description="On image sequence strips, it returns a strip for each image";
/* api callbacks */
ot->exec= sequencer_separate_images_exec;
@@ -2154,7 +2158,7 @@ void SEQUENCER_OT_view_zoom_ratio(wmOperatorType *ot)
/* properties */
RNA_def_float(ot->srna, "ratio", 1.0f, 0.0f, FLT_MAX,
- "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out.", -FLT_MAX, FLT_MAX);
+ "Ratio", "Zoom ratio, 1.0 is 1:1, higher is zoomed in, lower is zoomed out", -FLT_MAX, FLT_MAX);
}
@@ -2174,7 +2178,7 @@ static int sequencer_view_toggle_exec(bContext *C, wmOperator *UNUSED(op))
sseq->view++;
if (sseq->view > SEQ_VIEW_SEQUENCE_PREVIEW) sseq->view = SEQ_VIEW_SEQUENCE;
- ED_sequencer_update_view(C, sseq->view);
+ ED_area_tag_refresh(CTX_wm_area(C));
return OPERATOR_FINISHED;
}
@@ -2483,7 +2487,7 @@ void SEQUENCER_OT_swap(wmOperatorType *ot)
/* identifiers */
ot->name= "Swap Strip";
ot->idname= "SEQUENCER_OT_swap";
- ot->description="Swap active strip with strip to the left";
+ ot->description="Swap active strip with strip to the right or left";
/* api callbacks */
ot->exec= sequencer_swap_exec;
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 86b28f5e89e..a6cc65017bb 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -519,11 +519,11 @@ void SEQUENCER_OT_select(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection.");
- RNA_def_boolean(ot->srna, "linked_handle", 0, "Linked Handle", "Select handles next to the active strip.");
+ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend the selection");
+ RNA_def_boolean(ot->srna, "linked_handle", 0, "Linked Handle", "Select handles next to the active strip");
/* for animation this is an enum but atm having an enum isnt useful for us */
- RNA_def_boolean(ot->srna, "left_right", 0, "Left/Right", "select based on the frame side the cursor is on.");
- RNA_def_boolean(ot->srna, "linked_time", 0, "Linked Time", "Select other strips at the same time.");
+ RNA_def_boolean(ot->srna, "left_right", 0, "Left/Right", "Select based on the current frame side the cursor is on");
+ RNA_def_boolean(ot->srna, "linked_time", 0, "Linked Time", "Select other strips at the same time");
}
@@ -627,7 +627,7 @@ static int sequencer_select_less_exec(bContext *C, wmOperator *UNUSED(op))
void SEQUENCER_OT_select_less(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Select less";
+ ot->name= "Select Less";
ot->idname= "SEQUENCER_OT_select_less";
ot->description="Shrink the current selection of adjacent selected strips";
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 36471c7ffcf..5c2013ee863 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -98,61 +98,6 @@ static ARegion *sequencer_find_region(ScrArea *sa, short type)
return ar;
}
-void ED_sequencer_update_view(bContext *C, int view)
-{
- ScrArea *sa= CTX_wm_area(C);
-
- ARegion *ar_main= sequencer_find_region(sa, RGN_TYPE_WINDOW);
- ARegion *ar_preview= sequencer_find_region(sa, RGN_TYPE_PREVIEW);
-
- switch (view) {
- case SEQ_VIEW_SEQUENCE:
- if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) {
- ar_main->flag &= ~RGN_FLAG_HIDDEN;
- ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
- }
- 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(C, &ar_preview->handlers);
- }
- if (ar_main) ar_main->alignment= RGN_ALIGN_NONE;
- if (ar_preview) ar_preview->alignment= RGN_ALIGN_NONE;
- break;
- case SEQ_VIEW_PREVIEW:
- 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(C, &ar_main->handlers);
- }
- 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;
- }
- if (ar_main) ar_main->alignment= RGN_ALIGN_NONE;
- if (ar_preview) ar_preview->alignment= RGN_ALIGN_NONE;
- break;
- case SEQ_VIEW_SEQUENCE_PREVIEW:
- if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) {
- ar_main->flag &= ~RGN_FLAG_HIDDEN;
- ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
- }
- 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;
- }
- if (ar_main) ar_main->alignment= RGN_ALIGN_NONE;
- if (ar_preview) ar_preview->alignment= RGN_ALIGN_TOP;
- break;
- }
-
- ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), sa);
- ED_area_tag_redraw(sa);
-}
-
-
/* ******************** default callbacks for sequencer space ***************** */
static SpaceLink *sequencer_new(const bContext *C)
@@ -256,6 +201,88 @@ static void sequencer_init(struct wmWindowManager *UNUSED(wm), ScrArea *UNUSED(s
}
+static void sequencer_refresh(const bContext *C, ScrArea *sa)
+{
+ wmWindowManager *wm= CTX_wm_manager(C);
+ wmWindow *window= CTX_wm_window(C);
+ SpaceSeq *sseq= (SpaceSeq *)sa->spacedata.first;
+ ARegion *ar_main= sequencer_find_region(sa, RGN_TYPE_WINDOW);
+ ARegion *ar_preview= sequencer_find_region(sa, RGN_TYPE_PREVIEW);
+ int view_changed= 0;
+
+ switch (sseq->view) {
+ case SEQ_VIEW_SEQUENCE:
+ if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) {
+ ar_main->flag &= ~RGN_FLAG_HIDDEN;
+ ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
+ view_changed= 1;
+ }
+ 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= 1;
+ }
+ if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
+ ar_main->alignment= RGN_ALIGN_NONE;
+ view_changed= 1;
+ }
+ if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
+ ar_preview->alignment= RGN_ALIGN_NONE;
+ view_changed= 1;
+ }
+ break;
+ case SEQ_VIEW_PREVIEW:
+ 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= 1;
+ }
+ 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= 1;
+ }
+ if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
+ ar_main->alignment= RGN_ALIGN_NONE;
+ view_changed= 1;
+ }
+ if (ar_preview && ar_preview->alignment != RGN_ALIGN_NONE) {
+ ar_preview->alignment= RGN_ALIGN_NONE;
+ view_changed= 1;
+ }
+ break;
+ case SEQ_VIEW_SEQUENCE_PREVIEW:
+ if (ar_main && (ar_main->flag & RGN_FLAG_HIDDEN)) {
+ ar_main->flag &= ~RGN_FLAG_HIDDEN;
+ ar_main->v2d.flag &= ~V2D_IS_INITIALISED;
+ view_changed= 1;
+ }
+ 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= 1;
+ }
+ if (ar_main && ar_main->alignment != RGN_ALIGN_NONE) {
+ ar_main->alignment= RGN_ALIGN_NONE;
+ view_changed= 1;
+ }
+ if (ar_preview && ar_preview->alignment != RGN_ALIGN_TOP) {
+ ar_preview->alignment= RGN_ALIGN_TOP;
+ view_changed= 1;
+ }
+ break;
+ }
+
+ if(view_changed) {
+ ED_area_initialize(wm, window, sa);
+ ED_area_tag_redraw(sa);
+ }
+}
+
static SpaceLink *sequencer_duplicate(SpaceLink *sl)
{
SpaceSeq *sseqn= MEM_dupallocN(sl);
@@ -516,6 +543,7 @@ void ED_spacetype_sequencer(void)
st->operatortypes= sequencer_operatortypes;
st->keymap= sequencer_keymap;
st->dropboxes= sequencer_dropboxes;
+ st->refresh= sequencer_refresh;
/* regions: main window */
art= MEM_callocN(sizeof(ARegionType), "spacetype sequencer region");
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 066404f23ba..685b15aed50 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1190,7 +1190,7 @@ static void draw_textscroll(SpaceText *st, rcti *scroll, rcti *back)
uiWidgetScrollDraw(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT)?UI_SCROLL_PRESSED:0);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
rad= 0.4f*MIN2(st->txtscroll.xmax - st->txtscroll.xmin, st->txtscroll.ymax - st->txtscroll.ymin);
UI_GetThemeColor3ubv(TH_HILITE, col);
col[3]= 48;
@@ -1291,7 +1291,7 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
TextLine *tmp;
char *docs, buf[DOC_WIDTH+1], *p;
int i, br, lines;
- int boxw, boxh, l, x, y, top;
+ int boxw, boxh, l, x, y /* , top */ /* UNUSED */;
if(!st || !st->text) return;
if(!texttool_text_is_active(st->text)) return;
@@ -1314,7 +1314,7 @@ static void draw_documentation(SpaceText *st, ARegion *ar)
x += SUGG_LIST_WIDTH*st->cwidth + 50;
}
- top= y= ar->winy - st->lheight*l - 2;
+ /* top= */ /* UNUSED */ y= ar->winy - st->lheight*l - 2;
boxw= DOC_WIDTH*st->cwidth + 20;
boxh= (DOC_HEIGHT+1)*st->lheight;
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 617bbf62e92..8d40550961f 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -458,7 +458,7 @@ static void txt_write_file(Text *text, ReportList *reports)
fp= fopen(filepath, "w");
if(fp==NULL) {
- BKE_reportf(reports, RPT_ERROR, "Unable to save \"%s\": %s.", filepath, errno ? strerror(errno) : "Unknown error writing file");
+ BKE_reportf(reports, RPT_ERROR, "Unable to save \"%s\": %s", filepath, errno ? strerror(errno) : "Unknown error writing file");
return;
}
@@ -477,7 +477,7 @@ static void txt_write_file(Text *text, ReportList *reports)
}
else {
text->mtime= 0;
- BKE_reportf(reports, RPT_WARNING, "Unable to stat \"%s\": %s.", filepath, errno ? strerror(errno) : "Unknown error starrng file");
+ BKE_reportf(reports, RPT_WARNING, "Unable to stat \"%s\": %s", filepath, errno ? strerror(errno) : "Unknown error starrng file");
}
if(text->flags & TXT_ISDIRTY)
@@ -819,7 +819,7 @@ void TEXT_OT_paste(wmOperatorType *ot)
ot->poll= text_edit_poll;
/* properties */
- RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Paste text selected elsewhere rather than copied, X11 only.");
+ RNA_def_boolean(ot->srna, "selection", 0, "Selection", "Paste text selected elsewhere rather than copied (X11 only)");
}
/******************* copy operator *********************/
@@ -1214,7 +1214,7 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot)
ot->poll= text_edit_poll;
/* properties */
- RNA_def_enum(ot->srna, "type", whitespace_type_items, TO_SPACES, "type", "Type of whitespace to convert to.");
+ RNA_def_enum(ot->srna, "type", whitespace_type_items, TO_SPACES, "Type", "Type of whitespace to convert to");
}
/******************* select all operator *********************/
@@ -1907,7 +1907,7 @@ void TEXT_OT_move(wmOperatorType *ot)
ot->poll= text_edit_poll;
/* properties */
- RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to.");
+ RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to");
}
/******************* move select operator ********************/
@@ -1931,7 +1931,7 @@ void TEXT_OT_move_select(wmOperatorType *ot)
ot->poll= text_space_edit_poll;
/* properties */
- RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection.");
+ RNA_def_enum(ot->srna, "type", move_type_items, LINE_BEGIN, "Type", "Where to move cursor to, to make a selection");
}
/******************* jump operator *********************/
@@ -1974,7 +1974,7 @@ void TEXT_OT_jump(wmOperatorType *ot)
ot->poll= text_edit_poll;
/* properties */
- RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to.", 1, 10000);
+ RNA_def_int(ot->srna, "line", 1, 1, INT_MAX, "Line", "Line number to jump to", 1, 10000);
}
/******************* delete operator **********************/
@@ -2026,7 +2026,7 @@ void TEXT_OT_delete(wmOperatorType *ot)
ot->poll= text_edit_poll;
/* properties */
- RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete.");
+ RNA_def_enum(ot->srna, "type", delete_type_items, DEL_NEXT_CHAR, "Type", "Which part of the text to delete");
}
/******************* toggle overwrite operator **********************/
@@ -2263,7 +2263,7 @@ void TEXT_OT_scroll(wmOperatorType *ot)
ot->flag= OPTYPE_BLOCKING|OPTYPE_GRAB_POINTER;
/* properties */
- RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll.", -100, 100);
+ RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100);
}
/******************** scroll bar operator *******************/
@@ -2345,7 +2345,7 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
ot->flag= OPTYPE_BLOCKING;
/* properties */
- RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll.", -100, 100);
+ RNA_def_int(ot->srna, "lines", 1, INT_MIN, INT_MAX, "Lines", "Number of lines to scroll", -100, 100);
}
/******************* set selection operator **********************/
@@ -2636,7 +2636,7 @@ void TEXT_OT_selection_set(wmOperatorType *ot)
ot->poll= text_region_edit_poll;
/* properties */
- RNA_def_boolean(ot->srna, "select", 0, "Select", "Set selection end rather than cursor.");
+ RNA_def_boolean(ot->srna, "select", 0, "Select", "Set selection end rather than cursor");
}
/******************* set cursor operator **********************/
@@ -2820,7 +2820,7 @@ void TEXT_OT_insert(wmOperatorType *ot)
ot->poll= text_edit_poll;
/* properties */
- RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position.");
+ RNA_def_string(ot->srna, "text", "", 0, "Text", "Text to insert at the cursor position");
}
/******************* find operator *********************/
@@ -3169,7 +3169,7 @@ void TEXT_OT_resolve_conflict(wmOperatorType *ot)
ot->poll= save_poll;
/* properties */
- RNA_def_enum(ot->srna, "resolution", resolution_items, RESOLVE_IGNORE, "Resolution", "How to solve conflict due to different in internal and external text.");
+ RNA_def_enum(ot->srna, "resolution", resolution_items, RESOLVE_IGNORE, "Resolution", "How to solve conflict due to differences in internal and external text");
}
/********************** to 3d object operator *****************/
@@ -3199,7 +3199,7 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "split_lines", 0, "Split Lines", "Create one object per line in the text.");
+ RNA_def_boolean(ot->srna, "split_lines", 0, "Split Lines", "Create one object per line in the text");
}
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index ecf5df4af7c..fc35ab93f70 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -85,7 +85,7 @@ enum {
PCHAN_COLOR_SPHEREBONE_BASE, /* for the 'stick' of sphere (envelope) bones */
PCHAN_COLOR_SPHEREBONE_END, /* for the ends of sphere (envelope) bones */
PCHAN_COLOR_LINEBONE /* for the middle of line-bones */
-};
+};
/* This function sets the color-set for coloring a certain bone */
static void set_pchan_colorset (Object *ob, bPoseChannel *pchan)
@@ -437,43 +437,64 @@ static void draw_bonevert_solid(void)
glCallList(displist);
}
+static float bone_octahedral_verts[6][3]= {
+ { 0.0f, 0.0f, 0.0f},
+ { 0.1f, 0.1f, 0.1f},
+ { 0.1f, 0.1f, -0.1f},
+ {-0.1f, 0.1f, -0.1f},
+ {-0.1f, 0.1f, 0.1f},
+ { 0.0f, 1.0f, 0.0f}
+};
+
+static unsigned int bone_octahedral_wire_sides[8]= {0, 1, 5, 3, 0, 4, 5, 2};
+static unsigned int bone_octahedral_wire_square[8]= {1, 2, 3, 4, 1};
+
+static unsigned int bone_octahedral_solid_tris[8][3]= {
+ {2, 1, 0}, /* bottom */
+ {3, 2, 0},
+ {4, 3, 0},
+ {1, 4, 0},
+
+ {5, 1, 2}, /* top */
+ {5, 2, 3},
+ {5, 3, 4},
+ {5, 4, 1}
+};
+
+/* aligned with bone_octahedral_solid_tris */
+static float bone_octahedral_solid_normals[8][3]= {
+ { 0.70710683f, -0.70710683f, 0.00000000f},
+ {-0.00000000f, -0.70710683f, -0.70710683f},
+ {-0.70710683f, -0.70710683f, 0.00000000f},
+ { 0.00000000f, -0.70710683f, 0.70710683f},
+ { 0.99388373f, 0.11043154f, -0.00000000f},
+ { 0.00000000f, 0.11043154f, -0.99388373f},
+ {-0.99388373f, 0.11043154f, 0.00000000f},
+ { 0.00000000f, 0.11043154f, 0.99388373f}
+};
+
static void draw_bone_octahedral(void)
{
static GLuint displist=0;
if (displist == 0) {
- float vec[6][3];
-
displist= glGenLists(1);
glNewList(displist, GL_COMPILE);
-
- vec[0][0]= vec[0][1]= vec[0][2]= 0.0f;
- vec[5][0]= vec[5][2]= 0.0f; vec[5][1]= 1.0f;
-
- vec[1][0]= 0.1f; vec[1][2]= 0.1f; vec[1][1]= 0.1f;
- vec[2][0]= 0.1f; vec[2][2]= -0.1f; vec[2][1]= 0.1f;
- vec[3][0]= -0.1f; vec[3][2]= -0.1f; vec[3][1]= 0.1f;
- vec[4][0]= -0.1f; vec[4][2]= 0.1f; vec[4][1]= 0.1f;
-
+
/* Section 1, sides */
- glBegin(GL_LINE_LOOP);
- glVertex3fv(vec[0]);
- glVertex3fv(vec[1]);
- glVertex3fv(vec[5]);
- glVertex3fv(vec[3]);
- glVertex3fv(vec[0]);
- glVertex3fv(vec[4]);
- glVertex3fv(vec[5]);
- glVertex3fv(vec[2]);
- glEnd();
-
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, bone_octahedral_verts);
+ glDrawElements(GL_LINE_LOOP,
+ sizeof(bone_octahedral_wire_sides)/sizeof(*bone_octahedral_wire_sides),
+ GL_UNSIGNED_INT,
+ bone_octahedral_wire_sides);
+
/* Section 1, square */
- glBegin(GL_LINE_LOOP);
- glVertex3fv(vec[1]);
- glVertex3fv(vec[2]);
- glVertex3fv(vec[3]);
- glVertex3fv(vec[4]);
- glEnd();
+ glDrawElements(GL_LINE_LOOP,
+ sizeof(bone_octahedral_wire_square)/sizeof(*bone_octahedral_wire_square),
+ GL_UNSIGNED_INT,
+ bone_octahedral_wire_square);
+ glDisableClientState(GL_VERTEX_ARRAY);
glEndList();
}
@@ -484,59 +505,34 @@ static void draw_bone_octahedral(void)
static void draw_bone_solid_octahedral(void)
{
static GLuint displist=0;
-
+
if (displist == 0) {
- float vec[6][3], nor[3];
-
+ int i;
+
displist= glGenLists(1);
glNewList(displist, GL_COMPILE);
-
- vec[0][0]= vec[0][1]= vec[0][2]= 0.0f;
- vec[5][0]= vec[5][2]= 0.0f; vec[5][1]= 1.0f;
-
- vec[1][0]= 0.1f; vec[1][2]= 0.1f; vec[1][1]= 0.1f;
- vec[2][0]= 0.1f; vec[2][2]= -0.1f; vec[2][1]= 0.1f;
- vec[3][0]= -0.1f; vec[3][2]= -0.1f; vec[3][1]= 0.1f;
- vec[4][0]= -0.1f; vec[4][2]= 0.1f; vec[4][1]= 0.1f;
-
-
- glBegin(GL_TRIANGLES);
- /* bottom */
- normal_tri_v3( nor,vec[2], vec[1], vec[0]);
- glNormal3fv(nor);
- glVertex3fv(vec[2]); glVertex3fv(vec[1]); glVertex3fv(vec[0]);
-
- normal_tri_v3( nor,vec[3], vec[2], vec[0]);
- glNormal3fv(nor);
- glVertex3fv(vec[3]); glVertex3fv(vec[2]); glVertex3fv(vec[0]);
-
- normal_tri_v3( nor,vec[4], vec[3], vec[0]);
- glNormal3fv(nor);
- glVertex3fv(vec[4]); glVertex3fv(vec[3]); glVertex3fv(vec[0]);
- normal_tri_v3( nor,vec[1], vec[4], vec[0]);
- glNormal3fv(nor);
- glVertex3fv(vec[1]); glVertex3fv(vec[4]); glVertex3fv(vec[0]);
+#if 1
+ glBegin(GL_TRIANGLES);
+ for(i= 0; i < 8; i++) {
+ glNormal3fv(bone_octahedral_solid_normals[i]);
+ glVertex3fv(bone_octahedral_verts[bone_octahedral_solid_tris[i][0]]);
+ glVertex3fv(bone_octahedral_verts[bone_octahedral_solid_tris[i][1]]);
+ glVertex3fv(bone_octahedral_verts[bone_octahedral_solid_tris[i][2]]);
+ }
- /* top */
- normal_tri_v3( nor,vec[5], vec[1], vec[2]);
- glNormal3fv(nor);
- glVertex3fv(vec[5]); glVertex3fv(vec[1]); glVertex3fv(vec[2]);
-
- normal_tri_v3( nor,vec[5], vec[2], vec[3]);
- glNormal3fv(nor);
- glVertex3fv(vec[5]); glVertex3fv(vec[2]); glVertex3fv(vec[3]);
-
- normal_tri_v3( nor,vec[5], vec[3], vec[4]);
- glNormal3fv(nor);
- glVertex3fv(vec[5]); glVertex3fv(vec[3]); glVertex3fv(vec[4]);
-
- normal_tri_v3( nor,vec[5], vec[4], vec[1]);
- glNormal3fv(nor);
- glVertex3fv(vec[5]); glVertex3fv(vec[4]); glVertex3fv(vec[1]);
-
glEnd();
-
+
+#else /* not working because each vert needs a different normal */
+ glEnableClientState(GL_NORMAL_ARRAY);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glNormalPointer(GL_FLOAT, 0, bone_octahedral_solid_normals);
+ glVertexPointer(3, GL_FLOAT, 0, bone_octahedral_verts);
+ glDrawElements(GL_TRIANGLES, sizeof(bone_octahedral_solid_tris)/sizeof(unsigned int), GL_UNSIGNED_INT, bone_octahedral_solid_tris);
+ glDisableClientState(GL_NORMAL_ARRAY);
+ glDisableClientState(GL_VERTEX_ARRAY);
+#endif
+
glEndList();
}
@@ -831,7 +827,7 @@ static void draw_sphere_bone_wire(float smat[][4], float imat[][4], int armflag,
if (0.0f != normalize_v3(dirvec)) {
float norvech[3], norvect[3], vec[3];
- VECCOPY(vec, dirvec);
+ copy_v3_v3(vec, dirvec);
mul_v3_fl(dirvec, head);
cross_v3_v3v3(norvech, dirvec, imat[2]);
@@ -1548,7 +1544,7 @@ static void draw_pose_dofs(Object *ob)
/* in parent-bone pose, but own restspace */
glPushMatrix();
- VECCOPY(posetrans, pchan->pose_mat[3]);
+ copy_v3_v3(posetrans, pchan->pose_mat[3]);
glTranslatef(posetrans[0], posetrans[1], posetrans[2]);
if (pchan->parent) {
@@ -1646,7 +1642,7 @@ static void bone_matrix_translate_y(float mat[][4], float y)
{
float trans[3];
- VECCOPY(trans, mat[1]);
+ copy_v3_v3(trans, mat[1]);
mul_v3_fl(trans, y);
add_v3_v3(mat[3], trans);
}
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 9acdd8d5be1..f827d9323ac 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -64,6 +64,7 @@
#include "GPU_buffers.h"
#include "GPU_extensions.h"
#include "GPU_draw.h"
+#include "GPU_material.h"
#include "ED_mesh.h"
@@ -207,44 +208,71 @@ static Material *give_current_material_or_def(Object *ob, int matnr)
return ma?ma:&defmaterial;
}
-static int set_draw_settings_cached(int clearcache, int textured, MTFace *texface, int lit, Object *litob, int litmatnr, int doublesided)
+/* Icky globals, fix with userdata parameter */
+
+static struct TextureDrawState {
+ Object *ob;
+ int islit, istex;
+ int color_profile;
+ unsigned char obcol[4];
+} Gtexdraw = {NULL, 0, 0, 0, {0, 0, 0, 0}};
+
+static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *ma, struct TextureDrawState gtexdraw)
{
+ static Material *c_ma;
static int c_textured;
- static int c_lit;
- static int c_doublesided;
static MTFace *c_texface;
- static Object *c_litob;
- static int c_litmatnr;
+ static int c_backculled;
static int c_badtex;
+ static int c_lit;
+ Object *litob = NULL; //to get mode to turn off mipmap in painting mode
+ int backculled = 0;
+ int alphablend = 0;
+ int textured = 0;
+ int lit = 0;
+
if (clearcache) {
- c_textured= c_lit= c_doublesided= -1;
+ c_textured= c_lit= c_backculled= -1;
c_texface= (MTFace*) -1;
- c_litob= (Object*) -1;
- c_litmatnr= -1;
c_badtex= 0;
+ } else {
+ textured = gtexdraw.istex;
+ litob = gtexdraw.ob;
+ }
+
+ /* convert number of lights into boolean */
+ if (gtexdraw.islit) lit = 1;
+
+ if (ma) {
+ alphablend = ma->game.alpha_blend;
+ if (ma->mode & MA_SHLESS) lit = 0;
+ backculled = ma->game.flag & GEMAT_BACKCULL;
}
if (texface) {
- lit = lit && (lit==-1 || texface->mode&TF_LIGHT);
- textured = textured && (texface->mode&TF_TEX);
- doublesided = texface->mode&TF_TWOSIDE;
- } else {
- textured = 0;
+ textured = textured && (texface->tpage);
+
+ /* no material, render alpha if texture has depth=32 */
+ if (!ma && BKE_image_has_alpha(texface->tpage))
+ alphablend = GPU_BLEND_ALPHA;
}
- if (doublesided!=c_doublesided) {
- if (doublesided) glDisable(GL_CULL_FACE);
- else glEnable(GL_CULL_FACE);
+ else
+ textured = 0;
+
+ if (backculled!=c_backculled) {
+ if (backculled) glEnable(GL_CULL_FACE);
+ else glDisable(GL_CULL_FACE);
- c_doublesided= doublesided;
+ c_backculled= backculled;
}
if (textured!=c_textured || texface!=c_texface) {
if (textured ) {
- c_badtex= !GPU_set_tpage(texface, !(litob->mode & OB_MODE_TEXTURE_PAINT));
+ c_badtex= !GPU_set_tpage(texface, !(litob->mode & OB_MODE_TEXTURE_PAINT), alphablend);
} else {
- GPU_set_tpage(NULL, 0);
+ GPU_set_tpage(NULL, 0, 0);
c_badtex= 0;
}
c_textured= textured;
@@ -252,10 +280,10 @@ static int set_draw_settings_cached(int clearcache, int textured, MTFace *texfac
}
if (c_badtex) lit= 0;
- if (lit!=c_lit || litob!=c_litob || litmatnr!=c_litmatnr) {
+ if (lit!=c_lit || ma!=c_ma) {
if (lit) {
- Material *ma= give_current_material_or_def(litob, litmatnr+1);
float spec[4];
+ if (!ma)ma= give_current_material_or_def(NULL, 0); //default material
spec[0]= ma->spec*ma->specr;
spec[1]= ma->spec*ma->specg;
@@ -273,22 +301,11 @@ static int set_draw_settings_cached(int clearcache, int textured, MTFace *texfac
glDisable(GL_COLOR_MATERIAL);
}
c_lit= lit;
- c_litob= litob;
- c_litmatnr= litmatnr;
}
return c_badtex;
}
-/* Icky globals, fix with userdata parameter */
-
-static struct TextureDrawState {
- Object *ob;
- int islit, istex;
- int color_profile;
- unsigned char obcol[4];
-} Gtexdraw = {NULL, 0, 0, 0, {0, 0, 0, 0}};
-
static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
{
unsigned char obcol[4];
@@ -318,14 +335,14 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
Gtexdraw.istex = istex;
Gtexdraw.color_profile = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
memcpy(Gtexdraw.obcol, obcol, sizeof(obcol));
- set_draw_settings_cached(1, 0, NULL, Gtexdraw.islit, NULL, 0, 0);
+ set_draw_settings_cached(1, NULL, NULL, Gtexdraw);
glShadeModel(GL_SMOOTH);
}
static void draw_textured_end(void)
{
/* switch off textures */
- GPU_set_tpage(NULL, 0);
+ GPU_set_tpage(NULL, 0, 0);
glShadeModel(GL_FLAT);
glDisable(GL_CULL_FACE);
@@ -347,18 +364,22 @@ static void draw_textured_end(void)
static int draw_tface__set_draw_legacy(MTFace *tface, MCol *mcol, int matnr)
{
- if (tface && (tface->mode&TF_INVISIBLE)) return 0;
+ Material *ma= give_current_material(Gtexdraw.ob, matnr+1);
+ int validtexture=0;
+
+ if (ma && (ma->game.flag & GEMAT_INVISIBLE)) return 0;
+
+ validtexture = set_draw_settings_cached(0, tface, ma, Gtexdraw);
- if (tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
+ if (tface && validtexture) {
glColor3ub(0xFF, 0x00, 0xFF);
return 2; /* Don't set color */
- } else if (tface && tface->mode&TF_OBCOL) {
+ } else if (ma && ma->shade_flag&MA_OBCOLOR) {
glColor3ubv(Gtexdraw.obcol);
return 2; /* Don't set color */
} else if (!mcol) {
if (tface) glColor3f(1.0, 1.0, 1.0);
else {
- Material *ma= give_current_material(Gtexdraw.ob, matnr+1);
if(ma) {
float col[3];
if(Gtexdraw.color_profile) linearrgb_to_srgb_v3_v3(col, &ma->r);
@@ -380,9 +401,11 @@ static int draw_mcol__set_draw_legacy(MTFace *tface, MCol *mcol, int matnr)
}
static int draw_tface__set_draw(MTFace *tface, MCol *mcol, int matnr)
{
- if (tface && (tface->mode&TF_INVISIBLE)) return 0;
+ Material *ma= give_current_material(Gtexdraw.ob, matnr+1);
+
+ if (ma && (ma->game.flag & GEMAT_INVISIBLE)) return 0;
- if (tface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE)) {
+ if (tface && set_draw_settings_cached(0, tface, ma, Gtexdraw)) {
return 2; /* Don't set color */
} else if (tface && tface->mode&TF_OBCOL) {
return 2; /* Don't set color */
@@ -404,7 +427,9 @@ static void add_tface_color_layer(DerivedMesh *dm)
finalCol = MEM_mallocN(sizeof(MCol)*4*dm->getNumFaces(dm),"add_tface_color_layer");
for(i=0;i<dm->getNumFaces(dm);i++) {
- if (tface && (tface->mode&TF_INVISIBLE)) {
+ Material *ma= give_current_material(Gtexdraw.ob, mface[i].mat_nr+1);
+
+ if (ma && (ma->game.flag&GEMAT_INVISIBLE)) {
if( mcol )
memcpy(&finalCol[i*4],&mcol[i*4],sizeof(MCol)*4);
else
@@ -414,7 +439,7 @@ static void add_tface_color_layer(DerivedMesh *dm)
finalCol[i*4+j].r = 255;
}
}
- else if (tface && mface && set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, mface[i].mat_nr, TF_TWOSIDE)) {
+ else if (tface && mface && set_draw_settings_cached(0, tface, ma, Gtexdraw)) {
for(j=0;j<4;j++) {
finalCol[i*4+j].b = 255;
finalCol[i*4+j].g = 0;
@@ -499,10 +524,13 @@ static int wpaint__setSolidDrawOptions(void *userData, int index, int *drawSmoot
{
Mesh *me = (Mesh*)userData;
- if ( (me->mface && me->mface[index].flag & ME_HIDE) ||
- (me->mtface && (me->mtface[index].mode & TF_INVISIBLE))
- ) {
- return 0;
+ if (me->mface) {
+ short matnr= me->mface[index].mat_nr;
+ Material *ma= me->mat[matnr];
+
+ if (ma && (ma->game.flag & GEMAT_INVISIBLE)) {
+ return 0;
+ }
}
*drawSmooth_r = 1;
@@ -528,17 +556,18 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
if(ob->mode & OB_MODE_EDIT)
return;
else if(ob==OBACT)
- if(paint_facesel_test(ob))
+ if(paint_facesel_test(ob) || paint_vertsel_test(ob))
return;
ddm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
for(a=0, mf=mface; a<totface; a++, tface++, mf++) {
- int mode= tface->mode;
- int matnr= mf->mat_nr;
+ short matnr= mf->mat_nr;
int mf_smooth= mf->flag & ME_SMOOTH;
+ Material *mat = me->mat[matnr];
+ int mode= mat->game.flag;
- if (!(mf->flag&ME_HIDE) && !(mode&TF_INVISIBLE) && (mode&TF_BMFONT)) {
+ if (!(mode&GEMAT_INVISIBLE) && (mode&GEMAT_TEXT)) {
float v1[3], v2[3], v3[3], v4[3];
char string[MAX_PROPSTRING];
int characters, i, glattrib= -1, badtex= 0;
@@ -554,7 +583,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
}
}
else {
- badtex = set_draw_settings_cached(0, Gtexdraw.istex, tface, Gtexdraw.islit, Gtexdraw.ob, matnr, TF_TWOSIDE);
+ badtex = set_draw_settings_cached(0, tface, mat, Gtexdraw);
if (badtex) {
if (mcol) mcol+=4;
continue;
@@ -583,7 +612,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
glNormal3fv(nor);
}
- GPU_render_text(tface, tface->mode, string, characters,
+ GPU_render_text(tface, mode, string, characters,
(unsigned int*)mcol, v1, v2, v3, (mf->v4? v4: NULL), glattrib);
}
if (mcol) {
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 98948ca1689..ffe26da82a8 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -59,6 +59,7 @@
#include "BKE_anim.h" //for the where_on_path function
#include "BKE_constraint.h" // for the get_constraint_target function
+#include "BKE_curve.h"
#include "BKE_DerivedMesh.h"
#include "BKE_deform.h"
#include "BKE_displist.h"
@@ -93,7 +94,7 @@
#include "ED_screen.h"
#include "ED_sculpt.h"
#include "ED_types.h"
-#include "ED_curve.h" /* for ED_curve_editnurbs */
+#include "ED_curve.h" /* for curve_editnurbs */
#include "UI_resources.h"
@@ -140,7 +141,7 @@ static int check_ob_drawface_dot(Scene *sce, View3D *vd, char dt)
/* ************* only use while object drawing **************
* or after running ED_view3d_init_mats_rv3d
* */
-static void view3d_project_short_clip(ARegion *ar, float *vec, short *adr, int local)
+static void view3d_project_short_clip(ARegion *ar, const float vec[3], short *adr, int local)
{
RegionView3D *rv3d= ar->regiondata;
float fx, fy, vec4[4];
@@ -175,7 +176,7 @@ static void view3d_project_short_clip(ARegion *ar, float *vec, short *adr, int l
}
/* only use while object drawing */
-static void view3d_project_short_noclip(ARegion *ar, float *vec, short *adr)
+static void view3d_project_short_noclip(ARegion *ar, const float vec[3], short *adr)
{
RegionView3D *rv3d= ar->regiondata;
float fx, fy, vec4[4];
@@ -220,16 +221,13 @@ int draw_glsl_material(Scene *scene, Object *ob, View3D *v3d, int dt)
return (scene->gm.matmode == GAME_MAT_GLSL) && (dt > OB_SOLID);
}
-static int check_material_alpha(Base *base, Mesh *me, int glsl)
+static int check_material_alpha(Base *base, int glsl)
{
if(base->flag & OB_FROMDUPLI)
return 0;
if(G.f & G_PICKSEL)
return 0;
-
- if(me->edit_mesh)
- return 0;
return (glsl || (base->object->dtx & OB_DRAWTRANSP));
}
@@ -257,7 +255,9 @@ static float cube[8][3] = {
/* ----------------- OpenGL Circle Drawing - Tables for Optimised Drawing Speed ------------------ */
/* 32 values of sin function (still same result!) */
-static float sinval[32] = {
+#define CIRCLE_RESOL 32
+
+static const float sinval[CIRCLE_RESOL] = {
0.00000000,
0.20129852,
0.39435585,
@@ -293,7 +293,7 @@ static float sinval[32] = {
};
/* 32 values of cos function (still same result!) */
-static float cosval[32] ={
+static const float cosval[CIRCLE_RESOL] = {
1.00000000,
0.97952994,
0.91895781,
@@ -611,28 +611,39 @@ static void draw_empty_image(Object *ob)
glPopMatrix();
}
-void drawcircball(int mode, const float cent[3], float rad, float tmat[][4])
+static void circball_array_fill(float verts[CIRCLE_RESOL][3], const float cent[3], float rad, float tmat[][4])
{
- float vec[3], vx[3], vy[3];
- int a, tot=32;
+ float vx[3], vy[3];
+ float *viter= (float *)verts;
+ unsigned int a;
mul_v3_v3fl(vx, tmat[0], rad);
mul_v3_v3fl(vy, tmat[1], rad);
- glBegin(mode);
- for(a=0; a<tot; a++) {
- vec[0]= cent[0] + *(sinval+a) * vx[0] + *(cosval+a) * vy[0];
- vec[1]= cent[1] + *(sinval+a) * vx[1] + *(cosval+a) * vy[1];
- vec[2]= cent[2] + *(sinval+a) * vx[2] + *(cosval+a) * vy[2];
- glVertex3fv(vec);
+ for (a=0; a < CIRCLE_RESOL; a++, viter += 3) {
+ viter[0]= cent[0] + sinval[a] * vx[0] + cosval[a] * vy[0];
+ viter[1]= cent[1] + sinval[a] * vx[1] + cosval[a] * vy[1];
+ viter[2]= cent[2] + sinval[a] * vx[2] + cosval[a] * vy[2];
}
- glEnd();
+}
+
+void drawcircball(int mode, const float cent[3], float rad, float tmat[][4])
+{
+ float verts[CIRCLE_RESOL][3];
+
+ circball_array_fill(verts, cent, rad, tmat);
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, verts);
+ glDrawArrays(mode, 0, CIRCLE_RESOL);
+ glDisableClientState(GL_VERTEX_ARRAY);
}
/* circle for object centers, special_color is for library or ob users */
static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3], int selstate, int special_color)
{
const float size= ED_view3d_pixel_size(rv3d, co) * (float)U.obcenter_dia * 0.5f;
+ float verts[CIRCLE_RESOL][3];
/* using gldepthfunc guarantees that it does write z values, but not checks for it, so centers remain visible independt order of drawing */
if(v3d->zbuf) glDepthFunc(GL_ALWAYS);
@@ -648,12 +659,25 @@ static void drawcentercircle(View3D *v3d, RegionView3D *rv3d, const float co[3],
else if (selstate == SELECT) UI_ThemeColorShadeAlpha(TH_SELECT, 0, -80);
else if (selstate == DESELECT) UI_ThemeColorShadeAlpha(TH_TRANSFORM, 0, -80);
}
- drawcircball(GL_POLYGON, co, size, rv3d->viewinv);
-
+
+ circball_array_fill(verts, co, size, rv3d->viewinv);
+
+ /* enable vertex array */
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, verts);
+
+ /* 1. draw filled, blended polygon */
+ glDrawArrays(GL_POLYGON, 0, CIRCLE_RESOL);
+
+ /* 2. draw outline */
UI_ThemeColorShadeAlpha(TH_WIRE, 0, -30);
- drawcircball(GL_LINE_LOOP, co, size, rv3d->viewinv);
-
+ glDrawArrays(GL_LINE_LOOP, 0, CIRCLE_RESOL);
+
+ /* finishe up */
+ glDisableClientState(GL_VERTEX_ARRAY);
+
glDisable(GL_BLEND);
+
if(v3d->zbuf) glDepthFunc(GL_LEQUAL);
}
@@ -838,7 +862,7 @@ static void drawcube_size(float size)
/* this is an unused (old) cube-drawing function based on a given size */
#if 0
-static void drawcube_size(float *size)
+static void drawcube_size(const float size[3])
{
glPushMatrix();
@@ -892,7 +916,7 @@ static void drawshadbuflimits(Lamp *la, float mat[][4])
-static void spotvolume(float *lvec, float *vvec, float inp)
+static void spotvolume(float lvec[3], float vvec[3], const float inp)
{
/* camera is at 0,0,0 */
float temp[3],plane[3],mat1[3][3],mat2[3][3],mat3[3][3],mat4[3][3],q[4],co,si,angle;
@@ -921,8 +945,8 @@ static void spotvolume(float *lvec, float *vvec, float inp)
normalize_v3(&q[1]);
angle = saacos(plane[2])/2.0f;
- co = cos(angle);
- si = sqrt(1-co*co);
+ co = cosf(angle);
+ si = sqrtf(1-co*co);
q[0] = co;
q[1] *= si;
@@ -936,7 +960,7 @@ static void spotvolume(float *lvec, float *vvec, float inp)
unit_m3(mat2);
co = inp;
- si = sqrt(1-inp*inp);
+ si = sqrtf(1.0f-inp*inp);
mat2[0][0] = co;
mat2[1][0] = -si;
@@ -1714,6 +1738,31 @@ void mesh_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, EditVe
dm->release(dm);
}
+/* draw callback */
+static void drawSelectedVertices__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
+{
+ MVert *mv = &((MVert *)userData)[index];
+
+ if(!(mv->flag & ME_HIDE)) {
+ const char sel= mv->flag & SELECT;
+
+ // TODO define selected color
+ if(sel) {
+ glColor3f(1.0f, 1.0f, 0.0f);
+ }
+ else {
+ glColor3f(0.0f, 0.0f, 0.0f);
+ }
+
+ glVertex3fv(co);
+ }
+}
+
+static void drawSelectedVertices(DerivedMesh *dm, Mesh *me) {
+ glBegin(GL_POINTS);
+ dm->foreachMappedVert(dm, drawSelectedVertices__mapFunc, me->mvert);
+ glEnd();
+}
static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, float *v0co, float *v1co)
{
struct { void (*func)(void *userData, EditEdge *eed, int x0, int y0, int x1, int y1, int index); void *userData; ViewContext vc; int clipVerts; } *data = userData;
@@ -1797,7 +1846,7 @@ void nurbs_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, Nurb
short s[2] = {IS_CLIPPED, 0};
Nurb *nu;
int i;
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
ED_view3d_local_clipping(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
@@ -2946,7 +2995,16 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
bglPolygonOffset(rv3d->dist, 0.0);
}
}
-
+
+ if(paint_vertsel_test(ob)) {
+
+ glColor3f(0.0f, 0.0f, 0.0f);
+ glPointSize(UI_GetThemeValuef(TH_VERTEX_SIZE));
+
+ drawSelectedVertices(dm, ob->data);
+
+ glPointSize(1.0f);
+ }
dm->release(dm);
}
@@ -2986,12 +3044,16 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
scene->customdata_mask);
if(dt>OB_WIRE) {
- // no transp in editmode, the fancy draw over goes bad then
glsl = draw_glsl_material(scene, ob, v3d, dt);
- GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl, NULL);
+ check_alpha = check_material_alpha(base, glsl);
+
+ GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl,
+ (check_alpha)? &do_alpha_pass: NULL);
}
- draw_em_fancy(scene, v3d, rv3d, ob, em, cageDM, finalDM, dt);
+ // transp in editmode makes the fancy draw over go bad
+ if (!do_alpha_pass)
+ draw_em_fancy(scene, v3d, rv3d, ob, em, cageDM, finalDM, dt);
GPU_end_object_materials();
@@ -3002,7 +3064,7 @@ static int draw_mesh_object(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D
/* don't create boundbox here with mesh_get_bb(), the derived system will make it, puts deformed bb's OK */
if(me->totface<=4 || ED_view3d_boundbox_clip(rv3d, ob->obmat, (ob->bb)? ob->bb: me->bb)) {
glsl = draw_glsl_material(scene, ob, v3d, dt);
- check_alpha = check_material_alpha(base, me, glsl);
+ check_alpha = check_material_alpha(base, glsl);
if(dt==OB_SOLID || glsl) {
GPU_begin_object_materials(v3d, rv3d, scene, ob, glsl,
@@ -4044,7 +4106,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(draw_as==PART_DRAW_PATH){
ParticleCacheKey **cache, *path;
- float *cd2=NULL,*cdata2=NULL;
+ float /* *cd2=NULL, */ /* UNUSED */ *cdata2=NULL;
/* setup gl flags */
if (1) { //ob_dt > OB_WIRE) {
@@ -4112,7 +4174,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
if(cdata2)
MEM_freeN(cdata2);
- cd2=cdata2=NULL;
+ /* cd2= */ /* UNUSED */ cdata2=NULL;
glLineWidth(1.0f);
@@ -4560,16 +4622,22 @@ static void tekenhandlesN(Nurb *nu, short sel, short hide_handles)
{
BezTriple *bezt;
float *fp;
- int basecol;
int a;
-
+
if(nu->hide || hide_handles) return;
glBegin(GL_LINES);
-
+
if(nu->type == CU_BEZIER) {
- if(sel) basecol= TH_HANDLE_SEL_FREE;
- else basecol= TH_HANDLE_FREE;
+
+#define TH_HANDLE_COL_TOT ((TH_HANDLE_SEL_FREE - TH_HANDLE_FREE) + 1)
+ /* use MIN2 when indexing to ensure newer files dont read outside the array */
+ unsigned char handle_cols[TH_HANDLE_COL_TOT][3];
+ const int basecol= sel ? TH_HANDLE_SEL_FREE : TH_HANDLE_FREE;
+
+ for (a=0; a < TH_HANDLE_COL_TOT; a++) {
+ UI_GetThemeColor3ubv(basecol + a, handle_cols[a]);
+ }
bezt= nu->bezt;
a= nu->pntsu;
@@ -4578,31 +4646,34 @@ static void tekenhandlesN(Nurb *nu, short sel, short hide_handles)
if( (bezt->f2 & SELECT)==sel) {
fp= bezt->vec[0];
- UI_ThemeColor(basecol + bezt->h1);
+ glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT-1)]);
glVertex3fv(fp);
glVertex3fv(fp+3);
- UI_ThemeColor(basecol + bezt->h2);
+ glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT-1)]);
glVertex3fv(fp+3);
glVertex3fv(fp+6);
}
else if( (bezt->f1 & SELECT)==sel) {
fp= bezt->vec[0];
- UI_ThemeColor(basecol + bezt->h1);
+ glColor3ubv(handle_cols[MIN2(bezt->h1, TH_HANDLE_COL_TOT-1)]);
glVertex3fv(fp);
glVertex3fv(fp+3);
}
else if( (bezt->f3 & SELECT)==sel) {
fp= bezt->vec[1];
- UI_ThemeColor(basecol + bezt->h2);
+ glColor3ubv(handle_cols[MIN2(bezt->h2, TH_HANDLE_COL_TOT-1)]);
glVertex3fv(fp);
glVertex3fv(fp+3);
}
}
bezt++;
}
+
+#undef TH_HANDLE_COL_TOT
+
}
glEnd();
}
@@ -5070,7 +5141,7 @@ static void curve_draw_speed(Scene *scene, Object *ob)
#endif // XXX old animation system stuff
-static void draw_textcurs(float textcurs[][2])
+static void draw_textcurs(float textcurs[4][2])
{
cpack(0);
@@ -5084,15 +5155,16 @@ static void draw_textcurs(float textcurs[][2])
set_inverted_drawing(0);
}
-static void drawspiral(float *cent, float rad, float tmat[][4], int start)
+static void drawspiral(const float cent[3], float rad, float tmat[][4], int start)
{
float vec[3], vx[3], vy[3];
- int a, tot=32;
- char inverse=0;
-
+ const float tot_inv= (1.0f / (float)CIRCLE_RESOL);
+ int a;
+ char inverse= FALSE;
+
if (start < 0) {
- inverse = 1;
- start *= -1;
+ inverse = TRUE;
+ start= -start;
}
mul_v3_v3fl(vx, tmat[0], rad);
@@ -5101,31 +5173,31 @@ static void drawspiral(float *cent, float rad, float tmat[][4], int start)
copy_v3_v3(vec, cent);
if (inverse==0) {
- for(a=0; a<tot; a++) {
+ for(a=0; a<CIRCLE_RESOL; a++) {
if (a+start>31)
start=-a + 1;
glBegin(GL_LINES);
glVertex3fv(vec);
- vec[0]= cent[0] + *(sinval+a+start) * (vx[0] * (float)a/(float)tot) + *(cosval+a+start) * (vy[0] * (float)a/(float)tot);
- vec[1]= cent[1] + *(sinval+a+start) * (vx[1] * (float)a/(float)tot) + *(cosval+a+start) * (vy[1] * (float)a/(float)tot);
- vec[2]= cent[2] + *(sinval+a+start) * (vx[2] * (float)a/(float)tot) + *(cosval+a+start) * (vy[2] * (float)a/(float)tot);
+ vec[0]= cent[0] + sinval[a+start] * (vx[0] * (float)a * tot_inv) + cosval[a+start] * (vy[0] * (float)a * tot_inv);
+ vec[1]= cent[1] + sinval[a+start] * (vx[1] * (float)a * tot_inv) + cosval[a+start] * (vy[1] * (float)a * tot_inv);
+ vec[2]= cent[2] + sinval[a+start] * (vx[2] * (float)a * tot_inv) + cosval[a+start] * (vy[2] * (float)a * tot_inv);
glVertex3fv(vec);
glEnd();
}
}
else {
a=0;
- vec[0]= cent[0] + *(sinval+a+start) * (vx[0] * (float)(-a+31)/(float)tot) + *(cosval+a+start) * (vy[0] * (float)(-a+31)/(float)tot);
- vec[1]= cent[1] + *(sinval+a+start) * (vx[1] * (float)(-a+31)/(float)tot) + *(cosval+a+start) * (vy[1] * (float)(-a+31)/(float)tot);
- vec[2]= cent[2] + *(sinval+a+start) * (vx[2] * (float)(-a+31)/(float)tot) + *(cosval+a+start) * (vy[2] * (float)(-a+31)/(float)tot);
- for(a=0; a<tot; a++) {
+ vec[0]= cent[0] + sinval[a+start] * (vx[0] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[0] * (float)(-a+31) * tot_inv);
+ vec[1]= cent[1] + sinval[a+start] * (vx[1] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[1] * (float)(-a+31) * tot_inv);
+ vec[2]= cent[2] + sinval[a+start] * (vx[2] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[2] * (float)(-a+31) * tot_inv);
+ for(a=0; a<CIRCLE_RESOL; a++) {
if (a+start>31)
start=-a + 1;
glBegin(GL_LINES);
glVertex3fv(vec);
- vec[0]= cent[0] + *(sinval+a+start) * (vx[0] * (float)(-a+31)/(float)tot) + *(cosval+a+start) * (vy[0] * (float)(-a+31)/(float)tot);
- vec[1]= cent[1] + *(sinval+a+start) * (vx[1] * (float)(-a+31)/(float)tot) + *(cosval+a+start) * (vy[1] * (float)(-a+31)/(float)tot);
- vec[2]= cent[2] + *(sinval+a+start) * (vx[2] * (float)(-a+31)/(float)tot) + *(cosval+a+start) * (vy[2] * (float)(-a+31)/(float)tot);
+ vec[0]= cent[0] + sinval[a+start] * (vx[0] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[0] * (float)(-a+31) * tot_inv);
+ vec[1]= cent[1] + sinval[a+start] * (vx[1] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[1] * (float)(-a+31) * tot_inv);
+ vec[2]= cent[2] + sinval[a+start] * (vx[2] * (float)(-a+31) * tot_inv) + cosval[a+start] * (vy[2] * (float)(-a+31) * tot_inv);
glVertex3fv(vec);
glEnd();
}
@@ -5143,9 +5215,9 @@ static void drawcircle_size(float size)
glBegin(GL_LINE_LOOP);
/* coordinates are: cos(degrees*11.25)=x, sin(degrees*11.25)=y, 0.0f=z */
- for (degrees=0; degrees<32; degrees++) {
- x= *(cosval + degrees);
- y= *(sinval + degrees);
+ for (degrees=0; degrees<CIRCLE_RESOL; degrees++) {
+ x= cosval[degrees];
+ y= sinval[degrees];
glVertex3f(x*size, 0.0f, y*size);
}
@@ -5155,7 +5227,7 @@ static void drawcircle_size(float size)
}
/* needs fixing if non-identity matrice used */
-static void drawtube(float *vec, float radius, float height, float tmat[][4])
+static void drawtube(const float vec[3], float radius, float height, float tmat[][4])
{
float cur[3];
drawcircball(GL_LINE_LOOP, vec, radius, tmat);
@@ -5177,7 +5249,7 @@ static void drawtube(float *vec, float radius, float height, float tmat[][4])
glEnd();
}
/* needs fixing if non-identity matrice used */
-static void drawcone(float *vec, float radius, float height, float tmat[][4])
+static void drawcone(const float vec[3], float radius, float height, float tmat[][4])
{
float cur[3];
@@ -5413,8 +5485,7 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
unit_m4(tmat);
- radius=(pd->flag&PFIELD_USEMAXR)?pd->maxrad:1.0f;
- radius*=(float)M_PI/180.0f;
+ radius= DEG2RADF((pd->flag&PFIELD_USEMAXR) ? pd->maxrad : 1.0f);
distance=(pd->flag&PFIELD_USEMAX)?pd->maxdist:0.0f;
if(pd->flag & (PFIELD_USEMAX|PFIELD_USEMAXR)){
@@ -5423,8 +5494,7 @@ static void draw_forcefield(Scene *scene, Object *ob, RegionView3D *rv3d)
drawcone(vec, distance * sinf(radius),-distance * cosf(radius),tmat);
}
- radius=(pd->flag&PFIELD_USEMINR)?pd->minrad:1.0f;
- radius*=(float)M_PI/180.0f;
+ radius= DEG2RADF((pd->flag&PFIELD_USEMINR) ? pd->minrad : 1.0f);
distance=(pd->flag&PFIELD_USEMIN)?pd->mindist:0.0f;
if(pd->flag & (PFIELD_USEMIN|PFIELD_USEMINR)){
@@ -5453,7 +5523,7 @@ static void draw_box(float vec[8][3])
/* uses boundbox, function used by Ketsji */
#if 0
-static void get_local_bounds(Object *ob, float *center, float *size)
+static void get_local_bounds(Object *ob, float center[3], float size[3])
{
BoundBox *bb= object_get_boundbox(ob);
@@ -5890,46 +5960,68 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* which wire color */
if((flag & DRAW_CONSTCOLOR) == 0) {
+ /* confusing logic here, there are 2 methods of setting the color
+ * 'colortab[colindex]' and 'theme_id', colindex overrides theme_id.
+ *
+ * note: no theme yet for 'colindex' */
+ int theme_id= TH_WIRE;
+ int theme_shade= 0;
+
project_short(ar, ob->obmat[3], &base->sx);
- if( (!scene->obedit) && (G.moving & G_TRANSFORM_OBJ) && (base->flag & (SELECT+BA_WAS_SEL))) UI_ThemeColor(TH_TRANSFORM);
+ if( (scene->obedit == NULL) &&
+ (G.moving & G_TRANSFORM_OBJ) &&
+ (base->flag & (SELECT+BA_WAS_SEL)))
+ {
+ theme_id= TH_TRANSFORM;
+ }
else {
-
- if(ob->type==OB_LAMP) UI_ThemeColor(TH_LAMP);
- else if(ob->type==OB_SPEAKER) UI_ThemeColor(TH_SPEAKER);
- else UI_ThemeColor(TH_WIRE);
-
- if((scene->basact)==base) {
- if(base->flag & (SELECT+BA_WAS_SEL)) UI_ThemeColor(TH_ACTIVE);
- }
- else {
- if(base->flag & (SELECT+BA_WAS_SEL)) UI_ThemeColor(TH_SELECT);
- }
-
- // no theme yet
+ /* Sets the 'colindex' */
if(ob->id.lib) {
- if(base->flag & (SELECT+BA_WAS_SEL)) colindex = 4;
- else colindex = 3;
+ colindex= (base->flag & (SELECT+BA_WAS_SEL)) ? 4 : 3;
}
else if(warning_recursive==1) {
if(base->flag & (SELECT+BA_WAS_SEL)) {
- if(scene->basact==base) colindex = 8;
- else colindex= 7;
+ colindex= (scene->basact==base) ? 8 : 7;
}
- else colindex = 6;
- }
- else if(ob->flag & OB_FROMGROUP) {
- if(base->flag & (SELECT+BA_WAS_SEL)) {
- if(scene->basact==base) UI_ThemeColor(TH_GROUP_ACTIVE);
- else UI_ThemeColorShade(TH_GROUP_ACTIVE, -16);
+ else {
+ colindex = 6;
}
- else UI_ThemeColor(TH_GROUP);
- colindex= 0;
}
+ /* Sets the 'theme_id' or fallback to wire */
+ else {
+ if(ob->flag & OB_FROMGROUP) {
+ if(base->flag & (SELECT+BA_WAS_SEL)) {
+ /* uses darker active color for non-active + selected*/
+ theme_id= TH_GROUP_ACTIVE;
- }
+ if(scene->basact != base) {
+ theme_shade= -16;
+ }
+ }
+ else {
+ theme_id= TH_GROUP;
+ }
+ }
+ else {
+ if(base->flag & (SELECT+BA_WAS_SEL)) {
+ theme_id= scene->basact == base ? TH_ACTIVE : TH_SELECT;
+ }
+ else {
+ if(ob->type==OB_LAMP) theme_id= TH_LAMP;
+ else if(ob->type==OB_SPEAKER) theme_id= TH_SPEAKER;
+ /* fallback to TH_WIRE */
+ }
+ }
+ }
+ }
- if(colindex) {
+ /* finally set the color */
+ if(colindex == 0) {
+ if(theme_shade == 0) UI_ThemeColor(theme_id);
+ else UI_ThemeColorShade(theme_id, theme_shade);
+ }
+ else {
col= colortab[colindex];
cpack(col);
}
@@ -6014,7 +6106,6 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
}
if (cu->linewidth != 0.0f) {
- cpack(0xff44ff);
UI_ThemeColor(TH_WIRE);
copy_v3_v3(vec1, ob->orig);
copy_v3_v3(vec2, ob->orig);
@@ -6033,10 +6124,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
setlinestyle(3);
for (i=0; i<cu->totbox; i++) {
if (cu->tb[i].w != 0.0f) {
- if (i == (cu->actbox-1))
- UI_ThemeColor(TH_ACTIVE);
- else
- UI_ThemeColor(TH_WIRE);
+ UI_ThemeColor(i == (cu->actbox-1) ? TH_ACTIVE : TH_WIRE);
vec1[0] = (cu->xof * cu->fsize) + cu->tb[i].x;
vec1[1] = (cu->yof * cu->fsize) + cu->tb[i].y + cu->fsize;
vec1[2] = 0.001;
@@ -6096,7 +6184,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
cu= ob->data;
if(cu->editnurb) {
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
drawnurb(scene, v3d, rv3d, base, nurbs->first, dt);
}
else if(dt==OB_BOUNDBOX) {
@@ -6512,6 +6600,32 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
/* ***************** BACKBUF SEL (BBS) ********* */
+static void bbs_obmode_mesh_verts__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
+{
+ struct {void* offset; MVert *mvert;} *data = userData;
+ MVert *mv = &data->mvert[index];
+ int offset = (intptr_t) data->offset;
+
+ if (!(mv->flag & ME_HIDE)) {
+ WM_set_framebuffer_index_color(offset+index);
+ bglVertex3fv(co);
+ }
+}
+
+static void bbs_obmode_mesh_verts(Object *ob, DerivedMesh *dm, int offset)
+{
+ struct {void* offset; struct MVert *mvert;} data;
+ Mesh *me = ob->data;
+ MVert *mvert = me->mvert;
+ data.mvert = mvert;
+ data.offset = (void*)(intptr_t) offset;
+ glPointSize( UI_GetThemeValuef(TH_VERTEX_SIZE) );
+ bglBegin(GL_POINTS);
+ dm->foreachMappedVert(dm, bbs_obmode_mesh_verts__mapFunc, &data);
+ bglEnd();
+ glPointSize(1.0);
+}
+
static void bbs_mesh_verts__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
{
int offset = (intptr_t) userData;
@@ -6610,6 +6724,17 @@ static int bbs_mesh_solid_hide__setDrawOpts(void *userData, int index, int *UNUS
}
}
+// must have called WM_set_framebuffer_index_color beforehand
+static int bbs_mesh_solid_hide2__setDrawOpts(void *userData, int index, int *UNUSED(drawSmooth_r))
+{
+ Mesh *me = userData;
+
+ if (!(me->mface[index].flag & ME_HIDE)) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
static void bbs_mesh_solid(Scene *scene, Object *ob)
{
DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask);
@@ -6668,7 +6793,21 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
EM_free_index_arrays();
}
else {
- bbs_mesh_solid(scene, ob);
+ Mesh *me= ob->data;
+ if(me->editflag & ME_EDIT_VERT_SEL) {
+ DerivedMesh *dm = mesh_get_derived_final(scene, ob, scene->customdata_mask);
+ glColor3ub(0, 0, 0);
+
+ dm->drawMappedFaces(dm, bbs_mesh_solid_hide2__setDrawOpts, me, 0, GPU_enable_material, NULL);
+
+
+ bbs_obmode_mesh_verts(ob, dm, 1);
+ em_vertoffs = me->totvert+1;
+ dm->release(dm);
+ }
+ else {
+ bbs_mesh_solid(scene, ob);
+ }
}
break;
case OB_CURVE:
diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c
index acdbcb0d06d..e87ace19edb 100644
--- a/source/blender/editors/space_view3d/drawvolume.c
+++ b/source/blender/editors/space_view3d/drawvolume.c
@@ -154,10 +154,10 @@ static int convex(float *p0, float *up, float *a, float *b)
{
// Vec3 va = a-p0, vb = b-p0;
float va[3], vb[3], tmp[3];
- VECSUB(va, a, p0);
- VECSUB(vb, b, p0);
+ sub_v3_v3v3(va, a, p0);
+ sub_v3_v3v3(vb, b, p0);
cross_v3_v3v3(tmp, va, vb);
- return INPR(up, tmp) >= 0;
+ return dot_v3v3(up, tmp) >= 0;
}
// copied from gpu_extension.c
@@ -183,7 +183,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
float viewnormal[3];
int i, j, n, good_index;
- float d, d0, dd, ds;
+ float d /*, d0 */ /* UNUSED */, dd, ds;
float *points = NULL;
int numpoints = 0;
float cor[3] = {1.,1.,1.};
@@ -280,20 +280,20 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
cv[7][1] = min[1];
cv[7][2] = min[2];
- VECCOPY(edges[0][0], cv[4]); // maxx, maxy, minz
- VECCOPY(edges[1][0], cv[5]); // minx, maxy, minz
- VECCOPY(edges[2][0], cv[6]); // minx, miny, minz
- VECCOPY(edges[3][0], cv[7]); // maxx, miny, minz
+ copy_v3_v3(edges[0][0], cv[4]); // maxx, maxy, minz
+ copy_v3_v3(edges[1][0], cv[5]); // minx, maxy, minz
+ copy_v3_v3(edges[2][0], cv[6]); // minx, miny, minz
+ copy_v3_v3(edges[3][0], cv[7]); // maxx, miny, minz
- VECCOPY(edges[4][0], cv[3]); // maxx, miny, maxz
- VECCOPY(edges[5][0], cv[2]); // minx, miny, maxz
- VECCOPY(edges[6][0], cv[6]); // minx, miny, minz
- VECCOPY(edges[7][0], cv[7]); // maxx, miny, minz
+ copy_v3_v3(edges[4][0], cv[3]); // maxx, miny, maxz
+ copy_v3_v3(edges[5][0], cv[2]); // minx, miny, maxz
+ copy_v3_v3(edges[6][0], cv[6]); // minx, miny, minz
+ copy_v3_v3(edges[7][0], cv[7]); // maxx, miny, minz
- VECCOPY(edges[8][0], cv[1]); // minx, maxy, maxz
- VECCOPY(edges[9][0], cv[2]); // minx, miny, maxz
- VECCOPY(edges[10][0], cv[6]); // minx, miny, minz
- VECCOPY(edges[11][0], cv[5]); // minx, maxy, minz
+ copy_v3_v3(edges[8][0], cv[1]); // minx, maxy, maxz
+ copy_v3_v3(edges[9][0], cv[2]); // minx, miny, maxz
+ copy_v3_v3(edges[10][0], cv[6]); // minx, miny, minz
+ copy_v3_v3(edges[11][0], cv[5]); // minx, maxy, minz
// printf("size x: %f, y: %f, z: %f\n", size[0], size[1], size[2]);
// printf("min[2]: %f, max[2]: %f\n", min[2], max[2]);
@@ -332,7 +332,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
*/
// get view vector
- VECCOPY(viewnormal, rv3d->viewinv[2]);
+ copy_v3_v3(viewnormal, rv3d->viewinv[2]);
normalize_v3(viewnormal);
// find cube vertex that is closest to the viewer
@@ -390,7 +390,8 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
// (a,b,c), the plane normal, are given by viewdir
// d is the parameter along the view direction. the first d is given by
// inserting previously found vertex into the plane equation
- d0 = (viewnormal[0]*cv[i][0] + viewnormal[1]*cv[i][1] + viewnormal[2]*cv[i][2]);
+
+ /* d0 = (viewnormal[0]*cv[i][0] + viewnormal[1]*cv[i][1] + viewnormal[2]*cv[i][2]); */ /* UNUSED */
ds = (ABS(viewnormal[0])*size[0] + ABS(viewnormal[1])*size[1] + ABS(viewnormal[2])*size[2]);
dd = 0.05; // ds/512.0f;
n = 0;
@@ -407,10 +408,10 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
if(dd*(float)n > ds)
break;
- VECCOPY(tmp_point, viewnormal);
+ copy_v3_v3(tmp_point, viewnormal);
mul_v3_fl(tmp_point, -dd*((ds/dd)-(float)n));
- VECADD(tmp_point2, cv[good_index], tmp_point);
- d = INPR(tmp_point2, viewnormal);
+ add_v3_v3v3(tmp_point2, cv[good_index], tmp_point);
+ d = dot_v3v3(tmp_point2, viewnormal);
// printf("my d: %f\n", d);
@@ -421,7 +422,7 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
// printf("points: %d\n", numpoints);
if (numpoints > 2) {
- VECCOPY(p0, points);
+ copy_v3_v3(p0, points);
// sort points to get a convex polygon
for(i = 1; i < numpoints - 1; i++)
@@ -431,9 +432,9 @@ void draw_volume(ARegion *ar, GPUTexture *tex, float *min, float *max, int res[3
if(!convex(p0, viewnormal, &points[j * 3], &points[i * 3]))
{
float tmp2[3];
- VECCOPY(tmp2, &points[j * 3]);
- VECCOPY(&points[j * 3], &points[i * 3]);
- VECCOPY(&points[i * 3], tmp2);
+ copy_v3_v3(tmp2, &points[j * 3]);
+ copy_v3_v3(&points[j * 3], &points[i * 3]);
+ copy_v3_v3(&points[i * 3], tmp2);
}
}
}
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 6833dec2e43..c46b6b6d70b 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -371,6 +371,10 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar)
keymap= WM_keymap_find(wm->defaultconf, "Face Mask", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
+
+ keymap= WM_keymap_find(wm->defaultconf, "Weight Paint Vertex Selection", 0, 0);
+ WM_event_add_keymap_handler(&ar->handlers, keymap);
+
/* pose is not modal, operator poll checks for this */
keymap= WM_keymap_find(wm->defaultconf, "Pose", 0, 0);
WM_event_add_keymap_handler(&ar->handlers, keymap);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 6e03866153f..6c69e816b30 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -210,7 +210,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
BPoint *bp;
BezTriple *bezt;
int a;
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
nu= nurbs->first;
while(nu) {
@@ -457,7 +457,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
BPoint *bp;
BezTriple *bezt;
int a;
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
nu= nurbs->first;
while(nu) {
@@ -887,9 +887,9 @@ static void v3d_posearmature_buts(uiLayout *layout, Object *ob)
quat_to_eul( tfp->ob_eul,pchan->quat);
else
copy_v3_v3(tfp->ob_eul, pchan->eul);
- tfp->ob_eul[0]*= 180.0/M_PI;
- tfp->ob_eul[1]*= 180.0/M_PI;
- tfp->ob_eul[2]*= 180.0/M_PI;
+ tfp->ob_eul[0]*= RAD2DEGF(1.0f);
+ tfp->ob_eul[1]*= RAD2DEGF(1.0f);
+ tfp->ob_eul[2]*= RAD2DEGF(1.0f);
uiDefBut(block, LABEL, 0, "Location:", 0, 240, 100, 20, 0, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
@@ -1097,9 +1097,9 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
if (!pchan) return;
/* make a copy to eul[3], to allow TAB on buttons to work */
- eul[0]= (float)M_PI*tfp->ob_eul[0]/180.0f;
- eul[1]= (float)M_PI*tfp->ob_eul[1]/180.0f;
- eul[2]= (float)M_PI*tfp->ob_eul[2]/180.0f;
+ eul[0]= DEG2RADF(tfp->ob_eul[0]);
+ eul[1]= DEG2RADF(tfp->ob_eul[1]);
+ eul[2]= DEG2RADF(tfp->ob_eul[2]);
if (pchan->rotmode == ROT_MODE_AXISANGLE) {
float quat[4];
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 98768e369cb..ba9faf7682e 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -150,20 +150,22 @@ void circ(float x, float y, float rad)
static void view3d_draw_clipping(RegionView3D *rv3d)
{
BoundBox *bb= rv3d->clipbb;
-
+
if(bb) {
+ static unsigned int clipping_index[6][4]= {{0, 1, 2, 3},
+ {0, 4, 5, 1},
+ {4, 7, 6, 5},
+ {7, 3, 2, 6},
+ {1, 5, 6, 2},
+ {7, 4, 0, 3}};
+
UI_ThemeColorShade(TH_BACK, -8);
-
- glBegin(GL_QUADS);
-
- glVertex3fv(bb->vec[0]); glVertex3fv(bb->vec[1]); glVertex3fv(bb->vec[2]); glVertex3fv(bb->vec[3]);
- glVertex3fv(bb->vec[0]); glVertex3fv(bb->vec[4]); glVertex3fv(bb->vec[5]); glVertex3fv(bb->vec[1]);
- glVertex3fv(bb->vec[4]); glVertex3fv(bb->vec[7]); glVertex3fv(bb->vec[6]); glVertex3fv(bb->vec[5]);
- glVertex3fv(bb->vec[7]); glVertex3fv(bb->vec[3]); glVertex3fv(bb->vec[2]); glVertex3fv(bb->vec[6]);
- glVertex3fv(bb->vec[1]); glVertex3fv(bb->vec[5]); glVertex3fv(bb->vec[6]); glVertex3fv(bb->vec[2]);
- glVertex3fv(bb->vec[7]); glVertex3fv(bb->vec[4]); glVertex3fv(bb->vec[0]); glVertex3fv(bb->vec[3]);
-
- glEnd();
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, bb->vec);
+ glDrawElements(GL_QUADS, sizeof(clipping_index)/sizeof(unsigned int), GL_UNSIGNED_INT, clipping_index);
+ glDisableClientState(GL_VERTEX_ARRAY);
+
}
}
@@ -194,11 +196,11 @@ static int test_clipping(const float vec[3], float clip[][4])
{
float view[3];
copy_v3_v3(view, vec);
-
- if(0.0f < clip[0][3] + INPR(view, clip[0]))
- if(0.0f < clip[1][3] + INPR(view, clip[1]))
- if(0.0f < clip[2][3] + INPR(view, clip[2]))
- if(0.0f < clip[3][3] + INPR(view, clip[3]))
+
+ if(0.0f < clip[0][3] + dot_v3v3(view, clip[0]))
+ if(0.0f < clip[1][3] + dot_v3v3(view, clip[1]))
+ if(0.0f < clip[2][3] + dot_v3v3(view, clip[2]))
+ if(0.0f < clip[3][3] + dot_v3v3(view, clip[3]))
return 0;
return 1;
@@ -216,36 +218,37 @@ int ED_view3d_test_clipping(RegionView3D *rv3d, const float vec[3], const int lo
static void drawgrid_draw(ARegion *ar, float wx, float wy, float x, float y, float dx)
{
- float v1[2], v2[2];
+ float verts[2][2];
x+= (wx);
y+= (wy);
- v1[1]= 0.0f;
- v2[1]= (float)ar->winy;
+ /* set fixed 'Y' */
+ verts[0][1]= 0.0f;
+ verts[1][1]= (float)ar->winy;
- v1[0] = v2[0] = x-dx*floorf(x/dx);
-
- glBegin(GL_LINES);
-
- while(v1[0] < ar->winx) {
- glVertex2fv(v1);
- glVertex2fv(v2);
- v1[0] = v2[0] = v1[0] + dx;
- }
+ /* iter over 'X' */
+ verts[0][0] = verts[1][0] = x-dx*floorf(x/dx);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(2, GL_FLOAT, 0, verts);
- v1[0]= 0.0f;
- v2[0]= (float)ar->winx;
+ while(verts[0][0] < ar->winx) {
+ glDrawArrays(GL_LINES, 0, 2);
+ verts[0][0] = verts[1][0] = verts[0][0] + dx;
+ }
- v1[1]= v2[1]= y-dx*floorf(y/dx);
+ /* set fixed 'X' */
+ verts[0][0]= 0.0f;
+ verts[1][0]= (float)ar->winx;
- while(v1[1] < ar->winy) {
- glVertex2fv(v1);
- glVertex2fv(v2);
- v1[1] = v2[1] = v1[1] + dx;
+ /* iter over 'Y' */
+ verts[0][1]= verts[1][1]= y-dx*floorf(y/dx);
+ while(verts[0][1] < ar->winy) {
+ glDrawArrays(GL_LINES, 0, 2);
+ verts[0][1] = verts[1][1] = verts[0][1] + dx;
}
- glEnd();
+ glDisableClientState(GL_VERTEX_ARRAY);
}
#define GRID_MIN_PX 6.0f
@@ -425,13 +428,10 @@ static void drawgrid(UnitSettings *unit, ARegion *ar, View3D *v3d, const char **
static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit)
{
- float vert[3], grid, grid_scale;
- int a, gridlines, emphasise;
- unsigned char col[3], col2[3];
- short draw_line = 0;
-
- vert[2]= 0.0;
-
+ float grid, grid_scale;
+ unsigned char col_grid[3];
+ const int gridlines= v3d->gridlines/2;
+
if(v3d->gridlines<3) return;
grid_scale= v3d->grid;
@@ -450,115 +450,81 @@ static void drawfloor(Scene *scene, View3D *v3d, const char **grid_unit)
grid_scale = (grid_scale * (float)bUnit_GetScaler(usys, i)) / scene->unit.scale_length;
}
}
-
- if(v3d->zbuf && scene->obedit) glDepthMask(0); // for zbuffer-select
-
- gridlines= v3d->gridlines/2;
+
grid= gridlines * grid_scale;
- UI_GetThemeColor3ubv(TH_GRID, col);
- UI_GetThemeColor3ubv(TH_BACK, col2);
-
- /* emphasise division lines lighter instead of darker, if background is darker than grid */
- if ( ((col[0]+col[1]+col[2])/3+10) > (col2[0]+col2[1]+col2[2])/3 )
- emphasise = 20;
- else
- emphasise = -10;
-
+ if(v3d->zbuf && scene->obedit) glDepthMask(0); // for zbuffer-select
+
+ UI_GetThemeColor3ubv(TH_GRID, col_grid);
+
/* draw the Y axis and/or grid lines */
- for(a= -gridlines;a<=gridlines;a++) {
- if(a==0) {
- /* check for the 'show Y axis' preference */
- if (v3d->gridflag & V3D_SHOW_Y) {
- UI_make_axis_color(col, col2, 'Y');
- glColor3ubv(col2);
-
- draw_line = 1;
- } else if (v3d->gridflag & V3D_SHOW_FLOOR) {
- UI_ThemeColorShade(TH_GRID, emphasise);
- } else {
- draw_line = 0;
+ if(v3d->gridflag & V3D_SHOW_FLOOR) {
+ float vert[4][3]= {{0.0f}};
+ unsigned char col_bg[3];
+ unsigned char col_grid_emphasise[3], col_grid_light[3];
+ int a;
+ int prev_emphasise= -1;
+
+ UI_GetThemeColor3ubv(TH_BACK, col_bg);
+
+ /* emphasise division lines lighter instead of darker, if background is darker than grid */
+ UI_GetColorPtrShade3ubv(col_grid, col_grid_light, 10);
+ UI_GetColorPtrShade3ubv(col_grid, col_grid_emphasise,
+ (((col_grid[0]+col_grid[1]+col_grid[2])+30) > (col_bg[0]+col_bg[1]+col_bg[2])) ? 20 : -10);
+
+ /* set fixed axis */
+ vert[0][0]= vert[2][1]= grid;
+ vert[1][0]= vert[3][1]= -grid;
+
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glVertexPointer(3, GL_FLOAT, 0, vert);
+
+ for(a= -gridlines;a<=gridlines;a++) {
+ const float line= a * grid_scale;
+ const int is_emphasise= (a % 10) == 0;
+
+ if(is_emphasise != prev_emphasise) {
+ glColor3ubv(is_emphasise ? col_grid_emphasise : col_grid_light);
+ prev_emphasise= is_emphasise;
}
- } else {
- /* check for the 'show grid floor' preference */
- if (v3d->gridflag & V3D_SHOW_FLOOR) {
- if( (a % 10)==0) {
- UI_ThemeColorShade(TH_GRID, emphasise);
- }
- else UI_ThemeColorShade(TH_GRID, 10);
-
- draw_line = 1;
- } else {
- draw_line = 0;
- }
- }
-
- if (draw_line) {
- glBegin(GL_LINE_STRIP);
- vert[0]= a * grid_scale;
- vert[1]= grid;
- glVertex3fv(vert);
- vert[1]= -grid;
- glVertex3fv(vert);
- glEnd();
+
+ /* set variable axis */
+ vert[0][1]= vert[1][1]=
+ vert[2][0]= vert[3][0]= line;
+
+ glDrawArrays(GL_LINES, 0, 4);
}
+
+ glDisableClientState(GL_VERTEX_ARRAY);
+
+ GPU_print_error("sdsd");
}
- /* draw the X axis and/or grid lines */
- for(a= -gridlines;a<=gridlines;a++) {
- if(a==0) {
- /* check for the 'show X axis' preference */
- if (v3d->gridflag & V3D_SHOW_X) {
- UI_make_axis_color(col, col2, 'X');
- glColor3ubv(col2);
-
- draw_line = 1;
- } else if (v3d->gridflag & V3D_SHOW_FLOOR) {
- UI_ThemeColorShade(TH_GRID, emphasise);
- } else {
- draw_line = 0;
- }
- } else {
- /* check for the 'show grid floor' preference */
- if (v3d->gridflag & V3D_SHOW_FLOOR) {
- if( (a % 10)==0) {
- UI_ThemeColorShade(TH_GRID, emphasise);
- }
- else UI_ThemeColorShade(TH_GRID, 10);
-
- draw_line = 1;
- } else {
- draw_line = 0;
- }
- }
-
- if (draw_line) {
+ /* draw the Z axis line */
+ /* check for the 'show Z axis' preference */
+ if (v3d->gridflag & (V3D_SHOW_X | V3D_SHOW_Y | V3D_SHOW_Z)) {
+ int axis;
+ for(axis= 0; axis < 3; axis++)
+ if (v3d->gridflag & (V3D_SHOW_X << axis)) {
+ float vert[3];
+ unsigned char tcol[3];
+
+ UI_make_axis_color(col_grid, tcol, 'X' + axis);
+ glColor3ubv(tcol);
+
glBegin(GL_LINE_STRIP);
- vert[1]= a * grid_scale;
- vert[0]= grid;
+ zero_v3(vert);
+ vert[axis]= grid;
glVertex3fv(vert );
- vert[0]= -grid;
+ vert[axis]= -grid;
glVertex3fv(vert);
glEnd();
}
}
-
- /* draw the Z axis line */
- /* check for the 'show Z axis' preference */
- if (v3d->gridflag & V3D_SHOW_Z) {
- UI_make_axis_color(col, col2, 'Z');
- glColor3ubv(col2);
-
- glBegin(GL_LINE_STRIP);
- vert[0]= 0;
- vert[1]= 0;
- vert[2]= grid;
- glVertex3fv(vert );
- vert[2]= -grid;
- glVertex3fv(vert);
- glEnd();
- }
-
+
+
+
+
if(v3d->zbuf && scene->obedit) glDepthMask(1);
}
@@ -697,60 +663,63 @@ static void draw_rotation_guide(RegionView3D *rv3d)
float scaled_axis[3];
const float scale = rv3d->dist;
mul_v3_v3fl(scaled_axis, rv3d->rot_axis, scale);
-
+
+
glBegin(GL_LINE_STRIP);
- color[3] = 0.f; // more transparent toward the ends
- glColor4fv(color);
- add_v3_v3v3(end, o, scaled_axis);
- glVertex3fv(end);
-
- // color[3] = 0.2f + fabsf(rv3d->rot_angle); // modulate opacity with angle
- // ^^ neat idea, but angle is frame-rate dependent, so it's usually close to 0.2
+ color[3] = 0.f; // more transparent toward the ends
+ glColor4fv(color);
+ add_v3_v3v3(end, o, scaled_axis);
+ glVertex3fv(end);
- color[3] = 0.5f; // more opaque toward the center
- glColor4fv(color);
- glVertex3fv(o);
-
- color[3] = 0.f;
- glColor4fv(color);
- sub_v3_v3v3(end, o, scaled_axis);
- glVertex3fv(end);
+ // color[3] = 0.2f + fabsf(rv3d->rot_angle); // modulate opacity with angle
+ // ^^ neat idea, but angle is frame-rate dependent, so it's usually close to 0.2
+
+ color[3] = 0.5f; // more opaque toward the center
+ glColor4fv(color);
+ glVertex3fv(o);
+
+ color[3] = 0.f;
+ glColor4fv(color);
+ sub_v3_v3v3(end, o, scaled_axis);
+ glVertex3fv(end);
glEnd();
// -- draw ring around rotation center --
{
- #define ROT_AXIS_DETAIL 13
- const float s = 0.05f * scale;
- const float step = 2.f * (float)(M_PI / ROT_AXIS_DETAIL);
- float angle;
- int i;
-
- float q[4]; // rotate ring so it's perpendicular to axis
- const int upright = fabsf(rv3d->rot_axis[2]) >= 0.95f;
- if (!upright)
- {
- const float up[3] = {0.f, 0.f, 1.f};
- float vis_angle, vis_axis[3];
-
- cross_v3_v3v3(vis_axis, up, rv3d->rot_axis);
- vis_angle = acosf(dot_v3v3(up, rv3d->rot_axis));
- axis_angle_to_quat(q, vis_axis, vis_angle);
+#define ROT_AXIS_DETAIL 13
+
+ const float s = 0.05f * scale;
+ const float step = 2.f * (float)(M_PI / ROT_AXIS_DETAIL);
+ float angle;
+ int i;
+
+ float q[4]; // rotate ring so it's perpendicular to axis
+ const int upright = fabsf(rv3d->rot_axis[2]) >= 0.95f;
+ if (!upright) {
+ const float up[3] = {0.f, 0.f, 1.f};
+ float vis_angle, vis_axis[3];
+
+ cross_v3_v3v3(vis_axis, up, rv3d->rot_axis);
+ vis_angle = acosf(dot_v3v3(up, rv3d->rot_axis));
+ axis_angle_to_quat(q, vis_axis, vis_angle);
}
- color[3] = 0.25f; // somewhat faint
- 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.f };
+ color[3] = 0.25f; // somewhat faint
+ 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};
- if (!upright)
- mul_qt_v3(q, p);
+ if (!upright) {
+ mul_qt_v3(q, p);
+ }
- add_v3_v3(p, o);
- glVertex3fv(p);
+ add_v3_v3(p, o);
+ glVertex3fv(p);
}
- glEnd();
+ glEnd();
+
+#undef ROT_AXIS_DETAIL
}
color[3] = 1.f; // solid dot
@@ -1237,7 +1206,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
UI_ThemeColorBlendShade(TH_WIRE, TH_BACK, 0.25, 0);
- uiSetRoundBox(15);
+ uiSetRoundBox(UI_CNR_ALL);
uiDrawBox(GL_LINE_LOOP, x1, y1, x2, y2, 12.0);
}
}
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 19e8d42db2d..0854f9f3685 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1017,18 +1017,26 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event
if (has_rotation) {
- const int invert = U.ndof_flag & NDOF_ORBIT_INVERT_AXES;
-
rv3d->view = RV3D_VIEW_USER;
if (U.flag & USER_TRACKBALL) {
+ const int invert_roll = U.ndof_flag & NDOF_ROLL_INVERT_AXIS;
+ const int invert_tilt = U.ndof_flag & NDOF_TILT_INVERT_AXIS;
+ const int invert_rot = U.ndof_flag & NDOF_ROTATE_INVERT_AXIS;
+
float rot[4];
float axis[3];
float angle = rot_sensitivity * ndof_to_axis_angle(ndof, axis);
-
- if (invert)
- angle = -angle;
-
+
+ if (invert_roll)
+ axis[2] = -axis[2];
+
+ if (invert_tilt)
+ axis[0] = -axis[0];
+
+ if (invert_rot)
+ axis[1] = -axis[1];
+
// transform rotation axis from view to world coordinates
mul_qt_v3(view_inv, axis);
@@ -1042,6 +1050,8 @@ static int ndof_orbit_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event
mul_qt_qtqt(rv3d->viewquat, rv3d->viewquat, rot);
} else {
/* turntable view code by John Aughey, adapted for 3D mouse by [mce] */
+ const int invert = U.ndof_flag & NDOF_ORBIT_INVERT_AXES;
+
float angle, rot[4];
float xvec[3] = {1,0,0};
@@ -1087,7 +1097,7 @@ void VIEW3D_OT_ndof_orbit(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "NDOF Orbit View";
- ot->description = "Explore every angle of an object using the 3D mouse.";
+ ot->description = "Explore every angle of an object using the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_orbit";
/* api callbacks */
@@ -1143,10 +1153,26 @@ static int ndof_pan_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
const float vertical_sensitivity = 0.4f;
const float lateral_sensitivity = 0.6f;
- float pan_vec[3] = {lateral_sensitivity * ndof->tvec[0],
- vertical_sensitivity * ndof->tvec[1],
- forward_sensitivity * ndof->tvec[2]
- };
+ const int invert_panx = U.ndof_flag & NDOF_PANX_INVERT_AXIS;
+ const int invert_pany = U.ndof_flag & NDOF_PANY_INVERT_AXIS;
+ const int invert_panz = U.ndof_flag & NDOF_PANZ_INVERT_AXIS;
+
+ float pan_vec[3];
+
+ if (invert_panx)
+ pan_vec[0] = -lateral_sensitivity * ndof->tvec[0];
+ else
+ pan_vec[0] = lateral_sensitivity * ndof->tvec[0];
+
+ if (invert_panz)
+ pan_vec[1] = -vertical_sensitivity * ndof->tvec[1];
+ else
+ pan_vec[1] = vertical_sensitivity * ndof->tvec[1];
+
+ if (invert_pany)
+ pan_vec[2] = -forward_sensitivity * ndof->tvec[2];
+ else
+ pan_vec[2] = forward_sensitivity * ndof->tvec[2];
mul_v3_fl(pan_vec, speed * dt);
#endif
@@ -1170,7 +1196,7 @@ void VIEW3D_OT_ndof_pan(struct wmOperatorType *ot)
{
/* identifiers */
ot->name = "NDOF Pan View";
- ot->description = "Position your viewpoint with the 3D mouse.";
+ ot->description = "Position your viewpoint with the 3D mouse";
ot->idname = "VIEW3D_OT_ndof_pan";
/* api callbacks */
@@ -2216,7 +2242,7 @@ void VIEW3D_OT_view_center_cursor(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Center View to Cursor";
- ot->description= "Centers the view so that the cursor is in the middle of the view";
+ ot->description= "Center the view so that the cursor is in the middle of the view";
ot->idname= "VIEW3D_OT_view_center_cursor";
/* api callbacks */
@@ -2320,7 +2346,7 @@ void VIEW3D_OT_render_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Render Border";
- ot->description = "Set the boundaries of the border render and enables border render ";
+ ot->description = "Set the boundaries of the border render and enables border render";
ot->idname= "VIEW3D_OT_render_border";
/* api callbacks */
@@ -2547,7 +2573,7 @@ static EnumPropertyItem prop_view_items[] = {
{RV3D_VIEW_RIGHT, "RIGHT", 0, "Right", "View From the Right"},
{RV3D_VIEW_TOP, "TOP", 0, "Top", "View From the Top"},
{RV3D_VIEW_BOTTOM, "BOTTOM", 0, "Bottom", "View From the Bottom"},
- {RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the active amera"},
+ {RV3D_VIEW_CAMERA, "CAMERA", 0, "Camera", "View From the active camera"},
{0, NULL, 0, NULL, NULL}};
@@ -2760,7 +2786,7 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot)
ot->flag= 0;
RNA_def_enum(ot->srna, "type", prop_view_items, 0, "View", "The Type of view");
- RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active objects axis");
+ RNA_def_boolean(ot->srna, "align_active", 0, "Align Active", "Align to the active object's axis");
}
static EnumPropertyItem prop_view_orbit_items[] = {
@@ -2987,7 +3013,7 @@ void VIEW3D_OT_background_image_add(wmOperatorType *ot)
ot->flag = 0;
/* properties */
- RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign.");
+ RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Image name to assign");
RNA_def_string(ot->srna, "filepath", "Path", FILE_MAX, "Filepath", "Path to image file");
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 78dcf6c9a5c..0776ca752a9 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -47,6 +47,8 @@
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_effect.h"
@@ -269,16 +271,29 @@ void VIEW3D_OT_layers(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "toggle", 1, "Toggle", "Toggle the layer");
}
+static int modeselect_addmode(char *str, const char *title, int id, int icon)
+{
+ static char formatstr[] = "|%s %%x%d %%i%d";
+
+ if(UI_translate_iface())
+ return sprintf(str, formatstr, BLF_gettext(title), id, icon);
+ else
+ return sprintf(str, formatstr, title, id, icon);
+}
+
static char *view3d_modeselect_pup(Scene *scene)
{
Object *ob= OBACT;
static char string[256];
- static char formatstr[] = "|%s %%x%d %%i%d";
+ const char *title= N_("Mode: %%t");
char *str = string;
- str += sprintf(str, "Mode: %%t");
+ if(U.transopts&USER_TR_IFACE)
+ title= BLF_gettext(title);
+
+ sprintf(str, title);
- str += sprintf(str, formatstr, "Object Mode", OB_MODE_OBJECT, ICON_OBJECT_DATA);
+ str += modeselect_addmode(str, N_("Object Mode"), OB_MODE_OBJECT, ICON_OBJECT_DATA);
if(ob==NULL || ob->data==NULL) return string;
if(ob->id.lib) return string;
@@ -289,31 +304,31 @@ static char *view3d_modeselect_pup(Scene *scene)
|| (ob->type == OB_CURVE) || (ob->type == OB_SURF) || (ob->type == OB_FONT)
|| (ob->type == OB_MBALL) || (ob->type == OB_LATTICE))) {
- str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT);
+ str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT);
}
else if (ob->type == OB_ARMATURE) {
if (ob->mode & OB_MODE_POSE)
- str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT);
+ str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT|OB_MODE_POSE, ICON_EDITMODE_HLT);
else
- str += sprintf(str, formatstr, "Edit Mode", OB_MODE_EDIT, ICON_EDITMODE_HLT);
+ str += modeselect_addmode(str, N_("Edit Mode"), OB_MODE_EDIT, ICON_EDITMODE_HLT);
}
if (ob->type == OB_MESH) {
- str += sprintf(str, formatstr, "Sculpt Mode", OB_MODE_SCULPT, ICON_SCULPTMODE_HLT);
- str += sprintf(str, formatstr, "Vertex Paint", OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT);
- str += sprintf(str, formatstr, "Texture Paint", OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT);
- str += sprintf(str, formatstr, "Weight Paint", OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT);
+ str += modeselect_addmode(str, N_("Sculpt Mode"), OB_MODE_SCULPT, ICON_SCULPTMODE_HLT);
+ str += modeselect_addmode(str, N_("Vertex Paint"), OB_MODE_VERTEX_PAINT, ICON_VPAINT_HLT);
+ str += modeselect_addmode(str, N_("Texture Paint"), OB_MODE_TEXTURE_PAINT, ICON_TPAINT_HLT);
+ str += modeselect_addmode(str, N_("Weight Paint"), OB_MODE_WEIGHT_PAINT, ICON_WPAINT_HLT);
}
}
/* if active object is an armature */
if (ob->type==OB_ARMATURE) {
- str += sprintf(str, formatstr, "Pose Mode", OB_MODE_POSE, ICON_POSE_HLT);
+ str += modeselect_addmode(str, N_("Pose Mode"), OB_MODE_POSE, ICON_POSE_HLT);
}
if (ob->particlesystem.first || modifiers_findByType(ob, eModifierType_Cloth) || modifiers_findByType(ob, eModifierType_Softbody)) {
- str += sprintf(str, formatstr, "Particle Mode", OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE);
+ str += modeselect_addmode(str, N_("Particle Mode"), OB_MODE_PARTICLE_EDIT, ICON_PARTICLEMODE);
}
(void)str;
return (string);
@@ -455,6 +470,7 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
}
}
+#define TIP_(msgid) UI_translate_do_tooltip(msgid)
void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
{
bScreen *screen= CTX_wm_screen(C);
@@ -488,7 +504,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiBlockBeginAlign(block);
uiDefIconTextButS(block, MENU, B_MODESELECT, object_mode_icon(v3d->modeselect), view3d_modeselect_pup(scene) ,
- 0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, "Mode");
+ 0,0,126 * dpi_fac, UI_UNIT_Y, &(v3d->modeselect), 0, 0, 0, 0, TIP_(N_("Mode")));
uiBlockEndAlign(block);
/* Draw type */
@@ -500,7 +516,15 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
PointerRNA meshptr;
RNA_pointer_create(&ob->id, &RNA_Mesh, ob->data, &meshptr);
- uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+ if(ob->mode & (OB_MODE_TEXTURE_PAINT|OB_MODE_VERTEX_PAINT)) {
+ uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+ }
+ else {
+
+ row= uiLayoutRow(layout, 1);
+ uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+ uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+ }
} else {
const char *str_menu;
@@ -514,11 +538,11 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
block= uiLayoutGetBlock(row);
if(v3d->twflag & V3D_USE_MANIPULATOR) {
- but= uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Translate manipulator mode");
+ but= uiDefIconButBitC(block, TOG, V3D_MANIP_TRANSLATE, B_MAN_TRANS, ICON_MAN_TRANS, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_(N_("Translate manipulator mode")));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
- but= uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Rotate manipulator mode");
+ but= uiDefIconButBitC(block, TOG, V3D_MANIP_ROTATE, B_MAN_ROT, ICON_MAN_ROT, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_(N_("Rotate manipulator mode")));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
- but= uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, "Scale manipulator mode");
+ but= uiDefIconButBitC(block, TOG, V3D_MANIP_SCALE, B_MAN_SCALE, ICON_MAN_SCALE, 0,0,UI_UNIT_X,UI_UNIT_Y, &v3d->twtype, 1.0, 0.0, 0, 0, TIP_(N_("Scale manipulator mode")));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
}
@@ -526,8 +550,8 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
v3d->twmode = 0;
}
- str_menu = BIF_menustringTransformOrientation(C, "Orientation");
- but= uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, "Transform Orientation");
+ str_menu = BIF_menustringTransformOrientation(C, N_("Orientation"));
+ but= uiDefButC(block, MENU, B_MAN_MODE, str_menu,0,0,70 * dpi_fac, UI_UNIT_Y, &v3d->twmode, 0, 0, 0, 0, TIP_(N_("Transform Orientation")));
uiButClearFlag(but, UI_BUT_UNDO); /* skip undo on screen buttons */
MEM_freeN((void *)str_menu);
}
@@ -547,4 +571,4 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
uiTemplateEditModeSelection(layout, C);
}
-
+#undef TIP_
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 65914ead899..1c98397c7f6 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -54,6 +54,11 @@
#include "BLI_linklist.h"
#include "BLI_utildefines.h"
+/* vertex box select */
+#include "IMB_imbuf_types.h"
+#include "IMB_imbuf.h"
+#include "BKE_global.h"
+
#include "BKE_context.h"
#include "BKE_paint.h"
#include "BKE_armature.h"
@@ -198,6 +203,24 @@ static void EM_backbuf_checkAndSelectFaces(EditMesh *em, int select)
}
}
+
+/* object mode, EM_ prefix is confusing here, rename? */
+static void EM_backbuf_checkAndSelectVerts_obmode(Mesh *me, int select)
+{
+ MVert *mv = me->mvert;
+ int a;
+
+ if (mv) {
+ for(a=1; a<=me->totvert; a++, mv++) {
+ if(EM_check_backbuf(a)) {
+ if(!(mv->flag & ME_HIDE)) {
+ mv->flag = select?(mv->flag|SELECT):(mv->flag&~SELECT);
+ }
+ }
+ }
+ }
+}
+/* object mode, EM_ prefix is confusing here, rename? */
static void EM_backbuf_checkAndSelectTFaces(Mesh *me, int select)
{
MFace *mface = me->mface;
@@ -231,7 +254,7 @@ static int view3d_selectable_data(bContext *C)
if (ob->mode & OB_MODE_SCULPT) {
return 0;
}
- if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT) && !paint_facesel_test(ob)) {
+ if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT) && !paint_facesel_test(ob) && !paint_vertsel_test(ob)) {
return 0;
}
}
@@ -727,6 +750,88 @@ static void do_lasso_select_meta(ViewContext *vc, int mcords[][2], short moves,
}
}
+int do_paintvert_box_select(ViewContext *vc, rcti *rect, int select, int extend)
+{
+ Mesh *me;
+ MVert *mvert;
+ struct ImBuf *ibuf;
+ unsigned int *rt;
+ int a, index;
+ char *selar;
+ int sx= rect->xmax-rect->xmin+1;
+ int sy= rect->ymax-rect->ymin+1;
+
+ me= vc->obact->data;
+
+ if(me==NULL || me->totvert==0 || sx*sy <= 0)
+ return OPERATOR_CANCELLED;
+
+ selar= MEM_callocN(me->totvert+1, "selar");
+
+ if (extend == 0 && select)
+ paintvert_deselect_all_visible(vc->obact, SEL_DESELECT, FALSE);
+
+ view3d_validate_backbuf(vc);
+
+ ibuf = IMB_allocImBuf(sx,sy,32,IB_rect);
+ rt = ibuf->rect;
+ glReadPixels(rect->xmin+vc->ar->winrct.xmin, rect->ymin+vc->ar->winrct.ymin, sx, sy, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
+ if(ENDIAN_ORDER==B_ENDIAN) IMB_convert_rgba_to_abgr(ibuf);
+
+ a= sx*sy;
+ while(a--) {
+ if(*rt) {
+ index= WM_framebuffer_to_index(*rt);
+ if(index<=me->totvert) selar[index]= 1;
+ }
+ rt++;
+ }
+
+ mvert= me->mvert;
+ for(a=1; a<=me->totvert; a++, mvert++) {
+ if(selar[a]) {
+ if(mvert->flag & ME_HIDE);
+ else {
+ if(select) mvert->flag |= SELECT;
+ else mvert->flag &= ~SELECT;
+ }
+ }
+ }
+
+ IMB_freeImBuf(ibuf);
+ MEM_freeN(selar);
+
+#ifdef __APPLE__
+ glReadBuffer(GL_BACK);
+#endif
+
+ paintvert_flush_flags(vc->obact);
+
+ return OPERATOR_FINISHED;
+}
+
+static void do_lasso_select_paintvert(ViewContext *vc, int mcords[][2], short moves, short extend, short select)
+{
+ Object *ob= vc->obact;
+ Mesh *me= ob?ob->data:NULL;
+ rcti rect;
+
+ if(me==NULL || me->totvert==0)
+ return;
+
+ if(extend==0 && select)
+ paintvert_deselect_all_visible(ob, SEL_DESELECT, FALSE); /* flush selection at the end */
+ em_vertoffs= me->totvert+1; /* max index array */
+
+ lasso_select_boundbox(&rect, mcords, moves);
+ EM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+
+ EM_backbuf_checkAndSelectVerts_obmode(me, select);
+
+ EM_free_backbuf();
+
+ paintvert_flush_flags(ob);
+}
static void do_lasso_select_paintface(ViewContext *vc, int mcords[][2], short moves, short extend, short select)
{
Object *ob= vc->obact;
@@ -789,6 +894,8 @@ static void view3d_lasso_select(bContext *C, ViewContext *vc, int mcords[][2], s
if(vc->obedit==NULL) { /* Object Mode */
if(paint_facesel_test(ob))
do_lasso_select_paintface(vc, mcords, moves, extend, select);
+ else if(paint_vertsel_test(ob))
+ do_lasso_select_paintvert(vc, mcords, moves, extend, select);
else if(ob && ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT))
;
else if(ob && ob->mode & OB_MODE_PARTICLE_EDIT)
@@ -876,8 +983,8 @@ void VIEW3D_OT_select_lasso(wmOperatorType *ot)
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.");
+ 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");
}
@@ -1798,6 +1905,9 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
else if(vc.obact && paint_facesel_test(vc.obact)) {
ret= do_paintface_box_select(&vc, &rect, select, extend);
}
+ else if(vc.obact && paint_vertsel_test(vc.obact)) {
+ ret= do_paintvert_box_select(&vc, &rect, select, extend);
+ }
else if(vc.obact && vc.obact->mode & OB_MODE_PARTICLE_EDIT) {
ret= PE_border_select(C, &rect, select, extend);
}
@@ -1834,6 +1944,58 @@ void VIEW3D_OT_select_border(wmOperatorType *ot)
WM_operator_properties_gesture_border(ot, TRUE);
}
+/* much like facesel_face_pick()*/
+/* returns 0 if not found, otherwise 1 */
+static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], unsigned int *index, short rect)
+{
+ ViewContext vc;
+ view3d_set_viewcontext(C, &vc);
+
+ if (!me || me->totvert==0)
+ return 0;
+
+ if (rect) {
+ /* sample rect to increase changes of selecting, so that when clicking
+ on an face in the backbuf, we can still select a vert */
+
+ int dist;
+ *index = view3d_sample_backbuf_rect(&vc, mval, 3, 1, me->totvert+1, &dist,0,NULL, NULL);
+ }
+ else {
+ /* sample only on the exact position */
+ *index = view3d_sample_backbuf(&vc, mval[0], mval[1]);
+ }
+
+ if ((*index)<=0 || (*index)>(unsigned int)me->totvert)
+ return 0;
+
+ (*index)--;
+
+ return 1;
+}
+
+/* mouse selection in weight paint */
+/* 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 */
+ unsigned int index = 0;
+ MVert *mv;
+ if(vertsel_vert_pick(C, me, mval, &index, 1)) {
+ mv = me->mvert+index;
+ if(extend) {
+ mv->flag ^= SELECT;
+ } else {
+ paintvert_deselect_all_visible(obact, SEL_DESELECT, FALSE);
+ mv->flag |= SELECT;
+ }
+ paintvert_flush_flags(obact);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data);
+ return 1;
+ }
+ return 0;
+}
+
/* ****** Mouse Select ****** */
@@ -1878,6 +2040,8 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
return PE_mouse_particles(C, event->mval, extend);
else if(obact && paint_facesel_test(obact))
retval = paintface_mouse_select(C, obact, event->mval, extend);
+ else if (paint_vertsel_test(obact))
+ retval = mouse_weight_paint_vertex_select(C, event->mval, extend, obact);
else
retval = mouse_select(C, event->mval, extend, center, enumerate);
@@ -1905,10 +2069,10 @@ void VIEW3D_OT_select(wmOperatorType *ot)
ot->flag= OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first.");
- RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting, in editmode used to extend object selection.");
- RNA_def_boolean(ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only).");
- RNA_def_boolean(ot->srna, "object", 0, "Object", "Use object selection (editmode only).");
+ RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "center", 0, "Center", "Use the object center when selecting, in editmode used to extend object selection");
+ RNA_def_boolean(ot->srna, "enumerate", 0, "Enumerate", "List objects under the mouse (object mode only)");
+ RNA_def_boolean(ot->srna, "object", 0, "Object", "Use object selection (editmode only)");
}
@@ -1992,18 +2156,36 @@ static void paint_facesel_circle_select(ViewContext *vc, int select, const int m
{
Object *ob= vc->obact;
Mesh *me = ob?ob->data:NULL;
- int bbsel;
+ /* int bbsel; */ /* UNUSED */
if (me) {
em_vertoffs= me->totface+1; /* max index array */
- bbsel= EM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0f));
+ /* bbsel= */ /* UNUSED */ EM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0f));
EM_backbuf_checkAndSelectTFaces(me, select==LEFTMOUSE);
EM_free_backbuf();
}
}
+static void paint_vertsel_circle_select(ViewContext *vc, int select, const int mval[2], float rad)
+{
+ Object *ob= vc->obact;
+ Mesh *me = ob?ob->data:NULL;
+ /* int bbsel; */ /* UNUSED */
+ /* struct {ViewContext *vc; short select; int mval[2]; float radius; } data = {NULL}; */ /* UNUSED */
+ if (me) {
+ em_vertoffs= me->totvert+1; /* max index array */
+
+ /* bbsel= */ /* UNUSED */ EM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad+1.0f));
+ EM_backbuf_checkAndSelectVerts_obmode(me, select==LEFTMOUSE);
+ EM_free_backbuf();
+
+ paintvert_flush_flags(ob);
+ }
+}
+
+
static void nurbscurve_circle_doSelect(void *userData, Nurb *UNUSED(nu), BPoint *bp, BezTriple *bezt, int beztindex, int x, int y)
{
struct {ViewContext *vc; short select; int mval[2]; float radius; } *data = userData;
@@ -2258,7 +2440,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
select= (gesture_mode==GESTURE_MODAL_SELECT);
- if( CTX_data_edit_object(C) || paint_facesel_test(obact) ||
+ if( CTX_data_edit_object(C) || paint_facesel_test(obact) || paint_vertsel_test(obact) ||
(obact && (obact->mode & (OB_MODE_PARTICLE_EDIT|OB_MODE_POSE))) )
{
ViewContext vc;
@@ -2278,6 +2460,10 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
paint_facesel_circle_select(&vc, select, mval, (float)radius);
WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data);
}
+ else if(paint_vertsel_test(obact)) {
+ paint_vertsel_circle_select(&vc, select, mval, (float)radius);
+ WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data);
+ }
else if(obact->mode & OB_MODE_POSE)
pose_circle_select(&vc, select, mval, (float)radius);
else
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index b4d2fc22143..1ed65f7875f 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -66,7 +66,7 @@
#include "ED_armature.h"
#include "ED_mesh.h"
#include "ED_screen.h"
-#include "ED_curve.h" /* for ED_curve_editnurbs */
+#include "ED_curve.h" /* for curve_editnurbs */
#include "view3d_intern.h"
@@ -102,7 +102,7 @@ static void special_transvert_update(Object *obedit)
}
else if (ELEM(obedit->type, OB_CURVE, OB_SURF)) {
Curve *cu= obedit->data;
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
Nurb *nu= nurbs->first;
while(nu) {
@@ -312,7 +312,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= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
for(nu= nurbs->first; nu; nu= nu->next) {
if(nu->type == CU_BEZIER)
diff --git a/source/blender/editors/space_view3d/view3d_toolbar.c b/source/blender/editors/space_view3d/view3d_toolbar.c
index a2aed67821d..ddea89e1cdb 100644
--- a/source/blender/editors/space_view3d/view3d_toolbar.c
+++ b/source/blender/editors/space_view3d/view3d_toolbar.c
@@ -48,6 +48,8 @@
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
+#include "BLF_translation.h"
+
#include "BKE_context.h"
#include "BKE_idprop.h"
#include "BKE_global.h"
@@ -80,7 +82,7 @@ static void view3d_panel_operator_redo_header(const bContext *C, Panel *pa)
wmOperator *op= WM_operator_last_redo(C);
if(op) BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname));
- else BLI_strncpy(pa->drawname, "Operator", sizeof(pa->drawname));
+ else BLI_strncpy(pa->drawname, N_("Operator"), sizeof(pa->drawname));
}
static void view3d_panel_operator_redo_operator(const bContext *C, Panel *pa, wmOperator *op)
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 44ae6837aa2..8227ba87021 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -525,8 +525,8 @@ void ED_view3d_win_to_segment_clip(ARegion *ar, View3D *v3d, const float mval[2]
ED_view3d_win_to_vector(ar, mval, vec);
copy_v3_v3(ray_start, rv3d->viewinv[3]);
- VECADDFAC(ray_start, rv3d->viewinv[3], vec, v3d->near);
- VECADDFAC(ray_end, rv3d->viewinv[3], vec, v3d->far);
+ madd_v3_v3v3fl(ray_start, rv3d->viewinv[3], vec, v3d->near);
+ madd_v3_v3v3fl(ray_end, rv3d->viewinv[3], vec, v3d->far);
}
else {
float vec[4];
@@ -537,8 +537,8 @@ void ED_view3d_win_to_segment_clip(ARegion *ar, View3D *v3d, const float mval[2]
mul_m4_v4(rv3d->persinv, vec);
- VECADDFAC(ray_start, vec, rv3d->viewinv[2], 1000.0f);
- VECADDFAC(ray_end, vec, rv3d->viewinv[2], -1000.0f);
+ madd_v3_v3v3fl(ray_start, vec, rv3d->viewinv[2], 1000.0f);
+ madd_v3_v3v3fl(ray_end, vec, rv3d->viewinv[2], -1000.0f);
}
/* clipping */
@@ -1667,7 +1667,7 @@ static void RestoreState(bContext *C, wmWindow *win)
win->queue= queue_back;
GPU_state_init();
- GPU_set_tpage(NULL, 0);
+ GPU_set_tpage(NULL, 0, 0);
glPopAttrib();
}
@@ -1835,7 +1835,7 @@ static int game_engine_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
#else
(void)C; /* unused */
- BKE_report(op->reports, RPT_ERROR, "Game engine is disabled in this build.");
+ BKE_report(op->reports, RPT_ERROR, "Game engine is disabled in this build");
return OPERATOR_CANCELLED;
#endif
}
diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt
index e44cc1f5df3..c4305ed6a9f 100644
--- a/source/blender/editors/transform/CMakeLists.txt
+++ b/source/blender/editors/transform/CMakeLists.txt
@@ -21,6 +21,7 @@
set(INC
../include
+ ../../blenfont
../../blenkernel
../../blenlib
../../blenloader
diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript
index edc2156a07b..f2d5baecfb3 100644
--- a/source/blender/editors/transform/SConscript
+++ b/source/blender/editors/transform/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('*.c')
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../render/extern/include'
incs += ' ../../gpu ../../makesrna ../../blenloader'
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 09507194969..f6b4f32adef 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1091,7 +1091,7 @@ int calculateTransformCenter(bContext *C, int centerMode, float *vec)
calculateCenter(t);
// Copy center from constraint center. Transform center can be local
- VECCOPY(vec, t->con.center);
+ copy_v3_v3(vec, t->con.center);
}
@@ -1210,7 +1210,7 @@ static void drawHelpline(bContext *UNUSED(C), int x, int y, void *customdata)
mval[0]= x;
mval[1]= y;
- VECCOPY(vecrot, t->center);
+ copy_v3_v3(vecrot, t->center);
if(t->flag & T_EDIT) {
Object *ob= t->obedit;
if(ob) mul_m4_v3(ob->obmat, vecrot);
@@ -1678,7 +1678,14 @@ int initTransform(bContext *C, TransInfo *t, wmOperator *op, wmEvent *event, int
if (RNA_property_is_set(op->ptr, "value"))
{
float values[4]= {0}; /* incase value isn't length 4, avoid uninitialized memory */
- RNA_float_get_array(op->ptr, "value", values);
+ PropertyRNA *prop= RNA_struct_find_property(op->ptr, "value");
+
+ if(RNA_property_array_check(prop)) {
+ RNA_float_get_array(op->ptr, "value", values);
+ } else {
+ values[0]= RNA_float_get(op->ptr, "value");
+ }
+
QUATCOPY(t->values, values);
QUATCOPY(t->auto_values, values);
t->flag |= T_AUTOVALUES;
@@ -1956,7 +1963,7 @@ static void constraintTransLim(TransInfo *t, TransData *td)
* - current space should be local
*/
unit_m4(cob.matrix);
- VECCOPY(cob.matrix[3], td->loc);
+ copy_v3_v3(cob.matrix[3], td->loc);
/* Evaluate valid constraints */
for (con= td->con; con; con= con->next) {
@@ -2015,7 +2022,7 @@ static void constraintTransLim(TransInfo *t, TransData *td)
}
/* copy results from cob->matrix */
- VECCOPY(td->loc, cob.matrix[3]);
+ copy_v3_v3(td->loc, cob.matrix[3]);
}
}
@@ -2285,8 +2292,8 @@ int Warp(TransInfo *t, const int UNUSED(mval[2]))
* It needs to be in view space, but we need to take object's offset
* into account if in Edit mode.
*/
- VECCOPY(cursor, curs);
- VECCOPY(gcursor, cursor);
+ copy_v3_v3(cursor, curs);
+ copy_v3_v3(gcursor, cursor);
if (t->flag & T_EDIT) {
sub_v3_v3(cursor, t->obedit->obmat[3]);
sub_v3_v3(gcursor, t->obedit->obmat[3]);
@@ -2329,7 +2336,7 @@ int Warp(TransInfo *t, const int UNUSED(mval[2]))
continue;
/* translate point to center, rotate in such a way that outline==distance */
- VECCOPY(vec, td->iloc);
+ copy_v3_v3(vec, td->iloc);
mul_m3_v3(td->mtx, vec);
mul_m4_v3(t->viewmat, vec);
sub_v3_v3(vec, t->viewmat[3]);
@@ -2596,23 +2603,23 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
/* local constraint shouldn't alter center */
if (t->around == V3D_LOCAL) {
if (t->flag & T_OBJECT) {
- VECCOPY(center, td->center);
+ copy_v3_v3(center, td->center);
}
else if (t->flag & T_EDIT) {
if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
- VECCOPY(center, td->center);
+ copy_v3_v3(center, td->center);
}
else {
- VECCOPY(center, t->center);
+ copy_v3_v3(center, t->center);
}
}
else {
- VECCOPY(center, t->center);
+ copy_v3_v3(center, t->center);
}
}
else {
- VECCOPY(center, t->center);
+ copy_v3_v3(center, t->center);
}
if (td->ext) {
@@ -2712,10 +2719,10 @@ int Resize(TransInfo *t, const int mval[2])
if (t->flag & T_AUTOVALUES)
{
- VECCOPY(size, t->auto_values);
+ copy_v3_v3(size, t->auto_values);
}
- VECCOPY(t->values, size);
+ copy_v3_v3(t->values, size);
size_to_mat3( mat,size);
@@ -3013,7 +3020,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
mul_m3_m3m3(smat, td->smtx, totmat);
/* calculate the total rotatation in eulers */
- VECCOPY(eul, td->ext->irot);
+ copy_v3_v3(eul, td->ext->irot);
eulO_to_mat3( eulmat,eul, td->ext->rotOrder);
/* mat = transform, obmat = bone rotation */
@@ -3023,7 +3030,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* and apply (to end result only) */
protectedRotateBits(td->protectflag, eul, td->ext->irot);
- VECCOPY(td->ext->rot, eul);
+ copy_v3_v3(td->ext->rot, eul);
}
constraintRotLim(t, td);
@@ -3093,7 +3100,7 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
/* and apply */
protectedRotateBits(td->protectflag, eul, td->ext->irot);
- VECCOPY(td->ext->rot, eul);
+ copy_v3_v3(td->ext->rot, eul);
}
constraintRotLim(t, td);
@@ -3237,8 +3244,8 @@ int Trackball(TransInfo *t, const int UNUSED(mval[2]))
float mat[3][3], totmat[3][3], smat[3][3];
float phi[2];
- VECCOPY(axis1, t->persinv[0]);
- VECCOPY(axis2, t->persinv[1]);
+ copy_v3_v3(axis1, t->persinv[0]);
+ copy_v3_v3(axis2, t->persinv[1]);
normalize_v3(axis1);
normalize_v3(axis2);
@@ -3334,7 +3341,7 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) {
else {
float dvec[3];
- VECCOPY(dvec, vec);
+ copy_v3_v3(dvec, vec);
applyAspectRatio(t, dvec);
dist = len_v3(vec);
@@ -3364,10 +3371,10 @@ static void headerTranslation(TransInfo *t, float vec[3], char *str) {
if(chainlen)
sprintf(autoik, "AutoIK-Len: %d", chainlen);
else
- strcpy(autoik, "");
+ autoik[0]= '\0';
}
else
- strcpy(autoik, "");
+ autoik[0]= '\0';
if (t->con.mode & CON_APPLY) {
switch(t->num.idx_max) {
@@ -3441,7 +3448,7 @@ static void applyTranslation(TransInfo *t, float vec[3]) {
t->con.applyVec(t, td, vec, tvec, pvec);
}
else {
- VECCOPY(tvec, vec);
+ copy_v3_v3(tvec, vec);
}
mul_m3_v3(td->smtx, tvec);
@@ -3468,7 +3475,7 @@ int Translation(TransInfo *t, const int UNUSED(mval[2]))
}
applySnapping(t, t->values);
t->con.applyVec(t, NULL, t->values, tvec, pvec);
- VECCOPY(t->values, tvec);
+ copy_v3_v3(t->values, tvec);
headerTranslation(t, pvec, str);
}
else {
@@ -3557,7 +3564,7 @@ int ShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
if (td->flag & TD_SKIP)
continue;
- VECCOPY(vec, td->axismtx[2]);
+ copy_v3_v3(vec, td->axismtx[2]);
mul_v3_fl(vec, distance);
mul_v3_fl(vec, td->factor);
@@ -4253,7 +4260,6 @@ static int createSlideVerts(TransInfo *t)
LinkNode *edgelist = NULL, *vertlist=NULL, *look;
GHash *vertgh;
TransDataSlideVert *tempsv;
- float vertdist; // XXX, projectMat[4][4];
int i, j, numsel, numadded=0, timesthrough = 0, vertsel=0;
/* UV correction vars */
GHash **uvarray= NULL;
@@ -4518,7 +4524,6 @@ static int createSlideVerts(TransInfo *t)
look = vertlist;
nearest = NULL;
- vertdist = -1;
while(look) {
tempsv = BLI_ghash_lookup(vertgh,(EditVert*)look->link);
@@ -4601,7 +4606,7 @@ static int createSlideVerts(TransInfo *t)
add_v3_v3(start, end);
mul_v3_fl(start, 0.5f*(1.0f/totvec));
- VECCOPY(vec, start);
+ copy_v3_v3(vec, start);
start[0] = t->mval[0];
start[1] = t->mval[1];
add_v3_v3v3(end, start, vec);
@@ -5208,7 +5213,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
int i;
/* saving original center */
- VECCOPY(center, t->center);
+ copy_v3_v3(center, t->center);
for(i = 0 ; i < t->total; i++, td++)
{
@@ -5222,11 +5227,11 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
/* around local centers */
if (t->flag & (T_OBJECT|T_POSE)) {
- VECCOPY(t->center, td->center);
+ copy_v3_v3(t->center, td->center);
}
else {
if(t->settings->selectmode & SCE_SELECT_FACE) {
- VECCOPY(t->center, td->center);
+ copy_v3_v3(t->center, td->center);
}
}
@@ -5238,7 +5243,7 @@ int Align(TransInfo *t, const int UNUSED(mval[2]))
}
/* restoring original center */
- VECCOPY(t->center, center);
+ copy_v3_v3(t->center, center);
recalcData(t);
@@ -5310,7 +5315,7 @@ int SeqSlide(TransInfo *t, const int UNUSED(mval[2]))
float pvec[3] = {0.0f, 0.0f, 0.0f};
float tvec[3];
t->con.applyVec(t, NULL, t->values, tvec, pvec);
- VECCOPY(t->values, tvec);
+ copy_v3_v3(t->values, tvec);
}
else {
snapGrid(t, t->values);
@@ -5416,9 +5421,13 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, TransData2D *td2d,
{
/* snap key to nearest frame? */
if (autosnap == SACTSNAP_FRAME) {
+
+#if 0 /* 'doTime' disabled for now */
+
const Scene *scene= t->scene;
const short doTime= 0; //getAnimEdit_DrawTime(t); // NOTE: this works, but may be confusing behaviour given the option's label, hence disabled
const double secf= FPS;
+#endif
double val;
/* convert frame to nla-action time (if needed) */
@@ -5427,11 +5436,17 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, TransData2D *td2d,
else
val= *(td->val);
+#if 0 /* 'doTime' disabled for now */
+
/* do the snapping to nearest frame/second */
- if (doTime)
+ if (doTime) {
val= (float)( floor((val/secf) + 0.5f) * secf );
+ }
else
+#endif
+ {
val= (float)( floor(val+0.5f) );
+ }
/* convert frame out of nla-action time */
if (adt)
@@ -5546,7 +5561,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
const short autosnap= getAnimEdit_SnapMode(t);
- float deltax, val, valprev;
+ float deltax, val /* , valprev */;
/* it doesn't matter whether we apply to t->data or t->data2d, but t->data2d is more convenient */
for (i = 0 ; i < t->total; i++, td++, td2d++) {
@@ -5556,7 +5571,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
*/
AnimData *adt= (t->spacetype != SPACE_NLA) ? td->extra : NULL;
- valprev = *td->val;
+ /* valprev = *td->val; */ /* UNUSED */
/* check if any need to apply nla-mapping */
if (adt && t->spacetype != SPACE_SEQ) {
diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c
index be5f539431f..a06de9fa1ce 100644
--- a/source/blender/editors/transform/transform_constraints.c
+++ b/source/blender/editors/transform/transform_constraints.c
@@ -239,7 +239,7 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
if(factor<0.0f) factor*= -factor;
else factor*= factor;
- VECCOPY(out, axis);
+ copy_v3_v3(out, axis);
normalize_v3(out);
mul_v3_fl(out, -factor); /* -factor makes move down going backwards */
}
@@ -261,7 +261,7 @@ static void axisProjection(TransInfo *t, float axis[3], float in[3], float out[3
/* give arbitrary large value if projection is impossible */
factor = dot_v3v3(axis, norm);
if (1.0f - fabsf(factor) < 0.0002f) {
- VECCOPY(out, axis);
+ copy_v3_v3(out, axis);
if (factor > 0) {
mul_v3_fl(out, 1000000000.0f);
} else {
@@ -300,7 +300,7 @@ static void planeProjection(TransInfo *t, float in[3], float out[3]) {
}
factor = dot_v3v3(vec, vec) / factor;
- VECCOPY(vec, norm);
+ copy_v3_v3(vec, norm);
mul_v3_fl(vec, factor);
add_v3_v3v3(out, in, vec);
@@ -317,7 +317,7 @@ static void planeProjection(TransInfo *t, float in[3], float out[3]) {
static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], float out[3], float pvec[3])
{
- VECCOPY(out, in);
+ copy_v3_v3(out, in);
if (!td && t->con.mode & CON_APPLY) {
mul_m3_v3(t->con.pmtx, out);
@@ -332,13 +332,13 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo
float c[3];
if (t->con.mode & CON_AXIS0) {
- VECCOPY(c, t->con.mtx[0]);
+ copy_v3_v3(c, t->con.mtx[0]);
}
else if (t->con.mode & CON_AXIS1) {
- VECCOPY(c, t->con.mtx[1]);
+ copy_v3_v3(c, t->con.mtx[1]);
}
else if (t->con.mode & CON_AXIS2) {
- VECCOPY(c, t->con.mtx[2]);
+ copy_v3_v3(c, t->con.mtx[2]);
}
axisProjection(t, c, in, out);
}
@@ -360,7 +360,7 @@ static void applyAxisConstraintVec(TransInfo *t, TransData *td, float in[3], flo
static void applyObjectConstraintVec(TransInfo *t, TransData *td, float in[3], float out[3], float pvec[3])
{
- VECCOPY(out, in);
+ copy_v3_v3(out, in);
if (t->con.mode & CON_APPLY) {
if (!td) {
mul_m3_v3(t->con.pmtx, out);
@@ -373,18 +373,18 @@ static void applyObjectConstraintVec(TransInfo *t, TransData *td, float in[3], f
float c[3];
if (t->con.mode & CON_AXIS0) {
- VECCOPY(c, t->con.mtx[0]);
+ copy_v3_v3(c, t->con.mtx[0]);
}
else if (t->con.mode & CON_AXIS1) {
- VECCOPY(c, t->con.mtx[1]);
+ copy_v3_v3(c, t->con.mtx[1]);
}
else if (t->con.mode & CON_AXIS2) {
- VECCOPY(c, t->con.mtx[2]);
+ copy_v3_v3(c, t->con.mtx[2]);
}
axisProjection(t, c, in, out);
}
postConstraintChecks(t, out, pvec);
- VECCOPY(out, pvec);
+ copy_v3_v3(out, pvec);
}
else {
int i=0;
@@ -481,15 +481,15 @@ static void applyAxisConstraintRot(TransInfo *t, TransData *td, float vec[3], fl
switch(mode) {
case CON_AXIS0:
case (CON_AXIS1|CON_AXIS2):
- VECCOPY(vec, t->con.mtx[0]);
+ copy_v3_v3(vec, t->con.mtx[0]);
break;
case CON_AXIS1:
case (CON_AXIS0|CON_AXIS2):
- VECCOPY(vec, t->con.mtx[1]);
+ copy_v3_v3(vec, t->con.mtx[1]);
break;
case CON_AXIS2:
case (CON_AXIS0|CON_AXIS1):
- VECCOPY(vec, t->con.mtx[2]);
+ copy_v3_v3(vec, t->con.mtx[2]);
break;
}
/* don't flip axis if asked to or if num input */
@@ -528,15 +528,15 @@ static void applyObjectConstraintRot(TransInfo *t, TransData *td, float vec[3],
switch(mode) {
case CON_AXIS0:
case (CON_AXIS1|CON_AXIS2):
- VECCOPY(vec, td->axismtx[0]);
+ copy_v3_v3(vec, td->axismtx[0]);
break;
case CON_AXIS1:
case (CON_AXIS0|CON_AXIS2):
- VECCOPY(vec, td->axismtx[1]);
+ copy_v3_v3(vec, td->axismtx[1]);
break;
case CON_AXIS2:
case (CON_AXIS0|CON_AXIS1):
- VECCOPY(vec, td->axismtx[2]);
+ copy_v3_v3(vec, td->axismtx[2]);
break;
}
if (angle && (mode & CON_NOFLIP) == 0 && hasNumInput(&t->num) == 0) {
@@ -724,7 +724,7 @@ void drawPropCircle(const struct bContext *C, TransInfo *t)
glPushMatrix();
- VECCOPY(center, t->center);
+ copy_v3_v3(center, t->center);
if((t->spacetype == SPACE_VIEW3D) && t->obedit)
{
@@ -897,7 +897,7 @@ static void setNearestAxis3d(TransInfo *t)
zfac = len_v3(t->persinv[0]) * 2.0f/t->ar->winx * zfac * 30.0f;
for (i = 0; i<3; i++) {
- VECCOPY(axis, t->con.mtx[i]);
+ copy_v3_v3(axis, t->con.mtx[i]);
mul_v3_fl(axis, zfac);
/* now we can project to get window coordinate */
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 7b43d0955a7..77d2e6e7ff0 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -90,7 +90,6 @@
#include "ED_node.h"
#include "ED_types.h"
#include "ED_uvedit.h"
-#include "ED_curve.h" /* for ED_curve_editnurbs */
#include "ED_util.h" /* for crazyspace correction */
#include "UI_view2d.h"
@@ -269,7 +268,7 @@ static void createTransTexspace(TransInfo *t)
td->ext= t->ext= MEM_callocN(sizeof(TransDataExtension), "TransTexspace");
td->flag= TD_SELECTED;
- VECCOPY(td->center, ob->obmat[3]);
+ copy_v3_v3(td->center, ob->obmat[3]);
td->ob = ob;
copy_m3_m4(td->mtx, ob->obmat);
@@ -282,9 +281,9 @@ static void createTransTexspace(TransInfo *t)
*texflag &= ~AUTOSPACE;
}
- VECCOPY(td->iloc, td->loc);
- VECCOPY(td->ext->irot, td->ext->rot);
- VECCOPY(td->ext->isize, td->ext->size);
+ copy_v3_v3(td->iloc, td->loc);
+ copy_v3_v3(td->ext->irot, td->ext->rot);
+ copy_v3_v3(td->ext->isize, td->ext->size);
}
/* ********************* edge (for crease) ***** */
@@ -420,7 +419,7 @@ static short apply_targetless_ik(Object *ob)
copy_m4_m3(offs_bone, bone->bone_mat);
/* The bone's root offset (is in the parent's coordinate system) */
- VECCOPY(offs_bone[3], bone->head);
+ copy_v3_v3(offs_bone[3], bone->head);
/* Get the length translation of parent (length along y axis) */
offs_bone[3][1]+= parbone->length;
@@ -431,7 +430,7 @@ static short apply_targetless_ik(Object *ob)
copy_m4_m4(rmat, parbone->arm_mat); /* rmat used as temp */
/* the location of actual parent transform */
- VECCOPY(rmat[3], offs_bone[3]);
+ 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]);
@@ -449,7 +448,7 @@ static short apply_targetless_ik(Object *ob)
else {
copy_m4_m3(tmat, bone->bone_mat);
- VECCOPY(tmat[3], bone->head);
+ copy_v3_v3(tmat[3], bone->head);
invert_m4_m4(imat, tmat);
}
/* result matrix */
@@ -491,7 +490,7 @@ static short apply_targetless_ik(Object *ob)
/* causes problems with some constraints (e.g. childof), so disable this */
/* as it is IK shouldn't affect location directly */
- /* VECCOPY(parchan->loc, rmat[3]); */
+ /* copy_v3_v3(parchan->loc, rmat[3]); */
}
}
@@ -511,8 +510,8 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
float cmat[3][3], tmat[3][3];
float vec[3];
- VECCOPY(vec, pchan->pose_mat[3]);
- VECCOPY(td->center, vec);
+ copy_v3_v3(vec, pchan->pose_mat[3]);
+ copy_v3_v3(td->center, vec);
td->ob = ob;
td->flag = TD_SELECTED;
@@ -530,10 +529,10 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->protectflag= pchan->protectflag;
td->loc = pchan->loc;
- VECCOPY(td->iloc, pchan->loc);
+ copy_v3_v3(td->iloc, pchan->loc);
td->ext->size= pchan->size;
- VECCOPY(td->ext->isize, pchan->size);
+ copy_v3_v3(td->ext->isize, pchan->size);
if (pchan->rotmode > 0) {
td->ext->rot= pchan->eul;
@@ -541,7 +540,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ext->rotAngle= NULL;
td->ext->quat= NULL;
- VECCOPY(td->ext->irot, pchan->eul);
+ copy_v3_v3(td->ext->irot, pchan->eul);
}
else if (pchan->rotmode == ROT_MODE_AXISANGLE) {
td->ext->rot= NULL;
@@ -550,7 +549,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
td->ext->quat= NULL;
td->ext->irotAngle= pchan->rotAngle;
- VECCOPY(td->ext->irotAxis, pchan->rotAxis);
+ copy_v3_v3(td->ext->irotAxis, pchan->rotAxis);
}
else {
td->ext->rot= NULL;
@@ -626,7 +625,7 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
else {
// abusive storage of scale in the loc pointer :)
td->loc= &bone->xwidth;
- VECCOPY (td->iloc, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
td->val= NULL;
}
}
@@ -636,13 +635,13 @@ static void add_pose_transdata(TransInfo *t, bPoseChannel *pchan, Object *ob, Tr
bKinematicConstraint *data= has_targetless_ik(pchan);
if(data) {
if(data->flag & CONSTRAINT_IK_TIP) {
- VECCOPY(data->grabtarget, pchan->pose_tail);
+ copy_v3_v3(data->grabtarget, pchan->pose_tail);
}
else {
- VECCOPY(data->grabtarget, pchan->pose_head);
+ copy_v3_v3(data->grabtarget, pchan->pose_head);
}
td->loc = data->grabtarget;
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
data->flag |= CONSTRAINT_IK_AUTO;
/* only object matrix correction */
@@ -885,7 +884,7 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
else
data->flag= CONSTRAINT_IK_TIP;
data->flag |= CONSTRAINT_IK_TEMP|CONSTRAINT_IK_AUTO;
- VECCOPY(data->grabtarget, pchan->pose_tail);
+ copy_v3_v3(data->grabtarget, pchan->pose_tail);
data->rootbone= 0; /* watch-it! has to be 0 here, since we're still on the same bone for the first time through the loop [#25885] */
/* we only include bones that are part of a continual connected chain */
@@ -1001,7 +1000,7 @@ static void createTransPose(TransInfo *t, Object *ob)
if (arm->flag & ARM_RESTPOS) {
if (ELEM(t->mode, TFM_DUMMY, TFM_BONESIZE)==0) {
// XXX use transform operator reports
- // BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled.");
+ // BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled");
return;
}
}
@@ -1039,7 +1038,7 @@ static void createTransPose(TransInfo *t, Object *ob)
if(td != (t->data+t->total)) {
// XXX use transform operator reports
- // BKE_report(op->reports, RPT_DEBUG, "Bone selection count error.");
+ // BKE_report(op->reports, RPT_DEBUG, "Bone selection count error");
}
/* initialise initial auto=ik chainlen's? */
@@ -1109,7 +1108,7 @@ static void createTransArmatureVerts(TransInfo *t)
td->val= &ebo->rad_head;
td->ival= *td->val;
- VECCOPY (td->center, ebo->head);
+ copy_v3_v3(td->center, ebo->head);
td->flag= TD_SELECTED;
copy_m3_m3(td->smtx, smtx);
@@ -1125,7 +1124,7 @@ static void createTransArmatureVerts(TransInfo *t)
{
td->val= &ebo->rad_tail;
td->ival= *td->val;
- VECCOPY (td->center, ebo->tail);
+ copy_v3_v3(td->center, ebo->tail);
td->flag= TD_SELECTED;
copy_m3_m3(td->smtx, smtx);
@@ -1152,10 +1151,10 @@ static void createTransArmatureVerts(TransInfo *t)
{
// abusive storage of scale in the loc pointer :)
td->loc= &ebo->xwidth;
- VECCOPY (td->iloc, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
td->val= NULL;
}
- VECCOPY (td->center, ebo->head);
+ copy_v3_v3(td->center, ebo->head);
td->flag= TD_SELECTED;
/* use local bone matrix */
@@ -1181,7 +1180,7 @@ static void createTransArmatureVerts(TransInfo *t)
td->val= &(ebo->roll);
td->ival= ebo->roll;
- VECCOPY (td->center, ebo->head);
+ copy_v3_v3(td->center, ebo->head);
td->flag= TD_SELECTED;
td->ext = NULL;
@@ -1194,8 +1193,8 @@ static void createTransArmatureVerts(TransInfo *t)
{
if (ebo->flag & BONE_TIPSEL)
{
- VECCOPY (td->iloc, ebo->tail);
- VECCOPY (td->center, td->iloc);
+ copy_v3_v3(td->iloc, ebo->tail);
+ copy_v3_v3(td->center, td->iloc);
td->loc= ebo->tail;
td->flag= TD_SELECTED;
if (ebo->flag & BONE_EDITMODE_LOCKED)
@@ -1220,8 +1219,8 @@ static void createTransArmatureVerts(TransInfo *t)
}
if (ebo->flag & BONE_ROOTSEL)
{
- VECCOPY (td->iloc, ebo->head);
- VECCOPY (td->center, td->iloc);
+ copy_v3_v3(td->iloc, ebo->head);
+ copy_v3_v3(td->center, td->iloc);
td->loc= ebo->head;
td->flag= TD_SELECTED;
if (ebo->flag & BONE_EDITMODE_LOCKED)
@@ -1279,8 +1278,8 @@ static void createTransMBallVerts(TransInfo *t)
for(ml= mb->editelems->first; ml; ml= ml->next) {
if(propmode || (ml->flag & SELECT)) {
td->loc= &ml->x;
- VECCOPY(td->iloc, td->loc);
- VECCOPY(td->center, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
+ copy_v3_v3(td->center, td->loc);
if(ml->flag & SELECT) td->flag= TD_SELECTED | TD_USEQUAT | TD_SINGLESIZE;
else td->flag= TD_USEQUAT;
@@ -1395,7 +1394,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= ED_curve_editnurbs(cu);
+ nurbs= curve_editnurbs(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++) {
@@ -1444,9 +1443,9 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
((bezt->f2 & SELECT) && hide_handles) ||
((bezt->f1 & SELECT) && hide_handles == 0)
) {
- VECCOPY(td->iloc, bezt->vec[0]);
+ copy_v3_v3(td->iloc, bezt->vec[0]);
td->loc= bezt->vec[0];
- VECCOPY(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:0]);
+ copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:0]);
if (hide_handles) {
if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
@@ -1469,9 +1468,9 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
/* This is the Curve Point, the other two are handles */
if(propmode || (bezt->f2 & SELECT)) {
- VECCOPY(td->iloc, bezt->vec[1]);
+ copy_v3_v3(td->iloc, bezt->vec[1]);
td->loc= bezt->vec[1];
- VECCOPY(td->center, td->loc);
+ copy_v3_v3(td->center, td->loc);
if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
td->ext = NULL;
@@ -1503,9 +1502,9 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
((bezt->f2 & SELECT) && hide_handles) ||
((bezt->f3 & SELECT) && hide_handles == 0)
) {
- VECCOPY(td->iloc, bezt->vec[2]);
+ copy_v3_v3(td->iloc, bezt->vec[2]);
td->loc= bezt->vec[2];
- VECCOPY(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:2]);
+ copy_v3_v3(td->center, bezt->vec[(hide_handles || bezt->f2 & SELECT) ? 1:2]);
if (hide_handles) {
if(bezt->f2 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
@@ -1547,9 +1546,9 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
for(a= nu->pntsu*nu->pntsv, bp= nu->bp; a>0; a--, bp++) {
if(bp->hide==0) {
if(propmode || (bp->f1 & SELECT)) {
- VECCOPY(td->iloc, bp->vec);
+ copy_v3_v3(td->iloc, bp->vec);
td->loc= bp->vec;
- VECCOPY(td->center, td->loc);
+ copy_v3_v3(td->center, td->loc);
if(bp->f1 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
td->ext = NULL;
@@ -1619,9 +1618,9 @@ static void createTransLatticeVerts(TransInfo *t)
while(a--) {
if(propmode || (bp->f1 & SELECT)) {
if(bp->hide==0) {
- VECCOPY(td->iloc, bp->vec);
+ copy_v3_v3(td->iloc, bp->vec);
td->loc= bp->vec;
- VECCOPY(td->center, td->loc);
+ copy_v3_v3(td->center, td->loc);
if(bp->f1 & SELECT) td->flag= TD_SELECTED;
else td->flag= 0;
copy_m3_m3(td->smtx, smtx);
@@ -1714,15 +1713,15 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
for(k=0, key=point->keys; k<point->totkey; k++, key++) {
if(key->flag & PEK_USE_WCO) {
- VECCOPY(key->world_co, key->co);
+ copy_v3_v3(key->world_co, key->co);
mul_m4_v3(mat, key->world_co);
td->loc = key->world_co;
}
else
td->loc = key->co;
- VECCOPY(td->iloc, td->loc);
- VECCOPY(td->center, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
+ copy_v3_v3(td->center, td->loc);
if(key->flag & PEK_SELECT)
td->flag |= TD_SELECTED;
@@ -1787,13 +1786,13 @@ void flushTransParticles(TransInfo *t)
invert_m4_m4(imat,mat);
for(k=0, key=point->keys; k<point->totkey; k++, key++) {
- VECCOPY(co, key->world_co);
+ copy_v3_v3(co, key->world_co);
mul_m4_v3(imat, co);
/* optimization for proportional edit */
if(!propmode || !compare_v3v3(key->co, co, 0.0001f)) {
- VECCOPY(key->co, co);
+ copy_v3_v3(key->co, co);
point->flag |= PEP_EDIT_RECALC;
}
}
@@ -1910,7 +1909,7 @@ static void get_face_center(float *cent, EditMesh *em, EditVert *eve)
if(efa->v1==eve || efa->v2==eve || efa->v3==eve || efa->v4==eve)
break;
if(efa) {
- VECCOPY(cent, efa->cent);
+ copy_v3_v3(cent, efa->cent);
}
}
@@ -1924,13 +1923,13 @@ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert
//else
td->loc = eve->co;
- VECCOPY(td->center, td->loc);
+ copy_v3_v3(td->center, td->loc);
if(t->around==V3D_LOCAL && (em->selectmode & SCE_SELECT_FACE))
get_face_center(td->center, em, eve);
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
// Setting normals
- VECCOPY(td->axismtx[2], eve->no);
+ copy_v3_v3(td->axismtx[2], eve->no);
td->axismtx[0][0] =
td->axismtx[0][1] =
td->axismtx[0][2] =
@@ -1960,9 +1959,9 @@ static void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head
if ( (vtd = BME_get_transdata(td,v)) ) {
tob->loc = vtd->loc;
tob->val = &vtd->factor;
- VECCOPY(tob->iloc,vtd->co);
- VECCOPY(tob->center,vtd->org);
- VECCOPY(tob->axismtx[0],vtd->vec);
+ copy_v3_v3(tob->iloc,vtd->co);
+ copy_v3_v3(tob->center,vtd->org);
+ copy_v3_v3(tob->axismtx[0],vtd->vec);
tob->axismtx[1][0] = vtd->max ? *vtd->max : 0;
tob++;
i++;
@@ -1984,7 +1983,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
float *mappedcos = NULL, *quats= NULL;
float mtx[3][3], smtx[3][3], (*defmats)[3][3] = NULL, (*defcos)[3] = NULL;
int count=0, countsel=0, a, totleft;
- int propmode = t->flag & T_PROP_EDIT;
+ int propmode = (t->flag & T_PROP_EDIT) ? (t->flag & (T_PROP_EDIT | T_PROP_CONNECTED)) : 0;
int mirror = 0;
short selectmode = ts->selectmode;
@@ -2054,7 +2053,9 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
copy_m3_m4(mtx, t->obedit->obmat);
invert_m3_m3(smtx, mtx);
- if(propmode) editmesh_set_connectivity_distance(em, mtx);
+ if(propmode & T_PROP_CONNECTED) {
+ editmesh_set_connectivity_distance(em, mtx);
+ }
/* detect CrazySpace [tm] */
if(modifiers_getCageIndex(t->scene, t->obedit, NULL, 1)>=0) {
@@ -2305,8 +2306,8 @@ static void UVsToTransData(SpaceImage *sima, TransData *td, TransData2D *td2d, f
td->flag = 0;
td->loc = td2d->loc;
- VECCOPY(td->center, td->loc);
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->center, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
@@ -2606,10 +2607,10 @@ static void createTransNlaData(bContext *C, TransInfo *t)
/* now, link the transform data up to this data */
if (ELEM(t->mode, TFM_TRANSLATION, TFM_TIME_EXTEND)) {
td->loc= tdn->h1;
- VECCOPY(td->iloc, tdn->h1);
+ copy_v3_v3(td->iloc, tdn->h1);
/* store all the other gunk that is required by transform */
- VECCOPY(td->center, center);
+ copy_v3_v3(td->center, center);
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
@@ -2638,10 +2639,10 @@ static void createTransNlaData(bContext *C, TransInfo *t)
/* now, link the transform data up to this data */
if (ELEM(t->mode, TFM_TRANSLATION, TFM_TIME_EXTEND)) {
td->loc= tdn->h2;
- VECCOPY(td->iloc, tdn->h2);
+ copy_v3_v3(td->iloc, tdn->h2);
/* store all the other gunk that is required by transform */
- VECCOPY(td->center, center);
+ copy_v3_v3(td->center, center);
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
@@ -3194,7 +3195,7 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt,
td->center[1] = cent[1];
td->center[2] = 0.0f;
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
}
else {
td2d->loc[0] = loc[0];
@@ -3203,8 +3204,8 @@ static void bezt_to_transdata (TransData *td, TransData2D *td2d, AnimData *adt,
td2d->loc2d = loc;
td->loc = td2d->loc;
- VECCOPY(td->center, cent);
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->center, cent);
+ copy_v3_v3(td->iloc, td->loc);
}
if (td->flag & TD_MOVEHANDLE1) {
@@ -3407,7 +3408,7 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
const char sel3= use_handle ? bezt->f3 & SELECT : 0;
TransDataCurveHandleFlags *hdata = NULL;
- short h1=1, h2=1;
+ /* short h1=1, h2=1; */ /* UNUSED */
/* only include handles if selected, irrespective of the interpolation modes.
* also, only treat handles specially if the center point isn't selected.
@@ -3417,16 +3418,18 @@ static void createTransGraphEditData(bContext *C, TransInfo *t)
hdata = initTransDataCurveHandles(td, bezt);
bezt_to_transdata(td++, td2d++, adt, bezt, 0, 1, 1, intvals, mtx, smtx);
}
- else
- h1= 0;
+ else {
+ /* h1= 0; */ /* UNUSED */
+ }
if (sel3) {
if (hdata==NULL)
hdata = initTransDataCurveHandles(td, bezt);
bezt_to_transdata(td++, td2d++, adt, bezt, 2, 1, 1, intvals, mtx, smtx);
}
- else
- h2= 0;
+ else {
+ /* h2= 0; */ /* UNUSED */
+ }
}
/* only include main vert if selected */
@@ -3903,8 +3906,8 @@ static TransData *SeqToTransData(TransData *td, TransData2D *td2d, TransDataSeq
td->flag = 0;
td->loc = td2d->loc;
- VECCOPY(td->center, td->loc);
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->center, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
@@ -4255,7 +4258,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ob = ob;
td->loc = ob->loc;
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
if (ob->rotmode > 0) {
td->ext->rot= ob->rot;
@@ -4263,8 +4266,8 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ext->rotAngle= NULL;
td->ext->quat= NULL;
- VECCOPY(td->ext->irot, ob->rot);
- VECCOPY(td->ext->drot, ob->drot);
+ copy_v3_v3(td->ext->irot, ob->rot);
+ copy_v3_v3(td->ext->drot, ob->drot);
}
else if (ob->rotmode == ROT_MODE_AXISANGLE) {
td->ext->rot= NULL;
@@ -4273,9 +4276,9 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ext->quat= NULL;
td->ext->irotAngle= ob->rotAngle;
- VECCOPY(td->ext->irotAxis, ob->rotAxis);
+ copy_v3_v3(td->ext->irotAxis, ob->rotAxis);
// td->ext->drotAngle= ob->drotAngle; // XXX, not implimented
- // VECCOPY(td->ext->drotAxis, ob->drotAxis); // XXX, not implimented
+ // copy_v3_v3(td->ext->drotAxis, ob->drotAxis); // XXX, not implimented
}
else {
td->ext->rot= NULL;
@@ -4289,10 +4292,10 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
td->ext->rotOrder=ob->rotmode;
td->ext->size = ob->size;
- VECCOPY(td->ext->isize, ob->size);
- VECCOPY(td->ext->dsize, ob->dsize);
+ copy_v3_v3(td->ext->isize, ob->size);
+ copy_v3_v3(td->ext->dsize, ob->dsize);
- VECCOPY(td->center, ob->obmat[3]);
+ copy_v3_v3(td->center, ob->obmat[3]);
copy_m4_m4(td->ext->obmat, ob->obmat);
@@ -4771,12 +4774,14 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
}
else if (t->spacetype == SPACE_NODE) {
+ SpaceNode *snode= (SpaceNode *)t->sa->spacedata.first;
+ ED_node_update_hierarchy(C, snode->edittree);
+
if(cancelled == 0)
ED_node_link_insert(t->sa);
/* clear link line */
ED_node_link_intersect_test(t->sa, 0);
-
}
else if (t->spacetype == SPACE_ACTION) {
SpaceAction *saction= (SpaceAction *)t->sa->spacedata.first;
@@ -5194,9 +5199,14 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node)
td2d->loc2d = &node->locx; /* current location */
td->flag = 0;
+ /* exclude nodes whose parent is also transformed */
+ if (node->parent && (node->parent->flag & NODE_TRANSFORM)) {
+ td->flag |= TD_SKIP;
+ }
+
td->loc = td2d->loc;
- VECCOPY(td->center, td->loc);
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->center, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
memset(td->axismtx, 0, sizeof(td->axismtx));
td->axismtx[2][2] = 1.0f;
@@ -5214,6 +5224,16 @@ static void createTransNodeData(bContext *C, TransInfo *t)
{
TransData *td;
TransData2D *td2d;
+ SpaceNode *snode= t->sa->spacedata.first;
+ bNode *node;
+
+ /* set transform flags on nodes */
+ for (node=snode->edittree->nodes.first; node; node=node->next) {
+ if ((node->flag & NODE_SELECT) || (node->parent && (node->parent->flag & NODE_TRANSFORM)))
+ node->flag |= NODE_TRANSFORM;
+ else
+ node->flag &= ~NODE_TRANSFORM;
+ }
t->total= CTX_DATA_COUNT(C, selected_nodes);
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index ec76bb3ac35..38776b51c62 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -84,7 +84,7 @@
#include "ED_space_api.h"
#include "ED_uvedit.h"
#include "ED_view3d.h"
-#include "ED_curve.h" /* for ED_curve_editnurbs */
+#include "ED_curve.h" /* for curve_editnurbs */
//#include "BDR_unwrapper.h"
@@ -115,9 +115,9 @@ void getViewVector(TransInfo *t, float coord[3], float vec[3])
{
float p1[4], p2[4];
- VECCOPY(p1, coord);
+ copy_v3_v3(p1, coord);
p1[3] = 1.0f;
- VECCOPY(p2, p1);
+ copy_v3_v3(p2, p1);
p2[3] = 1.0f;
mul_m4_v4(t->viewmat, p2);
@@ -130,7 +130,7 @@ void getViewVector(TransInfo *t, float coord[3], float vec[3])
sub_v3_v3v3(vec, p1, p2);
}
else {
- VECCOPY(vec, t->viewinv[2]);
+ copy_v3_v3(vec, t->viewinv[2]);
}
normalize_v3(vec);
}
@@ -144,7 +144,7 @@ static void clipMirrorModifier(TransInfo *t, Object *ob)
int axis = 0;
for (; md; md=md->next) {
- if (md->type==eModifierType_Mirror) {
+ if ((md->type==eModifierType_Mirror) && (md->mode & eModifierMode_Realtime)) {
MirrorModifierData *mmd = (MirrorModifierData*) md;
if(mmd->flag & MOD_MIR_CLIPPING) {
@@ -626,7 +626,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= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
Nurb *nu= nurbs->first;
if(t->state != TRANS_CANCEL) {
@@ -694,12 +694,12 @@ static void recalcData_view3d(TransInfo *t)
if ((ebo->flag & BONE_CONNECTED) && ebo->parent){
/* If this bone has a parent tip that has been moved */
if (ebo->parent->flag & BONE_TIPSEL){
- VECCOPY (ebo->head, ebo->parent->tail);
+ copy_v3_v3 (ebo->head, ebo->parent->tail);
if(t->mode==TFM_BONE_ENVELOPE) ebo->rad_head= ebo->parent->rad_tail;
}
/* If this bone has a parent tip that has NOT been moved */
else{
- VECCOPY (ebo->parent->tail, ebo->head);
+ copy_v3_v3 (ebo->parent->tail, ebo->head);
if(t->mode==TFM_BONE_ENVELOPE) ebo->parent->rad_tail= ebo->rad_head;
}
}
@@ -736,7 +736,7 @@ static void recalcData_view3d(TransInfo *t)
float qrot[4];
ebo = td->extra;
- VECCOPY(up_axis, td->axismtx[2]);
+ copy_v3_v3(up_axis, td->axismtx[2]);
if (t->mode != TFM_ROTATION)
{
@@ -1259,12 +1259,12 @@ void applyTransObjects(TransInfo *t)
TransData *td;
for (td = t->data; td < t->data + t->total; td++) {
- VECCOPY(td->iloc, td->loc);
+ copy_v3_v3(td->iloc, td->loc);
if (td->ext->rot) {
- VECCOPY(td->ext->irot, td->ext->rot);
+ copy_v3_v3(td->ext->irot, td->ext->rot);
}
if (td->ext->size) {
- VECCOPY(td->ext->isize, td->ext->size);
+ copy_v3_v3(td->ext->isize, td->ext->size);
}
}
recalcData(t);
@@ -1273,7 +1273,7 @@ void applyTransObjects(TransInfo *t)
static void restoreElement(TransData *td) {
/* TransData for crease has no loc */
if (td->loc) {
- VECCOPY(td->loc, td->iloc);
+ copy_v3_v3(td->loc, td->iloc);
}
if (td->val) {
*td->val = td->ival;
@@ -1281,17 +1281,17 @@ static void restoreElement(TransData *td) {
if (td->ext && (td->flag&TD_NO_EXT)==0) {
if (td->ext->rot) {
- VECCOPY(td->ext->rot, td->ext->irot);
+ copy_v3_v3(td->ext->rot, td->ext->irot);
}
if(td->ext->rotAngle) {
*td->ext->rotAngle= td->ext->irotAngle;
}
if(td->ext->rotAxis) {
- VECCOPY(td->ext->rotAxis, td->ext->irotAxis);
+ copy_v3_v3(td->ext->rotAxis, td->ext->irotAxis);
}
/* XXX, drotAngle & drotAxis not used yet */
if (td->ext->size) {
- VECCOPY(td->ext->size, td->ext->isize);
+ copy_v3_v3(td->ext->size, td->ext->isize);
}
if (td->ext->quat) {
QUATCOPY(td->ext->quat, td->ext->iquat);
@@ -1335,7 +1335,7 @@ void calculateCenter2D(TransInfo *t)
Object *ob= t->obedit?t->obedit:t->poseobj;
float vec[3];
- VECCOPY(vec, t->center);
+ copy_v3_v3(vec, t->center);
mul_m4_v3(ob->obmat, vec);
projectIntView(t, vec, t->center2d);
}
@@ -1349,7 +1349,7 @@ void calculateCenterCursor(TransInfo *t)
float *cursor;
cursor = give_cursor(t->scene, t->view);
- VECCOPY(t->center, cursor);
+ copy_v3_v3(t->center, cursor);
/* If edit or pose mode, move cursor in local space */
if (t->flag & (T_EDIT|T_POSE)) {
@@ -1421,7 +1421,7 @@ void calculateCenterMedian(TransInfo *t)
}
if(i)
mul_v3_fl(partial, 1.0f / total);
- VECCOPY(t->center, partial);
+ copy_v3_v3(t->center, partial);
calculateCenter2D(t);
}
@@ -1446,8 +1446,8 @@ void calculateCenterBound(TransInfo *t)
}
}
else {
- VECCOPY(max, t->data[i].center);
- VECCOPY(min, t->data[i].center);
+ copy_v3_v3(max, t->data[i].center);
+ copy_v3_v3(min, t->data[i].center);
}
}
add_v3_v3v3(t->center, min, max);
@@ -1501,7 +1501,7 @@ void calculateCenter(TransInfo *t)
Object *ob= OBACT;
if(ob)
{
- VECCOPY(t->center, ob->obmat[3]);
+ copy_v3_v3(t->center, ob->obmat[3]);
projectIntView(t, t->center, t->center2d);
}
}
@@ -1510,7 +1510,7 @@ void calculateCenter(TransInfo *t)
}
/* setting constraint center */
- VECCOPY(t->con.center, t->center);
+ copy_v3_v3(t->con.center, t->center);
if(t->flag & (T_EDIT|T_POSE))
{
Object *ob= t->obedit?t->obedit:t->poseobj;
@@ -1530,7 +1530,7 @@ void calculateCenter(TransInfo *t)
{
float axis[3];
/* persinv is nasty, use viewinv instead, always right */
- VECCOPY(axis, t->viewinv[2]);
+ copy_v3_v3(axis, t->viewinv[2]);
normalize_v3(axis);
/* 6.0 = 6 grid units */
@@ -1543,8 +1543,8 @@ void calculateCenter(TransInfo *t)
/* rotate only needs correct 2d center, grab needs initgrabz() value */
if(t->mode==TFM_TRANSLATION)
{
- VECCOPY(t->center, axis);
- VECCOPY(t->con.center, t->center);
+ copy_v3_v3(t->center, axis);
+ copy_v3_v3(t->con.center, t->center);
}
}
}
@@ -1557,7 +1557,7 @@ void calculateCenter(TransInfo *t)
Object *ob= t->obedit?t->obedit:t->poseobj;
float vec[3];
- VECCOPY(vec, t->center);
+ copy_v3_v3(vec, t->center);
mul_m4_v3(ob->obmat, vec);
initgrabz(t->ar->regiondata, vec[0], vec[1], vec[2]);
}
@@ -1666,13 +1666,13 @@ void calculatePropRatio(TransInfo *t)
strcpy(t->proptext, "(Random)");
break;
default:
- strcpy(t->proptext, "");
+ t->proptext[0]= '\0';
}
}
else {
for(i = 0 ; i < t->total; i++, td++) {
td->factor = 1.0;
}
- strcpy(t->proptext, "");
+ t->proptext[0]= '\0';
}
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index d62227a122d..36373562956 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -57,6 +57,7 @@
#include "BKE_action.h"
#include "BKE_context.h"
+#include "BKE_curve.h"
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_particle.h"
@@ -75,7 +76,6 @@
#include "ED_mesh.h"
#include "ED_particle.h"
#include "ED_view3d.h"
-#include "ED_curve.h" /* for ED_curve_editnurbs */
#include "UI_resources.h"
@@ -395,7 +395,7 @@ int calc_manipulator_stats(const bContext *C)
Nurb *nu;
BezTriple *bezt;
BPoint *bp;
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
nu= nurbs->first;
while(nu) {
@@ -446,13 +446,13 @@ int calc_manipulator_stats(const bContext *C)
}
else if(obedit->type==OB_MBALL) {
MetaBall *mb = (MetaBall*)obedit->data;
- MetaElem *ml, *ml_sel=NULL;
+ MetaElem *ml /* , *ml_sel=NULL */ /* UNUSED */;
ml= mb->editelems->first;
while(ml) {
if(ml->flag & SELECT) {
calc_tw_center(scene, &ml->x);
- ml_sel = ml;
+ /* ml_sel = ml; */ /* UNUSED */
totsel++;
}
ml= ml->next;
@@ -884,7 +884,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
if(arcs) {
/* clipplane makes nice handles, calc here because of multmatrix but with translate! */
- VECCOPY(plane, rv3d->viewinv[2]);
+ VECCOPY(plane, rv3d->viewinv[2]); /* float -> double */
plane[3]= -0.02f*size; // clip just a bit more
glClipPlane(GL_CLIP_PLANE0, plane);
}
@@ -1498,15 +1498,15 @@ void BIF_draw_manipulator(const bContext *C)
if(v3d->around==V3D_ACTIVE && scene->obedit==NULL) {
Object *ob= OBACT;
if(ob && !(ob->mode & OB_MODE_POSE))
- VECCOPY(rv3d->twmat[3], ob->obmat[3]);
+ copy_v3_v3(rv3d->twmat[3], ob->obmat[3]);
}
break;
case V3D_LOCAL:
case V3D_CENTROID:
- VECCOPY(rv3d->twmat[3], scene->twcent);
+ copy_v3_v3(rv3d->twmat[3], scene->twcent);
break;
case V3D_CURSOR:
- VECCOPY(rv3d->twmat[3], give_cursor(scene, v3d));
+ copy_v3_v3(rv3d->twmat[3], give_cursor(scene, v3d));
break;
}
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index e35b8adc570..d6e8e4aa695 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -303,7 +303,7 @@ static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot)
ot->poll = ED_operator_areaactive;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_string(ot->srna, "name", "", 35, "Name", "Text to insert at the cursor position.");
+ RNA_def_string(ot->srna, "name", "", 35, "Name", "Text to insert at the cursor position");
RNA_def_boolean(ot->srna, "use", 0, "Use after creation", "Select orientation after its creation");
RNA_def_boolean(ot->srna, "overwrite", 0, "Overwrite previous", "Overwrite previously created orientation with same name");
}
@@ -476,7 +476,7 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
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_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);
}
@@ -601,8 +601,8 @@ void TRANSFORM_OT_tilt(struct wmOperatorType *ot)
/* identifiers */
ot->name = "Tilt";
/*optionals -
- "Tilt selected vertices."
- "Specify an extra axis rotation for selected vertices of 3d curve." */
+ "Tilt selected vertices"
+ "Specify an extra axis rotation for selected vertices of 3d curve" */
ot->description= "Tilt selected control vertices of 3d curve";
ot->idname = OP_TILT;
ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
@@ -795,7 +795,7 @@ void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot)
ot->cancel = transform_cancel;
ot->poll = ED_operator_sequencer_active;
- RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, "angle", "", -FLT_MAX, FLT_MAX);
+ RNA_def_float_vector(ot->srna, "value", 2, VecOne, -FLT_MAX, FLT_MAX, "Angle", "", -FLT_MAX, FLT_MAX);
Transform_Properties(ot, P_SNAP);
}
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 2d539055db3..cd4cbc77c49 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -41,6 +41,7 @@
#include "BKE_armature.h"
+#include "BKE_curve.h"
#include "BKE_context.h"
#include "BKE_report.h"
@@ -49,6 +50,8 @@
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
//#include "BIF_editmesh.h"
//#include "BIF_interface.h"
//#include "BIF_space.h"
@@ -56,11 +59,11 @@
#include "ED_armature.h"
#include "ED_mesh.h"
-#include "ED_curve.h" /* for ED_curve_editnurbs */
-
#include "RNA_define.h"
+#include "UI_interface.h"
+
#include "transform.h"
/* *********************** TransSpace ************************** */
@@ -222,7 +225,7 @@ int createSpaceNormal(float mat[3][3], float normal[3])
{
float tangent[3] = {0.0f, 0.0f, 1.0f};
- VECCOPY(mat[2], normal);
+ copy_v3_v3(mat[2], normal);
if (normalize_v3(mat[2]) == 0.0f) {
return 0; /* error return */
}
@@ -243,7 +246,7 @@ int createSpaceNormal(float mat[3][3], float normal[3])
int createSpaceNormalTangent(float mat[3][3], float normal[3], float tangent[3])
{
- VECCOPY(mat[2], normal);
+ copy_v3_v3(mat[2], normal);
if (normalize_v3(mat[2]) == 0.0f) {
return 0; /* error return */
}
@@ -407,14 +410,18 @@ EnumPropertyItem *BIF_enumTransformOrientation(bContext *C)
}
const char * BIF_menustringTransformOrientation(const bContext *C, const char *title) {
- char menu[] = "%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3";
+ const char* menu = N_("%t|Global%x0|Local%x1|Gimbal%x4|Normal%x2|View%x3");
ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
TransformOrientation *ts;
int i = V3D_MANIP_CUSTOM;
char *str_menu, *p;
+
+ if(UI_translate_iface()) {
+ title= BLF_gettext(title);
+ menu= BLF_gettext(menu);
+ }
-
- str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), "UserTransSpace from matrix");
+ str_menu = MEM_callocN(strlen(menu) + strlen(title) + 1 + 40 * BIF_countTransformOrientation(C), UI_translate_do_tooltip(N_("UserTransSpace from matrix")));
p = str_menu;
p += sprintf(str_menu, "%s", title);
@@ -659,7 +666,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
for(eed= em->edges.first; eed; eed= eed->next) {
if(eed->f & SELECT) {
/* use average vert normals as plane and edge vector as normal */
- VECCOPY(plane, eed->v1->no);
+ copy_v3_v3(plane, eed->v1->no);
VECADD(plane, plane, eed->v2->no);
sub_v3_v3v3(normal, eed->v2->co, eed->v1->co);
break;
@@ -680,7 +687,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
else {
v2 = eve;
- VECCOPY(plane, v1->no);
+ copy_v3_v3(plane, v1->no);
VECADD(plane, plane, v2->no);
sub_v3_v3v3(normal, v2->co, v1->co);
break;
@@ -694,7 +701,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
for (eve = em->verts.first; eve; eve = eve->next)
{
if ( eve->f & SELECT ) {
- VECCOPY(normal, eve->no);
+ copy_v3_v3(normal, eve->no);
break;
}
}
@@ -721,7 +728,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
Nurb *nu;
BezTriple *bezt;
int a;
- ListBase *nurbs= ED_curve_editnurbs(cu);
+ ListBase *nurbs= curve_editnurbs(cu);
for (nu = nurbs->first; nu; nu = nu->next)
{
@@ -792,7 +799,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
/* Rotation of MetaElem is stored in quat */
quat_to_mat4( mat,ml_sel->quat);
- VECCOPY(normal, mat[2]);
+ copy_v3_v3(normal, mat[2]);
negate_v3_v3(plane, mat[1]);
@@ -893,8 +900,8 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
}
if (ob) {
- VECCOPY(normal, ob->obmat[2]);
- VECCOPY(plane, ob->obmat[1]);
+ copy_v3_v3(normal, ob->obmat[2]);
+ copy_v3_v3(plane, ob->obmat[1]);
}
result = ORIENTATION_NORMAL;
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index ca89670dedb..17fd7517d71 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -264,7 +264,7 @@ void applyProject(TransInfo *t)
if (td->flag & TD_SKIP)
continue;
- VECCOPY(iloc, td->loc);
+ copy_v3_v3(iloc, td->loc);
if (t->flag & (T_EDIT|T_POSE))
{
Object *ob = t->obedit?t->obedit:t->poseobj;
@@ -274,7 +274,7 @@ void applyProject(TransInfo *t)
{
td->ob->recalc |= OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME;
object_handle_update(t->scene, td->ob);
- VECCOPY(iloc, td->ob->obmat[3]);
+ copy_v3_v3(iloc, td->ob->obmat[3]);
}
project_float(t->ar, iloc, mval);
@@ -543,7 +543,7 @@ void addSnapPoint(TransInfo *t)
if (t->tsnap.status & POINT_INIT) {
TransSnapPoint *p = MEM_callocN(sizeof(TransSnapPoint), "SnapPoint");
- VECCOPY(p->co, t->tsnap.snapPoint);
+ copy_v3_v3(p->co, t->tsnap.snapPoint);
BLI_addtail(&t->tsnap.points, p);
@@ -580,7 +580,7 @@ void getSnapPoint(TransInfo *t, float vec[3])
mul_v3_fl(vec, 1.0f / total);
} else {
- VECCOPY(vec, t->tsnap.snapPoint)
+ copy_v3_v3(vec, t->tsnap.snapPoint);
}
}
@@ -628,7 +628,7 @@ float RotationBetween(TransInfo *t, float p1[3], float p2[3])
{
float angle, start[3], end[3], center[3];
- VECCOPY(center, t->center);
+ copy_v3_v3(center, t->center);
if(t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, center);
@@ -684,7 +684,7 @@ float ResizeBetween(TransInfo *t, float p1[3], float p2[3])
{
float d1[3], d2[3], center[3];
- VECCOPY(center, t->center);
+ copy_v3_v3(center, t->center);
if(t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, center);
@@ -784,12 +784,12 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
}
else
{
- VECCOPY(vec, p1->p);
+ copy_v3_v3(vec, p1->p);
}
if (last_p == NULL)
{
- VECCOPY(p, vec);
+ copy_v3_v3(p, vec);
max_dist = 0;
break;
}
@@ -798,7 +798,7 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
if (new_dist < max_dist)
{
- VECCOPY(p, vec);
+ copy_v3_v3(p, vec);
max_dist = new_dist;
}
}
@@ -806,7 +806,7 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
if (max_dist != FLT_MAX)
{
- VECCOPY(loc, p);
+ copy_v3_v3(loc, p);
/* XXX, is there a correct normal in this case ???, for now just z up */
no[0]= 0.0;
no[1]= 0.0;
@@ -830,11 +830,11 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
if (dot_v3v3(tangent, tangent) > 0)
{
- VECCOPY(t->tsnap.snapTangent, tangent);
+ copy_v3_v3(t->tsnap.snapTangent, tangent);
}
- VECCOPY(t->tsnap.snapPoint, loc);
- VECCOPY(t->tsnap.snapNormal, no);
+ copy_v3_v3(t->tsnap.snapPoint, loc);
+ copy_v3_v3(t->tsnap.snapNormal, no);
t->tsnap.status |= POINT_INIT;
}
@@ -873,7 +873,7 @@ void TargetSnapCenter(TransInfo *t)
// Only need to calculate once
if ((t->tsnap.status & TARGET_INIT) == 0)
{
- VECCOPY(t->tsnap.snapTarget, t->center);
+ copy_v3_v3(t->tsnap.snapTarget, t->center);
if(t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
mul_m4_v3(ob->obmat, t->tsnap.snapTarget);
@@ -903,7 +903,7 @@ void TargetSnapActive(TransInfo *t)
if (active_td)
{
- VECCOPY(t->tsnap.snapTarget, active_td->center);
+ copy_v3_v3(t->tsnap.snapTarget, active_td->center);
if(t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
@@ -974,14 +974,14 @@ void TargetSnapClosest(TransInfo *t)
float loc[3];
float dist;
- VECCOPY(loc, bb->vec[j]);
+ copy_v3_v3(loc, bb->vec[j]);
mul_m4_v3(td->ext->obmat, loc);
dist = t->tsnap.distance(t, loc, t->tsnap.snapPoint);
if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist))
{
- VECCOPY(t->tsnap.snapTarget, loc);
+ copy_v3_v3(t->tsnap.snapTarget, loc);
closest = td;
t->tsnap.dist = dist;
}
@@ -993,13 +993,13 @@ void TargetSnapClosest(TransInfo *t)
float loc[3];
float dist;
- VECCOPY(loc, td->center);
+ copy_v3_v3(loc, td->center);
dist = t->tsnap.distance(t, loc, t->tsnap.snapPoint);
if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist))
{
- VECCOPY(t->tsnap.snapTarget, loc);
+ copy_v3_v3(t->tsnap.snapTarget, loc);
closest = td;
t->tsnap.dist = dist;
}
@@ -1014,7 +1014,7 @@ void TargetSnapClosest(TransInfo *t)
float loc[3];
float dist;
- VECCOPY(loc, td->center);
+ copy_v3_v3(loc, td->center);
if(t->flag & (T_EDIT|T_POSE)) {
Object *ob= t->obedit?t->obedit:t->poseobj;
@@ -1025,7 +1025,7 @@ void TargetSnapClosest(TransInfo *t)
if (closest == NULL || fabs(dist) < fabs(t->tsnap.dist))
{
- VECCOPY(t->tsnap.snapTarget, loc);
+ copy_v3_v3(t->tsnap.snapTarget, loc);
closest = td;
t->tsnap.dist = dist;
}
@@ -1052,11 +1052,11 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl
int screen_loc[2];
int new_dist;
- VECCOPY(intersect, ray_normal_local);
+ copy_v3_v3(intersect, ray_normal_local);
mul_v3_fl(intersect, lambda);
add_v3_v3(intersect, ray_start_local);
- VECCOPY(location, intersect);
+ copy_v3_v3(location, intersect);
if (v4co)
normal_quad_v3( normal,v1co, v2co, v3co, v4co);
@@ -1075,8 +1075,8 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl
*depth = new_depth;
retval = 1;
- VECCOPY(loc, location);
- VECCOPY(no, normal);
+ copy_v3_v3(loc, location);
+ copy_v3_v3(no, normal);
mul_m3_v3(timat, no);
normalize_v3(no);
@@ -1095,7 +1095,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
int result;
int retval = 0;
- VECCOPY(ray_end, ray_normal_local);
+ copy_v3_v3(ray_end, ray_normal_local);
mul_v3_fl(ray_end, 2000);
add_v3_v3v3(ray_end, ray_start_local, ray_end);
@@ -1116,11 +1116,11 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
if (mul > 1) {
mul = 1;
- VECCOPY(intersect, v1co);
+ copy_v3_v3(intersect, v1co);
}
else if (mul < 0) {
mul = 0;
- VECCOPY(intersect, v2co);
+ copy_v3_v3(intersect, v2co);
}
if (dot_v3v3(ray_normal_local, dvec) > 0)
@@ -1130,7 +1130,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
int screen_loc[2];
int new_dist;
- VECCOPY(location, intersect);
+ copy_v3_v3(location, intersect);
mul_m4_v3(obmat, location);
@@ -1164,7 +1164,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh
normalize_v3(no);
}
- VECCOPY(loc, location);
+ copy_v3_v3(loc, location);
*dist = new_dist;
}
@@ -1188,7 +1188,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], fl
int screen_loc[2];
int new_dist;
- VECCOPY(location, vco);
+ copy_v3_v3(location, vco);
mul_m4_v3(obmat, location);
@@ -1202,7 +1202,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], fl
*depth = new_depth;
retval = 1;
- VECCOPY(loc, location);
+ copy_v3_v3(loc, location);
if (no)
{
@@ -1226,8 +1226,8 @@ static int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm
invert_m4_m4(imat, obmat);
- VECCOPY(ray_start_local, ray_start);
- VECCOPY(ray_normal_local, ray_normal);
+ copy_v3_v3(ray_start_local, ray_start);
+ copy_v3_v3(ray_normal_local, ray_normal);
mul_m4_v3(imat, ray_start_local);
mul_mat3_m4_v3(imat, ray_normal_local);
@@ -1300,8 +1300,8 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
copy_m3_m4(timat, imat);
transpose_m3(timat);
- VECCOPY(ray_start_local, ray_start);
- VECCOPY(ray_normal_local, ray_normal);
+ copy_v3_v3(ray_start_local, ray_start);
+ copy_v3_v3(ray_normal_local, ray_normal);
mul_m4_v3(imat, ray_start_local);
mul_mat3_m4_v3(imat, ray_normal_local);
@@ -1699,8 +1699,8 @@ static void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float n
peel->depth = depth;
peel->ob = ob;
- VECCOPY(peel->p, p);
- VECCOPY(peel->no, no);
+ copy_v3_v3(peel->p, p);
+ copy_v3_v3(peel->no, no);
BLI_addtail(depth_peels, peel);
@@ -1724,8 +1724,8 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float
copy_m3_m4(timat, imat);
transpose_m3(timat);
- VECCOPY(ray_start_local, ray_start);
- VECCOPY(ray_normal_local, ray_normal);
+ copy_v3_v3(ray_start_local, ray_start);
+ copy_v3_v3(ray_normal_local, ray_normal);
mul_m4_v3(imat, ray_start_local);
mul_mat3_m4_v3(imat, ray_normal_local);
@@ -1757,11 +1757,11 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float
float intersect[3];
float new_depth;
- VECCOPY(intersect, ray_normal_local);
+ copy_v3_v3(intersect, ray_normal_local);
mul_v3_fl(intersect, lambda);
add_v3_v3(intersect, ray_start_local);
- VECCOPY(location, intersect);
+ 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);
@@ -1787,11 +1787,11 @@ static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float
float intersect[3];
float new_depth;
- VECCOPY(intersect, ray_normal_local);
+ copy_v3_v3(intersect, ray_normal_local);
mul_v3_fl(intersect, lambda);
add_v3_v3(intersect, ray_start_local);
- VECCOPY(location, intersect);
+ 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);
diff --git a/source/blender/editors/util/SConscript b/source/blender/editors/util/SConscript
index a694b211ca4..cfbc735eb5c 100644
--- a/source/blender/editors/util/SConscript
+++ b/source/blender/editors/util/SConscript
@@ -8,4 +8,4 @@ incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../makesrna'
incs += ' ../../blenloader'
-env.BlenderLib ( 'bf_editors_util', sources, Split(incs), [], libtype=['core'], priority=[130] )
+env.BlenderLib ( 'bf_editors_util', sources, Split(incs), [], libtype=['core','player'], priority=[330,210] )
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index a2381a208ef..c1aca61f795 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -54,6 +54,7 @@
#include "ED_armature.h"
#include "ED_particle.h"
#include "ED_curve.h"
+#include "ED_gpencil.h"
#include "ED_mball.h"
#include "ED_mesh.h"
#include "ED_object.h"
@@ -126,6 +127,11 @@ static int ed_undo_step(bContext *C, int step, const char *undoname)
Object *obact= CTX_data_active_object(C);
ScrArea *sa= CTX_wm_area(C);
+ /* grease pencil can be can be used in plenty of spaces, so check it first */
+ if(ED_gpencil_session_active()) {
+ return ED_undo_gpencil_step(C, step, undoname);
+ }
+
if(sa && sa->spacetype==SPACE_IMAGE) {
SpaceImage *sima= (SpaceImage *)sa->spacedata.first;
diff --git a/source/blender/editors/uvedit/uvedit_draw.c b/source/blender/editors/uvedit/uvedit_draw.c
index 453bea0969b..d5a94c9b56a 100644
--- a/source/blender/editors/uvedit/uvedit_draw.c
+++ b/source/blender/editors/uvedit/uvedit_draw.c
@@ -275,7 +275,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
VECSUB2D(av4, tf_uv[2], tf_uv[3]); normalize_v2(av4);
/* This is the correct angle however we are only comparing angles
- * uvang1 = 90-((angle_normalized_v2v2(av1, av2) * 180.0/M_PI)-90);*/
+ * uvang1 = 90-((angle_normalized_v2v2(av1, av2) * RAD2DEGF(1.0f))-90);*/
uvang1 = angle_normalized_v2v2(av1, av2);
uvang2 = angle_normalized_v2v2(av2, av3);
uvang3 = angle_normalized_v2v2(av3, av4);
@@ -288,7 +288,7 @@ static void draw_uvs_stretch(SpaceImage *sima, Scene *scene, EditMesh *em, MTFac
VECSUB(av4, efa->v3->co, efa->v4->co); normalize_v3(av4);
/* This is the correct angle however we are only comparing angles
- * ang1 = 90-((angle_normalized_v3v3(av1, av2) * 180.0/M_PI)-90);*/
+ * ang1 = 90-((angle_normalized_v3v3(av1, av2) * RAD2DEGF(1.0f))-90);*/
ang1 = angle_normalized_v3v3(av1, av2);
ang2 = angle_normalized_v3v3(av2, av3);
ang3 = angle_normalized_v3v3(av3, av4);
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 05159414975..61b3a9ca1ca 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -125,14 +125,12 @@ void ED_uvedit_assign_image(Scene *scene, Object *obedit, Image *ima, Image *pre
if(uvedit_face_visible(scene, previma, efa, tf)) {
if(ima) {
tf->tpage= ima;
- tf->mode |= TF_TEX;
if(ima->id.us==0) id_us_plus(&ima->id);
else id_lib_extern(&ima->id);
}
else {
tf->tpage= NULL;
- tf->mode &= ~TF_TEX;
}
update = 1;
@@ -1221,7 +1219,7 @@ static void UV_OT_align(wmOperatorType *ot)
ot->poll= ED_operator_image_active; /* requires space image */;
/* properties */
- RNA_def_enum(ot->srna, "axis", axis_items, 'a', "Axis", "Axis to align UV locations on.");
+ RNA_def_enum(ot->srna, "axis", axis_items, 'a', "Axis", "Axis to align UV locations on");
}
/* ******************** weld operator **************** */
@@ -1433,8 +1431,8 @@ static void UV_OT_stitch(wmOperatorType *ot)
ot->poll= ED_operator_uvedit;
/* properties */
- RNA_def_boolean(ot->srna, "use_limit", 1, "Use Limit", "Stitch UVs within a specified limit distance.");
- RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, FLT_MAX, "Limit", "Limit distance in normalized coordinates.", -FLT_MAX, FLT_MAX);
+ RNA_def_boolean(ot->srna, "use_limit", 1, "Use Limit", "Stitch UVs within a specified limit distance");
+ RNA_def_float(ot->srna, "limit", 0.01f, 0.0f, FLT_MAX, "Limit", "Limit distance in normalized coordinates", -FLT_MAX, FLT_MAX);
}
/* ******************** (de)select all operator **************** */
@@ -1868,9 +1866,9 @@ static void UV_OT_select(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
- "Extend", "Extend selection rather than clearing the existing selection.");
+ "Extend", "Extend selection rather than clearing the existing selection");
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
- "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f);
+ "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds", -100.0f, 100.0f);
}
/* ******************** loop select operator **************** */
@@ -1913,9 +1911,9 @@ static void UV_OT_select_loop(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
- "Extend", "Extend selection rather than clearing the existing selection.");
+ "Extend", "Extend selection rather than clearing the existing selection");
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
- "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f);
+ "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds", -100.0f, 100.0f);
}
/* ******************** linked select operator **************** */
@@ -1934,7 +1932,7 @@ static int select_linked_internal(bContext *C, wmOperator *op, wmEvent *event, i
NearestHit hit, *hit_p= NULL;
if(ts->uv_flag & UV_SYNC_SELECTION) {
- BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled.");
+ BKE_report(op->reports, RPT_ERROR, "Can't select linked when sync selection is enabled");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -1989,7 +1987,7 @@ static void UV_OT_select_linked(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
- "Extend", "Extend selection rather than clearing the existing selection.");
+ "Extend", "Extend selection rather than clearing the existing selection");
}
static int select_linked_pick_invoke(bContext *C, wmOperator *op, wmEvent *event)
@@ -2017,10 +2015,10 @@ static void UV_OT_select_linked_pick(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "extend", 0,
- "Extend", "Extend selection rather than clearing the existing selection.");
+ "Extend", "Extend selection rather than clearing the existing selection");
RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX,
- "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds.", -100.0f, 100.0f);
+ "Location", "Mouse location in normalized coordinates, 0.0 to 1.0 is within the image bounds", -100.0f, 100.0f);
}
/* ******************** unlink selection operator **************** */
@@ -2036,7 +2034,7 @@ static int unlink_selection_exec(bContext *C, wmOperator *op)
MTFace *tf;
if(ts->uv_flag & UV_SYNC_SELECTION) {
- BKE_report(op->reports, RPT_ERROR, "Can't unlink selection when sync selection is enabled.");
+ BKE_report(op->reports, RPT_ERROR, "Can't unlink selection when sync selection is enabled");
BKE_mesh_end_editmesh(obedit->data, em);
return OPERATOR_CANCELLED;
}
@@ -2358,7 +2356,7 @@ static void UV_OT_select_border(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only.");
+ RNA_def_boolean(ot->srna, "pinned", 0, "Pinned", "Border select pinned UVs only");
WM_operator_properties_gesture_border(ot, FALSE);
}
@@ -2519,7 +2517,7 @@ static void UV_OT_snap_cursor(wmOperatorType *ot)
ot->poll= ED_operator_image_active; /* requires space image */;
/* properties */
- RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UV's to.");
+ RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UVs to");
}
/* ******************** snap selection operator **************** */
@@ -2761,7 +2759,7 @@ static void UV_OT_snap_selected(wmOperatorType *ot)
ot->poll= ED_operator_image_active; /* requires space image */;
/* properties */
- RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UV's to.");
+ RNA_def_enum(ot->srna, "target", target_items, 0, "Target", "Target to snap the selected UVs to");
}
/* ******************** pin operator **************** */
@@ -2816,7 +2814,7 @@ static void UV_OT_pin(wmOperatorType *ot)
ot->poll= ED_operator_uvedit;
/* properties */
- RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear pinning for the selection instead of setting it.");
+ RNA_def_boolean(ot->srna, "clear", 0, "Clear", "Clear pinning for the selection instead of setting it");
}
/******************* select pinned operator ***************/
@@ -3001,7 +2999,7 @@ static void UV_OT_hide(wmOperatorType *ot)
ot->poll= ED_operator_uvedit;
/* props */
- RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected.");
+ RNA_def_boolean(ot->srna, "unselected", 0, "Unselected", "Hide unselected rather than selected");
}
/****************** reveal operator ******************/
@@ -3181,7 +3179,7 @@ static void UV_OT_cursor_set(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_float_vector(ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "Cursor location in 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 0.0-1.0 coordinates", -10.0f, 10.0f);
}
/********************** set tile operator **********************/
@@ -3247,7 +3245,7 @@ static void UV_OT_tile_set(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- RNA_def_int_vector(ot->srna, "tile", 2, NULL, 0, INT_MAX, "Tile", "Tile coordinate.", 0, 10);
+ RNA_def_int_vector(ot->srna, "tile", 2, NULL, 0, INT_MAX, "Tile", "Tile coordinate", 0, 10);
}
/* ************************** registration **********************************/
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c
index dd7c336c98e..846b05c1287 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.c
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.c
@@ -2714,7 +2714,7 @@ static PBool p_chart_abf_solve(PChart *chart)
break;
if (!p_abf_matrix_invert(&sys, chart)) {
- param_warning("ABF failed to invert matrix.");
+ param_warning("ABF failed to invert matrix");
p_abf_free_system(&sys);
return P_FALSE;
}
@@ -2723,7 +2723,7 @@ static PBool p_chart_abf_solve(PChart *chart)
}
if (i == ABF_MAX_ITER) {
- param_warning("ABF maximum iterations reached.");
+ param_warning("ABF maximum iterations reached");
p_abf_free_system(&sys);
return P_FALSE;
}
@@ -3831,7 +3831,7 @@ static void p_smooth(PChart *chart)
if (hedges) MEM_freeN(hedges);
if (vedges) MEM_freeN(vedges);
- // printf("Not enough memory for area smoothing grid.");
+ // printf("Not enough memory for area smoothing grid");
return;
}
@@ -3981,7 +3981,7 @@ static void p_smooth(PChart *chart)
if (triangles) MEM_freeN(triangles);
if (tri) MEM_freeN(tri);
- // printf("Not enough memory for area smoothing grid.");
+ // printf("Not enough memory for area smoothing grid");
return;
}
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index e8a7896abd5..d5666d135aa 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -169,7 +169,8 @@ static int uvedit_have_selection(Scene *scene, EditMesh *em, short implicit)
return 0;
}
-static ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short implicit, short fill, short sel, short correct_aspect)
+static ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short implicit,
+ short fill, short sel, short correct_aspect)
{
ParamHandle *handle;
EditFace *efa;
@@ -333,7 +334,7 @@ static void minimize_stretch_iteration(bContext *C, wmOperator *op, int interact
param_flush(ms->handle);
if(sa) {
- sprintf(str, "Minimize Stretch. Blend %.2f.", ms->blend);
+ sprintf(str, "Minimize Stretch. Blend %.2f", ms->blend);
ED_area_headerprint(sa, str);
}
@@ -474,9 +475,12 @@ void UV_OT_minimize_stretch(wmOperatorType *ot)
ot->poll= ED_operator_uvedit;
/* properties */
- RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.");
- RNA_def_float_factor(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend", "Blend factor between stretch minimized and original.", 0.0f, 1.0f);
- RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, "Iterations", "Number of iterations to run, 0 is unlimited when run interactively.", 0, 100);
+ RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes",
+ "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry");
+ RNA_def_float_factor(ot->srna, "blend", 0.0f, 0.0f, 1.0f, "Blend",
+ "Blend factor between stretch minimized and original", 0.0f, 1.0f);
+ RNA_def_int(ot->srna, "iterations", 0, 0, INT_MAX, "Iterations",
+ "Number of iterations to run, 0 is unlimited when run interactively", 0, 100);
}
/* ******************** Pack Islands operator **************** */
@@ -525,7 +529,8 @@ void UV_OT_pack_islands(wmOperatorType *ot)
ot->poll= ED_operator_uvedit;
/* properties */
- RNA_def_float_factor(ot->srna, "margin", 0.0f, 0.0f, 1.0f, "Margin", "Space between islands", 0.0f, 1.0f);
+ RNA_def_float_factor(ot->srna, "margin", 0.0f, 0.0f, 1.0f, "Margin",
+ "Space between islands", 0.0f, 1.0f);
}
/* ******************** Average Islands Scale operator **************** */
@@ -656,7 +661,8 @@ static void uv_map_transform_center(Scene *scene, View3D *v3d, float *result, Ob
}
}
-static void uv_map_rotation_matrix(float result[][4], RegionView3D *rv3d, Object *ob, float upangledeg, float sideangledeg, float radius)
+static void uv_map_rotation_matrix(float result[][4], RegionView3D *rv3d, Object *ob,
+ float upangledeg, float sideangledeg, float radius)
{
float rotup[4][4], rotside[4][4], viewmatrix[4][4], rotobj[4][4];
float sideangle= 0.0f, upangle= 0.0f;
@@ -752,10 +758,13 @@ static void uv_transform_properties(wmOperatorType *ot, int radius)
{0, NULL, 0, NULL, NULL}
};
- RNA_def_enum(ot->srna, "direction", direction_items, VIEW_ON_EQUATOR, "Direction", "Direction of the sphere or cylinder.");
- RNA_def_enum(ot->srna, "align", align_items, VIEW_ON_EQUATOR, "Align", "How to determine rotation around the pole.");
+ RNA_def_enum(ot->srna, "direction", direction_items, VIEW_ON_EQUATOR, "Direction",
+ "Direction of the sphere or cylinder");
+ RNA_def_enum(ot->srna, "align", align_items, VIEW_ON_EQUATOR, "Align",
+ "How to determine rotation around the pole");
if(radius)
- RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, "Radius", "Radius of the sphere or cylinder.", 0.0001f, 100.0f);
+ RNA_def_float(ot->srna, "radius", 1.0f, 0.0f, FLT_MAX, "Radius",
+ "Radius of the sphere or cylinder", 0.0001f, 100.0f);
}
static void correct_uv_aspect(EditMesh *em)
@@ -808,9 +817,12 @@ static void correct_uv_aspect(EditMesh *em)
static void uv_map_clip_correct_properties(wmOperatorType *ot)
{
- RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect", "Map UV's taking image aspect ratio into account.");
- RNA_def_boolean(ot->srna, "clip_to_bounds", 0, "Clip to Bounds", "Clip UV coordinates to bounds after unwrapping.");
- RNA_def_boolean(ot->srna, "scale_to_bounds", 0, "Scale to Bounds", "Scale UV coordinates to bounds after unwrapping.");
+ RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect",
+ "Map UV's taking image aspect ratio into account");
+ RNA_def_boolean(ot->srna, "clip_to_bounds", 0, "Clip to Bounds",
+ "Clip UV coordinates to bounds after unwrapping");
+ RNA_def_boolean(ot->srna, "scale_to_bounds", 0, "Scale to Bounds",
+ "Scale UV coordinates to bounds after unwrapping");
}
static void uv_map_clip_correct(EditMesh *em, wmOperator *op)
@@ -967,9 +979,12 @@ void UV_OT_unwrap(wmOperatorType *ot)
ot->poll= ED_operator_uvmap;
/* properties */
- RNA_def_enum(ot->srna, "method", method_items, 0, "Method", "Unwrapping method. Angle Based usually gives better results than Conformal, while being somewhat slower.");
- RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes", "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry.");
- RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect", "Map UV's taking image aspect ratio into account.");
+ RNA_def_enum(ot->srna, "method", method_items, 0, "Method",
+ "Unwrapping method. Angle Based usually gives better results than Conformal, while being somewhat slower");
+ RNA_def_boolean(ot->srna, "fill_holes", 1, "Fill Holes",
+ "Virtual fill holes in mesh before unwrapping, to better avoid overlaps and preserve symmetry");
+ RNA_def_boolean(ot->srna, "correct_aspect", 1, "Correct Aspect",
+ "Map UV's taking image aspect ratio into account");
}
/**************** Project From View operator **************/
@@ -1078,7 +1093,7 @@ void UV_OT_from_view(wmOperatorType *ot)
ot->poll= uv_from_view_poll;
/* properties */
- RNA_def_boolean(ot->srna, "orthographic", 0, "Orthographic", "Use orthographic projection.");
+ RNA_def_boolean(ot->srna, "orthographic", 0, "Orthographic", "Use orthographic projection");
uv_map_clip_correct_properties(ot);
}
@@ -1382,6 +1397,7 @@ void UV_OT_cube_project(wmOperatorType *ot)
ot->poll= ED_operator_uvmap;
/* properties */
- RNA_def_float(ot->srna, "cube_size", 1.0f, 0.0f, FLT_MAX, "Cube Size", "Size of the cube to project on.", 0.001f, 100.0f);
+ RNA_def_float(ot->srna, "cube_size", 1.0f, 0.0f, FLT_MAX, "Cube Size",
+ "Size of the cube to project on", 0.001f, 100.0f);
uv_map_clip_correct_properties(ot);
}
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h
index d75b8db2c4e..55c4ff85a57 100644
--- a/source/blender/gpu/GPU_draw.h
+++ b/source/blender/gpu/GPU_draw.h
@@ -80,15 +80,15 @@ void GPU_end_object_materials(void);
int GPU_enable_material(int nr, void *attribs);
void GPU_disable_material(void);
-void GPU_set_material_blend_mode(int blendmode);
-int GPU_get_material_blend_mode(void);
+void GPU_set_material_alpha_blend(int alphablend);
+int GPU_get_material_alpha_blend(void);
/* TexFace drawing
* - this is mutually exclusive with material drawing, a mesh should
* be drawn using one or the other
* - passing NULL clears the state again */
-int GPU_set_tpage(struct MTFace *tface, int mipmap);
+int GPU_set_tpage(struct MTFace *tface, int mipmap, int transp);
/* Lights
* - returns how many lights were enabled
diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h
index d0c7f9d494f..5a1c0c537c0 100644
--- a/source/blender/gpu/GPU_extensions.h
+++ b/source/blender/gpu/GPU_extensions.h
@@ -126,6 +126,7 @@ GPUFrameBuffer *GPU_texture_framebuffer(GPUTexture *tex);
int GPU_texture_target(GPUTexture *tex);
int GPU_texture_opengl_width(GPUTexture *tex);
int GPU_texture_opengl_height(GPUTexture *tex);
+int GPU_texture_opengl_bindcode(GPUTexture *tex);
/* GPU Framebuffer
- this is a wrapper for an OpenGL framebuffer object (FBO). in practice
@@ -179,6 +180,7 @@ typedef struct GPUVertexAttribs {
int type;
int glindex;
int gltexco;
+ int attribid;
char name[32];
} layer[GPU_MAX_ATTRIB];
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index f563d8cbe92..29ad9c91374 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -37,6 +37,8 @@
#ifndef __GPU_MATERIAL__
#define __GPU_MATERIAL__
+#include "DNA_listBase.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -46,6 +48,7 @@ struct ImageUser;
struct Material;
struct Object;
struct Lamp;
+struct Image;
struct bNode;
struct LinkNode;
struct Scene;
@@ -72,7 +75,6 @@ typedef enum GPUType {
GPU_VEC4 = 4,
GPU_MAT3 = 9,
GPU_MAT4 = 16,
- GPU_TEX1D = 1001,
GPU_TEX2D = 1002,
GPU_SHADOW2D = 1003,
GPU_ATTRIB = 3001
@@ -92,7 +94,8 @@ typedef enum GPUBlendMode {
GPU_BLEND_SOLID = 0,
GPU_BLEND_ADD = 1,
GPU_BLEND_ALPHA = 2,
- GPU_BLEND_CLIP = 4
+ GPU_BLEND_CLIP = 4,
+ GPU_BLEND_ALPHA_SORT = 8
} GPUBlendMode;
typedef struct GPUNodeStack {
@@ -107,10 +110,10 @@ typedef struct GPUNodeStack {
GPUNodeLink *GPU_attribute(int type, const char *name);
GPUNodeLink *GPU_uniform(float *num);
-GPUNodeLink *GPU_dynamic_uniform(float *num);
+GPUNodeLink *GPU_dynamic_uniform(float *num, int dynamictype, void *data);
GPUNodeLink *GPU_image(struct Image *ima, struct ImageUser *iuser);
GPUNodeLink *GPU_texture(int size, float *pixels);
-GPUNodeLink *GPU_dynamic_texture(struct GPUTexture *tex);
+GPUNodeLink *GPU_dynamic_texture(struct GPUTexture *tex, int dynamictype, void *data);
GPUNodeLink *GPU_socket(GPUNodeStack *sock);
GPUNodeLink *GPU_builtin(GPUBuiltin builtin);
@@ -119,7 +122,7 @@ int GPU_stack_link(GPUMaterial *mat, const char *name, GPUNodeStack *in, GPUNode
void GPU_material_output_link(GPUMaterial *material, GPUNodeLink *link);
void GPU_material_enable_alpha(GPUMaterial *material);
-GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[4]);
+GPUBlendMode GPU_material_alpha_blend(GPUMaterial *material, float obcol[4]);
/* High level functions to create and use GPU materials */
@@ -153,6 +156,72 @@ typedef struct GPUShadeResult {
void GPU_shadeinput_set(GPUMaterial *mat, struct Material *ma, GPUShadeInput *shi);
void GPU_shaderesult_set(GPUShadeInput *shi, GPUShadeResult *shr);
+/* Export GLSL shader */
+
+typedef enum GPUDynamicType {
+ GPU_DYNAMIC_NONE = 0,
+ GPU_DYNAMIC_OBJECT_VIEWMAT = 1,
+ GPU_DYNAMIC_OBJECT_MAT = 2,
+ GPU_DYNAMIC_OBJECT_VIEWIMAT = 3,
+ GPU_DYNAMIC_OBJECT_IMAT = 4,
+ GPU_DYNAMIC_OBJECT_COLOR = 5,
+ GPU_DYNAMIC_LAMP_FIRST = 6,
+ GPU_DYNAMIC_LAMP_DYNVEC = 6,
+ GPU_DYNAMIC_LAMP_DYNCO = 7,
+ GPU_DYNAMIC_LAMP_DYNIMAT = 8,
+ GPU_DYNAMIC_LAMP_DYNPERSMAT = 9,
+ GPU_DYNAMIC_LAMP_DYNENERGY = 10,
+ GPU_DYNAMIC_LAMP_DYNCOL = 11,
+ GPU_DYNAMIC_LAMP_LAST = 11,
+ GPU_DYNAMIC_SAMPLER_2DBUFFER = 12,
+ GPU_DYNAMIC_SAMPLER_2DIMAGE = 13,
+ GPU_DYNAMIC_SAMPLER_2DSHADOW = 14,
+} GPUDynamicType;
+
+typedef enum GPUDataType {
+ GPU_DATA_NONE = 0,
+ GPU_DATA_1I = 1, // 1 integer
+ GPU_DATA_1F = 2,
+ GPU_DATA_2F = 3,
+ GPU_DATA_3F = 4,
+ GPU_DATA_4F = 5,
+ GPU_DATA_9F = 6,
+ GPU_DATA_16F = 7,
+ GPU_DATA_4UB = 8,
+} GPUDataType;
+
+/* this structure gives information of each uniform found in the shader */
+typedef struct GPUInputUniform {
+ struct GPUInputUniform *next, *prev;
+ char varname[32]; /* name of uniform in shader */
+ GPUDynamicType type; /* type of uniform, data format and calculation derive from it */
+ GPUDataType datatype; /* type of uniform data */
+ struct Object *lamp; /* when type=GPU_DYNAMIC_LAMP_... or GPU_DYNAMIC_SAMPLER_2DSHADOW */
+ struct Image *image; /* when type=GPU_DYNAMIC_SAMPLER_2DIMAGE */
+ int texnumber; /* when type=GPU_DYNAMIC_SAMPLER, texture number: 0.. */
+ unsigned char *texpixels; /* for internally generated texture, pixel data in RGBA format */
+ int texsize; /* size in pixel of the texture in texpixels buffer: for 2D textures, this is S and T size (square texture) */
+} GPUInputUniform;
+
+typedef struct GPUInputAttribute {
+ struct GPUInputAttribute *next, *prev;
+ char varname[32]; /* name of attribute in shader */
+ int type; /* from CustomData.type, data type derives from it */
+ GPUDataType datatype; /* type of attribute data */
+ const char *name; /* layer name */
+ int number; /* generic attribute number */
+} GPUInputAttribute;
+
+typedef struct GPUShaderExport {
+ ListBase uniforms;
+ ListBase attributes;
+ char *vertex;
+ char *fragment;
+} GPUShaderExport;
+
+GPUShaderExport *GPU_shader_export(struct Scene *scene, struct Material *ma);
+void GPU_free_shader_export(GPUShaderExport *shader);
+
/* Lamps */
GPULamp *GPU_lamp_from_blender(struct Scene *scene, struct Object *ob, struct Object *par);
diff --git a/source/blender/gpu/SConscript b/source/blender/gpu/SConscript
index b48e1d5a8e2..adb52d577a1 100644
--- a/source/blender/gpu/SConscript
+++ b/source/blender/gpu/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('intern/*.c')
defs = [ 'GLEW_STATIC' ]
-incs = '../blenlib ../blenkernel ../makesdna ../include ../blenloader'
+incs = '../blenlib ../blenkernel ../makesdna ../makesrna ../include ../blenloader'
incs += ' #/extern/glew/include #intern/guardedalloc #intern/smoke/extern ../imbuf .'
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c
index 4d4561e66db..ce3a378ea00 100644
--- a/source/blender/gpu/intern/gpu_buffers.c
+++ b/source/blender/gpu/intern/gpu_buffers.c
@@ -240,7 +240,7 @@ GPUBuffer *GPU_buffer_alloc(int size)
size */
glGenBuffersARB(1, &buf->id);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, buf->id);
- glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, 0, GL_STATIC_DRAW_ARB);
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, size, NULL, GL_STATIC_DRAW_ARB);
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
}
else {
@@ -493,7 +493,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
/* nothing to do for legacy mode */
if(dm->drawObject->legacy)
- return 0;
+ return NULL;
cur_index_per_mat = MEM_mallocN(sizeof(int)*object->totmaterial,
"GPU_buffer_setup.cur_index_per_mat");
@@ -513,7 +513,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
/* bind the buffer and discard previous data,
avoids stalling gpu */
glBindBufferARB(target, buffer->id);
- glBufferDataARB(target, buffer->size, 0, GL_STATIC_DRAW_ARB);
+ glBufferDataARB(target, buffer->size, NULL, GL_STATIC_DRAW_ARB);
/* attempt to map the buffer */
if(!(varray = glMapBufferARB(target, GL_WRITE_ONLY_ARB))) {
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 360f3dbf63f..b47f6687720 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -64,101 +64,9 @@ extern char datatoc_gpu_shader_vertex_glsl[];
/* structs and defines */
-typedef enum GPUDataSource {
- GPU_SOURCE_VEC_UNIFORM,
- GPU_SOURCE_BUILTIN,
- GPU_SOURCE_TEX_PIXEL,
- GPU_SOURCE_TEX,
- GPU_SOURCE_ATTRIB
-} GPUDataSource;
-
static const char* GPU_DATATYPE_STR[17] = {"", "float", "vec2", "vec3", "vec4",
NULL, NULL, NULL, NULL, "mat3", NULL, NULL, NULL, NULL, NULL, NULL, "mat4"};
-struct GPUNode {
- struct GPUNode *next, *prev;
-
- const char *name;
- int tag;
-
- ListBase inputs;
- ListBase outputs;
-};
-
-struct GPUNodeLink {
- GPUNodeStack *socket;
-
- int attribtype;
- const char *attribname;
-
- int image;
-
- int texture;
- int texturesize;
-
- void *ptr1, *ptr2;
-
- int dynamic;
-
- int type;
- int users;
-
- GPUTexture *dynamictex;
-
- GPUBuiltin builtin;
-
- struct GPUOutput *output;
-};
-
-typedef struct GPUOutput {
- struct GPUOutput *next, *prev;
-
- GPUNode *node;
- int type; /* data type = length of vector/matrix */
- GPUNodeLink *link; /* output link */
- int id; /* unique id as created by code generator */
-} GPUOutput;
-
-typedef struct GPUInput {
- struct GPUInput *next, *prev;
-
- GPUNode *node;
-
- int type; /* datatype */
- int source; /* data source */
-
- int id; /* unique id as created by code generator */
- int texid; /* number for multitexture */
- int attribid; /* id for vertex attributes */
- int bindtex; /* input is responsible for binding the texture? */
- int definetex; /* input is responsible for defining the pixel? */
- int textarget; /* GL_TEXTURE_* */
- int textype; /* datatype */
-
- struct Image *ima; /* image */
- struct ImageUser *iuser;/* image user */
- float *dynamicvec; /* vector data in case it is dynamic */
- GPUTexture *tex; /* input texture, only set at runtime */
- int shaderloc; /* id from opengl */
- char shadername[32]; /* name in shader */
-
- float vec[16]; /* vector data */
- GPUNodeLink *link;
- int dynamictex; /* dynamic? */
- int attribtype; /* attribute type */
- char attribname[32]; /* attribute name */
- int attribfirst; /* this is the first one that is bound */
- GPUBuiltin builtin; /* builtin uniform */
-} GPUInput;
-
-struct GPUPass {
- struct GPUPass *next, *prev;
-
- ListBase inputs;
- struct GPUOutput *output;
- struct GPUShader *shader;
-};
-
/* GLSL code parsing for finding function definitions.
* These are stored in a hash for lookup when creating a material. */
@@ -185,7 +93,7 @@ static char *gpu_str_skip_token(char *str, char *token, int max)
/* skip a variable/function name */
while(*str) {
- if(ELEM6(*str, ' ', '(', ')', ',', '\t', '\n'))
+ if(ELEM7(*str, ' ', '(', ')', ',', '\t', '\n', '\r'))
break;
else {
if(token && len < max-1) {
@@ -203,7 +111,7 @@ static char *gpu_str_skip_token(char *str, char *token, int max)
/* skip the next special characters:
* note the missing ')' */
while(*str) {
- if(ELEM5(*str, ' ', '(', ',', '\t', '\n'))
+ if(ELEM6(*str, ' ', '(', ',', '\t', '\n', '\r'))
str++;
else
break;
@@ -245,8 +153,6 @@ static void gpu_parse_functions_string(GHash *hash, char *code)
if(!type && gpu_str_prefix(code, "sampler2DShadow"))
type= GPU_SHADOW2D;
- if(!type && gpu_str_prefix(code, "sampler1D"))
- type= GPU_TEX1D;
if(!type && gpu_str_prefix(code, "sampler2D"))
type= GPU_TEX2D;
@@ -298,9 +204,7 @@ static char *gpu_generate_function_prototyps(GHash *hash)
else if(function->paramqual[a] == FUNCTION_QUAL_INOUT)
BLI_dynstr_append(ds, "inout ");
- if(function->paramtype[a] == GPU_TEX1D)
- BLI_dynstr_append(ds, "sampler1D");
- else if(function->paramtype[a] == GPU_TEX2D)
+ if(function->paramtype[a] == GPU_TEX2D)
BLI_dynstr_append(ds, "sampler2D");
else if(function->paramtype[a] == GPU_SHADOW2D)
BLI_dynstr_append(ds, "sampler2DShadow");
@@ -542,7 +446,6 @@ static void codegen_print_uniforms_functions(DynStr *ds, ListBase *nodes)
/* create exactly one sampler for each texture */
if (codegen_input_has_texture(input) && input->bindtex)
BLI_dynstr_appendf(ds, "uniform %s samp%d;\n",
- (input->textype == GPU_TEX1D)? "sampler1D":
(input->textype == GPU_TEX2D)? "sampler2D": "sampler2DShadow",
input->texid);
}
@@ -947,6 +850,7 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, int type)
input->textarget = GL_TEXTURE_2D;
input->textype = type;
input->dynamictex = 1;
+ input->dynamicdata = link->ptr2;
MEM_freeN(link);
}
else if(link->texture) {
@@ -955,14 +859,9 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, int type)
input->source = GPU_SOURCE_TEX;
input->textype = type;
- if (type == GPU_TEX1D) {
- input->tex = GPU_texture_create_1D(link->texturesize, link->ptr1, NULL);
- input->textarget = GL_TEXTURE_1D;
- }
- else {
- input->tex = GPU_texture_create_2D(link->texturesize, link->texturesize, link->ptr2, NULL);
- input->textarget = GL_TEXTURE_2D;
- }
+ //input->tex = GPU_texture_create_2D(link->texturesize, link->texturesize, link->ptr2, NULL);
+ input->tex = GPU_texture_create_2D(link->texturesize, 1, link->ptr1, NULL);
+ input->textarget = GL_TEXTURE_2D;
MEM_freeN(link->ptr1);
MEM_freeN(link);
@@ -993,8 +892,11 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, int type)
input->source = GPU_SOURCE_VEC_UNIFORM;
memcpy(input->vec, link->ptr1, type*sizeof(float));
- if(link->dynamic)
+ if(link->dynamic) {
input->dynamicvec= link->ptr1;
+ input->dynamictype= link->dynamictype;
+ input->dynamicdata= link->ptr2;
+ }
MEM_freeN(link);
}
@@ -1102,12 +1004,12 @@ static void gpu_nodes_get_vertex_attributes(ListBase *nodes, GPUVertexAttribs *a
input->attribfirst = 1;
attribs->layer[a].type = input->attribtype;
- attribs->layer[a].glindex = input->attribid;
+ attribs->layer[a].attribid = input->attribid;
BLI_strncpy(attribs->layer[a].name, input->attribname,
sizeof(attribs->layer[a].name));
}
else
- input->attribid = attribs->layer[a].glindex;
+ input->attribid = attribs->layer[a].attribid;
}
}
}
@@ -1148,13 +1050,15 @@ GPUNodeLink *GPU_uniform(float *num)
return link;
}
-GPUNodeLink *GPU_dynamic_uniform(float *num)
+GPUNodeLink *GPU_dynamic_uniform(float *num, int dynamictype, void *data)
{
GPUNodeLink *link = GPU_node_link_create(0);
link->ptr1= num;
- link->ptr2= NULL;
+ link->ptr2= data;
link->dynamic= 1;
+ link->dynamictype = dynamictype;
+
return link;
}
@@ -1181,12 +1085,14 @@ GPUNodeLink *GPU_texture(int size, float *pixels)
return link;
}
-GPUNodeLink *GPU_dynamic_texture(GPUTexture *tex)
+GPUNodeLink *GPU_dynamic_texture(GPUTexture *tex, int dynamictype, void *data)
{
GPUNodeLink *link = GPU_node_link_create(0);
link->dynamic = 1;
link->dynamictex = tex;
+ link->dynamictype = dynamictype;
+ link->ptr2 = data;
return link;
}
@@ -1389,8 +1295,6 @@ GPUPass *GPU_generate_pass(ListBase *nodes, GPUNodeLink *outlink, GPUVertexAttri
fragmentcode = code_generate_fragment(nodes, outlink->output, name);
vertexcode = code_generate_vertex(nodes);
shader = GPU_shader_create(vertexcode, fragmentcode, datatoc_gpu_shader_material_glsl); /*FUNCTION_LIB);*/
- MEM_freeN(fragmentcode);
- MEM_freeN(vertexcode);
/* failed? */
if (!shader) {
@@ -1405,6 +1309,9 @@ GPUPass *GPU_generate_pass(ListBase *nodes, GPUNodeLink *outlink, GPUVertexAttri
pass->output = outlink->output;
pass->shader = shader;
+ pass->fragmentcode = fragmentcode;
+ pass->vertexcode = vertexcode;
+ pass->libcode = datatoc_gpu_shader_material_glsl;
/* extract dynamic inputs and throw away nodes */
GPU_nodes_extract_dynamic_inputs(pass, nodes);
@@ -1417,6 +1324,10 @@ void GPU_pass_free(GPUPass *pass)
{
GPU_shader_free(pass->shader);
GPU_inputs_free(&pass->inputs);
+ if (pass->fragmentcode)
+ MEM_freeN(pass->fragmentcode);
+ if (pass->vertexcode)
+ MEM_freeN(pass->vertexcode);
MEM_freeN(pass);
}
diff --git a/source/blender/gpu/intern/gpu_codegen.h b/source/blender/gpu/intern/gpu_codegen.h
index b0a131f5989..1e44eba89d4 100644
--- a/source/blender/gpu/intern/gpu_codegen.h
+++ b/source/blender/gpu/intern/gpu_codegen.h
@@ -39,12 +39,15 @@
#define __GPU_CODEGEN_H__
#include "DNA_listBase.h"
+#include "GPU_material.h"
+#include "GL/glew.h"
struct ListBase;
struct GPUShader;
struct GPUOutput;
struct GPUNode;
struct GPUVertexAttribs;
+struct GPUFrameBuffer;
#define MAX_FUNCTION_NAME 64
#define MAX_PARAMETER 32
@@ -68,7 +71,105 @@ GPUFunction *GPU_lookup_function(const char *name);
at the end if used.
*/
-struct GPUPass;
+typedef enum GPUDataSource {
+ GPU_SOURCE_VEC_UNIFORM,
+ GPU_SOURCE_BUILTIN,
+ GPU_SOURCE_TEX_PIXEL,
+ GPU_SOURCE_TEX,
+ GPU_SOURCE_ATTRIB
+} GPUDataSource;
+
+struct GPUNode {
+ struct GPUNode *next, *prev;
+
+ const char *name;
+ int tag;
+
+ ListBase inputs;
+ ListBase outputs;
+};
+
+struct GPUNodeLink {
+ GPUNodeStack *socket;
+
+ int attribtype;
+ const char *attribname;
+
+ int image;
+
+ int texture;
+ int texturesize;
+
+ void *ptr1, *ptr2;
+
+ int dynamic;
+ int dynamictype;
+
+ int type;
+ int users;
+
+ GPUTexture *dynamictex;
+
+ GPUBuiltin builtin;
+
+ struct GPUOutput *output;
+};
+
+typedef struct GPUOutput {
+ struct GPUOutput *next, *prev;
+
+ GPUNode *node;
+ int type; /* data type = length of vector/matrix */
+ GPUNodeLink *link; /* output link */
+ int id; /* unique id as created by code generator */
+} GPUOutput;
+
+typedef struct GPUInput {
+ struct GPUInput *next, *prev;
+
+ GPUNode *node;
+
+ int type; /* datatype */
+ int source; /* data source */
+
+ int id; /* unique id as created by code generator */
+ int texid; /* number for multitexture */
+ int attribid; /* id for vertex attributes */
+ int bindtex; /* input is responsible for binding the texture? */
+ int definetex; /* input is responsible for defining the pixel? */
+ int textarget; /* GL_TEXTURE_* */
+ int textype; /* datatype */
+
+ struct Image *ima; /* image */
+ struct ImageUser *iuser;/* image user */
+ float *dynamicvec; /* vector data in case it is dynamic */
+ int dynamictype; /* origin of the dynamic uniform (GPUDynamicType) */
+ void *dynamicdata; /* data source of the dynamic uniform */
+ GPUTexture *tex; /* input texture, only set at runtime */
+ int shaderloc; /* id from opengl */
+ char shadername[32]; /* name in shader */
+
+ float vec[16]; /* vector data */
+ GPUNodeLink *link;
+ int dynamictex; /* dynamic? */
+ int attribtype; /* attribute type */
+ char attribname[32]; /* attribute name */
+ int attribfirst; /* this is the first one that is bound */
+ GPUBuiltin builtin; /* builtin uniform */
+} GPUInput;
+
+struct GPUPass {
+ struct GPUPass *next, *prev;
+
+ ListBase inputs;
+ struct GPUOutput *output;
+ struct GPUShader *shader;
+ char *fragmentcode;
+ char *vertexcode;
+ const char *libcode;
+};
+
+
typedef struct GPUPass GPUPass;
GPUPass *GPU_generate_pass(ListBase *nodes, struct GPUNodeLink *outlink,
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 7af5ef6ea14..4f79d577ae5 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -95,7 +95,7 @@ void GPU_render_text(MTFace *tface, int mode,
const char *textstr, int textlen, unsigned int *col,
float *v1, float *v2, float *v3, float *v4, int glattrib)
{
- if ((mode & TF_BMFONT) && (textlen>0) && tface->tpage) {
+ if ((mode & GEMAT_TEXT) && (textlen>0) && tface->tpage) {
Image* ima = (Image*)tface->tpage;
int index, character;
float centerx, centery, sizex, sizey, transx, transy, movex, movey, advance;
@@ -245,7 +245,7 @@ static struct GPUTextureState {
int domipmap, linearmipmap;
- int alphamode;
+ int alphablend;
float anisotropic;
MTFace *lasttface;
} GTS = {0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, 1, 0, -1, 1.f, NULL};
@@ -352,7 +352,7 @@ static void gpu_clear_tpage(void)
GTS.curtilemode= 0;
GTS.curtileXRep=0;
GTS.curtileYRep=0;
- GTS.alphamode= -1;
+ GTS.alphablend= -1;
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
@@ -361,19 +361,19 @@ static void gpu_clear_tpage(void)
glDisable(GL_ALPHA_TEST);
}
-static void gpu_set_blend_mode(GPUBlendMode blendmode)
+static void gpu_set_alpha_blend(GPUBlendMode alphablend)
{
- if(blendmode == GPU_BLEND_SOLID) {
+ if(alphablend == GPU_BLEND_SOLID) {
glDisable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
- else if(blendmode==GPU_BLEND_ADD) {
+ else if(alphablend==GPU_BLEND_ADD) {
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
glDisable(GL_ALPHA_TEST);
}
- else if(blendmode==GPU_BLEND_ALPHA) {
+ else if(ELEM(alphablend, GPU_BLEND_ALPHA, GPU_BLEND_ALPHA_SORT)) {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -389,21 +389,21 @@ static void gpu_set_blend_mode(GPUBlendMode blendmode)
glAlphaFunc(GL_GREATER, U.glalphaclip);
}
}
- else if(blendmode==GPU_BLEND_CLIP) {
+ else if(alphablend==GPU_BLEND_CLIP) {
glDisable(GL_BLEND);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.5f);
}
}
-static void gpu_verify_alpha_mode(MTFace *tface)
+static void gpu_verify_alpha_blend(int alphablend)
{
/* verify alpha blending modes */
- if(GTS.alphamode == tface->transp)
+ if(GTS.alphablend == alphablend)
return;
- gpu_set_blend_mode(tface->transp);
- GTS.alphamode= tface->transp;
+ gpu_set_alpha_blend(alphablend);
+ GTS.alphablend= alphablend;
}
static void gpu_verify_reflection(Image *ima)
@@ -608,7 +608,7 @@ static void gpu_verify_repeat(Image *ima)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
}
-int GPU_set_tpage(MTFace *tface, int mipmap)
+int GPU_set_tpage(MTFace *tface, int mipmap, int alphablend)
{
Image *ima;
@@ -621,7 +621,7 @@ int GPU_set_tpage(MTFace *tface, int mipmap)
ima= tface->tpage;
GTS.lasttface= tface;
- gpu_verify_alpha_mode(tface);
+ gpu_verify_alpha_blend(alphablend);
gpu_verify_reflection(ima);
if(GPU_verify_image(ima, NULL, tface->tile, 1, mipmap)) {
@@ -945,12 +945,12 @@ static struct GPUMaterialState {
float (*gviewmat)[4];
float (*gviewinv)[4];
- GPUBlendMode *blendmode;
- GPUBlendMode blendmode_fixed[FIXEDMAT];
+ GPUBlendMode *alphablend;
+ GPUBlendMode alphablend_fixed[FIXEDMAT];
int alphapass;
int lastmatnr, lastretval;
- GPUBlendMode lastblendmode;
+ GPUBlendMode lastalphablend;
} GMS = {NULL};
/* fixed function material, alpha handed by caller */
@@ -1000,7 +1000,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
{
Material *ma;
GPUMaterial *gpumat;
- GPUBlendMode blendmode;
+ GPUBlendMode alphablend;
int a;
int gamma = scene->r.color_mgt_flag & R_COLOR_MANAGEMENT;
@@ -1008,7 +1008,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
memset(&GMS, 0, sizeof(GMS));
GMS.lastmatnr = -1;
GMS.lastretval = -1;
- GMS.lastblendmode = GPU_BLEND_SOLID;
+ GMS.lastalphablend = GPU_BLEND_SOLID;
GMS.gob = ob;
GMS.gscene = scene;
@@ -1024,12 +1024,12 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
if(GMS.totmat > FIXEDMAT) {
GMS.matbuf= MEM_callocN(sizeof(GPUMaterialFixed)*GMS.totmat, "GMS.matbuf");
GMS.gmatbuf= MEM_callocN(sizeof(*GMS.gmatbuf)*GMS.totmat, "GMS.matbuf");
- GMS.blendmode= MEM_callocN(sizeof(*GMS.blendmode)*GMS.totmat, "GMS.matbuf");
+ GMS.alphablend= MEM_callocN(sizeof(*GMS.alphablend)*GMS.totmat, "GMS.matbuf");
}
else {
GMS.matbuf= GMS.matbuf_fixed;
GMS.gmatbuf= GMS.gmatbuf_fixed;
- GMS.blendmode= GMS.blendmode_fixed;
+ GMS.alphablend= GMS.alphablend_fixed;
}
/* no materials assigned? */
@@ -1044,7 +1044,7 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
GPU_material_from_blender(GMS.gscene, &defmaterial);
}
- GMS.blendmode[0]= GPU_BLEND_SOLID;
+ GMS.alphablend[0]= GPU_BLEND_SOLID;
}
/* setup materials */
@@ -1060,13 +1060,13 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
if(gpumat) {
/* do glsl only if creating it succeed, else fallback */
GMS.gmatbuf[a]= ma;
- blendmode = GPU_material_blend_mode(gpumat, ob->col);
+ alphablend = GPU_material_alpha_blend(gpumat, ob->col);
}
else {
/* fixed function opengl materials */
gpu_material_to_fixed(&GMS.matbuf[a], ma, gamma, ob);
- blendmode = (ma->alpha == 1.0f)? GPU_BLEND_SOLID: GPU_BLEND_ALPHA;
+ alphablend = (ma->alpha == 1.0f)? GPU_BLEND_SOLID: GPU_BLEND_ALPHA;
if(do_alpha_pass && GMS.alphapass)
GMS.matbuf[a].diff[3]= ma->alpha;
else
@@ -1076,8 +1076,8 @@ void GPU_begin_object_materials(View3D *v3d, RegionView3D *rv3d, Scene *scene, O
/* setting do_alpha_pass = 1 indicates this object needs to be
* drawn in a second alpha pass for improved blending */
if(do_alpha_pass) {
- GMS.blendmode[a]= blendmode;
- if(ELEM(blendmode, GPU_BLEND_ALPHA, GPU_BLEND_ADD) && !GMS.alphapass)
+ GMS.alphablend[a]= alphablend;
+ if(ELEM3(alphablend, GPU_BLEND_ALPHA, GPU_BLEND_ADD, GPU_BLEND_ALPHA_SORT) && !GMS.alphapass)
*do_alpha_pass= 1;
}
}
@@ -1090,7 +1090,7 @@ int GPU_enable_material(int nr, void *attribs)
{
GPUVertexAttribs *gattribs = attribs;
GPUMaterial *gpumat;
- GPUBlendMode blendmode;
+ GPUBlendMode alphablend;
/* no GPU_begin_object_materials, use default material */
if(!GMS.matbuf) {
@@ -1131,7 +1131,7 @@ int GPU_enable_material(int nr, void *attribs)
/* draw materials with alpha in alpha pass */
GMS.lastmatnr = nr;
- GMS.lastretval = ELEM(GMS.blendmode[nr], GPU_BLEND_SOLID, GPU_BLEND_CLIP);
+ GMS.lastretval = ELEM(GMS.alphablend[nr], GPU_BLEND_SOLID, GPU_BLEND_CLIP);
if(GMS.alphapass)
GMS.lastretval = !GMS.lastretval;
@@ -1145,6 +1145,7 @@ int GPU_enable_material(int nr, void *attribs)
GPU_material_bind(gpumat, GMS.gob->lay, GMS.glay, 1.0, !(GMS.gob->mode & OB_MODE_TEXTURE_PAINT));
GPU_material_bind_uniforms(gpumat, GMS.gob->obmat, GMS.gviewmat, GMS.gviewinv, GMS.gob->col);
GMS.gboundmat= mat;
+ alphablend= mat->game.alpha_blend;
if(GMS.alphapass) glDepthMask(1);
}
@@ -1153,28 +1154,29 @@ int GPU_enable_material(int nr, void *attribs)
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, GMS.matbuf[nr].diff);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, GMS.matbuf[nr].spec);
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, GMS.matbuf[nr].hard);
+ alphablend= GPU_BLEND_SOLID;
}
/* set (alpha) blending mode */
- blendmode = (GMS.alphapass)? GPU_BLEND_ALPHA: GPU_BLEND_SOLID;
- GPU_set_material_blend_mode(blendmode);
+ if(!GMS.alphapass) alphablend= GPU_BLEND_SOLID;
+ GPU_set_material_alpha_blend(alphablend);
}
return GMS.lastretval;
}
-void GPU_set_material_blend_mode(int blendmode)
+void GPU_set_material_alpha_blend(int alphablend)
{
- if(GMS.lastblendmode == blendmode)
+ if(GMS.lastalphablend == alphablend)
return;
- gpu_set_blend_mode(blendmode);
- GMS.lastblendmode = blendmode;
+ gpu_set_alpha_blend(alphablend);
+ GMS.lastalphablend = alphablend;
}
-int GPU_get_material_blend_mode(void)
+int GPU_get_material_alpha_blend(void)
{
- return GMS.lastblendmode;
+ return GMS.lastalphablend;
}
void GPU_disable_material(void)
@@ -1188,7 +1190,7 @@ void GPU_disable_material(void)
GMS.gboundmat= NULL;
}
- GPU_set_material_blend_mode(GPU_BLEND_SOLID);
+ GPU_set_material_alpha_blend(GPU_BLEND_SOLID);
}
void GPU_end_object_materials(void)
@@ -1198,12 +1200,12 @@ void GPU_end_object_materials(void)
if(GMS.matbuf && GMS.matbuf != GMS.matbuf_fixed) {
MEM_freeN(GMS.matbuf);
MEM_freeN(GMS.gmatbuf);
- MEM_freeN(GMS.blendmode);
+ MEM_freeN(GMS.alphablend);
}
GMS.matbuf= NULL;
GMS.gmatbuf= NULL;
- GMS.blendmode= NULL;
+ GMS.alphablend= NULL;
/* resetting the texture matrix after the glScale needed for tiled textures */
if(GTS.tilemode)
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index c9f1b093b7a..9cd6240d37d 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -423,7 +423,7 @@ static GPUTexture *GPU_texture_create_nD(int w, int h, int n, float *fpixels, in
if (tex->target != GL_TEXTURE_1D) {
/* CLAMP_TO_BORDER is an OpenGL 1.3 core feature */
- GLenum wrapmode = (depth)? GL_CLAMP_TO_EDGE: GL_CLAMP_TO_BORDER;
+ GLenum wrapmode = (depth || tex->h == 1)? GL_CLAMP_TO_EDGE: GL_CLAMP_TO_BORDER;
glTexParameteri(tex->target, GL_TEXTURE_WRAP_S, wrapmode);
glTexParameteri(tex->target, GL_TEXTURE_WRAP_T, wrapmode);
@@ -514,8 +514,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
if (pixels)
MEM_freeN(pixels);
- if (tex)
- GPU_texture_unbind(tex);
+ GPU_texture_unbind(tex);
return tex;
}
@@ -685,6 +684,11 @@ int GPU_texture_opengl_height(GPUTexture *tex)
return tex->h;
}
+int GPU_texture_opengl_bindcode(GPUTexture *tex)
+{
+ return tex->bindcode;
+}
+
GPUFrameBuffer *GPU_texture_framebuffer(GPUTexture *tex)
{
return tex->fb;
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 15b96b6d808..40186c5a187 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -175,7 +175,7 @@ static void gpu_material_set_attrib_id(GPUMaterial *material)
* removed by the glsl compiler by dead code elimination */
for(a=0, b=0; a<attribs->totlayer; a++) {
- sprintf(name, "att%d", attribs->layer[a].glindex);
+ sprintf(name, "att%d", attribs->layer[a].attribid);
attribs->layer[a].glindex = GPU_shader_get_attribute(shader, name);
if(attribs->layer[a].glindex >= 0) {
@@ -358,7 +358,7 @@ void GPU_material_enable_alpha(GPUMaterial *material)
material->alpha= 1;
}
-GPUBlendMode GPU_material_blend_mode(GPUMaterial *material, float obcol[4])
+GPUBlendMode GPU_material_alpha_blend(GPUMaterial *material, float obcol[4])
{
if(material->alpha || (material->obcolalpha && obcol[3] < 1.0f))
return GPU_BLEND_ALPHA;
@@ -386,12 +386,12 @@ static GPUNodeLink *lamp_get_visibility(GPUMaterial *mat, GPULamp *lamp, GPUNode
/* from get_lamp_visibility */
if(lamp->type==LA_SUN || lamp->type==LA_HEMI) {
mat->dynproperty |= DYN_LAMP_VEC;
- GPU_link(mat, "lamp_visibility_sun_hemi", GPU_dynamic_uniform(lamp->dynvec), lv, dist, &visifac);
+ GPU_link(mat, "lamp_visibility_sun_hemi", GPU_dynamic_uniform(lamp->dynvec, GPU_DYNAMIC_LAMP_DYNVEC, lamp->ob), lv, dist, &visifac);
return visifac;
}
else {
mat->dynproperty |= DYN_LAMP_CO;
- GPU_link(mat, "lamp_visibility_other", GPU_builtin(GPU_VIEW_POSITION), GPU_dynamic_uniform(lamp->dynco), lv, dist, &visifac);
+ GPU_link(mat, "lamp_visibility_other", GPU_builtin(GPU_VIEW_POSITION), GPU_dynamic_uniform(lamp->dynco, GPU_DYNAMIC_LAMP_DYNCO, lamp->ob), lv, dist, &visifac);
if(lamp->type==LA_AREA)
return visifac;
@@ -426,11 +426,11 @@ static GPUNodeLink *lamp_get_visibility(GPUMaterial *mat, GPULamp *lamp, GPUNode
if(lamp->type == LA_SPOT) {
if(lamp->mode & LA_SQUARE) {
mat->dynproperty |= DYN_LAMP_VEC|DYN_LAMP_IMAT;
- GPU_link(mat, "lamp_visibility_spot_square", GPU_dynamic_uniform(lamp->dynvec), GPU_dynamic_uniform((float*)lamp->dynimat), *lv, &inpr);
+ GPU_link(mat, "lamp_visibility_spot_square", GPU_dynamic_uniform(lamp->dynvec, GPU_DYNAMIC_LAMP_DYNVEC, lamp->ob), GPU_dynamic_uniform((float*)lamp->dynimat, GPU_DYNAMIC_LAMP_DYNIMAT, lamp->ob), *lv, &inpr);
}
else {
mat->dynproperty |= DYN_LAMP_VEC;
- GPU_link(mat, "lamp_visibility_spot_circle", GPU_dynamic_uniform(lamp->dynvec), *lv, &inpr);
+ GPU_link(mat, "lamp_visibility_spot_circle", GPU_dynamic_uniform(lamp->dynvec, GPU_DYNAMIC_LAMP_DYNVEC, lamp->ob), *lv, &inpr);
}
GPU_link(mat, "lamp_visibility_spot", GPU_uniform(&lamp->spotsi), GPU_uniform(&lamp->spotbl), inpr, visifac, &visifac);
@@ -646,7 +646,7 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
float area[4][4]= {{0.0f}}, areasize= 0.0f;
mat->dynproperty |= DYN_LAMP_VEC|DYN_LAMP_CO;
- GPU_link(mat, "shade_inp_area", GPU_builtin(GPU_VIEW_POSITION), GPU_dynamic_uniform(lamp->dynco), GPU_dynamic_uniform(lamp->dynvec), vn, GPU_uniform((float*)area),
+ GPU_link(mat, "shade_inp_area", GPU_builtin(GPU_VIEW_POSITION), GPU_dynamic_uniform(lamp->dynco, GPU_DYNAMIC_LAMP_DYNCO, lamp->ob), GPU_dynamic_uniform(lamp->dynvec, GPU_DYNAMIC_LAMP_DYNVEC, lamp->ob), vn, GPU_uniform((float*)area),
GPU_uniform(&areasize), GPU_uniform(&lamp->k), &inp);
}
@@ -684,13 +684,13 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
GPU_link(mat, "test_shadowbuf",
GPU_builtin(GPU_VIEW_POSITION),
- GPU_dynamic_texture(lamp->tex),
- GPU_dynamic_uniform((float*)lamp->dynpersmat),
+ 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), &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,
@@ -719,7 +719,7 @@ 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), &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);
}
}
@@ -729,7 +729,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), shi->specrgb, &outcol);
+ 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_clamped", shr->spec, outcol, &shr->spec);
}
else {
@@ -752,11 +752,11 @@ static void shade_one_light(GPUShadeInput *shi, GPUShadeResult *shr, GPULamp *la
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), spec, &outcol);
+ 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_clamped", shr->spec, outcol, &shr->spec);
}
else {
- GPU_link(mat, "shade_add_spec", t, GPU_dynamic_uniform(lamp->dyncol), shi->specrgb, &outcol);
+ 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_clamped", shr->spec, outcol, &shr->spec);
}
}
@@ -1676,3 +1676,187 @@ int GPU_lamp_shadow_layer(GPULamp *lamp)
return -1;
}
+/* export the GLSL shader */
+
+GPUShaderExport *GPU_shader_export(struct Scene *scene, struct Material *ma)
+{
+ static struct {
+ GPUBuiltin gputype;
+ GPUDynamicType dynamictype;
+ GPUDataType datatype;
+ } builtins[] = {
+ { GPU_VIEW_MATRIX, GPU_DYNAMIC_OBJECT_VIEWMAT, GPU_DATA_16F },
+ { GPU_INVERSE_VIEW_MATRIX, GPU_DYNAMIC_OBJECT_VIEWIMAT, GPU_DATA_16F },
+ { GPU_OBJECT_MATRIX, GPU_DYNAMIC_OBJECT_MAT, GPU_DATA_16F },
+ { GPU_INVERSE_OBJECT_MATRIX, GPU_DYNAMIC_OBJECT_IMAT, GPU_DATA_16F },
+ { GPU_OBCOLOR, GPU_DYNAMIC_OBJECT_COLOR, GPU_DATA_4F },
+ { 0 }
+ };
+
+ GPUShaderExport *shader = NULL;
+ GPUPass *pass;
+ GPUInput *input;
+ GPUMaterial *mat;
+ GPUInputUniform *uniform;
+ GPUInputAttribute *attribute;
+ GLint lastbindcode;
+ int i, liblen, fraglen;
+
+ if(!GPU_glsl_support())
+ return NULL;
+
+ mat = GPU_material_from_blender(scene, ma);
+ pass = (mat)? mat->pass: NULL;
+
+ if(pass && pass->fragmentcode && pass->vertexcode) {
+ shader = MEM_callocN(sizeof(GPUShaderExport), "GPUShaderExport");
+
+ for(input = pass->inputs.first; input; input = input->next) {
+ uniform = MEM_callocN(sizeof(GPUInputUniform), "GPUInputUniform");
+
+ if(input->ima) {
+ /* image sampler uniform */
+ uniform->type = GPU_DYNAMIC_SAMPLER_2DIMAGE;
+ uniform->datatype = GPU_DATA_1I;
+ uniform->image = input->ima;
+ uniform->texnumber = input->texid;
+ BLI_strncpy(uniform->varname, input->shadername, sizeof(uniform->varname));
+ }
+ else if(input->tex) {
+ /* generated buffer */
+ uniform->texnumber = input->texid;
+ uniform->datatype = GPU_DATA_1I;
+ BLI_strncpy(uniform->varname, input->shadername, sizeof(uniform->varname));
+
+ switch(input->textype) {
+ case GPU_SHADOW2D:
+ uniform->type = GPU_DYNAMIC_SAMPLER_2DSHADOW;
+ uniform->lamp = input->dynamicdata;
+ break;
+ case GPU_TEX2D:
+ if(GPU_texture_opengl_bindcode(input->tex)) {
+ uniform->type = GPU_DYNAMIC_SAMPLER_2DBUFFER;
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &lastbindcode);
+ glBindTexture(GL_TEXTURE_2D, GPU_texture_opengl_bindcode(input->tex));
+ uniform->texsize = GPU_texture_opengl_width(input->tex) * GPU_texture_opengl_height(input->tex);
+ uniform->texpixels = MEM_mallocN(uniform->texsize*4, "RGBApixels");
+ glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, uniform->texpixels);
+ glBindTexture(GL_TEXTURE_2D, lastbindcode);
+ }
+ break;
+ }
+ }
+ else {
+ uniform->type = input->dynamictype;
+ BLI_strncpy(uniform->varname, input->shadername, sizeof(uniform->varname));
+ switch(input->type) {
+ case 1:
+ uniform->datatype = GPU_DATA_1F;
+ break;
+ case 2:
+ uniform->datatype = GPU_DATA_2F;
+ break;
+ case 3:
+ uniform->datatype = GPU_DATA_3F;
+ break;
+ case 4:
+ uniform->datatype = GPU_DATA_4F;
+ break;
+ case 9:
+ uniform->datatype = GPU_DATA_9F;
+ break;
+ case 16:
+ uniform->datatype = GPU_DATA_16F;
+ break;
+ }
+
+ if(uniform->type >= GPU_DYNAMIC_LAMP_FIRST && uniform->type <= GPU_DYNAMIC_LAMP_LAST)
+ uniform->lamp = input->dynamicdata;
+ }
+
+ if(uniform->type != GPU_DYNAMIC_NONE)
+ BLI_addtail(&shader->uniforms, uniform);
+ else
+ MEM_freeN(uniform);
+ }
+
+ /* process builtin uniform */
+ for(i=0; builtins[i].gputype; i++) {
+ if(mat->builtins & builtins[i].gputype) {
+ uniform = MEM_callocN(sizeof(GPUInputUniform), "GPUInputUniform");
+ uniform->type = builtins[i].dynamictype;
+ uniform->datatype = builtins[i].datatype;
+ BLI_strncpy(uniform->varname, GPU_builtin_name(builtins[i].gputype), sizeof(uniform->varname));
+ BLI_addtail(&shader->uniforms, uniform);
+ }
+ }
+
+ // now link fragement shader with library shader
+ // TBD: remove the function that are not used in the main function
+ liblen = (pass->libcode) ? strlen(pass->libcode) : 0;
+ fraglen = strlen(pass->fragmentcode);
+ shader->fragment = (char *)MEM_mallocN(liblen+fraglen+1, "GPUFragShader");
+ if(pass->libcode)
+ memcpy(shader->fragment, pass->libcode, liblen);
+ memcpy(&shader->fragment[liblen], pass->fragmentcode, fraglen);
+ shader->fragment[liblen+fraglen] = 0;
+
+ // export the attribute
+ for(i=0; i<mat->attribs.totlayer; i++) {
+ attribute = MEM_callocN(sizeof(GPUInputAttribute), "GPUInputAttribute");
+ attribute->type = mat->attribs.layer[i].type;
+ attribute->number = mat->attribs.layer[i].glindex;
+ BLI_snprintf(attribute->varname, sizeof(attribute->varname), "att%d", mat->attribs.layer[i].attribid);
+
+ switch(attribute->type) {
+ case CD_TANGENT:
+ attribute->datatype = GPU_DATA_4F;
+ break;
+ case CD_MTFACE:
+ attribute->datatype = GPU_DATA_2F;
+ attribute->name = mat->attribs.layer[i].name;
+ break;
+ case CD_MCOL:
+ attribute->datatype = GPU_DATA_4UB;
+ attribute->name = mat->attribs.layer[i].name;
+ break;
+ case CD_ORCO:
+ attribute->datatype = GPU_DATA_3F;
+ break;
+ }
+
+ if(attribute->datatype != GPU_DATA_NONE)
+ BLI_addtail(&shader->attributes, attribute);
+ else
+ MEM_freeN(attribute);
+ }
+
+ // export the vertex shader
+ shader->vertex = BLI_strdup(pass->vertexcode);
+ }
+
+ return shader;
+}
+
+void GPU_free_shader_export(GPUShaderExport *shader)
+{
+ GPUInputUniform *uniform;
+
+ if(shader == NULL)
+ return;
+
+ for(uniform = shader->uniforms.first; uniform; uniform=uniform->next)
+ if(uniform->texpixels)
+ MEM_freeN(uniform->texpixels);
+
+ BLI_freelistN(&shader->uniforms);
+ BLI_freelistN(&shader->attributes);
+
+ if(shader->vertex)
+ MEM_freeN(shader->vertex);
+ if(shader->fragment)
+ MEM_freeN(shader->fragment);
+
+ MEM_freeN(shader);
+}
+
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl b/source/blender/gpu/intern/gpu_shader_material.glsl
index 815b74a1bf4..c5c822d9224 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl
+++ b/source/blender/gpu/intern/gpu_shader_material.glsl
@@ -308,22 +308,22 @@ void normal(vec3 dir, vec3 nor, out vec3 outnor, out float outdot)
outdot = -dot(dir, nor);
}
-void curves_vec(float fac, vec3 vec, sampler1D curvemap, out vec3 outvec)
+void curves_vec(float fac, vec3 vec, sampler2D curvemap, out vec3 outvec)
{
- outvec.x = texture1D(curvemap, (vec.x + 1.0)*0.5).x;
- outvec.y = texture1D(curvemap, (vec.y + 1.0)*0.5).y;
- outvec.z = texture1D(curvemap, (vec.z + 1.0)*0.5).z;
+ outvec.x = texture2D(curvemap, vec2((vec.x + 1.0)*0.5, 0.0)).x;
+ outvec.y = texture2D(curvemap, vec2((vec.y + 1.0)*0.5, 0.0)).y;
+ outvec.z = texture2D(curvemap, vec2((vec.z + 1.0)*0.5, 0.0)).z;
if (fac != 1.0)
outvec = (outvec*fac) + (vec*(1.0-fac));
}
-void curves_rgb(float fac, vec4 col, sampler1D curvemap, out vec4 outcol)
+void curves_rgb(float fac, vec4 col, sampler2D curvemap, out vec4 outcol)
{
- outcol.r = texture1D(curvemap, texture1D(curvemap, col.r).a).r;
- outcol.g = texture1D(curvemap, texture1D(curvemap, col.g).a).g;
- outcol.b = texture1D(curvemap, texture1D(curvemap, col.b).a).b;
+ outcol.r = texture2D(curvemap, vec2(texture2D(curvemap, vec2(col.r, 0.0)).a, 0.0)).r;
+ outcol.g = texture2D(curvemap, vec2(texture2D(curvemap, vec2(col.g, 0.0)).a, 0.0)).g;
+ outcol.b = texture2D(curvemap, vec2(texture2D(curvemap, vec2(col.b, 0.0)).a, 0.0)).b;
if (fac != 1.0)
outcol = (outcol*fac) + (col*(1.0-fac));
@@ -635,9 +635,9 @@ void mix_linear(float fac, vec4 col1, vec4 col2, out vec4 outcol)
outcol.b= col1.b + fac*(2.0*(col2.b) - 1.0);
}
-void valtorgb(float fac, sampler1D colormap, out vec4 outcol, out float outalpha)
+void valtorgb(float fac, sampler2D colormap, out vec4 outcol, out float outalpha)
{
- outcol = texture1D(colormap, fac);
+ outcol = texture2D(colormap, vec2(fac, 0.0));
outalpha = outcol.a;
}
@@ -1320,9 +1320,9 @@ void lamp_falloff_sliders(float lampdist, float ld1, float ld2, float dist, out
visifac *= lampdistkw/(lampdistkw + ld2*dist*dist);
}
-void lamp_falloff_curve(float lampdist, sampler1D curvemap, float dist, out float visifac)
+void lamp_falloff_curve(float lampdist, sampler2D curvemap, float dist, out float visifac)
{
- visifac = texture1D(curvemap, dist/lampdist).x;
+ visifac = texture2D(curvemap, vec2(dist/lampdist, 0.0)).x;
}
void lamp_visibility_sphere(float lampdist, float dist, float visifac, out float outvisifac)
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl.c b/source/blender/gpu/intern/gpu_shader_material.glsl.c
index 87a8ed65532..b551ee9dda1 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl.c
+++ b/source/blender/gpu/intern/gpu_shader_material.glsl.c
@@ -1,935 +1,939 @@
/* DataToC output of file <gpu_shader_material_glsl> */
-int datatoc_gpu_shader_material_glsl_size= 39789;
+int datatoc_gpu_shader_material_glsl_size= 39910;
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, 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,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,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,
+ 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, 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,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,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, 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,
+ 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, 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,
+ 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,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,
+ 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,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,100,105,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, 49, 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, 49, 68, 40, 99,117,114,118,101,109,
- 97,112, 44, 32, 40,118,101, 99, 46,120, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 41, 46,120, 59, 10, 9,111,117,116,118,101,
- 99, 46,121, 32, 61, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32, 40,118,101, 99, 46,121,
- 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 41, 46,121, 59, 10, 9,111,117,116,118,101, 99, 46,122, 32, 61, 32,116,101,120,116,
-117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32, 40,118,101, 99, 46,122, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46,
- 53, 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, 49, 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, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,
-118,101,109, 97,112, 44, 32, 99,111,108, 46,114, 41, 46, 97, 41, 46,114, 59, 10, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32,
-116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,
-114,118,101,109, 97,112, 44, 32, 99,111,108, 46,103, 41, 46, 97, 41, 46,103, 59, 10, 9,111,117,116, 99,111,108, 46, 98, 32, 61,
- 32,116,101,120,116,117,114,101, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,116,101,120,116,117,114,101, 49, 68, 40, 99,
-117,114,118,101,109, 97,112, 44, 32, 99,111,108, 46, 98, 41, 46, 97, 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,
+ 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,100,105,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,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,
+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, 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,
+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,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,
+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, 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, 49, 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, 49, 68, 40, 99,111,108,111,114,109, 97,112, 44, 32,102, 97, 99, 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,
+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,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,
+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,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,
+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,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,109, 86,105,101,119, 32, 42, 32,109, 79, 98,106, 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,109, 79, 98,106, 73,110,118, 32, 42, 32,
-109, 86,105,101,119, 73,110,118, 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,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, 49, 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, 49, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,100,105,115,116, 47,108, 97,109,112,100,105,115,116, 41, 46,120,
+ 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,109, 86,105,101,119, 32, 42, 32,109, 79, 98,106, 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,109, 79, 98,106, 73,110,118, 32, 42, 32,109, 86,105,101,119, 73,110,118, 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,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,
diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt
index 1547d2ee9ce..26be64bc268 100644
--- a/source/blender/imbuf/CMakeLists.txt
+++ b/source/blender/imbuf/CMakeLists.txt
@@ -58,13 +58,11 @@ set(SRC
intern/indexer.c
intern/indexer_dv.c
intern/iris.c
- intern/jp2.c
intern/jpeg.c
intern/md5.c
intern/metadata.c
intern/module.c
intern/png.c
- intern/radiance_hdr.c
intern/readimage.c
intern/rectop.c
intern/rotate.c
@@ -72,7 +70,6 @@ set(SRC
intern/targa.c
intern/thumbs.c
intern/thumbs_blend.c
- intern/tiff.c
intern/util.c
intern/writeimage.c
@@ -119,6 +116,10 @@ if(WITH_IMAGE_TIFF)
list(APPEND INC_SYS
${TIFF_INCLUDE_DIR}
)
+ list(APPEND SRC
+ intern/tiff.c
+ )
+
add_definitions(-DWITH_TIFF)
endif()
@@ -126,6 +127,10 @@ if(WITH_IMAGE_OPENJPEG)
list(APPEND INC_SYS
${OPENJPEG_INCLUDE_DIRS}
)
+ list(APPEND SRC
+ intern/jp2.c
+ )
+
add_definitions(-DWITH_OPENJPEG)
endif()
@@ -165,6 +170,9 @@ if(WITH_IMAGE_CINEON)
endif()
if(WITH_IMAGE_HDR)
+ list(APPEND SRC
+ intern/radiance_hdr.c
+ )
add_definitions(-DWITH_HDR)
endif()
diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript
index a80f92b4421..eae9665d23b 100644
--- a/source/blender/imbuf/SConscript
+++ b/source/blender/imbuf/SConscript
@@ -1,4 +1,5 @@
#!/usr/bin/python
+import os
Import ('env')
sources = env.Glob('intern/*.c')
@@ -22,6 +23,8 @@ if env['WITH_BF_OPENEXR']:
if env['WITH_BF_TIFF']:
defs.append('WITH_TIFF')
+else:
+ sources.remove(os.path.join('intern', 'tiff.c'))
if env['WITH_BF_DDS']:
defs.append('WITH_DDS')
@@ -31,6 +34,8 @@ if env['WITH_BF_CINEON']:
if env['WITH_BF_HDR']:
defs.append('WITH_HDR')
+else:
+ sources.remove(os.path.join('intern', 'radiance_hdr.c'))
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
@@ -39,6 +44,8 @@ if env['WITH_BF_FFMPEG']:
if env['WITH_BF_OPENJPEG']:
defs.append('WITH_OPENJPEG')
incs += ' ' + env['BF_OPENJPEG_INC']
+else:
+ sources.remove(os.path.join('intern', 'jp2.c'))
if env['WITH_BF_REDCODE']:
defs.append('WITH_REDCODE')
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index 8436846bf2e..43168b97b88 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -38,21 +38,21 @@
#define IMB_ANIM_H
#ifdef _WIN32
-#define INC_OLE2
-#include <windows.h>
-#include <windowsx.h>
-#include <mmsystem.h>
-#include <memory.h>
-#include <commdlg.h>
-
-#ifndef FREE_WINDOWS
-#include <vfw.h>
-#endif
+# define INC_OLE2
+# include <windows.h>
+# include <windowsx.h>
+# include <mmsystem.h>
+# include <memory.h>
+# include <commdlg.h>
+
+# ifndef FREE_WINDOWS
+# include <vfw.h>
+# endif
-#undef AVIIF_KEYFRAME // redefined in AVI_avi.h
-#undef AVIIF_LIST // redefined in AVI_avi.h
+# undef AVIIF_KEYFRAME // redefined in AVI_avi.h
+# undef AVIIF_LIST // redefined in AVI_avi.h
-#define FIXCC(fcc) if (fcc == 0) fcc = mmioFOURCC('N', 'o', 'n', 'e'); \
+# define FIXCC(fcc) if (fcc == 0) fcc = mmioFOURCC('N', 'o', 'n', 'e'); \
if (fcc == BI_RLE8) fcc = mmioFOURCC('R', 'l', 'e', '8');
#endif
@@ -60,10 +60,11 @@
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
-#ifndef _WIN32
-#include <dirent.h>
+
+#ifdef _WIN32
+# include <io.h>
#else
-#include <io.h>
+# include <dirent.h>
#endif
#include "BLI_blenlib.h" /* BLI_remlink BLI_filesize BLI_addtail
@@ -74,23 +75,23 @@
#include "AVI_avi.h"
#ifdef WITH_QUICKTIME
-#if defined(_WIN32) || defined(__APPLE__)
-#include "quicktime_import.h"
-#endif /* _WIN32 || __APPLE__ */
+# if defined(_WIN32) || defined(__APPLE__)
+# include "quicktime_import.h"
+# endif /* _WIN32 || __APPLE__ */
#endif /* WITH_QUICKTIME */
#ifdef WITH_FFMPEG
-#include <libavformat/avformat.h>
-#include <libavcodec/avcodec.h>
-#include <libswscale/swscale.h>
+# include <libavformat/avformat.h>
+# include <libavcodec/avcodec.h>
+# include <libswscale/swscale.h>
#endif
#ifdef WITH_REDCODE
-#ifdef _WIN32 /* on windows we use the one in extern instead */
-#include "libredcode/format.h"
-#else
-#include "libredcode/format.h"
-#endif
+# ifdef _WIN32 /* on windows we use the one in extern instead */
+# include "libredcode/format.h"
+# else
+# include "libredcode/format.h"
+# endif
#endif
#include "IMB_imbuf_types.h"
@@ -107,12 +108,12 @@
#define SWAP_S(x) (((x << 8) & 0xff00) | ((x >> 8) & 0xff))
/* more endianness... should move to a separate file... */
-#if defined(__sgi) || defined (__sparc) || defined (__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
-#define GET_ID GET_BIG_LONG
-#define LITTLE_LONG SWAP_LONG
+#ifdef __BIG_ENDIAN__
+# define GET_ID GET_BIG_LONG
+# define LITTLE_LONG SWAP_LONG
#else
-#define GET_ID GET_LITTLE_LONG
-#define LITTLE_LONG ENDIAN_NOP
+# define GET_ID GET_LITTLE_LONG
+# define LITTLE_LONG ENDIAN_NOP
#endif
/* anim.curtype, runtime only */
diff --git a/source/blender/imbuf/intern/IMB_indexer.h b/source/blender/imbuf/intern/IMB_indexer.h
index f55420fd106..bd5a455df98 100644
--- a/source/blender/imbuf/intern/IMB_indexer.h
+++ b/source/blender/imbuf/intern/IMB_indexer.h
@@ -28,7 +28,7 @@
#define IMB_INDEXER_H
#ifdef WIN32
-#include <io.h>
+# include <io.h>
#endif
#include <stdlib.h>
diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c
index 922cfcf9629..b4da39ac41e 100644
--- a/source/blender/imbuf/intern/cineon/cineonlib.c
+++ b/source/blender/imbuf/intern/cineon/cineonlib.c
@@ -36,6 +36,9 @@
#include <netinet/in.h> /* htonl() */
#endif
#include <string.h> /* memset */
+
+#include "BLI_utildefines.h"
+
#include "cin_debug_stuff.h"
#include "logmemfile.h"
@@ -288,7 +291,7 @@ initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const c
}
static void
-dumpCineonGenericHeader(CineonGenericHeader* header) {
+UNUSED_FUNCTION(dumpCineonGenericHeader)(CineonGenericHeader* header) {
dumpCineonFileInfo(&header->fileInfo);
dumpCineonImageInfo(&header->imageInfo);
dumpCineonFormatInfo(&header->formatInfo);
diff --git a/source/blender/imbuf/intern/cineon/logImageCore.h b/source/blender/imbuf/intern/cineon/logImageCore.h
index f05c19c4f47..cbc7cb9d64a 100644
--- a/source/blender/imbuf/intern/cineon/logImageCore.h
+++ b/source/blender/imbuf/intern/cineon/logImageCore.h
@@ -38,8 +38,12 @@ extern "C" {
#endif
#include "BLO_sys_types.h" // for intptr_t support
+
+#ifdef _MSC_VER
#undef ntohl
#undef htonl
+#endif
+
typedef int (GetRowFn)(LogImageFile* logImage, unsigned short* row, int lineNum);
typedef int (SetRowFn)(LogImageFile* logImage, const unsigned short* row, int lineNum);
typedef void (CloseFn)(LogImageFile* logImage);
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index 2677913caed..3719242aaba 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -518,7 +518,7 @@ void IMB_makemipmap(ImBuf *ibuf, int use_filter)
hbuf= ibuf->mipmap[curmap];
hbuf->miplevel= curmap+1;
- if(!hbuf || (hbuf->x <= 2 && hbuf->y <= 2))
+ if(hbuf->x <= 2 && hbuf->y <= 2)
break;
curmap++;
diff --git a/source/blender/imbuf/intern/imbuf.h b/source/blender/imbuf/intern/imbuf.h
index cd7d385ed92..22481241812 100644
--- a/source/blender/imbuf/intern/imbuf.h
+++ b/source/blender/imbuf/intern/imbuf.h
@@ -44,7 +44,7 @@
#include <stdio.h>
#ifndef WIN32
-#include <unistd.h>
+# include <unistd.h>
#endif
#include <fcntl.h>
@@ -53,11 +53,8 @@
#include <math.h>
#ifndef WIN32
-#include <sys/mman.h>
-#endif
-
-#if !defined(WIN32)
-#define O_BINARY 0
+# include <sys/mman.h>
+# define O_BINARY 0
#endif
#define SWAP_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & 0xff))
@@ -65,16 +62,16 @@
#define ENDIAN_NOP(x) (x)
-#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__hppa__) || (defined (__APPLE__) && !defined(__LITTLE_ENDIAN__))
-#define LITTLE_SHORT SWAP_SHORT
-#define LITTLE_LONG SWAP_LONG
-#define BIG_SHORT ENDIAN_NOP
-#define BIG_LONG ENDIAN_NOP
+#ifdef __BIG_ENDIAN__
+# define LITTLE_SHORT SWAP_SHORT
+# define LITTLE_LONG SWAP_LONG
+# define BIG_SHORT ENDIAN_NOP
+# define BIG_LONG ENDIAN_NOP
#else
-#define LITTLE_SHORT ENDIAN_NOP
-#define LITTLE_LONG ENDIAN_NOP
-#define BIG_SHORT SWAP_SHORT
-#define BIG_LONG SWAP_LONG
+# define LITTLE_SHORT ENDIAN_NOP
+# define LITTLE_LONG ENDIAN_NOP
+# define BIG_SHORT SWAP_SHORT
+# define BIG_LONG SWAP_LONG
#endif
typedef unsigned char uchar;
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 3528318ba81..2e45c0eb07a 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -159,24 +159,24 @@ struct anim_index * IMB_indexer_open(const char * name)
int i;
if (!fp) {
- return 0;
+ return NULL;
}
if (fread(header, 12, 1, fp) != 1) {
fclose(fp);
- return 0;
+ return NULL;
}
header[12] = 0;
if (memcmp(header, magic, 8) != 0) {
fclose(fp);
- return 0;
+ return NULL;
}
if (atoi(header+9) != INDEX_FILE_VERSION) {
fclose(fp);
- return 0;
+ return NULL;
}
idx = MEM_callocN( sizeof(struct anim_index), "anim_index");
@@ -916,7 +916,7 @@ static AviMovie * alloc_proxy_output_avi(
if (AVI_open_compress (filename, avi, 1, format) != AVI_ERROR_NONE) {
MEM_freeN(avi);
- return 0;
+ return NULL;
}
AVI_set_compress_option (avi, AVI_OPTION_TYPE_MAIN, 0, AVI_OPTION_WIDTH, &x);
@@ -1000,7 +1000,7 @@ static void index_rebuild_fallback(struct anim * anim,
s_ibuf->rect, x * y * 4);
/* note that libavi free's the buffer... */
- s_ibuf->rect = 0;
+ s_ibuf->rect = NULL;
IMB_freeImBuf(s_ibuf);
}
@@ -1056,14 +1056,14 @@ void IMB_free_indices(struct anim * anim)
for (i = 0; i < IMB_PROXY_MAX_SLOT; i++) {
if (anim->proxy_anim[i]) {
IMB_close_anim(anim->proxy_anim[i]);
- anim->proxy_anim[i] = 0;
+ anim->proxy_anim[i] = NULL;
}
}
for (i = 0; i < IMB_TC_MAX_SLOT; i++) {
if (anim->curr_idx[i]) {
IMB_indexer_close(anim->curr_idx[i]);
- anim->curr_idx[i] = 0;
+ anim->curr_idx[i] = NULL;
}
}
@@ -1116,7 +1116,7 @@ struct anim_index * IMB_anim_open_index(
}
if (anim->indices_tried & tc) {
- return 0;
+ return NULL;
}
get_tc_filename(anim, tc, fname);
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index adbf3659d3a..c6aaf336fb7 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -515,14 +515,15 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
}
- ibuf->ftype = IMAGIC;
- ibuf->profile = IB_PROFILE_SRGB;
-
- test_endian_zbuf(ibuf);
-
if (ibuf) {
- if (ibuf->rect)
+ ibuf->ftype = IMAGIC;
+ ibuf->profile = IB_PROFILE_SRGB;
+
+ test_endian_zbuf(ibuf);
+
+ if (ibuf->rect) {
IMB_convert_rgba_to_abgr(ibuf);
+ }
}
return(ibuf);
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index a4eae492a58..4872896bf3a 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -25,9 +25,6 @@
* \ingroup imbuf
*/
-
-#ifdef WITH_OPENJPEG
-
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
@@ -97,7 +94,7 @@ static void info_callback(const char *msg, void *client_data) {
struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
{
- struct ImBuf *ibuf = 0;
+ struct ImBuf *ibuf = NULL;
int use_float = 0; /* for precision higher then 8 use float */
long signed_offsets[4]= {0, 0, 0, 0};
@@ -117,7 +114,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
opj_dinfo_t* dinfo = NULL; /* handle to a decompressor */
opj_cio_t *cio = NULL;
- if (check_jp2(mem) == 0) return(0);
+ if (check_jp2(mem) == 0) return(NULL);
/* configure the event callbacks (not required) */
memset(&event_mgr, 0, sizeof(opj_event_mgr_t));
@@ -751,5 +748,3 @@ int imb_savejp2(struct ImBuf *ibuf, const char *name, int flags) {
return 1;
}
-
-#endif /* WITH_OPENJPEG */
diff --git a/source/blender/imbuf/intern/md5.c b/source/blender/imbuf/intern/md5.c
index 18148143eb9..2192fa32f19 100644
--- a/source/blender/imbuf/intern/md5.c
+++ b/source/blender/imbuf/intern/md5.c
@@ -28,11 +28,11 @@
#include "md5.h"
-#ifdef WORDS_BIGENDIAN
-# define SWAP(n) \
+#ifdef __BIG_ENDIAN__
+# define SWAP(n) \
(((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24))
#else
-# define SWAP(n) (n)
+# define SWAP(n) (n)
#endif
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index ddddec1c09f..9dd330ca88b 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -33,9 +33,6 @@
* \ingroup imbuf
*/
-
-#ifdef WITH_HDR
-
/* ----------------------------------------------------------------------
Radiance High Dynamic Range image file IO
For description and code for reading/writing of radiance hdr files
@@ -45,7 +42,7 @@
*/
#ifdef WIN32
-#include <io.h>
+# include <io.h>
#endif
#include "MEM_guardedalloc.h"
@@ -369,5 +366,3 @@ int imb_savehdr(struct ImBuf *ibuf, const char *name, int flags)
fclose(file);
return 1;
}
-
-#endif /* WITH_HDR */
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index 7beb853fe62..ccb271393a4 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -45,8 +45,6 @@
* used to compress images.
*/
-#ifdef WITH_TIFF
-
#include <string.h>
#include "imbuf.h"
@@ -836,5 +834,3 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
if(pixels16) _TIFFfree(pixels16);
return (1);
}
-
-#endif /* WITH_TIFF */
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index 8fd9f49cd0a..80fc6f63363 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -146,16 +146,16 @@ typedef struct PreviewImage {
*
**/
-#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
-/* big endian */
-#define MAKE_ID2(c, d) ( (c)<<8 | (d) )
-#define MOST_SIG_BYTE 0
-#define BBIG_ENDIAN
+#ifdef __BIG_ENDIAN__
+ /* big endian */
+# define MAKE_ID2(c, d) ( (c)<<8 | (d) )
+# define MOST_SIG_BYTE 0
+# define BBIG_ENDIAN
#else
-/* little endian */
-#define MAKE_ID2(c, d) ( (d)<<8 | (c) )
-#define MOST_SIG_BYTE 1
-#define BLITTLE_ENDIAN
+ /* little endian */
+# define MAKE_ID2(c, d) ( (d)<<8 | (c) )
+# define MOST_SIG_BYTE 1
+# define BLITTLE_ENDIAN
#endif
/* ID from database */
diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h
index a820e59779f..492dd34caa6 100644
--- a/source/blender/makesdna/DNA_action_types.h
+++ b/source/blender/makesdna/DNA_action_types.h
@@ -188,18 +188,13 @@ typedef struct bPoseChannel {
char name[32]; /* Channels need longer names than normal blender objects */
short flag; /* dynamic, for detecting transform changes */
- short constflag; /* for quick detecting which constraints affect this channel */
short ikflag; /* settings for IK bones */
- short selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
short protectflag; /* protect channels from being transformed */
short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */
-
-// XXX depreceated.... old animation system (armature only viz) ----
- int pathlen; /* for drawing paths, the amount of frames */
- int pathsf; /* for drawing paths, the start frame number */
- int pathef; /* for drawing paths, the end frame number */
-// XXX end of depreceated code -------------------------------------
-
+ char constflag; /* for quick detecting which constraints affect this channel */
+ char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
+ char pad0[6];
+
struct Bone *bone; /* set on read file or rebuild pose */
struct bPoseChannel *parent; /* set on read file or rebuild pose */
struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */
@@ -233,7 +228,7 @@ typedef struct bPoseChannel {
float ikrotweight; /* weight of joint rotation constraint */
float iklinweight; /* weight of joint stretch constraint */
- float *path; /* totpath x 3 x float */ // XXX depreceated... old animation system (armature only viz)
+ void *temp; /* use for outliner */
} bPoseChannel;
diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h
index 93db8340aac..239903208ec 100644
--- a/source/blender/makesdna/DNA_actuator_types.h
+++ b/source/blender/makesdna/DNA_actuator_types.h
@@ -230,6 +230,20 @@ typedef struct bArmatureActuator {
struct Object *subtarget;
} bArmatureActuator;
+typedef struct bSteeringActuator {
+ char pad[5];
+ char flag;
+ short facingaxis;
+ int type; /* 0=seek, 1=flee, 2=path following */
+ float dist;
+ float velocity;
+ float acceleration;
+ float turnspeed;
+ int updateTime;
+ struct Object *target;
+ struct Object *navmesh;
+} bSteeringActuator;
+
typedef struct bActuator {
struct bActuator *next, *prev, *mynew;
short type;
@@ -295,6 +309,7 @@ typedef struct bActuator {
#define ACT_SHAPEACTION 21
#define ACT_STATE 22
#define ACT_ARMATURE 23
+#define ACT_STEERING 24
/* actuator flag */
#define ACT_SHOW 1
@@ -511,6 +526,16 @@ typedef struct bActuator {
#define ACT_CAMERA_X (float)'x'
#define ACT_CAMERA_Y (float)'y'
+/* steeringactuator->type */
+#define ACT_STEERING_SEEK 0
+#define ACT_STEERING_FLEE 1
+#define ACT_STEERING_PATHFOLLOWING 2
+/* steeringactuator->flag */
+#define ACT_STEERING_SELFTERMINATED 1
+#define ACT_STEERING_ENABLEVISUALIZATION 2
+#define ACT_STEERING_AUTOMATICFACING 4
+#define ACT_STEERING_NORMALUP 8
+
#endif
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h
index cdfcf465c6c..b721dc60e73 100644
--- a/source/blender/makesdna/DNA_customdata_types.h
+++ b/source/blender/makesdna/DNA_customdata_types.h
@@ -92,7 +92,8 @@ typedef struct CustomData {
#define CD_ID_MCOL 21
#define CD_TEXTURE_MCOL 22
#define CD_CLOTH_ORCO 23
-#define CD_NUMTYPES 24
+#define CD_RECAST 24
+#define CD_NUMTYPES 25
/* Bits for CustomDataMask */
#define CD_MASK_MVERT (1 << CD_MVERT)
@@ -117,6 +118,7 @@ typedef struct CustomData {
#define CD_MASK_MDISPS (1 << CD_MDISPS)
#define CD_MASK_WEIGHT_MCOL (1 << CD_WEIGHT_MCOL)
#define CD_MASK_CLOTH_ORCO (1 << CD_CLOTH_ORCO)
+#define CD_MASK_RECAST (1 << CD_RECAST)
/* CustomData.flag */
diff --git a/source/blender/makesdna/DNA_material_types.h b/source/blender/makesdna/DNA_material_types.h
index 060b1bf42d1..6719dc8d9af 100644
--- a/source/blender/makesdna/DNA_material_types.h
+++ b/source/blender/makesdna/DNA_material_types.h
@@ -74,6 +74,14 @@ typedef struct VolumeSettings {
float ms_spread;
} VolumeSettings;
+/* Game Engine Options (old Texface mode, transp and flag) */
+typedef struct GameSettings {
+ int flag;
+ int alpha_blend;
+ int face_orientation;
+ int pad1;
+} GameSettings;
+
typedef struct Material {
ID id;
struct AnimData *adt; /* animation data (must be immediately after id for utilities to use it) */
@@ -90,6 +98,7 @@ typedef struct Material {
/* end synced with render_types.h */
struct VolumeSettings vol;
+ struct GameSettings game;
float fresnel_mir, fresnel_mir_i;
float fresnel_tra, fresnel_tra_i;
@@ -166,12 +175,39 @@ typedef struct Material {
ListBase gpumaterial; /* runtime */
} Material;
+
+/* **************** GAME PROPERTIES ********************* */
+// Blend Transparency Options - alpha_blend /* match GPU_material::GPUBlendMode */
+#define GEMAT_SOLID 0 /* GPU_BLEND_SOLID */
+#define GEMAT_ADD 1 /* GPU_BLEND_ADD */
+#define GEMAT_ALPHA 2 /* GPU_BLEND_ALPHA */
+#define GEMAT_CLIP 4 /* GPU_BLEND_CLIP */
+#define GEMAT_ALPHA_SORT 8 /* GPU_BLEND_ALPHA_SORT */
+
+// Game Options - flag
+#define GEMAT_BACKCULL 16 /* KX_BACKCULL */
+#define GEMAT_SHADED 32 /* KX_LIGHT */
+#define GEMAT_TEXT 64 /* RAS_RENDER_3DPOLYGON_TEXT */
+#define GEMAT_NOPHYSICS 128
+#define GEMAT_INVISIBLE 256
+
+// Face Orientation Options - face_orientation
+#define GEMAT_NORMAL 0
+#define GEMAT_HALO 512 /* BILLBOARD_SCREENALIGNED */
+#define GEMAT_BILLBOARD 1024 /* BILLBOARD_AXISALIGNED */
+#define GEMAT_SHADOW 2048 /* SHADOW */
+
+// Use Textures - not defined directly in the UI
+#define GEMAT_TEX 4096 /* KX_TEX */
+
+
/* **************** MATERIAL ********************* */
/* maximum number of materials per material array.
* (on object, mesh, lamp, etc.). limited by
- * short mat_nr in verts, faces. */
-#define MAXMAT 32767
+ * short mat_nr in verts, faces.
+ * -1 becayse for active material we store the index + 1 */
+#define MAXMAT (32767-1)
/* material_type */
#define MA_TYPE_SURFACE 0
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h
index 6ad60ac2df9..25bb4958c97 100644
--- a/source/blender/makesdna/DNA_mesh_types.h
+++ b/source/blender/makesdna/DNA_mesh_types.h
@@ -125,7 +125,7 @@ typedef struct TFace {
#define ME_EDIT_PAINT_MASK (1 << 3)
#define ME_EDIT_MIRROR_TOPO (1 << 4)
-
+#define ME_EDIT_VERT_SEL (1 << 5)
/* me->flag */
/* #define ME_ISDONE 1 */
diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h
index e3510b3a25a..9d7375b6755 100644
--- a/source/blender/makesdna/DNA_meshdata_types.h
+++ b/source/blender/makesdna/DNA_meshdata_types.h
@@ -184,6 +184,10 @@ typedef struct PartialVisibility {
unsigned int totface, totedge, totvert, pad;
} PartialVisibility;
+typedef struct MRecast{
+ int i;
+} MRecast;
+
/* mvert->flag (1=SELECT) */
#define ME_SPHERETEST 2
#define ME_VERT_TMP_TAG 4
@@ -243,6 +247,8 @@ typedef struct PartialVisibility {
#define TF_SHAREDVERT 8
#define TF_LIGHT 16
+#define TF_CONVERTED 32 /* tface converted to material */
+
#define TF_SHAREDCOL 64
#define TF_TILES 128 /* deprecated */
#define TF_BILLBOARD 256
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 3c6018328d8..7a5e746af9e 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -71,7 +71,11 @@ typedef enum ModifierType {
eModifierType_Solidify,
eModifierType_Screw,
eModifierType_Warp,
- eModifierType_DynamicPaint,
+ eModifierType_WeightVGEdit,
+ eModifierType_WeightVGMix,
+ eModifierType_WeightVGProximity,
+ eModifierType_NavMesh,
+ eModifierType_DynamicPaint, /* reserve slot */
NUM_MODIFIER_TYPES
} ModifierType;
@@ -676,7 +680,6 @@ typedef struct ShrinkwrapModifierData {
#define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS (1<<2)
#define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL 0 /* projection over normal is used if no axis is selected */
-
typedef struct SimpleDeformModifierData {
ModifierData modifier;
@@ -748,6 +751,10 @@ typedef struct ScrewModifierData {
#define MOD_SCREW_OBJECT_OFFSET (1<<2)
// #define MOD_SCREW_OBJECT_ANGLE (1<<4)
+typedef struct NavMeshModifierData {
+ ModifierData modifier;
+} NavMeshModifierData;
+
typedef struct WarpModifierData {
ModifierData modifier;
@@ -786,6 +793,175 @@ typedef enum {
/* PROP_RANDOM not used */
} WarpModifierFalloff;
+typedef struct WeightVGEditModifierData {
+ ModifierData modifier;
+
+ /* Note: I tried to keep everything logically ordered - provided the
+ * alignment constraints... */
+
+ char defgrp_name[32]; /* Name of vertex group to edit. */
+
+ short edit_flags; /* Using MOD_WVG_EDIT_* flags. */
+ short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */
+ float default_weight; /* Weight for vertices not in vgroup. */
+
+ /* Mapping stuff. */
+ struct CurveMapping *cmap_curve; /* The custom mapping curve! */
+
+ /* The add/remove vertices weight thresholds. */
+ float add_threshold, rem_threshold;
+
+ /* Masking options. */
+ float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
+ /* Name of mask vertex group from which to get weight factors. */
+ char mask_defgrp_name[32];
+
+ /* Texture masking. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
+ struct Tex *mask_texture; /* The texture. */
+ struct Object *mask_tex_map_obj; /* Name of the map object. */
+ /* How to map the texture (using MOD_DISP_MAP_* constants). */
+ int mask_tex_mapping;
+ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */
+
+ /* Padding... */
+ int pad_i1;
+} WeightVGEditModifierData;
+
+/* WeightVGEdit flags. */
+/* Use parametric mapping. */
+//#define MOD_WVG_EDIT_MAP (1 << 0)
+/* Use curve mapping. */
+//#define MOD_WVG_EDIT_CMAP (1 << 1)
+/* Reverse weights (in the [0.0, 1.0] standard range). */
+//#define MOD_WVG_EDIT_REVERSE_WEIGHTS (1 << 2)
+/* Add vertices with higher weight than threshold to vgroup. */
+#define MOD_WVG_EDIT_ADD2VG (1 << 3)
+/* Remove vertices with lower weight than threshold from vgroup. */
+#define MOD_WVG_EDIT_REMFVG (1 << 4)
+/* Clamp weights. */
+//#define MOD_WVG_EDIT_CLAMP (1 << 5)
+
+typedef struct WeightVGMixModifierData {
+ ModifierData modifier;
+
+ /* XXX Note: I tried to keep everything logically ordered – provided the
+ * alignment constraints... */
+
+ char defgrp_name_a[32]; /* Name of vertex group to modify/weight. */
+ char defgrp_name_b[32]; /* Name of other vertex group to mix in. */
+ float default_weight_a; /* Default weight value for first vgroup. */
+ float default_weight_b; /* Default weight value to mix in. */
+ char mix_mode; /* How second vgroups weights affect first ones */
+ char mix_set; /* What vertices to affect. */
+
+ char pad_c1[6];
+
+ /* Masking options. */
+ float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
+ /* Name of mask vertex group from which to get weight factors. */
+ char mask_defgrp_name[32];
+
+ /* Texture masking. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
+ struct Tex *mask_texture; /* The texture. */
+ struct Object *mask_tex_map_obj; /* Name of the map object. */
+ int mask_tex_mapping; /* How to map the texture! */
+ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */
+
+ /* Padding... */
+ int pad_i1;
+} WeightVGMixModifierData;
+
+/* How second vgroup's weights affect first ones. */
+#define MOD_WVG_MIX_SET 1 /* Second weights replace weights. */
+#define MOD_WVG_MIX_ADD 2 /* Second weights are added to weights. */
+#define MOD_WVG_MIX_SUB 3 /* Second weights are subtracted from weights. */
+#define MOD_WVG_MIX_MUL 4 /* Second weights are multiplied with weights. */
+#define MOD_WVG_MIX_DIV 5 /* Second weights divide weights. */
+#define MOD_WVG_MIX_DIF 6 /* Difference between second weights and weights. */
+#define MOD_WVG_MIX_AVG 7 /* Average of both weights. */
+
+/* What vertices to affect. */
+#define MOD_WVG_SET_ALL 1 /* Affect all vertices. */
+#define MOD_WVG_SET_A 2 /* Affect only vertices in first vgroup. */
+#define MOD_WVG_SET_B 3 /* Affect only vertices in second vgroup. */
+#define MOD_WVG_SET_OR 4 /* Affect only vertices in one vgroup or the other. */
+#define MOD_WVG_SET_AND 5 /* Affect only vertices in both vgroups. */
+
+typedef struct WeightVGProximityModifierData {
+ ModifierData modifier;
+
+ /* Note: I tried to keep everything logically ordered - provided the
+ * alignment constraints... */
+
+ char defgrp_name[32]; /* Name of vertex group to modify/weight. */
+
+ /* Proximity modes. */
+ int proximity_mode;
+ int proximity_flags;
+
+ /* Target object from which to calculate vertices distances. */
+ struct Object *proximity_ob_target;
+
+ /* Masking options. */
+ float mask_constant; /* The global "influence", if no vgroup nor tex is used as mask. */
+ /* Name of mask vertex group from which to get weight factors. */
+ char mask_defgrp_name[32];
+
+ /* Texture masking. */
+ int mask_tex_use_channel; /* Which channel to use as weightf. */
+ struct Tex *mask_texture; /* The texture. */
+ struct Object *mask_tex_map_obj; /* Name of the map object. */
+ int mask_tex_mapping; /* How to map the texture! */
+ char mask_tex_uvlayer_name[32]; /* Name of the UV layer. */
+
+ float min_dist, max_dist; /* Distances mapping to 0.0/1.0 weights. */
+
+ /* Put here to avoid breaking existing struct... */
+ short falloff_type; /* Using MOD_WVG_MAPPING_* defines. */
+
+ /* Padding... */
+ short pad_s1;
+} WeightVGProximityModifierData;
+
+/* Modes of proximity weighting. */
+/* Dist from target object to affected object. */
+#define MOD_WVG_PROXIMITY_OBJECT 1 /* source vertex to other location */
+/* Dist from target object to vertex. */
+#define MOD_WVG_PROXIMITY_GEOMETRY 2 /* source vertex to other geometry */
+
+/* Flags options for proximity weighting. */
+/* Use nearest vertices of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
+#define MOD_WVG_PROXIMITY_GEOM_VERTS (1 << 0)
+/* Use nearest edges of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
+#define MOD_WVG_PROXIMITY_GEOM_EDGES (1 << 1)
+/* Use nearest faces of target obj, in MOD_WVG_PROXIMITY_GEOMETRY mode. */
+#define MOD_WVG_PROXIMITY_GEOM_FACES (1 << 2)
+
+/* Defines common to all WeightVG modifiers. */
+/* Mapping modes. */
+#define MOD_WVG_MAPPING_NONE 0
+#define MOD_WVG_MAPPING_CURVE 1
+#define MOD_WVG_MAPPING_SHARP 2 /* PROP_SHARP */
+#define MOD_WVG_MAPPING_SMOOTH 3 /* PROP_SMOOTH */
+#define MOD_WVG_MAPPING_ROOT 4 /* PROP_ROOT */
+/* PROP_LIN not used (same as NONE, here...). */
+/* PROP_CONST not used. */
+#define MOD_WVG_MAPPING_SPHERE 7 /* PROP_SPHERE */
+#define MOD_WVG_MAPPING_RANDOM 8 /* PROP_RANDOM */
+#define MOD_WVG_MAPPING_STEP 9 /* Median Step. */
+
+/* Tex channel to be used as mask. */
+#define MOD_WVG_MASK_TEX_USE_INT 1
+#define MOD_WVG_MASK_TEX_USE_RED 2
+#define MOD_WVG_MASK_TEX_USE_GREEN 3
+#define MOD_WVG_MASK_TEX_USE_BLUE 4
+#define MOD_WVG_MASK_TEX_USE_HUE 5
+#define MOD_WVG_MASK_TEX_USE_SAT 6
+#define MOD_WVG_MASK_TEX_USE_VAL 7
+#define MOD_WVG_MASK_TEX_USE_ALPHA 8
+
/* Dynamic paint modifier flags */
#define MOD_DYNAMICPAINT_TYPE_CANVAS (1 << 0)
#define MOD_DYNAMICPAINT_TYPE_BRUSH (1 << 1)
@@ -798,4 +974,5 @@ typedef struct DynamicPaintModifierData {
int type; /* ui display: canvas / brush */
int pad;
} DynamicPaintModifierData;
+
#endif
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index efaf30b02f6..4cfd0b56b70 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -38,26 +38,29 @@
#include "DNA_vec_types.h"
#include "DNA_listBase.h"
+struct ID;
struct ListBase;
struct SpaceNode;
struct bNodeLink;
struct bNodeType;
-struct bNodeGroup;
+struct bNodeTreeExec;
struct AnimData;
struct bGPdata;
struct uiBlock;
#define NODE_MAXSTR 32
-
typedef struct bNodeStack {
float vec[4];
- float min, max; /* min/max for values (UI writes it, execute might use it) */
+ float min, max;
void *data;
short hasinput; /* when input has link, tagged before executing */
short hasoutput; /* when output is linked, tagged before executing */
short datatype; /* type of data pointer */
short sockettype; /* type of socket stack comes from, to remap linking different sockets */
+ short is_copy; /* data is a copy of external data (no freeing) */
+ short external; /* data is used by external nodes (no freeing) */
+ short pad[2];
} bNodeStack;
/* ns->datatype, shadetree only */
@@ -68,50 +71,63 @@ typedef struct bNodeSocket {
struct bNodeSocket *next, *prev, *new_sock;
char name[32];
- bNodeStack ns; /* custom data for inputs, only UI writes in this */
+
+ void *storage; /* custom storage */
short type, flag;
short limit; /* max. number of links */
-
- /* stack data info (only during execution!) */
- short stack_type; /* type of stack reference */
- /* XXX only one of stack_ptr or stack_index is used (depending on stack_type).
- * could store the index in the pointer with SET_INT_IN_POINTER (a bit ugly).
- * (union won't work here, not supported by DNA)
- */
- struct bNodeStack *stack_ptr; /* constant input value */
- short stack_index; /* local stack index or external input number */
short pad1;
float locx, locy;
- /* internal data to retrieve relations and groups */
+ void *default_value; /* default input value used for unlinked sockets */
+
+ /* execution data */
+ short stack_index; /* local stack index */
+ short stack_type; /* deprecated, kept for forward compatibility */
+ int pad3;
+ void *cache; /* cached data from execution */
+ /* internal data to retrieve relations and groups */
int own_index; /* group socket identifiers, to find matching pairs after reading files */
- struct bNodeSocket *groupsock;
int to_index; /* XXX deprecated, only used for restoring old group node links */
- int pad2;
+ struct bNodeSocket *groupsock;
- struct bNodeLink *link; /* a link pointer, set in nodeSolveOrder() */
+ struct bNodeLink *link; /* a link pointer, set in ntreeUpdateTree */
+
+ /* DEPRECATED only needed for do_versions */
+ bNodeStack ns; /* custom data for inputs, only UI writes in this */
} bNodeSocket;
/* sock->type */
-#define SOCK_VALUE 0
-#define SOCK_VECTOR 1
-#define SOCK_RGBA 2
+#define SOCK_FLOAT 0
+#define SOCK_VECTOR 1
+#define SOCK_RGBA 2
+#define SOCK_SHADER 3
+#define SOCK_BOOLEAN 4
+#define SOCK_MESH 5
+#define SOCK_INT 6
+#define NUM_SOCKET_TYPES 7 /* must be last! */
+
+/* socket side (input/output) */
+#define SOCK_IN 1
+#define SOCK_OUT 2
/* sock->flag, first bit is select */
- /* hidden is user defined, to hide unused */
+ /* hidden is user defined, to hide unused */
#define SOCK_HIDDEN 2
- /* only used now for groups... */
-#define SOCK_IN_USE 4
- /* unavailable is for dynamic sockets */
+ /* only used now for groups... */
+#define SOCK_IN_USE 4 /* XXX deprecated */
+ /* unavailable is for dynamic sockets */
#define SOCK_UNAVAIL 8
-
-/* sock->stack_type */
-#define SOCK_STACK_LOCAL 1 /* part of the local tree stack */
-#define SOCK_STACK_EXTERN 2 /* use input stack pointer */
-#define SOCK_STACK_CONST 3 /* use pointer to constant input value */
+ /* dynamic socket (can be modified by user) */
+#define SOCK_DYNAMIC 16
+ /* group socket should not be exposed */
+#define SOCK_INTERNAL 32
+ /* socket collapsed in UI */
+#define SOCK_COLLAPSED 64
+ /* hide socket value, if it gets auto default */
+#define SOCK_HIDE_VALUE 128
typedef struct bNodePreview {
unsigned char *rect;
@@ -119,7 +135,6 @@ typedef struct bNodePreview {
int pad;
} bNodePreview;
-
/* limit data in bNode to what we want to see saved? */
typedef struct bNode {
struct bNode *next, *prev, *new_node;
@@ -132,11 +147,14 @@ typedef struct bNode {
short nr; /* number of this node in list, used for UI exec events */
ListBase inputs, outputs;
+ struct bNode *parent; /* parent node */
struct ID *id; /* optional link to libdata */
void *storage; /* custom data, must be struct, for storage in file */
float locx, locy; /* root offset for drawing */
- float width, miniwidth;
+ float width, height; /* node custom width and height */
+ float miniwidth; /* node width if hidden */
+ int pad;
char label[32]; /* custom user-defined label */
short custom1, custom2; /* to be abused for buttons */
float custom3, custom4;
@@ -151,7 +169,6 @@ typedef struct bNode {
struct uiBlock *block; /* runtime during drawing */
struct bNodeType *typeinfo; /* lookup of callbacks and defaults */
-
} bNode;
/* node->flag */
@@ -163,11 +180,17 @@ typedef struct bNode {
#define NODE_ACTIVE_ID 32
#define NODE_DO_OUTPUT 64
#define NODE_GROUP_EDIT 128
- /* free test flag, undefined */
+ /* free test flag, undefined */
#define NODE_TEST 256
- /* composite: don't do node but pass on buffer(s) */
+ /* composite: don't do node but pass on buffer(s) */
#define NODE_MUTED 512
-#define NODE_CUSTOM_NAME 1024 /* deprecated! */
+#define NODE_CUSTOM_NAME 1024 /* deprecated! */
+ /* group node types: use const outputs by default */
+#define NODE_CONST_OUTPUT (1<<11)
+ /* node is always behind others */
+#define NODE_BACKGROUND (1<<12)
+ /* automatic flag for nodes included in transforms */
+#define NODE_TRANSFORM (1<<13)
typedef struct bNodeLink {
struct bNodeLink *next, *prev;
@@ -175,13 +198,13 @@ typedef struct bNodeLink {
bNode *fromnode, *tonode;
bNodeSocket *fromsock, *tosock;
- int flag, pad;
-
+ int flag;
+ int pad;
} bNodeLink;
-
/* link->flag */
-#define NODE_LINKFLAG_HILITE 1
+#define NODE_LINKFLAG_HILITE 1 /* link has been successfully validated */
+#define NODE_LINK_VALID 2
/* the basis for a Node tree, all links and nodes reside internal here */
/* only re-usable node trees are in the library though, materials and textures allocate own tree struct */
@@ -193,19 +216,24 @@ typedef struct bNodeTree {
ListBase nodes, links;
- bNodeStack *stack; /* stack is only while executing, no read/write in file */
- struct ListBase *threadstack; /* same as above */
-
int type, init; /* set init on fileread */
- int stacksize; /* amount of elements in stack */
int cur_index; /* sockets in groups have unique identifiers, adding new sockets always
will increase this counter */
- int flag, pad;
+ int flag;
+ int update; /* update flags */
+
+ int nodetype; /* specific node type this tree is used for */
- ListBase alltypes; /* type definitions */
ListBase inputs, outputs; /* external sockets for group nodes */
-
- int pad2[2];
+
+ /* execution data */
+ /* XXX It would be preferable to completely move this data out of the underlying node tree,
+ * so node tree execution could finally run independent of the tree itself. This would allow node trees
+ * to be merely linked by other data (materials, textures, etc.), as ID data is supposed to.
+ * Execution data is generated from the tree once at execution start and can then be used
+ * as long as necessary, even while the tree is being modified.
+ */
+ struct bNodeTreeExec *execdata;
/* callbacks */
void (*progress)(void *, float progress);
@@ -216,20 +244,59 @@ typedef struct bNodeTree {
} bNodeTree;
/* ntree->type, index */
-#define NTREE_SHADER 0
-#define NTREE_COMPOSIT 1
-#define NTREE_TEXTURE 2
+#define NTREE_SHADER 0
+#define NTREE_COMPOSIT 1
+#define NTREE_TEXTURE 2
+#define NUM_NTREE_TYPES 3
/* ntree->init, flag */
-#define NTREE_TYPE_INIT 1
-#define NTREE_EXEC_INIT 2
+#define NTREE_TYPE_INIT 1
/* ntree->flag */
#define NTREE_DS_EXPAND 1 /* for animation editors */
-/* XXX not nice, but needed as a temporary flag
+/* XXX not nice, but needed as a temporary flags
* for group updates after library linking.
*/
-#define NTREE_DO_VERSIONS 1024
+#define NTREE_DO_VERSIONS_GROUP_EXPOSE 1024
+
+/* ntree->update */
+#define NTREE_UPDATE 0xFFFF /* generic update flag (includes all others) */
+#define NTREE_UPDATE_LINKS 1 /* links have been added or removed */
+#define NTREE_UPDATE_NODES 2 /* nodes or sockets have been added or removed */
+#define NTREE_UPDATE_GROUP_IN 16 /* group inputs have changed */
+#define NTREE_UPDATE_GROUP_OUT 32 /* group outputs have changed */
+#define NTREE_UPDATE_GROUP 48 /* group has changed (generic flag including all other group flags) */
+
+
+/* socket value structs for input buttons */
+
+typedef struct bNodeSocketValueInt {
+ int subtype; /* RNA subtype */
+ int value;
+ int min, max;
+} bNodeSocketValueInt;
+
+typedef struct bNodeSocketValueFloat {
+ int subtype; /* RNA subtype */
+ float value;
+ float min, max;
+} bNodeSocketValueFloat;
+
+typedef struct bNodeSocketValueBoolean {
+ char value;
+ char pad[3];
+} bNodeSocketValueBoolean;
+
+typedef struct bNodeSocketValueVector {
+ int subtype; /* RNA subtype */
+ float value[3];
+ float min, max;
+} bNodeSocketValueVector;
+
+typedef struct bNodeSocketValueRGBA {
+ float value[4];
+} bNodeSocketValueRGBA;
+
/* data structs, for node->storage */
@@ -354,7 +421,6 @@ typedef struct TexNodeOutput {
char name[32];
} TexNodeOutput;
-
/* comp channel matte */
#define CMP_NODE_CHANNEL_MATTE_CS_RGB 1
#define CMP_NODE_CHANNEL_MATTE_CS_HSV 2
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index ffa82092ef1..f32f8d626de 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -62,9 +62,14 @@ struct bGPdata;
typedef struct bDeformGroup {
struct bDeformGroup *next, *prev;
char name[32];
+ /* need this flag for locking weights */
+ char flag, pad[7];
} bDeformGroup;
#define MAX_VGROUP_NAME 32
+/* bDeformGroup->flag */
+#define DG_LOCK_WEIGHT 1
+
/**
* The following illustrates the orientation of the
* bounding box in local space
@@ -189,6 +194,8 @@ typedef struct Object {
float max_vel; /* clamp the maximum velocity 0.0 is disabled */
float min_vel; /* clamp the maximum velocity 0.0 is disabled */
float m_contactProcessingThreshold;
+ float obstacleRad;
+ char pad0[4];
short rotmode; /* rotation mode - uses defines set out in DNA_action_types.h for PoseChannel rotations... */
@@ -473,6 +480,8 @@ typedef struct DupliObject {
#define OB_SOFT_BODY 0x20000
#define OB_OCCLUDER 0x40000
#define OB_SENSOR 0x80000
+#define OB_NAVMESH 0x100000
+#define OB_HASOBSTACLE 0x200000
/* ob->gameflag2 */
#define OB_NEVER_DO_ACTIVITY_CULLING 1
@@ -493,6 +502,7 @@ typedef struct DupliObject {
#define OB_BODY_TYPE_SOFT 4
#define OB_BODY_TYPE_OCCLUDER 5
#define OB_BODY_TYPE_SENSOR 6
+#define OB_BODY_TYPE_NAVMESH 7
/* ob->scavisflag */
#define OB_VIS_SENS 1
diff --git a/source/blender/makesdna/DNA_outliner_types.h b/source/blender/makesdna/DNA_outliner_types.h
index c44f10efde8..af19aa490ae 100644
--- a/source/blender/makesdna/DNA_outliner_types.h
+++ b/source/blender/makesdna/DNA_outliner_types.h
@@ -51,6 +51,8 @@ typedef struct TreeStore {
#define TSE_CLOSED 1
#define TSE_SELECTED 2
#define TSE_TEXTBUT 4
+#define TSE_CHILDSEARCH 8
+#define TSE_SEARCHMATCH 16
/* TreeStoreElem types in BIF_outliner.h */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index be2a78ac774..9f176a22848 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -426,8 +426,38 @@ typedef struct GameFraming {
#define SCE_GAMEFRAMING_EXTEND 1
#define SCE_GAMEFRAMING_SCALE 2
+typedef struct RecastData
+{
+ float cellsize;
+ float cellheight;
+ float agentmaxslope;
+ float agentmaxclimb;
+ float agentheight;
+ float agentradius;
+ float edgemaxlen;
+ float edgemaxerror;
+ float regionminsize;
+ float regionmergesize;
+ int vertsperpoly;
+ float detailsampledist;
+ float detailsamplemaxerror;
+} RecastData;
+
typedef struct GameData {
+ /* standalone player */
+ struct GameFraming framing;
+ short fullscreen, xplay, yplay, freqplay;
+ short depth, attrib, rt1, rt2;
+
+ /* stereo/dome mode */
+ struct GameDome dome;
+ short stereoflag, stereomode;
+ short pad2, pad3;
+ float eyeseparation, pad1;
+ RecastData recastData;
+
+
/* physics (it was in world)*/
float gravity; /*Gravitation constant for the game world*/
@@ -440,21 +470,12 @@ typedef struct GameData {
* bit 3: (gameengine): Activity culling is enabled.
* bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
*/
- short mode, flag, matmode, pad[3];
+ short mode, flag, matmode, pad[2];
short occlusionRes; /* resolution of occlusion Z buffer in pixel */
short physicsEngine;
short ticrate, maxlogicstep, physubstep, maxphystep;
-
- /* standalone player */
- struct GameFraming framing;
- short fullscreen, xplay, yplay, freqplay;
- short depth, attrib, rt1, rt2;
-
- /* stereo/dome mode */
- struct GameDome dome;
- short stereoflag, stereomode;
- short pad2, pad3;
- float eyeseparation, pad1;
+ short obstacleSimulation;
+ float levelHeight;
} GameData;
#define STEREO_NOSTEREO 1
@@ -478,6 +499,11 @@ typedef struct GameData {
#define WOPHY_ODE 4
#define WOPHY_BULLET 5
+/* obstacleSimulation */
+#define OBSTSIMULATION_NONE 0
+#define OBSTSIMULATION_TOI_rays 1
+#define OBSTSIMULATION_TOI_cells 2
+
/* GameData.flag */
#define GAME_RESTRICT_ANIM_UPDATES (1 << 0)
#define GAME_ENABLE_ALL_FRAMES (1 << 1)
@@ -494,6 +520,7 @@ typedef struct GameData {
#define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
#define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
#define GAME_SHOW_MOUSE (1 << 14)
+#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 15)
#define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15)
/* Note: GameData.flag is a short (max 16 flags). To add more flags, GameData.flag needs to be an int */
@@ -732,9 +759,10 @@ typedef struct ToolSettings {
short snap_flag, snap_target;
short proportional, prop_mode;
char proportional_objects; /* proportional edit, object mode */
- char pad[3];
+ char pad[5];
- int auto_normalize; /*auto normalizing mode in wpaint*/
+ char auto_normalize; /*auto normalizing mode in wpaint*/
+ char multipaint; /* paint multiple bones in wpaint */
short sculpt_paint_settings; /* user preferences for sculpt and paint */
short pad1;
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h
index 588e8458de1..3ec26cdadb4 100644
--- a/source/blender/makesdna/DNA_sequence_types.h
+++ b/source/blender/makesdna/DNA_sequence_types.h
@@ -238,6 +238,8 @@ typedef struct SpeedControlVars {
int lastValidFrame;
} SpeedControlVars;
+#define MAXSEQ 32
+
#define SELECT 1
/* Editor->over_flag */
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h
index 4bfaae6f0ba..e1ff19533d4 100644
--- a/source/blender/makesdna/DNA_space_types.h
+++ b/source/blender/makesdna/DNA_space_types.h
@@ -861,6 +861,7 @@ enum {
/* outliner search flags (SpaceOops->search_flags) */
#define SO_FIND_CASE_SENSITIVE (1<<0)
#define SO_FIND_COMPLETE (1<<1)
+#define SO_SEARCH_RECURSIVE (1<<2)
/* headerbuttons: 450-499 */
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 43dc532d4f6..05b16f869a8 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -510,8 +510,8 @@ extern UserDef U; /* from blenkernel blender.c */
/* transopts */
#define USER_TR_TOOLTIPS (1 << 0)
-#define USER_TR_BUTTONS (1 << 1)
-#define USER_TR_MENUS (1 << 2)
+#define USER_TR_IFACE (1 << 1)
+/*#define USER_TR_MENUS (1 << 2) deprecated*/
/*#define USER_TR_FILESELECT (1 << 3) deprecated*/
/*#define USER_TR_TEXTEDIT (1 << 4) deprecated*/
#define USER_DOTRANSLATE (1 << 5)
@@ -607,6 +607,12 @@ extern UserDef U; /* from blenkernel blender.c */
/* zoom is up/down if this flag is set (otherwise forward/backward) */
#define NDOF_ZOOM_UPDOWN (1 << 7)
#define NDOF_ZOOM_INVERT (1 << 8)
+#define NDOF_ROTATE_INVERT_AXIS (1 << 9)
+#define NDOF_TILT_INVERT_AXIS (1 << 10)
+#define NDOF_ROLL_INVERT_AXIS (1 << 11)
+#define NDOF_PANX_INVERT_AXIS (1 << 12)
+#define NDOF_PANY_INVERT_AXIS (1 << 13)
+#define NDOF_PANZ_INVERT_AXIS (1 << 14)
#ifdef __cplusplus
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index cb19fe7a334..064897b6415 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -49,7 +49,10 @@ struct Scene;
extern BlenderRNA BLENDER_RNA;
extern StructRNA RNA_Action;
extern StructRNA RNA_ActionConstraint;
+extern StructRNA RNA_ActionFCurves;
extern StructRNA RNA_ActionGroup;
+extern StructRNA RNA_ActionGroups;
+extern StructRNA RNA_ActionPoseMarkers;
extern StructRNA RNA_Actuator;
extern StructRNA RNA_ActuatorSensor;
extern StructRNA RNA_Addon;
@@ -190,6 +193,7 @@ extern StructRNA RNA_DelaySensor;
extern StructRNA RNA_DisplaceModifier;
extern StructRNA RNA_DistortedNoiseTexture;
extern StructRNA RNA_DomainFluidSettings;
+extern StructRNA RNA_DopeSheet;
extern StructRNA RNA_Driver;
extern StructRNA RNA_DriverTarget;
extern StructRNA RNA_DriverVariable;
@@ -264,11 +268,13 @@ extern StructRNA RNA_Key;
extern StructRNA RNA_KeyConfig;
extern StructRNA RNA_KeyMap;
extern StructRNA RNA_KeyMapItem;
+extern StructRNA RNA_KeyMapItems;
extern StructRNA RNA_KeyboardSensor;
extern StructRNA RNA_Keyframe;
extern StructRNA RNA_KeyingSet;
extern StructRNA RNA_KeyingSetInfo;
extern StructRNA RNA_KeyingSetPath;
+extern StructRNA RNA_KeyingSetsAll;
extern StructRNA RNA_KinematicConstraint;
extern StructRNA RNA_Lamp;
extern StructRNA RNA_LampSkySettings;
@@ -331,10 +337,13 @@ extern StructRNA RNA_NearSensor;
extern StructRNA RNA_NlaStrip;
extern StructRNA RNA_NlaTrack;
extern StructRNA RNA_Node;
+extern StructRNA RNA_NodeForLoop;
extern StructRNA RNA_NodeGroup;
extern StructRNA RNA_NodeLink;
extern StructRNA RNA_NodeSocket;
+extern StructRNA RNA_NodeSocketPanel;
extern StructRNA RNA_NodeTree;
+extern StructRNA RNA_NodeWhileLoop;
extern StructRNA RNA_NoiseTexture;
extern StructRNA RNA_NorController;
extern StructRNA RNA_Object;
@@ -380,7 +389,6 @@ extern StructRNA RNA_PropertyGroupItem;
extern StructRNA RNA_PropertySensor;
extern StructRNA RNA_PythonConstraint;
extern StructRNA RNA_PythonController;
-extern StructRNA RNA_RGBANodeSocket;
extern StructRNA RNA_RadarSensor;
extern StructRNA RNA_RandomSensor;
extern StructRNA RNA_RaySensor;
@@ -554,12 +562,11 @@ extern StructRNA RNA_UnknownType;
extern StructRNA RNA_UserPreferences;
extern StructRNA RNA_UserPreferencesEdit;
extern StructRNA RNA_UserPreferencesFilePaths;
+extern StructRNA RNA_UserPreferencesInput;
extern StructRNA RNA_UserPreferencesSystem;
extern StructRNA RNA_UserPreferencesView;
extern StructRNA RNA_UserSolidLight;
-extern StructRNA RNA_ValueNodeSocket;
extern StructRNA RNA_VectorFont;
-extern StructRNA RNA_VectorNodeSocket;
extern StructRNA RNA_VertexGroup;
extern StructRNA RNA_VertexGroupElement;
extern StructRNA RNA_VertexPaint;
@@ -568,19 +575,22 @@ extern StructRNA RNA_VoxelData;
extern StructRNA RNA_VoxelDataTexture;
extern StructRNA RNA_WarpModifier;
extern StructRNA RNA_WaveModifier;
+extern StructRNA RNA_WeightVGEditModifier;
+extern StructRNA RNA_WeightVGMixModifier;
+extern StructRNA RNA_WeightVGProximityModifier;
extern StructRNA RNA_Window;
extern StructRNA RNA_WindowManager;
extern StructRNA RNA_WipeSequence;
extern StructRNA RNA_WoodTexture;
extern StructRNA RNA_World;
extern StructRNA RNA_WorldAmbientOcclusion;
+extern StructRNA RNA_WorldLighting;
extern StructRNA RNA_WorldMistSettings;
extern StructRNA RNA_WorldStarsSettings;
extern StructRNA RNA_WorldTextureSlot;
extern StructRNA RNA_XnorController;
extern StructRNA RNA_XorController;
-
/* Pointer
*
* These functions will fill in RNA pointers, this can be done in three ways:
@@ -603,6 +613,8 @@ extern const PointerRNA PointerRNA_NULL;
/* Structs */
+StructRNA *RNA_struct_find(const char *identifier);
+
const char *RNA_struct_identifier(StructRNA *type);
const char *RNA_struct_ui_name(StructRNA *type);
const char *RNA_struct_ui_description(StructRNA *type);
@@ -688,6 +700,7 @@ int RNA_enum_name(EnumPropertyItem *item, const int value, const char **name);
int RNA_enum_description(EnumPropertyItem *item, const int value, const char **description);
void RNA_property_enum_items(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item, int *totitem, int *free);
+void RNA_property_enum_items_gettexted(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item, int *totitem, int *free);
int RNA_property_enum_value(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value);
int RNA_property_enum_identifier(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier);
int RNA_property_enum_name(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name);
@@ -973,7 +986,15 @@ int RNA_function_call_direct_va_lookup(struct bContext *C, struct ReportList *re
short RNA_type_to_ID_code(StructRNA *type);
StructRNA *ID_code_to_RNA_type(short idcode);
-void RNA_warning(const char *format, ...)
+
+/* macro which inserts the function name */
+#ifdef __GNUC__
+# define RNA_warning(format, args...) _RNA_warning("%s: " format "\n", __func__, ##args)
+#else /* MSVC doesnt support variable length args in macros */
+# define RNA_warning _RNA_warning
+#endif
+
+void _RNA_warning(const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 528d8f8d434..7434cb11266 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -102,10 +102,12 @@ extern EnumPropertyItem transform_mode_types[];
extern EnumPropertyItem posebone_rotmode_items[];
extern EnumPropertyItem property_type_items[];
+extern EnumPropertyItem property_subtype_items[];
extern EnumPropertyItem property_unit_items[];
extern EnumPropertyItem viewport_shade_items[];
+extern EnumPropertyItem nodetree_type_items[];
extern EnumPropertyItem node_socket_type_items[];
extern EnumPropertyItem node_math_items[];
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index f8199074f27..4a18518dde9 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -99,7 +99,10 @@ typedef enum PropertyUnit {
#define RNA_ENUM_BITFLAG_SIZE 32
-/* also update enums in bpy_props.c when adding items here */
+/* also update enums in bpy_props.c when adding items here
+ * watch it: these values are written to files as part of
+ * node socket button subtypes!
+ */
typedef enum PropertySubType {
PROP_NONE = 0,
diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript
index 1cb24630fbe..d0002eda30b 100644
--- a/source/blender/makesrna/SConscript
+++ b/source/blender/makesrna/SConscript
@@ -9,6 +9,7 @@ objs += o
incs = '#/intern/guardedalloc #/intern/memutil #/intern/audaspace/intern ../blenkernel ../blenlib ../makesdna intern .'
incs += ' ../windowmanager ../editors/include ../gpu ../imbuf ../ikplugin ../blenfont ../blenloader'
incs += ' ../render/extern/include'
+incs += ' ../nodes'
incs += ' #/extern/glew/include'
defs = []
@@ -61,4 +62,7 @@ if env['OURPLATFORM'] == 'linux':
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('INTERNATIONAL')
+
env.BlenderLib ( 'bf_rna', objs, Split(incs), defines=defs, libtype=['core','player'], priority = [165,20] )
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 27b109dd323..aa97da3a523 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -201,7 +201,7 @@ if(NOT WITH_MOD_FLUID)
endif()
if(WITH_FFTW3)
- add_definitions(-DFFTW3=1)
+ add_definitions(-DWITH_FFTW3)
endif()
if(WITH_SDL)
@@ -220,6 +220,10 @@ if(WITH_OPENCOLLADA)
add_definitions(-DWITH_COLLADA)
endif()
+if(WITH_INTERNATIONAL)
+ add_definitions(-DINTERNATIONAL)
+endif()
+
# Build makesrna executable
blender_include_dirs(
.
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 24c892b96c4..ef05875fe86 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -71,7 +71,7 @@ if env['WITH_BF_GAMEENGINE']:
defs.append('WITH_GAMEENGINE')
if env['WITH_BF_FFTW3']:
- defs.append('FFTW3=1')
+ defs.append('WITH_FFTW3')
if env['WITH_BF_SDL']:
defs.append('WITH_SDL')
@@ -98,6 +98,9 @@ if env['OURPLATFORM'] == 'linux':
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('INTERNATIONAL')
+
makesrna_tool.Append(CPPDEFINES=defs)
makesrna_tool.Append (CPPPATH = Split(incs))
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 76e42333492..6ce51ca581b 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -522,11 +522,14 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
+ const PropertySubType subtype= prop->subtype;
+ const char *string_copy_func= (subtype==PROP_FILEPATH || subtype==PROP_DIRPATH || subtype==PROP_FILENAME) ? "BLI_strncpy" : "BLI_strncpy_utf8";
+
rna_print_data_get(f, dp);
if(sprop->maxlength)
- fprintf(f, " BLI_strncpy(value, data->%s, %d);\n", dp->dnaname, sprop->maxlength);
+ fprintf(f, " %s(value, data->%s, %d);\n", string_copy_func, dp->dnaname, sprop->maxlength);
else
- fprintf(f, " BLI_strncpy(value, data->%s, sizeof(data->%s));\n", dp->dnaname, dp->dnaname);
+ fprintf(f, " %s(value, data->%s, sizeof(data->%s));\n", string_copy_func, dp->dnaname, dp->dnaname);
}
fprintf(f, "}\n\n");
break;
@@ -734,11 +737,14 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
fprintf(f, " %s(ptr, value);\n", manualfunc);
}
else {
+ const PropertySubType subtype= prop->subtype;
+ const char *string_copy_func= (subtype==PROP_FILEPATH || subtype==PROP_DIRPATH || subtype==PROP_FILENAME) ? "BLI_strncpy" : "BLI_strncpy_utf8";
+
rna_print_data_get(f, dp);
if(sprop->maxlength)
- fprintf(f, " BLI_strncpy(data->%s, value, %d);\n", dp->dnaname, sprop->maxlength);
+ fprintf(f, " %s(data->%s, value, %d);\n", string_copy_func, dp->dnaname, sprop->maxlength);
else
- fprintf(f, " BLI_strncpy(data->%s, value, sizeof(data->%s));\n", dp->dnaname, dp->dnaname);
+ fprintf(f, " %s(data->%s, value, sizeof(data->%s));\n", string_copy_func, dp->dnaname, dp->dnaname);
}
fprintf(f, "}\n\n");
break;
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 82217cdc3e4..5c90c1bce91 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -99,7 +99,7 @@ int rna_ID_name_length(PointerRNA *ptr)
void rna_ID_name_set(PointerRNA *ptr, const char *value)
{
ID *id= (ID*)ptr->data;
- BLI_strncpy(id->name+2, value, sizeof(id->name)-2);
+ BLI_strncpy_utf8(id->name+2, value, sizeof(id->name)-2);
test_idbutton(id->name+2);
}
@@ -235,7 +235,7 @@ StructRNA *rna_PropertyGroup_register(Main *UNUSED(bmain), ReportList *reports,
* owns the string pointer which it could potentually free while blender
* is running. */
if(BLI_strnlen(identifier, MAX_IDPROP_NAME) == MAX_IDPROP_NAME) {
- BKE_reportf(reports, RPT_ERROR, "registering id property class: '%s' is too long, maximum length is " STRINGIFY(MAX_IDPROP_NAME) ".", identifier);
+ BKE_reportf(reports, RPT_ERROR, "registering id property class: '%s' is too long, maximum length is " STRINGIFY(MAX_IDPROP_NAME), identifier);
return NULL;
}
@@ -414,16 +414,16 @@ static void rna_def_ID_materials(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "ID Materials", "Collection of materials");
func= RNA_def_function(srna, "append", "material_append_id");
- RNA_def_function_ui_description(func, "Add a new material to the data block.");
- parm= RNA_def_pointer(func, "material", "Material", "", "Material to add.");
+ RNA_def_function_ui_description(func, "Add a new material to the data block");
+ parm= RNA_def_pointer(func, "material", "Material", "", "Material to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "pop", "material_pop_id");
- RNA_def_function_ui_description(func, "Remove a material from the data block.");
- parm= RNA_def_int(func, "index", 0, 0, MAXMAT, "", "Index of material to remove.", 0, MAXMAT);
+ RNA_def_function_ui_description(func, "Remove a material from the data block");
+ parm= RNA_def_int(func, "index", 0, 0, MAXMAT, "", "Index of material to remove", 0, MAXMAT);
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_boolean(func, "update_data", 0, "", "Update data by re-adjusting the material slots assigned.");
- parm= RNA_def_pointer(func, "material", "Material", "", "Material to remove.");
+ RNA_def_boolean(func, "update_data", 0, "", "Update data by re-adjusting the material slots assigned");
+ parm= RNA_def_pointer(func, "material", "Material", "", "Material to remove");
RNA_def_function_return(func, parm);
}
@@ -475,25 +475,26 @@ static void rna_def_ID(BlenderRNA *brna)
/* functions */
func= RNA_def_function(srna, "copy", "rna_ID_copy");
- RNA_def_function_ui_description(func, "Create a copy of this datablock (not supported for all datablocks).");
- parm= RNA_def_pointer(func, "id", "ID", "", "New copy of the ID.");
+ RNA_def_function_ui_description(func, "Create a copy of this datablock (not supported for all datablocks)");
+ parm= RNA_def_pointer(func, "id", "ID", "", "New copy of the ID");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "user_clear", "rna_ID_user_clear");
- RNA_def_function_ui_description(func, "Clears the user count of a datablock so its not saved, on reload the data will be removed.");
+ RNA_def_function_ui_description(func, "Clears the user count of a datablock so its not saved, "
+ "on reload the data will be removed");
func= RNA_def_function(srna, "animation_data_create", "BKE_id_add_animdata");
- RNA_def_function_ui_description(func, "Create animation data to this ID, note that not all ID types support this.");
- parm= RNA_def_pointer(func, "anim_data", "AnimData", "", "New animation data or NULL.");
+ RNA_def_function_ui_description(func, "Create animation data to this ID, note that not all ID types support this");
+ parm= RNA_def_pointer(func, "anim_data", "AnimData", "", "New animation data or NULL");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "animation_data_clear", "BKE_free_animdata");
- RNA_def_function_ui_description(func, "Clear animation on this this ID.");
+ RNA_def_function_ui_description(func, "Clear animation on this this ID");
func= RNA_def_function(srna, "update_tag", "rna_ID_update_tag");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Tag the id to update its display data.");
- RNA_def_enum_flag(func, "refresh", update_flag_items, 0, "", "Type of updates to perform.");
+ RNA_def_function_ui_description(func, "Tag the id to update its display data");
+ RNA_def_enum_flag(func, "refresh", update_flag_items, 0, "", "Type of updates to perform");
}
static void rna_def_library(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index ad79771416d..b7709416a75 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -43,6 +43,9 @@
#include "BLI_dynstr.h"
#include "BLI_ghash.h"
+#include "BLF_api.h"
+#include "BLF_translation.h"
+
#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
@@ -449,8 +452,10 @@ static const char *rna_ensure_property_identifier(PropertyRNA *prop)
static const char *rna_ensure_property_description(PropertyRNA *prop)
{
+ const char *description= NULL;
+
if(prop->magic == RNA_MAGIC)
- return prop->description;
+ description= prop->description;
else {
/* attempt to get the local ID values */
IDProperty *idp_ui= rna_idproperty_ui(prop);
@@ -458,23 +463,51 @@ static const char *rna_ensure_property_description(PropertyRNA *prop)
if(idp_ui) {
IDProperty *item= IDP_GetPropertyTypeFromGroup(idp_ui, "description", IDP_STRING);
if(item)
- return IDP_String(item);
+ description= IDP_String(item);
}
- return ((IDProperty*)prop)->name; /* XXX - not correct */
+ if(description == NULL)
+ description= ((IDProperty*)prop)->name; /* XXX - not correct */
}
+
+#ifdef INTERNATIONAL
+ if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_TOOLTIPS))
+ description= BLF_gettext(description);
+#endif
+
+ return description;
}
static const char *rna_ensure_property_name(PropertyRNA *prop)
{
+ const char *name;
+
if(prop->magic == RNA_MAGIC)
- return prop->name;
+ name= prop->name;
else
- return ((IDProperty*)prop)->name;
+ name= ((IDProperty*)prop)->name;
+
+#ifdef INTERNATIONAL
+ if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE))
+ name= BLF_gettext(name);
+#endif
+
+ return name;
}
/* Structs */
+StructRNA *RNA_struct_find(const char *identifier)
+{
+ StructRNA *type;
+ if (identifier) {
+ for (type = BLENDER_RNA.structs.first; type; type = type->cont.next)
+ if (strcmp(type->identifier, identifier)==0)
+ return type;
+ }
+ return NULL;
+}
+
const char *RNA_struct_identifier(StructRNA *type)
{
return type->identifier;
@@ -1114,6 +1147,7 @@ void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, En
*totitem= tot;
}
+
}
else {
*item= eprop->item;
@@ -1122,6 +1156,45 @@ void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, En
}
}
+void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item, int *totitem, int *free)
+{
+ RNA_property_enum_items(C, ptr, prop, item, totitem, free);
+
+#ifdef INTERNATIONAL
+ if((U.transopts&USER_DOTRANSLATE) && (U.transopts&USER_TR_IFACE)) {
+ int i;
+ EnumPropertyItem *nitem;
+
+ if(*free) {
+ nitem= *item;
+ } else {
+ int totitem= 0;
+
+ /* count */
+ for(i=0; (*item)[i].identifier; i++)
+ totitem++;
+
+ nitem= MEM_callocN(sizeof(EnumPropertyItem)*(totitem+1), "enum_items_gettexted");
+
+ for(i=0; (*item)[i].identifier; i++)
+ nitem[i]= (*item)[i];
+
+ *free= 1;
+ }
+
+ for(i=0; nitem[i].identifier; i++) {
+ if( nitem[i].name )
+ nitem[i].name = BLF_gettext(nitem[i].name);
+ if( nitem[i].description )
+ nitem[i].description = BLF_gettext(nitem[i].description);
+ }
+
+ *item= nitem;
+ }
+#endif
+}
+
+
int RNA_property_enum_value(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const char *identifier, int *value)
{
EnumPropertyItem *item, *item_array;
@@ -2901,7 +2974,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
itemtype= RNA_property_type(itemprop);
if(!ELEM3(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
- BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported.");
+ BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported");
return 0;
}
@@ -2912,7 +2985,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
if(RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) {
int arraylen = (itemlen == 0) ? 1 : itemlen;
if(in.len != arraylen*out.len) {
- BKE_reportf(reports, RPT_ERROR, "Array length mismatch (expected %d, got %d).", out.len*arraylen, in.len);
+ BKE_reportf(reports, RPT_ERROR, "Array length mismatch (expected %d, got %d)", out.len*arraylen, in.len);
return 0;
}
@@ -2968,13 +3041,13 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
itemtype= RNA_property_type(iprop);
}
else {
- BKE_reportf(reports, RPT_ERROR, "Property named %s not found.", propname);
+ BKE_reportf(reports, RPT_ERROR, "Property named %s not found", propname);
err= 1;
break;
}
if(!ELEM3(itemtype, PROP_BOOLEAN, PROP_INT, PROP_FLOAT)) {
- BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported.");
+ BKE_report(reports, RPT_ERROR, "Only boolean, int and float properties supported");
err= 1;
break;
}
@@ -2983,7 +3056,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
/* editable check */
if(!set || RNA_property_editable(&itemptr, iprop)) {
if(a+itemlen > in.len) {
- BKE_reportf(reports, RPT_ERROR, "Array length mismatch (got %d, expected more).", in.len);
+ BKE_reportf(reports, RPT_ERROR, "Array length mismatch (got %d, expected more)", in.len);
err= 1;
break;
}
@@ -4396,7 +4469,7 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
buf= MEM_mallocN(sizeof(char)*(length+1), "RNA_property_as_string");
buf_esc= MEM_mallocN(sizeof(char)*(length*2+1), "RNA_property_as_string esc");
RNA_property_string_get(ptr, prop, buf);
- BLI_strescape(buf_esc, buf, length*2);
+ BLI_strescape(buf_esc, buf, length*2+1);
MEM_freeN(buf);
BLI_dynstr_appendf(dynstr, "\"%s\"", buf_esc);
MEM_freeN(buf_esc);
@@ -5363,7 +5436,8 @@ int RNA_property_copy(PointerRNA *ptr, PointerRNA *fromptr, PropertyRNA *prop, i
return 0;
}
-void RNA_warning(const char *format, ...)
+/* use RNA_warning macro which includes __func__ suffix */
+void _RNA_warning(const char *format, ...)
{
va_list args;
@@ -5371,6 +5445,11 @@ void RNA_warning(const char *format, ...)
vprintf(format, args);
va_end(args);
+ /* gcc macro adds '\n', but cant use for other compilers */
+#ifndef __GNUC__
+ fputc('\n', stdout);
+#endif
+
#ifdef WITH_PYTHON
{
extern void PyC_LineSpit(void);
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 815a9c92968..6c193a66490 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -137,7 +137,7 @@ static TimeMarker *rna_Action_pose_markers_new(bAction *act, ReportList *reports
TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
marker->flag= 1;
marker->frame= 1;
- BLI_strncpy(marker->name, name, sizeof(marker->name));
+ BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
BLI_addtail(&act->markers, marker);
return marker;
}
@@ -489,8 +489,8 @@ static void rna_def_action_groups(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Action Groups", "Collection of action groups");
func= RNA_def_function(srna, "new", "rna_Action_groups_new");
- RNA_def_function_ui_description(func, "Add a keyframe to the curve.");
- parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the action group.");
+ RNA_def_function_ui_description(func, "Add a keyframe to the curve");
+ parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the action group");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", "Newly created action group");
@@ -498,9 +498,9 @@ static void rna_def_action_groups(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "remove", "rna_Action_groups_remove");
- RNA_def_function_ui_description(func, "Remove action group.");
+ RNA_def_function_ui_description(func, "Remove action group");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", "Action group to remove.");
+ parm= RNA_def_pointer(func, "action_group", "ActionGroup", "", "Action group to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -517,21 +517,21 @@ static void rna_def_action_fcurves(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Action FCurves", "Collection of action fcurves");
func= RNA_def_function(srna, "new", "rna_Action_fcurve_new");
- RNA_def_function_ui_description(func, "Add a keyframe to the curve.");
+ RNA_def_function_ui_description(func, "Add a keyframe to the curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_string(func, "data_path", "", 0, "Data Path", "FCurve data path to use.");
+ parm= RNA_def_string(func, "data_path", "", 0, "Data Path", "FCurve data path to use");
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index.", 0, INT_MAX);
- RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this fcurve into.");
+ RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Array index", 0, INT_MAX);
+ RNA_def_string(func, "action_group", "", 0, "Action Group", "Acton group to add this fcurve into");
parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "Newly created fcurve");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Action_fcurve_remove");
- RNA_def_function_ui_description(func, "Remove action group.");
+ RNA_def_function_ui_description(func, "Remove action group");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "FCurve to remove.");
+ parm= RNA_def_pointer(func, "fcurve", "FCurve", "", "FCurve to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -549,18 +549,18 @@ static void rna_def_action_pose_markers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Action Pose Markers", "Collection of timeline markers");
func= RNA_def_function(srna, "new", "rna_Action_pose_markers_new");
- RNA_def_function_ui_description(func, "Add a pose marker to the action.");
+ RNA_def_function_ui_description(func, "Add a pose marker to the action");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique).");
+ parm= RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created marker");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Action_pose_markers_remove");
- RNA_def_function_ui_description(func, "Remove a timeline marker.");
+ RNA_def_function_ui_description(func, "Remove a timeline marker");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove.");
+ parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 5eccba16c3d..43cf1fae931 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -60,6 +60,7 @@ EnumPropertyItem actuator_type_items[] ={
{ACT_SOUND, "SOUND", 0, "Sound", ""},
{ACT_STATE, "STATE", 0, "State", ""},
{ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
+ {ACT_STEERING, "STEERING", 0, "Steering", ""},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -103,6 +104,8 @@ static StructRNA* rna_Actuator_refine(struct PointerRNA *ptr)
return &RNA_StateActuator;
case ACT_ARMATURE:
return &RNA_ArmatureActuator;
+ case ACT_STEERING:
+ return &RNA_SteeringActuator;
default:
return &RNA_Actuator;
}
@@ -323,30 +326,6 @@ static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr,
}
}
-static void rna_FcurveActuator_add_set(struct PointerRNA *ptr, int value)
-{
- bActuator *act = (bActuator *)ptr->data;
- bIpoActuator *ia = act->data;
-
- if(value == 1){
- ia->flag &= ~ACT_IPOFORCE;
- ia->flag |= ACT_IPOADD;
- }else
- ia->flag &= ~ACT_IPOADD;
-}
-
-static void rna_FcurveActuator_force_set(struct PointerRNA *ptr, int value)
-{
- bActuator *act = (bActuator *)ptr->data;
- bIpoActuator *ia = act->data;
-
- if(value == 1){
- ia->flag &= ~ACT_IPOADD;
- ia->flag |= ACT_IPOFORCE;
- }else
- ia->flag &= ~ACT_IPOFORCE;
-}
-
static void rna_ActionActuator_add_set(struct PointerRNA *ptr, int value)
{
bActuator *act = (bActuator *)ptr->data;
@@ -459,6 +438,7 @@ EnumPropertyItem *rna_Actuator_type_itemf(bContext *C, PointerRNA *ptr, Property
RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_PROPERTY);
RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_RANDOM);
RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_SCENE);
+ RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_STEERING);
RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_SOUND);
RNA_enum_items_add_value(&item, &totitem, actuator_type_items, ACT_STATE);
@@ -504,6 +484,18 @@ static void rna_Actuator_Armature_update(Main *bmain, Scene *scene, PointerRNA *
constraint[0] = 0;
}
+static void rna_SteeringActuator_navmesh_set(PointerRNA *ptr, PointerRNA value)
+{
+ bActuator *act = (bActuator*)ptr->data;
+ bSteeringActuator *sa = (bSteeringActuator*) act->data;
+
+ Object* obj = value.data;
+ if (obj && obj->body_type==OB_BODY_TYPE_NAVMESH)
+ sa->navmesh = obj;
+ else
+ sa->navmesh = NULL;
+}
+
/* note: the following set functions exists only to avoid id refcounting */
static void rna_Actuator_editobject_mesh_set(PointerRNA *ptr, PointerRNA value)
{
@@ -858,77 +850,6 @@ static void rna_def_object_actuator(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
}
-/* The fcurve actuator has been replace with the action actuator, so this is no longer used */
-static void rna_def_fcurve_actuator(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- static EnumPropertyItem prop_type_items[] ={
- {ACT_IPO_PLAY, "PLAY", 0, "Play", ""},
- {ACT_IPO_PINGPONG, "PINGPONG", 0, "Ping Pong", ""},
- {ACT_IPO_FLIPPER, "FLIPPER", 0, "Flipper", ""},
- {ACT_IPO_LOOP_STOP, "STOP", 0, "Loop Stop", ""},
- {ACT_IPO_LOOP_END, "END", 0, "Loop End", ""},
-// {ACT_IPO_KEY2KEY, "IPOCHILD", 0, "Key to Key", ""},
- {ACT_IPO_FROM_PROP, "PROP", 0, "Property", ""},
- {0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "FCurveActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "F-Curve Actuator", "Actuator to animate the object");
- RNA_def_struct_sdna_from(srna, "bIpoActuator", "data");
-
- prop= RNA_def_property(srna, "play_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "type");
- RNA_def_property_enum_items(prop, prop_type_items);
- RNA_def_property_ui_text(prop, "F-Curve Type", "Specify the way you want to play the animation");
- RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "sta");
- RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2);
- RNA_def_property_ui_text(prop, "Start Frame", "");
- RNA_def_property_update(prop, NC_SCENE, NULL);
-
- prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "end");
- RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2);
- RNA_def_property_ui_text(prop, "End Frame", "");
- RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_ui_text(prop, "Property", "Use this property to define the F-Curve position");
- RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "frameProp");
- RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property");
-
- /* booleans */
- prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOADD);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_add_set");
- RNA_def_property_ui_text(prop, "Add", "F-Curve is added to the current loc/rot/scale in global or local coordinate according to Local flag");
- RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- prop= RNA_def_property(srna, "use_force", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOFORCE);
- RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_force_set");
- RNA_def_property_ui_text(prop, "Force", "Apply F-Curve as a global or local force depending on the local option (dynamic objects only)");
- RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOLOCAL);
- RNA_def_property_ui_text(prop, "L", "Let the F-Curve act in local coordinates, used in Force and Add mode");
- RNA_def_property_update(prop, NC_LOGIC, NULL);
-
- prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOCHILD);
- RNA_def_property_ui_text(prop, "Child", "Update F-Curve on all children Objects as well");
- RNA_def_property_update(prop, NC_LOGIC, NULL);
-}
-
static void rna_def_camera_actuator(BlenderRNA *brna)
{
StructRNA *srna;
@@ -940,7 +861,7 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "CameraActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Camera Actuator", "Actuator to ..");
+ RNA_def_struct_ui_text(srna, "Camera Actuator", "Actuator to...");
RNA_def_struct_sdna_from(srna, "bCameraActuator", "data");
prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
@@ -1466,7 +1387,7 @@ static void rna_def_scene_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SceneActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Scene Actuator", "Actuator to ..");
+ RNA_def_struct_ui_text(srna, "Scene Actuator", "Actuator to...");
RNA_def_struct_sdna_from(srna, "bSceneActuator", "data");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
@@ -1524,7 +1445,7 @@ static void rna_def_random_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "RandomActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Random Actuator", "Actuator to ..");
+ RNA_def_struct_ui_text(srna, "Random Actuator", "Actuator to...");
RNA_def_struct_sdna_from(srna, "bRandomActuator", "data");
prop= RNA_def_property(srna, "seed", PROP_INT, PROP_NONE);
@@ -1641,7 +1562,7 @@ static void rna_def_message_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "MessageActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Message Actuator", "Actuator to ..");
+ RNA_def_struct_ui_text(srna, "Message Actuator", "Actuator to...");
RNA_def_struct_sdna_from(srna, "bMessageActuator", "data");
prop= RNA_def_property(srna, "to_property", PROP_STRING, PROP_NONE);
@@ -1956,7 +1877,7 @@ static void rna_def_armature_actuator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ArmatureActuator", "Actuator");
- RNA_def_struct_ui_text(srna, "Armature Actuator", "Actuator to ..");
+ RNA_def_struct_ui_text(srna, "Armature Actuator", "Actuator to...");
RNA_def_struct_sdna_from(srna, "bArmatureActuator", "data");
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
@@ -1995,6 +1916,108 @@ static void rna_def_armature_actuator(BlenderRNA *brna)
RNA_def_property_update(prop, NC_LOGIC, NULL);
}
+static void rna_def_steering_actuator(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_type_items[] ={
+ {ACT_STEERING_SEEK, "SEEK", 0, "Seek", ""},
+ {ACT_STEERING_FLEE, "FLEE", 0, "Flee", ""},
+ {ACT_STEERING_PATHFOLLOWING, "PATHFOLLOWING", 0, "Path following", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem facingaxis_items[] ={
+ {1, "X", 0, "X", ""},
+ {2, "Y", 0, "Y", ""},
+ {3, "Z", 0, "Z", ""},
+ {4, "NEG_X", 0, "-X", ""},
+ {5, "NEG_Y", 0, "-Y", ""},
+ {6, "NEG_Z", 0, "-Z", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "SteeringActuator", "Actuator");
+ RNA_def_struct_ui_text(srna, "Steering Actuator", "");
+ RNA_def_struct_sdna_from(srna, "bSteeringActuator", "data");
+
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, prop_type_items);
+ RNA_def_property_ui_text(prop, "Behavior", "");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "velocity");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Velocity", "Velocity magnitude");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "acceleration", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "acceleration");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Acceleration", "Max acceleration");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "turn_speed", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "turnspeed");
+ RNA_def_property_range(prop, 0.0, 720.0);
+ RNA_def_property_ui_text(prop, "Turn Speed", "Max turn speed");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "dist");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Dist", "Relax distance");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_sdna(prop, NULL, "target");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Target Object", "Set target object");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "self_terminated", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_SELFTERMINATED);
+ RNA_def_property_ui_text(prop, "Self Terminated", "Terminate when target is reached");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "show_visualization", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_ENABLEVISUALIZATION);
+ RNA_def_property_ui_text(prop, "Visualize", "Enable debug visualization");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "update_period", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "updateTime");
+ RNA_def_property_ui_range(prop, -1, 100000, 1, 1);
+ RNA_def_property_ui_text(prop, "Update period", "Path update period");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "navmesh", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Object");
+ RNA_def_property_pointer_sdna(prop, NULL, "navmesh");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Navigation Mesh Object", "Navigation mesh");
+ RNA_def_property_pointer_funcs(prop, NULL, "rna_SteeringActuator_navmesh_set", NULL, NULL);
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "facing", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_AUTOMATICFACING);
+ RNA_def_property_ui_text(prop, "Facing", "Enable automatic facing");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "facing_axis", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "facingaxis");
+ RNA_def_property_enum_items(prop, facingaxis_items);
+ RNA_def_property_ui_text(prop, "Axis", "Axis for automatic facing");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
+ prop= RNA_def_property(srna, "normal_up", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_STEERING_NORMALUP);
+ RNA_def_property_ui_text(prop, "N", "Use normal of the navmesh to set \"UP\" vector");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+}
+
void RNA_def_actuator(BlenderRNA *brna)
{
rna_def_actuator(brna);
@@ -2016,6 +2039,7 @@ void RNA_def_actuator(BlenderRNA *brna)
rna_def_shape_action_actuator(brna);
rna_def_state_actuator(brna);
rna_def_armature_actuator(brna);
+ rna_def_steering_actuator(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_actuator_api.c b/source/blender/makesrna/intern/rna_actuator_api.c
index 3c1f78c21c3..c3f9ff35279 100644
--- a/source/blender/makesrna/intern/rna_actuator_api.c
+++ b/source/blender/makesrna/intern/rna_actuator_api.c
@@ -61,14 +61,14 @@ void RNA_api_actuator(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "link", "rna_Actuator_link");
- RNA_def_function_ui_description(func, "Link the actuator to a controller.");
- parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to.");
+ RNA_def_function_ui_description(func, "Link the actuator to a controller");
+ parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
func= RNA_def_function(srna, "unlink", "rna_Actuator_unlink");
- RNA_def_function_ui_description(func, "Unlink the actuator from a controller.");
- parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from.");
+ RNA_def_function_ui_description(func, "Unlink the actuator from a controller");
+ parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 0395a54be8e..702529fde53 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -188,7 +188,7 @@ static StructRNA *rna_KeyingSetInfo_register(Main *bmain, ReportList *reports, v
return NULL;
if (strlen(identifier) >= sizeof(dummyksi.idname)) {
- BKE_reportf(reports, RPT_ERROR, "registering keying set info class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyksi.idname));
+ BKE_reportf(reports, RPT_ERROR, "Registering keying set info class: '%s' is too long, maximum length is %d", identifier, (int)sizeof(dummyksi.idname));
return NULL;
}
@@ -252,7 +252,7 @@ static void rna_ksPath_RnaPath_get(PointerRNA *ptr, char *value)
if (ksp->rna_path)
strcpy(value, ksp->rna_path);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_ksPath_RnaPath_length(PointerRNA *ptr)
@@ -353,7 +353,7 @@ static KS_Path *rna_KeyingSet_paths_add(KeyingSet *keyingset, ReportList *report
keyingset->active_path= BLI_countlist(&keyingset->paths);
}
else {
- BKE_report(reports, RPT_ERROR, "Keying Set Path could not be added.");
+ BKE_report(reports, RPT_ERROR, "Keying Set Path could not be added");
}
/* return added path */
@@ -372,7 +372,7 @@ static void rna_KeyingSet_paths_remove(KeyingSet *keyingset, ReportList *reports
keyingset->active_path = 0;
}
else {
- BKE_report(reports, RPT_ERROR, "Keying Set Path could not be removed.");
+ BKE_report(reports, RPT_ERROR, "Keying Set Path could not be removed");
}
}
@@ -392,7 +392,7 @@ static void rna_KeyingSet_paths_clear(KeyingSet *keyingset, ReportList *reports)
keyingset->active_path = 0;
}
else {
- BKE_report(reports, RPT_ERROR, "Keying Set Paths could not be removed.");
+ BKE_report(reports, RPT_ERROR, "Keying Set Paths could not be removed");
}
}
@@ -608,27 +608,31 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
/* Add Path */
func= RNA_def_function(srna, "add", "rna_KeyingSet_paths_add");
- RNA_def_function_ui_description(func, "Add a new path for the Keying Set.");
+ RNA_def_function_ui_description(func, "Add a new path for the Keying Set");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* return arg */
parm= RNA_def_pointer(func, "ksp", "KeyingSetPath", "New Path", "Path created and added to the Keying Set");
RNA_def_function_return(func, parm);
/* ID-block for target */
- parm= RNA_def_pointer(func, "target_id", "ID", "Target ID", "ID-Datablock for the destination.");
+ parm= RNA_def_pointer(func, "target_id", "ID", "Target ID", "ID-Datablock for the destination");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* rna-path */
- parm= RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough
+ parm= RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property"); // xxx hopefully this is long enough
RNA_def_property_flag(parm, PROP_REQUIRED);
/* index (defaults to -1 for entire array) */
- RNA_def_int(func, "index", -1, -1, INT_MAX, "Index", "The index of the destination property (i.e. axis of Location/Rotation/etc.), or -1 for the entire array.", 0, INT_MAX);
+ RNA_def_int(func, "index", -1, -1, INT_MAX, "Index",
+ "The index of the destination property (i.e. axis of Location/Rotation/etc.), "
+ "or -1 for the entire array", 0, INT_MAX);
/* grouping */
- RNA_def_enum(func, "group_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME, "Grouping Method", "Method used to define which Group-name to use.");
- RNA_def_string(func, "group_name", "", 64, "Group Name", "Name of Action Group to assign destination to (only if grouping mode is to use this name).");
+ RNA_def_enum(func, "group_method", keyingset_path_grouping_items, KSP_GROUP_KSNAME,
+ "Grouping Method", "Method used to define which Group-name to use");
+ RNA_def_string(func, "group_name", "", 64, "Group Name",
+ "Name of Action Group to assign destination to (only if grouping mode is to use this name)");
/* Remove Path */
func= RNA_def_function(srna, "remove", "rna_KeyingSet_paths_remove");
- RNA_def_function_ui_description(func, "Remove the given path from the Keying Set.");
+ RNA_def_function_ui_description(func, "Remove the given path from the Keying Set");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* path to remove */
parm= RNA_def_pointer(func, "path", "KeyingSetPath", "Path", "");
@@ -637,7 +641,7 @@ static void rna_def_keyingset_paths(BlenderRNA *brna, PropertyRNA *cprop)
/* Remove All Paths */
func= RNA_def_function(srna, "clear", "rna_KeyingSet_paths_clear");
- RNA_def_function_ui_description(func, "Remove all the paths from the Keying Set.");
+ RNA_def_function_ui_description(func, "Remove all the paths from the Keying Set");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
@@ -713,15 +717,15 @@ static void rna_api_animdata_nla_tracks(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "new", "rna_NlaTrack_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
RNA_def_function_ui_description(func, "Add a new NLA Track");
- RNA_def_pointer(func, "prev", "NlaTrack", "", "NLA Track to add the new one after.");
+ RNA_def_pointer(func, "prev", "NlaTrack", "", "NLA Track to add the new one after");
/* return type */
- parm = RNA_def_pointer(func, "track", "NlaTrack", "", "New NLA Track.");
+ parm = RNA_def_pointer(func, "track", "NlaTrack", "", "New NLA Track");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_NlaTrack_remove");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- RNA_def_function_ui_description(func, "Remove a NLA Track.");
- parm = RNA_def_pointer(func, "track", "NlaTrack", "", "NLA Track to remove.");
+ RNA_def_function_ui_description(func, "Remove a NLA Track");
+ parm = RNA_def_pointer(func, "track", "NlaTrack", "", "NLA Track to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
@@ -751,7 +755,7 @@ static void rna_api_animdata_drivers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Add a new driver given an existing one");
RNA_def_pointer(func, "src_driver", "FCurve", "", "Existing Driver F-Curve to use as template for a new one");
/* return type */
- parm = RNA_def_pointer(func, "driver", "FCurve", "", "New Driver F-Curve.");
+ parm = RNA_def_pointer(func, "driver", "FCurve", "", "New Driver F-Curve");
RNA_def_function_return(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index e2399b5b57c..ec928415876 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -103,7 +103,7 @@ static void rna_Armature_act_edit_bone_set(PointerRNA *ptr, PointerRNA value)
EditBone *rna_Armature_edit_bone_new(bArmature *arm, ReportList *reports, const char *name)
{
if(arm->edbo==NULL) {
- BKE_reportf(reports, RPT_ERROR, "Armature '%s' not in editmode, cant add an editbone.", arm->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Armature '%s' not in editmode, cant add an editbone", arm->id.name+2);
return NULL;
}
return ED_armature_edit_bone_add(arm, name);
@@ -112,12 +112,12 @@ EditBone *rna_Armature_edit_bone_new(bArmature *arm, ReportList *reports, const
void rna_Armature_edit_bone_remove(bArmature *arm, ReportList *reports, EditBone *ebone)
{
if(arm->edbo==NULL) {
- BKE_reportf(reports, RPT_ERROR, "Armature '%s' not in editmode, cant remove an editbone.", arm->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Armature '%s' not in editmode, cant remove an editbone", arm->id.name+2);
return;
}
if(BLI_findindex(arm->edbo, ebone) == -1) {
- BKE_reportf(reports, RPT_ERROR, "Armature '%s' doesn't contain bone '%s'.", arm->id.name+2, ebone->name);
+ BKE_reportf(reports, RPT_ERROR, "Armature '%s' doesn't contain bone '%s'", arm->id.name+2, ebone->name);
return;
}
@@ -253,7 +253,7 @@ static void rna_EditBone_name_set(PointerRNA *ptr, const char *value)
char oldname[sizeof(ebone->name)], newname[sizeof(ebone->name)];
/* need to be on the stack */
- BLI_strncpy(newname, value, sizeof(ebone->name));
+ BLI_strncpy_utf8(newname, value, sizeof(ebone->name));
BLI_strncpy(oldname, ebone->name, sizeof(ebone->name));
ED_armature_bone_rename(arm, oldname, newname);
@@ -266,7 +266,7 @@ static void rna_Bone_name_set(PointerRNA *ptr, const char *value)
char oldname[sizeof(bone->name)], newname[sizeof(bone->name)];
/* need to be on the stack */
- BLI_strncpy(newname, value, sizeof(bone->name));
+ BLI_strncpy_utf8(newname, value, sizeof(bone->name));
BLI_strncpy(oldname, bone->name, sizeof(bone->name));
ED_armature_bone_rename(arm, oldname, newname);
@@ -787,7 +787,7 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop)
/* add target */
func= RNA_def_function(srna, "new", "rna_Armature_edit_bone_new");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Add a new bone.");
+ RNA_def_function_ui_description(func, "Add a new bone");
parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the bone");
RNA_def_property_flag(parm, PROP_REQUIRED);
diff --git a/source/blender/makesrna/intern/rna_armature_api.c b/source/blender/makesrna/intern/rna_armature_api.c
index fd9ae7f11c2..b65122835f1 100644
--- a/source/blender/makesrna/intern/rna_armature_api.c
+++ b/source/blender/makesrna/intern/rna_armature_api.c
@@ -62,7 +62,8 @@ void RNA_api_armature_edit_bone(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "align_roll", "rna_EditBone_align_roll");
- RNA_def_function_ui_description(func, "Align the bone to a localspace roll so the Z axis points in the direction of the vector given.");
+ RNA_def_function_ui_description(func, "Align the bone to a localspace roll so the Z axis "
+ "points in the direction of the vector given");
parm= RNA_def_float_vector(func, "vector", 3, NULL, -FLT_MAX, FLT_MAX, "Vector", "", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -73,8 +74,9 @@ void RNA_api_bone(StructRNA *srna)
FunctionRNA *func;
func= RNA_def_function(srna, "evaluate_envelope", "rna_Bone_do_envelope");
- RNA_def_function_ui_description(func, "Calculate bone envelope at given point.");
- parm= RNA_def_float_vector_xyz(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "Point", "Position in 3d space to evaluate", -FLT_MAX, FLT_MAX);
+ RNA_def_function_ui_description(func, "Calculate bone envelope at given point");
+ parm= RNA_def_float_vector_xyz(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "Point",
+ "Position in 3d space to evaluate", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return value */
parm= RNA_def_float(func, "factor", 0, -FLT_MAX, FLT_MAX, "Factor", "Envelope factor", -FLT_MAX, FLT_MAX);
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index cea130a4b74..4ef6e9f4af7 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -464,13 +464,13 @@ static void rna_def_color_ramp_element_api(BlenderRNA *brna, PropertyRNA *cprop)
parm= RNA_def_float(func, "position", 0.0f, 0.0f, 1.0f, "Position", "Position to add element", 0.0f, 1.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "element", "ColorRampElement", "", "New element.");
+ parm= RNA_def_pointer(func, "element", "ColorRampElement", "", "New element");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_ColorRampElement_remove");
RNA_def_function_ui_description(func, "Delete element from ColorRamp");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "element", "ColorRampElement", "", "Element to remove.");
+ parm= RNA_def_pointer(func, "element", "ColorRampElement", "", "Element to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 22d9a19f933..fdbb4f09f93 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -170,7 +170,7 @@ static void rna_Constraint_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(oldname, con->name, sizeof(con->name));
/* copy the new name into the name slot */
- BLI_strncpy(con->name, value, sizeof(con->name));
+ BLI_strncpy_utf8(con->name, value, sizeof(con->name));
/* make sure name is unique */
if (ptr->id.data) {
diff --git a/source/blender/makesrna/intern/rna_controller_api.c b/source/blender/makesrna/intern/rna_controller_api.c
index d9defe3f8aa..4d16633b9cd 100644
--- a/source/blender/makesrna/intern/rna_controller_api.c
+++ b/source/blender/makesrna/intern/rna_controller_api.c
@@ -68,17 +68,17 @@ void RNA_api_controller(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "link", "rna_Controller_link");
- RNA_def_function_ui_description(func, "Link the controller with a sensor/actuator.");
- parm= RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to link the controller to.");
+ RNA_def_function_ui_description(func, "Link the controller with a sensor/actuator");
+ parm= RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to link the controller to");
RNA_def_property_update(parm, NC_LOGIC, NULL);
- parm= RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to link the controller to.");
+ parm= RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to link the controller to");
RNA_def_property_update(parm, NC_LOGIC, NULL);
func= RNA_def_function(srna, "unlink", "rna_Controller_unlink");
- RNA_def_function_ui_description(func, "Unlink the controller from a sensor/actuator.");
- parm= RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to unlink the controller from.");
+ RNA_def_function_ui_description(func, "Unlink the controller from a sensor/actuator");
+ parm= RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to unlink the controller from");
RNA_def_property_update(parm, NC_LOGIC, NULL);
- parm= RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to unlink the controller from.");
+ parm= RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to unlink the controller from");
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 3cf6feb005c..5d0c1db572d 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -74,6 +74,20 @@ EnumPropertyItem curve_type_items[] = {
{CU_NURBS, "NURBS", 0, "Ease", ""},
{0, NULL, 0, NULL, NULL}};
+static const EnumPropertyItem curve3d_fill_mode_items[]= {
+ {0, "FULL", 0, "Full", ""},
+ {CU_BACK, "BACK", 0, "Back", ""},
+ {CU_FRONT, "FRONT", 0, "Front", ""},
+ {CU_FRONT|CU_BACK, "HALF", 0, "Half", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+static const EnumPropertyItem curve2d_fill_mode_items[]= {
+ {0, "NONE", 0, "None", ""},
+ {CU_BACK, "BACK", 0, "Back", ""},
+ {CU_FRONT, "FRONT", 0, "Front", ""},
+ {CU_FRONT|CU_BACK, "BOTH", 0, "Both", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "BLI_math.h"
@@ -278,6 +292,13 @@ static void rna_Curve_dimension_set(PointerRNA *ptr, int value)
}
}
+static EnumPropertyItem *rna_Curve_fill_mode_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
+{
+ Curve *cu= (Curve*)ptr->id.data;
+
+ /* cast to quiet warning it IS a const still */
+ return (EnumPropertyItem *)((cu->flag & CU_3D) ? curve3d_fill_mode_items : curve2d_fill_mode_items);
+}
static int rna_Nurb_length(PointerRNA *ptr)
{
@@ -1130,15 +1151,15 @@ static void rna_def_curve_spline_points(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Spline Points", "Collection of spline points");
func= RNA_def_function(srna, "add", "rna_Curve_spline_points_add");
- RNA_def_function_ui_description(func, "Add a number of points to this spline.");
+ RNA_def_function_ui_description(func, "Add a number of points to this spline");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_USE_REPORTS);
RNA_def_int(func, "count", 1, 1, INT_MAX, "Number", "Number of points to add to the spline", 1, INT_MAX);
/*
func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
- RNA_def_function_ui_description(func, "Remove a spline from a curve.");
+ RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove.");
+ parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
*/
}
@@ -1157,15 +1178,15 @@ static void rna_def_curve_spline_bezpoints(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Spline Bezier Points", "Collection of spline bezirt points");
func= RNA_def_function(srna, "add", "rna_Curve_spline_bezpoints_add");
- RNA_def_function_ui_description(func, "Add a number of points to this spline.");
+ RNA_def_function_ui_description(func, "Add a number of points to this spline");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_USE_REPORTS);
RNA_def_int(func, "count", 1, INT_MIN, INT_MAX, "Number", "Number of points to add to the spline", 0, INT_MAX);
/*
func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
- RNA_def_function_ui_description(func, "Remove a spline from a curve.");
+ RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove.");
+ parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
*/
}
@@ -1185,16 +1206,16 @@ static void rna_def_curve_splines(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Curve Splines", "Collection of curve splines");
func= RNA_def_function(srna, "new", "rna_Curve_spline_new");
- RNA_def_function_ui_description(func, "Add a new spline to the curve.");
- parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline.");
+ RNA_def_function_ui_description(func, "Add a new spline to the curve");
+ parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline.");
+ parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Curve_spline_remove");
- RNA_def_function_ui_description(func, "Remove a spline from a curve.");
+ RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove.");
+ parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
@@ -1345,14 +1366,11 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Dimensions", "Select 2D or 3D curve type");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "use_fill_front", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FRONT);
- RNA_def_property_ui_text(prop, "Front", "Draw filled front for extruded/beveled curves");
- RNA_def_property_update(prop, 0, "rna_Curve_update_data");
-
- prop= RNA_def_property(srna, "use_fill_back", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_BACK);
- RNA_def_property_ui_text(prop, "Back", "Draw filled back for extruded/beveled curves");
+ prop= RNA_def_property(srna, "fill_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
+ RNA_def_property_enum_items(prop, curve3d_fill_mode_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_Curve_fill_mode_itemf");
+ RNA_def_property_ui_text(prop, "Fill Mode", "Mode of filling curve");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "twist_mode", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index 0aa1c8f8aff..f53213f0a46 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -686,7 +686,7 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna)
static EnumPropertyItem prop_dynamicpaint_prox_falloff[] = {
{MOD_DPAINT_PRFALL_SMOOTH, "SMOOTH", ICON_SPHERECURVE, "Smooth", ""},
- {MOD_DPAINT_PRFALL_SHARP, "SHARP", ICON_NOCURVE, "Sharp", ""},
+ {MOD_DPAINT_PRFALL_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
{MOD_DPAINT_PRFALL_RAMP, "RAMP", ICON_COLOR, "Color Ramp", ""},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index e922a007249..11eec6a0a47 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -215,7 +215,7 @@ static void rna_DriverTarget_RnaPath_get(PointerRNA *ptr, char *value)
if (dtar->rna_path)
strcpy(value, dtar->rna_path);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_DriverTarget_RnaPath_length(PointerRNA *ptr)
@@ -309,7 +309,7 @@ static void rna_FCurve_RnaPath_get(PointerRNA *ptr, char *value)
if (fcu->rna_path)
strcpy(value, fcu->rna_path);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_FCurve_RnaPath_length(PointerRNA *ptr)
@@ -410,7 +410,7 @@ DriverVar *rna_Driver_new_variable(ChannelDriver *driver)
void rna_Driver_remove_variable(ChannelDriver *driver, ReportList *reports, DriverVar *dvar)
{
if(BLI_findindex(&driver->variables, dvar) == -1) {
- BKE_report(reports, RPT_ERROR, "Variable does not exist in this driver.");
+ BKE_report(reports, RPT_ERROR, "Variable does not exist in this driver");
return;
}
@@ -439,7 +439,7 @@ static FModifier *rna_FCurve_modifiers_new(FCurve *fcu, int type)
static void rna_FCurve_modifiers_remove(FCurve *fcu, ReportList *reports, FModifier *fcm)
{
if(BLI_findindex(&fcu->modifiers, fcm) == -1) {
- BKE_reportf(reports, RPT_ERROR, "FCurveModifier '%s' not found in fcurve.", fcm->name);
+ BKE_reportf(reports, RPT_ERROR, "F-Curve modifier '%s' not found in F-Curve", fcm->name);
return;
}
remove_fmodifier(&fcu->modifiers, fcm);
@@ -612,7 +612,7 @@ static void rna_FKeyframe_points_remove(FCurve *fcu, ReportList *reports, BezTri
{
int index= (int)(bezt - fcu->bezt);
if (index < 0 || index >= fcu->totvert) {
- BKE_report(reports, RPT_ERROR, "Keyframe not in F-Curve.");
+ BKE_report(reports, RPT_ERROR, "Keyframe not in F-Curve");
return;
}
@@ -1212,17 +1212,17 @@ static void rna_def_channeldriver_variables(BlenderRNA *brna, PropertyRNA *cprop
/* add variable */
func= RNA_def_function(srna, "new", "rna_Driver_new_variable");
- RNA_def_function_ui_description(func, "Add a new variable for the driver.");
+ RNA_def_function_ui_description(func, "Add a new variable for the driver");
/* return type */
- parm= RNA_def_pointer(func, "var", "DriverVariable", "", "Newly created Driver Variable.");
+ parm= RNA_def_pointer(func, "var", "DriverVariable", "", "Newly created Driver Variable");
RNA_def_function_return(func, parm);
/* remove variable */
func= RNA_def_function(srna, "remove", "rna_Driver_remove_variable");
- RNA_def_function_ui_description(func, "Remove an existing variable from the driver.");
+ RNA_def_function_ui_description(func, "Remove an existing variable from the driver");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* target to remove */
- parm= RNA_def_pointer(func, "variable", "DriverVariable", "", "Variable to remove from the driver.");
+ parm= RNA_def_pointer(func, "variable", "DriverVariable", "", "Variable to remove from the driver");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -1402,17 +1402,17 @@ static void rna_def_fcurve_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_FCurve_modifiers_new");
RNA_def_function_ui_description(func, "Add a constraint to this object");
/* return type */
- parm= RNA_def_pointer(func, "fmodifier", "FModifier", "", "New fmodifier.");
+ parm= RNA_def_pointer(func, "fmodifier", "FModifier", "", "New fmodifier");
RNA_def_function_return(func, parm);
/* object to add */
- parm= RNA_def_enum(func, "type", fmodifier_type_items, 1, "", "Constraint type to add.");
+ parm= RNA_def_enum(func, "type", fmodifier_type_items, 1, "", "Constraint type to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "remove", "rna_FCurve_modifiers_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a modifier from this fcurve.");
+ RNA_def_function_ui_description(func, "Remove a modifier from this F-Curve");
/* modifier to remove */
- parm= RNA_def_pointer(func, "modifier", "FModifier", "", "Removed modifier.");
+ parm= RNA_def_pointer(func, "modifier", "FModifier", "", "Removed modifier");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -1436,25 +1436,25 @@ static void rna_def_fcurve_keyframe_points(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Keyframe Points", "Collection of keyframe points");
func= RNA_def_function(srna, "insert", "rna_FKeyframe_points_insert");
- RNA_def_function_ui_description(func, "Add a keyframe point to a F-Curve.");
+ RNA_def_function_ui_description(func, "Add a keyframe point to a F-Curve");
parm= RNA_def_float(func, "frame", 0.0f, -FLT_MAX, FLT_MAX, "", "X Value of this keyframe point", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_float(func, "value", 0.0f, -FLT_MAX, FLT_MAX, "", "Y Value of this keyframe point", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_enum_flag(func, "options", keyframe_flag_items, 0, "", "Keyframe options.");
+ RNA_def_enum_flag(func, "options", keyframe_flag_items, 0, "", "Keyframe options");
parm= RNA_def_pointer(func, "keyframe", "Keyframe", "", "Newly created keyframe");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "add", "rna_FKeyframe_points_add");
- RNA_def_function_ui_description(func, "Add a keyframe point to a F-Curve.");
+ RNA_def_function_ui_description(func, "Add a keyframe point to a F-Curve");
RNA_def_int(func, "count", 1, 1, INT_MAX, "Number", "Number of points to add to the spline", 1, INT_MAX);
func= RNA_def_function(srna, "remove", "rna_FKeyframe_points_remove");
- RNA_def_function_ui_description(func, "Remove keyframe from an fcurve.");
+ RNA_def_function_ui_description(func, "Remove keyframe from an F-Curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "keyframe", "Keyframe", "", "Keyframe to remove.");
+ parm= RNA_def_pointer(func, "keyframe", "Keyframe", "", "Keyframe to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* optional */
RNA_def_boolean(func, "fast", 0, "Fast", "Fast keyframe removal to avoid recalculating the curve each time");
@@ -1569,15 +1569,15 @@ static void rna_def_fcurve(BlenderRNA *brna)
/* Functions */
func= RNA_def_function(srna, "evaluate", "evaluate_fcurve"); /* calls the C/API direct */
- RNA_def_function_ui_description(func, "Evaluate fcurve.");
- parm= RNA_def_float(func, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame", "Evaluate fcurve at given frame", -FLT_MAX, FLT_MAX);
+ RNA_def_function_ui_description(func, "Evaluate F-Curve");
+ parm= RNA_def_float(func, "frame", 1.0f, -FLT_MAX, FLT_MAX, "Frame", "Evaluate F-Curve at given frame", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return value */
- parm= RNA_def_float(func, "position", 0, -FLT_MAX, FLT_MAX, "Position", "FCurve position", -FLT_MAX, FLT_MAX);
+ parm= RNA_def_float(func, "position", 0, -FLT_MAX, FLT_MAX, "Position", "F-Curve position", -FLT_MAX, FLT_MAX);
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "range", "rna_fcurve_range");
- RNA_def_function_ui_description(func, "Get the time extents for F-Curve.");
+ RNA_def_function_ui_description(func, "Get the time extents for F-Curve");
/* return value */
parm= RNA_def_float_vector(func, "range", 2, NULL, -FLT_MAX, FLT_MAX, "Range", "Min/Max values", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_THICK_WRAP);
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 9811d7bd797..810db9f3634 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -280,16 +280,16 @@ static void rna_def_gpencil_layers(BlenderRNA *brna, PropertyRNA *cprop)
#if 0
func= RNA_def_function(srna, "new", "rna_GPencil_layer_new");
- RNA_def_function_ui_description(func, "Add a new spline to the curve.");
- parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline.");
+ RNA_def_function_ui_description(func, "Add a new spline to the curve");
+ parm= RNA_def_enum(func, "type", curve_type_items, CU_POLY, "", "type for the new spline");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline.");
+ parm= RNA_def_pointer(func, "spline", "Spline", "", "The newly created spline");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_GPencil_layer_remove");
- RNA_def_function_ui_description(func, "Remove a spline from a curve.");
+ RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove.");
+ parm= RNA_def_pointer(func, "spline", "Spline", "", "The spline to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
#endif
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 5d71d204a72..597f05ed9f6 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -56,7 +56,7 @@ static PointerRNA rna_Group_objects_get(CollectionPropertyIterator *iter)
static void rna_Group_objects_link(Group *group, bContext *C, ReportList *reports, Object *object)
{
if(!add_to_group(group, object, CTX_data_scene(C), NULL)) {
- BKE_reportf(reports, RPT_ERROR, "Object \"%s\" already in group \"%s\".", object->id.name+2, group->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Object \"%s\" already in group \"%s\"", object->id.name+2, group->id.name+2);
return;
}
@@ -66,7 +66,7 @@ static void rna_Group_objects_link(Group *group, bContext *C, ReportList *report
static void rna_Group_objects_unlink(Group *group, bContext *C, ReportList *reports, Object *object)
{
if(!rem_from_group(group, object, CTX_data_scene(C), NULL)) {
- BKE_reportf(reports, RPT_ERROR, "Object \"%s\" not in group \"%s\".", object->id.name+2, group->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Object \"%s\" not in group \"%s\"", object->id.name+2, group->id.name+2);
return;
}
@@ -94,7 +94,7 @@ static void rna_def_group_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add this object to a group");
/* object to add */
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to add.");
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to add");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* remove object */
@@ -102,7 +102,7 @@ static void rna_def_group_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Remove this object to a group");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
/* object to remove */
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove.");
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 7327c7203b9..b7827989a94 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -37,6 +37,9 @@
#include <time.h>
#include "RNA_define.h"
+#include "RNA_enum_types.h"
+
+#include "DNA_packedFile_types.h"
#include "BIF_gl.h"
@@ -127,6 +130,38 @@ static void rna_Image_save(Image *image, ReportList *reports)
}
}
+static void rna_Image_pack(Image *image, ReportList *reports, int as_png)
+{
+ ImBuf *ibuf = BKE_image_get_ibuf(image, NULL);
+
+ if (!as_png && (ibuf && (ibuf->userflags & IB_BITMAPDIRTY))) {
+ BKE_reportf(reports, RPT_ERROR, "Can't pack edited image from disk, only as internal PNG");
+ }
+ else {
+ if(as_png) {
+ BKE_image_memorypack(image);
+ }
+ else {
+ image->packedfile= newPackedFile(reports, image->name);
+ }
+ }
+}
+
+static void rna_Image_unpack(Image *image, ReportList *reports, int method)
+{
+ if (!image->packedfile) {
+ BKE_report(reports, RPT_ERROR, "Image not packed");
+ }
+ else if (image->source==IMA_SRC_SEQUENCE || image->source==IMA_SRC_MOVIE) {
+ BKE_report(reports, RPT_ERROR, "Unpacking movies or image sequences not supported");
+ return;
+ }
+ else {
+ /* reports its own error on failier */
+ unpackImage (reports, image, method);
+ }
+}
+
static void rna_Image_reload(Image *image)
{
BKE_image_signal(image, NULL, IMA_SIGNAL_RELOAD);
@@ -203,7 +238,7 @@ void RNA_api_image(StructRNA *srna)
func= RNA_def_function(srna, "save_render", "rna_Image_save_render");
RNA_def_function_ui_description(func, "Save image to a specific path using a scenes render settings");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_string_file_path(func, "filepath", "", 0, "", "Save path.");
+ parm= RNA_def_string_file_path(func, "filepath", "", 0, "", "Save path");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "scene", "Scene", "", "Scene to take image parameters from");
@@ -211,6 +246,16 @@ void RNA_api_image(StructRNA *srna)
RNA_def_function_ui_description(func, "Save image to its source path");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ func= RNA_def_function(srna, "pack", "rna_Image_pack");
+ RNA_def_function_ui_description(func, "Pack an image as embedded data into the .blend file");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_boolean(func, "as_png", 0, "as_png", "Pack the image as PNG (needed for generated/dirty images)");
+
+ func= RNA_def_function(srna, "unpack", "rna_Image_unpack");
+ RNA_def_function_ui_description(func, "Save an image packed in the .blend file to disk");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ RNA_def_enum(func, "method", unpack_method_items, PF_USE_LOCAL, "method", "How to unpack");
+
func= RNA_def_function(srna, "reload", "rna_Image_reload");
RNA_def_function_ui_description(func, "Reload the image from its source path");
@@ -221,8 +266,10 @@ void RNA_api_image(StructRNA *srna)
func= RNA_def_function(srna, "gl_load", "rna_Image_gl_load");
RNA_def_function_ui_description(func, "Load the image into OpenGL graphics memory");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_int(func, "filter", GL_LINEAR_MIPMAP_NEAREST, -INT_MAX, INT_MAX, "Filter", "The texture minifying function", -INT_MAX, INT_MAX);
- RNA_def_int(func, "mag", GL_LINEAR, -INT_MAX, INT_MAX, "Magnification", "The texture magnification function", -INT_MAX, INT_MAX);
+ RNA_def_int(func, "filter", GL_LINEAR_MIPMAP_NEAREST, -INT_MAX, INT_MAX, "Filter",
+ "The texture minifying function", -INT_MAX, INT_MAX);
+ RNA_def_int(func, "mag", GL_LINEAR, -INT_MAX, INT_MAX, "Magnification",
+ "The texture magnification function", -INT_MAX, INT_MAX);
/* return value */
parm= RNA_def_int(func, "error", 0, -INT_MAX, INT_MAX, "Error", "OpenGL error value", -INT_MAX, INT_MAX);
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 5fe3960c160..3f8502e3ede 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -262,6 +262,7 @@ void RNA_api_wm(struct StructRNA *srna);
void RNA_api_sensor(struct StructRNA *srna);
void RNA_api_controller(struct StructRNA *srna);
void RNA_api_actuator(struct StructRNA *srna);
+void RNA_api_texture(struct StructRNA *srna);
void RNA_api_environment_map(struct StructRNA *srna);
/* main collection functions */
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 3e65eb8665e..ad6f67cddaf 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -76,7 +76,7 @@ void rna_ShapeKey_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(oldname, kb->name, sizeof(kb->name));
/* copy the new name into the name slot */
- BLI_strncpy(kb->name, value, sizeof(kb->name));
+ BLI_strncpy_utf8(kb->name, value, sizeof(kb->name));
/* make sure the name is truly unique */
if (ptr->id.data) {
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 021aa9660ed..352aaa890a5 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -281,34 +281,34 @@ void RNA_def_main(BlenderRNA *brna)
/* plural must match idtypes in readblenentry.c */
MainCollectionDef lists[]= {
- {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks.", RNA_def_main_cameras},
- {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks.", RNA_def_main_scenes},
- {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks.", RNA_def_main_objects},
- {"materials", "Material", "rna_Main_mat_begin", "Materials", "Material datablocks.", RNA_def_main_materials},
- {"node_groups", "NodeTree", "rna_Main_nodetree_begin", "Node Groups", "Node group datablocks.", RNA_def_main_node_groups},
- {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh datablocks.", RNA_def_main_meshes},
- {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp datablocks.", RNA_def_main_lamps},
- {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks.", RNA_def_main_libraries},
- {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks.", RNA_def_main_screens},
- {"window_managers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks.", 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} ,
- {"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},
- {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks.", RNA_def_main_brushes},
- {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks.", RNA_def_main_worlds},
- {"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks.", RNA_def_main_groups},
- {"shape_keys", "Key", "rna_Main_key_begin", "Shape Keys", "Shape Key datablocks.", NULL},
- {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks (DEPRECATED).", NULL},
- {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks.", RNA_def_main_texts},
- {"speakers", "Speaker", "rna_Main_speaker_begin", "Speakers", "Speaker datablocks.", RNA_def_main_speakers},
- {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", RNA_def_main_sounds},
- {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks.", RNA_def_main_armatures},
- {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks.", RNA_def_main_actions},
- {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks.", RNA_def_main_particles},
- {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks.", RNA_def_main_gpencil},
+ {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks", RNA_def_main_cameras},
+ {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks", RNA_def_main_scenes},
+ {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks", RNA_def_main_objects},
+ {"materials", "Material", "rna_Main_mat_begin", "Materials", "Material datablocks", RNA_def_main_materials},
+ {"node_groups", "NodeTree", "rna_Main_nodetree_begin", "Node Groups", "Node group datablocks", RNA_def_main_node_groups},
+ {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh datablocks", RNA_def_main_meshes},
+ {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp datablocks", RNA_def_main_lamps},
+ {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks", RNA_def_main_libraries},
+ {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks", RNA_def_main_screens},
+ {"window_managers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks", 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} ,
+ {"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},
+ {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks", RNA_def_main_brushes},
+ {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks", RNA_def_main_worlds},
+ {"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks", RNA_def_main_groups},
+ {"shape_keys", "Key", "rna_Main_key_begin", "Shape Keys", "Shape Key datablocks", NULL},
+ {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks (DEPRECATED)", NULL},
+ {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks", RNA_def_main_texts},
+ {"speakers", "Speaker", "rna_Main_speaker_begin", "Speakers", "Speaker datablocks", RNA_def_main_speakers},
+ {"sounds", "Sound", "rna_Main_sound_begin", "Sounds", "Sound datablocks", RNA_def_main_sounds},
+ {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks", RNA_def_main_armatures},
+ {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks", RNA_def_main_actions},
+ {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks", RNA_def_main_particles},
+ {"grease_pencil", "GreasePencil", "rna_Main_gpencil_begin", "Grease Pencil", "Grease Pencil datablocks", RNA_def_main_gpencil},
{NULL, NULL, NULL, NULL, NULL, NULL}};
int i;
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index d69cb2063ab..511cd9562b5 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -103,7 +103,8 @@ void rna_Main_cameras_remove(Main *bmain, ReportList *reports, struct Camera *ca
if(ID_REAL_USERS(camera) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Camera \"%s\" must have zero users to be removed, found %d",
+ camera->id.name+2, ID_REAL_USERS(camera));
/* XXX python now has invalid pointer? */
}
@@ -122,7 +123,7 @@ void rna_Main_scenes_remove(Main *bmain, bContext *C, ReportList *reports, struc
else if(scene->id.next)
newscene= scene->id.next;
else {
- BKE_reportf(reports, RPT_ERROR, "Scene \"%s\" is the last, cant ve removed.", scene->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Scene \"%s\" is the last, cant ve removed", scene->id.name+2);
return;
}
@@ -168,7 +169,7 @@ Object *rna_Main_objects_new(Main *UNUSED(bmain), ReportList *reports, const cha
if(RNA_enum_id_from_value(id_type_items, GS(data->name), &idname) == 0)
idname= "UNKNOWN";
- BKE_reportf(reports, RPT_ERROR, "ID type '%s' is not valid for a object.", idname);
+ BKE_reportf(reports, RPT_ERROR, "ID type '%s' is not valid for a object", idname);
return NULL;
}
}
@@ -192,7 +193,8 @@ void rna_Main_objects_remove(Main *bmain, ReportList *reports, struct Object *ob
free_libblock(&bmain->object, object);
}
else {
- BKE_reportf(reports, RPT_ERROR, "Object \"%s\" must have zero users to be removed, found %d.", object->id.name+2, ID_REAL_USERS(object));
+ BKE_reportf(reports, RPT_ERROR, "Object \"%s\" must have zero users to be removed, found %d",
+ object->id.name+2, ID_REAL_USERS(object));
}
}
@@ -207,16 +209,15 @@ void rna_Main_materials_remove(Main *bmain, ReportList *reports, struct Material
if(ID_REAL_USERS(material) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Material \"%s\" must have zero users to be removed, found %d",
+ material->id.name+2, ID_REAL_USERS(material));
/* XXX python now has invalid pointer? */
}
struct bNodeTree *rna_Main_nodetree_new(Main *UNUSED(bmain), const char *name, int type)
{
- bNodeTree *tree = ntreeAddTree(name, type, TRUE);
-
-// ntreeMakeGroupSockets(tree);
+ bNodeTree *tree = ntreeAddTree(name, type, NODE_GROUP);
id_us_min(&tree->id);
return tree;
@@ -226,7 +227,8 @@ void rna_Main_nodetree_remove(Main *bmain, ReportList *reports, struct bNodeTree
if(ID_REAL_USERS(tree) <= 0)
free_libblock(&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));
+ 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));
/* XXX python now has invalid pointer? */
}
@@ -242,7 +244,8 @@ void rna_Main_meshes_remove(Main *bmain, ReportList *reports, Mesh *mesh)
if(ID_REAL_USERS(mesh) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Mesh \"%s\" must have zero users to be removed, found %d",
+ mesh->id.name+2, ID_REAL_USERS(mesh));
/* XXX python now has invalid pointer? */
}
@@ -259,7 +262,8 @@ void rna_Main_lamps_remove(Main *bmain, ReportList *reports, Lamp *lamp)
if(ID_REAL_USERS(lamp) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Lamp \"%s\" must have zero users to be removed, found %d",
+ lamp->id.name+2, ID_REAL_USERS(lamp));
/* XXX python now has invalid pointer? */
}
@@ -279,7 +283,8 @@ Image *rna_Main_images_load(Main *UNUSED(bmain), ReportList *reports, const char
ima= BKE_add_image_file(filepath);
if(!ima)
- BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s.", filepath, errno ? strerror(errno) : "Unsupported image format");
+ BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
+ errno ? strerror(errno) : "Unsupported image format");
return ima;
}
@@ -288,7 +293,8 @@ void rna_Main_images_remove(Main *bmain, ReportList *reports, Image *image)
if(ID_REAL_USERS(image) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Image \"%s\" must have zero users to be removed, found %d",
+ image->id.name+2, ID_REAL_USERS(image));
/* XXX python now has invalid pointer? */
}
@@ -304,7 +310,8 @@ void rna_Main_lattices_remove(Main *bmain, ReportList *reports, struct Lattice *
if(ID_REAL_USERS(lt) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Lattice \"%s\" must have zero users to be removed, found %d",
+ lt->id.name+2, ID_REAL_USERS(lt));
}
Curve *rna_Main_curves_new(Main *UNUSED(bmain), const char *name, int type)
@@ -318,7 +325,8 @@ void rna_Main_curves_remove(Main *bmain, ReportList *reports, struct Curve *cu)
if(ID_REAL_USERS(cu) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Curve \"%s\" must have zero users to be removed, found %d",
+ cu->id.name+2, ID_REAL_USERS(cu));
}
MetaBall *rna_Main_metaballs_new(Main *UNUSED(bmain), const char *name)
@@ -332,7 +340,8 @@ void rna_Main_metaballs_remove(Main *bmain, ReportList *reports, struct MetaBall
if(ID_REAL_USERS(mb) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "MetaBall \"%s\" must have zero users to be removed, found %d",
+ mb->id.name+2, ID_REAL_USERS(mb));
}
VFont *rna_Main_fonts_load(Main *UNUSED(bmain), ReportList *reports, const char *filepath)
@@ -343,7 +352,8 @@ VFont *rna_Main_fonts_load(Main *UNUSED(bmain), ReportList *reports, const char
font= load_vfont(filepath);
if(!font)
- BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s.", filepath, errno ? strerror(errno) : "Unsupported font format");
+ BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
+ errno ? strerror(errno) : "Unsupported font format");
return font;
@@ -353,7 +363,8 @@ void rna_Main_fonts_remove(Main *bmain, ReportList *reports, VFont *vfont)
if(ID_REAL_USERS(vfont) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Font \"%s\" must have zero users to be removed, found %d",
+ vfont->id.name+2, ID_REAL_USERS(vfont));
/* XXX python now has invalid pointer? */
}
@@ -370,7 +381,8 @@ void rna_Main_textures_remove(Main *bmain, ReportList *reports, struct Tex *tex)
if(ID_REAL_USERS(tex) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Texture \"%s\" must have zero users to be removed, found %d",
+ tex->id.name+2, ID_REAL_USERS(tex));
}
Brush *rna_Main_brushes_new(Main *UNUSED(bmain), const char *name)
@@ -384,7 +396,8 @@ void rna_Main_brushes_remove(Main *bmain, ReportList *reports, struct Brush *bru
if(ID_REAL_USERS(brush) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Brush \"%s\" must have zero users to be removed, found %d",
+ brush->id.name+2, ID_REAL_USERS(brush));
}
World *rna_Main_worlds_new(Main *UNUSED(bmain), const char *name)
@@ -398,7 +411,8 @@ void rna_Main_worlds_remove(Main *bmain, ReportList *reports, struct World *worl
if(ID_REAL_USERS(world) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "World \"%s\" must have zero users to be removed, found %d",
+ world->id.name+2, ID_REAL_USERS(world));
}
Group *rna_Main_groups_new(Main *UNUSED(bmain), const char *name)
@@ -423,7 +437,8 @@ void rna_Main_speakers_remove(Main *bmain, ReportList *reports, Speaker *speaker
if(ID_REAL_USERS(speaker) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Speaker \"%s\" must have zero users to be removed, found %d",
+ speaker->id.name+2, ID_REAL_USERS(speaker));
/* XXX python now has invalid pointer? */
}
@@ -447,7 +462,8 @@ Text *rna_Main_texts_load(Main *bmain, ReportList *reports, const char *filepath
txt= add_text(filepath, bmain->name);
if(!txt)
- BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s.", filepath, errno ? strerror(errno) : "Unable to load text");
+ BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
+ errno ? strerror(errno) : "Unable to load text");
return txt;
}
@@ -463,7 +479,8 @@ void rna_Main_armatures_remove(Main *bmain, ReportList *reports, bArmature *arm)
if(ID_REAL_USERS(arm) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Armature \"%s\" must have zero users to be removed, found %d",
+ arm->id.name+2, ID_REAL_USERS(arm));
/* XXX python now has invalid pointer? */
}
@@ -480,7 +497,8 @@ void rna_Main_actions_remove(Main *bmain, ReportList *reports, bAction *act)
if(ID_REAL_USERS(act) <= 0)
free_libblock(&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));
+ BKE_reportf(reports, RPT_ERROR, "Action \"%s\" must have zero users to be removed, found %d",
+ act->id.name+2, ID_REAL_USERS(act));
/* XXX python now has invalid pointer? */
}
@@ -496,7 +514,8 @@ void rna_Main_particles_remove(Main *bmain, ReportList *reports, ParticleSetting
if(ID_REAL_USERS(part) <= 0)
free_libblock(&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));
+ 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));
/* XXX python now has invalid pointer? */
}
@@ -543,10 +562,10 @@ void RNA_api_main(StructRNA *srna)
* for now they are all in collections bpy.data.images.new(...) */
/*
func= RNA_def_function(srna, "add_image", "rna_Main_add_image");
- RNA_def_function_ui_description(func, "Add a new image.");
- parm= RNA_def_string_file_path(func, "filepath", "", 0, "", "File path to load image from.");
+ RNA_def_function_ui_description(func, "Add a new image");
+ parm= RNA_def_string_file_path(func, "filepath", "", 0, "", "File path to load image from");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "image", "Image", "", "New image.");
+ parm= RNA_def_pointer(func, "image", "Image", "", "New image");
RNA_def_function_return(func, parm);
*/
@@ -565,16 +584,16 @@ void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_cameras_new");
RNA_def_function_ui_description(func, "Add a new camera to the main database");
- parm= RNA_def_string(func, "name", "Camera", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Camera", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "camera", "Camera", "", "New camera datablock.");
+ parm= RNA_def_pointer(func, "camera", "Camera", "", "New camera datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_cameras_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a camera from the current blendfile.");
- parm= RNA_def_pointer(func, "camera", "Camera", "", "Camera to remove.");
+ RNA_def_function_ui_description(func, "Remove a camera from the current blendfile");
+ parm= RNA_def_pointer(func, "camera", "Camera", "", "Camera to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_cameras_tag");
@@ -595,16 +614,16 @@ void RNA_def_main_scenes(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_scenes_new");
RNA_def_function_ui_description(func, "Add a new scene to the main database");
- parm= RNA_def_string(func, "name", "Scene", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Scene", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "scene", "Scene", "", "New scene datablock.");
+ parm= RNA_def_pointer(func, "scene", "Scene", "", "New scene datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_scenes_remove");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a scene from the current blendfile.");
- parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene to remove.");
+ RNA_def_function_ui_description(func, "Remove a scene from the current blendfile");
+ parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -622,19 +641,19 @@ void RNA_def_main_objects(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_objects_new");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new object to the main database");
- parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "object_data", "ID", "", "Object data or None for an empty object.");
+ parm= RNA_def_pointer(func, "object_data", "ID", "", "Object data or None for an empty object");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "object", "Object", "", "New object datablock.");
+ parm= RNA_def_pointer(func, "object", "Object", "", "New object datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_objects_remove");
- RNA_def_function_ui_description(func, "Remove a object from the current blendfile.");
+ RNA_def_function_ui_description(func, "Remove a object from the current blendfile");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove.");
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_objects_tag");
@@ -655,16 +674,16 @@ void RNA_def_main_materials(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_materials_new");
RNA_def_function_ui_description(func, "Add a new material to the main database");
- parm= RNA_def_string(func, "name", "Material", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Material", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "material", "Material", "", "New material datablock.");
+ parm= RNA_def_pointer(func, "material", "Material", "", "New material datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_materials_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a material from the current blendfile.");
- parm= RNA_def_pointer(func, "material", "Material", "", "Material to remove.");
+ RNA_def_function_ui_description(func, "Remove a material from the current blendfile");
+ parm= RNA_def_pointer(func, "material", "Material", "", "Material to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_materials_tag");
@@ -690,18 +709,18 @@ void RNA_def_main_node_groups(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_nodetree_new");
RNA_def_function_ui_description(func, "Add a new node tree to the main database");
- parm= RNA_def_string(func, "name", "NodeGroup", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "NodeGroup", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_enum(func, "type", node_nodetree_items, 0, "Type", "The type of node_group to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "tree", "NodeTree", "", "New node tree datablock.");
+ parm= RNA_def_pointer(func, "tree", "NodeTree", "", "New node tree datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_nodetree_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a node tree from the current blendfile.");
- parm= RNA_def_pointer(func, "tree", "NodeTree", "", "Node tree to remove.");
+ RNA_def_function_ui_description(func, "Remove a node tree from the current blendfile");
+ parm= RNA_def_pointer(func, "tree", "NodeTree", "", "Node tree to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_node_groups_tag");
@@ -721,16 +740,16 @@ void RNA_def_main_meshes(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_meshes_new");
RNA_def_function_ui_description(func, "Add a new mesh to the main database");
- parm= RNA_def_string(func, "name", "Mesh", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Mesh", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "mesh", "Mesh", "", "New mesh datablock.");
+ parm= RNA_def_pointer(func, "mesh", "Mesh", "", "New mesh datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_meshes_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a mesh from the current blendfile.");
- parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to remove.");
+ RNA_def_function_ui_description(func, "Remove a mesh from the current blendfile");
+ parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_meshes_tag");
@@ -750,18 +769,18 @@ void RNA_def_main_lamps(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_lamps_new");
RNA_def_function_ui_description(func, "Add a new lamp to the main database");
- parm= RNA_def_string(func, "name", "Lamp", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Lamp", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_enum(func, "type", lamp_type_items, 0, "Type", "The type of texture to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp datablock.");
+ parm= RNA_def_pointer(func, "lamp", "Lamp", "", "New lamp datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_lamps_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile.");
- parm= RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove.");
+ RNA_def_function_ui_description(func, "Remove a lamp from the current blendfile");
+ parm= RNA_def_pointer(func, "lamp", "Lamp", "", "Lamp to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_lamps_tag");
@@ -829,31 +848,31 @@ void RNA_def_main_images(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_images_new");
RNA_def_function_ui_description(func, "Add a new image to the main database");
- parm= RNA_def_string(func, "name", "Image", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Image", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_int(func, "width", 1024, 1, INT_MAX, "", "Width of the image.", 0, INT_MAX);
+ parm= RNA_def_int(func, "width", 1024, 1, INT_MAX, "", "Width of the image", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_int(func, "height", 1024, 1, INT_MAX, "", "Height of the image.", 0, INT_MAX);
+ parm= RNA_def_int(func, "height", 1024, 1, INT_MAX, "", "Height of the image", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "alpha", 0, "Alpha", "Use alpha channel");
RNA_def_boolean(func, "float_buffer", 0, "Float Buffer", "Create an image with floating point color");
/* return type */
- parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock.");
+ parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "load", "rna_Main_images_load");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Load a new image into the main database");
- parm= RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the file to load.");
+ parm= RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the file to load");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock.");
+ parm= RNA_def_pointer(func, "image", "Image", "", "New image datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_images_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove an image from the current blendfile.");
- parm= RNA_def_pointer(func, "image", "Image", "", "Image to remove.");
+ RNA_def_function_ui_description(func, "Remove an image from the current blendfile");
+ parm= RNA_def_pointer(func, "image", "Image", "", "Image to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_images_tag");
@@ -874,16 +893,16 @@ void RNA_def_main_lattices(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_lattices_new");
RNA_def_function_ui_description(func, "Add a new lattice to the main database");
- parm= RNA_def_string(func, "name", "Lattice", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Lattice", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "lattice", "Lattice", "", "New lattices datablock.");
+ parm= RNA_def_pointer(func, "lattice", "Lattice", "", "New lattices datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_lattices_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a lattice from the current blendfile.");
- parm= RNA_def_pointer(func, "lattice", "Lattice", "", "Lattice to remove.");
+ RNA_def_function_ui_description(func, "Remove a lattice from the current blendfile");
+ parm= RNA_def_pointer(func, "lattice", "Lattice", "", "Lattice to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_lattices_tag");
@@ -903,18 +922,18 @@ void RNA_def_main_curves(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_curves_new");
RNA_def_function_ui_description(func, "Add a new curve to the main database");
- parm= RNA_def_string(func, "name", "Curve", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Curve", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_enum(func, "type", object_type_curve_items, 0, "Type", "The type of curve to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "curve", "Curve", "", "New curve datablock.");
+ parm= RNA_def_pointer(func, "curve", "Curve", "", "New curve datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_curves_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a curve from the current blendfile.");
- parm= RNA_def_pointer(func, "curve", "Curve", "", "Curve to remove.");
+ RNA_def_function_ui_description(func, "Remove a curve from the current blendfile");
+ parm= RNA_def_pointer(func, "curve", "Curve", "", "Curve to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_curves_tag");
@@ -934,16 +953,16 @@ void RNA_def_main_metaballs(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_metaballs_new");
RNA_def_function_ui_description(func, "Add a new metaball to the main database");
- parm= RNA_def_string(func, "name", "MetaBall", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "MetaBall", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "metaball", "MetaBall", "", "New metaball datablock.");
+ parm= RNA_def_pointer(func, "metaball", "MetaBall", "", "New metaball datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_metaballs_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a metaball from the current blendfile.");
- parm= RNA_def_pointer(func, "metaball", "MetaBall", "", "MetaBall to remove.");
+ RNA_def_function_ui_description(func, "Remove a metaball from the current blendfile");
+ parm= RNA_def_pointer(func, "metaball", "MetaBall", "", "MetaBall to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_metaballs_tag");
@@ -964,16 +983,16 @@ void RNA_def_main_fonts(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "load", "rna_Main_fonts_load");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Load a new font into the main database");
- parm= RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the font to load.");
+ parm= RNA_def_string_file_path(func, "filepath", "File Path", 0, "", "path of the font to load");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "vfont", "VectorFont", "", "New font datablock.");
+ parm= RNA_def_pointer(func, "vfont", "VectorFont", "", "New font datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_fonts_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a font from the current blendfile.");
- parm= RNA_def_pointer(func, "vfont", "VectorFont", "", "Font to remove.");
+ RNA_def_function_ui_description(func, "Remove a font from the current blendfile");
+ parm= RNA_def_pointer(func, "vfont", "VectorFont", "", "Font to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_fonts_tag");
@@ -993,18 +1012,18 @@ void RNA_def_main_textures(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_textures_new");
RNA_def_function_ui_description(func, "Add a new texture to the main database");
- parm= RNA_def_string(func, "name", "Texture", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Texture", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_enum(func, "type", texture_type_items, 0, "Type", "The type of texture to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "texture", "Texture", "", "New texture datablock.");
+ parm= RNA_def_pointer(func, "texture", "Texture", "", "New texture datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_textures_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a texture from the current blendfile.");
- parm= RNA_def_pointer(func, "texture", "Texture", "", "Texture to remove.");
+ RNA_def_function_ui_description(func, "Remove a texture from the current blendfile");
+ parm= RNA_def_pointer(func, "texture", "Texture", "", "Texture to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_textures_tag");
@@ -1024,16 +1043,16 @@ void RNA_def_main_brushes(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_brushes_new");
RNA_def_function_ui_description(func, "Add a new brush to the main database");
- parm= RNA_def_string(func, "name", "Brush", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Brush", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "brush", "Brush", "", "New brush datablock.");
+ parm= RNA_def_pointer(func, "brush", "Brush", "", "New brush datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_brushes_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a brush from the current blendfile.");
- parm= RNA_def_pointer(func, "brush", "Brush", "", "Brush to remove.");
+ RNA_def_function_ui_description(func, "Remove a brush from the current blendfile");
+ parm= RNA_def_pointer(func, "brush", "Brush", "", "Brush to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_brushes_tag");
@@ -1054,16 +1073,16 @@ void RNA_def_main_worlds(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_worlds_new");
RNA_def_function_ui_description(func, "Add a new world to the main database");
- parm= RNA_def_string(func, "name", "World", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "World", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "world", "World", "", "New world datablock.");
+ parm= RNA_def_pointer(func, "world", "World", "", "New world datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_worlds_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a world from the current blendfile.");
- parm= RNA_def_pointer(func, "world", "World", "", "World to remove.");
+ RNA_def_function_ui_description(func, "Remove a world from the current blendfile");
+ parm= RNA_def_pointer(func, "world", "World", "", "World to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_worlds_tag");
@@ -1084,15 +1103,15 @@ void RNA_def_main_groups(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_groups_new");
RNA_def_function_ui_description(func, "Add a new group to the main database");
- parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Group", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "group", "Group", "", "New group datablock.");
+ parm= RNA_def_pointer(func, "group", "Group", "", "New group datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_groups_remove");
- RNA_def_function_ui_description(func, "Remove a group from the current blendfile.");
- parm= RNA_def_pointer(func, "group", "Group", "", "Group to remove.");
+ RNA_def_function_ui_description(func, "Remove a group from the current blendfile");
+ parm= RNA_def_pointer(func, "group", "Group", "", "Group to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_groups_tag");
@@ -1113,16 +1132,16 @@ void RNA_def_main_speakers(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_speakers_new");
RNA_def_function_ui_description(func, "Add a new speaker to the main database");
- parm= RNA_def_string(func, "name", "Speaker", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Speaker", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "speaker", "Speaker", "", "New speaker datablock.");
+ parm= RNA_def_pointer(func, "speaker", "Speaker", "", "New speaker datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_speakers_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a speaker from the current blendfile.");
- parm= RNA_def_pointer(func, "speaker", "Speaker", "", "Speaker to remove.");
+ RNA_def_function_ui_description(func, "Remove a speaker from the current blendfile");
+ parm= RNA_def_pointer(func, "speaker", "Speaker", "", "Speaker to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_speakers_tag");
@@ -1143,25 +1162,25 @@ void RNA_def_main_texts(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_texts_new");
RNA_def_function_ui_description(func, "Add a new text to the main database");
- parm= RNA_def_string(func, "name", "Text", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Text", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "text", "Text", "", "New text datablock.");
+ parm= RNA_def_pointer(func, "text", "Text", "", "New text datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_texts_remove");
- RNA_def_function_ui_description(func, "Remove a text from the current blendfile.");
- parm= RNA_def_pointer(func, "text", "Text", "", "Text to remove.");
+ RNA_def_function_ui_description(func, "Remove a text from the current blendfile");
+ parm= RNA_def_pointer(func, "text", "Text", "", "Text to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* load func */
func= RNA_def_function(srna, "load", "rna_Main_texts_load");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new text to the main database from a file");
- parm= RNA_def_string_file_path(func, "filepath", "Path", FILE_MAXDIR + FILE_MAXFILE, "", "path for the datablock.");
+ parm= RNA_def_string_file_path(func, "filepath", "Path", FILE_MAXDIR + FILE_MAXFILE, "", "path for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "text", "Text", "", "New text datablock.");
+ parm= RNA_def_pointer(func, "text", "Text", "", "New text datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "tag", "rna_Main_texts_tag");
@@ -1200,16 +1219,16 @@ void RNA_def_main_armatures(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_armatures_new");
RNA_def_function_ui_description(func, "Add a new armature to the main database");
- parm= RNA_def_string(func, "name", "Armature", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Armature", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "armature", "Armature", "", "New armature datablock.");
+ parm= RNA_def_pointer(func, "armature", "Armature", "", "New armature datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_armatures_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a armature from the current blendfile.");
- parm= RNA_def_pointer(func, "armature", "Armature", "", "Armature to remove.");
+ RNA_def_function_ui_description(func, "Remove a armature from the current blendfile");
+ parm= RNA_def_pointer(func, "armature", "Armature", "", "Armature to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_armatures_tag");
@@ -1229,16 +1248,16 @@ void RNA_def_main_actions(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_actions_new");
RNA_def_function_ui_description(func, "Add a new action to the main database");
- parm= RNA_def_string(func, "name", "Action", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "Action", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "action", "Action", "", "New action datablock.");
+ parm= RNA_def_pointer(func, "action", "Action", "", "New action datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_actions_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a action from the current blendfile.");
- parm= RNA_def_pointer(func, "action", "Action", "", "Action to remove.");
+ RNA_def_function_ui_description(func, "Remove a action from the current blendfile");
+ parm= RNA_def_pointer(func, "action", "Action", "", "Action to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_actions_tag");
@@ -1258,16 +1277,16 @@ void RNA_def_main_particles(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Main_particles_new");
RNA_def_function_ui_description(func, "Add a new particle settings instance to the main database");
- parm= RNA_def_string(func, "name", "ParticleSettings", 0, "", "New name for the datablock.");
+ parm= RNA_def_string(func, "name", "ParticleSettings", 0, "", "New name for the datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "particle", "ParticleSettings", "", "New particle settings datablock.");
+ parm= RNA_def_pointer(func, "particle", "ParticleSettings", "", "New particle settings datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Main_particles_remove");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a particle settings instance from the current blendfile.");
- parm= RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings to remove.");
+ RNA_def_function_ui_description(func, "Remove a particle settings instance from the current blendfile");
+ parm= RNA_def_pointer(func, "particle", "ParticleSettings", "", "Particle Settings to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "tag", "rna_Main_particles_tag");
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index f407aba82fb..673e768e71e 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -45,7 +45,8 @@ static EnumPropertyItem prop_texture_coordinates_items[] = {
{TEXCO_OBJECT, "OBJECT", 0, "Object", "Uses linked object's coordinates for texture coordinates"},
{TEXCO_UV, "UV", 0, "UV", "Uses UV coordinates for texture coordinates"},
{TEXCO_ORCO, "ORCO", 0, "Generated", "Uses the original undeformed coordinates of the object"},
-{TEXCO_STRAND, "STRAND", 0, "Strand / Particle", "Uses normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
+{TEXCO_STRAND, "STRAND", 0, "Strand / Particle",
+ "Uses normalized strand texture coordinate (1D) or particle age (X) and trail position (Y)"},
{TEXCO_STICKY, "STICKY", 0, "Sticky", "Uses mesh's sticky coordinates for the texture coordinates"},
{TEXCO_WINDOW, "WINDOW", 0, "Window", "Uses screen coordinates as texture coordinates"},
{TEXCO_NORM, "NORMAL", 0, "Normal", "Uses normal vector as texture coordinates"},
@@ -279,7 +280,8 @@ static void rna_Material_use_nodes_set(PointerRNA *ptr, int value)
ED_node_shader_default(ma);
}
-static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED(C), PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
+static EnumPropertyItem *rna_Material_texture_coordinates_itemf(bContext *UNUSED(C), PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), int *free)
{
Material *ma= (Material*)ptr->id.data;
EnumPropertyItem *item= NULL;
@@ -447,12 +449,14 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_from_dupli", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_DUPLI_MAPTO);
- RNA_def_property_ui_text(prop, "From Dupli", "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent");
+ RNA_def_property_ui_text(prop, "From Dupli",
+ "Dupli's instanced from verts, faces or particles, inherit texture coordinate from their parent");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_from_original", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "texflag", MTEX_OB_DUPLI_ORIG);
- RNA_def_property_ui_text(prop, "From Original", "Dupli's derive their object coordinates from the original objects transformation");
+ RNA_def_property_ui_text(prop, "From Original",
+ "Dupli's derive their object coordinates from the original objects transformation");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_map_color_diffuse", PROP_BOOLEAN, PROP_NONE);
@@ -651,7 +655,8 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_map_color_transmission", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mapto", MAP_TRANSMISSION_COL);
- RNA_def_property_ui_text(prop, "Transmission Color", "Causes the texture to affect the result color after other light has been scattered/absorbed");
+ RNA_def_property_ui_text(prop, "Transmission Color",
+ "Causes the texture to affect the result color after other light has been scattered/absorbed");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "use_map_density", PROP_BOOLEAN, PROP_NONE);
@@ -689,7 +694,8 @@ static void rna_def_material_mtex(BlenderRNA *brna)
prop= RNA_def_property(srna, "transmission_color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "coltransfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
- RNA_def_property_ui_text(prop, "Transmission Color Factor", "Amount texture affects result color after light has been scattered/absorbed");
+ RNA_def_property_ui_text(prop, "Transmission Color Factor",
+ "Amount texture affects result color after light has been scattered/absorbed");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "density_factor", PROP_FLOAT, PROP_NONE);
@@ -736,6 +742,61 @@ static void rna_def_material_mtex(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Material_update");
}
+static void rna_def_material_gamesettings(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem prop_alpha_blend_items[] = {
+ {GEMAT_SOLID, "OPAQUE", 0, "Opaque", "Render color of textured face as color"},
+ {GEMAT_ADD, "ADD", 0, "Add", "Render face transparent and add color of face"},
+ {GEMAT_CLIP, "CLIP", 0, "Alpha Clip", "Use the image alpha values clipped with no blending (binary alpha)"},
+ {GEMAT_ALPHA, "ALPHA", 0, "Alpha Blend", "Render polygon transparent, depending on alpha channel of the texture"},
+ {GEMAT_ALPHA_SORT, "ALPHA_SORT", 0, "Alpha Sort", "Sort faces for correct alpha drawing (slow, use Alpha Clip instead when possible)"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem prop_face_orientation_items[] = {
+ {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"},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "MaterialGameSettings", NULL);
+ RNA_def_struct_sdna(srna, "GameSettings");
+ RNA_def_struct_nested(brna, srna, "Material");
+ RNA_def_struct_ui_text(srna, "Material Game Settings", "Game Engine settings for a Material datablock");
+
+ prop= RNA_def_property(srna, "back_culling", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_BACKCULL); /* use bitflags */
+ RNA_def_property_ui_text(prop, "Back Culling", "Hide Back of the face in Game Engine ");
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
+
+ prop= RNA_def_property(srna, "text", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_TEXT); /* use bitflags */
+ RNA_def_property_ui_text(prop, "Text", "Use material as text in Game Engine ");
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
+
+ prop= RNA_def_property(srna, "invisible", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GEMAT_INVISIBLE); /* use bitflags */
+ RNA_def_property_ui_text(prop, "Invisible", "Make face invisible");
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
+
+ prop= RNA_def_property(srna, "alpha_blend", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "alpha_blend");
+ RNA_def_property_enum_items(prop, prop_alpha_blend_items);
+ RNA_def_property_ui_text(prop, "Blend Mode", "Blend Mode for Transparent Faces");
+ RNA_def_property_update(prop, 0, "rna_Material_draw_update");
+
+ prop= RNA_def_property(srna, "face_orientation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_face_orientation_items);
+ RNA_def_property_ui_text(prop, "Face Orientations", "Especial face orientation options");
+
+ prop= RNA_def_property(srna, "physics", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GEMAT_NOPHYSICS); /* use bitflags */
+ RNA_def_property_ui_text(prop, "Physics", "Use physics properties of materials ");
+}
+
static void rna_def_material_colors(StructRNA *srna)
{
PropertyRNA *prop;
@@ -938,13 +999,15 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Amount", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections");
+ RNA_def_property_ui_text(prop, "Gloss Amount",
+ "The shininess of the reflection (values < 1.0 give diffuse, blurry reflections)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Anisotropy", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent");
+ RNA_def_property_ui_text(prop, "Gloss Anisotropy",
+ "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
@@ -956,7 +1019,9 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped");
+ RNA_def_property_ui_text(prop, "Gloss Threshold",
+ "Threshold for adaptive sampling (if a sample contributes less than "
+ "this amount [as a percentage], sampling is stopped)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
@@ -968,13 +1033,17 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist_mir");
RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color");
+ RNA_def_property_ui_text(prop, "Maximum Distance",
+ "Maximum distance of reflected rays (reflections further than this "
+ "range fade to sky color or material color)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "fade_to", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "fadeto_mir");
RNA_def_property_enum_items(prop, prop_fadeto_mir_items);
- RNA_def_property_ui_text(prop, "Fade-out Color", "The color that rays with no intersection within the Max Distance take. Material color can be best for indoor scenes, sky color for outdoor");
+ RNA_def_property_ui_text(prop, "Fade-out Color",
+ "The color that rays with no intersection within the Max Distance take "
+ "(material color can be best for indoor scenes, sky color for outdoor)");
RNA_def_property_update(prop, 0, "rna_Material_update");
}
@@ -1009,7 +1078,8 @@ static void rna_def_material_raytra(BlenderRNA *brna)
prop= RNA_def_property(srna, "gloss_factor", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "gloss_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Amount", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions");
+ RNA_def_property_ui_text(prop, "Gloss Amount",
+ "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "gloss_samples", PROP_INT, PROP_NONE);
@@ -1021,7 +1091,9 @@ static void rna_def_material_raytra(BlenderRNA *brna)
prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped");
+ RNA_def_property_ui_text(prop, "Gloss Threshold",
+ "Threshold for adaptive sampling. If a sample contributes less than "
+ "this amount (as a percentage), sampling is stopped");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "depth", PROP_INT, PROP_UNSIGNED);
@@ -1033,13 +1105,17 @@ static void rna_def_material_raytra(BlenderRNA *brna)
prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "filter");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption)");
+ RNA_def_property_ui_text(prop, "Filter",
+ "Amount to blend in the material's diffuse color in raytraced "
+ "transparency (simulating absorption)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "depth_max", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "tx_limit");
RNA_def_property_range(prop, 0.0f, 100.0f);
- RNA_def_property_ui_text(prop, "Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled)");
+ RNA_def_property_ui_text(prop, "Limit",
+ "Maximum depth for light to travel through the transparent material "
+ "before becoming fully filtered (0.0 is disabled)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
@@ -1099,13 +1175,16 @@ static void rna_def_material_volume(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_light_cache", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shadeflag", MA_VOL_PRECACHESHADING); /* use bitflags */
- RNA_def_property_ui_text(prop, "Light Cache", "Pre-calculate the shading information into a voxel grid, speeds up shading at slightly less accuracy");
+ RNA_def_property_ui_text(prop, "Light Cache",
+ "Pre-calculate the shading information into a voxel grid, "
+ "speeds up shading at slightly less accuracy");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "cache_resolution", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "precache_resolution");
RNA_def_property_range(prop, 1, 1024);
- RNA_def_property_ui_text(prop, "Resolution", "Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory");
+ RNA_def_property_ui_text(prop, "Resolution",
+ "Resolution of the voxel grid, low resolutions are faster, high resolutions use more memory");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "ms_diffusion", PROP_FLOAT, PROP_NONE);
@@ -1130,7 +1209,9 @@ static void rna_def_material_volume(BlenderRNA *brna)
prop= RNA_def_property(srna, "depth_threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "depth_cutoff");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Depth Cutoff", "Stop ray marching early if transmission drops below this luminance - higher values give speedups in dense volumes at the expense of accuracy");
+ RNA_def_property_ui_text(prop, "Depth Cutoff",
+ "Stop ray marching early if transmission drops below this luminance - "
+ "higher values give speedups in dense volumes at the expense of accuracy");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "density", PROP_FLOAT, PROP_FACTOR);
@@ -1150,26 +1231,31 @@ static void rna_def_material_volume(BlenderRNA *brna)
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_text(prop, "Scattering", "Amount of light that gets scattered out by the volume - the more out-scattering, the shallower the light will penetrate ");
+ 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 ");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "transmission_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "transmission_col");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Transmission Color", "Result color of the volume, after other light has been scattered/absorbed");
+ RNA_def_property_ui_text(prop, "Transmission Color",
+ "Result color of the volume, after other light has been scattered/absorbed");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
prop= RNA_def_property(srna, "reflection_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "reflection_col");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Reflection Color", "Color of light scattered out of the volume (does not affect transmission)");
+ RNA_def_property_ui_text(prop, "Reflection Color",
+ "Color of light scattered out of the volume (does not affect transmission)");
RNA_def_property_update(prop, 0, "rna_Material_draw_update");
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_text(prop, "Reflection", "Multiplier to make out-scattered light brighter or darker (non-physically correct)");
+ 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");
prop= RNA_def_property(srna, "emission_color", PROP_FLOAT, PROP_COLOR);
@@ -1329,7 +1415,8 @@ static void rna_def_material_sss(BlenderRNA *brna)
srna= RNA_def_struct(brna, "MaterialSubsurfaceScattering", NULL);
RNA_def_struct_sdna(srna, "Material");
RNA_def_struct_nested(brna, srna, "Material");
- RNA_def_struct_ui_text(srna, "Material Subsurface Scattering", "Diffuse subsurface scattering settings for a Material datablock");
+ RNA_def_struct_ui_text(srna, "Material Subsurface Scattering",
+ "Diffuse subsurface scattering settings for a Material datablock");
prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_COLOR|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "sss_radius");
@@ -1545,7 +1632,8 @@ static void rna_def_material_physics(BlenderRNA *brna)
/* FH/Force Field Settings */
prop= RNA_def_property(srna, "use_fh_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dynamode", MA_FH_NOR);
- RNA_def_property_ui_text(prop, "Align to Normal", "Align dynamic game objects along the surface normal, when inside the physics distance area");
+ RNA_def_property_ui_text(prop, "Align to Normal",
+ "Align dynamic game objects along the surface normal, when inside the physics distance area");
prop= RNA_def_property(srna, "fh_force", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fh");
@@ -1594,11 +1682,13 @@ void RNA_def_material(BlenderRNA *brna)
static EnumPropertyItem prop_shadows_only_items[] = {
{MA_SO_OLD, "SHADOW_ONLY_OLD", 0, "Shadow and Distance", "Old shadow only method"},
{MA_SO_SHADOW, "SHADOW_ONLY", 0, "Shadow Only", "Improved shadow only method"},
- {MA_SO_SHADED, "SHADOW_ONLY_SHADED", 0, "Shadow and Shading", "Improved shadow only method which also renders lightless areas as shadows"},
+ {MA_SO_SHADED, "SHADOW_ONLY_SHADED", 0, "Shadow and Shading",
+ "Improved shadow only method which also renders lightless areas as shadows"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Material", "ID");
- RNA_def_struct_ui_text(srna, "Material", "Material datablock to defined the appearance of geometric objects for rendering");
+ RNA_def_struct_ui_text(srna, "Material",
+ "Material datablock to defined the appearance of geometric objects for rendering");
RNA_def_struct_ui_icon(srna, ICON_MATERIAL_DATA);
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
@@ -1645,7 +1735,8 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_cubic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_CUBIC);
- RNA_def_property_ui_text(prop, "Cubic Interpolation", "Use cubic interpolation for diffuse values, for smoother transitions");
+ RNA_def_property_ui_text(prop, "Cubic Interpolation",
+ "Use cubic interpolation for diffuse values, for smoother transitions");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_object_color", PROP_BOOLEAN, PROP_NONE);
@@ -1656,7 +1747,8 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "shadow_ray_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sbias");
RNA_def_property_range(prop, 0, 0.25);
- RNA_def_property_ui_text(prop, "Shadow Ray Bias", "Shadow raytracing bias to prevent terminator problems on shadow boundary");
+ RNA_def_property_ui_text(prop, "Shadow Ray Bias",
+ "Shadow raytracing bias to prevent terminator problems on shadow boundary");
prop= RNA_def_property(srna, "shadow_buffer_bias", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "lbias");
@@ -1666,7 +1758,8 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "shadow_cast_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "shad_alpha");
RNA_def_property_range(prop, 0.001, 1);
- RNA_def_property_ui_text(prop, "Shadow Casting Alpha", "Shadow casting alpha, in use for Irregular and Deep shadow buffer");
+ RNA_def_property_ui_text(prop, "Shadow Casting Alpha",
+ "Shadow casting alpha, in use for Irregular and Deep shadow buffer");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "light_group", PROP_POINTER, PROP_NONE);
@@ -1685,12 +1778,14 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_light_group_exclusive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_GROUP_NOLAY);
- RNA_def_property_ui_text(prop, "Light Group Exclusive", "Material uses the light group exclusively - these lamps are excluded from other scene lighting");
+ RNA_def_property_ui_text(prop, "Light Group Exclusive",
+ "Material uses the light group exclusively - these lamps are excluded from other scene lighting");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_raytrace", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRACEBLE);
- RNA_def_property_ui_text(prop, "Traceable", "Include this material and geometry that uses it in ray tracing calculations");
+ RNA_def_property_ui_text(prop, "Traceable",
+ "Include this material and geometry that uses it in ray tracing calculations");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_shadows", PROP_BOOLEAN, PROP_NONE);
@@ -1710,7 +1805,9 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_vertex_color_paint", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOLP);
- RNA_def_property_ui_text(prop, "Vertex Color Paint", "Replaces object base color with vertex colors (multiplies with 'texture face' face assigned textures)");
+ RNA_def_property_ui_text(prop, "Vertex Color Paint",
+ "Replaces object base color with vertex colors (multiplies with "
+ "'texture face' face assigned textures)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "invert_z", PROP_BOOLEAN, PROP_NONE);
@@ -1725,12 +1822,15 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ENV);
- RNA_def_property_ui_text(prop, "Sky", "Renders this material with zero alpha, with sky background in place (scanline only)");
+ RNA_def_property_ui_text(prop, "Sky",
+ "Renders this material with zero alpha, with sky background in place (scanline only)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_only_shadow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYSHADOW);
- RNA_def_property_ui_text(prop, "Only Shadow", "Renders shadows as the material's alpha value, making materials transparent except for shadowed areas");
+ RNA_def_property_ui_text(prop, "Only Shadow",
+ "Renders shadows as the material's alpha value, making materials "
+ "transparent except for shadowed areas");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "shadow_only_type", PROP_ENUM, PROP_NONE);
@@ -1741,17 +1841,20 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_face_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE);
- RNA_def_property_ui_text(prop, "Face Textures", "Replaces the object's base color with color from face assigned image textures");
+ RNA_def_property_ui_text(prop, "Face Textures",
+ "Replaces the object's base color with color from face assigned image textures");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_face_texture_alpha", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FACETEXTURE_ALPHA);
- RNA_def_property_ui_text(prop, "Face Textures Alpha", "Replaces the object's base alpha value with alpha from face assigned image textures");
+ RNA_def_property_ui_text(prop, "Face Textures Alpha",
+ "Replaces the object's base alpha value with alpha from face assigned image textures");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_cast_shadows_only", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ONLYCAST);
- RNA_def_property_ui_text(prop, "Cast Shadows Only", "Makes objects with this material appear invisible, only casting shadows (not rendered)");
+ RNA_def_property_ui_text(prop, "Cast Shadows Only",
+ "Makes objects with this material appear invisible, only casting shadows (not rendered)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
@@ -1761,32 +1864,39 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_transparent_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW_TRA);
- RNA_def_property_ui_text(prop, "Receive Transparent Shadows", "Allow this object to receive transparent shadows cast through other objects");
+ RNA_def_property_ui_text(prop, "Receive Transparent Shadows",
+ "Allow this object to receive transparent shadows cast through other objects");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_ray_shadow_bias", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYBIAS);
- RNA_def_property_ui_text(prop, "Ray Shadow Bias", "Prevents raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)");
+ RNA_def_property_ui_text(prop, "Ray Shadow Bias",
+ "Prevents raytraced shadow errors on surfaces with smooth shaded normals (terminator problem)");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_full_oversampling", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FULL_OSA);
- RNA_def_property_ui_text(prop, "Full Oversampling", "Force this material to render full shading/textures for all anti-aliasing samples");
+ RNA_def_property_ui_text(prop, "Full Oversampling",
+ "Force this material to render full shading/textures for all anti-aliasing samples");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_cast_buffer_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADBUF);
- RNA_def_property_ui_text(prop, "Cast Buffer Shadows", "Allow this material to cast shadows from shadow buffer lamps");
+ RNA_def_property_ui_text(prop, "Cast Buffer Shadows",
+ "Allow this material to cast shadows from shadow buffer lamps");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_cast_approximate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shade_flag", MA_APPROX_OCCLUSION);
- RNA_def_property_ui_text(prop, "Cast Approximate", "Allow this material to cast shadows when using approximate ambient occlusion.");
+ RNA_def_property_ui_text(prop, "Cast Approximate",
+ "Allow this material to cast shadows when using approximate ambient occlusion");
RNA_def_property_update(prop, 0, "rna_Material_update");
prop= RNA_def_property(srna, "use_tangent_shading", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TANGENT_V);
- RNA_def_property_ui_text(prop, "Tangent Shading", "Use the material's tangent vector instead of the normal for shading - for anisotropic shading effects");
+ RNA_def_property_ui_text(prop, "Tangent Shading",
+ "Use the material's tangent vector instead of the normal for shading "
+ "- for anisotropic shading effects");
RNA_def_property_update(prop, 0, "rna_Material_update");
/* nested structs */
@@ -1832,6 +1942,13 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Material_physics_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Physics", "Game physics settings");
+ /* game settings */
+ prop= RNA_def_property(srna, "game_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "game");
+ RNA_def_property_struct_type(prop, "MaterialGameSettings");
+ RNA_def_property_ui_text(prop, "Game Settings", "Game material settings");
+
/* nodetree */
prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
@@ -1846,7 +1963,8 @@ void RNA_def_material(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_node_material", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_flag(prop, PROP_EDITABLE);
- RNA_def_property_pointer_funcs(prop, "rna_Material_active_node_material_get", "rna_Material_active_node_material_set", NULL, NULL);
+ RNA_def_property_pointer_funcs(prop, "rna_Material_active_node_material_get",
+ "rna_Material_active_node_material_set", NULL, NULL);
RNA_def_property_ui_text(prop, "Material", "Active node material");
RNA_def_property_update(prop, NC_MATERIAL, NULL);
@@ -1876,6 +1994,7 @@ void RNA_def_material(BlenderRNA *brna)
rna_def_material_mtex(brna);
rna_def_material_strand(brna);
rna_def_material_physics(brna);
+ rna_def_material_gamesettings(brna);
RNA_api_material(srna);
}
@@ -1896,19 +2015,19 @@ static void rna_def_texture_slots(BlenderRNA *brna, PropertyRNA *cprop, const ch
/* functions */
func= RNA_def_function(srna, "add", "rna_mtex_texture_slots_add");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex.");
+ parm= RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "create", "rna_mtex_texture_slots_create");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to initialize.", 0, INT_MAX);
+ parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to initialize", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex.");
+ parm= RNA_def_pointer(func, "mtex", structname, "", "The newly initialized mtex");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "clear", "rna_mtex_texture_slots_clear");
RNA_def_function_flag(func, FUNC_USE_SELF_ID|FUNC_NO_SELF|FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear.", 0, INT_MAX);
+ parm= RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "Slot index to clear", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -1921,7 +2040,8 @@ void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin,
/* mtex */
prop= RNA_def_property(srna, "texture_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, structname);
- RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end",
+ "rna_iterator_array_dereference_get", 0, 0, 0);
RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures");
rna_def_texture_slots(brna, prop, structname, structname_slots);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index 80c98e8c428..1bbdc7cc853 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -90,6 +90,24 @@ void rna_Mesh_update_draw(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA
}
}
+
+void rna_Mesh_update_vertmask(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ Mesh* me = ptr->data;
+ if ((me->editflag & ME_EDIT_VERT_SEL) && (me->editflag & ME_EDIT_PAINT_MASK)) {
+ me->editflag ^= ME_EDIT_PAINT_MASK;
+ }
+ rna_Mesh_update_draw(bmain, scene, ptr);
+}
+
+void rna_Mesh_update_facemask(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ Mesh* me = ptr->data;
+ if ((me->editflag & ME_EDIT_VERT_SEL) && (me->editflag & ME_EDIT_PAINT_MASK)) {
+ me->editflag ^= ME_EDIT_VERT_SEL;
+ }
+ rna_Mesh_update_draw(bmain, scene, ptr);
+}
static void rna_MeshVertex_normal_get(PointerRNA *ptr, float *value)
{
MVert *mvert= (MVert*)ptr->data;
@@ -690,7 +708,7 @@ static void rna_MeshTextureFaceLayer_name_set(PointerRNA *ptr, const char *value
Mesh *me= (Mesh*)ptr->id.data;
CustomData *fdata= rna_mesh_fdata(me);
CustomDataLayer *cdl= (CustomDataLayer*)ptr->data;
- BLI_strncpy(cdl->name, value, sizeof(cdl->name));
+ BLI_strncpy_utf8(cdl->name, value, sizeof(cdl->name));
CustomData_set_layer_unique_name(fdata, cdl - fdata->layers);
}
@@ -802,7 +820,7 @@ static void rna_MeshColorLayer_name_set(PointerRNA *ptr, const char *value)
Mesh *me= (Mesh*)ptr->id.data;
CustomData *fdata= rna_mesh_fdata(me);
CustomDataLayer *cdl= (CustomDataLayer*)ptr->data;
- BLI_strncpy(cdl->name, value, sizeof(cdl->name));
+ BLI_strncpy_utf8(cdl->name, value, sizeof(cdl->name));
CustomData_set_layer_unique_name(fdata, cdl - fdata->layers);
}
@@ -1402,6 +1420,9 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Image", "");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ //XXX to be deleted soon -- left for now in case we need it for debug
+ //XXX it should be out before Blender 2.6 (after texface to material patch)
+
prop= RNA_def_property(srna, "use_image", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", TF_TEX);
RNA_def_property_ui_text(prop, "Tex", "Render face with texture");
@@ -1468,6 +1489,9 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Transparency", "Transparency blending mode");
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+ //XXX to be deleted soon -- left for now in case we need it for debug
+ //XXX it should be out before Blender 2.6 (after texface to material patch)
+
prop= RNA_def_property(srna, "select_uv", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", TF_SEL1);
RNA_def_property_array(prop, 4);
@@ -1701,7 +1725,7 @@ static void rna_def_mesh_vertices(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "add", "ED_mesh_vertices_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
+ RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add", 0, INT_MAX);
}
/* mesh.edges */
@@ -1720,7 +1744,7 @@ static void rna_def_mesh_edges(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "add", "ED_mesh_edges_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
+ RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add", 0, INT_MAX);
}
/* mesh.faces */
@@ -1749,7 +1773,7 @@ static void rna_def_mesh_faces(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "add", "ED_mesh_faces_add");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add.", 0, INT_MAX);
+ RNA_def_int(func, "count", 0, 0, INT_MAX, "Count", "Number of vertices to add", 0, INT_MAX);
}
/* mesh.vertex_colors */
@@ -1768,16 +1792,16 @@ static void rna_def_vertex_colors(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Mesh_vertex_color_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh.");
- RNA_def_string(func, "name", "Col", 0, "", "Vertex color name.");
- parm= RNA_def_pointer(func, "layer", "MeshColorLayer", "", "The newly created layer.");
+ RNA_def_function_ui_description(func, "Add a vertex color layer to Mesh");
+ RNA_def_string(func, "name", "Col", 0, "", "Vertex color name");
+ parm= RNA_def_pointer(func, "layer", "MeshColorLayer", "", "The newly created layer");
RNA_def_function_return(func, parm);
/*
func= RNA_def_function(srna, "remove", "rna_Mesh_vertex_color_remove");
- RNA_def_function_ui_description(func, "Remove a vertex color layer.");
+ RNA_def_function_ui_description(func, "Remove a vertex color layer");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove.");
+ parm= RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
*/
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
@@ -1809,16 +1833,16 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Mesh_uv_texture_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- RNA_def_function_ui_description(func, "Add a UV texture layer to Mesh.");
- RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name.");
- parm= RNA_def_pointer(func, "layer", "MeshTextureFaceLayer", "", "The newly created layer.");
+ RNA_def_function_ui_description(func, "Add a UV texture layer to Mesh");
+ RNA_def_string(func, "name", "UVTex", 0, "", "UV Texture name");
+ parm= RNA_def_pointer(func, "layer", "MeshTextureFaceLayer", "", "The newly created layer");
RNA_def_function_return(func, parm);
/*
func= RNA_def_function(srna, "remove", "rna_Mesh_uv_layers_remove");
- RNA_def_function_ui_description(func, "Remove a vertex color layer.");
+ RNA_def_function_ui_description(func, "Remove a vertex color layer");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove.");
+ parm= RNA_def_pointer(func, "layer", "Layer", "", "The layer to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
*/
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_UNSIGNED);
@@ -2075,8 +2099,14 @@ static void rna_def_mesh(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_PAINT_MASK);
RNA_def_property_ui_text(prop, "Paint Mask", "Face selection masking for painting");
RNA_def_property_ui_icon(prop, ICON_FACESEL_HLT, 0);
- RNA_def_property_update(prop, 0, "rna_Mesh_update_draw");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_facemask");
+
+ prop= RNA_def_property(srna, "use_paint_mask_vertex", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "editflag", ME_EDIT_VERT_SEL);
+ RNA_def_property_ui_text(prop, "Vertex Selection", "Vertex selection masking for painting (weight paint only)");
+ RNA_def_property_ui_icon(prop, ICON_VERTEXSEL, 0);
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_vertmask");
/* readonly editmesh info - use for extrude menu */
prop= RNA_def_property(srna, "total_vert_sel", PROP_INT, PROP_UNSIGNED);
diff --git a/source/blender/makesrna/intern/rna_mesh_api.c b/source/blender/makesrna/intern/rna_mesh_api.c
index 87bbea334db..ef636d9a515 100644
--- a/source/blender/makesrna/intern/rna_mesh_api.c
+++ b/source/blender/makesrna/intern/rna_mesh_api.c
@@ -52,19 +52,20 @@ void RNA_api_mesh(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "transform", "ED_mesh_transform");
- RNA_def_function_ui_description(func, "Transform mesh vertices by a matrix.");
- parm= RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix.", 0.0f, 0.0f);
+ RNA_def_function_ui_description(func, "Transform mesh vertices by a matrix");
+ parm= RNA_def_float_matrix(func, "matrix", 4, 4, NULL, 0.0f, 0.0f, "", "Matrix", 0.0f, 0.0f);
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "calc_normals", "ED_mesh_calc_normals");
- RNA_def_function_ui_description(func, "Calculate vertex normals.");
+ RNA_def_function_ui_description(func, "Calculate vertex normals");
func= RNA_def_function(srna, "update", "ED_mesh_update");
- RNA_def_boolean(func, "calc_edges", 0, "Calculate Edges", "Force recalculation of edges.");
+ RNA_def_boolean(func, "calc_edges", 0, "Calculate Edges", "Force recalculation of edges");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
func= RNA_def_function(srna, "validate", "BKE_mesh_validate");
- RNA_def_function_ui_description(func, "validate geometry, return True when the mesh has had invalid geometry corrected/removed.");
+ RNA_def_function_ui_description(func, "validate geometry, return True when the mesh has had "
+ "invalid geometry corrected/removed");
RNA_def_boolean(func, "verbose", 0, "Verbose", "Output information about the errors found");
parm= RNA_def_boolean(func, "result", 0, "Result", "");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index d94fa130163..5e5cf0be0ae 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -236,15 +236,15 @@ static void rna_def_metaball_elements(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Meta Elements", "Collection of metaball elements");
func= RNA_def_function(srna, "new", "rna_MetaBall_elements_new");
- RNA_def_function_ui_description(func, "Add a new spline to the curve.");
- RNA_def_enum(func, "type", metaelem_type_items, MB_BALL, "", "type for the new meta-element.");
- parm= RNA_def_pointer(func, "element", "MetaElement", "", "The newly created meta-element.");
+ RNA_def_function_ui_description(func, "Add a new spline to the curve");
+ RNA_def_enum(func, "type", metaelem_type_items, MB_BALL, "", "type for the new meta-element");
+ parm= RNA_def_pointer(func, "element", "MetaElement", "", "The newly created meta-element");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_MetaBall_elements_remove");
- RNA_def_function_ui_description(func, "Remove a spline from a curve.");
+ RNA_def_function_ui_description(func, "Remove a spline from a curve");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "element", "MetaElement", "", "The element to remove.");
+ parm= RNA_def_pointer(func, "element", "MetaElement", "", "The element to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index f6470458b26..c2182a784dd 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -69,7 +69,11 @@ EnumPropertyItem modifier_type_items[] ={
{eModifierType_Screw, "SCREW", ICON_MOD_SCREW, "Screw", ""},
{eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""},
{eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
+ {0, "", 0, "Modify", ""},
{eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
+ {eModifierType_WeightVGEdit, "VERTEX_WEIGHT_EDIT", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Edit", ""},
+ {eModifierType_WeightVGMix, "VERTEX_WEIGHT_MIX", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Mix", ""},
+ {eModifierType_WeightVGProximity, "VERTEX_WEIGHT_PROXIMITY", ICON_MOD_VERTEX_WEIGHT, "Vertex Weight Proximity", ""},
{0, "", 0, "Deform", ""},
{eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""},
{eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""},
@@ -88,6 +92,7 @@ EnumPropertyItem modifier_type_items[] ={
{eModifierType_Collision, "COLLISION", ICON_MOD_PHYSICS, "Collision", ""},
{eModifierType_Explode, "EXPLODE", ICON_MOD_EXPLODE, "Explode", ""},
{eModifierType_Fluidsim, "FLUID_SIMULATION", ICON_MOD_FLUIDSIM, "Fluid Simulation", ""},
+ {eModifierType_NavMesh, "NAVMESH", ICON_MOD_PHYSICS, "Navigation mesh", ""},
{eModifierType_ParticleInstance, "PARTICLE_INSTANCE", ICON_MOD_PARTICLES, "Particle Instance", ""},
{eModifierType_ParticleSystem, "PARTICLE_SYSTEM", ICON_MOD_PARTICLES, "Particle System", ""},
{eModifierType_Smoke, "SMOKE", ICON_MOD_SMOKE, "Smoke", ""},
@@ -186,6 +191,14 @@ static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
return &RNA_ScrewModifier;
case eModifierType_Warp:
return &RNA_WarpModifier;
+ case eModifierType_NavMesh:
+ return &RNA_NavMeshModifier;
+ case eModifierType_WeightVGEdit:
+ return &RNA_VertexWeightEditModifier;
+ case eModifierType_WeightVGMix:
+ return &RNA_VertexWeightMixModifier;
+ case eModifierType_WeightVGProximity:
+ return &RNA_VertexWeightProximityModifier;
case eModifierType_DynamicPaint:
return &RNA_DynamicPaintModifier;
default:
@@ -202,7 +215,7 @@ void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(oldname, md->name, sizeof(md->name));
/* copy the new name into the name slot */
- BLI_strncpy(md->name, value, sizeof(md->name));
+ BLI_strncpy_utf8(md->name, value, sizeof(md->name));
/* make sure the name is truly unique */
if (ptr->id.data) {
@@ -380,6 +393,46 @@ static void rna_SolidifyModifier_vgroup_set(PointerRNA *ptr, const char *value)
rna_object_vgroup_name_set(ptr, value, smd->defgrp_name, sizeof(smd->defgrp_name));
}
+static void rna_WeightVGModifier_vgroup_set(PointerRNA *ptr, const char *value)
+{
+ ModifierData *md = (ModifierData*)ptr->data;
+ if (md->type == eModifierType_WeightVGEdit) {
+ WeightVGEditModifierData *wmd= (WeightVGEditModifierData*)md;
+ rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name, sizeof(wmd->defgrp_name));
+ }
+ else if (md->type == eModifierType_WeightVGMix) {
+ WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)md;
+ rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name_a, sizeof(wmd->defgrp_name_a));
+ }
+ else if (md->type == eModifierType_WeightVGProximity) {
+ WeightVGProximityModifierData *wmd= (WeightVGProximityModifierData*)md;
+ rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name, sizeof(wmd->defgrp_name));
+ }
+}
+
+static void rna_WeightVGModifier_mask_vgroup_set(PointerRNA *ptr, const char *value)
+{
+ ModifierData *md = (ModifierData*)ptr->data;
+ if (md->type == eModifierType_WeightVGEdit) {
+ WeightVGEditModifierData *wmd= (WeightVGEditModifierData*)md;
+ rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name));
+ }
+ else if (md->type == eModifierType_WeightVGMix) {
+ WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)md;
+ rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name));
+ }
+ else if (md->type == eModifierType_WeightVGProximity) {
+ WeightVGProximityModifierData *wmd= (WeightVGProximityModifierData*)md;
+ rna_object_vgroup_name_set(ptr, value, wmd->mask_defgrp_name, sizeof(wmd->mask_defgrp_name));
+ }
+}
+
+static void rna_WeightVGMixModifier_vgroup2_set(PointerRNA *ptr, const char *value)
+{
+ WeightVGMixModifierData *wmd= (WeightVGMixModifierData*)ptr->data;
+ rna_object_vgroup_name_set(ptr, value, wmd->defgrp_name_b, sizeof(wmd->defgrp_name_b));
+}
+
static void rna_MappingInfo_uvlayer_set(PointerRNA *ptr, const char *value)
{
MappingInfoModifierData *mmd= (MappingInfoModifierData *)ptr->data;
@@ -404,6 +457,23 @@ static void rna_WaveModifier_uvlayer_set(PointerRNA *ptr, const char *value)
rna_object_uvlayer_name_set(ptr, value, wmd->uvlayer_name, sizeof(wmd->uvlayer_name));
}
+static void rna_WeightVGModifier_mask_uvlayer_set(PointerRNA *ptr, const char *value)
+{
+ ModifierData *md = (ModifierData*)ptr->data;
+ if (md->type == eModifierType_WeightVGEdit) {
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*)md;
+ rna_object_uvlayer_name_set(ptr, value, wmd->mask_tex_uvlayer_name, sizeof(wmd->mask_tex_uvlayer_name));
+ }
+ else if (md->type == eModifierType_WeightVGMix) {
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*)md;
+ rna_object_uvlayer_name_set(ptr, value, wmd->mask_tex_uvlayer_name, sizeof(wmd->mask_tex_uvlayer_name));
+ }
+ else if (md->type == eModifierType_WeightVGProximity) {
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*)md;
+ rna_object_uvlayer_name_set(ptr, value, wmd->mask_tex_uvlayer_name, sizeof(wmd->mask_tex_uvlayer_name));
+ }
+}
+
static void rna_MultiresModifier_level_range(PointerRNA *ptr, int *min, int *max)
{
MultiresModifierData *mmd = (MultiresModifierData*)ptr->data;
@@ -2449,6 +2519,312 @@ static void rna_def_modifier_screw(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Modifier_update");*/
}
+static void rna_def_modifier_navmesh(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ /* PropertyRNA *prop; */ /* UNUSED */
+
+ srna= RNA_def_struct(brna, "NavMeshModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "NavMesh Modifier", "NavMesh modifier");
+ RNA_def_struct_sdna(srna, "NavMeshModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_MOD_DECIM);
+}
+
+static void rna_def_modifier_weightvg_mask(BlenderRNA *brna, StructRNA *srna)
+{
+ static EnumPropertyItem weightvg_mask_tex_map_items[] = {
+ {MOD_DISP_MAP_LOCAL, "LOCAL", 0, "Local", ""},
+ {MOD_DISP_MAP_GLOBAL, "GLOBAL", 0, "Global", ""},
+ {MOD_DISP_MAP_OBJECT, "OBJECT", 0, "Object", ""},
+ {MOD_DISP_MAP_UV, "UV", 0, "UV", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem weightvg_mask_tex_used_items[] = {
+ {MOD_WVG_MASK_TEX_USE_INT, "INT", 0, "Intensity", ""},
+ {MOD_WVG_MASK_TEX_USE_RED, "RED", 0, "Red", ""},
+ {MOD_WVG_MASK_TEX_USE_GREEN, "GREEN", 0, "Green", ""},
+ {MOD_WVG_MASK_TEX_USE_BLUE, "BLUE", 0, "Blue", ""},
+ {MOD_WVG_MASK_TEX_USE_HUE, "HUE", 0, "Hue", ""},
+ {MOD_WVG_MASK_TEX_USE_SAT, "SAT", 0, "Saturation", ""},
+ {MOD_WVG_MASK_TEX_USE_VAL, "VAL", 0, "Value", ""},
+ {MOD_WVG_MASK_TEX_USE_ALPHA, "ALPHA", 0, "Alpha", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ PropertyRNA *prop;
+
+ prop= RNA_def_property(srna, "mask_constant", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0);
+ RNA_def_property_ui_text(prop, "Influence", "Global influence of current modifications on vgroup");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "mask_vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "mask_defgrp_name");
+ RNA_def_property_ui_text(prop, "Mask VGroup", "Masking vertex group name");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_mask_vgroup_set");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "mask_texture", PROP_POINTER, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Masking Tex", "Masking texture");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "mask_tex_use_channel", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, weightvg_mask_tex_used_items);
+ RNA_def_property_ui_text(prop, "Use Channel", "Which texture channel to use for masking");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "mask_tex_mapping", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, weightvg_mask_tex_map_items);
+ RNA_def_property_ui_text(prop, "Texture Coordinates", "Which texture coordinates "
+ "to use for mapping");
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+
+ prop= RNA_def_property(srna, "mask_tex_uv_layer", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "mask_tex_uvlayer_name");
+ RNA_def_property_ui_text(prop, "UV Layer", "UV layer name");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_mask_uvlayer_set");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "mask_tex_map_object", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "mask_tex_map_obj");
+ RNA_def_property_ui_text(prop, "Texture Coordinate Object", "Which object to take texture "
+ "coordinates from");
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+}
+
+static void rna_def_modifier_weightvgedit(BlenderRNA *brna)
+{
+ static EnumPropertyItem weightvg_edit_falloff_type_items[] = {
+ {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", ""},
+ {MOD_WVG_MAPPING_CURVE, "CURVE", ICON_RNDCURVE, "Custom Curve", ""},
+ {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
+ {MOD_WVG_MAPPING_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
+ {MOD_WVG_MAPPING_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""},
+ {MOD_WVG_MAPPING_SPHERE, "ICON_SPHERECURVE", ICON_SPHERECURVE, "Sphere", ""},
+ {MOD_WVG_MAPPING_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", ""},
+ {MOD_WVG_MAPPING_STEP, "STEP", ICON_NOCURVE, "Median Step", ""}, /* Would need a better icon... */
+ {0, NULL, 0, NULL, NULL}};
+
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "VertexWeightEditModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "WeightVG Edit Modifier",
+ "Edit the weights of vertices in a group");
+ RNA_def_struct_sdna(srna, "WeightVGEditModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
+
+ prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
+ RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, weightvg_edit_falloff_type_items);
+ RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to there new values");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "use_add", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_ADD2VG);
+ RNA_def_property_ui_text(prop, "Group Add", "Add vertices with weight over threshold "
+ "to vgroup");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "use_remove", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "edit_flags", MOD_WVG_EDIT_REMFVG);
+ RNA_def_property_ui_text(prop, "Group Remove", "Remove vertices with weight below threshold "
+ "from vgroup");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "default_weight", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0);
+ RNA_def_property_ui_text(prop, "Default Weight", "Default weight a vertex will have if "
+ "it is not in the vgroup");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "map_curve", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "cmap_curve");
+ RNA_def_property_ui_text(prop, "Mapping Curve", "Custom mapping curve");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "add_threshold", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "add_threshold");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0);
+ RNA_def_property_ui_text(prop, "Add Threshold", "Lower bound for a vertex's weight "
+ "to be added to the vgroup");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "remove_threshold", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "rem_threshold");
+ RNA_def_property_range(prop, 0.0, 1.0);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0);
+ RNA_def_property_ui_text(prop, "Rem Threshold", "Upper bound for a vertex's weight "
+ "to be removed from the vgroup");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ /* Common masking properties. */
+ rna_def_modifier_weightvg_mask(brna, srna);
+}
+
+static void rna_def_modifier_weightvgmix(BlenderRNA *brna)
+{
+ static EnumPropertyItem weightvg_mix_modes_items[] = {
+ {MOD_WVG_MIX_SET, "SET", 0, "Replace weights", ""},
+ {MOD_WVG_MIX_ADD, "ADD", 0, "Add to weights", ""},
+ {MOD_WVG_MIX_SUB, "SUB", 0, "Subtract from weights", ""},
+ {MOD_WVG_MIX_MUL, "MUL", 0, "Multiply weights", ""},
+ {MOD_WVG_MIX_DIV, "DIV", 0, "Divide weights", ""},
+ {MOD_WVG_MIX_DIF, "DIF", 0, "Difference", ""},
+ {MOD_WVG_MIX_AVG, "AVG", 0, "Average", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem weightvg_mix_set_items[] = {
+ {MOD_WVG_SET_ALL, "ALL", 0, "All vertices", ""},
+ {MOD_WVG_SET_A, "A", 0, "Vertices from group A", ""},
+ {MOD_WVG_SET_B, "B", 0, "Vertices from group B", ""},
+ {MOD_WVG_SET_OR, "OR", 0, "Vertices from one group", ""},
+ {MOD_WVG_SET_AND, "AND", 0, "Vertices from both groups", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "VertexWeightMixModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "WeightVG Mix Modifier",
+ "Mix the weights of two vertex groups");
+ RNA_def_struct_sdna(srna, "WeightVGMixModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
+
+ prop= RNA_def_property(srna, "vertex_group_a", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "defgrp_name_a");
+ RNA_def_property_ui_text(prop, "Vertex Group A", "First vertex group name");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "vertex_group_b", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "defgrp_name_b");
+ RNA_def_property_ui_text(prop, "Vertex Group B", "Second vertex group name");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGMixModifier_vgroup2_set");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "default_weight_a", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0);
+ RNA_def_property_ui_text(prop, "Default Weight A", "Default weight a vertex will have if "
+ "it is not in the first vgroup");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "default_weight_b", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 0);
+ RNA_def_property_ui_text(prop, "Default Weight B", "Default weight a vertex will have if "
+ "it is not in the second vgroup");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "mix_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, weightvg_mix_modes_items);
+ RNA_def_property_ui_text(prop, "Mix Mode", "How weights from vgroup 2 affect weights "
+ "of vgroup 1");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "mix_set", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, weightvg_mix_set_items);
+ RNA_def_property_ui_text(prop, "Vertex Set", "Which vertices should be affected");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ /* Common masking properties. */
+ rna_def_modifier_weightvg_mask(brna, srna);
+}
+
+static void rna_def_modifier_weightvgproximity(BlenderRNA *brna)
+{
+ static EnumPropertyItem weightvg_proximity_modes_items[] = {
+ {MOD_WVG_PROXIMITY_OBJECT, "OBJECT", 0, "Object Distance",
+ "Use distance between affected and target objects"},
+ {MOD_WVG_PROXIMITY_GEOMETRY, "GEOMETRY", 0, "Geometry Distance",
+ "Use distance between affected object's vertices and target "
+ "object, or target object's geometry"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem proximity_geometry_items[] = {
+ {MOD_WVG_PROXIMITY_GEOM_VERTS, "VERTEX", ICON_VERTEXSEL, "Vertex", "Compute distance to nearest vertex"},
+ {MOD_WVG_PROXIMITY_GEOM_EDGES, "EDGE", ICON_EDGESEL, "Edge", "Compute distance to nearest edge"},
+ {MOD_WVG_PROXIMITY_GEOM_FACES, "FACE", ICON_FACESEL, "Face", "Compute distance to nearest face"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem weightvg_proximity_falloff_type_items[] = {
+ {MOD_WVG_MAPPING_NONE, "LINEAR", ICON_LINCURVE, "Linear", ""},
+ /* No curve mapping here! */
+ {MOD_WVG_MAPPING_SHARP, "SHARP", ICON_SHARPCURVE, "Sharp", ""},
+ {MOD_WVG_MAPPING_SMOOTH, "SMOOTH", ICON_SMOOTHCURVE, "Smooth", ""},
+ {MOD_WVG_MAPPING_ROOT, "ROOT", ICON_ROOTCURVE, "Root", ""},
+ {MOD_WVG_MAPPING_SPHERE, "ICON_SPHERECURVE", ICON_SPHERECURVE, "Sphere", ""},
+ {MOD_WVG_MAPPING_RANDOM, "RANDOM", ICON_RNDCURVE, "Random", ""},
+ {MOD_WVG_MAPPING_STEP, "STEP", ICON_NOCURVE, "Median Step", ""}, /* Would need a better icon... */
+ {0, NULL, 0, NULL, NULL}};
+
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "VertexWeightProximityModifier", "Modifier");
+ RNA_def_struct_ui_text(srna, "WeightVG Proximity Modifier",
+ "Set the weights of vertices in a group from a target object's "
+ "distance");
+ RNA_def_struct_sdna(srna, "WeightVGProximityModifierData");
+ RNA_def_struct_ui_icon(srna, ICON_MOD_VERTEX_WEIGHT);
+
+ prop= RNA_def_property(srna, "vertex_group", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "defgrp_name");
+ RNA_def_property_ui_text(prop, "Vertex Group", "Vertex group name");
+ RNA_def_property_string_funcs(prop, NULL, NULL, "rna_WeightVGModifier_vgroup_set");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "proximity_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, weightvg_proximity_modes_items);
+ RNA_def_property_ui_text(prop, "Proximity Mode", "Which distances to target object to use");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "proximity_geometry", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "proximity_flags");
+ RNA_def_property_enum_items(prop, proximity_geometry_items);
+ RNA_def_property_flag(prop, PROP_ENUM_FLAG); /* important to run before default set */
+ RNA_def_property_ui_text(prop, "Proximity Geometry",
+ "Use the shortest computed distance to target object's geometry "
+ "as weight");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "proximity_ob_target");
+ RNA_def_property_ui_text(prop, "Target Object", "Object to calculate vertices distances from");
+ RNA_def_property_flag(prop, PROP_EDITABLE|PROP_ID_SELF_CHECK);
+ RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update");
+
+ prop= RNA_def_property(srna, "min_dist", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, 0);
+ RNA_def_property_ui_text(prop, "Lowest Dist", "Distance mapping to weight 0.0 (or weight 1.0 if above Highest Dist)");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "max_dist", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.0, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, 0);
+ RNA_def_property_ui_text(prop, "Highest Dist", "Distance mapping to weight 1.0 (or weight 0.0 if below Lowest Dist)");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ prop= RNA_def_property(srna, "falloff_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, weightvg_proximity_falloff_type_items);
+ RNA_def_property_ui_text(prop, "Falloff Type", "How weights are mapped to there new values");
+ RNA_def_property_update(prop, 0, "rna_Modifier_update");
+
+ /* Common masking properties. */
+ rna_def_modifier_weightvg_mask(brna, srna);
+}
+
void RNA_def_modifier(BlenderRNA *brna)
{
StructRNA *srna;
@@ -2546,6 +2922,10 @@ void RNA_def_modifier(BlenderRNA *brna)
rna_def_modifier_smoke(brna);
rna_def_modifier_solidify(brna);
rna_def_modifier_screw(brna);
+ rna_def_modifier_navmesh(brna);
+ rna_def_modifier_weightvgedit(brna);
+ rna_def_modifier_weightvgmix(brna);
+ rna_def_modifier_weightvgproximity(brna);
rna_def_modifier_dynamic_paint(brna);
}
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index ef4adde6fb4..b2ea4cd966b 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -59,7 +59,7 @@ static void rna_NlaStrip_name_set(PointerRNA *ptr, const char *value)
NlaStrip *data= (NlaStrip *)ptr->data;
/* copy the name first */
- BLI_strncpy(data->name, value, sizeof(data->name));
+ BLI_strncpy_utf8(data->name, value, sizeof(data->name));
/* validate if there's enough info to do so */
if (ptr->id.data) {
@@ -299,7 +299,7 @@ static NlaStrip *rna_NlaStrip_new(NlaTrack *track, bContext *C, ReportList *repo
NlaStrip *strip = add_nlastrip(action);
if (strip == NULL) {
- BKE_reportf(reports, RPT_ERROR, "Unable to create new strip.");
+ BKE_reportf(reports, RPT_ERROR, "Unable to create new strip");
return NULL;
}
@@ -307,7 +307,7 @@ static NlaStrip *rna_NlaStrip_new(NlaTrack *track, bContext *C, ReportList *repo
strip->start = start;
if (BKE_nlastrips_add_strip(&track->strips, strip) == 0) {
- BKE_reportf(reports, RPT_ERROR, "Unable to add strip. Track doesn't have any space to accommodate this new strip.");
+ BKE_reportf(reports, RPT_ERROR, "Unable to add strip. Track doesn't have any space to accommodate this new strip");
free_nlastrip(NULL, strip);
return NULL;
}
@@ -565,20 +565,20 @@ static void rna_api_nlatrack_strips(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "new", "rna_NlaStrip_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new Action-Clip strip to the track");
- parm= RNA_def_string(func, "name", "NlaStrip", 0, "", "Name for the NLA Strips.");
+ parm= RNA_def_string(func, "name", "NlaStrip", 0, "", "Name for the NLA Strips");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm = RNA_def_int(func, "start", 0, INT_MIN, INT_MAX, "Start Frame", "Start frame for this strip.", INT_MIN, INT_MAX);
+ parm = RNA_def_int(func, "start", 0, INT_MIN, INT_MAX, "Start Frame", "Start frame for this strip", INT_MIN, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm = RNA_def_pointer(func, "action", "Action", "", "Action to assign to this strip.");
+ parm = RNA_def_pointer(func, "action", "Action", "", "Action to assign to this strip");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* return type */
- parm = RNA_def_pointer(func, "strip", "NlaStrip", "", "New NLA Strip.");
+ parm = RNA_def_pointer(func, "strip", "NlaStrip", "", "New NLA Strip");
RNA_def_function_return(func, parm);
func = RNA_def_function(srna, "remove", "rna_NlaStrip_remove");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove a NLA Strip.");
- parm = RNA_def_pointer(func, "strip", "NlaStrip", "", "NLA Strip to remove.");
+ RNA_def_function_ui_description(func, "Remove a NLA Strip");
+ parm = RNA_def_pointer(func, "strip", "NlaStrip", "", "NLA Strip to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index d6e475fdbad..1b113620663 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -30,13 +30,17 @@
#include <stdlib.h>
#include <string.h>
+#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "rna_internal.h"
+#include "rna_internal_types.h"
#include "DNA_material_types.h"
+#include "DNA_mesh_types.h"
#include "DNA_node_types.h"
+#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_texture_types.h"
@@ -53,9 +57,16 @@
#include "MEM_guardedalloc.h"
+EnumPropertyItem nodetree_type_items[] = {
+ {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes" },
+ {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes" },
+ {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes" },
+ {0, NULL, 0, NULL, NULL}
+};
+
EnumPropertyItem node_socket_type_items[] = {
- {SOCK_VALUE, "VALUE", 0, "Value", ""},
+ {SOCK_FLOAT, "VALUE", 0, "Value", ""},
{SOCK_VECTOR, "VECTOR", 0, "Vector", ""},
{SOCK_RGBA, "RGBA", 0, "RGBA", ""},
{0, NULL, 0, NULL, NULL}};
@@ -99,6 +110,41 @@ EnumPropertyItem node_filter_items[] = {
{6, "SHADOW", 0, "Shadow", ""},
{0, NULL, 0, NULL, NULL}};
+
+/* Add any new socket value subtype here.
+ * When adding a new subtype here, make sure you also add it
+ * to the subtype definitions in DNA_node_types.h.
+ * This macro is used by the RNA and the internal converter functions
+ * to define all socket subtypes. The SUBTYPE macro must be defined
+ * before using this macro, and undefined afterwards.
+ */
+#define NODE_DEFINE_SUBTYPES_INT \
+SUBTYPE(INT, Int, NONE, None) \
+SUBTYPE(INT, Int, UNSIGNED, Unsigned)
+
+#define NODE_DEFINE_SUBTYPES_FLOAT \
+SUBTYPE(FLOAT, Float, NONE, None) \
+SUBTYPE(FLOAT, Float, UNSIGNED, Unsigned) \
+SUBTYPE(FLOAT, Float, PERCENTAGE, Percentage) \
+SUBTYPE(FLOAT, Float, FACTOR, Factor) \
+SUBTYPE(FLOAT, Float, ANGLE, Angle) \
+SUBTYPE(FLOAT, Float, TIME, Time) \
+SUBTYPE(FLOAT, Float, DISTANCE, Distance)
+
+#define NODE_DEFINE_SUBTYPES_VECTOR \
+SUBTYPE(VECTOR, Vector, NONE, None) \
+SUBTYPE(VECTOR, Vector, TRANSLATION, Translation) \
+SUBTYPE(VECTOR, Vector, DIRECTION, Direction) \
+SUBTYPE(VECTOR, Vector, VELOCITY, Velocity) \
+SUBTYPE(VECTOR, Vector, ACCELERATION, Acceleration) \
+SUBTYPE(VECTOR, Vector, EULER, Euler) \
+SUBTYPE(VECTOR, Vector, XYZ, XYZ)
+
+#define NODE_DEFINE_SUBTYPES \
+NODE_DEFINE_SUBTYPES_INT \
+NODE_DEFINE_SUBTYPES_FLOAT \
+NODE_DEFINE_SUBTYPES_VECTOR
+
#ifdef RNA_RUNTIME
#include "BLI_linklist.h"
@@ -121,32 +167,18 @@ static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
#include "rna_nodetree_types.h"
- #undef DefNode
-
case NODE_GROUP:
return &RNA_NodeGroup;
+ case NODE_FORLOOP:
+ return &RNA_NodeForLoop;
+ case NODE_WHILELOOP:
+ return &RNA_NodeWhileLoop;
default:
return &RNA_Node;
}
}
-static StructRNA *rna_NodeSocketType_refine(struct PointerRNA *ptr)
-{
- bNodeSocket *ns= (bNodeSocket*)ptr->data;
-
- switch(ns->type) {
- case SOCK_VALUE:
- return &RNA_ValueNodeSocket;
- case SOCK_VECTOR:
- return &RNA_VectorNodeSocket;
- case SOCK_RGBA:
- return &RNA_RGBANodeSocket;
- default:
- return &RNA_UnknownType;
- }
-}
-
static StructRNA *rna_NodeTree_refine(struct PointerRNA *ptr)
{
bNodeTree *ntree= (bNodeTree*)ptr->data;
@@ -170,6 +202,46 @@ static char *rna_Node_path(PointerRNA *ptr)
return BLI_sprintfN("nodes[\"%s\"]", node->name);
}
+static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr)
+{
+ bNodeSocket *sock= (bNodeSocket*)ptr->data;
+
+ if (sock->default_value) {
+ /* This returns the refined socket type with the full definition
+ * of the default input value with type and subtype.
+ */
+
+ #define SUBTYPE(socktype, stypename, id, idname) \
+ { \
+ bNodeSocketValue##stypename *value= (bNodeSocketValue##stypename*)sock->default_value; \
+ if (value->subtype==PROP_##id) \
+ return &RNA_NodeSocket##stypename##idname; \
+ }
+
+ 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;
+ break;
+ case SOCK_VECTOR:
+ NODE_DEFINE_SUBTYPES_VECTOR
+ break;
+ case SOCK_RGBA:
+ return &RNA_NodeSocketRGBA;
+ break;
+ }
+
+ #undef SUBTYPE
+ }
+
+ return &RNA_NodeSocket;
+}
+
static char *rna_NodeSocket_path(PointerRNA *ptr)
{
bNodeTree *ntree= (bNodeTree*)ptr->id.data;
@@ -275,7 +347,7 @@ static void rna_NodeGroup_update(Main *bmain, Scene *scene, PointerRNA *ptr)
bNodeTree *ntree= (bNodeTree*)ptr->id.data;
bNode *node= (bNode*)ptr->data;
- nodeGroupVerify((bNodeTree *)node->id);
+ ntreeUpdateTree((bNodeTree *)node->id);
node_update(bmain, scene, ntree, node);
}
@@ -289,7 +361,7 @@ static void rna_Node_name_set(PointerRNA *ptr, const char *value)
/* make a copy of the old name first */
BLI_strncpy(oldname, node->name, sizeof(node->name));
/* set new name */
- BLI_strncpy(node->name, value, sizeof(node->name));
+ BLI_strncpy_utf8(node->name, value, sizeof(node->name));
nodeUniqueName(ntree, node);
@@ -313,18 +385,44 @@ static void rna_NodeGroupSocket_update(Main *bmain, Scene *scene, PointerRNA *pt
bNodeSocket *sock= (bNodeSocket*)ptr->data;
bNode *node;
- nodeGroupVerify(ntree);
+ ntreeUpdateTree(ntree);
if (nodeFindNode(ntree, sock, &node, NULL, NULL))
node_update(bmain, scene, ntree, node);
}
-static void rna_NodeSocket_defvalue_range(PointerRNA *ptr, float *min, float *max)
+#if 0 /* UNUSED */
+static void rna_NodeLink_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ bNodeTree *ntree= (bNodeTree*)ptr->id.data;
+
+ ntree->update |= NTREE_UPDATE_LINKS;
+ ntreeUpdateTree(ntree);
+}
+#endif
+
+static void rna_NodeSocketInt_range(PointerRNA *ptr, int *min, int *max)
+{
+ bNodeSocket *sock= (bNodeSocket*)ptr->data;
+ bNodeSocketValueInt *val= (bNodeSocketValueInt*)sock->default_value;
+ *min = val->min;
+ *max = val->max;
+}
+
+static void rna_NodeSocketFloat_range(PointerRNA *ptr, float *min, float *max)
{
bNodeSocket *sock= (bNodeSocket*)ptr->data;
+ bNodeSocketValueFloat *val= (bNodeSocketValueFloat*)sock->default_value;
+ *min = val->min;
+ *max = val->max;
+}
- *min = sock->ns.min;
- *max = sock->ns.max;
+static void rna_NodeSocketVector_range(PointerRNA *ptr, float *min, float *max)
+{
+ bNodeSocket *sock= (bNodeSocket*)ptr->data;
+ bNodeSocketValueVector *val= (bNodeSocketValueVector*)sock->default_value;
+ *min = val->min;
+ *max = val->max;
}
static void rna_Node_mapping_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -454,18 +552,22 @@ static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), PointerRNA
static bNode *rna_NodeTree_node_new(bNodeTree *ntree, bContext *UNUSED(C), ReportList *reports, int type, bNodeTree *group)
{
bNode *node;
+ bNodeTemplate ntemp;
if (type == NODE_GROUP && group == NULL) {
BKE_reportf(reports, RPT_ERROR, "node type \'GROUP\' missing group argument");
return NULL;
}
- node = nodeAddNodeType(ntree, type, group, NULL);
-
+
+ ntemp.type = type;
+ ntemp.ngroup = group;
+ node = nodeAddNode(ntree, &ntemp);
+
if (node == NULL) {
BKE_reportf(reports, RPT_ERROR, "Unable to create node");
}
else {
- nodeGroupVerify(ntree); /* update group node socket links*/
+ ntreeUpdateTree(ntree); /* update group node socket links*/
NodeTagChanged(ntree, node);
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
@@ -495,7 +597,7 @@ static bNode *rna_NodeTree_node_composite_new(bNodeTree *ntree, bContext *C, Rep
}
ntreeCompositForceHidden(ntree, CTX_data_scene(C));
- ntreeSolveOrder(ntree);
+ ntreeUpdateTree(ntree);
}
return node;
@@ -523,7 +625,7 @@ static void rna_NodeTree_node_remove(bNodeTree *ntree, ReportList *reports, bNod
id_us_min(node->id);
nodeFreeNode(ntree, node);
- nodeGroupVerify(ntree); /* update group node socket links*/
+ ntreeUpdateTree(ntree); /* update group node socket links*/
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
}
@@ -551,9 +653,7 @@ static bNodeLink *rna_NodeTree_link_new(bNodeTree *ntree, ReportList *reports, b
if(ret) {
NodeTagChanged(ntree, tonode);
- nodeGroupVerify(ntree); /* update group node socket links*/
-
- ntreeSolveOrder(ntree);
+ ntreeUpdateTree(ntree);
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
}
@@ -567,8 +667,7 @@ static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, bNod
}
else {
nodeRemLink(ntree, link);
- ntreeSolveOrder(ntree);
- nodeGroupVerify(ntree); /* update group node socket links*/
+ ntreeUpdateTree(ntree);
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
}
@@ -577,9 +676,10 @@ static void rna_NodeTree_link_remove(bNodeTree *ntree, ReportList *reports, bNod
static bNodeSocket *rna_NodeTree_input_new(bNodeTree *ntree, ReportList *UNUSED(reports), const char *name, int type)
{
/* XXX should check if tree is a group here! no good way to do this currently. */
- bNodeSocket *gsock= nodeGroupAddSocket(ntree, name, type, SOCK_IN);
+ bNodeSocket *gsock= node_group_add_socket(ntree, name, type, SOCK_IN);
- nodeGroupVerify(ntree); /* update group node socket links*/
+ ntree->update |= NTREE_UPDATE_GROUP_IN;
+ ntreeUpdateTree(ntree);
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
return gsock;
}
@@ -587,9 +687,10 @@ static bNodeSocket *rna_NodeTree_input_new(bNodeTree *ntree, ReportList *UNUSED(
static bNodeSocket *rna_NodeTree_output_new(bNodeTree *ntree, ReportList *UNUSED(reports), const char *name, int type)
{
/* XXX should check if tree is a group here! no good way to do this currently. */
- bNodeSocket *gsock= nodeGroupAddSocket(ntree, name, type, SOCK_OUT);
+ bNodeSocket *gsock= node_group_add_socket(ntree, name, type, SOCK_OUT);
- nodeGroupVerify(ntree); /* update group node socket links*/
+ ntree->update |= NTREE_UPDATE_GROUP_OUT;
+ ntreeUpdateTree(ntree);
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
return gsock;
}
@@ -606,11 +707,12 @@ static bNodeSocket *rna_NodeTree_input_expose(bNodeTree *ntree, ReportList *repo
BKE_reportf(reports, RPT_ERROR, "Socket is not an input");
else {
/* XXX should check if tree is a group here! no good way to do this currently. */
- gsock = nodeGroupAddSocket(ntree, sock->name, sock->type, SOCK_IN);
+ gsock = node_group_add_socket(ntree, sock->name, sock->type, SOCK_IN);
if (add_link)
nodeAddLink(ntree, NULL, gsock, node, sock);
- nodeGroupVerify(ntree); /* update group node socket links*/
+ ntree->update |= NTREE_UPDATE_GROUP_IN;
+ ntreeUpdateTree(ntree);
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
return gsock;
}
@@ -629,11 +731,12 @@ static bNodeSocket *rna_NodeTree_output_expose(bNodeTree *ntree, ReportList *rep
BKE_reportf(reports, RPT_ERROR, "Socket is not an output");
else {
/* XXX should check if tree is a group here! no good way to do this currently. */
- gsock = nodeGroupAddSocket(ntree, sock->name, sock->type, SOCK_OUT);
+ gsock = node_group_add_socket(ntree, sock->name, sock->type, SOCK_OUT);
if (add_link)
nodeAddLink(ntree, node, sock, NULL, gsock);
- nodeGroupVerify(ntree); /* update group node socket links*/
+ ntree->update |= NTREE_UPDATE_GROUP_OUT;
+ ntreeUpdateTree(ntree);
WM_main_add_notifier(NC_NODE|NA_EDITED, ntree);
return gsock;
}
@@ -668,14 +771,16 @@ static EnumPropertyItem node_ycc_items[] = {
{ 2, "JFIF", 0, "Jpeg", ""},
{0, NULL, 0, NULL, NULL}};
-#define MaxNodes 1000
+#define MaxNodes 50000
enum
{
Category_GroupNode,
+ Category_LoopNode,
+ Category_LayoutNode,
Category_ShaderNode,
Category_CompositorNode,
- Category_TextureNode
+ Category_TextureNode,
};
typedef struct NodeInfo
@@ -715,9 +820,10 @@ static void init(void)
#include "rna_nodetree_types.h"
- #undef DefNode
-
reg_node(NODE_GROUP, Category_GroupNode, "GROUP", "NodeGroup", "Node", "Group", "");
+ reg_node(NODE_FORLOOP, Category_LoopNode, "FORLOOP", "NodeForLoop", "Node", "ForLoop", "");
+ reg_node(NODE_WHILELOOP, Category_LoopNode, "WHILELOOP", "NodeWhileLoop", "Node", "WhileLoop", "");
+ reg_node(NODE_FRAME, Category_LayoutNode, "FRAME", "NodeFrame", "Node", "Frame", "");
}
static StructRNA* def_node(BlenderRNA *brna, int node_id)
@@ -793,6 +899,41 @@ static void def_group(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update");
}
+static void def_forloop(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "id");
+ RNA_def_property_struct_type(prop, "NodeTree");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Node Tree", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update");
+}
+
+static void def_whileloop(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "id");
+ RNA_def_property_struct_type(prop, "NodeTree");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Node Tree", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update");
+
+ prop = RNA_def_property(srna, "max_iterations", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "custom1");
+ RNA_def_property_range(prop, 0.0f, SHRT_MAX);
+ RNA_def_property_ui_text(prop, "Max. Iterations", "Limit for number of iterations");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroup_update");
+}
+
+static void def_frame(StructRNA *srna)
+{
+// PropertyRNA *prop;
+
+}
static void def_math(StructRNA *srna)
{
@@ -1347,7 +1488,7 @@ static void def_cmp_output_file(StructRNA *srna)
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_ui_text(prop, "File Path", "Output path for the image, same functionality as render output.");
+ RNA_def_property_ui_text(prop, "File Path", "Output path for the image, same functionality as render output");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
prop = RNA_def_property(srna, "image_type", PROP_ENUM, PROP_NONE);
@@ -2402,20 +2543,20 @@ static void rna_def_nodetree_link_api(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Node Links", "Collection of Node Links");
func= RNA_def_function(srna, "new", "rna_NodeTree_link_new");
- RNA_def_function_ui_description(func, "Add a node link to this node tree.");
+ RNA_def_function_ui_description(func, "Add a node link to this node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "input", "NodeSocket", "", "The input socket.");
+ parm= RNA_def_pointer(func, "input", "NodeSocket", "", "The input socket");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket.");
+ parm= RNA_def_pointer(func, "output", "NodeSocket", "", "The output socket");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return */
- parm= RNA_def_pointer(func, "link", "NodeLink", "", "New node link.");
+ parm= RNA_def_pointer(func, "link", "NodeLink", "", "New node link");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_NodeTree_link_remove");
- RNA_def_function_ui_description(func, "remove a node link from the node tree.");
+ RNA_def_function_ui_description(func, "remove a node link from the node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "link", "NodeLink", "", "The node link to remove.");
+ parm= RNA_def_pointer(func, "link", "NodeLink", "", "The node link to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -2431,19 +2572,19 @@ static void rna_def_composite_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Compositor Nodes", "Collection of Compositor Nodes");
func= RNA_def_function(srna, "new", "rna_NodeTree_node_composite_new");
- RNA_def_function_ui_description(func, "Add a node to this node tree.");
+ RNA_def_function_ui_description(func, "Add a node to this node tree");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_enum(func, "type", compositor_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
- parm= RNA_def_pointer(func, "node", "Node", "", "New node.");
+ parm= RNA_def_pointer(func, "node", "Node", "", "New node");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
- RNA_def_function_ui_description(func, "remove a node from this node tree.");
+ RNA_def_function_ui_description(func, "Remove a node from this node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove.");
+ parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -2459,19 +2600,19 @@ static void rna_def_shader_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Shader Nodes", "Collection of Shader Nodes");
func= RNA_def_function(srna, "new", "rna_NodeTree_node_new");
- RNA_def_function_ui_description(func, "Add a node to this node tree.");
+ RNA_def_function_ui_description(func, "Add a node to this node tree");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_enum(func, "type", shader_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
- parm= RNA_def_pointer(func, "node", "Node", "", "New node.");
+ parm= RNA_def_pointer(func, "node", "Node", "", "New node");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
- RNA_def_function_ui_description(func, "remove a node from this node tree.");
+ RNA_def_function_ui_description(func, "Remove a node from this node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove.");
+ parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -2487,19 +2628,19 @@ static void rna_def_texture_nodetree_api(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Texture Nodes", "Collection of Texture Nodes");
func= RNA_def_function(srna, "new", "rna_NodeTree_node_texture_new");
- RNA_def_function_ui_description(func, "Add a node to this node tree.");
+ RNA_def_function_ui_description(func, "Add a node to this node tree");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
parm= RNA_def_enum(func, "type", texture_node_type_items, 0, "Type", "Type of node to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_pointer(func, "group", "NodeTree", "", "The group tree");
/* return value */
- parm= RNA_def_pointer(func, "node", "Node", "", "New node.");
+ parm= RNA_def_pointer(func, "node", "Node", "", "New node");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_NodeTree_node_remove");
- RNA_def_function_ui_description(func, "remove a node from this node tree.");
+ RNA_def_function_ui_description(func, "Remove a node from this node tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove.");
+ parm= RNA_def_pointer(func, "node", "Node", "", "The node to remove");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -2510,94 +2651,112 @@ static void rna_def_node_socket(BlenderRNA *brna)
srna = RNA_def_struct(brna, "NodeSocket", NULL);
RNA_def_struct_ui_text(srna, "Node Socket", "Input or output socket of a node");
- RNA_def_struct_refine_func(srna, "rna_NodeSocketType_refine");
RNA_def_struct_sdna(srna, "bNodeSocket");
+ RNA_def_struct_refine_func(srna, "rna_NodeSocket_refine");
RNA_def_struct_ui_icon(srna, ICON_PLUG);
RNA_def_struct_path_func(srna, "rna_NodeSocket_path");
+ prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "type");
+ RNA_def_property_enum_items(prop, node_socket_type_items);
+ RNA_def_property_enum_default(prop, 0);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Type", "Node Socket type");
+
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
/* XXX must be editable for group sockets. if necessary use a special rna definition for these */
// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Name", "Socket name");
RNA_def_struct_name_property(srna, prop);
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeGroupSocket_update");
-
- /* can add back if there is any use in reading them */
-#if 0
- prop = RNA_def_property(srna, "min", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ns.min");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Minimum Value", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
-
- prop = RNA_def_property(srna, "max", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ns.max");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Maximum Value", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
-#endif
-
- prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_enum_items(prop, node_socket_type_items);
- RNA_def_property_ui_text(prop, "Type", "Node Socket type");
}
-static void rna_def_node_socket_value(BlenderRNA *brna)
+static void rna_def_node_socket_subtype(BlenderRNA *brna, int type, int subtype, const char *name, const char *ui_name)
{
StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "ValueNodeSocket", "NodeSocket");
- RNA_def_struct_ui_text(srna, "Value Node Socket", "Input or output socket of a node");
+ PropertyRNA *prop=NULL;
+ PropertySubType propsubtype= PROP_NONE;
+
+ #define SUBTYPE(socktype, stypename, id, idname) { PROP_##id, #id, 0, #idname, ""},
+ static EnumPropertyItem subtype_items[] = {
+ NODE_DEFINE_SUBTYPES
+ {0, NULL, 0, NULL, NULL}
+ };
+ #undef SUBTYPE
+
+ #define SUBTYPE(socktype, stypename, id, idname) if (subtype==PROP_##id) propsubtype = PROP_##id;
+ NODE_DEFINE_SUBTYPES
+ #undef SUBTYPE
+
+ srna = RNA_def_struct(brna, name, "NodeSocket");
+ RNA_def_struct_ui_text(srna, ui_name, "Input or output socket of a node");
RNA_def_struct_sdna(srna, "bNodeSocket");
RNA_def_struct_ui_icon(srna, ICON_PLUG);
RNA_def_struct_path_func(srna, "rna_NodeSocket_path");
-
- prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "ns.vec");
- RNA_def_property_array(prop, 1);
- RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
- RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
-}
-
-static void rna_def_node_socket_vector(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "VectorNodeSocket", "NodeSocket");
- RNA_def_struct_ui_text(srna, "Vector Node Socket", "Input or output socket of a node");
- RNA_def_struct_sdna(srna, "bNodeSocket");
- RNA_def_struct_ui_icon(srna, ICON_PLUG);
- RNA_def_struct_path_func(srna, "rna_NodeSocket_path");
-
- prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_XYZ);
- RNA_def_property_float_sdna(prop, NULL, "ns.vec");
- RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
- RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
-}
-
-static void rna_def_node_socket_rgba(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna = RNA_def_struct(brna, "RGBANodeSocket", "NodeSocket");
- RNA_def_struct_ui_text(srna, "RGBA Node Socket", "Input or output socket of a node");
- RNA_def_struct_sdna(srna, "bNodeSocket");
- RNA_def_struct_ui_icon(srna, ICON_PLUG);
- RNA_def_struct_path_func(srna, "rna_NodeSocket_path");
-
- prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_float_sdna(prop, NULL, "ns.vec");
- RNA_def_property_array(prop, 4);
- RNA_def_property_ui_text(prop, "Default Value", "Default value of the socket when no link is attached");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
- RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocket_defvalue_range");
+
+ switch (type) {
+ case SOCK_INT:
+ RNA_def_struct_sdna_from(srna, "bNodeSocketValueInt", "default_value");
+
+ prop = RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "subtype");
+ RNA_def_property_enum_items(prop, subtype_items);
+ RNA_def_property_ui_text(prop, "Subtype", "Subtype defining the socket value details");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+
+ prop = RNA_def_property(srna, "default_value", PROP_INT, propsubtype);
+ RNA_def_property_int_sdna(prop, NULL, "value");
+ RNA_def_property_int_funcs(prop, NULL, NULL, "rna_NodeSocketInt_range");
+ RNA_def_property_ui_text(prop, "Default Value", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+ break;
+ case SOCK_FLOAT:
+ RNA_def_struct_sdna_from(srna, "bNodeSocketValueFloat", "default_value");
+
+ prop = RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "subtype");
+ RNA_def_property_enum_items(prop, subtype_items);
+ RNA_def_property_ui_text(prop, "Subtype", "Subtype defining the socket value details");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+
+ prop = RNA_def_property(srna, "default_value", PROP_FLOAT, propsubtype);
+ RNA_def_property_float_sdna(prop, NULL, "value");
+ RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocketFloat_range");
+ RNA_def_property_ui_text(prop, "Default Value", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+ break;
+ case SOCK_BOOLEAN:
+ RNA_def_struct_sdna_from(srna, "bNodeSocketValueBoolean", "default_value");
+
+ prop = RNA_def_property(srna, "default_value", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "value", 1);
+ RNA_def_property_ui_text(prop, "Default Value", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+ break;
+ case SOCK_VECTOR:
+ RNA_def_struct_sdna_from(srna, "bNodeSocketValueVector", "default_value");
+
+ prop = RNA_def_property(srna, "subtype", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "subtype");
+ RNA_def_property_enum_items(prop, subtype_items);
+ RNA_def_property_ui_text(prop, "Subtype", "Subtype defining the socket value details");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+
+ prop = RNA_def_property(srna, "default_value", PROP_FLOAT, propsubtype);
+ RNA_def_property_float_sdna(prop, NULL, "value");
+ RNA_def_property_float_funcs(prop, NULL, NULL, "rna_NodeSocketVector_range");
+ RNA_def_property_ui_text(prop, "Default Value", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+ break;
+ case SOCK_RGBA:
+ RNA_def_struct_sdna_from(srna, "bNodeSocketValueRGBA", "default_value");
+
+ prop = RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_COLOR);
+ RNA_def_property_float_sdna(prop, NULL, "value");
+ RNA_def_property_ui_text(prop, "Default Value", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_NodeSocket_update");
+ break;
+ }
}
static void rna_def_node(BlenderRNA *brna)
@@ -2625,6 +2784,11 @@ static void rna_def_node(BlenderRNA *brna)
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Node_name_set");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ prop = RNA_def_property(srna, "label", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "label");
+ RNA_def_property_ui_text(prop, "Label", "Optional custom node label");
+ RNA_def_property_update(prop, NC_NODE, "rna_Node_update");
+
prop = RNA_def_property(srna, "inputs", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "inputs", NULL);
RNA_def_property_struct_type(prop, "NodeSocket");
@@ -2634,18 +2798,19 @@ static void rna_def_node(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "outputs", NULL);
RNA_def_property_struct_type(prop, "NodeSocket");
RNA_def_property_ui_text(prop, "Outputs", "");
-
- prop = RNA_def_property(srna, "label", PROP_STRING, PROP_NONE);
- RNA_def_property_string_sdna(prop, NULL, "label");
- RNA_def_property_ui_text(prop, "Label", "Optional custom node label");
- RNA_def_property_update(prop, NC_NODE, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "parent");
+ RNA_def_property_struct_type(prop, "Node");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Parent", "Parent this node is attached to");
}
static void rna_def_node_link(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-
+
srna = RNA_def_struct(brna, "NodeLink", NULL);
RNA_def_struct_ui_text(srna, "NodeLink", "Link between nodes in a node tree");
RNA_def_struct_sdna(srna, "bNodeLink");
@@ -2684,22 +2849,22 @@ static void rna_def_group_sockets_api(BlenderRNA *brna, PropertyRNA *cprop, int
RNA_def_struct_ui_text(srna, "Group Sockets", "Collection of group sockets");
func= RNA_def_function(srna, "new", (in_out==SOCK_IN ? "rna_NodeTree_input_new" : "rna_NodeTree_output_new"));
- RNA_def_function_ui_description(func, "Add a socket to the group tree.");
+ RNA_def_function_ui_description(func, "Add a socket to the group tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_string(func, "name", "Socket", 32, "Name", "Name of the socket");
- RNA_def_enum(func, "type", node_socket_type_items, SOCK_VALUE, "Type", "Type of socket");
+ RNA_def_enum(func, "type", node_socket_type_items, SOCK_FLOAT, "Type", "Type of socket");
/* return value */
- parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket.");
+ parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "expose", (in_out==SOCK_IN ? "rna_NodeTree_input_expose" : "rna_NodeTree_output_expose"));
- RNA_def_function_ui_description(func, "Expose an internal socket in the group tree.");
+ RNA_def_function_ui_description(func, "Expose an internal socket in the group tree");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_pointer(func, "sock", "NodeSocket", "Socket", "Internal node socket to expose");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "add_link", TRUE, "Add Link", "If TRUE, adds a link to the internal socket");
/* return value */
- parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket.");
+ parm= RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
RNA_def_function_return(func, parm);
}
@@ -2708,12 +2873,6 @@ static void rna_def_nodetree(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem nodetree_type_items[] = {
- {NTREE_SHADER, "SHADER", 0, "Shader", ""},
- {NTREE_COMPOSIT, "COMPOSITE", 0, "Composite", ""},
- {NTREE_TEXTURE, "TEXTURE", 0, "Texture", ""},
- {0, NULL, 0, NULL, NULL}};
-
srna = RNA_def_struct(brna, "NodeTree", "ID");
RNA_def_struct_ui_text(srna, "Node Tree", "Node tree consisting of linked nodes used for materials, textures and compositing");
RNA_def_struct_sdna(srna, "bNodeTree");
@@ -2826,15 +2985,23 @@ void RNA_def_nodetree(BlenderRNA *brna)
{
init();
rna_def_nodetree(brna);
+
rna_def_node_socket(brna);
- rna_def_node_socket_value(brna);
- rna_def_node_socket_vector(brna);
- rna_def_node_socket_rgba(brna);
+
+ /* Generate RNA definitions for all socket subtypes */
+ #define SUBTYPE(socktype, stypename, id, idname) \
+ rna_def_node_socket_subtype(brna, SOCK_##socktype, PROP_##id, "NodeSocket"#stypename#idname, #idname" "#stypename" Node Socket");
+ NODE_DEFINE_SUBTYPES
+ #undef SUBTYPE
+ rna_def_node_socket_subtype(brna, SOCK_BOOLEAN, 0, "NodeSocketBoolean", "Boolean Node Socket");
+ rna_def_node_socket_subtype(brna, SOCK_RGBA, 0, "NodeSocketRGBA", "RGBA Node Socket");
+
rna_def_node(brna);
rna_def_node_link(brna);
rna_def_shader_node(brna);
rna_def_compositor_node(brna);
rna_def_texture_node(brna);
+
rna_def_composite_nodetree(brna);
rna_def_shader_nodetree(brna);
rna_def_texture_nodetree(brna);
@@ -2843,10 +3010,14 @@ void RNA_def_nodetree(BlenderRNA *brna)
#include "rna_nodetree_types.h"
- #undef DefNode
-
define_specific_node(brna, NODE_GROUP, def_group);
+ define_specific_node(brna, NODE_FORLOOP, def_forloop);
+ define_specific_node(brna, NODE_WHILELOOP, def_whileloop);
+ define_specific_node(brna, NODE_FRAME, def_frame);
}
+/* clean up macro definition */
+#undef NODE_DEFINE_SUBTYPES
+
#endif
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index d48df85697a..a624d1d6403 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -26,7 +26,12 @@
* \ingroup RNA
*/
-
+
+/* Empty definitions for undefined macros to avoid warnings */
+#ifndef DefNode
+#define DefNode(Category, ID, DefFunc, EnumName, StructName, UIName, UIDesc)
+#endif
+
/* Tree type Node ID RNA def function Enum name Struct name UI Name UI Description */
DefNode( ShaderNode, SH_NODE_OUTPUT, 0, "OUTPUT", Output, "Output", "" )
DefNode( ShaderNode, SH_NODE_MATERIAL, def_sh_material, "MATERIAL", Material, "Material", "" )
@@ -138,3 +143,6 @@ DefNode( TextureNode, TEX_NODE_DECOMPOSE, 0, "DECOM
DefNode( TextureNode, TEX_NODE_VALTONOR, 0, "VALTONOR", ValToNor, "Val to Nor", "" )
DefNode( TextureNode, TEX_NODE_SCALE, 0, "SCALE", Scale, "Scale", "" )
+
+/* undefine macros */
+#undef DefNode
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 4e2be7682f8..720fea682ce 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -132,6 +132,7 @@ EnumPropertyItem object_type_curve_items[] = {
#include "DNA_key_types.h"
#include "DNA_constraint_types.h"
#include "DNA_lattice_types.h"
+#include "DNA_node_types.h"
#include "BKE_armature.h"
#include "BKE_bullet.h"
@@ -465,7 +466,7 @@ void rna_VertexGroup_name_set(PointerRNA *ptr, const char *value)
{
Object *ob= (Object *)ptr->id.data;
bDeformGroup *dg= (bDeformGroup *)ptr->data;
- BLI_strncpy(dg->name, value, sizeof(dg->name));
+ BLI_strncpy_utf8(dg->name, value, sizeof(dg->name));
defgroup_unique_name(dg, ob);
}
@@ -511,7 +512,7 @@ void rna_object_vgroup_name_index_get(PointerRNA *ptr, char *value, int index)
dg= BLI_findlink(&ob->defbase, index-1);
if(dg) BLI_strncpy(value, dg->name, sizeof(dg->name));
- else BLI_strncpy(value, "", sizeof(dg->name));
+ else value[0]= '\0';
}
int rna_object_vgroup_name_index_length(PointerRNA *ptr, int index)
@@ -534,7 +535,7 @@ void rna_object_vgroup_name_set(PointerRNA *ptr, const char *value, char *result
Object *ob= (Object*)ptr->id.data;
bDeformGroup *dg= defgroup_find_name(ob, value);
if(dg) {
- BLI_strncpy(result, value, maxlen);
+ BLI_strncpy(result, value, maxlen); /* no need for BLI_strncpy_utf8, since this matches an existing group */
return;
}
@@ -561,7 +562,7 @@ void rna_object_uvlayer_name_set(PointerRNA *ptr, const char *value, char *resul
}
}
- BLI_strncpy(result, "", maxlen);
+ result[0]= '\0';
}
void rna_object_vcollayer_name_set(PointerRNA *ptr, const char *value, char *result, int maxlen)
@@ -584,7 +585,7 @@ void rna_object_vcollayer_name_set(PointerRNA *ptr, const char *value, char *res
}
}
- BLI_strncpy(result, "", maxlen);
+ result[0]= '\0';
}
static int rna_Object_active_material_index_get(PointerRNA *ptr)
@@ -835,7 +836,7 @@ static void rna_MaterialSlot_name_get(PointerRNA *ptr, char *str)
if(ma)
strcpy(str, ma->id.name+2);
else
- strcpy(str, "");
+ str[0]= '\0';
}
static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
@@ -857,6 +858,8 @@ static int rna_GameObjectSettings_physics_type_get(PointerRNA *ptr)
if (!(ob->gameflag & OB_COLLISION)) {
if (ob->gameflag & OB_OCCLUDER) {
ob->body_type = OB_BODY_TYPE_OCCLUDER;
+ } else if (ob->gameflag & OB_NAVMESH){
+ ob->body_type = OB_BODY_TYPE_NAVMESH;
} else {
ob->body_type = OB_BODY_TYPE_NO_COLLISION;
}
@@ -886,31 +889,35 @@ 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->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;
- ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC);
+ ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC|OB_NAVMESH);
+ break;
+ case OB_BODY_TYPE_NAVMESH:
+ ob->gameflag |= OB_NAVMESH;
+ ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC|OB_OCCLUDER);
break;
case OB_BODY_TYPE_NO_COLLISION:
- ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_OCCLUDER|OB_DYNAMIC);
+ ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_OCCLUDER|OB_DYNAMIC|OB_NAVMESH);
break;
case OB_BODY_TYPE_STATIC:
ob->gameflag |= OB_COLLISION;
- ob->gameflag &= ~(OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
+ ob->gameflag &= ~(OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
break;
case OB_BODY_TYPE_DYNAMIC:
ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_ACTOR;
- ob->gameflag &= ~(OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
+ ob->gameflag &= ~(OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
break;
case OB_BODY_TYPE_RIGID:
ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_RIGID_BODY|OB_ACTOR;
- ob->gameflag &= ~(OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
+ ob->gameflag &= ~(OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
break;
default:
case OB_BODY_TYPE_SOFT:
ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_SOFT_BODY|OB_ACTOR;
- ob->gameflag &= ~(OB_RIGID_BODY|OB_OCCLUDER|OB_SENSOR);
+ ob->gameflag &= ~(OB_RIGID_BODY|OB_OCCLUDER|OB_SENSOR|OB_NAVMESH);
/* assume triangle mesh, if no bounds chosen for soft body */
if ((ob->gameflag & OB_BOUNDS) && (ob->boundtype<OB_BOUND_POLYH))
@@ -1116,7 +1123,7 @@ static bConstraint *rna_Object_constraints_new(Object *object, int type)
static void rna_Object_constraints_remove(Object *object, ReportList *reports, bConstraint *con)
{
if(BLI_findindex(&object->constraints, con) == -1) {
- BKE_reportf(reports, RPT_ERROR, "Constraint '%s' not found in object '%s'.", con->name, object->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Constraint '%s' not found in object '%s'", con->name, object->id.name+2);
return;
}
@@ -1170,7 +1177,7 @@ static void rna_VertexGroup_vertex_add(ID *id, bDeformGroup *def, ReportList *re
Object *ob = (Object *)id;
if(ED_vgroup_object_is_edit_mode(ob)) {
- BKE_reportf(reports, RPT_ERROR, "VertexGroup.add(): Can't be called while object is in edit mode.");
+ BKE_reportf(reports, RPT_ERROR, "VertexGroup.add(): Can't be called while object is in edit mode");
return;
}
@@ -1185,7 +1192,7 @@ static void rna_VertexGroup_vertex_remove(ID *id, bDeformGroup *dg, ReportList *
Object *ob = (Object *)id;
if(ED_vgroup_object_is_edit_mode(ob)) {
- BKE_reportf(reports, RPT_ERROR, "VertexGroup.remove(): Can't be called while object is in edit mode.");
+ BKE_reportf(reports, RPT_ERROR, "VertexGroup.remove(): Can't be called while object is in edit mode");
return;
}
@@ -1258,6 +1265,11 @@ static void rna_def_vertex_group(BlenderRNA *brna)
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_VertexGroup_name_set");
RNA_def_property_update(prop, NC_GEOM|ND_DATA|NA_RENAME, "rna_Object_internal_update_data"); /* update data because modifiers may use [#24761] */
+
+ prop= RNA_def_property(srna, "lock_weight", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_ui_text(prop, "", "Maintain the relative weights for the group");
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", 0);
+ RNA_def_property_update(prop, NC_GEOM|ND_DATA|NA_RENAME, "rna_Object_internal_update_data"); /* update data because modifiers may use [#24761] */
prop= RNA_def_property(srna, "index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1265,29 +1277,29 @@ static void rna_def_vertex_group(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Index", "Index number of the vertex group");
func= RNA_def_function(srna, "add", "rna_VertexGroup_vertex_add");
- RNA_def_function_ui_description(func, "Add vertices to the group.");
+ RNA_def_function_ui_description(func, "Add vertices to the group");
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID);
/* TODO, see how array size of 0 works, this shouldnt be used */
- prop= RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "Index List.", 0, 0);
+ prop= RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "Index List", 0, 0);
RNA_def_property_flag(prop, PROP_DYNAMIC|PROP_REQUIRED);
- prop= RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight.", 0.0f, 1.0f);
+ prop= RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight", 0.0f, 1.0f);
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_enum(func, "type", assign_mode_items, 0, "", "Vertex assign mode.");
+ prop= RNA_def_enum(func, "type", assign_mode_items, 0, "", "Vertex assign mode");
RNA_def_property_flag(prop, PROP_REQUIRED);
func= RNA_def_function(srna, "remove", "rna_VertexGroup_vertex_remove");
- RNA_def_function_ui_description(func, "Remove a vertex from the group.");
+ RNA_def_function_ui_description(func, "Remove a vertex from the group");
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID);
/* TODO, see how array size of 0 works, this shouldnt be used */
- prop= RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "Index List.", 0, 0);
+ prop= RNA_def_int_array(func, "index", 1, NULL, 0, 0, "", "Index List", 0, 0);
RNA_def_property_flag(prop, PROP_DYNAMIC|PROP_REQUIRED);
func= RNA_def_function(srna, "weight", "rna_VertexGroup_weight");
- RNA_def_function_ui_description(func, "Get a vertex weight from the group.");
+ RNA_def_function_ui_description(func, "Get a vertex weight from the group");
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID);
- prop=RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "The index of the vertex.", 0, INT_MAX);
+ prop=RNA_def_int(func, "index", 0, 0, INT_MAX, "Index", "The index of the vertex", 0, INT_MAX);
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight.", 0.0f, 1.0f);
+ prop= RNA_def_float(func, "weight", 0, 0.0f, 1.0f, "", "Vertex weight", 0.0f, 1.0f);
RNA_def_function_return(func, prop);
}
@@ -1342,6 +1354,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
{OB_BODY_TYPE_SOFT, "SOFT_BODY", 0, "Soft Body", "Soft body"},
{OB_BODY_TYPE_OCCLUDER, "OCCLUDE", 0, "Occlude", "Occluder for optimizing scene rendering"},
{OB_BODY_TYPE_SENSOR, "SENSOR", 0, "Sensor", "Collision Sensor, detects static and dynamic objects but not the other collision sensor objects"},
+ {OB_BODY_TYPE_NAVMESH, "NAVMESH", 0, "Navigation Mesh", "Navigation mesh"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "GameObjectSettings", NULL);
@@ -1511,6 +1524,15 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "bsoft");
RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for Bullet soft body simulation");
+ prop= RNA_def_property(srna, "create_obstacle", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_HASOBSTACLE);
+ RNA_def_property_ui_text(prop, "Create obstacle", "Create representation for obstacle simulation");
+
+ prop= RNA_def_property(srna, "obstacle_radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
+ RNA_def_property_float_sdna(prop, NULL, "obstacleRad");
+ RNA_def_property_range(prop, 0.0, 1000.0);
+ RNA_def_property_ui_text(prop, "Obstacle Radius", "Radius of object representation in obstacle simulation");
+
/* state */
prop= RNA_def_property(srna, "states_visible", PROP_BOOLEAN, PROP_LAYER_MEMBER);
@@ -1571,17 +1593,17 @@ static void rna_def_object_constraints(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "new", "rna_Object_constraints_new");
RNA_def_function_ui_description(func, "Add a new constraint to this object");
/* object to add */
- parm= RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add.");
+ parm= RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint.");
+ parm= RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Object_constraints_remove");
- RNA_def_function_ui_description(func, "Remove a constraint from this object.");
+ RNA_def_function_ui_description(func, "Remove a constraint from this object");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* constraint to remove */
- parm= RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint.");
+ parm= RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -1614,22 +1636,22 @@ static void rna_def_object_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
/* add target */
func= RNA_def_function(srna, "new", "rna_Object_modifier_new");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Add a new modifier.");
- parm= RNA_def_string(func, "name", "Name", 0, "", "New name for the bone.");
+ RNA_def_function_ui_description(func, "Add a new modifier");
+ parm= RNA_def_string(func, "name", "Name", 0, "", "New name for the bone");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* modifier to add */
- parm= RNA_def_enum(func, "type", modifier_type_items, 1, "", "Modifier type to add.");
+ parm= RNA_def_enum(func, "type", modifier_type_items, 1, "", "Modifier type to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return type */
- parm= RNA_def_pointer(func, "modifier", "Modifier", "", "Newly created modifier.");
+ parm= RNA_def_pointer(func, "modifier", "Modifier", "", "Newly created modifier");
RNA_def_function_return(func, parm);
/* remove target */
func= RNA_def_function(srna, "remove", "rna_Object_modifier_remove");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- RNA_def_function_ui_description(func, "Remove an existing modifier from the object.");
+ RNA_def_function_ui_description(func, "Remove an existing modifier from the object");
/* target to remove*/
- parm= RNA_def_pointer(func, "modifier", "Modifier", "", "Modifier to remove.");
+ parm= RNA_def_pointer(func, "modifier", "Modifier", "", "Modifier to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -1692,14 +1714,14 @@ static void rna_def_object_vertex_groups(BlenderRNA *brna, PropertyRNA *cprop)
/* vertex groups */ // add_vertex_group
func= RNA_def_function(srna, "new", "rna_Object_vgroup_new");
- RNA_def_function_ui_description(func, "Add vertex group to object.");
- RNA_def_string(func, "name", "Group", 0, "", "Vertex group name."); /* optional */
- parm= RNA_def_pointer(func, "group", "VertexGroup", "", "New vertex group.");
+ RNA_def_function_ui_description(func, "Add vertex group to object");
+ RNA_def_string(func, "name", "Group", 0, "", "Vertex group name"); /* optional */
+ parm= RNA_def_pointer(func, "group", "VertexGroup", "", "New vertex group");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_Object_vgroup_remove");
- RNA_def_function_ui_description(func, "Delete vertex group from object.");
- parm= RNA_def_pointer(func, "group", "VertexGroup", "", "Vertex group to remove.");
+ RNA_def_function_ui_description(func, "Delete vertex group from object");
+ parm= RNA_def_pointer(func, "group", "VertexGroup", "", "Vertex group to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -1819,7 +1841,8 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_multi_array(prop, 2, boundbox_dimsize);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_Object_boundbox_get", NULL, NULL);
- RNA_def_property_ui_text(prop, "Bound Box", "Objects bound box in object-space coordinates, all values are -1.0 when not available.");
+ RNA_def_property_ui_text(prop, "Bound Box",
+ "Objects bound box in object-space coordinates, all values are -1.0 when not available");
/* parent */
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
@@ -2024,7 +2047,9 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Input Matrix", "Matrix access to location, rotation and scale (including deltas), before constraints and parenting are applied.");
+ RNA_def_property_ui_text(prop, "Input Matrix",
+ "Matrix access to location, rotation and scale (including deltas), "
+ "before constraints and parenting are applied");
RNA_def_property_float_funcs(prop, "rna_Object_matrix_basis_get", "rna_Object_matrix_basis_set", NULL);
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
@@ -2035,18 +2060,19 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Matrix", "Inverse of object's parent matrix at time of parenting");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_internal_update");
- /* collections */
+ /* modifiers */
+ prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Modifier");
+ RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the object");
+ rna_def_object_modifiers(brna, prop);
+
+ /* constraints */
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
RNA_def_property_ui_text(prop, "Constraints", "Constraints affecting the transformation of the object");
// RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, 0, "constraints__add", "constraints__remove");
rna_def_object_constraints(brna, prop);
- prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_struct_type(prop, "Modifier");
- RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting the geometric data of the object");
- rna_def_object_modifiers(brna, prop);
-
/* game engine */
prop= RNA_def_property(srna, "game", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index d48f1c93da8..84c3d2fd68b 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -289,13 +289,13 @@ static void dupli_render_particle_set(Scene *scene, Object *ob, int level, int e
static void rna_Object_create_duplilist(Object *ob, ReportList *reports, Scene *sce)
{
if (!(ob->transflag & OB_DUPLI)) {
- BKE_report(reports, RPT_ERROR, "Object does not have duplis.");
+ BKE_report(reports, RPT_ERROR, "Object does not have duplis");
return;
}
/* free duplilist if a user forgets to */
if (ob->duplilist) {
- BKE_reportf(reports, RPT_WARNING, "Object.dupli_list has not been freed.");
+ BKE_reportf(reports, RPT_WARNING, "Object.dupli_list has not been freed");
free_object_duplilist(ob->duplilist);
ob->duplilist= NULL;
@@ -330,7 +330,7 @@ static PointerRNA rna_Object_shape_key_add(Object *ob, bContext *C, ReportList *
return keyptr;
}
else {
- BKE_reportf(reports, RPT_ERROR, "Object \"%s\"does not support shapes.", ob->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Object \"%s\"does not support shapes", ob->id.name+2);
return PointerRNA_NULL;
}
}
@@ -344,19 +344,19 @@ int rna_Object_is_visible(Object *ob, Scene *sce)
static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int *indices, int totindex, float weight, int assignmode)
{
if (ob->type != OB_MESH) {
- BKE_report(reports, RPT_ERROR, "Object should be of MESH type.");
+ BKE_report(reports, RPT_ERROR, "Object should be of MESH type");
return;
}
Mesh *me = (Mesh*)ob->data;
int group_index = defgroup_find_index(ob, group);
if (group_index == -1) {
- BKE_report(reports, RPT_ERROR, "No deform groups assigned to mesh.");
+ BKE_report(reports, RPT_ERROR, "No deform groups assigned to mesh");
return;
}
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;
}
@@ -367,7 +367,7 @@ static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int
// loop list adding verts to group
for (i= 0; i < totindex; i++) {
if(i < 0 || i >= me->totvert) {
- BKE_report(reports, RPT_ERROR, "Bad vertex index in list.");
+ BKE_report(reports, RPT_ERROR, "Bad vertex index in list");
return;
}
@@ -381,7 +381,7 @@ void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], fl
BVHTreeFromMesh treeData= {NULL};
if(ob->derivedFinal==NULL) {
- BKE_reportf(reports, RPT_ERROR, "object \"%s\" has no mesh data to be used for ray casting.", ob->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "object \"%s\" has no mesh data to be used for ray casting", ob->id.name+2);
return;
}
@@ -389,7 +389,7 @@ void rna_Object_ray_cast(Object *ob, ReportList *reports, float ray_start[3], fl
bvhtree_from_mesh_faces(&treeData, ob->derivedFinal, 0.0f, 4, 6);
if(treeData.tree==NULL) {
- BKE_reportf(reports, RPT_ERROR, "object \"%s\" could not create internal data for ray casting.", ob->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "object \"%s\" could not create internal data for ray casting", ob->id.name+2);
return;
}
else {
@@ -420,7 +420,7 @@ void rna_Object_closest_point_on_mesh(Object *ob, ReportList *reports, float poi
BVHTreeFromMesh treeData= {NULL};
if(ob->derivedFinal==NULL) {
- BKE_reportf(reports, RPT_ERROR, "object \"%s\" has no mesh data to be used for finding nearest point.", ob->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "object \"%s\" has no mesh data to be used for finding nearest point", ob->id.name+2);
return;
}
@@ -477,46 +477,48 @@ void RNA_api_object(StructRNA *srna)
/* mesh */
func= RNA_def_function(srna, "to_mesh", "rna_Object_to_mesh");
- RNA_def_function_ui_description(func, "Create a Mesh datablock with modifiers applied.");
+ RNA_def_function_ui_description(func, "Create a Mesh datablock with modifiers applied");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers.");
+ parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate modifiers");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers.");
+ parm= RNA_def_boolean(func, "apply_modifiers", 0, "", "Apply modifiers");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply.");
+ parm= RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh created from object, remove it if it is only used for export.");
+ parm= RNA_def_pointer(func, "mesh", "Mesh", "", "Mesh created from object, remove it if it is only used for export");
RNA_def_function_return(func, parm);
/* duplis */
func= RNA_def_function(srna, "dupli_list_create", "rna_Object_create_duplilist");
- RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to be freed manually with free_dupli_list to restore the objects real matrix and layers.");
- parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis.");
+ RNA_def_function_ui_description(func, "Create a list of dupli objects for this object, needs to "
+ "be freed manually with free_dupli_list to restore the "
+ "objects real matrix and layers");
+ parm= RNA_def_pointer(func, "scene", "Scene", "", "Scene within which to evaluate duplis");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
RNA_def_function_flag(func, FUNC_USE_REPORTS);
func= RNA_def_function(srna, "dupli_list_clear", "rna_Object_free_duplilist");
- RNA_def_function_ui_description(func, "Free the list of dupli objects.");
+ RNA_def_function_ui_description(func, "Free the list of dupli objects");
/* Armature */
func= RNA_def_function(srna, "find_armature", "modifiers_isDeformedByArmature");
- RNA_def_function_ui_description(func, "Find armature influencing this object as a parent or via a modifier.");
- parm= RNA_def_pointer(func, "ob_arm", "Object", "", "Armature object influencing this object or NULL.");
+ RNA_def_function_ui_description(func, "Find armature influencing this object as a parent or via a modifier");
+ parm= RNA_def_pointer(func, "ob_arm", "Object", "", "Armature object influencing this object or NULL");
RNA_def_function_return(func, parm);
/* Shape key */
func= RNA_def_function(srna, "shape_key_add", "rna_Object_shape_key_add");
- RNA_def_function_ui_description(func, "Add shape key to an object.");
+ RNA_def_function_ui_description(func, "Add shape key to an object");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- RNA_def_string(func, "name", "Key", 0, "", "Unique name for the new keylock."); /* optional */
- RNA_def_boolean(func, "from_mix", 1, "", "Create new shape from existing mix of shapes.");
- parm= RNA_def_pointer(func, "key", "ShapeKey", "", "New shape keyblock.");
+ RNA_def_string(func, "name", "Key", 0, "", "Unique name for the new keylock"); /* optional */
+ RNA_def_boolean(func, "from_mix", 1, "", "Create new shape from existing mix of shapes");
+ parm= RNA_def_pointer(func, "key", "ShapeKey", "", "New shape keyblock");
RNA_def_property_flag(parm, PROP_RNAPTR);
RNA_def_function_return(func, parm);
/* Ray Cast */
func= RNA_def_function(srna, "ray_cast", "rna_Object_ray_cast");
- RNA_def_function_ui_description(func, "Cast a ray onto in object space.");
+ RNA_def_function_ui_description(func, "Cast a ray onto in object space");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* ray start and end */
@@ -533,12 +535,12 @@ void RNA_api_object(StructRNA *srna)
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no intersection is found.", 0, 0);
+ parm= RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no intersection is found", 0, 0);
RNA_def_function_output(func, parm);
/* Nearest Point */
func= RNA_def_function(srna, "closest_point_on_mesh", "rna_Object_closest_point_on_mesh");
- RNA_def_function_ui_description(func, "Find the nearest point on the object.");
+ RNA_def_function_ui_description(func, "Find the nearest point on the object");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* location of point for test and max distance */
@@ -555,25 +557,25 @@ void RNA_api_object(StructRNA *srna)
RNA_def_property_flag(parm, PROP_THICK_WRAP);
RNA_def_function_output(func, parm);
- parm= RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no closest point is found.", 0, 0);
+ parm= RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when no closest point is found", 0, 0);
RNA_def_function_output(func, parm);
/* View */
func= RNA_def_function(srna, "is_visible", "rna_Object_is_visible");
- RNA_def_function_ui_description(func, "Determine if object is visible in a given scene.");
+ RNA_def_function_ui_description(func, "Determine if object is visible in a given scene");
parm= RNA_def_pointer(func, "scene", "Scene", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_boolean(func, "result", 0, "", "Object visibility.");
+ parm= RNA_def_boolean(func, "result", 0, "", "Object visibility");
RNA_def_function_return(func, parm);
/* utility function for checking if the object is modified */
func= RNA_def_function(srna, "is_modified", "rna_Object_is_modified");
- RNA_def_function_ui_description(func, "Determine if this object is modified from the base mesh data.");
+ RNA_def_function_ui_description(func, "Determine if this object is modified 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.");
+ 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.");
+ parm= RNA_def_boolean(func, "result", 0, "", "Object visibility");
RNA_def_function_return(func, parm);
}
@@ -584,7 +586,7 @@ void RNA_api_object_base(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "layers_from_view", "rna_ObjectBase_layers_from_view");
- RNA_def_function_ui_description(func, "Sets the object layers from a 3D View (use when adding an object in local view).");
+ RNA_def_function_ui_description(func, "Sets the object layers from a 3D View (use when adding an object in local view)");
parm= RNA_def_pointer(func, "view", "SpaceView3D", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 39c08e0385a..9e75fc3262d 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -839,11 +839,12 @@ static void rna_def_pointcache(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_library_path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PTCACHE_IGNORE_LIBPATH);
- RNA_def_property_ui_text(prop, "Library Path", "Use this files path when library linked into another file.");
+ RNA_def_property_ui_text(prop, "Library Path", "Use this files path when library linked into another file");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
prop= RNA_def_property(srna, "point_caches", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", "rna_iterator_listbase_next",
+ "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_ui_text(prop, "Point Cache List", "Point cache list");
rna_def_ptcache_point_caches(brna, prop);
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index ba91fc3536b..77fa975761f 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -51,34 +51,34 @@
#include "WM_types.h"
#include "WM_api.h"
-static EnumPropertyItem part_from_items[] = {
+EnumPropertyItem part_from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem part_reactor_from_items[] = {
+EnumPropertyItem part_reactor_from_items[] = {
{PART_FROM_VERT, "VERT", 0, "Verts", ""},
{PART_FROM_FACE, "FACE", 0, "Faces", ""},
{PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem part_dist_items[] = {
+EnumPropertyItem part_dist_items[] = {
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
{PART_DISTR_GRID, "GRID", 0, "Grid", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem part_hair_dist_items[] = {
+EnumPropertyItem part_hair_dist_items[] = {
{PART_DISTR_JIT, "JIT", 0, "Jittered", ""},
{PART_DISTR_RAND, "RAND", 0, "Random", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem part_draw_as_items[] = {
+EnumPropertyItem part_draw_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
{PART_DRAW_DOT, "DOT", 0, "Point", ""},
@@ -88,14 +88,14 @@ static EnumPropertyItem part_draw_as_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem part_hair_draw_as_items[] = {
+EnumPropertyItem part_hair_draw_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_REND, "RENDER", 0, "Rendered", ""},
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem part_ren_as_items[] = {
+EnumPropertyItem part_ren_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_HALO, "HALO", 0, "Halo", ""},
{PART_DRAW_LINE, "LINE", 0, "Line", ""},
@@ -106,7 +106,7 @@ static EnumPropertyItem part_ren_as_items[] = {
{0, NULL, 0, NULL, NULL}
};
-static EnumPropertyItem part_hair_ren_as_items[] = {
+EnumPropertyItem part_hair_ren_as_items[] = {
{PART_DRAW_NOT, "NONE", 0, "None", ""},
{PART_DRAW_PATH, "PATH", 0, "Path", ""},
{PART_DRAW_OB, "OBJECT", 0, "Object", ""},
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 0dd8218d1b9..338073fde00 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -222,7 +222,7 @@ static void rna_PoseChannel_name_set(PointerRNA *ptr, const char *value)
char oldname[sizeof(pchan->name)], newname[sizeof(pchan->name)];
/* need to be on the stack */
- BLI_strncpy(newname, value, sizeof(pchan->name));
+ BLI_strncpy_utf8(newname, value, sizeof(pchan->name));
BLI_strncpy(oldname, pchan->name, sizeof(pchan->name));
ED_armature_bone_rename(ob->data, oldname, newname);
@@ -411,7 +411,7 @@ static void rna_pose_bgroup_name_index_get(PointerRNA *ptr, char *value, int ind
grp= BLI_findlink(&pose->agroups, index-1);
if(grp) BLI_strncpy(value, grp->name, sizeof(grp->name));
- else BLI_strncpy(value, "", sizeof(grp->name)); // XXX if invalid pointer, won't this crash?
+ else value[0]= '\0';
}
static int rna_pose_bgroup_name_index_length(PointerRNA *ptr, int index)
@@ -451,7 +451,7 @@ static void rna_pose_pgroup_name_set(PointerRNA *ptr, const char *value, char *r
}
}
- BLI_strncpy(result, "", maxlen);
+ result[0]= '\0';
}
#endif
@@ -479,7 +479,7 @@ static bConstraint *rna_PoseChannel_constraints_new(bPoseChannel *pchan, int typ
static void rna_PoseChannel_constraints_remove(ID *id, bPoseChannel *pchan, ReportList *reports, bConstraint *con)
{
if(BLI_findindex(&pchan->constraints, con) == -1) {
- BKE_reportf(reports, RPT_ERROR, "Constraint '%s' not found in pose bone '%s'.", con->name, pchan->name);
+ BKE_reportf(reports, RPT_ERROR, "Constraint '%s' not found in pose bone '%s'", con->name, pchan->name);
return;
}
else {
@@ -714,17 +714,17 @@ static void rna_def_pose_channel_constraints(BlenderRNA *brna, PropertyRNA *cpro
func= RNA_def_function(srna, "new", "rna_PoseChannel_constraints_new");
RNA_def_function_ui_description(func, "Add a constraint to this object");
/* return type */
- parm= RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint.");
+ parm= RNA_def_pointer(func, "constraint", "Constraint", "", "New constraint");
RNA_def_function_return(func, parm);
/* constraint to add */
- parm= RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add.");
+ parm= RNA_def_enum(func, "type", constraint_type_items, 1, "", "Constraint type to add");
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "remove", "rna_PoseChannel_constraints_remove");
- RNA_def_function_ui_description(func, "Remove a constraint from this object.");
+ RNA_def_function_ui_description(func, "Remove a constraint from this object");
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_SELF_ID); /* ID needed for refresh */
/* constraint to remove */
- parm= RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint.");
+ parm= RNA_def_pointer(func, "constraint", "Constraint", "", "Removed constraint");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -840,7 +840,8 @@ static void rna_def_pose_channel(BlenderRNA *brna)
/* writable because it touches loc/scale/rot directly */
prop= RNA_def_property(srna, "matrix_basis", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_multi_array(prop, 2, matrix_dimsize);
- RNA_def_property_ui_text(prop, "Basis Matrix", "Provides an alternative access to loc/scale/rotation relative to the parent and own rest bone.");
+ RNA_def_property_ui_text(prop, "Basis Matrix",
+ "Provides an alternative access to loc/scale/rotation relative to the parent and own rest bone");
RNA_def_property_float_funcs(prop, "rna_PoseChannel_matrix_basis_get", "rna_PoseChannel_matrix_basis_set", NULL);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
diff --git a/source/blender/makesrna/intern/rna_pose_api.c b/source/blender/makesrna/intern/rna_pose_api.c
index e326aee212d..451a98e89fc 100644
--- a/source/blender/makesrna/intern/rna_pose_api.c
+++ b/source/blender/makesrna/intern/rna_pose_api.c
@@ -70,8 +70,9 @@ void RNA_api_pose_channel(StructRNA *srna)
FunctionRNA *func;
func= RNA_def_function(srna, "evaluate_envelope", "rna_PoseBone_do_envelope");
- RNA_def_function_ui_description(func, "Calculate bone envelope at given point.");
- parm= RNA_def_float_vector_xyz(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "Point", "Position in 3d space to evaluate", -FLT_MAX, FLT_MAX);
+ RNA_def_function_ui_description(func, "Calculate bone envelope at given point");
+ parm= RNA_def_float_vector_xyz(func, "point", 3, NULL, -FLT_MAX, FLT_MAX, "Point",
+ "Position in 3d space to evaluate", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return value */
parm= RNA_def_float(func, "factor", 0, -FLT_MAX, FLT_MAX, "Factor", "Envelope factor", -FLT_MAX, FLT_MAX);
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 9fd5610a577..e2b886b8d38 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -88,7 +88,7 @@ static void rna_GameProperty_type_set(PointerRNA *ptr, int value)
static void rna_GameProperty_name_set(PointerRNA *ptr, const char *value)
{
bProperty *prop= (bProperty*)(ptr->data);
- BLI_strncpy(prop->name, value, sizeof(prop->name));
+ BLI_strncpy_utf8(prop->name, value, sizeof(prop->name));
unique_property(NULL, prop, 1);
}
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index e3e3296cb70..8c9f8c08a47 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -130,7 +130,8 @@ static StructRNA *rna_RenderEngine_register(Main *bmain, ReportList *reports, vo
return NULL;
if(strlen(identifier) >= sizeof(dummyet.idname)) {
- BKE_reportf(reports, RPT_ERROR, "registering render engine class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyet.idname));
+ BKE_reportf(reports, RPT_ERROR, "registering render engine class: '%s' is too long, maximum length is %d",
+ identifier, (int)sizeof(dummyet.idname));
return NULL;
}
@@ -238,7 +239,7 @@ static void rna_def_render_engine(BlenderRNA *brna)
/* render */
func= RNA_def_function(srna, "render", NULL);
- RNA_def_function_ui_description(func, "Render scene into an image.");
+ RNA_def_function_ui_description(func, "Render scene into an image");
RNA_def_function_flag(func, FUNC_REGISTER);
RNA_def_pointer(func, "scene", "Scene", "", "");
@@ -310,9 +311,10 @@ static void rna_def_render_result(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Render Result", "Result of rendering, including all layers and passes");
func= RNA_def_function(srna, "load_from_file", "RE_result_load_from_file");
- RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file.");
+ RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_string_file_name(func, "filename", "", FILE_MAX, "File Name", "Filename to load into this render tile, must be no smaller than the render result");
+ parm= RNA_def_string_file_name(func, "filename", "", FILE_MAX, "File Name",
+ "Filename to load into this render tile, must be no smaller than the render result");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_define_verify_sdna(0);
@@ -327,7 +329,8 @@ static void rna_def_render_result(BlenderRNA *brna)
parm= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(parm, "RenderLayer");
- RNA_def_property_collection_funcs(parm, "rna_RenderResult_layers_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(parm, "rna_RenderResult_layers_begin", "rna_iterator_listbase_next",
+ "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
RNA_define_verify_sdna(1);
}
@@ -342,12 +345,15 @@ static void rna_def_render_layer(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Render Layer", "");
func= RNA_def_function(srna, "load_from_file", "RE_layer_load_from_file");
- RNA_def_function_ui_description(func, "Copies the pixels of this renderlayer from an image file.");
+ RNA_def_function_ui_description(func, "Copies the pixels of this renderlayer from an image file");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- prop= RNA_def_string(func, "filename", "", 0, "Filename", "Filename to load into this render tile, must be no smaller than the renderlayer");
+ prop= RNA_def_string(func, "filename", "", 0, "Filename",
+ "Filename to load into this render tile, must be no smaller than the renderlayer");
RNA_def_property_flag(prop, PROP_REQUIRED);
- RNA_def_int(func, "x", 0, 0, INT_MAX, "Offset X", "Offset the position to copy from if the image is larger than the render layer", 0, INT_MAX);
- RNA_def_int(func, "y", 0, 0, INT_MAX, "Offset Y", "Offset the position to copy from if the image is larger than the render layer", 0, INT_MAX);
+ RNA_def_int(func, "x", 0, 0, INT_MAX, "Offset X",
+ "Offset the position to copy from if the image is larger than the render layer", 0, INT_MAX);
+ RNA_def_int(func, "y", 0, 0, INT_MAX, "Offset Y",
+ "Offset the position to copy from if the image is larger than the render layer", 0, INT_MAX);
RNA_define_verify_sdna(0);
@@ -355,7 +361,8 @@ static void rna_def_render_layer(BlenderRNA *brna)
prop= RNA_def_property(srna, "passes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "RenderPass");
- RNA_def_property_collection_funcs(prop, "rna_RenderLayer_passes_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_RenderLayer_passes_begin", "rna_iterator_listbase_next",
+ "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_DYNAMIC);
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index e063f8ec85a..7f85a2fa1d7 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -46,6 +46,42 @@ EnumPropertyItem property_type_items[] = {
{PROP_COLLECTION, "COLLECTION", 0, "Collection", ""},
{0, NULL, 0, NULL, NULL}};
+EnumPropertyItem property_subtype_items[] = {
+ {PROP_NONE, "NONE", 0, "None", ""},
+
+ /* strings */
+ {PROP_FILEPATH, "FILEPATH", 0, "File Path", ""},
+ {PROP_DIRPATH, "DIRPATH", 0, "Directory Path", ""},
+ {PROP_FILENAME, "FILENAME", 0, "File Name", ""},
+
+ /* numbers */
+ {PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned", ""},
+ {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""},
+ {PROP_FACTOR, "FACTOR", 0, "Factor", ""},
+ {PROP_ANGLE, "ANGLE", 0, "Angle", ""},
+ {PROP_TIME, "TIME", 0, "Time", ""},
+ {PROP_DISTANCE, "DISTANCE", 0, "Distance", ""},
+
+ /* number arrays */
+ {PROP_COLOR, "COLOR", 0, "Color", ""},
+ {PROP_TRANSLATION, "TRANSLATION", 0, "Translation", ""},
+ {PROP_DIRECTION, "DIRECTION", 0, "Direction", ""},
+ {PROP_VELOCITY, "VELOCITY", 0, "Velocity", ""},
+ {PROP_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""},
+ {PROP_MATRIX, "MATRIX", 0, "Matrix", ""},
+ {PROP_EULER, "EULER", 0, "Euler Angles", ""},
+ {PROP_QUATERNION, "QUATERNION", 0, "Quaternion", ""},
+ {PROP_AXISANGLE, "AXISANGLE", 0, "Axis-Angle", ""},
+ {PROP_XYZ, "XYZ", 0, "XYZ", ""},
+ {PROP_XYZ_LENGTH, "XYZ_LENGTH", 0, "XYZ Length", ""},
+ {PROP_COLOR_GAMMA, "COLOR_GAMMA", 0, "Color", ""},
+ {PROP_COORDS, "COORDS", 0, "Coordinates", ""},
+
+ /* booleans */
+ {PROP_LAYER, "LAYER", 0, "Layer", ""},
+ {PROP_LAYER_MEMBER, "LAYER_MEMBER", 0, "Layer Member", ""},
+ {0, NULL, 0, NULL, NULL}};
+
EnumPropertyItem property_unit_items[] = {
{PROP_UNIT_NONE, "NONE", 0, "None", ""},
{PROP_UNIT_LENGTH, "LENGTH", 0, "Length", ""},
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 3c60a3b4cd7..774e21297da 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -39,6 +39,7 @@
#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_userdef_types.h"
+#include "BLI_math.h"
/* Include for Bake Options */
#include "RE_pipeline.h"
@@ -230,7 +231,7 @@ static Base *rna_Scene_object_link(Scene *scene, bContext *C, ReportList *report
Base *base;
if (object_in_scene(ob, scene)) {
- BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is already in scene \"%s\".", ob->id.name+2, scene->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Object \"%s\" is already in scene \"%s\"", ob->id.name+2, scene->id.name+2);
return NULL;
}
@@ -258,11 +259,11 @@ static void rna_Scene_object_unlink(Scene *scene, ReportList *reports, Object *o
{
Base *base= object_in_scene(ob, scene);
if (!base) {
- BKE_reportf(reports, RPT_ERROR, "Object '%s' is not in this scene '%s'.", ob->id.name+2, scene->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Object '%s' is not in this scene '%s'", ob->id.name+2, scene->id.name+2);
return;
}
if (base==scene->basact && ob->mode != OB_MODE_OBJECT) {
- BKE_reportf(reports, RPT_ERROR, "Object '%s' must be in 'Object Mode' to unlink.", ob->id.name+2);
+ BKE_reportf(reports, RPT_ERROR, "Object '%s' must be in 'Object Mode' to unlink", ob->id.name+2);
return;
}
if(scene->basact==base) {
@@ -439,11 +440,10 @@ static void rna_Scene_preview_range_end_frame_set(PointerRNA *ptr, int value)
data->r.pefra= value;
}
-static void rna_Scene_frame_update(bContext *C, PointerRNA *UNUSED(ptr))
+static void rna_Scene_frame_update(Main *bmain, Scene *UNUSED(current_scene), PointerRNA *ptr)
{
- //Scene *scene= ptr->id.data;
- //ED_update_for_newframe(C);
- sound_seek_scene(C);
+ Scene *scene= (Scene*)ptr->id.data;
+ sound_seek_scene(bmain, scene);
}
static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
@@ -737,7 +737,7 @@ static void rna_RenderSettings_engine_set(PointerRNA *ptr, int value)
RenderEngineType *type= BLI_findlink(&R_engines, value);
if(type)
- BLI_strncpy(rd->engine, type->idname, sizeof(rd->engine));
+ BLI_strncpy_utf8(rd->engine, type->idname, sizeof(rd->engine));
}
static EnumPropertyItem *rna_RenderSettings_engine_itemf(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
@@ -810,7 +810,7 @@ static void rna_SceneRenderLayer_name_set(PointerRNA *ptr, const char *value)
Scene *scene= (Scene*)ptr->id.data;
SceneRenderLayer *rl= (SceneRenderLayer*)ptr->data;
- BLI_strncpy(rl->name, value, sizeof(rl->name));
+ BLI_strncpy_utf8(rl->name, value, sizeof(rl->name));
if(scene->nodetree) {
bNode *node;
@@ -1011,7 +1011,7 @@ static TimeMarker *rna_TimeLine_add(Scene *scene, const char name[])
TimeMarker *marker = MEM_callocN(sizeof(TimeMarker), "TimeMarker");
marker->flag= SELECT;
marker->frame= 1;
- BLI_strncpy(marker->name, name, sizeof(marker->name));
+ BLI_strncpy_utf8(marker->name, name, sizeof(marker->name));
BLI_addtail(&scene->markers, marker);
return marker;
}
@@ -1039,11 +1039,27 @@ static KeyingSet *rna_Scene_keying_set_new(Scene *sce, ReportList *reports, cons
return ks;
}
else {
- BKE_report(reports, RPT_ERROR, "Keying Set could not be added.");
+ BKE_report(reports, RPT_ERROR, "Keying Set could not be added");
return NULL;
}
}
+
+
+/* note: without this, when Multi-Paint is activated/deactivated, the colors
+ * will not change right away when multiple bones are selected, this function
+ * is not for general use and only for the few cases where changing scene
+ * settings and NOT for general purpose updates, possibly this should be
+ * given its own notifier. */
+static void rna_Scene_update_active_object_data(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ Object *ob= OBACT;
+ if(ob) {
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ WM_main_add_notifier(NC_OBJECT|ND_DRAW, &ob->id);
+ }
+}
+
#else
static void rna_def_transform_orientation(BlenderRNA *brna)
@@ -1117,9 +1133,17 @@ static void rna_def_tool_settings(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_auto_normalize", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "auto_normalize", 1);
- RNA_def_property_ui_text(prop, "WPaint Auto-Normalize",
- "Ensure all bone-deforming vertex groups add up to 1.0 while "
- "weight painting");
+ RNA_def_property_ui_text(prop, "WPaint Auto-Normalize",
+ "Ensure all bone-deforming vertex groups add up "
+ "to 1.0 while weight painting");
+ RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
+
+ prop = RNA_def_property(srna, "use_multipaint", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "multipaint", 1);
+ RNA_def_property_ui_text(prop, "WPaint Multi-Paint",
+ "Paint across all selected bones while "
+ "weight painting");
+ RNA_def_property_update(prop, 0, "rna_Scene_update_active_object_data");
prop= RNA_def_property(srna, "vertex_paint", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vpaint");
@@ -1670,6 +1694,96 @@ void rna_def_render_layer_common(StructRNA *srna, int scene)
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
}
+static void rna_def_scene_game_recast_data(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SceneGameRecastData", NULL);
+ RNA_def_struct_sdna(srna, "RecastData");
+ RNA_def_struct_nested(brna, srna, "Scene");
+ RNA_def_struct_ui_text(srna, "Recast Data", "Recast data for a Game datablock");
+
+ prop= RNA_def_property(srna, "cell_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "cellsize");
+ RNA_def_property_ui_range(prop, 0.1, 1, 1, 2);
+ RNA_def_property_ui_text(prop, "Cell Size", "Rasterized cell size");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "cell_height", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "cellheight");
+ RNA_def_property_ui_range(prop, 0.1, 1, 1, 2);
+ RNA_def_property_ui_text(prop, "Cell Height", "Rasterized cell height");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "agent_height", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "agentheight");
+ RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
+ RNA_def_property_ui_text(prop, "Agent Height", "Minimum height where the agent can still walk");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "agent_radius", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "agentradius");
+ RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
+ RNA_def_property_ui_text(prop, "Agent Radius", "Radius of the agent");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "max_climb", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "agentmaxclimb");
+ RNA_def_property_ui_range(prop, 0.1, 5, 1, 2);
+ RNA_def_property_ui_text(prop, "Max Climb", "Maximum height between grid cells the agent can climb");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "max_slope", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "agentmaxslope");
+ RNA_def_property_range(prop, 0, M_PI/2);
+ RNA_def_property_ui_text(prop, "Max Slope", "Maximum walkable slope angle in degrees");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+
+ prop= RNA_def_property(srna, "region_min_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "regionminsize");
+ RNA_def_property_ui_range(prop, 0, 150, 1, 2);
+ RNA_def_property_ui_text(prop, "Min Region Size", "Minimum regions size. Smaller regions will be deleted");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "region_merge_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "regionmergesize");
+ RNA_def_property_ui_range(prop, 0, 150, 1, 2);
+ RNA_def_property_ui_text(prop, "Merged Region Size", "Minimum regions size. Smaller regions will be merged");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "edge_max_len", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "edgemaxlen");
+ RNA_def_property_ui_range(prop, 0, 50, 1, 2);
+ RNA_def_property_ui_text(prop, "Max Edge Length", "Maximum contour edge length");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "edge_max_error", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "edgemaxerror");
+ RNA_def_property_ui_range(prop, 0.1, 3.0, 1, 2);
+ RNA_def_property_ui_text(prop, "Max Edge Error", "Maximum distance error from contour to cells");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "verts_per_poly", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "vertsperpoly");
+ RNA_def_property_ui_range(prop, 3, 12, 1, 0);
+ RNA_def_property_ui_text(prop, "Verts Per Poly", "Max number of vertices per polygon");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "sample_dist", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "detailsampledist");
+ RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2);
+ RNA_def_property_ui_text(prop, "Sample Distance", "Detail mesh sample spacing");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "sample_max_error", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "detailsamplemaxerror");
+ RNA_def_property_ui_range(prop, 0.0, 16.0, 1, 2);
+ RNA_def_property_ui_text(prop, "Max Sample Error", "Detail mesh simplification max sample error");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+}
+
static void rna_def_scene_game_data(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1714,11 +1828,17 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem material_items[] ={
- {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single texture face materials"},
+ {GAME_MAT_TEXFACE, "SINGLETEXTURE", 0, "Singletexture", "Singletexture face materials"},
{GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials"},
{GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders"},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem obstacle_simulation_items[] = {
+ {OBSTSIMULATION_NONE, "NONE", 0, "None", ""},
+ {OBSTSIMULATION_TOI_rays, "RVO_RAYS", 0, "RVO (rays)", ""},
+ {OBSTSIMULATION_TOI_cells, "RVO_CELLS", 0, "RVO (cells)", ""},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "SceneGameData", NULL);
RNA_def_struct_sdna(srna, "GameData");
RNA_def_struct_nested(brna, srna, "Scene");
@@ -1928,7 +2048,9 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
prop= RNA_def_property(srna, "restrict_animation_updates", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_RESTRICT_ANIM_UPDATES);
- RNA_def_property_ui_text(prop, "Restrict Animation Updates", "Restrict the number of animation updates to the animation FPS. This is better for performance, but can cause issues with smooth playback.");
+ RNA_def_property_ui_text(prop, "Restrict Animation Updates",
+ "Restrict the number of animation updates to the animation FPS. This is "
+ "better for performance, but can cause issues with smooth playback");
/* materials */
prop= RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
@@ -1971,6 +2093,33 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering");
RNA_def_property_update(prop, NC_SCENE|NA_EDITED, "rna_Scene_glsl_update");
+
+ /* obstacle simulation */
+ prop= RNA_def_property(srna, "obstacle_simulation", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "obstacleSimulation");
+ RNA_def_property_enum_items(prop, obstacle_simulation_items);
+ RNA_def_property_ui_text(prop, "Obstacle simulation", "Simulation used for obstacle avoidance in the game engine");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "level_height", PROP_FLOAT, PROP_ACCELERATION);
+ RNA_def_property_float_sdna(prop, NULL, "levelHeight");
+ RNA_def_property_range(prop, 0.0f, 200.0f);
+ RNA_def_property_ui_text(prop, "Level height", "Max difference in heights of obstacles to enable their interaction");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "show_obstacle_simulation", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_OBSTACLE_SIMULATION);
+ RNA_def_property_ui_text(prop, "Visualization", "Enable debug visualization for obstacle simulation");
+
+ /* Recast Settings */
+ prop= RNA_def_property(srna, "recast_data", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "recastData");
+ RNA_def_property_struct_type(prop, "SceneGameRecastData");
+ RNA_def_property_ui_text(prop, "Recast Data", "");
+
+ /* Nestled Data */
+ rna_def_scene_game_recast_data(brna);
}
static void rna_def_scene_render_layer(BlenderRNA *brna)
@@ -3073,17 +3222,17 @@ static void rna_def_scene_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Scene Objects", "Collection of scene objects");
func= RNA_def_function(srna, "link", "rna_Scene_object_link");
- RNA_def_function_ui_description(func, "Link object to scene, run scene.update() after.");
+ RNA_def_function_ui_description(func, "Link object to scene, run scene.update() after");
RNA_def_function_flag(func, FUNC_USE_CONTEXT|FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to add to scene.");
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to add to scene");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "base", "ObjectBase", "", "The newly created base.");
+ parm= RNA_def_pointer(func, "base", "ObjectBase", "", "The newly created base");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "unlink", "rna_Scene_object_unlink");
- RNA_def_function_ui_description(func, "Unlink object from scene.");
+ RNA_def_function_ui_description(func, "Unlink object from scene");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene.");
+ parm= RNA_def_pointer(func, "object", "Object", "", "Object to remove from scene");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
@@ -3133,8 +3282,8 @@ static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_struct_ui_text(srna, "Timeline Markers", "Collection of timeline markers");
func= RNA_def_function(srna, "new", "rna_TimeLine_add");
- RNA_def_function_ui_description(func, "Add a keyframe to the curve.");
- parm= RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique).");
+ RNA_def_function_ui_description(func, "Add a keyframe to the curve");
+ parm= RNA_def_string(func, "name", "Marker", 0, "", "New name for the marker (not unique)");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Newly created timeline marker");
@@ -3142,9 +3291,9 @@ static void rna_def_timeline_markers(BlenderRNA *brna, PropertyRNA *cprop)
func= RNA_def_function(srna, "remove", "rna_TimeLine_remove");
- RNA_def_function_ui_description(func, "Remove a timeline marker.");
+ RNA_def_function_ui_description(func, "Remove a timeline marker");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
- parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove.");
+ parm= RNA_def_pointer(func, "marker", "TimelineMarker", "", "Timeline marker to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
@@ -3164,13 +3313,13 @@ static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop)
/* Add Keying Set */
func= RNA_def_function(srna, "new", "rna_Scene_keying_set_new");
- RNA_def_function_ui_description(func, "Add a new Keying Set to Scene.");
+ RNA_def_function_ui_description(func, "Add a new Keying Set to Scene");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
/* name */
RNA_def_string(func, "name", "KeyingSet", 64, "Name", "Name of Keying Set");
/* returns the new KeyingSet */
- parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set.");
+ parm= RNA_def_pointer(func, "keyingset", "KeyingSet", "", "Newly created Keying Set");
RNA_def_function_return(func, parm);
prop= RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
@@ -3298,7 +3447,6 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_current_frame_set", NULL);
RNA_def_property_ui_text(prop, "Current Frame", "Current Frame, to update animation data from python frame_set() instead");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
prop= RNA_def_property(srna, "frame_subframe", PROP_FLOAT, PROP_TIME);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index fd7987c18a2..39efa72e0ce 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -100,22 +100,22 @@ void RNA_api_scene(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "frame_set", "rna_Scene_frame_set");
- RNA_def_function_ui_description(func, "Set scene frame updating all objects immediately.");
- parm= RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set.", MINAFRAME, MAXFRAME);
+ RNA_def_function_ui_description(func, "Set scene frame updating all objects immediately");
+ parm= RNA_def_int(func, "frame", 0, MINAFRAME, MAXFRAME, "", "Frame number to set", MINAFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_float(func, "subframe", 0.0, 0.0, 1.0, "", "Sub-frame time, between 0.0 and 1.0", 0.0, 1.0);
func= RNA_def_function(srna, "update", "rna_Scene_update_tagged");
- RNA_def_function_ui_description(func, "Update data tagged to be updated from previous access to data or operators.");
+ RNA_def_function_ui_description(func, "Update data tagged to be updated from previous access to data or operators");
#ifdef WITH_COLLADA
/* don't remove this, as COLLADA exporting cannot be done through operators in render() callback. */
func= RNA_def_function(srna, "collada_export", "rna_Scene_collada_export");
- RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file.");
- parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements.");
+ RNA_def_string(func, "filepath", "", FILE_MAX, "File Path", "File path to write Collada file");
+ parm= RNA_def_boolean(func, "selected", 0, "Export only selected", "Export only selected elements");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_subtype(parm, PROP_FILEPATH); /* allow non utf8 */
- RNA_def_function_ui_description(func, "Export to collada file.");
+ RNA_def_function_ui_description(func, "Export to collada file");
#endif
}
@@ -126,9 +126,11 @@ void RNA_api_scene_render(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "frame_path", "rna_SceneRender_get_frame_path");
- RNA_def_function_ui_description(func, "Return the absolute path to the filename to be written for a given frame.");
- RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "", "Frame number to use, if unset the current frame will be used.", MINAFRAME, MAXFRAME);
- parm= RNA_def_string_file_path(func, "filepath", "", FILE_MAX, "File Path", "the resulting filepath from the scenes render settings.");
+ RNA_def_function_ui_description(func, "Return the absolute path to the filename to be written for a given frame");
+ RNA_def_int(func, "frame", INT_MIN, INT_MIN, INT_MAX, "",
+ "Frame number to use, if unset the current frame will be used", MINAFRAME, MAXFRAME);
+ parm= RNA_def_string_file_path(func, "filepath", "", FILE_MAX, "File Path",
+ "The resulting filepath from the scenes render settings");
RNA_def_property_flag(parm, PROP_THICK_WRAP); /* needed for string return value */
RNA_def_function_output(func, parm);
}
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index be4adb405e2..686c8dffcd1 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -72,7 +72,8 @@ static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr)
{
bScreen *sc= (bScreen*)ptr->data;
- /* exception: can't set screens inside of area/region handers */
+ /* exception: can't set screens inside of area/region handers, and must
+ use context so notifier gets to the right window */
if(sc->newscene) {
WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, sc->newscene);
sc->newscene= NULL;
@@ -146,7 +147,10 @@ static void rna_def_area(BlenderRNA *brna)
prop= RNA_def_property(srna, "spaces", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "spacedata", NULL);
RNA_def_property_struct_type(prop, "Space");
- RNA_def_property_ui_text(prop, "Spaces", "Spaces contained in this area, the first being the active space. NOTE: Useful for example to restore a previously used 3d view space in a certain area to get the old view orientation.");
+ RNA_def_property_ui_text(prop, "Spaces",
+ "Spaces contained in this area, the first being the active space. "
+ "NOTE: Useful for example to restore a previously used 3d view space "
+ "in a certain area to get the old view orientation");
rna_def_area_spaces(brna, prop);
prop= RNA_def_property(srna, "regions", PROP_COLLECTION, PROP_NONE);
@@ -180,7 +184,7 @@ static void rna_def_area(BlenderRNA *brna)
func= RNA_def_function(srna, "header_text_set", "ED_area_headerprint");
RNA_def_function_ui_description(func, "Set the header text");
- RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text.");
+ RNA_def_string(func, "text", NULL, 0, "Text", "New string for the header, no argument clears the text");
}
static void rna_def_region(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sensor_api.c b/source/blender/makesrna/intern/rna_sensor_api.c
index cfa957bdd9e..7517443f4b7 100644
--- a/source/blender/makesrna/intern/rna_sensor_api.c
+++ b/source/blender/makesrna/intern/rna_sensor_api.c
@@ -61,14 +61,14 @@ void RNA_api_sensor(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "link", "rna_Sensor_link");
- RNA_def_function_ui_description(func, "Link the sensor to a controller.");
- parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to.");
+ RNA_def_function_ui_description(func, "Link the sensor to a controller");
+ parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
func= RNA_def_function(srna, "unlink", "rna_Sensor_unlink");
- RNA_def_function_ui_description(func, "Unlink the sensor from a controller.");
- parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from.");
+ RNA_def_function_ui_description(func, "Unlink the sensor from a controller");
+ parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 627c2274965..86682af189c 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -359,7 +359,7 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
BLI_strncpy(oldname, seq->name+2, sizeof(seq->name)-2);
/* copy the new name into the name slot */
- BLI_strncpy(seq->name+2, value, sizeof(seq->name)-2);
+ BLI_strncpy_utf8(seq->name+2, value, sizeof(seq->name)-2);
/* make sure the name is unique */
seqbase_unique_name_recursive(&scene->ed->seqbase, seq);
@@ -1036,7 +1036,7 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "waveform", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_AUDIO_DRAW_WAVEFORM);
- RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform.");
+ RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
/* strip positioning */
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index fa240fa225a..6019f46a114 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -65,8 +65,9 @@ void RNA_api_sequence_strip(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "getStripElem", "give_stripelem");
- RNA_def_function_ui_description(func, "Return the strip element from a given frame or None.");
- parm= RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame", "The frame to get the strip element from", -MAXFRAME, MAXFRAME);
+ RNA_def_function_ui_description(func, "Return the strip element from a given frame or None");
+ parm= RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame",
+ "The frame to get the strip element from", -MAXFRAME, MAXFRAME);
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_function_return(func, RNA_def_pointer(func, "elem", "SequenceElement", "", "strip element of the current frame"));
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index d439c2551f1..8ea00530c2f 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -121,7 +121,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
static EnumPropertyItem prop_noise_type_items[] = {
{MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""},
-#if FFTW3 == 1
+#ifdef WITH_FFTW3
{MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""},
#endif
/* {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */
@@ -245,7 +245,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "collision_extents", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "border_collisions");
RNA_def_property_enum_items(prop, smoke_domain_colli_items);
- RNA_def_property_ui_text(prop, "Border Collisions", "Selects which domain border will be treated as collision object.");
+ RNA_def_property_ui_text(prop, "Border Collisions", "Selects which domain border will be treated as collision object");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "effector_weights", PROP_POINTER, PROP_NONE);
@@ -255,21 +255,21 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "smooth_emitter", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGH_SMOOTH);
- RNA_def_property_ui_text(prop, "Smooth Emitter", "Smoothens emitted smoke to avoid blockiness.");
+ RNA_def_property_ui_text(prop, "Smooth Emitter", "Smoothens emitted smoke to avoid blockiness");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "time_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "time_scale");
RNA_def_property_range(prop, 0.2, 1.5);
RNA_def_property_ui_range(prop, 0.2, 1.5, 0.02, 5);
- RNA_def_property_ui_text(prop, "Time Scale", "Adjust simulation speed.");
+ RNA_def_property_ui_text(prop, "Time Scale", "Adjust simulation speed");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "vorticity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vorticity");
RNA_def_property_range(prop, 0.01, 4.0);
RNA_def_property_ui_range(prop, 0.01, 4.0, 0.02, 5);
- RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence/rotation in fluid.");
+ RNA_def_property_ui_text(prop, "Vorticity", "Amount of turbulence/rotation in fluid");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
}
@@ -309,7 +309,7 @@ static void rna_def_smoke_flow_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_absolute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_ABSOLUTE);
- RNA_def_property_ui_text(prop, "Absolute Density", "Only allows given density value in emitter area.");
+ RNA_def_property_ui_text(prop, "Absolute Density", "Only allows given density value in emitter area");
prop= RNA_def_property(srna, "initial_velocity", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_FLOW_INITVELOCITY);
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 3a18fb0e7c0..a6c1f400ade 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -96,7 +96,7 @@ static void rna_def_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "mono", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_MONO);
- RNA_def_property_ui_text(prop, "Mono", "If the file contains multiple audio channels they are rendered to a single one.");
+ RNA_def_property_ui_text(prop, "Mono", "If the file contains multiple audio channels they are rendered to a single one");
RNA_def_property_update(prop, 0, "rna_Sound_update");
}
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 884018da868..52103642b85 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -43,11 +43,14 @@
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h"
+#include "DNA_sequence_types.h"
#include "DNA_view3d_types.h"
#include "WM_api.h"
#include "WM_types.h"
+#include "RNA_enum_types.h"
+
EnumPropertyItem space_type_items[] = {
{SPACE_EMPTY, "EMPTY", 0, "Empty", ""},
{SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""},
@@ -119,6 +122,7 @@ EnumPropertyItem viewport_shade_items[] = {
#include "BKE_paint.h"
#include "ED_image.h"
+#include "ED_node.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_sequencer.h"
@@ -805,10 +809,9 @@ static void rna_SpaceDopeSheetEditor_mode_update(Main *UNUSED(bmain), Scene *sce
/* Space Graph Editor */
-static void rna_SpaceGraphEditor_display_mode_update(bContext *C, PointerRNA *UNUSED(ptr))
+static void rna_SpaceGraphEditor_display_mode_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- //SpaceIpo *sipo= (SpaceIpo*)(ptr->data);
- ScrArea *sa= CTX_wm_area(C);
+ ScrArea *sa= rna_area_from_space(ptr);
/* after changing view mode, must force recalculation of F-Curve colors
* which can only be achieved using refresh as opposed to redraw
@@ -822,11 +825,10 @@ static int rna_SpaceGraphEditor_has_ghost_curves_get(PointerRNA *ptr)
return (sipo->ghostCurves.first != NULL);
}
-static void rna_Sequencer_display_mode_update(bContext *C, PointerRNA *ptr)
+static void rna_Sequencer_view_type_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- int view = RNA_enum_get(ptr, "view_type");
-
- ED_sequencer_update_view(C, view);
+ ScrArea *sa= rna_area_from_space(ptr);
+ ED_area_tag_refresh(sa);
}
static float rna_BackgroundImage_opacity_get(PointerRNA *ptr)
@@ -841,6 +843,24 @@ static void rna_BackgroundImage_opacity_set(PointerRNA *ptr, float value)
bgpic->blend = 1.0f - value;
}
+/* Space Node Editor */
+
+static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, PointerRNA value)
+{
+ SpaceNode *snode= (SpaceNode*)ptr->data;
+ bNodeTree *ntree= (bNodeTree*)value.data;
+
+ /* exclude group trees, only trees of the active type */
+ return (ntree->nodetype==0 && ntree->type == snode->treetype);
+}
+
+static void rna_SpaceNodeEditor_node_tree_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ SpaceNode *snode= (SpaceNode*)ptr->data;
+
+ ED_node_tree_update(snode, scene);
+}
+
static EnumPropertyItem *rna_SpaceProperties_texture_context_itemf(bContext *C, PointerRNA *UNUSED(ptr), PropertyRNA *UNUSED(prop), int *free)
{
Scene *scene = CTX_data_scene(C);
@@ -1569,7 +1589,7 @@ static void rna_def_space_image(BlenderRNA *brna)
prop= RNA_def_property(srna, "scopes", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "scopes");
RNA_def_property_struct_type(prop, "Scopes");
- RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize image statistics.");
+ RNA_def_property_ui_text(prop, "Scopes", "Scopes to visualize image statistics");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, "rna_SpaceImageEditor_scopes_update");
prop= RNA_def_property(srna, "use_image_pin", PROP_BOOLEAN, PROP_NONE);
@@ -1689,8 +1709,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "view");
RNA_def_property_enum_items(prop, view_type_items);
RNA_def_property_ui_text(prop, "View Type", "The type of the Sequencer view (sequencer, preview or both)");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
- RNA_def_property_update(prop, 0, "rna_Sequencer_display_mode_update");
+ RNA_def_property_update(prop, 0, "rna_Sequencer_view_type_update");
/* display type, fairly important */
prop= RNA_def_property(srna, "display_mode", PROP_ENUM, PROP_NONE);
@@ -1740,7 +1759,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
prop= RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "chanshown");
RNA_def_property_ui_text(prop, "Display Channel", "The channel number shown in the image preview. 0 is the result of all strips combined");
- RNA_def_property_range(prop, -5, 32); // MAXSEQ --- todo, move from BKE_sequencer.h, allow up to 5 layers up the metastack. Should be dynamic...
+ RNA_def_property_range(prop, -5, MAXSEQ);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "draw_overexposed", PROP_INT, PROP_NONE);
@@ -1987,7 +2006,6 @@ static void rna_def_space_graph(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mode");
RNA_def_property_enum_items(prop, mode_items);
RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed");
- RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, "rna_SpaceGraphEditor_display_mode_update");
/* display */
@@ -2423,12 +2441,6 @@ static void rna_def_space_node(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- static EnumPropertyItem tree_type_items[] = {
- {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes"},
- {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes"},
- {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDERLAYERS, "Compositing", "Compositing nodes"},
- {0, NULL, 0, NULL, NULL}};
-
static EnumPropertyItem texture_type_items[] = {
{SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object"},
{SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World"},
@@ -2447,7 +2459,7 @@ static void rna_def_space_node(BlenderRNA *brna)
prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "treetype");
- RNA_def_property_enum_items(prop, tree_type_items);
+ RNA_def_property_enum_items(prop, nodetree_type_items);
RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, NULL);
@@ -2468,8 +2480,10 @@ static void rna_def_space_node(BlenderRNA *brna)
prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_SpaceNodeEditor_node_tree_poll");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE, "rna_SpaceNodeEditor_node_tree_update");
prop= RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
diff --git a/source/blender/makesrna/intern/rna_speaker.c b/source/blender/makesrna/intern/rna_speaker.c
index 60208de5aa5..34c67335c79 100644
--- a/source/blender/makesrna/intern/rna_speaker.c
+++ b/source/blender/makesrna/intern/rna_speaker.c
@@ -62,13 +62,13 @@ static void rna_def_speaker(BlenderRNA *brna)
prop= RNA_def_property(srna, "muted", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPK_MUTED);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Mute", "Mutes the speaker.");
+ RNA_def_property_ui_text(prop, "Mute", "Mutes the speaker");
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
/* This shouldn't be changed actually, hiding it!
prop= RNA_def_property(srna, "relative", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SPK_RELATIVE);
- RNA_def_property_ui_text(prop, "Relative", "Whether the source is relative to the camera or not.");
+ RNA_def_property_ui_text(prop, "Relative", "Whether the source is relative to the camera or not");
// RNA_def_property_update(prop, 0, "rna_Speaker_update");*/
prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
@@ -76,7 +76,7 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Sound");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this speaker.");
+ RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this speaker");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_sound_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
@@ -84,7 +84,7 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "volume_max");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Maximum Volume", "Maximum volume, no matter how near the object is.");
+ RNA_def_property_ui_text(prop, "Maximum Volume", "Maximum volume, no matter how near the object is");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_max_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
@@ -92,7 +92,7 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "volume_min");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Minimum Volume", "Minimum volume, no matter how far away the object is.");
+ RNA_def_property_ui_text(prop, "Minimum Volume", "Minimum volume, no matter how far away the object is");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_min_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
@@ -100,7 +100,8 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "distance_max");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance for volume calculation, no matter how far away the object is.");
+ RNA_def_property_ui_text(prop, "Maximum Distance",
+ "Maximum distance for volume calculation, no matter how far away the object is");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_distance_max_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
@@ -108,7 +109,7 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "distance_reference");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Reference Distance", "Reference distance at which volume is 100 %.");
+ RNA_def_property_ui_text(prop, "Reference Distance", "Reference distance at which volume is 100 %");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_distance_reference_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
@@ -116,7 +117,7 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "attenuation");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, FLT_MAX);
- RNA_def_property_ui_text(prop, "Attenuation", "How strong the distance affects volume, depending on distance model.");
+ RNA_def_property_ui_text(prop, "Attenuation", "How strong the distance affects volume, depending on distance model");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_attenuation_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
@@ -124,7 +125,9 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "cone_angle_outer");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 360.0f);
- RNA_def_property_ui_text(prop, "Outer Cone Angle", "Outer angle of the cone in degrees, outside this cone the volume is the outer cone volume, between inner and outer cone the volume is interpolated.");
+ RNA_def_property_ui_text(prop, "Outer Cone Angle",
+ "Outer angle of the cone in degrees, outside this cone the volume is "
+ "the outer cone volume, between inner and outer cone the volume is interpolated");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_angle_outer_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
@@ -132,7 +135,8 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "cone_angle_inner");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 360.0f);
- RNA_def_property_ui_text(prop, "Inner Cone Angle", "Inner angle of the cone in degrees, inside the cone the volume is 100 %.");
+ RNA_def_property_ui_text(prop, "Inner Cone Angle",
+ "Inner angle of the cone in degrees, inside the cone the volume is 100 %");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_angle_inner_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
@@ -140,21 +144,21 @@ static void rna_def_speaker(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "cone_volume_outer");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Outer Cone Volume", "Volume outside the outer cone.");
+ RNA_def_property_ui_text(prop, "Outer Cone Volume", "Volume outside the outer cone");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_cone_volume_outer_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "volume");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Volume", "How loud the sound is.");
+ RNA_def_property_ui_text(prop, "Volume", "How loud the sound is");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_volume_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "pitch");
RNA_def_property_range(prop, 0.1f, 10.0f);
- RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound.");
+ RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound");
// RNA_def_property_float_funcs(prop, NULL, "rna_Speaker_pitch_set", NULL);
// RNA_def_property_update(prop, 0, "rna_Speaker_update");
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index 959f9db851b..6a1e93fce41 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -53,7 +53,7 @@ static void rna_Text_filename_get(PointerRNA *ptr, char *value)
if(text->name)
strcpy(value, text->name);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_Text_filename_length(PointerRNA *ptr)
@@ -88,7 +88,7 @@ static void rna_TextLine_body_get(PointerRNA *ptr, char *value)
if(line->line)
strcpy(value, line->line);
else
- strcpy(value, "");
+ value[0]= '\0';
}
static int rna_TextLine_body_length(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c
index 54cb6714b1b..7e90dba6e3f 100644
--- a/source/blender/makesrna/intern/rna_text_api.c
+++ b/source/blender/makesrna/intern/rna_text_api.c
@@ -42,11 +42,11 @@ void RNA_api_text(StructRNA *srna)
PropertyRNA *prop;
func= RNA_def_function(srna, "clear", "clear_text");
- RNA_def_function_ui_description(func, "clear the text block.");
+ RNA_def_function_ui_description(func, "clear the text block");
func= RNA_def_function(srna, "write", "write_text");
- RNA_def_function_ui_description(func, "write text at the cursor location and advance to the end of the text block.");
- prop= RNA_def_string(func, "text", "Text", 0, "", "New text for this datablock.");
+ RNA_def_function_ui_description(func, "write text at the cursor location and advance to the end of the text block");
+ prop= RNA_def_string(func, "text", "Text", 0, "", "New text for this datablock");
RNA_def_property_flag(prop, PROP_REQUIRED);
}
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index a1ce77b061d..e2beabf789d 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -48,7 +48,7 @@
#include "BKE_node.h"
-static EnumPropertyItem texture_filter_items[] = {
+EnumPropertyItem texture_filter_items[] = {
{TXF_BOX, "BOX", 0, "Box", ""},
{TXF_EWA, "EWA", 0, "EWA", ""},
{TXF_FELINE, "FELINE", 0, "FELINE", ""},
@@ -260,7 +260,7 @@ static void rna_TextureSlot_name_get(PointerRNA *ptr, char *str)
if(mtex->tex)
strcpy(str, mtex->tex->id.name+2);
else
- strcpy(str, "");
+ str[0]= '\0';
}
static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
@@ -668,22 +668,31 @@ static void rna_def_environment_map(BlenderRNA *brna)
prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, 0);
RNA_def_property_boolean_sdna(prop, NULL, "ok", 2);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Validity", "True if this map is ready for use, False if it needs rendering.");
+ RNA_def_property_ui_text(prop, "Validity", "True if this map is ready for use, False if it needs rendering");
RNA_api_environment_map(srna);
}
static EnumPropertyItem prop_noise_basis_items[] = {
- {TEX_BLENDER, "BLENDER_ORIGINAL", 0, "Blender Original", "Noise algorithm - Blender original: Smooth interpolated noise"},
- {TEX_STDPERLIN, "ORIGINAL_PERLIN", 0, "Original Perlin", "Noise algorithm - Original Perlin: Smooth interpolated noise"},
- {TEX_NEWPERLIN, "IMPROVED_PERLIN", 0, "Improved Perlin", "Noise algorithm - Improved Perlin: Smooth interpolated noise"},
- {TEX_VORONOI_F1, "VORONOI_F1", 0, "Voronoi F1", "Noise algorithm - Voronoi F1: Returns distance to the closest feature point"},
- {TEX_VORONOI_F2, "VORONOI_F2", 0, "Voronoi F2", "Noise algorithm - Voronoi F2: Returns distance to the 2nd closest feature point"},
- {TEX_VORONOI_F3, "VORONOI_F3", 0, "Voronoi F3", "Noise algorithm - Voronoi F3: Returns distance to the 3rd closest feature point"},
- {TEX_VORONOI_F4, "VORONOI_F4", 0, "Voronoi F4", "Noise algorithm - Voronoi F4: Returns distance to the 4th closest feature point"},
+ {TEX_BLENDER, "BLENDER_ORIGINAL", 0, "Blender Original",
+ "Noise algorithm - Blender original: Smooth interpolated noise"},
+ {TEX_STDPERLIN, "ORIGINAL_PERLIN", 0, "Original Perlin",
+ "Noise algorithm - Original Perlin: Smooth interpolated noise"},
+ {TEX_NEWPERLIN, "IMPROVED_PERLIN", 0, "Improved Perlin",
+ "Noise algorithm - Improved Perlin: Smooth interpolated noise"},
+ {TEX_VORONOI_F1, "VORONOI_F1", 0, "Voronoi F1",
+ "Noise algorithm - Voronoi F1: Returns distance to the closest feature point"},
+ {TEX_VORONOI_F2, "VORONOI_F2", 0, "Voronoi F2",
+ "Noise algorithm - Voronoi F2: Returns distance to the 2nd closest feature point"},
+ {TEX_VORONOI_F3, "VORONOI_F3", 0, "Voronoi F3",
+ "Noise algorithm - Voronoi F3: Returns distance to the 3rd closest feature point"},
+ {TEX_VORONOI_F4, "VORONOI_F4", 0, "Voronoi F4",
+ "Noise algorithm - Voronoi F4: Returns distance to the 4th closest feature point"},
{TEX_VORONOI_F2F1, "VORONOI_F2_F1", 0, "Voronoi F2-F1", "Noise algorithm - Voronoi F1-F2"},
- {TEX_VORONOI_CRACKLE, "VORONOI_CRACKLE", 0, "Voronoi Crackle", "Noise algorithm - Voronoi Crackle: Voronoi tessellation with sharp edges"},
- {TEX_CELLNOISE, "CELL_NOISE", 0, "Cell Noise", "Noise algorithm - Cell Noise: Square cell tessallation"},
+ {TEX_VORONOI_CRACKLE, "VORONOI_CRACKLE", 0, "Voronoi Crackle",
+ "Noise algorithm - Voronoi Crackle: Voronoi tessellation with sharp edges"},
+ {TEX_CELLNOISE, "CELL_NOISE", 0, "Cell Noise",
+ "Noise algorithm - Cell Noise: Square cell tessallation"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_noise_type[] = {
@@ -1820,6 +1829,8 @@ static void rna_def_texture(BlenderRNA *brna)
rna_def_texture_pointdensity(brna);
rna_def_texture_voxeldata(brna);
/* XXX add more types here .. */
+
+ RNA_api_texture(srna);
}
void RNA_def_texture(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index 8d4b73f1f0c..9a445ed8ae8 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -43,6 +43,7 @@
#include "BKE_context.h"
#include "BKE_global.h"
#include "RE_pipeline.h"
+#include "RE_shader_ext.h"
void save_envmap(struct EnvMap *env, bContext *C, ReportList *reports, const char* filepath, struct Scene *scene, float layout[12])
{
@@ -67,30 +68,62 @@ void clear_envmap(struct EnvMap *env, bContext *C)
}
}
+void texture_evaluate(struct Tex *tex, float value[3], float color_r[4])
+{
+ TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
+ multitex_ext(tex, value, NULL, NULL, 1, &texres);
+
+ color_r[0] = texres.tr;
+ color_r[1] = texres.tg;
+ color_r[2] = texres.tb;
+ color_r[3] = texres.tin;
+}
+
#else
+void RNA_api_texture(StructRNA *srna)
+{
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ func= RNA_def_function(srna, "evaluate", "texture_evaluate");
+ RNA_def_function_ui_description(func, "Evaluate the texture at the coordinates given");
+
+ parm= RNA_def_float_vector(func, "value", 3, NULL, -FLT_MAX, FLT_MAX, "", "", -1e4, 1e4);
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ /* return location and normal */
+ parm= RNA_def_float_vector(func, "result", 4, NULL, -FLT_MAX, FLT_MAX, "Result", NULL, -1e4, 1e4);
+ RNA_def_property_flag(parm, PROP_THICK_WRAP);
+ RNA_def_function_output(func, parm);
+
+}
+
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 };
-
+
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);
+ 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");
- 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");
- RNA_def_property_flag(parm, PROP_REQUIRED);
-
- RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken.");
+ 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");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+
+ RNA_def_pointer(func, "scene", "Scene", "", "Overrides the scene from which image parameters are taken");
- parm = RNA_def_float_array(func, "layout", 12, default_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face. Order is [+Z -Z +Y -X -Y +X]. Use -1 to skip a face.", 0.0f, 0.0f);
+ parm = RNA_def_float_array(func, "layout", 12, default_layout, 0.0f, 0.0f, "File layout",
+ "Flat array describing the X,Y position of each cube face in the "
+ "output image, where 1 is the size of a face - order is [+Z -Z +Y -X -Y +X] "
+ "(use -1 to skip a face)", 0.0f, 0.0f);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 1e60f747b4e..52c359d79dd 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -84,7 +84,7 @@ static ARegionType *region_type_find(ReportList *reports, int space_type, int re
/* region type not found? abort */
if (art==NULL) {
- BKE_report(reports, RPT_ERROR, "Region not found in spacetype.");
+ BKE_report(reports, RPT_ERROR, "Region not found in spacetype");
return NULL;
}
@@ -167,7 +167,8 @@ static void rna_Panel_unregister(Main *UNUSED(bmain), StructRNA *type)
WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
ARegionType *art;
PanelType *pt, dummypt = {NULL};
@@ -184,7 +185,8 @@ static StructRNA *rna_Panel_register(Main *bmain, ReportList *reports, void *dat
return NULL;
if(strlen(identifier) >= sizeof(dummypt.idname)) {
- BKE_reportf(reports, RPT_ERROR, "registering panel class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummypt.idname));
+ BKE_reportf(reports, RPT_ERROR, "registering panel class: '%s' is too long, maximum length is %d",
+ identifier, (int)sizeof(dummypt.idname));
return NULL;
}
@@ -280,7 +282,8 @@ static void rna_Header_unregister(Main *UNUSED(bmain), StructRNA *type)
WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Header_register(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Header_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
ARegionType *art;
HeaderType *ht, dummyht = {NULL};
@@ -297,7 +300,8 @@ static StructRNA *rna_Header_register(Main *bmain, ReportList *reports, void *da
return NULL;
if(strlen(identifier) >= sizeof(dummyht.idname)) {
- BKE_reportf(reports, RPT_ERROR, "registering header class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyht.idname));
+ BKE_reportf(reports, RPT_ERROR, "registering header class: '%s' is too long, maximum length is %d",
+ identifier, (int)sizeof(dummyht.idname));
return NULL;
}
@@ -397,7 +401,8 @@ static void rna_Menu_unregister(Main *UNUSED(bmain), StructRNA *type)
WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data, const char *identifier,
+ StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
MenuType *mt, dummymt = {NULL};
Menu dummymenu= {NULL};
@@ -413,7 +418,8 @@ static StructRNA *rna_Menu_register(Main *bmain, ReportList *reports, void *data
return NULL;
if(strlen(identifier) >= sizeof(dummymt.idname)) {
- BKE_reportf(reports, RPT_ERROR, "registering menu class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummymt.idname));
+ BKE_reportf(reports, RPT_ERROR, "registering menu class: '%s' is too long, maximum length is %d",
+ identifier, (int)sizeof(dummymt.idname));
return NULL;
}
@@ -571,7 +577,7 @@ static void rna_def_ui_layout(BlenderRNA *brna)
prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_enabled_get", "rna_UILayout_enabled_set");
- RNA_def_property_ui_text(prop, "Enabled", "When false, this (sub)layout is greyed out.");
+ RNA_def_property_ui_text(prop, "Enabled", "When false, this (sub)layout is greyed out");
prop= RNA_def_property(srna, "alert", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_UILayout_alert_get", "rna_UILayout_alert_set");
@@ -587,11 +593,11 @@ static void rna_def_ui_layout(BlenderRNA *brna)
prop= RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_x_get", "rna_UILayout_scale_x_set", NULL);
- RNA_def_property_ui_text(prop, "Scale X", "Scale factor along the X for items in this (sub)layout.");
+ RNA_def_property_ui_text(prop, "Scale X", "Scale factor along the X for items in this (sub)layout");
prop= RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_funcs(prop, "rna_UILayout_scale_y_get", "rna_UILayout_scale_y_set", NULL);
- RNA_def_property_ui_text(prop, "Scale Y", "Scale factor along the Y for items in this (sub)layout.");
+ RNA_def_property_ui_text(prop, "Scale Y", "Scale factor along the Y for items in this (sub)layout");
RNA_api_ui_layout(srna);
}
@@ -603,8 +609,11 @@ static void rna_def_panel(BlenderRNA *brna)
FunctionRNA *func;
static EnumPropertyItem panel_flag_items[] = {
- {PNL_DEFAULT_CLOSED, "DEFAULT_CLOSED", 0, "Default Closed", "Defines if the panel has to be open or collapsed at the time of its creation."},
- {PNL_NO_HEADER, "HIDE_HEADER", 0, "Show Header", "If set to True, the panel shows a header, which contains a clickable arrow to collapse the panel and the label (see bl_label)."},
+ {PNL_DEFAULT_CLOSED, "DEFAULT_CLOSED", 0, "Default Closed",
+ "Defines if the panel has to be open or collapsed at the time of its creation"},
+ {PNL_NO_HEADER, "HIDE_HEADER", 0, "Show Header",
+ "If set to True, the panel shows a header, which contains a clickable "
+ "arrow to collapse the panel and the label (see bl_label)"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Panel", NULL);
@@ -615,7 +624,7 @@ static void rna_def_panel(BlenderRNA *brna)
/* poll */
func= RNA_def_function(srna, "poll", NULL);
- RNA_def_function_ui_description(func, "If this method returns a non-null output, then the panel can be drawn.");
+ RNA_def_function_ui_description(func, "If this method returns a non-null output, then the panel can be drawn");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", ""));
parm= RNA_def_pointer(func, "context", "Context", "", "");
@@ -623,20 +632,20 @@ static void rna_def_panel(BlenderRNA *brna)
/* draw */
func= RNA_def_function(srna, "draw", NULL);
- RNA_def_function_ui_description(func, "Draw UI elements into the panel UI layout.");
+ RNA_def_function_ui_description(func, "Draw UI elements into the panel UI layout");
RNA_def_function_flag(func, FUNC_REGISTER);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
func= RNA_def_function(srna, "draw_header", NULL);
- RNA_def_function_ui_description(func, "Draw UI elements into the panel's header UI layout.");
+ RNA_def_function_ui_description(func, "Draw UI elements into the panel's header UI layout");
RNA_def_function_flag(func, FUNC_REGISTER);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "UILayout");
- RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the panel in the UI.");
+ RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the panel in the UI");
prop= RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "drawname");
@@ -646,29 +655,37 @@ static void rna_def_panel(BlenderRNA *brna)
prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
- RNA_def_property_ui_text(prop, "ID Name", "If this is set, the panel gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is \"OBJECT_PT_hello\", and bl_idname is not set by the script, then bl_idname = \"OBJECT_PT_hello\"");
+ RNA_def_property_ui_text(prop, "ID Name",
+ "If this is set, the panel gets a custom ID, otherwise it takes the "
+ "name of the class used to define the panel. For example, if the "
+ "class name is \"OBJECT_PT_hello\", and bl_idname is not set by the "
+ "script, then bl_idname = \"OBJECT_PT_hello\"");
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->label");
RNA_def_property_flag(prop, PROP_REGISTER);
- RNA_def_property_ui_text(prop, "Label", "The panel label, shows up in the panel header at the right of the triangle used to collapse the panel.");
+ RNA_def_property_ui_text(prop, "Label",
+ "The panel label, shows up in the panel header at the right of the "
+ "triangle used to collapse the panel");
prop= RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->space_type");
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_flag(prop, PROP_REGISTER);
- RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in.");
+ RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in");
prop= RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->region_type");
RNA_def_property_enum_items(prop, region_type_items);
RNA_def_property_flag(prop, PROP_REGISTER);
- RNA_def_property_ui_text(prop, "Region Type", "The region where the panel is going to be used in.");
+ RNA_def_property_ui_text(prop, "Region Type", "The region where the panel is going to be used in");
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_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)");
+ 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)");
prop= RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->flag");
@@ -685,14 +702,14 @@ static void rna_def_header(BlenderRNA *brna)
FunctionRNA *func;
srna= RNA_def_struct(brna, "Header", NULL);
- RNA_def_struct_ui_text(srna, "Header", "Editor header containing UI elements.");
+ RNA_def_struct_ui_text(srna, "Header", "Editor header containing UI elements");
RNA_def_struct_sdna(srna, "Header");
RNA_def_struct_refine_func(srna, "rna_Header_refine");
RNA_def_struct_register_funcs(srna, "rna_Header_register", "rna_Header_unregister", NULL);
/* draw */
func= RNA_def_function(srna, "draw", NULL);
- RNA_def_function_ui_description(func, "Draw UI elements into the header UI layout.");
+ RNA_def_function_ui_description(func, "Draw UI elements into the header UI layout");
RNA_def_function_flag(func, FUNC_REGISTER);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -702,19 +719,23 @@ static void rna_def_header(BlenderRNA *brna)
prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "layout");
RNA_def_property_struct_type(prop, "UILayout");
- RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the header in the UI.");
+ RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the header in the UI");
/* registration */
prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
- RNA_def_property_ui_text(prop, "ID Name", "If this is set, the header gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is \"OBJECT_HT_hello\", and bl_idname is not set by the script, then bl_idname = \"OBJECT_HT_hello\"");
+ RNA_def_property_ui_text(prop, "ID Name",
+ "If this is set, the header gets a custom ID, otherwise it takes the "
+ "name of the class used to define the panel. For example, if the "
+ "class name is \"OBJECT_HT_hello\", and bl_idname is not set by the "
+ "script, then bl_idname = \"OBJECT_HT_hello\"");
prop= RNA_def_property(srna, "bl_space_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type->space_type");
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_flag(prop, PROP_REGISTER);
- RNA_def_property_ui_text(prop, "Space type", "The space where the header is going to be used in.");
+ RNA_def_property_ui_text(prop, "Space type", "The space where the header is going to be used in");
RNA_define_verify_sdna(1);
}
@@ -734,7 +755,7 @@ static void rna_def_menu(BlenderRNA *brna)
/* poll */
func= RNA_def_function(srna, "poll", NULL);
- RNA_def_function_ui_description(func, "If this method returns a non-null output, then the menu can be drawn.");
+ RNA_def_function_ui_description(func, "If this method returns a non-null output, then the menu can be drawn");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", ""));
parm= RNA_def_pointer(func, "context", "Context", "", "");
@@ -742,7 +763,7 @@ static void rna_def_menu(BlenderRNA *brna)
/* draw */
func= RNA_def_function(srna, "draw", NULL);
- RNA_def_function_ui_description(func, "Draw UI elements into the menu UI layout.");
+ RNA_def_function_ui_description(func, "Draw UI elements into the menu UI layout");
RNA_def_function_flag(func, FUNC_REGISTER);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -752,13 +773,17 @@ static void rna_def_menu(BlenderRNA *brna)
prop= RNA_def_property(srna, "layout", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "layout");
RNA_def_property_struct_type(prop, "UILayout");
- RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the menu in the UI.");
+ RNA_def_property_ui_text(prop, "Layout", "Defines the structure of the menu in the UI");
/* registration */
prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->idname");
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
- RNA_def_property_ui_text(prop, "ID Name", "If this is set, the menu gets a custom ID, otherwise it takes the name of the class used to define the panel. For example, if the class name is \"OBJECT_MT_hello\", and bl_idname is not set by the script, then bl_idname = \"OBJECT_MT_hello\"");
+ RNA_def_property_ui_text(prop, "ID Name",
+ "If this is set, the menu gets a custom ID, otherwise it takes the "
+ "name of the class used to define the panel. For example, if the "
+ "class name is \"OBJECT_MT_hello\", and bl_idname is not set by the "
+ "script, then bl_idname = \"OBJECT_MT_hello\"");
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->label");
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index d4ac9880290..84568d914af 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -46,7 +46,7 @@ static void rna_uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname,
int flag= 0;
if(!prop) {
- RNA_warning("rna_uiItemR: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ RNA_warning("property not found: %s.%s", RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -84,7 +84,7 @@ static void api_ui_item_common(FunctionRNA *func)
{
PropertyRNA *prop;
- RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item.");
+ RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item");
prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, icon_items);
@@ -95,7 +95,7 @@ static void api_ui_item_common(FunctionRNA *func)
static void api_ui_item_op(FunctionRNA *func)
{
PropertyRNA *parm;
- parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator.");
+ parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -109,9 +109,9 @@ static void api_ui_item_rna_common(FunctionRNA *func)
{
PropertyRNA *parm;
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
@@ -134,49 +134,52 @@ void RNA_api_ui_layout(StructRNA *srna)
/* simple layout specifiers */
func= RNA_def_function(srna, "row", "uiLayoutRow");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
+ parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
- RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed next to each other in a row.");
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
+ RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed next to each other in a row");
+ RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
func= RNA_def_function(srna, "column", "uiLayoutColumn");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
+ parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
- RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed under each other in a column.");
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
+ RNA_def_function_ui_description(func, "Sub-layout. Items placed in this sublayout are placed under each other in a column");
+ RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
func= RNA_def_function(srna, "column_flow", "uiLayoutColumnFlow");
- RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic.", 0, INT_MAX);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
+ RNA_def_int(func, "columns", 0, 0, INT_MAX, "", "Number of columns, 0 is automatic", 0, INT_MAX);
+ parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
+ RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
/* box layout */
func= RNA_def_function(srna, "box", "uiLayoutBox");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
+ parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
- RNA_def_function_ui_description(func, "Sublayout. Items placed in this sublayout are placed under each other in a column and are surrounded by a box.");
+ RNA_def_function_ui_description(func, "Sublayout (items placed in this sublayout are placed "
+ "under each other in a column and are surrounded by a box)");
/* split layout */
func= RNA_def_function(srna, "split", "uiLayoutSplit");
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
+ parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
- RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at.", 0.0f, 1.0f);
- RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
+ RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at", 0.0f, 1.0f);
+ RNA_def_boolean(func, "align", 0, "", "Align buttons to each other");
/* items */
func= RNA_def_function(srna, "prop", "rna_uiItemR");
- RNA_def_function_ui_description(func, "Item. Exposes an RNA item and places it into the layout.");
+ RNA_def_function_ui_description(func, "Item. Exposes an RNA item and places it into the layout");
api_ui_item_rna_common(func);
api_ui_item_common(func);
- RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
- RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values.");
- RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values.");
- RNA_def_boolean(func, "icon_only", 0, "", "Draw only icons in buttons, no text.");
- RNA_def_boolean(func, "event", 0, "", "Use button to input key events.");
- RNA_def_boolean(func, "full_event", 0, "", "Use button to input full events including modifiers.");
- RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text.");
- RNA_def_int(func, "index", -1, -2, INT_MAX, "", "The index of this button, when set a single member of an array can be accessed, when set to -1 all array members are used.", -2, INT_MAX); /* RNA_NO_INDEX == -1 */
+ RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail");
+ RNA_def_boolean(func, "slider", 0, "", "Use slider widget for numeric values");
+ RNA_def_boolean(func, "toggle", 0, "", "Use toggle widget for boolean values");
+ RNA_def_boolean(func, "icon_only", 0, "", "Draw only icons in buttons, no text");
+ RNA_def_boolean(func, "event", 0, "", "Use button to input key events");
+ RNA_def_boolean(func, "full_event", 0, "", "Use button to input full events including modifiers");
+ RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text");
+ RNA_def_int(func, "index", -1, -2, INT_MAX, "",
+ "The index of this button, when set a single member of an array can be accessed, "
+ "when set to -1 all array members are used", -2, INT_MAX); /* RNA_NO_INDEX == -1 */
func= RNA_def_function(srna, "props_enum", "uiItemsEnumR");
api_ui_item_rna_common(func);
@@ -187,190 +190,194 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "prop_enum", "uiItemEnumR_string");
api_ui_item_rna_common(func);
- parm= RNA_def_string(func, "value", "", 0, "", "Enum property value.");
+ parm= RNA_def_string(func, "value", "", 0, "", "Enum property value");
RNA_def_property_flag(parm, PROP_REQUIRED);
api_ui_item_common(func);
func= RNA_def_function(srna, "prop_search", "uiItemPointerR");
api_ui_item_rna_common(func);
- parm= RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in.");
+ parm= RNA_def_pointer(func, "search_data", "AnyType", "", "Data from which to take collection to search in");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property.");
+ parm= RNA_def_string(func, "search_property", "", 0, "", "Identifier of search collection property");
RNA_def_property_flag(parm, PROP_REQUIRED);
api_ui_item_common(func);
func= RNA_def_function(srna, "operator", "rna_uiItemO");
api_ui_item_op_common(func);
- RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text.");
- parm= RNA_def_pointer(func, "properties", "OperatorProperties", "", "Operator properties to fill in, return when 'properties' is set to true.");
+ RNA_def_boolean(func, "emboss", 1, "", "Draw the button itself, just the icon/text");
+ parm= RNA_def_pointer(func, "properties", "OperatorProperties", "",
+ "Operator properties to fill in, return when 'properties' is set to true");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
RNA_def_function_return(func, parm);
- RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator.");
+ RNA_def_function_ui_description(func, "Item. Places a button into the layout to call an Operator");
/* func= RNA_def_function(srna, "operator_enum_single", "uiItemEnumO_string");
api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "value", "", 0, "", "Enum property value.");
+ parm= RNA_def_string(func, "value", "", 0, "", "Enum property value");
RNA_def_property_flag(parm, PROP_REQUIRED); */
func= RNA_def_function(srna, "operator_enum", "uiItemsEnumO");
- parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator.");
+ parm= RNA_def_string(func, "operator", "", 0, "", "Identifier of the operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "operator_menu_enum", "uiItemMenuEnumO");
api_ui_item_op(func); /* cant use api_ui_item_op_common because property must come right after */
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
api_ui_item_common(func);
/* func= RNA_def_function(srna, "operator_boolean", "uiItemBooleanO");
api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_boolean(func, "value", 0, "", "Value of the property to call the operator with.");
+ parm= RNA_def_boolean(func, "value", 0, "", "Value of the property to call the operator with");
RNA_def_property_flag(parm, PROP_REQUIRED); */
/* func= RNA_def_function(srna, "operator_int", "uiItemIntO");
api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "", "Value of the property to call the operator with.", INT_MIN, INT_MAX);
+ parm= RNA_def_int(func, "value", 0, INT_MIN, INT_MAX, "",
+ "Value of the property to call the operator with", INT_MIN, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED); */
/* func= RNA_def_function(srna, "operator_float", "uiItemFloatO");
api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "", "Value of the property to call the operator with.", -FLT_MAX, FLT_MAX);
+ parm= RNA_def_float(func, "value", 0, -FLT_MAX, FLT_MAX, "",
+ "Value of the property to call the operator with", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED); */
/* func= RNA_def_function(srna, "operator_string", "uiItemStringO");
api_ui_item_op_common(func);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in operator");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "value", "", 0, "", "Value of the property to call the operator with.");
+ parm= RNA_def_string(func, "value", "", 0, "", "Value of the property to call the operator with");
RNA_def_property_flag(parm, PROP_REQUIRED); */
func= RNA_def_function(srna, "label", "uiItemL");
- RNA_def_function_ui_description(func, "Item. Display text in the layout.");
+ RNA_def_function_ui_description(func, "Item. Display text in the layout");
api_ui_item_common(func);
func= RNA_def_function(srna, "menu", "uiItemM");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu.");
+ parm= RNA_def_string(func, "menu", "", 0, "", "Identifier of the menu");
api_ui_item_common(func);
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "separator", "uiItemS");
- RNA_def_function_ui_description(func, "Item. Inserts empty space into the layout between items.");
+ RNA_def_function_ui_description(func, "Item. Inserts empty space into the layout between items");
/* context */
func= RNA_def_function(srna, "context_pointer_set", "uiLayoutSetContextPointer");
- parm= RNA_def_string(func, "name", "", 0, "Name", "Name of entry in the context.");
+ parm= RNA_def_string(func, "name", "", 0, "Name", "Name of entry in the context");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context.");
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Pointer to put in context");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
/* templates */
func= RNA_def_function(srna, "template_header", "uiTemplateHeader");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- RNA_def_boolean(func, "menus", 1, "", "The header has menus, and should show menu expander.");
+ RNA_def_boolean(func, "menus", 1, "", "The header has menus, and should show menu expander");
func= RNA_def_function(srna, "template_ID", "uiTemplateID");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
- RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block.");
- RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block.");
- RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block.");
+ RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block");
+ RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block");
+ RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block");
func= RNA_def_function(srna, "template_ID_preview", "uiTemplateIDPreview");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
- RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block.");
- RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block.");
- RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block.");
+ RNA_def_string(func, "new", "", 0, "", "Operator identifier to create a new ID block");
+ RNA_def_string(func, "open", "", 0, "", "Operator identifier to open a file for creating a new ID block");
+ RNA_def_string(func, "unlink", "", 0, "", "Operator identifier to unlink the ID block");
RNA_def_int(func, "rows", 0, 0, INT_MAX, "Number of thumbnail preview rows to display", "", 0, INT_MAX);
RNA_def_int(func, "cols", 0, 0, INT_MAX, "Number of thumbnail preview columns to display", "", 0, INT_MAX);
func= RNA_def_function(srna, "template_any_ID", "uiTemplateAnyID");
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_string(func, "type_property", "", 0, "", "Identifier of property in data giving the type of the ID-blocks to use.");
+ parm= RNA_def_string(func, "type_property", "", 0, "",
+ "Identifier of property in data giving the type of the ID-blocks to use");
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
+ RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI");
func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder");
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from.");
+ parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
- RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI.");
+ RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI");
func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- RNA_def_function_ui_description(func, "Layout . Generates the UI layout for modifiers.");
- parm= RNA_def_pointer(func, "data", "Modifier", "", "Modifier data.");
+ RNA_def_function_ui_description(func, "Layout . Generates the UI layout for modifiers");
+ parm= RNA_def_pointer(func, "data", "Modifier", "", "Modifier data");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
+ parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "template_constraint", "uiTemplateConstraint");
- RNA_def_function_ui_description(func, "Layout . Generates the UI layout for constraints.");
- parm= RNA_def_pointer(func, "data", "Constraint", "", "Constraint data.");
+ RNA_def_function_ui_description(func, "Layout . Generates the UI layout for constraints");
+ parm= RNA_def_pointer(func, "data", "Constraint", "", "Constraint data");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
+ parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "template_preview", "uiTemplatePreview");
RNA_def_function_ui_description(func, "Item. A preview window for materials, textures, lamps, etc.");
- parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock.");
+ parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_boolean(func, "show_buttons", 1, "", "Show preview buttons?");
- RNA_def_pointer(func, "parent", "ID", "", "ID datablock.");
- RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot.");
+ RNA_def_pointer(func, "parent", "ID", "", "ID datablock");
+ RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot");
func= RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping");
- RNA_def_function_ui_description(func, "Item. A curve mapping widget used for e.g falloff curves for lamps.");
+ RNA_def_function_ui_description(func, "Item. A curve mapping widget used for e.g falloff curves for lamps");
api_ui_item_rna_common(func);
- RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display.");
- RNA_def_boolean(func, "levels", 0, "", "Show black/white levels.");
- RNA_def_boolean(func, "brush", 0, "", "Show brush options.");
+ RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display");
+ RNA_def_boolean(func, "levels", 0, "", "Show black/white levels");
+ RNA_def_boolean(func, "brush", 0, "", "Show brush options");
func= RNA_def_function(srna, "template_color_ramp", "uiTemplateColorRamp");
- RNA_def_function_ui_description(func, "Item. A color ramp widget.");
+ RNA_def_function_ui_description(func, "Item. A color ramp widget");
api_ui_item_rna_common(func);
- RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail.");
+ RNA_def_boolean(func, "expand", 0, "", "Expand button to show more detail");
func= RNA_def_function(srna, "template_histogram", "uiTemplateHistogram");
- RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data.");
+ RNA_def_function_ui_description(func, "Item. A histogramm widget to analyze imaga data");
api_ui_item_rna_common(func);
func= RNA_def_function(srna, "template_waveform", "uiTemplateWaveform");
- RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data.");
+ RNA_def_function_ui_description(func, "Item. A waveform widget to analyze imaga data");
api_ui_item_rna_common(func);
func= RNA_def_function(srna, "template_vectorscope", "uiTemplateVectorscope");
- RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data.");
+ RNA_def_function_ui_description(func, "Item. A vectorscope widget to analyze imaga data");
api_ui_item_rna_common(func);
func= RNA_def_function(srna, "template_layers", "uiTemplateLayers");
api_ui_item_rna_common(func);
- parm= RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property.");
+ parm= RNA_def_pointer(func, "used_layers_data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
- parm= RNA_def_string(func, "used_layers_property", "", 0, "", "Identifier of property in data.");
+ parm= RNA_def_string(func, "used_layers_property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_int(func, "active_layer", 0, 0, INT_MAX, "Active Layer", "", 0, INT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "template_color_wheel", "uiTemplateColorWheel");
- RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors.");
+ RNA_def_function_ui_description(func, "Item. A color wheel widget to pick colors");
api_ui_item_rna_common(func);
RNA_def_boolean(func, "value_slider", 0, "", "Display the value slider to the right of the color wheel");
RNA_def_boolean(func, "lock", 0, "", "Lock the color wheel display to value 1.0 regardless of actual color");
@@ -385,27 +392,27 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
func= RNA_def_function(srna, "template_image", "uiTemplateImage");
- RNA_def_function_ui_description(func, "Item(s). User interface for selecting images and their source paths.");
+ RNA_def_function_ui_description(func, "Item(s). User interface for selecting images and their source paths");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
api_ui_item_rna_common(func);
parm= RNA_def_pointer(func, "image_user", "ImageUser", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- RNA_def_boolean(func, "compact", 0, "", "Use more compact layout.");
+ RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
func= RNA_def_function(srna, "template_list", "uiTemplateList");
- RNA_def_function_ui_description(func, "Item. A list widget to display data. e.g. vertexgroups.");
+ RNA_def_function_ui_description(func, "Item. A list widget to display data. e.g. vertexgroups");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property.");
+ parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR);
- parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data.");
+ parm= RNA_def_string(func, "property", "", 0, "", "Identifier of property in data");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element.");
+ parm= RNA_def_pointer(func, "active_data", "AnyType", "", "Data from which to take property for the active element");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
- parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element.");
+ parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element");
RNA_def_property_flag(parm, PROP_REQUIRED);
- RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display.", 0, INT_MAX);
- RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display.", 0, INT_MAX);
- RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use.");
+ RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display", 0, INT_MAX);
+ RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display", 0, INT_MAX);
+ RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use");
func= RNA_def_function(srna, "template_running_jobs", "uiTemplateRunningJobs");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 7d0502f1be9..b9a53acd6f4 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -44,6 +44,7 @@
#include "WM_types.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
#include "BKE_sound.h"
@@ -76,6 +77,11 @@ static void rna_userdef_dpi_update(Main *bmain, Scene *scene, PointerRNA *ptr)
WM_main_add_notifier(NC_SCREEN|NA_EDITED, NULL); /* refresh region sizes */
}
+static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
+{
+ BLF_lang_set(NULL);
+}
+
static void rna_userdef_show_manipulator_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
UserDef *userdef = (UserDef *)ptr->data;
@@ -1959,6 +1965,7 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
+ static float default_dir[3] = {0.f, 1.f, 0.f};
srna= RNA_def_struct(brna, "UserSolidLight", NULL);
RNA_def_struct_sdna(srna, "SolidLight");
@@ -1972,6 +1979,7 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna)
prop= RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_array(prop, 3);
+ RNA_def_property_float_array_default(prop, default_dir);
RNA_def_property_ui_text(prop, "Direction", "The direction that the OpenGL light is shining");
RNA_def_property_update(prop, 0, "rna_UserDef_viewport_lights_update");
@@ -2461,30 +2469,35 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
/* hardcoded here, could become dynamic somehow */
+ /* 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 */
static EnumPropertyItem language_items[] = {
- {0, "ENGLISH", 0, "English", ""},
- {1, "JAPANESE", 0, "Japanese", ""},
- {2, "DUTCH", 0, "Dutch", ""},
- {3, "ITALIAN", 0, "Italian", ""},
- {4, "GERMAN", 0, "German", ""},
- {5, "FINNISH", 0, "Finnish", ""},
- {6, "SWEDISH", 0, "Swedish", ""},
- {7, "FRENCH", 0, "French", ""},
- {8, "SPANISH", 0, "Spanish", ""},
- {9, "CATALAN", 0, "Catalan", ""},
- {10, "CZECH", 0, "Czech", ""},
- {11, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese", ""},
- {12, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese", ""},
- {13, "RUSSIAN", 0, "Russian", ""},
- {14, "CROATIAN", 0, "Croatian", ""},
- {15, "SERBIAN", 0, "Serbian", ""},
- {16, "UKRAINIAN", 0, "Ukrainian", ""},
- {17, "POLISH", 0, "Polish", ""},
- {18, "ROMANIAN", 0, "Romanian", ""},
- {19, "ARABIC", 0, "Arabic", ""},
- {20, "BULGARIAN", 0, "Bulgarian", ""},
- {21, "GREEK", 0, "Greek", ""},
- {22, "KOREAN", 0, "Korean", ""},
+ {0, "DEFAULT", 0, N_("Default (Default)"), ""},
+ {1, "ENGLISH", 0, N_("English (English)"), "en_US"},
+ {2, "JAPANESE", 0, N_("Japanese (日本語)"), "ja_JP"},
+ {3, "DUTCH", 0, N_("Dutch (Nederlandse taal)"), "nl_NL"},
+ {4, "ITALIAN", 0, N_("Italian (Italiano)"), "it_IT"},
+ {5, "GERMAN", 0, N_("German (Deutsch)"), "de_DE"},
+ {6, "FINNISH", 0, N_("Finnish (Suomi)"), "fi_FI"},
+ {7, "SWEDISH", 0, N_("Swedish (Svenska)"), "sv_SE"},
+ {8, "FRENCH", 0, N_("French (Française)"), "fr_FR"},
+ {9, "SPANISH", 0, N_("Spanish (Español)"), "es_ES"},
+ {10, "CATALAN", 0, N_("Catalan (Català)"), "ca_AD"},
+ {11, "CZECH", 0, N_("Czech (Český)"), "cs_CZ"},
+ {12, "BRAZILIAN_PORTUGUESE", 0, N_("Brazilian Portuguese (Português do Brasil)"), "pt_BR"},
+ {13, "SIMPLIFIED_CHINESE", 0, N_("Simplified Chinese (简体中文)"), "zh_CN"},
+ {14, "TRADITIONAL_CHINESE", 0, N_("Traditional Chinese (ç¹é«”中文)"), "zh_TW"},
+ {15, "RUSSIAN", 0, N_("Russian (РуÑÑкий)"), "ru_RU"},
+ {16, "CROATIAN", 0, N_("Croatian (Hrvatski)"), "hr_HR"},
+ {17, "SERBIAN", 0, N_("Serbian (СрпÑком језику)"), "sr_RS"},
+ {18, "UKRAINIAN", 0, N_("Ukrainian (УкраїнÑький)"), "uk_UA"},
+ {19, "POLISH", 0, N_("Polish (Polski)"), "pl_PL"},
+ {20, "ROMANIAN", 0, N_("Romanian (Român)"), "ro_RO"},
+ {21, "ARABIC", 0, N_("Arabic (العربية)"), "ar_EG"},
+ {22, "BULGARIAN", 0, N_("Bulgarian (БългарÑки)"), "bg_BG"},
+ {23, "GREEK", 0, N_("Greek (Ελληνικά)"), "el_GR"},
+ {24, "KOREAN", 0, N_("Korean (한국 언어)"), "ko_KR"},
+ /*{25, "Nepali", 0, N_("Nepali (नेपाली)"), "ne_NP"},*/
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
@@ -2497,7 +2510,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
RNA_def_property_ui_text(prop, "International Fonts", "Use international fonts");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dpi");
@@ -2520,21 +2533,16 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, language_items);
RNA_def_property_ui_text(prop, "Language", "Language use for translation");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
+ RNA_def_property_update(prop, NC_WINDOW, "rna_userdef_language_update");
prop= RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS);
RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate Tooltips");
RNA_def_property_update(prop, 0, "rna_userdef_update");
- prop= RNA_def_property(srna, "use_translate_buttons", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_BUTTONS);
- RNA_def_property_ui_text(prop, "Translate Buttons", "Translate button labels");
- RNA_def_property_update(prop, 0, "rna_userdef_update");
-
- prop= RNA_def_property(srna, "use_translate_toolbox", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_MENUS);
- RNA_def_property_ui_text(prop, "Translate Toolbox", "Translate toolbox menu");
+ prop= RNA_def_property(srna, "use_translate_interface", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_IFACE);
+ RNA_def_property_ui_text(prop, "Translate Interface", "Translate Interface");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
@@ -2791,6 +2799,36 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Invert Axes", "Toggle between moving the viewpoint or moving the scene being viewed");
/* in 3Dx docs, this is called 'object mode' vs. 'target camera mode' */
+ /* 3D view: roll */
+ prop= RNA_def_property(srna, "ndof_roll_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROLL_INVERT_AXIS);
+ RNA_def_property_ui_text(prop, "Invert roll Axis", "Invert roll axis");
+
+ /* 3D view: tilt */
+ prop= RNA_def_property(srna, "ndof_tilt_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_TILT_INVERT_AXIS);
+ RNA_def_property_ui_text(prop, "Invert tilt Axis", "Invert tilt axis");
+
+ /* 3D view: rotate */
+ prop= RNA_def_property(srna, "ndof_rotate_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ROTATE_INVERT_AXIS);
+ RNA_def_property_ui_text(prop, "Invert rotation Axis", "Invert rotation axis");
+
+ /* 3D view: pan x */
+ prop= RNA_def_property(srna, "ndof_panx_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANX_INVERT_AXIS);
+ RNA_def_property_ui_text(prop, "Invert x Axis", "Invert x axis");
+
+ /* 3D view: pan y */
+ prop= RNA_def_property(srna, "ndof_pany_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANY_INVERT_AXIS);
+ RNA_def_property_ui_text(prop, "Invert y Axis", "Invert y axis");
+
+ /* 3D view: pan z */
+ prop= RNA_def_property(srna, "ndof_panz_invert_axis", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PANZ_INVERT_AXIS);
+ RNA_def_property_ui_text(prop, "Invert z Axis", "Invert z axis");
+
/* 3D view: fly */
prop= RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_LOCK_HORIZON);
@@ -2970,13 +3008,13 @@ void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_NO_SELF);
RNA_def_function_ui_description(func, "Add a new addon");
/* return type */
- parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon datablock.");
+ parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon datablock");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "rna_userdef_addon_remove");
RNA_def_function_flag(func, FUNC_NO_SELF);
- RNA_def_function_ui_description(func, "Remove addon.");
- parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon to remove.");
+ RNA_def_function_ui_description(func, "Remove addon");
+ parm= RNA_def_pointer(func, "addon", "Addon", "", "Addon to remove");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 4c07a89a42f..606355c4fb6 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -348,20 +348,20 @@ EnumPropertyItem keymap_modifiers_items[] = {
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem operator_flag_items[] = {
- {OPTYPE_REGISTER, "REGISTER", 0, "Register", ""},
- {OPTYPE_UNDO, "UNDO", 0, "Undo", ""},
- {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", ""},
- {OPTYPE_MACRO, "MACRO", 0, "Macro", ""},
- {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", ""},
- {OPTYPE_PRESET, "PRESET", 0, "Preset", ""},
- {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", ""},
+ {OPTYPE_REGISTER, "REGISTER", 0, "Register", "Display in the info window and support the redo toolbar panel"},
+ {OPTYPE_UNDO, "UNDO", 0, "Undo", "Push an undo event (needed for operator redo)"},
+ {OPTYPE_BLOCKING, "BLOCKING", 0, "Blocking", "Block anything else from using the cursor"},
+ {OPTYPE_MACRO, "MACRO", 0, "Macro", "Use to check if an operator is a macro"},
+ {OPTYPE_GRAB_POINTER, "GRAB_POINTER", 0, "Grab Pointer", "Use so the operator grabs the mouse focus, enables wrapping when continuous grab is enabled"},
+ {OPTYPE_PRESET, "PRESET", 0, "Preset", "Display a preset button with the operators settings"},
+ {OPTYPE_INTERNAL, "INTERNAL", 0, "Internal", "Removes the operator from search results"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem operator_return_items[] = {
- {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", ""},
- {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", ""},
- {OPERATOR_FINISHED, "FINISHED", 0, "Finished", ""},
- {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", ""}, // used as a flag
+ {OPERATOR_RUNNING_MODAL, "RUNNING_MODAL", 0, "Running Modal", "Keep the operator running with blender"},
+ {OPERATOR_CANCELLED, "CANCELLED", 0, "Cancelled", "When no action has been taken, operator exits"},
+ {OPERATOR_FINISHED, "FINISHED", 0, "Finished", "When the operator is complete, operator exits"},
+ {OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", "Do nothing and pass the event on"}, // used as a flag
{0, NULL, 0, NULL, NULL}};
/* flag/enum */
@@ -486,7 +486,8 @@ static void rna_Window_screen_update(bContext *C, PointerRNA *ptr)
{
wmWindow *win= (wmWindow*)ptr->data;
- /* exception: can't set screens inside of area/region handers */
+ /* exception: can't set screens inside of area/region handers, and must
+ use context so notifier gets to the right window */
if(win->newscreen) {
WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen);
win->newscreen= NULL;
@@ -969,12 +970,15 @@ static StructRNA *rna_Operator_register(Main *bmain, ReportList *reports, void *
}
if(i > ((int)sizeof(dummyop.idname)) - 3) {
- BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s', invalid bl_idname '%s', is too long, maximum length is %d.", identifier, _operator_idname, (int)sizeof(dummyop.idname) - 3);
+ BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s', invalid bl_idname '%s', "
+ "is too long, maximum length is %d", identifier, _operator_idname,
+ (int)sizeof(dummyop.idname) - 3);
return NULL;
}
if(dot != 1) {
- BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s', invalid bl_idname '%s', must contain 1 '.' character", identifier, _operator_idname);
+ BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s', invalid bl_idname '%s', "
+ "must contain 1 '.' character", identifier, _operator_idname);
return NULL;
}
}
@@ -1068,7 +1072,8 @@ static StructRNA *rna_MacroOperator_register(Main *bmain, ReportList *reports, v
}
if(strlen(identifier) >= sizeof(dummyop.idname)) {
- BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s' is too long, maximum length is %d.", identifier, (int)sizeof(dummyop.idname));
+ BKE_reportf(reports, RPT_ERROR, "registering operator class: '%s' is too long, maximum length is %d",
+ identifier, (int)sizeof(dummyop.idname));
return NULL;
}
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 89e946f498a..8b0bae58455 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -92,7 +92,7 @@ static wmKeyMapItem *rna_KeyMap_item_new(wmKeyMap *km, ReportList *reports, cons
/* only on non-modal maps */
if (km->flag & KEYMAP_MODAL) {
- BKE_report(reports, RPT_ERROR, "Not a non-modal keymap.");
+ BKE_report(reports, RPT_ERROR, "Not a non-modal keymap");
return NULL;
}
@@ -115,18 +115,18 @@ static wmKeyMapItem *rna_KeyMap_item_new_modal(wmKeyMap *km, ReportList *reports
/* only modal maps */
if ((km->flag & KEYMAP_MODAL) == 0) {
- BKE_report(reports, RPT_ERROR, "Not a modal keymap.");
+ BKE_report(reports, RPT_ERROR, "Not a modal keymap");
return NULL;
}
if (!km->modal_items) {
- BKE_report(reports, RPT_ERROR, "No property values defined.");
+ BKE_report(reports, RPT_ERROR, "No property values defined");
return NULL;
}
if(RNA_enum_value_from_id(km->modal_items, propvalue_str, &propvalue)==0) {
- BKE_report(reports, RPT_WARNING, "Property value not in enumeration.");
+ BKE_report(reports, RPT_WARNING, "Property value not in enumeration");
}
if(shift) modifier |= KM_SHIFT;
@@ -174,17 +174,17 @@ static void rna_generic_op_invoke(FunctionRNA *func, int flag)
PropertyRNA *parm;
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
+ parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call");
RNA_def_property_flag(parm, PROP_REQUIRED);
if(flag & WM_GEN_INVOKE_EVENT) {
- parm= RNA_def_pointer(func, "event", "Event", "", "Event.");
+ parm= RNA_def_pointer(func, "event", "Event", "", "Event");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
if(flag & WM_GEN_INVOKE_SIZE) {
- RNA_def_int(func, "width", 300, 0, INT_MAX, "", "Width of the popup.", 0, INT_MAX);
- RNA_def_int(func, "height", 20, 0, INT_MAX, "", "Height of the popup.", 0, INT_MAX);
+ RNA_def_int(func, "width", 300, 0, INT_MAX, "", "Width of the popup", 0, INT_MAX);
+ RNA_def_int(func, "height", 20, 0, INT_MAX, "", "Height of the popup", 0, INT_MAX);
}
if(flag & WM_GEN_INVOKE_RETURN) {
@@ -199,12 +199,12 @@ void RNA_api_wm(StructRNA *srna)
PropertyRNA *parm;
func= RNA_def_function(srna, "fileselect_add", "WM_event_add_fileselect");
- RNA_def_function_ui_description(func, "Show up the file selector.");
+ RNA_def_function_ui_description(func, "Show up the file selector");
rna_generic_op_invoke(func, 0);
func= RNA_def_function(srna, "modal_handler_add", "rna_event_modal_handler_add");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call.");
+ parm= RNA_def_pointer(func, "operator", "Operator", "", "Operator to call");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_function_return(func, RNA_def_boolean(func, "handle", 1, "", ""));
@@ -214,7 +214,7 @@ void RNA_api_wm(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_range(parm, 0.0, FLT_MAX);
RNA_def_property_ui_text(parm, "Time Step", "Interval in seconds between timer events");
- RNA_def_pointer(func, "window", "Window", "", "Window to attach the timer to or None.");
+ RNA_def_pointer(func, "window", "Window", "", "Window to attach the timer to or None");
parm= RNA_def_pointer(func, "result", "Timer", "", "");
RNA_def_function_return(func, parm);
@@ -226,12 +226,12 @@ void RNA_api_wm(StructRNA *srna)
/* invoke functions, for use with python */
func= RNA_def_function(srna, "invoke_props_popup", "WM_operator_props_popup");
- RNA_def_function_ui_description(func, "Operator popup invoke.");
+ RNA_def_function_ui_description(func, "Operator popup invoke");
rna_generic_op_invoke(func, WM_GEN_INVOKE_EVENT|WM_GEN_INVOKE_RETURN);
/* invoked dialog opens popup with OK button, does not auto-exec operator. */
func= RNA_def_function(srna, "invoke_props_dialog", "WM_operator_props_dialog_popup");
- RNA_def_function_ui_description(func, "Operator dialog (non-autoexec popup) invoke.");
+ RNA_def_function_ui_description(func, "Operator dialog (non-autoexec popup) invoke");
rna_generic_op_invoke(func, WM_GEN_INVOKE_SIZE|WM_GEN_INVOKE_RETURN);
/* invoke enum */
@@ -240,11 +240,11 @@ void RNA_api_wm(StructRNA *srna)
/* invoke functions, for use with python */
func= RNA_def_function(srna, "invoke_popup", "WM_operator_ui_popup");
- RNA_def_function_ui_description(func, "Operator popup invoke.");
+ RNA_def_function_ui_description(func, "Operator popup invoke");
rna_generic_op_invoke(func, WM_GEN_INVOKE_SIZE|WM_GEN_INVOKE_RETURN);
func= RNA_def_function(srna, "invoke_confirm", "WM_operator_confirm");
- RNA_def_function_ui_description(func, "Operator confirmation.");
+ RNA_def_function_ui_description(func, "Operator confirmation");
rna_generic_op_invoke(func, WM_GEN_INVOKE_EVENT|WM_GEN_INVOKE_RETURN);
}
@@ -266,7 +266,7 @@ void RNA_api_operator(StructRNA *srna)
/* poll */
func= RNA_def_function(srna, "poll", NULL);
- RNA_def_function_ui_description(func, "Test if the operator can be called or not.");
+ RNA_def_function_ui_description(func, "Test if the operator can be called or not");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", ""));
parm= RNA_def_pointer(func, "context", "Context", "", "");
@@ -274,7 +274,7 @@ void RNA_api_operator(StructRNA *srna)
/* exec */
func= RNA_def_function(srna, "execute", NULL);
- RNA_def_function_ui_description(func, "Execute the operator.");
+ RNA_def_function_ui_description(func, "Execute the operator");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
@@ -284,7 +284,7 @@ void RNA_api_operator(StructRNA *srna)
/* check */
func= RNA_def_function(srna, "check", NULL);
- RNA_def_function_ui_description(func, "Check the operator settings, return True to signal a change to redraw.");
+ RNA_def_function_ui_description(func, "Check the operator settings, return True to signal a change to redraw");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
@@ -294,7 +294,7 @@ void RNA_api_operator(StructRNA *srna)
/* invoke */
func= RNA_def_function(srna, "invoke", NULL);
- RNA_def_function_ui_description(func, "Invoke the operator.");
+ RNA_def_function_ui_description(func, "Invoke the operator");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
@@ -305,7 +305,7 @@ void RNA_api_operator(StructRNA *srna)
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "modal", NULL); /* same as invoke */
- RNA_def_function_ui_description(func, "Modal operator function.");
+ RNA_def_function_ui_description(func, "Modal operator function");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
@@ -317,14 +317,14 @@ void RNA_api_operator(StructRNA *srna)
/* draw */
func= RNA_def_function(srna, "draw", NULL);
- RNA_def_function_ui_description(func, "Draw function for the operator.");
+ RNA_def_function_ui_description(func, "Draw function for the operator");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* cancel */
func= RNA_def_function(srna, "cancel", NULL);
- RNA_def_function_ui_description(func, "Called when the operator is cancelled.");
+ RNA_def_function_ui_description(func, "Called when the operator is cancelled");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
@@ -350,7 +350,7 @@ void RNA_api_macro(StructRNA *srna)
/* poll */
func= RNA_def_function(srna, "poll", NULL);
- RNA_def_function_ui_description(func, "Test if the operator can be called or not.");
+ RNA_def_function_ui_description(func, "Test if the operator can be called or not");
RNA_def_function_flag(func, FUNC_NO_SELF|FUNC_REGISTER_OPTIONAL);
RNA_def_function_return(func, RNA_def_boolean(func, "visible", 1, "", ""));
parm= RNA_def_pointer(func, "context", "Context", "", "");
@@ -358,7 +358,7 @@ void RNA_api_macro(StructRNA *srna)
/* draw */
func= RNA_def_function(srna, "draw", NULL);
- RNA_def_function_ui_description(func, "Draw function for the operator.");
+ RNA_def_function_ui_description(func, "Draw function for the operator");
RNA_def_function_flag(func, FUNC_REGISTER_OPTIONAL);
parm= RNA_def_pointer(func, "context", "Context", "", "");
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
@@ -377,7 +377,7 @@ void RNA_api_keymap(StructRNA *srna)
func= RNA_def_function(srna, "active", "rna_keymap_active");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
- parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Active key map.");
+ parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Active key map");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "restore_to_default", "WM_keymap_restore_to_default");
@@ -420,7 +420,7 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_boolean(func, "alt", 0, "Alt", "");
RNA_def_boolean(func, "oskey", 0, "OS Key", "");
RNA_def_enum(func, "key_modifier", event_type_items, 0, "Key Modifier", "");
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item.");
+ parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "new_modal", "rna_KeyMap_item_new_modal");
@@ -437,7 +437,7 @@ void RNA_api_keymapitems(StructRNA *srna)
RNA_def_boolean(func, "alt", 0, "Alt", "");
RNA_def_boolean(func, "oskey", 0, "OS Key", "");
RNA_def_enum(func, "key_modifier", event_type_items, 0, "Key Modifier", "");
- parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item.");
+ parm= RNA_def_pointer(func, "item", "KeyMapItem", "Item", "Added key map item");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "WM_keymap_remove_item");
@@ -463,7 +463,7 @@ void RNA_api_keymaps(StructRNA *srna)
RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", "");
RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", "");
RNA_def_boolean(func, "modal", 0, "Modal", "");
- parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Added key map.");
+ parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Added key map");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "find", "rna_keymap_find"); // find_keymap
@@ -471,13 +471,13 @@ void RNA_api_keymaps(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_enum(func, "space_type", space_type_items, SPACE_EMPTY, "Space Type", "");
RNA_def_enum(func, "region_type", region_type_items, RGN_TYPE_WINDOW, "Region Type", "");
- parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map.");
+ parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "find_modal", "rna_keymap_find_modal"); // find_keymap_modal
parm= RNA_def_string(func, "name", "", 0, "Operator Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map.");
+ parm= RNA_def_pointer(func, "keymap", "KeyMap", "Key Map", "Corresponding key map");
RNA_def_function_return(func, parm);
}
@@ -489,11 +489,11 @@ void RNA_api_keyconfigs(StructRNA *srna)
func= RNA_def_function(srna, "new", "WM_keyconfig_new_user"); // add_keyconfig
parm= RNA_def_string(func, "name", "", 0, "Name", "");
RNA_def_property_flag(parm, PROP_REQUIRED);
- parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Added key configuration.");
+ parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Added key configuration");
RNA_def_function_return(func, parm);
func= RNA_def_function(srna, "remove", "WM_keyconfig_remove"); // remove_keyconfig
- parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Removed key configuration.");
+ parm= RNA_def_pointer(func, "keyconfig", "KeyConfig", "Key Configuration", "Removed key configuration");
RNA_def_property_flag(parm, PROP_REQUIRED);
}
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index 72b54dce473..11ec327c306 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -360,7 +360,7 @@ static void rna_def_lighting(BlenderRNA *brna)
prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "aosamp");
- RNA_def_property_range(prop, 1, 32);
+ RNA_def_property_range(prop, 1, 128);
RNA_def_property_ui_text(prop, "Samples", "Amount of ray samples. Higher values give smoother results and longer rendering times");
RNA_def_property_update(prop, 0, "rna_World_update");
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index ab75b4e6ffb..a1f834f4362 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -32,6 +32,7 @@ set(INC
../blenlib
../blenloader
../makesdna
+ ../makesrna
../render/extern/include
../../../intern/elbeem/extern
../../../intern/guardedalloc
@@ -39,6 +40,7 @@ set(INC
set(INC_SYS
${ZLIB_INCLUDE_DIRS}
+ ${GLEW_INCLUDE_PATH}
)
set(SRC
@@ -64,6 +66,7 @@ set(SRC
intern/MOD_meshdeform.c
intern/MOD_mirror.c
intern/MOD_multires.c
+ intern/MOD_navmesh.c
intern/MOD_none.c
intern/MOD_particleinstance.c
intern/MOD_particlesystem.c
@@ -81,11 +84,16 @@ set(SRC
intern/MOD_uvproject.c
intern/MOD_warp.c
intern/MOD_wave.c
+ intern/MOD_weightvg_util.c
+ intern/MOD_weightvgedit.c
+ intern/MOD_weightvgmix.c
+ intern/MOD_weightvgproximity.c
MOD_modifiertypes.h
intern/MOD_boolean_util.h
intern/MOD_fluidsim_util.h
intern/MOD_util.h
+ intern/MOD_weightvg_util.h
)
if(WITH_MOD_BOOLEAN)
@@ -109,4 +117,13 @@ if(NOT WITH_MOD_FLUID)
add_definitions(-DDISABLE_ELBEEM)
endif()
+if(WITH_GAMEENGINE)
+ # for MOD_navmesh.c
+ add_definitions(-DWITH_GAMEENGINE)
+ list(APPEND INC
+ ../gpu
+ ../../../extern/recastnavigation
+ )
+endif()
+
blender_add_lib(bf_modifiers "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/modifiers/MOD_modifiertypes.h b/source/blender/modifiers/MOD_modifiertypes.h
index 4e10c1711f5..f8068623ebb 100644
--- a/source/blender/modifiers/MOD_modifiertypes.h
+++ b/source/blender/modifiers/MOD_modifiertypes.h
@@ -72,6 +72,10 @@ extern ModifierTypeInfo modifierType_ShapeKey;
extern ModifierTypeInfo modifierType_Solidify;
extern ModifierTypeInfo modifierType_Screw;
extern ModifierTypeInfo modifierType_Warp;
+extern ModifierTypeInfo modifierType_NavMesh;
+extern ModifierTypeInfo modifierType_WeightVGEdit;
+extern ModifierTypeInfo modifierType_WeightVGMix;
+extern ModifierTypeInfo modifierType_WeightVGProximity;
extern ModifierTypeInfo modifierType_DynamicPaint;
/* MOD_util.c */
diff --git a/source/blender/modifiers/SConscript b/source/blender/modifiers/SConscript
index d1bb95761ff..77a2d577fb5 100644
--- a/source/blender/modifiers/SConscript
+++ b/source/blender/modifiers/SConscript
@@ -4,9 +4,10 @@ Import ('env')
sources = env.Glob('intern/*.c')
incs = '. ./intern'
-incs += ' #/intern/guardedalloc #/intern/decimation/extern #/intern/bsp/extern #/intern/elbeem/extern'
+incs += ' #/intern/guardedalloc #/intern/decimation/extern #/intern/bsp/extern #/intern/elbeem/extern #/extern/glew/include'
incs += ' ../render/extern/include ../blenloader'
-incs += ' ../include ../blenlib ../makesdna ../blenkernel ../blenkernel/intern'
+incs += ' ../include ../blenlib ../makesdna ../makesrna ../blenkernel ../blenkernel/intern'
+incs += ' ../gpu'
incs += ' ' + env['BF_ZLIB_INC']
@@ -19,6 +20,10 @@ defs += ['WITH_MOD_DECIMATE']
if env['BF_NO_ELBEEM']:
defs.append('DISABLE_ELBEEM')
+if env['WITH_BF_GAMEENGINE']:
+ incs += ' #/extern/recastnavigation'
+ defs.append('WITH_GAMEENGINE')
+
env.BlenderLib ( libname = 'bf_modifiers', sources = sources,
includes = Split(incs), defines=defs,
libtype=['core','player'], priority = [80, 40] )
diff --git a/source/blender/modifiers/intern/MOD_navmesh.c b/source/blender/modifiers/intern/MOD_navmesh.c
new file mode 100644
index 00000000000..cf4e01ad516
--- /dev/null
+++ b/source/blender/modifiers/intern/MOD_navmesh.c
@@ -0,0 +1,307 @@
+/*
+* $Id$
+*
+* ***** 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 by the Blender Foundation.
+* All rights reserved.
+*
+* Contributor(s):
+*
+* ***** END GPL LICENSE BLOCK *****
+*
+*/
+#include <math.h>
+
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+
+#ifdef WITH_GAMEENGINE
+# include "recast-capi.h"
+# include "BKE_navmesh_conversion.h"
+# include "GL/glew.h"
+# include "GPU_buffers.h"
+# include "GPU_draw.h"
+#endif
+
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_cdderivedmesh.h"
+#include "BKE_mesh.h"
+#include "BKE_modifier.h"
+#include "BKE_particle.h"
+#include "BKE_customdata.h"
+#include "MEM_guardedalloc.h"
+
+BM_INLINE int bit(int a, int b)
+{
+ return (a & (1 << b)) >> b;
+}
+
+BM_INLINE void intToCol(int i, float* col)
+{
+ int r = bit(i, 0) + bit(i, 3) * 2 + 1;
+ int g = bit(i, 1) + bit(i, 4) * 2 + 1;
+ int b = bit(i, 2) + bit(i, 5) * 2 + 1;
+ col[0] = 1 - r*63.0f/255.0f;
+ col[1] = 1 - g*63.0f/255.0f;
+ col[2] = 1 - b*63.0f/255.0f;
+}
+
+
+static void initData(ModifierData *UNUSED(md))
+{
+ /* NavMeshModifierData *nmmd = (NavMeshModifierData*) md; */ /* UNUSED */
+}
+
+static void copyData(ModifierData *UNUSED(md), ModifierData *UNUSED(target))
+{
+ /* NavMeshModifierData *nmmd = (NavMeshModifierData*) md; */
+ /* NavMeshModifierData *tnmmd = (NavMeshModifierData*) target; */
+
+ //.todo - deep copy
+}
+
+/*
+static void (*drawFacesSolid_original)(DerivedMesh *dm, float (*partial_redraw_planes)[4],
+ int fast, int (*setMaterial)(int, void *attribs)) = NULL;*/
+
+#ifdef WITH_GAMEENGINE
+
+static void drawNavMeshColored(DerivedMesh *dm)
+{
+ int a, glmode;
+ MVert *mvert = (MVert *)CustomData_get_layer(&dm->vertData, CD_MVERT);
+ MFace *mface = (MFace *)CustomData_get_layer(&dm->faceData, CD_MFACE);
+ int* polygonIdx = (int*)CustomData_get_layer(&dm->faceData, CD_RECAST);
+ const float BLACK_COLOR[3] = {0.f, 0.f, 0.f};
+ float col[3];
+
+ if (!polygonIdx)
+ return;
+
+ /*
+ //UI_ThemeColor(TH_WIRE);
+ glDisable(GL_LIGHTING);
+ glLineWidth(2.0);
+ dm->drawEdges(dm, 0, 1);
+ glLineWidth(1.0);
+ glEnable(GL_LIGHTING);*/
+
+ glDisable(GL_LIGHTING);
+ if(GPU_buffer_legacy(dm) ) {
+ DEBUG_VBO( "Using legacy code. drawNavMeshColored\n" );
+ //glShadeModel(GL_SMOOTH);
+ glBegin(glmode = GL_QUADS);
+ for(a = 0; a < dm->numFaceData; a++, mface++) {
+ int new_glmode = mface->v4?GL_QUADS:GL_TRIANGLES;
+ int polygonIdx = *(int*)CustomData_get(&dm->faceData, a, CD_RECAST);
+ if (polygonIdx<=0)
+ memcpy(col, BLACK_COLOR, 3*sizeof(float));
+ else
+ intToCol(polygonIdx, col);
+
+ if(new_glmode != glmode) {
+ glEnd();
+ glBegin(glmode = new_glmode);
+ }
+ glColor3fv(col);
+ glVertex3fv(mvert[mface->v1].co);
+ glVertex3fv(mvert[mface->v2].co);
+ glVertex3fv(mvert[mface->v3].co);
+ if(mface->v4) {
+ glVertex3fv(mvert[mface->v4].co);
+ }
+ }
+ glEnd();
+ }
+ glEnable(GL_LIGHTING);
+}
+
+static void navDM_drawFacesTex(DerivedMesh *dm, int (*setDrawOptions)(MTFace *tface, MCol *mcol, int matnr))
+{
+ (void) setDrawOptions;
+
+ drawNavMeshColored(dm);
+}
+
+static void navDM_drawFacesSolid(DerivedMesh *dm,
+ float (*partial_redraw_planes)[4],
+ int UNUSED(fast), int (*setMaterial)(int, void *attribs))
+{
+ (void) partial_redraw_planes;
+ (void) setMaterial;
+
+ //drawFacesSolid_original(dm, partial_redraw_planes, fast, setMaterial);
+ drawNavMeshColored(dm);
+}
+#endif /* WITH_GAMEENGINE */
+
+static DerivedMesh *createNavMeshForVisualization(NavMeshModifierData *UNUSED(mmd), DerivedMesh *dm)
+{
+#ifdef WITH_GAMEENGINE
+ DerivedMesh *result;
+ int maxFaces = dm->getNumFaces(dm);
+ int *recastData;
+ int vertsPerPoly=0, nverts=0, ndtris=0, npolys=0;
+ float* verts=NULL;
+ unsigned short *dtris=NULL, *dmeshes=NULL, *polys=NULL;
+ int *dtrisToPolysMap=NULL, *dtrisToTrisMap=NULL, *trisToFacesMap=NULL;
+ int res;
+
+ result = CDDM_copy(dm);
+ if (!CustomData_has_layer(&result->faceData, CD_RECAST))
+ {
+ int *sourceRecastData = (int*)CustomData_get_layer(&dm->faceData, CD_RECAST);
+ CustomData_add_layer_named(&result->faceData, CD_RECAST, CD_DUPLICATE,
+ sourceRecastData, maxFaces, "recastData");
+ }
+ recastData = (int*)CustomData_get_layer(&result->faceData, CD_RECAST);
+ result->drawFacesTex = navDM_drawFacesTex;
+ result->drawFacesSolid = navDM_drawFacesSolid;
+
+
+ //process mesh
+ res = buildNavMeshDataByDerivedMesh(dm, &vertsPerPoly, &nverts, &verts, &ndtris, &dtris,
+ &npolys, &dmeshes, &polys, &dtrisToPolysMap, &dtrisToTrisMap,
+ &trisToFacesMap);
+ if (res)
+ {
+ size_t polyIdx;
+
+ //invalidate concave polygon
+ for (polyIdx=0; polyIdx<(size_t)npolys; polyIdx++)
+ {
+ unsigned short* poly = &polys[polyIdx*2*vertsPerPoly];
+ if (!polyIsConvex(poly, vertsPerPoly, verts))
+ {
+ //set negative polygon idx to all faces
+ unsigned short *dmesh = &dmeshes[4*polyIdx];
+ unsigned short tbase = dmesh[2];
+ unsigned short tnum = dmesh[3];
+ unsigned short ti;
+
+ for (ti=0; ti<tnum; ti++)
+ {
+ unsigned short triidx = dtrisToTrisMap[tbase+ti];
+ unsigned short faceidx = trisToFacesMap[triidx];
+ if (recastData[faceidx]>0)
+ recastData[faceidx] = -recastData[faceidx];
+ }
+ }
+ }
+
+ }
+ else
+ {
+ printf("Error during creation polygon infos\n");
+ }
+
+ //clean up
+ if (verts!=NULL)
+ MEM_freeN(verts);
+ if (dtris!=NULL)
+ MEM_freeN(dtris);
+ if (dmeshes!=NULL)
+ MEM_freeN(dmeshes);
+ if (polys!=NULL)
+ MEM_freeN(polys);
+ if (dtrisToPolysMap!=NULL)
+ MEM_freeN(dtrisToPolysMap);
+ if (dtrisToTrisMap!=NULL)
+ MEM_freeN(dtrisToTrisMap);
+ if (trisToFacesMap!=NULL)
+ MEM_freeN(trisToFacesMap);
+
+ return result;
+#else // WITH_GAMEENGINE
+ return dm;
+#endif // WITH_GAMEENGINE
+}
+
+/*
+static int isDisabled(ModifierData *md, int useRenderParams)
+{
+ NavMeshModifierData *amd = (NavMeshModifierData*) md;
+ return false;
+}*/
+
+
+
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
+ int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+{
+ DerivedMesh *result = NULL;
+ NavMeshModifierData *nmmd = (NavMeshModifierData*) md;
+ int hasRecastData = CustomData_has_layer(&derivedData->faceData, CD_RECAST)>0;
+ if (ob->body_type!=OB_BODY_TYPE_NAVMESH || !hasRecastData )
+ {
+ //convert to nav mesh object:
+ //1)set physics type
+ ob->gameflag &= ~OB_COLLISION;
+ ob->gameflag |= OB_NAVMESH;
+ ob->body_type = OB_BODY_TYPE_NAVMESH;
+ //2)add and init recast data layer
+ if (!hasRecastData)
+ {
+ Mesh* obmesh = (Mesh *)ob->data;
+ if (obmesh)
+ {
+ int i;
+ int numFaces = obmesh->totface;
+ int* recastData;
+ CustomData_add_layer_named(&obmesh->fdata, CD_RECAST, CD_CALLOC, NULL, numFaces, "recastData");
+ recastData = (int*)CustomData_get_layer(&obmesh->fdata, CD_RECAST);
+ for (i=0; i<numFaces; i++)
+ {
+ recastData[i] = i+1;
+ }
+ CustomData_add_layer_named(&derivedData->faceData, CD_RECAST, CD_REFERENCE, recastData, numFaces, "recastData");
+ }
+ }
+ }
+
+ result = createNavMeshForVisualization(nmmd, derivedData);
+
+ return result;
+}
+
+
+ModifierTypeInfo modifierType_NavMesh = {
+ /* name */ "NavMesh",
+ /* structName */ "NavMeshModifierData",
+ /* structSize */ sizeof(NavMeshModifierData),
+ /* type */ eModifierTypeType_Constructive,
+ /* flags */ (ModifierTypeFlag) (eModifierTypeFlag_AcceptsMesh
+ | eModifierTypeFlag_Single),
+ /* copyData */ copyData,
+ /* deformVerts */ 0,
+ /* deformMatrices */ 0,
+ /* deformVertsEM */ 0,
+ /* deformMatricesEM */ 0,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ 0,
+ /* initData */ initData,
+ /* requiredDataMask */ 0,
+ /* freeData */ 0,
+ /* isDisabled */ 0,
+ /* updateDepgraph */ 0,
+ /* dependsOnTime */ 0,
+ /* foreachObjectLink */ 0,
+ /* foreachIDLink */ 0,
+};
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 4fdba0835c4..c901a64f4d0 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -295,6 +295,10 @@ void modifier_type_init(ModifierTypeInfo *types[])
INIT_TYPE(Solidify);
INIT_TYPE(Screw);
INIT_TYPE(Warp);
+ INIT_TYPE(NavMesh);
+ INIT_TYPE(WeightVGEdit);
+ INIT_TYPE(WeightVGMix);
+ INIT_TYPE(WeightVGProximity);
INIT_TYPE(DynamicPaint);
#undef INIT_TYPE
}
diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c
index 912c14adfdd..0c343332736 100644
--- a/source/blender/modifiers/intern/MOD_uvproject.c
+++ b/source/blender/modifiers/intern/MOD_uvproject.c
@@ -369,7 +369,6 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
}
if(override_image) {
- tface->mode = TF_TEX;
tface->tpage = image;
}
}
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index c1c3604d598..723e77cc6bb 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -232,8 +232,8 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob,
dv = &dvert[i];
if(dv) {
- weight = defvert_find_weight(dv, defgrp_index) * wmd->strength;
- if(weight <= 0.0f)
+ weight = defvert_find_weight(dv, defgrp_index) * strength;
+ if(weight <= 0.0f) /* Should never occure... */
continue;
}
}
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
new file mode 100644
index 00000000000..128e888ca90
--- /dev/null
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -0,0 +1,326 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 by Bastien Montagne.
+ * All rights reserved.
+ *
+ * Contributor(s): None yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/*
+ * XXX I'd like to make modified weights visible in WeightPaint mode,
+ * but couldn't figure a way to do this...
+ * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
+ * Or the WeightPaint mode code itself?
+ */
+
+#include "BLI_math.h"
+#include "BLI_rand.h"
+#include "BLI_string.h"
+#include "BLI_utildefines.h"
+
+#include "DNA_color_types.h" /* CurveMapping. */
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_object_types.h"
+
+#include "BKE_cdderivedmesh.h"
+#include "BKE_colortools.h" /* CurveMapping. */
+#include "BKE_deform.h"
+#include "BKE_mesh.h"
+#include "BKE_modifier.h"
+#include "BKE_texture.h" /* Texture masking. */
+
+#include "depsgraph_private.h"
+#include "MEM_guardedalloc.h"
+#include "MOD_util.h"
+#include "MOD_weightvg_util.h"
+#include "RE_shader_ext.h" /* Texture masking. */
+
+/* Maps new_w weights in place, using either one of the predifined functions, or a custom curve.
+ * Return values are in new_w.
+ * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real
+ * vertex index (in case the weight tables do not cover the whole vertices...).
+ * cmap might be NULL, in which case curve mapping mode will return unmodified data.
+ */
+void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cmap)
+{
+ int i;
+
+ /* Return immediately, if we have nothing to do! */
+ /* Also security checks... */
+ if(((falloff_type == MOD_WVG_MAPPING_CURVE) && (cmap == NULL))
+ || !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) {
+ float fac = new_w[i];
+
+ /* 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;
+ }
+
+ new_w[i] = fac;
+ }
+}
+
+/* Applies new_w weights to org_w ones, using either a texture, vgroup or constant value as factor.
+ * Return values are in org_w.
+ * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real
+ * vertex index (in case the weight tables do not cover the whole vertices...).
+ * XXX The standard “factor†value is assumed in [0.0, 1.0] range. Else, weird results might appear.
+ */
+void weightvg_do_mask(int num, const int *indices, float *org_w, const float *new_w,
+ Object *ob, DerivedMesh *dm, float fact, const char defgrp_name[32],
+ Tex *texture, int tex_use_channel, int tex_mapping,
+ Object *tex_map_object, const char *tex_uvlayer_name)
+{
+ int ref_didx;
+ int i;
+
+ /* If influence factor is null, nothing to do! */
+ if (fact == 0.0f) return;
+
+ /* If we want to mask vgroup weights from a texture. */
+ if (texture) {
+ /* The texture coordinates. */
+ float (*tex_co)[3];
+ /* See mapping note below... */
+ MappingInfoModifierData t_map;
+ float (*v_co)[3];
+
+ /* Use new generic get_texture_coords, but do not modify our DNA struct for it...
+ * XXX Why use a ModifierData stuff here ? Why not a simple, generic struct for parameters ?
+ * What e.g. if a modifier wants to use several textures ?
+ * Why use only v_co, and not MVert (or both) ?
+ */
+ t_map.texture = texture;
+ t_map.map_object = tex_map_object;
+ BLI_strncpy(t_map.uvlayer_name, tex_uvlayer_name, sizeof(t_map.uvlayer_name));
+ t_map.texmapping = tex_mapping;
+ v_co = MEM_mallocN(sizeof(*v_co) * num, "WeightVG Modifier, TEX mode, v_co");
+ dm->getVertCos(dm, v_co);
+ tex_co = MEM_callocN(sizeof(*tex_co) * num, "WeightVG Modifier, TEX mode, tex_co");
+ get_texture_coords(&t_map, ob, dm, v_co, tex_co, num);
+ MEM_freeN(v_co);
+
+ /* For each weight (vertex), make the mix between org and new weights. */
+ for(i = 0; i < num; ++i) {
+ int idx = indices ? indices[i] : i;
+ TexResult texres;
+ float h, s, v; /* For HSV color space. */
+
+ 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;
+ }
+ }
+
+ MEM_freeN(tex_co);
+ }
+ else if ((ref_didx = defgroup_name_index(ob, defgrp_name)) != -1) {
+ MDeformVert *dvert = NULL;
+
+ /* Check whether we want to set vgroup weights from a constant weight factor or a vertex
+ * group.
+ */
+ /* Get vgroup idx from its name. */
+
+ /* Proceed only if vgroup is valid, else use constant factor. */
+ /* Get actual dverts (ie vertex group data). */
+ dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
+ /* Proceed only if vgroup is valid, else assume factor = O. */
+ if (dvert == NULL) return;
+
+ /* For each weight (vertex), make the mix between org and new weights. */
+ 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));
+ /* If that vertex is not in ref vgroup, assume null factor, and hence do nothing! */
+ }
+ }
+ else {
+ /* Default "influence" behavior. */
+ /* For each weight (vertex), make the mix between org and new weights. */
+ const float ifact = 1.0f - fact;
+ for (i = 0; i < num; i++) {
+ org_w[i] = (new_w[i] * fact) + (org_w[i] * ifact);
+ }
+ }
+}
+
+/* Adds the given vertex to the specified vertex group, with given weight. */
+static void defvert_add_to_group(MDeformVert *dv, int defgrp_idx, const float weight) {
+ /* TODO, move into deform.c as a generic function. This assumes the vertex
+ * groups have already been checked, so this has to remain low level. */
+ MDeformWeight *newdw;
+
+ newdw = MEM_callocN(sizeof(MDeformWeight)*(dv->totweight+1), "defvert_add_to group, new deformWeight");
+ if(dv->dw) {
+ memcpy(newdw, dv->dw, sizeof(MDeformWeight)*dv->totweight);
+ MEM_freeN(dv->dw);
+ }
+ dv->dw = newdw;
+ dv->dw[dv->totweight].weight = weight;
+ dv->dw[dv->totweight].def_nr = defgrp_idx;
+ dv->totweight++;
+}
+
+/* Removes the given vertex from the vertex group, specified either by its defgrp_idx,
+ * or directly by its MDeformWeight pointer, if dw is not NULL.
+ * WARNING: This function frees the given MDeformWeight, do not use it afterward! */
+static void defvert_remove_from_group(MDeformVert *dv, int defgrp_idx, MDeformWeight *dw) {
+ /* TODO, move this into deform.c as a generic function. */
+ MDeformWeight *newdw;
+ int i;
+
+ /* Get index of removed MDeformWeight. */
+ if(dw == NULL) {
+ dw = dv->dw;
+ for (i = dv->totweight; i > 0; i--, dw++) {
+ if (dw->def_nr == defgrp_idx)
+ break;
+ }
+ i--;
+ }
+ else {
+ i = dw - dv->dw;
+ /* Security check! */
+ if(i < 0 || i >= dv->totweight)
+ return;
+ }
+
+ dv->totweight--;
+ /* If there are still other deform weights attached to this vert then remove
+ * this deform weight, and reshuffle the others.
+ */
+ if(dv->totweight) {
+ newdw = MEM_mallocN(sizeof(MDeformWeight)*(dv->totweight), "defvert_remove_from_group, new deformWeight");
+ if(dv->dw){
+ memcpy(newdw, dv->dw, sizeof(MDeformWeight)*i);
+ memcpy(newdw+i, dv->dw+i+1, sizeof(MDeformWeight)*(dv->totweight-i));
+ MEM_freeN(dv->dw);
+ }
+ dv->dw = newdw;
+ }
+ /* If there are no other deform weights left then just remove this one. */
+ else {
+ MEM_freeN(dv->dw);
+ dv->dw = NULL;
+ }
+}
+
+
+/* Applies weights to given vgroup (defgroup), and optionnaly add/remove vertices from the group.
+ * If dws is not NULL, it must be an array of MDeformWeight pointers of same length as weights (and
+ * defgrp_idx can then have any value).
+ * If indices is not NULL, it must be an array of same length as weights, mapping to the real
+ * vertex index (in case the weight array does not cover the whole vertices...).
+ */
+void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws, int num,
+ const int *indices, const float *weights, int do_add,
+ float add_thresh, int do_rem, float rem_thresh)
+{
+ int i;
+
+ for(i = 0; i < num; i++) {
+ float w = weights[i];
+ MDeformVert *dv = &dvert[indices ? indices[i] : i];
+ MDeformWeight *dw = dws ? dws[i] : defvert_find_index(dv, defgrp_idx);
+
+ /* Never allow weights out of [0.0, 1.0] range. */
+ CLAMP(w, 0.0f, 1.0f);
+
+ /* If the vertex is in this vgroup, remove it if needed, or just update it. */
+ if(dw != NULL) {
+ if(do_rem && w < rem_thresh) {
+ defvert_remove_from_group(dv, defgrp_idx, dw);
+ }
+ else {
+ dw->weight = w;
+ }
+ }
+ /* Else, add it if needed! */
+ else if(do_add && w > add_thresh) {
+ defvert_add_to_group(dv, defgrp_idx, w);
+ }
+ }
+}
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h
new file mode 100644
index 00000000000..a327bdf969b
--- /dev/null
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.h
@@ -0,0 +1,90 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 by Bastien Montagne.
+ * All rights reserved.
+ *
+ * Contributor(s): None yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/** \file blender/modifiers/intern/MOD_util.h
+ * \ingroup modifiers
+ */
+
+
+#ifndef MOD_WEIGHTVG_UTIL_H
+#define MOD_WEIGHTVG_UTIL_H
+
+/* so modifier types match their defines */
+#include "MOD_modifiertypes.h"
+
+struct CurveMapping;
+struct DerivedMesh;
+struct Object;
+struct Tex;
+
+/*
+ * XXX I'd like to make modified weights visible in WeightPaint mode,
+ * but couldn't figure a way to do this...
+ * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
+ * Or the WeightPaint mode code itself?
+ */
+
+/**************************************
+ * Util functions. *
+ **************************************/
+
+/* We cannot divide by zero (what a surprise...).
+ * So if -MOD_WEIGHTVGROUP_DIVMODE_ZEROFLOOR < weightf < MOD_WEIGHTVGROUP_DIVMODE_ZEROFLOOR,
+ * we clamp weightf to this value (or its negative version).
+ * Also used to avoid null power factor.
+ */
+#define MOD_WVG_ZEROFLOOR 1.0e-32f
+
+/* Maps new_w weights in place, using either one of the predifined functions, or a custom curve.
+ * Return values are in new_w.
+ * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real
+ * vertex index (in case the weight tables do not cover the whole vertices...).
+ * cmap might be NULL, in which case curve mapping mode will return unmodified data.
+ */
+void weightvg_do_map(int num, float *new_w, short mode, struct CurveMapping *cmap);
+
+/* Applies new_w weights to org_w ones, using either a texture, vgroup or constant value as factor.
+ * Return values are in org_w.
+ * If indices is not NULL, it must be a table of same length as org_w and new_w, mapping to the real
+ * vertex index (in case the weight tables do not cover the whole vertices...).
+ * XXX The standard “factor†value is assumed in [0.0, 1.0] range. Else, weird results might appear.
+ */
+void weightvg_do_mask(int num, const int *indices, float *org_w, const float *new_w, Object *ob,
+ DerivedMesh *dm, float fact, const char defgrp_name[32], Tex *texture,
+ int tex_use_channel, int tex_mapping, Object *tex_map_object,
+ const char *tex_uvlayer_name);
+
+/* Applies weights to given vgroup (defgroup), and optionnaly add/remove vertices from the group.
+ * If indices is not NULL, it must be a table of same length as weights, mapping to the real
+ * vertex index (in case the weight table does not cover the whole vertices...).
+ */
+void weightvg_update_vg(MDeformVert *dvert, int defgrp_idx, MDeformWeight **dws, int num,
+ const int *indices, const float *weights, int do_add,
+ float add_thresh, int do_rem, float rem_thresh);
+
+#endif /* MOD_WEIGHTVG_UTIL_H */
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
new file mode 100644
index 00000000000..233ad8baf0b
--- /dev/null
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -0,0 +1,330 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 by Bastien Montagne.
+ * All rights reserved.
+ *
+ * Contributor(s): None yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/*
+ * XXX I'd like to make modified weights visible in WeightPaint mode,
+ * but couldn't figure a way to do this...
+ * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
+ * Or the WeightPaint mode code itself?
+ */
+
+#include "BLI_utildefines.h"
+#include "BLI_math.h"
+#include "BLI_string.h"
+
+#include "DNA_color_types.h" /* CurveMapping. */
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_object_types.h"
+
+#include "BKE_cdderivedmesh.h"
+#include "BKE_colortools.h" /* CurveMapping. */
+#include "BKE_deform.h"
+#include "BKE_mesh.h"
+#include "BKE_modifier.h"
+#include "BKE_texture.h" /* Texture masking. */
+
+#include "depsgraph_private.h"
+#include "MEM_guardedalloc.h"
+#include "MOD_util.h"
+#include "MOD_weightvg_util.h"
+
+/**************************************
+ * Modifiers functions. *
+ **************************************/
+static void initData(ModifierData *md)
+{
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ wmd->edit_flags = 0;
+ wmd->falloff_type = MOD_WVG_MAPPING_NONE;
+ wmd->default_weight = 0.0f;
+
+ wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0);
+ curvemapping_initialize(wmd->cmap_curve);
+
+ wmd->rem_threshold = 0.01f;
+ wmd->add_threshold = 0.01f;
+
+ wmd->mask_constant = 1.0f;
+ wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */
+ wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL;
+}
+
+static void freeData(ModifierData *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;
+
+ BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name));
+
+ twmd->edit_flags = wmd->edit_flags;
+ twmd->falloff_type = wmd->falloff_type;
+ twmd->default_weight = wmd->default_weight;
+
+ twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve);
+
+ twmd->add_threshold = wmd->add_threshold;
+ twmd->rem_threshold = wmd->rem_threshold;
+
+ twmd->mask_constant = wmd->mask_constant;
+ BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name));
+ twmd->mask_texture = wmd->mask_texture;
+ twmd->mask_tex_use_channel = wmd->mask_tex_use_channel;
+ twmd->mask_tex_mapping = wmd->mask_tex_mapping;
+ twmd->mask_tex_map_obj = wmd->mask_tex_map_obj;
+ BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, sizeof(twmd->mask_tex_uvlayer_name));
+}
+
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
+{
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ CustomDataMask dataMask = 0;
+
+ /* We need vertex groups! */
+ dataMask |= CD_MASK_MDEFORMVERT;
+
+ /* Ask for UV coordinates if we need them. */
+ if(wmd->mask_tex_mapping == MOD_DISP_MAP_UV)
+ dataMask |= CD_MASK_MTFACE;
+
+ return dataMask;
+}
+
+static int dependsOnTime(ModifierData *md)
+{
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+
+ if(wmd->mask_texture)
+ return BKE_texture_dependsOnTime(wmd->mask_texture);
+ return 0;
+}
+
+static void foreachObjectLink(ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
+{
+ 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;
+
+ walk(userData, ob, (ID **)&wmd->mask_texture);
+
+ foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData);
+}
+
+static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData)
+{
+ walk(userData, ob, md, "mask_texture");
+}
+
+static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
+ Object *UNUSED(ob), DagNode *obNode)
+{
+ 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,
+ "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,
+ "WeightVGEdit Modifier");
+}
+
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+{
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ /* If no vertex group, bypass. */
+ return (wmd->defgrp_name[0] == '\0');
+}
+
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
+ int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+{
+ WeightVGEditModifierData *wmd = (WeightVGEditModifierData*) md;
+ DerivedMesh *dm = derivedData, *ret = NULL;
+#if 0
+ Mesh *ob_m = NULL;
+#endif
+ MDeformVert *dvert = NULL;
+ MDeformWeight **dw = NULL;
+ float *org_w; /* Array original weights. */
+ float *new_w; /* Array new weights. */
+ int numVerts;
+ int defgrp_idx;
+ int i;
+ char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */
+ /* Flags. */
+ int do_add = (wmd->edit_flags & MOD_WVG_EDIT_ADD2VG) != 0;
+ int do_rem = (wmd->edit_flags & MOD_WVG_EDIT_REMFVG) != 0;
+
+ /* Get number of verts. */
+ numVerts = dm->getNumVerts(dm);
+
+ /* Check if we can just return the original mesh.
+ * Must have verts and therefore verts assigned to vgroups to do anything useful!
+ */
+ if ((numVerts == 0) || (ob->defbase.first == NULL))
+ return dm;
+
+ /* Get vgroup idx from its name. */
+ defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name);
+ if (defgrp_idx < 0)
+ return dm;
+
+ /* XXX All this to avoid copying dm when not needed... However, it nearly doubles compute
+ * time! See scene 5 of the WeighVG test file...
+ */
+#if 0
+ /* Get actual dverts (ie vertex group data). */
+ dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
+ /* If no dverts, return unmodified data... */
+ if (dvert == NULL)
+ return dm;
+
+ /* Get org mesh, only to test whether affected cdata layer has already been copied
+ * somewhere up in the modifiers stack.
+ */
+ ob_m = get_mesh(ob);
+ if (ob_m == NULL)
+ return dm;
+
+ /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */
+ if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) {
+ /* XXX Seems to create problems with weightpaint mode???
+ * I'm missing something here, I guess...
+ */
+// DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */
+ ret = CDDM_copy(dm);
+ dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT);
+ if (dvert == NULL) {
+ ret->release(ret);
+ return dm;
+ }
+ rel_ret = 1;
+ }
+ else
+ ret = dm;
+#else
+ ret = CDDM_copy(dm);
+ rel_ret = 1;
+ dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT);
+ if (dvert == NULL) {
+ if (rel_ret)
+ ret->release(ret);
+ return dm;
+ }
+#endif
+
+ /* 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");
+ for (i = 0; i < numVerts; i++) {
+ dw[i] = defvert_find_index(&dvert[i], defgrp_idx);
+ if(dw[i]) {
+ org_w[i] = new_w[i] = dw[i]->weight;
+ }
+ else {
+ org_w[i] = new_w[i] = wmd->default_weight;
+ }
+ }
+
+ /* Do mapping. */
+ if (wmd->falloff_type != MOD_WVG_MAPPING_NONE) {
+ weightvg_do_map(numVerts, new_w, wmd->falloff_type, wmd->cmap_curve);
+ }
+
+ /* Do masking. */
+ weightvg_do_mask(numVerts, NULL, org_w, new_w, ob, ret, wmd->mask_constant,
+ wmd->mask_defgrp_name, wmd->mask_texture, wmd->mask_tex_use_channel,
+ wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name);
+
+ /* Update/add/remove from vgroup. */
+ weightvg_update_vg(dvert, defgrp_idx, dw, numVerts, NULL, org_w, do_add, wmd->add_threshold,
+ do_rem, wmd->rem_threshold);
+
+ /* Freeing stuff. */
+ MEM_freeN(org_w);
+ MEM_freeN(new_w);
+ MEM_freeN(dw);
+
+ /* Return the vgroup-modified mesh. */
+ return ret;
+}
+
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+ struct EditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
+{
+ return applyModifier(md, ob, derivedData, 0, 1);
+}
+
+
+ModifierTypeInfo modifierType_WeightVGEdit = {
+ /* name */ "VertexWeightEdit",
+ /* structName */ "WeightVGEditModifierData",
+ /* structSize */ sizeof(WeightVGEditModifierData),
+ /* type */ eModifierTypeType_Nonconstructive,
+ /* flags */ eModifierTypeFlag_AcceptsMesh
+/* |eModifierTypeFlag_SupportsMapping*/
+ |eModifierTypeFlag_SupportsEditmode,
+
+ /* copyData */ copyData,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ applyModifierEM,
+ /* initData */ initData,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ freeData,
+ /* isDisabled */ isDisabled,
+ /* updateDepgraph */ updateDepgraph,
+ /* dependsOnTime */ dependsOnTime,
+ /* dependsOnNormals */ NULL,
+ /* foreachObjectLink */ foreachObjectLink,
+ /* foreachIDLink */ foreachIDLink,
+ /* foreachTexLink */ foreachTexLink,
+};
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
new file mode 100644
index 00000000000..283e812e11c
--- /dev/null
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -0,0 +1,464 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 by Bastien Montagne.
+ * All rights reserved.
+ *
+ * Contributor(s): None yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/*
+ * XXX I'd like to make modified weights visible in WeightPaint mode,
+ * but couldn't figure a way to do this...
+ * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
+ * Or the WeightPaint mode code itself?
+ */
+
+#include "BLI_utildefines.h"
+#include "BLI_math.h"
+#include "BLI_string.h"
+
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_object_types.h"
+
+#include "BKE_cdderivedmesh.h"
+#include "BKE_deform.h"
+#include "BKE_mesh.h"
+#include "BKE_modifier.h"
+#include "BKE_texture.h" /* Texture masking. */
+
+#include "depsgraph_private.h"
+#include "MEM_guardedalloc.h"
+#include "MOD_util.h"
+#include "MOD_weightvg_util.h"
+
+
+/**
+ * This mixes the old weight with the new weight factor.
+ */
+static float mix_weight(float weight, float weight2, char mix_mode)
+{
+#if 0
+ /*
+ * XXX Don't know why, but the switch version takes many CPU time,
+ * and produces lag in realtime playback...
+ */
+ 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;
+ }
+#endif
+ if (mix_mode == MOD_WVG_MIX_SET)
+ return weight2;
+ else if (mix_mode == MOD_WVG_MIX_ADD)
+ return (weight + weight2);
+ else if (mix_mode == MOD_WVG_MIX_SUB)
+ return (weight - weight2);
+ else if (mix_mode == MOD_WVG_MIX_MUL)
+ return (weight * weight2);
+ else if (mix_mode == MOD_WVG_MIX_DIV) {
+ /* Avoid dividing by zero (or really small values). */
+ if (weight2 < 0.0f && weight2 > -MOD_WVG_ZEROFLOOR)
+ weight2 = -MOD_WVG_ZEROFLOOR;
+ else if (weight2 >= 0.0f && weight2 < MOD_WVG_ZEROFLOOR)
+ weight2 = MOD_WVG_ZEROFLOOR;
+ return (weight / weight2);
+ }
+ else if (mix_mode == MOD_WVG_MIX_DIF)
+ return (weight < weight2 ? weight2 - weight : weight - weight2);
+ else if (mix_mode == MOD_WVG_MIX_AVG)
+ return (weight + weight2) * 0.5f;
+ else return weight2;
+}
+
+/**************************************
+ * Modifiers functions. *
+ **************************************/
+static void initData(ModifierData *md)
+{
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+
+ wmd->default_weight_a = 0.0f;
+ wmd->default_weight_b = 0.0f;
+ wmd->mix_mode = MOD_WVG_MIX_SET;
+ wmd->mix_set = MOD_WVG_SET_AND;
+
+ wmd->mask_constant = 1.0f;
+ wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */
+ wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL;
+}
+
+static void copyData(ModifierData *md, ModifierData *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));
+ twmd->default_weight_a = wmd->default_weight_a;
+ twmd->default_weight_b = wmd->default_weight_b;
+ twmd->mix_mode = wmd->mix_mode;
+ twmd->mix_set = wmd->mix_set;
+
+ twmd->mask_constant = wmd->mask_constant;
+ BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name));
+ twmd->mask_texture = wmd->mask_texture;
+ twmd->mask_tex_use_channel = wmd->mask_tex_use_channel;
+ twmd->mask_tex_mapping = wmd->mask_tex_mapping;
+ twmd->mask_tex_map_obj = wmd->mask_tex_map_obj;
+ BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, sizeof(twmd->mask_tex_uvlayer_name));
+}
+
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
+{
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ CustomDataMask dataMask = 0;
+
+ /* We need vertex groups! */
+ dataMask |= CD_MASK_MDEFORMVERT;
+
+ /* Ask for UV coordinates if we need them. */
+ if(wmd->mask_tex_mapping == MOD_DISP_MAP_UV)
+ dataMask |= CD_MASK_MTFACE;
+
+ return dataMask;
+}
+
+static int dependsOnTime(ModifierData *md)
+{
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+
+ if(wmd->mask_texture)
+ return BKE_texture_dependsOnTime(wmd->mask_texture);
+ return 0;
+}
+
+static void foreachObjectLink(ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
+{
+ 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;
+
+ walk(userData, ob, (ID **)&wmd->mask_texture);
+
+ foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData);
+}
+
+static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData)
+{
+ walk(userData, ob, md, "mask_texture");
+}
+
+static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
+ Object *UNUSED(ob), DagNode *obNode)
+{
+ 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,
+ "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,
+ "WeightVGMix Modifier");
+}
+
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+{
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ /* If no vertex group, bypass. */
+ return (wmd->defgrp_name_a[0] == '\0');
+}
+
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
+ int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+{
+ WeightVGMixModifierData *wmd = (WeightVGMixModifierData*) md;
+ DerivedMesh *dm = derivedData, *ret = NULL;
+#if 0
+ Mesh *ob_m = NULL;
+#endif
+ MDeformVert *dvert = NULL;
+ MDeformWeight **dw1, **tdw1, **dw2, **tdw2;
+ int numVerts;
+ int defgrp_idx, defgrp_idx2 = -1;
+ float *org_w;
+ float *new_w;
+ int *tidx, *indices = NULL;
+ int numIdx = 0;
+ int i;
+ char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */
+
+ /* Get number of verts. */
+ numVerts = dm->getNumVerts(dm);
+
+ /* Check if we can just return the original mesh.
+ * Must have verts and therefore verts assigned to vgroups to do anything useful!
+ */
+ if ((numVerts == 0) || (ob->defbase.first == NULL))
+ return dm;
+
+ /* Get vgroup idx from its name. */
+ defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name_a);
+ if (defgrp_idx < 0)
+ return dm;
+ /* Get seconf vgroup idx from its name, if given. */
+ if (wmd->defgrp_name_b[0] != (char)0) {
+ defgrp_idx2 = defgroup_name_index(ob, wmd->defgrp_name_b);
+ if (defgrp_idx2 < 0)
+ return dm;
+ }
+
+ /* XXX All this to avoid copying dm when not needed... However, it nearly doubles compute
+ * time! See scene 5 of the WeighVG test file...
+ */
+#if 0
+ /* Get actual dverts (ie vertex group data). */
+ dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
+ /* If no dverts, return unmodified data... */
+ if (dvert == NULL)
+ return dm;
+
+ /* Get org mesh, only to test whether affected cdata layer has already been copied
+ * somewhere up in the modifiers stack.
+ */
+ ob_m = get_mesh(ob);
+ if (ob_m == NULL)
+ return dm;
+
+ /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */
+ if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) {
+ /* XXX Seems to create problems with weightpaint mode???
+ * I'm missing something here, I guess...
+ */
+// DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */
+ ret = CDDM_copy(dm);
+ dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT);
+ if (dvert == NULL) {
+ ret->release(ret);
+ return dm;
+ }
+ rel_ret = 1;
+ }
+ else
+ ret = dm;
+#else
+ ret = CDDM_copy(dm);
+ rel_ret = 1;
+ dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT);
+ if (dvert == NULL) {
+ if (rel_ret)
+ ret->release(ret);
+ return dm;
+ }
+#endif
+
+ /* 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");
+ 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;
+ }
+ }
+ 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_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;
+ }
+ if(numIdx == 0) {
+ /* Use no vertices! Hence, return org data. */
+ MEM_freeN(tdw1);
+ MEM_freeN(tdw2);
+ MEM_freeN(tidx);
+ if (rel_ret)
+ ret->release(ret);
+ return dm;
+ }
+ 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);
+ MEM_freeN(tdw1);
+ dw2 = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, "WeightVGMix Modifier, dw2");
+ memcpy(dw2, tdw2, sizeof(MDeformWeight*) * numIdx);
+ MEM_freeN(tdw2);
+ }
+ else {
+ /* Use all vertices. */
+ numIdx = numVerts;
+ /* Just copy MDeformWeight pointers arrays, they will be freed at the end. */
+ dw1 = tdw1;
+ dw2 = tdw2;
+ }
+ MEM_freeN(tidx);
+
+ org_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGMix Modifier, org_w");
+ new_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGMix Modifier, new_w");
+
+ /* Mix weights. */
+ for (i = 0; i < numIdx; i++) {
+ float weight2 = 0.0;
+ org_w[i] = dw1[i] ? dw1[i]->weight : wmd->default_weight_a;
+ weight2 = dw2[i] ? dw2[i]->weight : wmd->default_weight_b;
+
+ new_w[i] = mix_weight(org_w[i], weight2, wmd->mix_mode);
+ }
+
+ /* Do masking. */
+ weightvg_do_mask(numIdx, indices, org_w, new_w, ob, ret, wmd->mask_constant,
+ wmd->mask_defgrp_name, wmd->mask_texture, wmd->mask_tex_use_channel,
+ wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name);
+
+ /* Update (add to) vgroup.
+ * XXX Depending on the MOD_WVG_SET_xxx option chosen, we might have to add vertices to vgroup.
+ */
+ weightvg_update_vg(dvert, defgrp_idx, dw1, numIdx, indices, org_w, TRUE, -FLT_MAX, FALSE, 0.0f);
+
+ /* Freeing stuff. */
+ MEM_freeN(org_w);
+ MEM_freeN(new_w);
+ MEM_freeN(dw1);
+ MEM_freeN(dw2);
+
+ if (indices)
+ MEM_freeN(indices);
+
+ /* Return the vgroup-modified mesh. */
+ return ret;
+}
+
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+ struct EditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
+{
+ return applyModifier(md, ob, derivedData, 0, 1);
+}
+
+
+ModifierTypeInfo modifierType_WeightVGMix = {
+ /* name */ "VertexWeightMix",
+ /* structName */ "WeightVGMixModifierData",
+ /* structSize */ sizeof(WeightVGMixModifierData),
+ /* type */ eModifierTypeType_Nonconstructive,
+ /* flags */ eModifierTypeFlag_AcceptsMesh
+/* |eModifierTypeFlag_SupportsMapping*/
+ |eModifierTypeFlag_SupportsEditmode,
+
+ /* copyData */ copyData,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ applyModifierEM,
+ /* initData */ initData,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ NULL,
+ /* isDisabled */ isDisabled,
+ /* updateDepgraph */ updateDepgraph,
+ /* dependsOnTime */ dependsOnTime,
+ /* dependsOnNormals */ NULL,
+ /* foreachObjectLink */ foreachObjectLink,
+ /* foreachIDLink */ foreachIDLink,
+ /* foreachTexLink */ foreachTexLink,
+};
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
new file mode 100644
index 00000000000..76be25a2b10
--- /dev/null
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -0,0 +1,573 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2011 by Bastien Montagne.
+ * All rights reserved.
+ *
+ * Contributor(s): None yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ *
+ */
+
+/*
+ * XXX I'd like to make modified weights visible in WeightPaint mode,
+ * but couldn't figure a way to do this...
+ * Maybe this will need changes in mesh_calc_modifiers (DerivedMesh.c)?
+ * Or the WeightPaint mode code itself?
+ */
+
+#include "BLI_editVert.h"
+#include "BLI_math.h"
+#include "BLI_string.h"
+#include "BLI_utildefines.h"
+
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_object_types.h"
+
+#include "BKE_cdderivedmesh.h"
+#include "BKE_deform.h"
+#include "BKE_mesh.h"
+#include "BKE_modifier.h"
+#include "BKE_shrinkwrap.h" /* For SpaceTransform stuff. */
+#include "BKE_texture.h" /* Texture masking. */
+
+#include "depsgraph_private.h"
+#include "MEM_guardedalloc.h"
+#include "MOD_util.h"
+#include "MOD_weightvg_util.h"
+
+/**************************************
+ * Util functions. *
+ **************************************/
+
+/* Util macro. */
+#define OUT_OF_MEMORY() ((void)printf("WeightVGProximity: Out of memory.\n"))
+
+/**
+ * Find nearest vertex and/or edge and/or face, for each vertex (adapted from shrinkwrap.c).
+ */
+static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
+ float *dist_v, float *dist_e, float *dist_f,
+ DerivedMesh *target, const SpaceTransform *loc2trgt)
+{
+ int i;
+ 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;
+
+ if (dist_v) {
+ /* Create a bvh-tree of the given target's verts. */
+ bvhtree_from_mesh_verts(&treeData_v, target, 0.0, 2, 6);
+ if(treeData_v.tree == NULL) {
+ OUT_OF_MEMORY();
+ return;
+ }
+ }
+ if (dist_e) {
+ /* Create a bvh-tree of the given target's edges. */
+ bvhtree_from_mesh_edges(&treeData_e, target, 0.0, 2, 6);
+ if(treeData_e.tree == NULL) {
+ OUT_OF_MEMORY();
+ return;
+ }
+ }
+ if (dist_f) {
+ /* Create a bvh-tree of the given target's faces. */
+ bvhtree_from_mesh_faces(&treeData_f, target, 0.0, 2, 6);
+ if(treeData_f.tree == NULL) {
+ OUT_OF_MEMORY();
+ return;
+ }
+ }
+
+ /* Setup nearest. */
+ nearest_v.index = nearest_e.index = nearest_f.index = -1;
+ /*nearest_v.dist = nearest_e.dist = nearest_f.dist = FLT_MAX;*/
+ /* Find the nearest vert/edge/face. */
+#ifndef __APPLE__
+#pragma omp parallel for default(none) private(i) firstprivate(nearest_v,nearest_e,nearest_f) \
+ shared(treeData_v,treeData_e,treeData_f,numVerts,v_cos,dist_v,dist_e, \
+ dist_f,loc2trgt) \
+ schedule(static)
+#endif
+ for (i = 0; i < numVerts; ++i) {
+ float tmp_co[3];
+
+ /* Convert the vertex to tree coordinates. */
+ copy_v3_v3(tmp_co, v_cos[i]);
+ space_transform_apply(loc2trgt, tmp_co);
+
+ /* Use local proximity heuristics (to reduce the nearest search).
+ *
+ * If we already had an hit before, we assume this vertex is going to have a close hit to
+ * that other vertex, so we can initiate the "nearest.dist" with the expected value to that
+ * last hit.
+ * This will lead in prunning of the search tree.
+ */
+ if (dist_v) {
+ nearest_v.dist = nearest_v.index != -1 ? len_squared_v3v3(tmp_co, nearest_v.co) : FLT_MAX;
+ /* Compute and store result. If invalid (-1 idx), keep FLT_MAX dist. */
+ BLI_bvhtree_find_nearest(treeData_v.tree, tmp_co, &nearest_v, treeData_v.nearest_callback, &treeData_v);
+ dist_v[i] = sqrtf(nearest_v.dist);
+ }
+ if (dist_e) {
+ nearest_e.dist = nearest_e.index != -1 ? len_squared_v3v3(tmp_co, nearest_e.co) : FLT_MAX;
+ /* Compute and store result. If invalid (-1 idx), keep FLT_MAX dist. */
+ BLI_bvhtree_find_nearest(treeData_e.tree, tmp_co, &nearest_e, treeData_e.nearest_callback, &treeData_e);
+ dist_e[i] = sqrtf(nearest_e.dist);
+ }
+ if (dist_f) {
+ nearest_f.dist = nearest_f.index != -1 ? len_squared_v3v3(tmp_co, nearest_f.co) : FLT_MAX;
+ /* Compute and store result. If invalid (-1 idx), keep FLT_MAX dist. */
+ BLI_bvhtree_find_nearest(treeData_f.tree, tmp_co, &nearest_f, treeData_f.nearest_callback, &treeData_f);
+ dist_f[i] = sqrtf(nearest_f.dist);
+ }
+ }
+
+ if (dist_v)
+ free_bvhtree_from_mesh(&treeData_v);
+ if (dist_e)
+ free_bvhtree_from_mesh(&treeData_e);
+ if (dist_f)
+ free_bvhtree_from_mesh(&treeData_f);
+}
+
+/**
+ * Returns the real distance between a vertex and another reference object.
+ * 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)
+{
+ /* Vertex and ref object coordinates. */
+ float v_wco[3];
+ unsigned int i= numVerts;
+
+ while(i-- > 0) {
+ /* Get world-coordinates of the vertex (constraints and anim included). */
+ mul_v3_m4v3(v_wco, ob->obmat, v_cos[i]);
+ /* Return distance between both coordinates. */
+ dist[i] = len_v3v3(v_wco, obr->obmat[3]);
+ }
+}
+
+/**
+ * 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)
+{
+ return len_v3v3(ob->obmat[3], obr->obmat[3]);
+}
+
+/**
+ * Maps distances to weights, with an optionnal “smoothing†mapping.
+ */
+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;
+ if(max_d == min_d) {
+ while (i-- > 0) {
+ weights[i] = (weights[i] >= max_d) ? 1.0f : 0.0f; /* "Step" behavior... */
+ }
+ }
+ 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;
+ }
+ }
+ 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(!ELEM(mode, MOD_WVG_MAPPING_NONE, MOD_WVG_MAPPING_CURVE)) {
+ weightvg_do_map(nidx, weights, mode, NULL);
+ }
+}
+
+/**************************************
+ * Modifiers functions. *
+ **************************************/
+static void initData(ModifierData *md)
+{
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+
+ wmd->proximity_mode = MOD_WVG_PROXIMITY_OBJECT;
+ wmd->proximity_flags = MOD_WVG_PROXIMITY_GEOM_VERTS;
+
+ wmd->falloff_type = MOD_WVG_MAPPING_NONE;
+
+ wmd->mask_constant = 1.0f;
+ wmd->mask_tex_use_channel = MOD_WVG_MASK_TEX_USE_INT; /* Use intensity by default. */
+ wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL;
+ wmd->max_dist = 1.0f; /* vert arbitrary distance, but don't use 0 */
+}
+
+static void copyData(ModifierData *md, ModifierData *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;
+ twmd->proximity_flags = wmd->proximity_flags;
+ twmd->proximity_ob_target = wmd->proximity_ob_target;
+
+ twmd->falloff_type = wmd->falloff_type;
+
+ twmd->mask_constant = wmd->mask_constant;
+ BLI_strncpy(twmd->mask_defgrp_name, wmd->mask_defgrp_name, sizeof(twmd->mask_defgrp_name));
+ twmd->mask_texture = wmd->mask_texture;
+ twmd->mask_tex_use_channel = wmd->mask_tex_use_channel;
+ twmd->mask_tex_mapping = wmd->mask_tex_mapping;
+ twmd->mask_tex_map_obj = wmd->mask_tex_map_obj;
+ BLI_strncpy(twmd->mask_tex_uvlayer_name, wmd->mask_tex_uvlayer_name, sizeof(twmd->mask_tex_uvlayer_name));
+ twmd->min_dist = wmd->min_dist;
+ twmd->max_dist = wmd->max_dist;
+}
+
+static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
+{
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ CustomDataMask dataMask = 0;
+
+ /* We need vertex groups! */
+ dataMask |= CD_MASK_MDEFORMVERT;
+
+ /* Ask for UV coordinates if we need them. */
+ if(wmd->mask_tex_mapping == MOD_DISP_MAP_UV)
+ dataMask |= CD_MASK_MTFACE;
+
+ return dataMask;
+}
+
+static int dependsOnTime(ModifierData *md)
+{
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+
+ if(wmd->mask_texture)
+ return BKE_texture_dependsOnTime(wmd->mask_texture);
+ return 0;
+}
+
+static void foreachObjectLink(ModifierData *md, Object *ob,
+ void (*walk)(void *userData, Object *ob, Object **obpoin),
+ void *userData)
+{
+ 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;
+
+ walk(userData, ob, (ID **)&wmd->mask_texture);
+
+ foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData);
+}
+
+static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData)
+{
+ walk(userData, ob, md, "mask_texture");
+}
+
+static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
+ Object *UNUSED(ob), DagNode *obNode)
+{
+ 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,
+ "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,
+ "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,
+ "WeightVGProximity Modifier");
+}
+
+static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+{
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ /* If no vertex group, bypass. */
+ if (wmd->defgrp_name[0] == '\0') return 1;
+ /* If no target object, bypass. */
+ return (wmd->proximity_ob_target == NULL);
+}
+
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
+ int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+{
+ WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData*) md;
+ DerivedMesh *dm = derivedData, *ret = NULL;
+#if 0
+ Mesh *ob_m = NULL;
+#endif
+ MDeformVert *dvert = NULL;
+ MDeformWeight **dw, **tdw;
+ int numVerts;
+ float (*v_cos)[3] = NULL; /* The vertices coordinates. */
+ Object *obr = NULL; /* Our target object. */
+ int defgrp_idx;
+ float *tw = NULL;
+ float *org_w = NULL;
+ float *new_w =NULL;
+ int *tidx, *indices = NULL;
+ int numIdx = 0;
+ int i;
+ char rel_ret = 0; /* Boolean, whether we have to release ret dm or not, when not using it! */
+
+ /* Get number of verts. */
+ numVerts = dm->getNumVerts(dm);
+
+ /* Check if we can just return the original mesh.
+ * Must have verts and therefore verts assigned to vgroups to do anything useful!
+ */
+ if ((numVerts == 0) || (ob->defbase.first == NULL))
+ return dm;
+
+ /* Get our target object. */
+ obr = wmd->proximity_ob_target;
+ if (obr == NULL)
+ return dm;
+
+ /* Get vgroup idx from its name. */
+ defgrp_idx = defgroup_name_index(ob, wmd->defgrp_name);
+ if (defgrp_idx < 0)
+ return dm;
+
+ /* XXX All this to avoid copying dm when not needed... However, it nearly doubles compute
+ * time! See scene 5 of the WeighVG test file...
+ */
+#if 0
+ /* Get actual dverts (ie vertex group data). */
+ dvert = dm->getVertDataArray(dm, CD_MDEFORMVERT);
+ /* If no dverts, return unmodified data... */
+ if (dvert == NULL)
+ return dm;
+
+ /* Get org mesh, only to test whether affected cdata layer has already been copied
+ * somewhere up in the modifiers stack.
+ */
+ ob_m = get_mesh(ob);
+ if (ob_m == NULL)
+ return dm;
+
+ /* Create a copy of our dmesh, only if our affected cdata layer is the same as org mesh. */
+ if (dvert == CustomData_get_layer(&ob_m->vdata, CD_MDEFORMVERT)) {
+ /* XXX Seems to create problems with weightpaint mode???
+ * I'm missing something here, I guess...
+ */
+// DM_set_only_copy(dm, CD_MASK_MDEFORMVERT); /* Only copy defgroup layer. */
+ ret = CDDM_copy(dm);
+ dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT);
+ if (dvert == NULL) {
+ ret->release(ret);
+ return dm;
+ }
+ rel_ret = 1;
+ }
+ else
+ ret = dm;
+#else
+ ret = CDDM_copy(dm);
+ rel_ret = 1;
+ dvert = ret->getVertDataArray(ret, CD_MDEFORMVERT);
+ if (dvert == NULL) {
+ if (rel_ret)
+ ret->release(ret);
+ return dm;
+ }
+#endif
+
+ /* Find out which vertices to work on (all vertices in vgroup), and get their relevant weight.
+ */
+ 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");
+ for (i = 0; i < numVerts; i++) {
+ MDeformWeight *_dw = defvert_find_index(&dvert[i], defgrp_idx);
+ if(_dw) {
+ tidx[numIdx] = i;
+ tw[numIdx] = _dw->weight;
+ tdw[numIdx++] = _dw;
+ }
+ }
+ /* If no vertices found, return org data! */
+ if(numIdx == 0) {
+ MEM_freeN(tidx);
+ MEM_freeN(tw);
+ MEM_freeN(tdw);
+ if (rel_ret)
+ ret->release(ret);
+ return dm;
+ }
+ indices = MEM_mallocN(sizeof(int) * numIdx, "WeightVGProximity Modifier, indices");
+ memcpy(indices, tidx, sizeof(int) * numIdx);
+ org_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, org_w");
+ new_w = MEM_mallocN(sizeof(float) * numIdx, "WeightVGProximity Modifier, new_w");
+ memcpy(org_w, tw, sizeof(float) * numIdx);
+ dw = MEM_mallocN(sizeof(MDeformWeight*) * numIdx, "WeightVGProximity Modifier, dw");
+ memcpy(dw, tdw, sizeof(MDeformWeight*) * numIdx);
+ MEM_freeN(tidx);
+ MEM_freeN(tw);
+ MEM_freeN(tdw);
+
+ /* Get our vertex coordinates. */
+ v_cos = MEM_mallocN(sizeof(float[3]) * numIdx, "WeightVGProximity Modifier, v_cos");
+ for (i = 0; i < numIdx; i++)
+ ret->getVertCo(ret, indices[i], v_cos[i]);
+
+ /* Compute wanted distances. */
+ if (wmd->proximity_mode == MOD_WVG_PROXIMITY_OBJECT) {
+ const float dist = get_ob2ob_distance(ob, obr);
+ for(i = 0; i < numIdx; i++)
+ new_w[i] = dist;
+ }
+ else if (wmd->proximity_mode == MOD_WVG_PROXIMITY_GEOMETRY) {
+ const short use_trgt_verts = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_VERTS);
+ const short use_trgt_edges = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_EDGES);
+ const short use_trgt_faces = (wmd->proximity_flags & MOD_WVG_PROXIMITY_GEOM_FACES);
+
+ if (use_trgt_verts || use_trgt_edges || use_trgt_faces) {
+ DerivedMesh *target_dm = obr->derivedFinal;
+ if (!target_dm) {
+ 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;
+ if (me->edit_mesh)
+ target_dm = CDDM_from_editmesh((EditMesh*)me->edit_mesh, me);
+ else
+ target_dm = CDDM_from_mesh(me, obr);
+ }
+ }
+
+ /* 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;
+
+ space_transform_setup(&loc2trgt, ob, obr);
+ get_vert2geom_distance(numIdx, v_cos, dists_v, dists_e, dists_f,
+ target_dm, &loc2trgt);
+ for(i = 0; i < numIdx; i++) {
+ new_w[i] = dists_v ? dists_v[i] : FLT_MAX;
+ if(dists_e)
+ new_w[i] = minf(dists_e[i], new_w[i]);
+ if(dists_f)
+ new_w[i] = minf(dists_f[i], new_w[i]);
+ }
+ if(dists_v) MEM_freeN(dists_v);
+ if(dists_e) MEM_freeN(dists_e);
+ if(dists_f) MEM_freeN(dists_f);
+ }
+ /* Else, fall back to default obj2vert behavior. */
+ else {
+ get_vert2ob_distance(numIdx, v_cos, new_w, ob, obr);
+ }
+ }
+ else {
+ get_vert2ob_distance(numIdx, v_cos, new_w, ob, obr);
+ }
+ }
+
+ /* Map distances to weights. */
+ do_map(new_w, numIdx, wmd->min_dist, wmd->max_dist, wmd->falloff_type);
+
+ /* Do masking. */
+ weightvg_do_mask(numIdx, indices, org_w, new_w, ob, ret, wmd->mask_constant,
+ wmd->mask_defgrp_name, wmd->mask_texture, wmd->mask_tex_use_channel,
+ wmd->mask_tex_mapping, wmd->mask_tex_map_obj, wmd->mask_tex_uvlayer_name);
+
+ /* Update vgroup. Note we never add nor remove vertices from vgroup here. */
+ weightvg_update_vg(dvert, defgrp_idx, dw, numIdx, indices, org_w, FALSE, 0.0f, FALSE, 0.0f);
+
+ /* Freeing stuff. */
+ MEM_freeN(org_w);
+ MEM_freeN(new_w);
+ MEM_freeN(dw);
+ MEM_freeN(indices);
+ MEM_freeN(v_cos);
+
+ /* Return the vgroup-modified mesh. */
+ return ret;
+}
+
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+ struct EditMesh *UNUSED(editData),
+ DerivedMesh *derivedData)
+{
+ return applyModifier(md, ob, derivedData, 0, 1);
+}
+
+
+ModifierTypeInfo modifierType_WeightVGProximity = {
+ /* name */ "VertexWeightProximity",
+ /* structName */ "WeightVGProximityModifierData",
+ /* structSize */ sizeof(WeightVGProximityModifierData),
+ /* type */ eModifierTypeType_Nonconstructive,
+ /* flags */ eModifierTypeFlag_AcceptsMesh
+/* |eModifierTypeFlag_SupportsMapping*/
+ |eModifierTypeFlag_SupportsEditmode,
+
+ /* copyData */ copyData,
+ /* deformVerts */ NULL,
+ /* deformMatrices */ NULL,
+ /* deformVertsEM */ NULL,
+ /* deformMatricesEM */ NULL,
+ /* applyModifier */ applyModifier,
+ /* applyModifierEM */ applyModifierEM,
+ /* initData */ initData,
+ /* requiredDataMask */ requiredDataMask,
+ /* freeData */ NULL,
+ /* isDisabled */ isDisabled,
+ /* updateDepgraph */ updateDepgraph,
+ /* dependsOnTime */ dependsOnTime,
+ /* dependsOnNormals */ NULL,
+ /* foreachObjectLink */ foreachObjectLink,
+ /* foreachIDLink */ foreachIDLink,
+ /* foreachTexLink */ foreachTexLink,
+};
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index c3bd37c18ee..82848c6a5d7 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -38,117 +38,137 @@ set(INC
set(INC_SYS
${GLEW_INCLUDE_PATH}
+ intern
+ composite
+ shader
+ texture
)
set(SRC
- intern/CMP_nodes/CMP_alphaOver.c
- intern/CMP_nodes/CMP_bilateralblur.c
- intern/CMP_nodes/CMP_blur.c
- intern/CMP_nodes/CMP_brightness.c
- intern/CMP_nodes/CMP_channelMatte.c
- intern/CMP_nodes/CMP_chromaMatte.c
- intern/CMP_nodes/CMP_colorMatte.c
- intern/CMP_nodes/CMP_colorSpill.c
- intern/CMP_nodes/CMP_colorbalance.c
- intern/CMP_nodes/CMP_composite.c
- intern/CMP_nodes/CMP_crop.c
- intern/CMP_nodes/CMP_curves.c
- intern/CMP_nodes/CMP_defocus.c
- intern/CMP_nodes/CMP_diffMatte.c
- intern/CMP_nodes/CMP_dilate.c
- intern/CMP_nodes/CMP_directionalblur.c
- intern/CMP_nodes/CMP_displace.c
- intern/CMP_nodes/CMP_distanceMatte.c
- intern/CMP_nodes/CMP_filter.c
- intern/CMP_nodes/CMP_flip.c
- intern/CMP_nodes/CMP_gamma.c
- intern/CMP_nodes/CMP_glare.c
- intern/CMP_nodes/CMP_hueSatVal.c
- intern/CMP_nodes/CMP_huecorrect.c
- intern/CMP_nodes/CMP_idMask.c
- intern/CMP_nodes/CMP_image.c
- intern/CMP_nodes/CMP_invert.c
- intern/CMP_nodes/CMP_lensdist.c
- intern/CMP_nodes/CMP_levels.c
- intern/CMP_nodes/CMP_lummaMatte.c
- intern/CMP_nodes/CMP_mapUV.c
- intern/CMP_nodes/CMP_mapValue.c
- intern/CMP_nodes/CMP_math.c
- intern/CMP_nodes/CMP_mixrgb.c
- intern/CMP_nodes/CMP_normal.c
- intern/CMP_nodes/CMP_normalize.c
- intern/CMP_nodes/CMP_outputFile.c
- intern/CMP_nodes/CMP_premulkey.c
- intern/CMP_nodes/CMP_rgb.c
- intern/CMP_nodes/CMP_rotate.c
- intern/CMP_nodes/CMP_scale.c
- intern/CMP_nodes/CMP_sepcombHSVA.c
- intern/CMP_nodes/CMP_sepcombRGBA.c
- intern/CMP_nodes/CMP_sepcombYCCA.c
- intern/CMP_nodes/CMP_sepcombYUVA.c
- intern/CMP_nodes/CMP_setalpha.c
- intern/CMP_nodes/CMP_splitViewer.c
- intern/CMP_nodes/CMP_texture.c
- intern/CMP_nodes/CMP_tonemap.c
- intern/CMP_nodes/CMP_translate.c
- intern/CMP_nodes/CMP_valToRgb.c
- intern/CMP_nodes/CMP_value.c
- intern/CMP_nodes/CMP_vecBlur.c
- intern/CMP_nodes/CMP_viewer.c
- intern/CMP_nodes/CMP_zcombine.c
- intern/CMP_util.c
- intern/SHD_nodes/SHD_camera.c
- intern/SHD_nodes/SHD_curves.c
- intern/SHD_nodes/SHD_dynamic.c
- intern/SHD_nodes/SHD_geom.c
- intern/SHD_nodes/SHD_hueSatVal.c
- intern/SHD_nodes/SHD_invert.c
- intern/SHD_nodes/SHD_mapping.c
- intern/SHD_nodes/SHD_material.c
- intern/SHD_nodes/SHD_math.c
- intern/SHD_nodes/SHD_mixRgb.c
- intern/SHD_nodes/SHD_normal.c
- intern/SHD_nodes/SHD_output.c
- intern/SHD_nodes/SHD_rgb.c
- intern/SHD_nodes/SHD_sepcombRGB.c
- intern/SHD_nodes/SHD_squeeze.c
- intern/SHD_nodes/SHD_texture.c
- intern/SHD_nodes/SHD_valToRgb.c
- intern/SHD_nodes/SHD_value.c
- intern/SHD_nodes/SHD_vectMath.c
- intern/SHD_util.c
- intern/TEX_nodes/TEX_at.c
- intern/TEX_nodes/TEX_bricks.c
- intern/TEX_nodes/TEX_checker.c
- intern/TEX_nodes/TEX_compose.c
- intern/TEX_nodes/TEX_coord.c
- intern/TEX_nodes/TEX_curves.c
- intern/TEX_nodes/TEX_decompose.c
- intern/TEX_nodes/TEX_distance.c
- intern/TEX_nodes/TEX_hueSatVal.c
- intern/TEX_nodes/TEX_image.c
- intern/TEX_nodes/TEX_invert.c
- intern/TEX_nodes/TEX_math.c
- intern/TEX_nodes/TEX_mixRgb.c
- intern/TEX_nodes/TEX_output.c
- intern/TEX_nodes/TEX_proc.c
- intern/TEX_nodes/TEX_rotate.c
- intern/TEX_nodes/TEX_scale.c
- intern/TEX_nodes/TEX_texture.c
- intern/TEX_nodes/TEX_translate.c
- intern/TEX_nodes/TEX_valToNor.c
- intern/TEX_nodes/TEX_valToRgb.c
- intern/TEX_nodes/TEX_viewer.c
- intern/TEX_util.c
+ composite/nodes/node_composite_alphaOver.c
+ composite/nodes/node_composite_bilateralblur.c
+ composite/nodes/node_composite_blur.c
+ composite/nodes/node_composite_brightness.c
+ composite/nodes/node_composite_channelMatte.c
+ composite/nodes/node_composite_chromaMatte.c
+ composite/nodes/node_composite_colorMatte.c
+ composite/nodes/node_composite_colorSpill.c
+ composite/nodes/node_composite_colorbalance.c
+ composite/nodes/node_composite_common.c
+ composite/nodes/node_composite_composite.c
+ composite/nodes/node_composite_crop.c
+ composite/nodes/node_composite_curves.c
+ composite/nodes/node_composite_defocus.c
+ composite/nodes/node_composite_diffMatte.c
+ composite/nodes/node_composite_dilate.c
+ composite/nodes/node_composite_directionalblur.c
+ composite/nodes/node_composite_displace.c
+ composite/nodes/node_composite_distanceMatte.c
+ composite/nodes/node_composite_filter.c
+ composite/nodes/node_composite_flip.c
+ composite/nodes/node_composite_gamma.c
+ composite/nodes/node_composite_glare.c
+ composite/nodes/node_composite_hueSatVal.c
+ composite/nodes/node_composite_huecorrect.c
+ composite/nodes/node_composite_idMask.c
+ composite/nodes/node_composite_image.c
+ composite/nodes/node_composite_invert.c
+ composite/nodes/node_composite_lensdist.c
+ composite/nodes/node_composite_levels.c
+ composite/nodes/node_composite_lummaMatte.c
+ composite/nodes/node_composite_mapUV.c
+ composite/nodes/node_composite_mapValue.c
+ composite/nodes/node_composite_math.c
+ composite/nodes/node_composite_mixrgb.c
+ composite/nodes/node_composite_normal.c
+ composite/nodes/node_composite_normalize.c
+ composite/nodes/node_composite_outputFile.c
+ composite/nodes/node_composite_premulkey.c
+ composite/nodes/node_composite_rgb.c
+ composite/nodes/node_composite_rotate.c
+ composite/nodes/node_composite_scale.c
+ composite/nodes/node_composite_sepcombHSVA.c
+ composite/nodes/node_composite_sepcombRGBA.c
+ composite/nodes/node_composite_sepcombYCCA.c
+ composite/nodes/node_composite_sepcombYUVA.c
+ composite/nodes/node_composite_setalpha.c
+ composite/nodes/node_composite_splitViewer.c
+ composite/nodes/node_composite_texture.c
+ composite/nodes/node_composite_tonemap.c
+ composite/nodes/node_composite_translate.c
+ composite/nodes/node_composite_valToRgb.c
+ composite/nodes/node_composite_value.c
+ composite/nodes/node_composite_vecBlur.c
+ composite/nodes/node_composite_viewer.c
+ composite/nodes/node_composite_zcombine.c
+ composite/node_composite_tree.c
+ composite/node_composite_util.c
+
+ shader/nodes/node_shader_camera.c
+ shader/nodes/node_shader_common.c
+ shader/nodes/node_shader_curves.c
+ shader/nodes/node_shader_dynamic.c
+ shader/nodes/node_shader_geom.c
+ shader/nodes/node_shader_hueSatVal.c
+ shader/nodes/node_shader_invert.c
+ shader/nodes/node_shader_mapping.c
+ shader/nodes/node_shader_material.c
+ shader/nodes/node_shader_math.c
+ shader/nodes/node_shader_mixRgb.c
+ shader/nodes/node_shader_normal.c
+ shader/nodes/node_shader_output.c
+ shader/nodes/node_shader_rgb.c
+ shader/nodes/node_shader_sepcombRGB.c
+ shader/nodes/node_shader_squeeze.c
+ shader/nodes/node_shader_texture.c
+ shader/nodes/node_shader_valToRgb.c
+ shader/nodes/node_shader_value.c
+ shader/nodes/node_shader_vectMath.c
+ shader/node_shader_tree.c
+ shader/node_shader_util.c
+
+ texture/nodes/node_texture_at.c
+ texture/nodes/node_texture_bricks.c
+ texture/nodes/node_texture_checker.c
+ texture/nodes/node_texture_common.c
+ texture/nodes/node_texture_compose.c
+ texture/nodes/node_texture_coord.c
+ texture/nodes/node_texture_curves.c
+ texture/nodes/node_texture_decompose.c
+ texture/nodes/node_texture_distance.c
+ texture/nodes/node_texture_hueSatVal.c
+ texture/nodes/node_texture_image.c
+ texture/nodes/node_texture_invert.c
+ texture/nodes/node_texture_math.c
+ texture/nodes/node_texture_mixRgb.c
+ texture/nodes/node_texture_output.c
+ texture/nodes/node_texture_proc.c
+ texture/nodes/node_texture_rotate.c
+ texture/nodes/node_texture_scale.c
+ texture/nodes/node_texture_texture.c
+ texture/nodes/node_texture_translate.c
+ texture/nodes/node_texture_valToNor.c
+ texture/nodes/node_texture_valToRgb.c
+ texture/nodes/node_texture_viewer.c
+ texture/node_texture_tree.c
+ texture/node_texture_util.c
+
intern/node_util.c
+ intern/node_exec.c
+ intern/node_common.c
+ intern/node_socket.c
+
+ composite/node_composite_util.h
+ shader/node_shader_util.h
+ texture/node_texture_util.h
- CMP_node.h
- SHD_node.h
- TEX_node.h
- intern/CMP_util.h
- intern/SHD_util.h
- intern/TEX_util.h
+ NOD_composite.h
+ NOD_shader.h
+ NOD_texture.h
+ NOD_socket.h
intern/node_util.h
+ intern/node_exec.h
+ intern/node_common.h
)
if(WITH_PYTHON)
diff --git a/source/blender/nodes/CMP_node.h b/source/blender/nodes/NOD_composite.h
index 65c9236710f..11ffcc9027f 100644
--- a/source/blender/nodes/CMP_node.h
+++ b/source/blender/nodes/NOD_composite.h
@@ -30,18 +30,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file CMP_node.h
+/** \file NOD_composite.h
* \ingroup nodes
*/
-#ifndef CMP_NODE_H
-#define CMP_NODE_H
+#ifndef NOD_composite_H
+#define NOD_composite_H
#include "BKE_node.h"
+extern bNodeTreeType ntreeType_Composite;
+
/* ****************** types array for all composite nodes ****************** */
+void register_node_type_cmp_group(ListBase *lb);
+void register_node_type_cmp_forloop(ListBase *lb);
+void register_node_type_cmp_whileloop(ListBase *lb);
+
void register_node_type_cmp_rlayers(ListBase *lb);
void register_node_type_cmp_image(ListBase *lb);
void register_node_type_cmp_texture(ListBase *lb);
diff --git a/source/blender/nodes/SHD_node.h b/source/blender/nodes/NOD_shader.h
index 80e5eec6893..6c5ea79e1ee 100644
--- a/source/blender/nodes/SHD_node.h
+++ b/source/blender/nodes/NOD_shader.h
@@ -30,19 +30,25 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file SHD_node.h
+/** \file NOD_shader.h
* \ingroup nodes
*/
-#ifndef SHD_NODE_H
-#define SHD_NODE_H
+#ifndef NOD_SHADER_H
+#define NOD_SHADER_H
#include "BKE_node.h"
+extern struct bNodeTreeType ntreeType_Shader;
+
/* the type definitions array */
/* ****************** types array for all shaders ****************** */
+void register_node_type_sh_group(ListBase *lb);
+void register_node_type_sh_forloop(ListBase *lb);
+void register_node_type_sh_whileloop(ListBase *lb);
+
void register_node_type_sh_output(ListBase *lb);
void register_node_type_sh_material(ListBase *lb);
void register_node_type_sh_camera(ListBase *lb);
diff --git a/source/blender/nodes/NOD_socket.h b/source/blender/nodes/NOD_socket.h
new file mode 100644
index 00000000000..9ddf159cd9c
--- /dev/null
+++ b/source/blender/nodes/NOD_socket.h
@@ -0,0 +1,90 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Lukas Toenne
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file NOD_socket.h
+ * \ingroup nodes
+ */
+
+
+#ifndef NOD_SOCKET_H_
+#define NOD_SOCKET_H_
+
+#include "DNA_listBase.h"
+
+#include "BLI_utildefines.h"
+
+#include "BKE_node.h"
+
+#include "RNA_types.h"
+
+struct bNodeTree;
+struct bNode;
+struct bNodeStack;
+
+void node_socket_type_init(struct bNodeSocketType *types[]);
+
+struct bNodeSocket *nodeAddInputInt(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, int value, int min, int max);
+struct bNodeSocket *nodeAddOutputInt(struct bNodeTree *ntree, struct bNode *node, const char *name);
+
+struct bNodeSocket *nodeAddInputFloat(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, float value, float min, float max);
+struct bNodeSocket *nodeAddOutputFloat(struct bNodeTree *ntree, struct bNode *node, const char *name);
+
+struct bNodeSocket *nodeAddInputBoolean(struct bNodeTree *ntree, struct bNode *node, const char *name, char value);
+struct bNodeSocket *nodeAddOutputBoolean(struct bNodeTree *ntree, struct bNode *node, const char *name);
+
+struct bNodeSocket *nodeAddInputVector(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype, float x, float y, float z, float min, float max);
+struct bNodeSocket *nodeAddOutputVector(struct bNodeTree *ntree, struct bNode *node, const char *name);
+
+struct bNodeSocket *nodeAddInputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name, float r, float g, float b, float a);
+struct bNodeSocket *nodeAddOutputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name);
+
+struct bNodeSocket *nodeAddInputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name);
+struct bNodeSocket *nodeAddOutputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name);
+
+struct bNodeSocket *node_add_input_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp);
+struct bNodeSocket *node_add_output_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp);
+
+void node_verify_socket_templates(struct bNodeTree *ntree, struct bNode *node);
+
+
+/* Socket Converters */
+
+#define SOCK_VECTOR_X 1
+#define SOCK_VECTOR_Y 2
+#define SOCK_VECTOR_Z 3
+
+#define SOCK_RGBA_R 1
+#define SOCK_RGBA_G 2
+#define SOCK_RGBA_B 3
+#define SOCK_RGBA_A 4
+
+#define SOCK_MESH_VERT_CO 1
+#define SOCK_MESH_VERT_NO 2
+
+#endif
diff --git a/source/blender/nodes/TEX_node.h b/source/blender/nodes/NOD_texture.h
index 23a6b4427af..d098c241583 100644
--- a/source/blender/nodes/TEX_node.h
+++ b/source/blender/nodes/NOD_texture.h
@@ -30,18 +30,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file TEX_node.h
+/** \file NOD_texture.h
* \ingroup nodes
*/
-#ifndef TEX_NODE_H
-#define TEX_NODE_H
+#ifndef NOD_TEXTURE_H
+#define NOD_TEXTURE_H
#include "BKE_node.h"
+extern bNodeTreeType ntreeType_Texture;
+
/* ****************** types array for all texture nodes ****************** */
+void register_node_type_tex_group(ListBase *lb);
+void register_node_type_tex_forloop(ListBase *lb);
+void register_node_type_tex_whileloop(ListBase *lb);
+
void register_node_type_tex_math(ListBase *lb);
void register_node_type_tex_mix_rgb(ListBase *lb);
void register_node_type_tex_valtorgb(ListBase *lb);
diff --git a/source/blender/nodes/SConscript b/source/blender/nodes/SConscript
index 8d17c6f5e16..0cbc7b80933 100644
--- a/source/blender/nodes/SConscript
+++ b/source/blender/nodes/SConscript
@@ -2,11 +2,11 @@
Import ('env')
sources = env.Glob('intern/*.c')
-cmpsources = env.Glob('intern/CMP_nodes/*.c')
-shdsources = env.Glob('intern/SHD_nodes/*.c')
-texsources = env.Glob('intern/TEX_nodes/*.c')
-
+cmpsources = env.Glob('composite/*.c') + env.Glob('composite/nodes/*.c')
+shdsources = env.Glob('shader/*.c') + env.Glob('shader/nodes/*.c')
+texsources = env.Glob('texture/*.c') + env.Glob('texture/nodes/*.c')
incs = '. ./intern '
+incs += './composite ./shader ./texture '
incs += '#/intern/guardedalloc ../editors/include ../blenlib ../makesdna'
incs += ' ../render/extern/include ../makesrna '
incs += ' ../imbuf ../avi '
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c
new file mode 100644
index 00000000000..5c58070be9d
--- /dev/null
+++ b/source/blender/nodes/composite/node_composite_tree.c
@@ -0,0 +1,837 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/composite/node_composite_tree.c
+ * \ingroup nodes
+ */
+
+
+#include <stdio.h>
+
+#include "DNA_anim_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_node_types.h"
+
+#include "BLI_listbase.h"
+#include "BLI_threads.h"
+
+#include "BKE_animsys.h"
+#include "BKE_colortools.h"
+#include "BKE_fcurve.h"
+#include "BKE_global.h"
+#include "BKE_main.h"
+#include "BKE_node.h"
+#include "BKE_utildefines.h"
+
+#include "node_exec.h"
+#include "node_util.h"
+
+#include "PIL_time.h"
+
+#include "RNA_access.h"
+
+#include "NOD_composite.h"
+#include "node_composite_util.h"
+
+static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func)
+{
+ Scene *sce;
+ for(sce= main->scene.first; sce; sce= sce->id.next) {
+ if(sce->nodetree) {
+ func(calldata, &sce->id, sce->nodetree);
+ }
+ }
+}
+
+static void free_node_cache(bNodeTree *UNUSED(ntree), bNode *node)
+{
+ bNodeSocket *sock;
+
+ for(sock= node->outputs.first; sock; sock= sock->next) {
+ if(sock->cache) {
+ free_compbuf(sock->cache);
+ sock->cache= NULL;
+ }
+ }
+}
+
+static void free_cache(bNodeTree *ntree)
+{
+ bNode *node;
+ for(node= ntree->nodes.first; node; node= node->next)
+ free_node_cache(ntree, node);
+}
+
+static void update_node(bNodeTree *ntree, bNode *node)
+{
+ bNodeSocket *sock;
+
+ for(sock= node->outputs.first; sock; sock= sock->next) {
+ if(sock->cache) {
+ //free_compbuf(sock->cache);
+ //sock->cache= NULL;
+ }
+ }
+ node->need_exec= 1;
+
+ /* individual node update call */
+ if (node->typeinfo->updatefunc)
+ node->typeinfo->updatefunc(ntree, node);
+}
+
+/* local tree then owns all compbufs */
+static void localize(bNodeTree *UNUSED(localtree), bNodeTree *ntree)
+{
+ bNode *node;
+ bNodeSocket *sock;
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ /* ensure new user input gets handled ok */
+ node->need_exec= 0;
+
+ /* move over the compbufs */
+ /* right after ntreeCopyTree() oldsock pointers are valid */
+
+ 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);
+ else
+ node->new_node->id= NULL;
+ }
+ }
+
+ for(sock= node->outputs.first; sock; sock= sock->next) {
+ sock->new_sock->cache= sock->cache;
+ compbuf_set_node(sock->new_sock->cache, node->new_node);
+
+ sock->cache= NULL;
+ sock->new_sock->new_sock= sock;
+ }
+ }
+}
+
+static void local_sync(bNodeTree *localtree, bNodeTree *ntree)
+{
+ bNode *lnode;
+
+ /* move over the compbufs and previews */
+ for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) {
+ if( (lnode->exec & NODE_READY) && !(lnode->exec & NODE_SKIPPED) ) {
+ if(ntreeNodeExists(ntree, lnode->new_node)) {
+
+ if(lnode->preview && lnode->preview->rect) {
+ nodeFreePreview(lnode->new_node);
+ lnode->new_node->preview= lnode->preview;
+ lnode->preview= NULL;
+ }
+ }
+ }
+ }
+}
+
+static void local_merge(bNodeTree *localtree, bNodeTree *ntree)
+{
+ bNode *lnode;
+ bNodeSocket *lsock;
+
+ /* move over the compbufs and previews */
+ for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) {
+ if(ntreeNodeExists(ntree, lnode->new_node)) {
+ if(ELEM(lnode->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER)) {
+ if(lnode->id && (lnode->flag & NODE_DO_OUTPUT)) {
+ /* image_merge does sanity check for pointers */
+ BKE_image_merge((Image *)lnode->new_node->id, (Image *)lnode->id);
+ }
+ }
+
+ for(lsock= lnode->outputs.first; lsock; lsock= lsock->next) {
+ if(ntreeOutputExists(lnode->new_node, lsock->new_sock)) {
+ lsock->new_sock->cache= lsock->cache;
+ compbuf_set_node(lsock->new_sock->cache, lnode->new_node);
+ lsock->cache= NULL;
+ lsock->new_sock= NULL;
+ }
+ }
+ }
+ }
+}
+
+bNodeTreeType ntreeType_Composite = {
+ /* type */ NTREE_COMPOSIT,
+ /* idname */ "NTCompositing Nodetree",
+
+ /* node_types */ { NULL, NULL },
+
+ /* free_cache */ free_cache,
+ /* free_node_cache */ free_node_cache,
+ /* foreach_nodetree */ foreach_nodetree,
+ /* localize */ localize,
+ /* local_sync */ local_sync,
+ /* local_merge */ local_merge,
+ /* update */ NULL,
+ /* update_node */ update_node
+};
+
+
+/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes.
+ * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees.
+ */
+struct bNodeTreeExec *ntreeCompositBeginExecTree(bNodeTree *ntree, int use_tree_data)
+{
+ bNodeTreeExec *exec;
+ bNode *node;
+ bNodeSocket *sock;
+
+ if (use_tree_data) {
+ /* XXX hack: prevent exec data from being generated twice.
+ * this should be handled by the renderer!
+ */
+ if (ntree->execdata)
+ return ntree->execdata;
+ }
+
+ /* ensures only a single output node is enabled */
+ ntreeSetOutput(ntree);
+
+ exec = ntree_exec_begin(ntree);
+
+ for(node= exec->nodetree->nodes.first; node; node= node->next) {
+ /* initialize needed for groups */
+ node->exec= 0;
+
+ for(sock= node->outputs.first; sock; sock= sock->next) {
+ bNodeStack *ns= node_get_socket_stack(exec->stack, sock);
+ if(ns && sock->cache) {
+ ns->data= sock->cache;
+ sock->cache= NULL;
+ }
+ }
+ /* cannot initialize them while using in threads */
+ if(ELEM4(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT)) {
+ curvemapping_initialize(node->storage);
+ if(node->type==CMP_NODE_CURVE_RGB)
+ curvemapping_premultiply(node->storage, 0);
+ }
+ }
+
+ if (use_tree_data) {
+ /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes,
+ * which only store the ntree pointer. Should be fixed at some point!
+ */
+ ntree->execdata = exec;
+ }
+
+ return exec;
+}
+
+/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes.
+ * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees.
+ */
+void ntreeCompositEndExecTree(bNodeTreeExec *exec, int use_tree_data)
+{
+ if(exec) {
+ bNodeTree *ntree= exec->nodetree;
+ bNode *node;
+ bNodeStack *ns;
+
+ for(node= exec->nodetree->nodes.first; node; node= node->next) {
+ bNodeSocket *sock;
+
+ for(sock= node->outputs.first; sock; sock= sock->next) {
+ ns = node_get_socket_stack(exec->stack, sock);
+ if(ns && ns->data) {
+ sock->cache= ns->data;
+ ns->data= NULL;
+ }
+ }
+ if(node->type==CMP_NODE_CURVE_RGB)
+ curvemapping_premultiply(node->storage, 1);
+
+ node->need_exec= 0;
+ }
+
+ ntree_exec_end(exec);
+
+ if (use_tree_data) {
+ /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */
+ ntree->execdata = NULL;
+ }
+ }
+}
+
+/* ***************************** threaded version for execute composite nodes ************* */
+/* these are nodes without input, only giving values */
+/* or nodes with only value inputs */
+static int node_only_value(bNode *node)
+{
+ bNodeSocket *sock;
+
+ if(ELEM3(node->type, CMP_NODE_TIME, CMP_NODE_VALUE, CMP_NODE_RGB))
+ return 1;
+
+ /* doing this for all node types goes wrong. memory free errors */
+ if(node->inputs.first && node->type==CMP_NODE_MAP_VALUE) {
+ int retval= 1;
+ for(sock= node->inputs.first; sock; sock= sock->next) {
+ if(sock->link)
+ retval &= node_only_value(sock->link->fromnode);
+ }
+ return retval;
+ }
+ return 0;
+}
+
+/* not changing info, for thread callback */
+typedef struct ThreadData {
+ bNodeStack *stack;
+ RenderData *rd;
+} ThreadData;
+
+static void *exec_composite_node(void *nodeexec_v)
+{
+ bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeExec *nodeexec= nodeexec_v;
+ bNode *node= nodeexec->node;
+ ThreadData *thd= (ThreadData *)node->threaddata;
+
+ node_get_stack(node, thd->stack, nsin, nsout);
+
+ if((node->flag & NODE_MUTED) && (!node_only_value(node))) {
+ /* viewers we execute, for feedback to user */
+ if(ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
+ node->typeinfo->execfunc(thd->rd, node, nsin, nsout);
+ else
+ node_compo_pass_on(node, nsin, nsout);
+ }
+ else if(node->typeinfo->execfunc)
+ node->typeinfo->execfunc(thd->rd, node, nsin, nsout);
+ else if (node->typeinfo->newexecfunc)
+ node->typeinfo->newexecfunc(thd->rd, 0, node, nodeexec->data, nsin, nsout);
+
+ node->exec |= NODE_READY;
+ return NULL;
+}
+
+/* return total of executable nodes, for timecursor */
+static int setExecutableNodes(bNodeTreeExec *exec, ThreadData *thd)
+{
+ bNodeTree *ntree = exec->nodetree;
+ bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeExec *nodeexec;
+ bNode *node;
+ bNodeSocket *sock;
+ int n, totnode= 0, group_edit= 0;
+
+ /* if we are in group edit, viewer nodes get skipped when group has viewer */
+ for(node= ntree->nodes.first; node; node= node->next)
+ if(node->type==NODE_GROUP && (node->flag & NODE_GROUP_EDIT))
+ if(ntreeHasType((bNodeTree *)node->id, CMP_NODE_VIEWER))
+ group_edit= 1;
+
+ /* NB: using the exec data list here to have valid dependency sort */
+ for(n=0, nodeexec=exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ int a;
+ node = nodeexec->node;
+
+ node_get_stack(node, exec->stack, nsin, nsout);
+
+ /* test the outputs */
+ /* skip value-only nodes (should be in type!) */
+ if(!node_only_value(node)) {
+ for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) {
+ if(nsout[a]->data==NULL && nsout[a]->hasoutput) {
+ node->need_exec= 1;
+ break;
+ }
+ }
+ }
+
+ /* test the inputs */
+ for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
+ /* skip viewer nodes in bg render or group edit */
+ if( ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER) && (G.background || group_edit))
+ node->need_exec= 0;
+ /* is sock in use? */
+ else if(sock->link) {
+ bNodeLink *link= sock->link;
+
+ /* this is the test for a cyclic case */
+ if(link->fromnode==NULL || link->tonode==NULL);
+ else if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF) {
+ if(link->fromnode->need_exec) {
+ node->need_exec= 1;
+ break;
+ }
+ }
+ else {
+ node->need_exec= 0;
+ printf("Node %s skipped, cyclic dependency\n", node->name);
+ }
+ }
+ }
+
+ if(node->need_exec) {
+
+ /* free output buffers */
+ for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) {
+ if(nsout[a]->data) {
+ free_compbuf(nsout[a]->data);
+ nsout[a]->data= NULL;
+ }
+ }
+ totnode++;
+ /* printf("node needs exec %s\n", node->name); */
+
+ /* tag for getExecutableNode() */
+ node->exec= 0;
+ }
+ else {
+ /* tag for getExecutableNode() */
+ node->exec= NODE_READY|NODE_FINISHED|NODE_SKIPPED;
+
+ }
+ }
+
+ /* last step: set the stack values for only-value nodes */
+ /* just does all now, compared to a full buffer exec this is nothing */
+ if(totnode) {
+ for(n=0, nodeexec=exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ node = nodeexec->node;
+ if(node->need_exec==0 && node_only_value(node)) {
+ if(node->typeinfo->execfunc) {
+ node_get_stack(node, exec->stack, nsin, nsout);
+ node->typeinfo->execfunc(thd->rd, node, nsin, nsout);
+ }
+ }
+ }
+ }
+
+ return totnode;
+}
+
+/* while executing tree, free buffers from nodes that are not needed anymore */
+static void freeExecutableNode(bNodeTreeExec *exec)
+{
+ /* node outputs can be freed when:
+ - not a render result or image node
+ - when node outputs go to nodes all being set NODE_FINISHED
+ */
+ bNodeTree *ntree = exec->nodetree;
+ bNodeExec *nodeexec;
+ bNode *node;
+ bNodeSocket *sock;
+ int n;
+
+ /* set exec flag for finished nodes that might need freed */
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->type!=CMP_NODE_R_LAYERS)
+ if(node->exec & NODE_FINISHED)
+ node->exec |= NODE_FREEBUFS;
+ }
+ /* clear this flag for input links that are not done yet.
+ * Using the exec data for valid dependency sort.
+ */
+ for(n=0, nodeexec=exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ node = nodeexec->node;
+ if((node->exec & NODE_FINISHED)==0) {
+ for(sock= node->inputs.first; sock; sock= sock->next)
+ if(sock->link)
+ sock->link->fromnode->exec &= ~NODE_FREEBUFS;
+ }
+ }
+ /* now we can free buffers */
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->exec & NODE_FREEBUFS) {
+ for(sock= node->outputs.first; sock; sock= sock->next) {
+ bNodeStack *ns= node_get_socket_stack(exec->stack, sock);
+ if(ns && ns->data) {
+ free_compbuf(ns->data);
+ ns->data= NULL;
+ // printf("freed buf node %s \n", node->name);
+ }
+ }
+ }
+ }
+}
+
+static bNodeExec *getExecutableNode(bNodeTreeExec *exec)
+{
+ bNodeExec *nodeexec;
+ bNodeSocket *sock;
+ int n;
+
+ for(n=0, nodeexec=exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ if(nodeexec->node->exec==0) {
+ /* input sockets should be ready */
+ for(sock= nodeexec->node->inputs.first; sock; sock= sock->next) {
+ if(sock->link && sock->link->fromnode)
+ if((sock->link->fromnode->exec & NODE_READY)==0)
+ break;
+ }
+ if(sock==NULL)
+ return nodeexec;
+ }
+ }
+ return NULL;
+}
+
+/* check if texture nodes need exec or end */
+static void ntree_composite_texnode(bNodeTree *ntree, int init)
+{
+ bNode *node;
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->type==CMP_NODE_TEXTURE && node->id) {
+ Tex *tex= (Tex *)node->id;
+ if(tex->nodetree && tex->use_nodes) {
+ /* has internal flag to detect it only does it once */
+ if(init) {
+ if (!tex->nodetree->execdata)
+ tex->nodetree->execdata = ntreeTexBeginExecTree(tex->nodetree, 1);
+ }
+ else
+ ntreeTexEndExecTree(tex->nodetree->execdata, 1);
+ tex->nodetree->execdata = NULL;
+ }
+ }
+ }
+
+}
+
+/* optimized tree execute test for compositing */
+void ntreeCompositExecTree(bNodeTree *ntree, RenderData *rd, int do_preview)
+{
+ bNodeExec *nodeexec;
+ bNode *node;
+ ListBase threads;
+ ThreadData thdata;
+ int totnode, curnode, rendering= 1, n;
+ bNodeTreeExec *exec= ntree->execdata;
+
+ if(ntree==NULL) return;
+
+ if(do_preview)
+ ntreeInitPreview(ntree, 0, 0);
+
+ if (!ntree->execdata) {
+ /* XXX this is the top-level tree, so we use the ntree->execdata pointer. */
+ exec = ntreeCompositBeginExecTree(ntree, 1);
+ }
+ ntree_composite_texnode(ntree, 1);
+
+ /* prevent unlucky accidents */
+ if(G.background)
+ rd->scemode &= ~R_COMP_CROP;
+
+ /* setup callerdata for thread callback */
+ thdata.rd= rd;
+ thdata.stack= exec->stack;
+
+ /* fixed seed, for example noise texture */
+ BLI_srandom(rd->cfra);
+
+ /* sets need_exec tags in nodes */
+ curnode = totnode= setExecutableNodes(exec, &thdata);
+
+ BLI_init_threads(&threads, exec_composite_node, rd->threads);
+
+ while(rendering) {
+
+ if(BLI_available_threads(&threads)) {
+ nodeexec= getExecutableNode(exec);
+ if(nodeexec) {
+ node = nodeexec->node;
+ if(ntree->progress && totnode)
+ ntree->progress(ntree->prh, (1.0 - curnode/(float)totnode));
+ if(ntree->stats_draw) {
+ char str[64];
+ sprintf(str, "Compositing %d %s", curnode, node->name);
+ ntree->stats_draw(ntree->sdh, str);
+ }
+ curnode--;
+
+ node->threaddata = &thdata;
+ node->exec= NODE_PROCESSING;
+ BLI_insert_thread(&threads, nodeexec);
+ }
+ else
+ PIL_sleep_ms(50);
+ }
+ else
+ PIL_sleep_ms(50);
+
+ rendering= 0;
+ /* test for ESC */
+ if(ntree->test_break && ntree->test_break(ntree->tbh)) {
+ for(node= ntree->nodes.first; node; node= node->next)
+ node->exec |= NODE_READY;
+ }
+
+ /* check for ready ones, and if we need to continue */
+ for(n=0, nodeexec=exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ node = nodeexec->node;
+ if(node->exec & NODE_READY) {
+ if((node->exec & NODE_FINISHED)==0) {
+ BLI_remove_thread(&threads, nodeexec); /* this waits for running thread to finish btw */
+ node->exec |= NODE_FINISHED;
+
+ /* freeing unused buffers */
+ if(rd->scemode & R_COMP_FREE)
+ freeExecutableNode(exec);
+ }
+ }
+ else rendering= 1;
+ }
+ }
+
+ BLI_end_threads(&threads);
+
+ /* XXX top-level tree uses the ntree->execdata pointer */
+ ntreeCompositEndExecTree(exec, 1);
+}
+
+/* *********************************************** */
+
+/* clumsy checking... should do dynamic outputs once */
+static void force_hidden_passes(bNode *node, int passflag)
+{
+ bNodeSocket *sock;
+
+ for(sock= node->outputs.first; sock; sock= sock->next)
+ sock->flag &= ~SOCK_UNAVAIL;
+
+ sock= BLI_findlink(&node->outputs, RRES_OUT_Z);
+ if(!(passflag & SCE_PASS_Z)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_NORMAL);
+ if(!(passflag & SCE_PASS_NORMAL)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_VEC);
+ if(!(passflag & SCE_PASS_VECTOR)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_UV);
+ if(!(passflag & SCE_PASS_UV)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_RGBA);
+ if(!(passflag & SCE_PASS_RGBA)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_DIFF);
+ if(!(passflag & SCE_PASS_DIFFUSE)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_SPEC);
+ if(!(passflag & SCE_PASS_SPEC)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_SHADOW);
+ if(!(passflag & SCE_PASS_SHADOW)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_AO);
+ if(!(passflag & SCE_PASS_AO)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_REFLECT);
+ if(!(passflag & SCE_PASS_REFLECT)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_REFRACT);
+ if(!(passflag & SCE_PASS_REFRACT)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_INDIRECT);
+ if(!(passflag & SCE_PASS_INDIRECT)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXOB);
+ if(!(passflag & SCE_PASS_INDEXOB)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_INDEXMA);
+ if(!(passflag & SCE_PASS_INDEXMA)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_MIST);
+ if(!(passflag & SCE_PASS_MIST)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_EMIT);
+ if(!(passflag & SCE_PASS_EMIT)) sock->flag |= SOCK_UNAVAIL;
+ sock= BLI_findlink(&node->outputs, RRES_OUT_ENV);
+ if(!(passflag & SCE_PASS_ENVIRONMENT)) sock->flag |= SOCK_UNAVAIL;
+
+}
+
+/* based on rules, force sockets hidden always */
+void ntreeCompositForceHidden(bNodeTree *ntree, Scene *curscene)
+{
+ bNode *node;
+
+ if(ntree==NULL) return;
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if( node->type==CMP_NODE_R_LAYERS) {
+ Scene *sce= node->id?(Scene *)node->id:curscene;
+ SceneRenderLayer *srl= BLI_findlink(&sce->r.layers, node->custom1);
+ if(srl)
+ force_hidden_passes(node, srl->passflag);
+ }
+ else if( node->type==CMP_NODE_IMAGE) {
+ Image *ima= (Image *)node->id;
+ if(ima) {
+ if(ima->rr) {
+ ImageUser *iuser= node->storage;
+ RenderLayer *rl= BLI_findlink(&ima->rr->layers, iuser->layer);
+ if(rl)
+ force_hidden_passes(node, rl->passflag);
+ else
+ force_hidden_passes(node, 0);
+ }
+ else if(ima->type!=IMA_TYPE_MULTILAYER) { /* if ->rr not yet read we keep inputs */
+ force_hidden_passes(node, RRES_OUT_Z);
+ }
+ else
+ force_hidden_passes(node, 0);
+ }
+ else
+ force_hidden_passes(node, 0);
+ }
+ }
+
+}
+
+/* called from render pipeline, to tag render input and output */
+/* need to do all scenes, to prevent errors when you re-render 1 scene */
+void ntreeCompositTagRender(Scene *curscene)
+{
+ Scene *sce;
+
+ for(sce= G.main->scene.first; sce; sce= sce->id.next) {
+ if(sce->nodetree) {
+ bNode *node;
+
+ for(node= sce->nodetree->nodes.first; node; node= node->next) {
+ if(node->id==(ID *)curscene || node->type==CMP_NODE_COMPOSITE)
+ NodeTagChanged(sce->nodetree, node);
+ else if(node->type==CMP_NODE_TEXTURE) /* uses scene sizex/sizey */
+ NodeTagChanged(sce->nodetree, node);
+ }
+ }
+ }
+}
+
+static int node_animation_properties(bNodeTree *ntree, bNode *node)
+{
+ bNodeSocket *sock;
+ const ListBase *lb;
+ Link *link;
+ PointerRNA ptr;
+ PropertyRNA *prop;
+
+ /* check to see if any of the node's properties have fcurves */
+ RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr);
+ lb = RNA_struct_type_properties(ptr.type);
+
+ for (link=lb->first; link; link=link->next) {
+ int driven, len=1, index;
+ prop = (PropertyRNA *)link;
+
+ if (RNA_property_array_check(prop))
+ len = RNA_property_array_length(&ptr, prop);
+
+ for (index=0; index<len; index++) {
+ if (rna_get_fcurve(&ptr, prop, index, NULL, &driven)) {
+ NodeTagChanged(ntree, node);
+ return 1;
+ }
+ }
+ }
+
+ /* now check node sockets */
+ for (sock = node->inputs.first; sock; sock=sock->next) {
+ int driven, len=1, index;
+
+ RNA_pointer_create((ID *)ntree, &RNA_NodeSocket, sock, &ptr);
+ prop = RNA_struct_find_property(&ptr, "default_value");
+ if (prop) {
+ if (RNA_property_array_check(prop))
+ len = RNA_property_array_length(&ptr, prop);
+
+ for (index=0; index<len; index++) {
+ if (rna_get_fcurve(&ptr, prop, index, NULL, &driven)) {
+ NodeTagChanged(ntree, node);
+ return 1;
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+/* tags nodes that have animation capabilities */
+int ntreeCompositTagAnimated(bNodeTree *ntree)
+{
+ bNode *node;
+ int tagged= 0;
+
+ if(ntree==NULL) return 0;
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+
+ tagged = node_animation_properties(ntree, node);
+
+ /* otherwise always tag these node types */
+ if(node->type==CMP_NODE_IMAGE) {
+ Image *ima= (Image *)node->id;
+ if(ima && ELEM(ima->source, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE)) {
+ NodeTagChanged(ntree, node);
+ tagged= 1;
+ }
+ }
+ else if(node->type==CMP_NODE_TIME) {
+ NodeTagChanged(ntree, node);
+ tagged= 1;
+ }
+ /* here was tag render layer, but this is called after a render, so re-composites fail */
+ else if(node->type==NODE_GROUP) {
+ if( ntreeCompositTagAnimated((bNodeTree *)node->id) ) {
+ NodeTagChanged(ntree, node);
+ }
+ }
+ }
+
+ return tagged;
+}
+
+
+/* called from image window preview */
+void ntreeCompositTagGenerators(bNodeTree *ntree)
+{
+ bNode *node;
+
+ if(ntree==NULL) return;
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if( ELEM(node->type, CMP_NODE_R_LAYERS, CMP_NODE_IMAGE))
+ NodeTagChanged(ntree, node);
+ }
+}
+
+/* XXX after render animation system gets a refresh, this call allows composite to end clean */
+void ntreeClearTags(bNodeTree *ntree)
+{
+ bNode *node;
+
+ if(ntree==NULL) return;
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ node->need_exec= 0;
+ if(node->type==NODE_GROUP)
+ ntreeClearTags((bNodeTree *)node->id);
+ }
+}
diff --git a/source/blender/nodes/intern/CMP_util.c b/source/blender/nodes/composite/node_composite_util.c
index a763f34a644..78f97c5289e 100644
--- a/source/blender/nodes/intern/CMP_util.c
+++ b/source/blender/nodes/composite/node_composite_util.c
@@ -27,12 +27,12 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_util.c
+/** \file blender/nodes/composite/node_composite_util.c
* \ingroup nodes
*/
-#include "CMP_util.h"
+#include "node_composite_util.h"
CompBuf *alloc_compbuf(int sizex, int sizey, int type, int alloc)
{
@@ -67,7 +67,7 @@ CompBuf *dupalloc_compbuf(CompBuf *cbuf)
{
CompBuf *dupbuf= alloc_compbuf(cbuf->x, cbuf->y, cbuf->type, 1);
if(dupbuf) {
- memmove(dupbuf->rect, cbuf->rect, cbuf->type*sizeof(float)*cbuf->x*cbuf->y);
+ memcpy(dupbuf->rect, cbuf->rect, cbuf->type*sizeof(float)*cbuf->x*cbuf->y);
dupbuf->xof= cbuf->xof;
dupbuf->yof= cbuf->yof;
@@ -156,7 +156,7 @@ void node_compo_pass_on(bNode *node, bNodeStack **nsin, bNodeStack **nsout)
if(valbuf || colbuf || vecbuf) {
for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) {
if(nsout[a]->hasoutput) {
- if(sock->type==SOCK_VALUE && valbuf) {
+ if(sock->type==SOCK_FLOAT && valbuf) {
nsout[a]->data= pass_on_compbuf(valbuf);
valbuf= NULL;
}
@@ -1325,7 +1325,7 @@ void IIR_gauss(CompBuf* src, float sigma, int chan, int xy)
if (src->x < 3) xy &= ~(int) 1;
if (src->y < 3) xy &= ~(int) 2;
if (xy < 1) return;
-
+
// see "Recursive Gabor Filtering" by Young/VanVliet
// all factors here in double.prec. Required, because for single.prec it seems to blow up if sigma > ~200
if (sigma >= 3.556)
diff --git a/source/blender/nodes/intern/CMP_util.h b/source/blender/nodes/composite/node_composite_util.h
index 3f37eae2af9..f3e0f811f13 100644
--- a/source/blender/nodes/intern/CMP_util.h
+++ b/source/blender/nodes/composite/node_composite_util.h
@@ -27,13 +27,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_util.h
+/** \file blender/nodes/composite/node_composite_util.h
* \ingroup nodes
*/
-#ifndef CMP_NODE_UTILS_H_
-#define CMP_NODE_UTILS_H_
+#ifndef NODE_COMPOSITE_UTIL_H_
+#define NODE_COMPOSITE_UTIL_H_
#include <stdlib.h>
#include <string.h>
@@ -70,7 +70,6 @@
#include "BKE_library.h"
#include "BKE_object.h"
-#include "../CMP_node.h"
#include "node_util.h"
#include "IMB_imbuf_types.h"
@@ -80,6 +79,10 @@
#include "RE_shader_ext.h"
#include "RE_render_ext.h"
+/* only for forward declarations */
+#include "NOD_composite.h"
+
+
/* *************************** operations support *************************** */
/* general signal that's in output sockets, and goes over the wires */
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c
index 9dcdfaf21e6..551f716e72b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
+++ b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_alphaOver.c
+/** \file blender/nodes/composite/nodes/node_composite_alphaOver.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** ALPHAOVER ******************** */
-static bNodeSocketType cmp_node_alphaover_in[]= {
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_alphaover_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_alphaover_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_alphaover_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -140,7 +140,7 @@ static void node_composit_exec_alphaover(void *UNUSED(data), bNode *node, bNodeS
}
}
-static void node_alphaover_init(bNode* node)
+static void node_alphaover_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
}
@@ -149,8 +149,8 @@ void register_node_type_cmp_alphaover(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_ALPHAOVER, "AlphaOver", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_alphaover_in, cmp_node_alphaover_out);
+ node_type_base(&ntype, CMP_NODE_ALPHAOVER, "AlphaOver", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_alphaover_in, cmp_node_alphaover_out);
node_type_size(&ntype, 80, 40, 120);
node_type_init(&ntype, node_alphaover_init);
node_type_storage(&ntype, "NodeTwoFloats", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
index c106b437e17..e8e6e164983 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
@@ -1,5 +1,5 @@
/*
- *
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_bilateralblur.c
+/** \file blender/nodes/composite/nodes/node_composite_bilateralblur.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** BILATERALBLUR ******************** */
-static bNodeSocketType cmp_node_bilateralblur_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Determinator", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_bilateralblur_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_RGBA, 1, "Determinator", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_bilateralblur_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_bilateralblur_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -247,7 +247,7 @@ static void node_composit_exec_bilateralblur(void *UNUSED(data), bNode *node, bN
free_compbuf(new);
}
-static void node_composit_init_bilateralblur(bNode* node)
+static void node_composit_init_bilateralblur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeBilateralBlurData *nbbd= MEM_callocN(sizeof(NodeBilateralBlurData), "node bilateral blur data");
node->storage= nbbd;
@@ -259,8 +259,8 @@ void register_node_type_cmp_bilateralblur(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS,
- cmp_node_bilateralblur_in, cmp_node_bilateralblur_out);
+ node_type_base(&ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_bilateralblur_in, cmp_node_bilateralblur_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_bilateralblur);
node_type_storage(&ntype, "NodeBilateralBlurData", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c b/source/blender/nodes/composite/nodes/node_composite_blur.c
index 718578a921b..cd37404e677 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_blur.c
@@ -28,21 +28,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_blur.c
+/** \file blender/nodes/composite/nodes/node_composite_blur.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** BLUR ******************** */
-static bNodeSocketType cmp_node_blur_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Size", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_blur_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Size", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_blur_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_blur_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -713,7 +713,7 @@ static void node_composit_exec_blur(void *data, bNode *node, bNodeStack **in, bN
generate_preview(data, node, out[0]->data);
}
-static void node_composit_init_blur(bNode* node)
+static void node_composit_init_blur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= MEM_callocN(sizeof(NodeBlurData), "node blur data");
}
@@ -722,8 +722,8 @@ void register_node_type_cmp_blur(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_BLUR, "Blur", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_blur_in, cmp_node_blur_out);
+ node_type_base(&ntype, CMP_NODE_BLUR, "Blur", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_blur_in, cmp_node_blur_out);
node_type_size(&ntype, 120, 80, 200);
node_type_init(&ntype, node_composit_init_blur);
node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_brightness.c b/source/blender/nodes/composite/nodes/node_composite_brightness.c
index 50a8d05b03d..55d890e6d31 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_brightness.c
+++ b/source/blender/nodes/composite/nodes/node_composite_brightness.c
@@ -28,24 +28,24 @@
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_brightness.c
+/** \file blender/nodes/composite/nodes/node_composite_brightness.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Brigh and contrsast ******************** */
-static bNodeSocketType cmp_node_brightcontrast_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Bright", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f},
- { SOCK_VALUE, 1, "Contrast", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f},
+static bNodeSocketTemplate cmp_node_brightcontrast_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Bright", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Contrast", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_brightcontrast_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_brightcontrast_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -100,8 +100,8 @@ void register_node_type_cmp_brightcontrast(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_brightcontrast_in, cmp_node_brightcontrast_out);
+ node_type_base(&ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_brightcontrast_in, cmp_node_brightcontrast_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_brightcontrast);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c
index e395716f36d..1e3992a7185 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
+/** \file blender/nodes/composite/nodes/node_composite_channelMatte.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* ******************* Channel Matte Node ********************************* */
-static bNodeSocketType cmp_node_channel_matte_in[]={
- {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_channel_matte_in[]={
+ {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f},
{-1,0,""}
};
-static bNodeSocketType cmp_node_channel_matte_out[]={
- {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_channel_matte_out[]={
+ {SOCK_RGBA,0,"Image"},
+ {SOCK_FLOAT,0,"Matte"},
{-1,0,""}
};
@@ -187,7 +187,7 @@ static void node_composit_exec_channel_matte(void *data, bNode *node, bNodeStack
}
-static void node_composit_init_channel_matte(bNode *node)
+static void node_composit_init_channel_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
node->storage=c;
@@ -206,8 +206,8 @@ void register_node_type_cmp_channel_matte(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CHANNEL_MATTE, "Channel Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_channel_matte_in, cmp_node_channel_matte_out);
+ node_type_base(&ntype, CMP_NODE_CHANNEL_MATTE, "Channel Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_channel_matte_in, cmp_node_channel_matte_out);
node_type_size(&ntype, 200, 80, 250);
node_type_init(&ntype, node_composit_init_channel_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
index 03230f2e212..49c90e85621 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
+/** \file blender/nodes/composite/nodes/node_composite_chromaMatte.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* ******************* Chroma Key ********************************************************** */
-static bNodeSocketType cmp_node_chroma_in[]={
- {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_chroma_in[]={
+ {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f},
{-1,0,""}
};
-static bNodeSocketType cmp_node_chroma_out[]={
- {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_chroma_out[]={
+ {SOCK_RGBA,0,"Image"},
+ {SOCK_FLOAT,0,"Matte"},
{-1,0,""}
};
@@ -178,7 +178,7 @@ static void node_composit_exec_chroma_matte(void *data, bNode *node, bNodeStack
}
-static void node_composit_init_chroma_matte(bNode *node)
+static void node_composit_init_chroma_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
node->storage= c;
@@ -193,8 +193,8 @@ void register_node_type_cmp_chroma_matte(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_chroma_in, cmp_node_chroma_out);
+ node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_chroma_in, cmp_node_chroma_out);
node_type_size(&ntype, 200, 80, 300);
node_type_init(&ntype, node_composit_init_chroma_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c
index 55d77a902b9..b17052ed542 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_colorMatte.c
+/** \file blender/nodes/composite/nodes/node_composite_colorMatte.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* ******************* Color Key ********************************************************** */
-static bNodeSocketType cmp_node_color_in[]={
- {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_color_in[]={
+ {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f},
{-1,0,""}
};
-static bNodeSocketType cmp_node_color_out[]={
- {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_color_out[]={
+ {SOCK_RGBA,0,"Image"},
+ {SOCK_FLOAT,0,"Matte"},
{-1,0,""}
};
@@ -114,7 +114,7 @@ static void node_composit_exec_color_matte(void *data, bNode *node, bNodeStack *
free_compbuf(cbuf);
}
-static void node_composit_init_color_matte(bNode *node)
+static void node_composit_init_color_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node color");
node->storage= c;
@@ -129,8 +129,8 @@ void register_node_type_cmp_color_matte(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COLOR_MATTE, "Color Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_color_in, cmp_node_color_out);
+ node_type_base(&ntype, CMP_NODE_COLOR_MATTE, "Color Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_color_in, cmp_node_color_out);
node_type_size(&ntype, 200, 80, 300);
node_type_init(&ntype, node_composit_init_color_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
index 905d97709c3..cc55569e566 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
@@ -27,25 +27,25 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
+/** \file blender/nodes/composite/nodes/node_composite_colorSpill.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
#define avg(a,b) ((a+b)/2)
/* ******************* Color Spill Supression ********************************* */
-static bNodeSocketType cmp_node_color_spill_in[]={
- {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_color_spill_in[]={
+ {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ {SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
{-1,0,""}
};
-static bNodeSocketType cmp_node_color_spill_out[]={
- {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_color_spill_out[]={
+ {SOCK_RGBA,0,"Image"},
{-1,0,""}
};
@@ -192,7 +192,7 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
/* Originally based on the information from the book "The Art and Science of Digital Composition" and
* discussions from vfxtalk.com .*/
CompBuf *cbuf;
- CompBuf *mask;
+ /* CompBuf *mask; */ /* UNUSED */
CompBuf *rgbbuf;
CompBuf *spillmap;
NodeColorspill *ncs;
@@ -204,7 +204,7 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
if(in[0]->data==NULL) return;
cbuf=typecheck_compbuf(in[0]->data, CB_RGBA);
- mask=typecheck_compbuf(in[1]->data, CB_VAL);
+ /* mask= */ /* UNUSED */ typecheck_compbuf(in[1]->data, CB_VAL);
spillmap=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1);
rgbbuf=dupalloc_compbuf(cbuf);
@@ -315,7 +315,7 @@ static void node_composit_exec_color_spill(void *UNUSED(data), bNode *node, bNod
free_compbuf(spillmap);
}
-static void node_composit_init_color_spill(bNode *node)
+static void node_composit_init_color_spill(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeColorspill *ncs= MEM_callocN(sizeof(NodeColorspill), "node colorspill");
node->storage=ncs;
@@ -330,8 +330,8 @@ void register_node_type_cmp_color_spill(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE, NODE_OPTIONS,
- cmp_node_color_spill_in, cmp_node_color_spill_out);
+ node_type_base(&ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_color_spill_in, cmp_node_color_spill_out);
node_type_size(&ntype, 140, 80, 200);
node_type_init(&ntype, node_composit_init_color_spill);
node_type_storage(&ntype, "NodeColorspill", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
index 4074ea2fa29..6bce18c14ef 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
@@ -1,5 +1,5 @@
/*
- *
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -27,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_colorbalance.c
+/** \file blender/nodes/composite/nodes/node_composite_colorbalance.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* ******************* Color Balance ********************************* */
-static bNodeSocketType cmp_node_colorbalance_in[]={
- {SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+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", 0.8f, 0.8f, 0.8f, 1.0f},
{-1,0,""}
};
-static bNodeSocketType cmp_node_colorbalance_out[]={
- {SOCK_RGBA,0,"Image", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_colorbalance_out[]={
+ {SOCK_RGBA,0,"Image"},
{-1,0,""}
};
@@ -175,7 +175,7 @@ static void node_composit_exec_colorbalance(void *UNUSED(data), bNode *node, bNo
}
}
-static void node_composit_init_colorbalance(bNode *node)
+static void node_composit_init_colorbalance(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeColorBalance *n= node->storage= MEM_callocN(sizeof(NodeColorBalance), "node colorbalance");
@@ -188,8 +188,8 @@ void register_node_type_cmp_colorbalance(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COLORBALANCE, "Color Balance", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_colorbalance_in, cmp_node_colorbalance_out);
+ node_type_base(&ntype, CMP_NODE_COLORBALANCE, "Color Balance", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_colorbalance_in, cmp_node_colorbalance_out);
node_type_size(&ntype, 400, 200, 400);
node_type_init(&ntype, node_composit_init_colorbalance);
node_type_storage(&ntype, "NodeColorBalance", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c
new file mode 100644
index 00000000000..d5ae442c25f
--- /dev/null
+++ b/source/blender/nodes/composite/nodes/node_composite_common.c
@@ -0,0 +1,373 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Campbell Barton, Alfredo de Greef, David Millan Escriva,
+ * Juho Vepsäläinen
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/composite/nodes/node_composite_common.c
+ * \ingroup cmpnodes
+ */
+
+
+#include "DNA_node_types.h"
+
+#include "BKE_node.h"
+
+#include "node_composite_util.h"
+#include "node_common.h"
+#include "node_exec.h"
+
+#if 0
+static void PRINT_BUFFERS(bNodeTreeExec *exec)
+{
+ bNodeTree *ntree= exec->nodetree;
+ bNode *node;
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int i;
+
+ printf("-------------- DEBUG --------------\n");
+ for (sock=ntree->inputs.first, i=0; sock; sock=sock->next, ++i) {
+ ns = node_get_socket_stack(exec->stack, sock);
+ printf("%d. Tree Input %s", i, sock->name);
+ if (ns->external)
+ printf(" (external)");
+ printf(": data=%p\n", ns->data);
+ }
+ for (sock=ntree->outputs.first, i=0; sock; sock=sock->next, ++i) {
+ ns = node_get_socket_stack(exec->stack, sock);
+ printf("%d. Tree Output %s", i, sock->name);
+ if (ns->external)
+ printf(" (external)");
+ printf(": data=%p\n", ns->data);
+ }
+ for (node=ntree->nodes.first; node; node=node->next) {
+ printf("Node %s:\n", node->name);
+ for (sock=node->inputs.first, i=0; sock; sock=sock->next, ++i) {
+ ns = node_get_socket_stack(exec->stack, sock);
+ printf("\t%d. Input %s", i, sock->name);
+ if (ns->external)
+ printf(" (external)");
+ printf(": data=%p\n", ns->data);
+ }
+ for (sock=node->outputs.first, i=0; sock; sock=sock->next, ++i) {
+ ns = node_get_socket_stack(exec->stack, sock);
+ printf("\t%d. Output %s", i, sock->name);
+ if (ns->external)
+ printf(" (external)");
+ printf(": data=%p\n", ns->data);
+ }
+ }
+}
+#endif
+
+static void copy_stack(bNodeStack *to, bNodeStack *from)
+{
+ if (to != from) {
+ copy_v4_v4(to->vec, from->vec);
+ to->data = from->data;
+ to->datatype = from->datatype;
+
+ /* tag as copy to prevent freeing */
+ to->is_copy = 1;
+ }
+}
+
+static void move_stack(bNodeStack *to, bNodeStack *from)
+{
+ if (to != from) {
+ copy_v4_v4(to->vec, from->vec);
+ to->data = from->data;
+ to->datatype = from->datatype;
+ to->is_copy = from->is_copy;
+
+ zero_v4(from->vec);
+ from->data = NULL;
+ from->datatype = 0;
+ from->is_copy = 0;
+ }
+}
+
+/**** GROUP ****/
+
+static void *group_initexec(bNode *node)
+{
+ bNodeTree *ngroup= (bNodeTree*)node->id;
+ bNodeTreeExec *exec;
+ bNodeSocket *sock;
+ bNodeStack *ns;
+
+ /* initialize the internal node tree execution */
+ exec = ntreeCompositBeginExecTree(ngroup, 0);
+
+ /* tag group outputs as external to prevent freeing */
+ for (sock=ngroup->outputs.first; sock; sock=sock->next) {
+ if (!(sock->flag & SOCK_INTERNAL)) {
+ ns = node_get_socket_stack(exec->stack, sock);
+ ns->external = 1;
+ }
+ }
+
+ return exec;
+}
+
+static void group_freeexec(bNode *UNUSED(node), void *nodedata)
+{
+ bNodeTreeExec *gexec= (bNodeTreeExec*)nodedata;
+
+ ntreeCompositEndExecTree(gexec, 0);
+}
+
+/* Copy inputs to the internal stack.
+ * This is a shallow copy, no buffers are duplicated here!
+ */
+static void group_copy_inputs(bNode *node, bNodeStack **in, bNodeStack *gstack)
+{
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int a;
+ for (sock=node->inputs.first, a=0; sock; sock=sock->next, ++a) {
+ if (sock->groupsock) {
+ ns = node_get_socket_stack(gstack, sock->groupsock);
+ copy_stack(ns, in[a]);
+ }
+ }
+}
+
+/* Copy internal results to the external outputs.
+ */
+static void group_move_outputs(bNode *node, bNodeStack **out, bNodeStack *gstack)
+{
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int a;
+ for (sock=node->outputs.first, a=0; sock; sock=sock->next, ++a) {
+ if (sock->groupsock) {
+ ns = node_get_socket_stack(gstack, sock->groupsock);
+ move_stack(out[a], ns);
+ }
+ }
+}
+
+/* Free internal buffers */
+static void group_free_internal(bNodeTreeExec *gexec) {
+ bNodeStack *ns;
+ int i;
+
+ for (i=0, ns=gexec->stack; i < gexec->stacksize; ++i, ++ns) {
+ if (!ns->external && !ns->is_copy) {
+ if (ns->data) {
+ free_compbuf(ns->data);
+ ns->data = NULL;
+ }
+ }
+ }
+}
+
+static void group_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ group_copy_inputs(node, in, exec->stack);
+ ntreeExecNodes(exec, data, thread);
+ group_free_internal(exec);
+ group_move_outputs(node, out, exec->stack);
+}
+
+void register_node_type_cmp_group(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_group_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_group_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+
+
+/**** FOR LOOP ****/
+
+#if 0 /* XXX loop nodes don't work nicely with current trees */
+/* Move the results from the previous iteration back to the input sockets. */
+static void loop_iteration_reset(bNodeTree *ngroup, bNodeStack *gstack)
+{
+ bNodeSocket *gin, *gout;
+ bNodeStack *nsin, *nsout;
+
+ gin = ngroup->inputs.first;
+ gout = ngroup->outputs.first;
+
+ while (gin && gout) {
+ /* skip static (non-looping) sockets */
+ while (gin && !(gin->flag & SOCK_DYNAMIC))
+ gin=gin->next;
+ while (gout && !(gout->flag & SOCK_DYNAMIC))
+ gout=gout->next;
+
+ if (gin && gout) {
+ nsin = node_get_socket_stack(gstack, gin);
+ nsout = node_get_socket_stack(gstack, gout);
+
+ move_stack(nsin, nsout);
+
+ gin=gin->next;
+ gout=gout->next;
+ }
+ }
+}
+
+static void forloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ int totiterations= (int)in[0]->vec[0];
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int iteration;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ /* "Iteration" socket */
+ sock = exec->nodetree->inputs.first;
+ ns = node_get_socket_stack(exec->stack, sock);
+
+ group_copy_inputs(node, in, exec->stack);
+ for (iteration=0; iteration < totiterations; ++iteration) {
+ /* first input contains current iteration counter */
+ ns->vec[0] = (float)iteration;
+
+ if (iteration > 0)
+ loop_iteration_reset(exec->nodetree, exec->stack);
+ ntreeExecNodes(exec, data, thread);
+ group_free_internal(exec);
+ }
+ group_move_outputs(node, out, exec->stack);
+}
+
+void register_node_type_cmp_forloop(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_forloop_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_forloop_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_tree(&ntype, node_forloop_init_tree, node_loop_update_tree);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+#endif
+
+
+/**** WHILE LOOP ****/
+
+#if 0 /* XXX loop nodes don't work nicely with current trees */
+static void whileloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ int condition= (in[0]->vec[0] > 0.0f);
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int iteration;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ /* "Condition" socket */
+ sock = exec->nodetree->outputs.first;
+ ns = node_get_socket_stack(exec->stack, sock);
+
+ iteration = 0;
+ group_copy_inputs(node, in, exec->stack);
+ while (condition && iteration < node->custom1) {
+ if (iteration > 0)
+ loop_iteration_reset(exec->nodetree, exec->stack);
+ ntreeExecNodes(exec, data, thread);
+ group_free_internal(exec);
+
+// PRINT_BUFFERS(exec);
+
+ condition = (ns->vec[0] > 0.0f);
+ ++iteration;
+ }
+ group_move_outputs(node, out, exec->stack);
+}
+
+void register_node_type_cmp_whileloop(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_whileloop_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_whileloop_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_tree(&ntype, node_whileloop_init_tree, node_loop_update_tree);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+#endif
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_composite.c b/source/blender/nodes/composite/nodes/node_composite_composite.c
index fb68f56ae64..492e5c28459 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_composite.c
+++ b/source/blender/nodes/composite/nodes/node_composite_composite.c
@@ -27,20 +27,20 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_composite.c
+/** \file blender/nodes/composite/nodes/node_composite_composite.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** COMPOSITE ******************** */
-static bNodeSocketType cmp_node_composite_in[]= {
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_composite_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_FLOAT, 1, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
@@ -103,8 +103,8 @@ void register_node_type_cmp_composite(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW,
- cmp_node_composite_in, NULL);
+ node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+ node_type_socket_templates(&ntype, cmp_node_composite_in, NULL);
node_type_size(&ntype, 80, 60, 200);
node_type_exec(&ntype, node_composit_exec_composite);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_crop.c b/source/blender/nodes/composite/nodes/node_composite_crop.c
index 0331217f0cb..b8c539b6d66 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_crop.c
+++ b/source/blender/nodes/composite/nodes/node_composite_crop.c
@@ -1,5 +1,5 @@
/*
- *
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_crop.c
+/** \file blender/nodes/composite/nodes/node_composite_crop.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Crop ******************** */
-static bNodeSocketType cmp_node_crop_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_crop_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_crop_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_crop_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -103,7 +103,7 @@ static void node_composit_exec_crop(void *UNUSED(data), bNode *node, bNodeStack
}
}
-static void node_composit_init_crop(bNode* node)
+static void node_composit_init_crop(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeTwoXYs *nxy= MEM_callocN(sizeof(NodeTwoXYs), "node xy data");
node->storage= nxy;
@@ -117,8 +117,8 @@ void register_node_type_cmp_crop(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT, NODE_OPTIONS,
- cmp_node_crop_in, cmp_node_crop_out);
+ node_type_base(&ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_crop_in, cmp_node_crop_out);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_crop);
node_type_storage(&ntype, "NodeTwoXYs", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c b/source/blender/nodes/composite/nodes/node_composite_curves.c
index 921c5e21fea..58074eaca57 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_curves.c
+++ b/source/blender/nodes/composite/nodes/node_composite_curves.c
@@ -27,19 +27,19 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_curves.c
+/** \file blender/nodes/composite/nodes/node_composite_curves.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** CURVE Time ******************** */
/* custom1 = sfra, custom2 = efra */
-static bNodeSocketType cmp_node_time_out[]= {
- { SOCK_VALUE, 0, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_time_out[]= {
+ { SOCK_FLOAT, 0, "Fac"},
{ -1, 0, "" }
};
@@ -57,7 +57,7 @@ static void node_composit_exec_curves_time(void *data, bNode *node, bNodeStack *
}
-static void node_composit_init_curves_time(bNode* node)
+static void node_composit_init_curves_time(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->custom1= 1;
node->custom2= 250;
@@ -68,8 +68,8 @@ void register_node_type_cmp_curve_time(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS,
- NULL, cmp_node_time_out);
+ node_type_base(&ntype, CMP_NODE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, cmp_node_time_out);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_curves_time);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
@@ -82,13 +82,13 @@ void register_node_type_cmp_curve_time(ListBase *lb)
/* **************** CURVE VEC ******************** */
-static bNodeSocketType cmp_node_curve_vec_in[]= {
- { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_curve_vec_in[]= {
+ { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_curve_vec_out[]= {
- { SOCK_VECTOR, 0, "Vector", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_curve_vec_out[]= {
+ { SOCK_VECTOR, 0, "Vector"},
{ -1, 0, "" }
};
@@ -100,7 +100,7 @@ static void node_composit_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeS
curvemapping_evaluate_premulRGBF(node->storage, out[0]->vec, in[0]->vec);
}
-static void node_composit_init_curve_vec(bNode* node)
+static void node_composit_init_curve_vec(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f);
}
@@ -109,8 +109,8 @@ void register_node_type_cmp_curve_vec(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS,
- cmp_node_curve_vec_in, cmp_node_curve_vec_out);
+ node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_curve_vec_in, cmp_node_curve_vec_out);
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, node_composit_init_curve_vec);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
@@ -121,16 +121,16 @@ void register_node_type_cmp_curve_vec(ListBase *lb)
/* **************** CURVE RGB ******************** */
-static bNodeSocketType cmp_node_curve_rgb_in[]= {
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_RGBA, 1, "Black Level", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_RGBA, 1, "White Level", 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_curve_rgb_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_RGBA, 1, "Black Level", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_RGBA, 1, "White Level", 1.0f, 1.0f, 1.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_curve_rgb_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_curve_rgb_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -187,7 +187,7 @@ static void node_composit_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeS
}
-static void node_composit_init_curve_rgb(bNode* node)
+static void node_composit_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
}
@@ -196,8 +196,8 @@ void register_node_type_cmp_curve_rgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_curve_rgb_in, cmp_node_curve_rgb_out);
+ node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_curve_rgb_in, cmp_node_curve_rgb_out);
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, node_composit_init_curve_rgb);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c b/source/blender/nodes/composite/nodes/node_composite_defocus.c
index f249e2cff6c..84a084591c5 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
+++ b/source/blender/nodes/composite/nodes/node_composite_defocus.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_defocus.c
+/** \file blender/nodes/composite/nodes/node_composite_defocus.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* ************ qdn: Defocus node ****************** */
-static bNodeSocketType cmp_node_defocus_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_defocus_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_defocus_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_defocus_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -857,7 +857,7 @@ static void node_composit_exec_defocus(void *UNUSED(data), bNode *node, bNodeSta
if (zbuf_use && (zbuf_use != zbuf)) free_compbuf(zbuf_use);
}
-static void node_composit_init_defocus(bNode* node)
+static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
/* qdn: defocus node */
NodeDefocus *nbd = MEM_callocN(sizeof(NodeDefocus), "node defocus data");
@@ -878,8 +878,8 @@ void register_node_type_cmp_defocus(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER, NODE_OPTIONS,
- cmp_node_defocus_in, cmp_node_defocus_out);
+ node_type_base(&ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_defocus_in, cmp_node_defocus_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_defocus);
node_type_storage(&ntype, "NodeDefocus", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c
index 296053298da..f3cb223079f 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_diffMatte.c
+/** \file blender/nodes/composite/nodes/node_composite_diffMatte.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* ******************* channel Difference Matte ********************************* */
-static bNodeSocketType cmp_node_diff_matte_in[]={
- {SOCK_RGBA,1,"Image 1", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_RGBA,1,"Image 2", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_diff_matte_in[]={
+ {SOCK_RGBA,1,"Image 1", 0.8f, 0.8f, 0.8f, 1.0f},
+ {SOCK_RGBA,1,"Image 2", 0.8f, 0.8f, 0.8f, 1.0f},
{-1,0,""}
};
-static bNodeSocketType cmp_node_diff_matte_out[]={
- {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_diff_matte_out[]={
+ {SOCK_RGBA,0,"Image"},
+ {SOCK_FLOAT,0,"Matte"},
{-1,0,""}
};
@@ -88,10 +88,10 @@ static void do_diff_matte(bNode *node, float *outColor, float *inColor1, float *
static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
{
- CompBuf *outbuf=0;
- CompBuf *imbuf1=0;
- CompBuf *imbuf2=0;
- NodeChroma *c;
+ CompBuf *outbuf= NULL;
+ CompBuf *imbuf1= NULL;
+ CompBuf *imbuf2= NULL;
+ /* NodeChroma *c; */ /* UNUSED */
/*is anything connected?*/
if(out[0]->hasoutput==0 && out[1]->hasoutput==0) return;
@@ -107,7 +107,7 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **
imbuf2=typecheck_compbuf(in[1]->data, CB_RGBA);
}
- c=node->storage;
+ /* c=node->storage; */ /* UNUSED */
outbuf=dupalloc_compbuf(imbuf1);
/* note, processor gets a keyvals array passed on as buffer constant */
@@ -125,7 +125,7 @@ static void node_composit_exec_diff_matte(void *data, bNode *node, bNodeStack **
free_compbuf(imbuf2);
}
-static void node_composit_init_diff_matte(bNode *node)
+static void node_composit_init_diff_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
node->storage= c;
@@ -137,8 +137,8 @@ void register_node_type_cmp_diff_matte(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DIFF_MATTE, "Difference Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_diff_matte_in, cmp_node_diff_matte_out);
+ node_type_base(&ntype, CMP_NODE_DIFF_MATTE, "Difference Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_diff_matte_in, cmp_node_diff_matte_out);
node_type_size(&ntype, 200, 80, 250);
node_type_init(&ntype, node_composit_init_diff_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_dilate.c b/source/blender/nodes/composite/nodes/node_composite_dilate.c
index f5d16ff0ab8..c774045a12f 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_dilate.c
+++ b/source/blender/nodes/composite/nodes/node_composite_dilate.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_dilate.c
+/** \file blender/nodes/composite/nodes/node_composite_dilate.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Dilate/Erode ******************** */
-static bNodeSocketType cmp_node_dilateerode_in[]= {
- { SOCK_VALUE, 1, "Mask", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_dilateerode_in[]= {
+ { SOCK_FLOAT, 1, "Mask", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_dilateerode_out[]= {
- { SOCK_VALUE, 0, "Mask", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_dilateerode_out[]= {
+ { SOCK_FLOAT, 0, "Mask"},
{ -1, 0, "" }
};
@@ -152,8 +152,8 @@ void register_node_type_cmp_dilateerode(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER, NODE_OPTIONS,
- cmp_node_dilateerode_in, cmp_node_dilateerode_out);
+ node_type_base(&ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_dilateerode_in, cmp_node_dilateerode_out);
node_type_size(&ntype, 130, 100, 320);
node_type_exec(&ntype, node_composit_exec_dilateerode);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_directionalblur.c b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
index 2a8bbcc9ad5..1a5e3150f53 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_directionalblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,20 +27,20 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_directionalblur.c
+/** \file blender/nodes/composite/nodes/node_composite_directionalblur.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
-static bNodeSocketType cmp_node_dblur_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.f, 0.f, 1.f},
+static bNodeSocketTemplate cmp_node_dblur_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_dblur_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_dblur_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -122,7 +123,7 @@ static void node_composit_exec_dblur(void *UNUSED(data), bNode *node, bNodeStack
out[0]->data= dblur(node, new, ndbd->iter, ndbd->wrap, ndbd->center_x, ndbd->center_y, ndbd->distance, ndbd->angle, ndbd->spin, ndbd->zoom);
}
-static void node_composit_init_dblur(bNode* node)
+static void node_composit_init_dblur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeDBlurData *ndbd= MEM_callocN(sizeof(NodeDBlurData), "node dblur data");
node->storage= ndbd;
@@ -134,8 +135,8 @@ void register_node_type_cmp_dblur(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS,
- cmp_node_dblur_in, cmp_node_dblur_out);
+ node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_dblur_in, cmp_node_dblur_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_dblur);
node_type_storage(&ntype, "NodeDBlurData", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_displace.c b/source/blender/nodes/composite/nodes/node_composite_displace.c
index 9139edf8560..28d220eb4c9 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_displace.c
+++ b/source/blender/nodes/composite/nodes/node_composite_displace.c
@@ -27,25 +27,25 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_displace.c
+/** \file blender/nodes/composite/nodes/node_composite_displace.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Displace ******************** */
-static bNodeSocketType cmp_node_displace_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "Vector", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "X Scale", 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f},
- { SOCK_VALUE, 1, "Y Scale", 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f},
+static bNodeSocketTemplate cmp_node_displace_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_VECTOR, 1, "Vector", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_TRANSLATION},
+ { SOCK_FLOAT, 1, "X Scale", 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f, PROP_FACTOR},
+ { SOCK_FLOAT, 1, "Y Scale", 0.0f, 0.0f, 0.0f, 0.0f, -1000.0f, 1000.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_displace_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_displace_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -188,8 +188,8 @@ void register_node_type_cmp_displace(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT, NODE_OPTIONS,
- cmp_node_displace_in, cmp_node_displace_out);
+ node_type_base(&ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_displace_in, cmp_node_displace_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_displace);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
index 5f7613464c1..b186be5500b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_distanceMatte.c
+/** \file blender/nodes/composite/nodes/node_composite_distanceMatte.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* ******************* channel Distance Matte ********************************* */
-static bNodeSocketType cmp_node_distance_matte_in[]={
- {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_distance_matte_in[]={
+ {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ {SOCK_RGBA,1,"Key Color", 0.8f, 0.8f, 0.8f, 1.0f},
{-1,0,""}
};
-static bNodeSocketType cmp_node_distance_matte_out[]={
- {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_distance_matte_out[]={
+ {SOCK_RGBA,0,"Image"},
+ {SOCK_FLOAT,0,"Matte"},
{-1,0,""}
};
@@ -122,7 +122,7 @@ static void node_composit_exec_distance_matte(void *data, bNode *node, bNodeStac
free_compbuf(inbuf);
}
-static void node_composit_init_distance_matte(bNode *node)
+static void node_composit_init_distance_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
node->storage= c;
@@ -134,8 +134,8 @@ void register_node_type_cmp_distance_matte(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DIST_MATTE, "Distance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_distance_matte_in, cmp_node_distance_matte_out);
+ node_type_base(&ntype, CMP_NODE_DIST_MATTE, "Distance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_distance_matte_in, cmp_node_distance_matte_out);
node_type_size(&ntype, 200, 80, 250);
node_type_init(&ntype, node_composit_init_distance_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c b/source/blender/nodes/composite/nodes/node_composite_filter.c
index 915cb01d2d4..64a4c69b671 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_filter.c
+++ b/source/blender/nodes/composite/nodes/node_composite_filter.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_filter.c
+/** \file blender/nodes/composite/nodes/node_composite_filter.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** FILTER ******************** */
-static bNodeSocketType cmp_node_filter_in[]= {
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_filter_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_filter_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_filter_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -226,8 +226,8 @@ void register_node_type_cmp_filter(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_filter_in, cmp_node_filter_out);
+ node_type_base(&ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_filter_in, cmp_node_filter_out);
node_type_size(&ntype, 80, 40, 120);
node_type_label(&ntype, node_filter_label);
node_type_exec(&ntype, node_composit_exec_filter);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_flip.c b/source/blender/nodes/composite/nodes/node_composite_flip.c
index b5fd7b46e03..931aacbe6fd 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_flip.c
+++ b/source/blender/nodes/composite/nodes/node_composite_flip.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_flip.c
+/** \file blender/nodes/composite/nodes/node_composite_flip.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Flip ******************** */
-static bNodeSocketType cmp_node_flip_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_flip_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_flip_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_flip_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -94,8 +94,8 @@ void register_node_type_cmp_flip(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT, NODE_OPTIONS,
- cmp_node_flip_in, cmp_node_flip_out);
+ node_type_base(&ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_flip_in, cmp_node_flip_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_flip);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c b/source/blender/nodes/composite/nodes/node_composite_gamma.c
index 261257d3b5f..f1dd3d40c09 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_gamma.c
+++ b/source/blender/nodes/composite/nodes/node_composite_gamma.c
@@ -28,22 +28,22 @@
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_gamma.c
+/** \file blender/nodes/composite/nodes/node_composite_gamma.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Gamma Tools ******************** */
-static bNodeSocketType cmp_node_gamma_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Gamma", 1.0f, 0.0f, 0.0f, 0.0f, 0.001f, 10.0f},
+static bNodeSocketTemplate cmp_node_gamma_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Gamma", 1.0f, 0.0f, 0.0f, 0.0f, 0.001f, 10.0f, PROP_UNSIGNED},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_gamma_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_gamma_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -81,8 +81,8 @@ void register_node_type_cmp_gamma(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_gamma_in, cmp_node_gamma_out);
+ node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_gamma_in, cmp_node_gamma_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_gamma);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_glare.c b/source/blender/nodes/composite/nodes/node_composite_glare.c
index 2e0822a4511..98a41e4af69 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_glare.c
+++ b/source/blender/nodes/composite/nodes/node_composite_glare.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,19 +27,19 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_glare.c
+/** \file blender/nodes/composite/nodes/node_composite_glare.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
-static bNodeSocketType cmp_node_glare_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_glare_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_glare_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_glare_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -474,7 +475,7 @@ static void node_composit_exec_glare(void *UNUSED(data), bNode *node, bNodeStack
out[0]->data = new;
}
-static void node_composit_init_glare(bNode* node)
+static void node_composit_init_glare(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeGlare *ndg = MEM_callocN(sizeof(NodeGlare), "node glare data");
ndg->quality = 1;
@@ -494,8 +495,8 @@ void register_node_type_cmp_glare(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER, NODE_OPTIONS,
- cmp_node_glare_in, cmp_node_glare_out);
+ node_type_base(&ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_glare_in, cmp_node_glare_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_glare);
node_type_storage(&ntype, "NodeGlare", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
index 7b5511c699c..1d060726b67 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c
+++ b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_hueSatVal.c
+/** \file blender/nodes/composite/nodes/node_composite_hueSatVal.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Hue Saturation ******************** */
-static bNodeSocketType cmp_node_hue_sat_in[]= {
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_hue_sat_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_hue_sat_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_hue_sat_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -95,7 +95,7 @@ static void node_composit_exec_hue_sat(void *UNUSED(data), bNode *node, bNodeSta
}
}
-static void node_composit_init_hue_sat(bNode* node)
+static void node_composit_init_hue_sat(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeHueSat *nhs= MEM_callocN(sizeof(NodeHueSat), "node hue sat");
node->storage= nhs;
@@ -108,8 +108,8 @@ void register_node_type_cmp_hue_sat(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_hue_sat_in, cmp_node_hue_sat_out);
+ node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_hue_sat_in, cmp_node_hue_sat_out);
node_type_size(&ntype, 150, 80, 250);
node_type_init(&ntype, node_composit_init_hue_sat);
node_type_storage(&ntype, "NodeHueSat", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c b/source/blender/nodes/composite/nodes/node_composite_huecorrect.c
index edf6c454285..13a606e2c68 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_huecorrect.c
+++ b/source/blender/nodes/composite/nodes/node_composite_huecorrect.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_huecorrect.c
+/** \file blender/nodes/composite/nodes/node_composite_huecorrect.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
-static bNodeSocketType cmp_node_huecorrect_in[]= {
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_huecorrect_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_huecorrect_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_huecorrect_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -137,7 +137,7 @@ static void node_composit_exec_huecorrect(void *UNUSED(data), bNode *node, bNode
}
-static void node_composit_init_huecorrect(bNode* node)
+static void node_composit_init_huecorrect(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
CurveMapping *cumapping = node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
int c;
@@ -157,8 +157,8 @@ void register_node_type_cmp_huecorrect(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_huecorrect_in, cmp_node_huecorrect_out);
+ node_type_base(&ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_huecorrect_in, cmp_node_huecorrect_out);
node_type_size(&ntype, 320, 140, 400);
node_type_init(&ntype, node_composit_init_huecorrect);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_idMask.c b/source/blender/nodes/composite/nodes/node_composite_idMask.c
index 72d0de7d15e..43f78a90add 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_idMask.c
+++ b/source/blender/nodes/composite/nodes/node_composite_idMask.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_idMask.c
+/** \file blender/nodes/composite/nodes/node_composite_idMask.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** ID Mask ******************** */
-static bNodeSocketType cmp_node_idmask_in[]= {
- { SOCK_VALUE, 1, "ID value", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_idmask_in[]= {
+ { SOCK_FLOAT, 1, "ID value", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_idmask_out[]= {
- { SOCK_VALUE, 0, "Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_idmask_out[]= {
+ { SOCK_FLOAT, 0, "Alpha"},
{ -1, 0, "" }
};
@@ -113,8 +113,8 @@ void register_node_type_cmp_idmask(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_idmask_in, cmp_node_idmask_out);
+ node_type_base(&ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_idmask_in, cmp_node_idmask_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_idmask);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index a5f256054cd..6149947233e 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -27,20 +27,20 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_image.c
+/** \file blender/nodes/composite/nodes/node_composite_image.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** IMAGE (and RenderResult, multilayer image) ******************** */
-static bNodeSocketType cmp_node_rlayers_out[]= {
+static bNodeSocketTemplate cmp_node_rlayers_out[]= {
{ SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "Z", 1.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", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 0, "Speed", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
@@ -52,9 +52,9 @@ static bNodeSocketType cmp_node_rlayers_out[]= {
{ SOCK_RGBA, 0, "Reflect", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "Refract", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "Indirect", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "IndexOB", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "IndexMA", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Mist", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "IndexOB", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "IndexMA", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 0, "Mist", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "Emit", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_RGBA, 0, "Environment",0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
@@ -74,7 +74,7 @@ static CompBuf *node_composit_get_image(RenderData *rd, Image *ima, ImageUser *i
ibuf= BKE_image_get_ibuf(ima, iuser);
if(ibuf==NULL || (ibuf->rect==NULL && ibuf->rect_float==NULL)) {
- return NULL;
+ return NULL;
}
if (ibuf->rect_float == NULL) {
@@ -213,7 +213,7 @@ static void outputs_multilayer_get(RenderData *rd, RenderLayer *rl, bNodeStack *
if(out[RRES_OUT_INDEXOB]->hasoutput)
out[RRES_OUT_INDEXOB]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXOB);
if(out[RRES_OUT_INDEXMA]->hasoutput)
- out[RRES_OUT_INDEXMA]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXMA);
+ out[RRES_OUT_INDEXMA]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_INDEXMA);
if(out[RRES_OUT_MIST]->hasoutput)
out[RRES_OUT_MIST]->data= compbuf_multilayer_get(rd, rl, ima, iuser, SCE_PASS_MIST);
if(out[RRES_OUT_EMIT]->hasoutput)
@@ -295,7 +295,7 @@ static void node_composit_exec_image(void *data, bNode *node, bNodeStack **UNUSE
}
}
-static void node_composit_init_image(bNode* node)
+static void node_composit_init_image(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
node->storage= iuser;
@@ -309,8 +309,8 @@ void register_node_type_cmp_image(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS,
- NULL, cmp_node_rlayers_out);
+ node_type_base(&ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, cmp_node_rlayers_out);
node_type_size(&ntype, 120, 80, 300);
node_type_init(&ntype, node_composit_init_image);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
@@ -440,8 +440,8 @@ void register_node_type_cmp_rlayers(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS,
- NULL, cmp_node_rlayers_out);
+ node_type_base(&ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, cmp_node_rlayers_out);
node_type_size(&ntype, 150, 100, 300);
node_type_exec(&ntype, node_composit_exec_rlayers);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_invert.c b/source/blender/nodes/composite/nodes/node_composite_invert.c
index 27b0324dfe0..fa64c9ec1b1 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_invert.c
+++ b/source/blender/nodes/composite/nodes/node_composite_invert.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_invert.c
+/** \file blender/nodes/composite/nodes/node_composite_invert.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** INVERT ******************** */
-static bNodeSocketType cmp_node_invert_in[]= {
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_invert_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_invert_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_invert_out[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -114,7 +114,7 @@ static void node_composit_exec_invert(void *UNUSED(data), bNode *node, bNodeStac
}
}
-static void node_composit_init_invert(bNode *node)
+static void node_composit_init_invert(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->custom1 |= CMP_CHAN_RGB;
}
@@ -124,8 +124,8 @@ void register_node_type_cmp_invert(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_invert_in, cmp_node_invert_out);
+ node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_invert_in, cmp_node_invert_out);
node_type_size(&ntype, 120, 120, 140);
node_type_init(&ntype, node_composit_init_invert);
node_type_exec(&ntype, node_composit_exec_invert);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_lensdist.c b/source/blender/nodes/composite/nodes/node_composite_lensdist.c
index 3a005210c6a..7d6c945a9e3 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_lensdist.c
+++ b/source/blender/nodes/composite/nodes/node_composite_lensdist.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_lensdist.c
+/** \file blender/nodes/composite/nodes/node_composite_lensdist.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
-static bNodeSocketType cmp_node_lensdist_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Distort", 0.f, 0.f, 0.f, 0.f, -0.999f, 1.f},
- { SOCK_VALUE, 1, "Dispersion", 0.f, 0.f, 0.f, 0.f, 0.f, 1.f},
+static bNodeSocketTemplate cmp_node_lensdist_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Distort", 0.f, 0.f, 0.f, 0.f, -0.999f, 1.f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Dispersion", 0.f, 0.f, 0.f, 0.f, 0.f, 1.f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_lensdist_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_lensdist_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -183,7 +184,7 @@ static void node_composit_exec_lensdist(void *UNUSED(data), bNode *node, bNodeSt
}
-static void node_composit_init_lensdist(bNode* node)
+static void node_composit_init_lensdist(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeLensDist *nld = MEM_callocN(sizeof(NodeLensDist), "node lensdist data");
nld->jit = nld->proj = nld->fit = 0;
@@ -195,8 +196,8 @@ void register_node_type_cmp_lensdist(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS,
- cmp_node_lensdist_in, cmp_node_lensdist_out);
+ node_type_base(&ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_lensdist_in, cmp_node_lensdist_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_lensdist);
node_type_storage(&ntype, "NodeLensDist", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c b/source/blender/nodes/composite/nodes/node_composite_levels.c
index 2c9f7d97f09..e34788ff62b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_levels.c
+++ b/source/blender/nodes/composite/nodes/node_composite_levels.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_levels.c
+/** \file blender/nodes/composite/nodes/node_composite_levels.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** LEVELS ******************** */
-static bNodeSocketType cmp_node_view_levels_in[]= {
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_view_levels_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_view_levels_out[]={
- {SOCK_VALUE, 0,"Mean",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE, 0,"Std Dev",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_view_levels_out[]={
+ {SOCK_FLOAT, 0,"Mean"},
+ {SOCK_FLOAT, 0,"Std Dev"},
{-1,0,""}
};
@@ -52,7 +52,7 @@ static void rgb_tobw(float r, float g, float b, float* out)
*out= r*0.35f + g*0.45f + b*0.2f;
}
-static void fill_bins(bNode* node, CompBuf* in, int* bins, int colorcor)
+static void fill_bins(bNode* node, CompBuf* in, int* bins)
{
float value[4];
int ivalue=0;
@@ -68,39 +68,29 @@ static void fill_bins(bNode* node, CompBuf* in, int* bins, int colorcor)
if(value[3] > 0.0) { /* don't count transparent pixels */
switch(node->custom1) {
case 1: { /* all colors */
- if(colorcor)
- linearrgb_to_srgb_v3_v3(&value[0],&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;
}
case 2: { /* red channel */
- if(colorcor)
- value[0]=linearrgb_to_srgb(value[0]);
value[0]=value[0]*255; /* scale to 0-255 range */
ivalue=(int)value[0];
break;
}
case 3: { /* green channel */
- if(colorcor)
- value[1]=linearrgb_to_srgb(value[1]);
value[1]=value[1]*255; /* scale to 0-255 range */
ivalue=(int)value[1];
break;
}
case 4: /*blue channel */
{
- if(colorcor)
- value[2]=linearrgb_to_srgb(value[2]);
value[2]=value[2]*255; /* scale to 0-255 range */
ivalue=(int)value[2];
break;
}
case 5: /* luminence */
{
- if(colorcor)
- linearrgb_to_srgb_v3_v3(&value[0],&value[0]);
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];
@@ -285,7 +275,6 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack *
{
CompBuf* cbuf;
CompBuf* histogram;
- RenderData *rd=data;
float mean, std_dev;
int bins[256];
int x;
@@ -302,7 +291,7 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack *
}
/*fill bins */
- fill_bins(node, in[0]->data, bins, rd->color_mgt_flag & R_COLOR_MANAGEMENT);
+ fill_bins(node, in[0]->data, bins);
/* draw the histogram chart */
draw_histogram(node, histogram, bins);
@@ -328,7 +317,7 @@ static void node_composit_exec_view_levels(void *data, bNode *node, bNodeStack *
free_compbuf(histogram);
}
-static void node_composit_init_view_levels(bNode* node)
+static void node_composit_init_view_levels(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->custom1=1; /*All channels*/
}
@@ -337,8 +326,8 @@ void register_node_type_cmp_view_levels(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT, NODE_OPTIONS|NODE_PREVIEW,
- cmp_node_view_levels_in, cmp_node_view_levels_out);
+ node_type_base(&ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_socket_templates(&ntype, cmp_node_view_levels_in, cmp_node_view_levels_out);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_view_levels);
node_type_storage(&ntype, "ImageUser", NULL, NULL);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
index 34e58791932..cac2a386801 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_lummaMatte.c
+/** \file blender/nodes/composite/nodes/node_composite_lummaMatte.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* ******************* Luma Matte Node ********************************* */
-static bNodeSocketType cmp_node_luma_matte_in[]={
- {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_luma_matte_in[]={
+ {SOCK_RGBA,1,"Image", 0.8f, 0.8f, 0.8f, 1.0f},
{-1,0,""}
};
-static bNodeSocketType cmp_node_luma_matte_out[]={
- {SOCK_RGBA,0,"Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- {SOCK_VALUE,0,"Matte",0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_luma_matte_out[]={
+ {SOCK_RGBA,0,"Image"},
+ {SOCK_FLOAT,0,"Matte"},
{-1,0,""}
};
@@ -100,7 +100,7 @@ static void node_composit_exec_luma_matte(void *data, bNode *node, bNodeStack **
free_compbuf(cbuf);
}
-static void node_composit_init_luma_matte(bNode *node)
+static void node_composit_init_luma_matte(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeChroma *c= MEM_callocN(sizeof(NodeChroma), "node chroma");
node->storage=c;
@@ -112,8 +112,8 @@ void register_node_type_cmp_luma_matte(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_luma_matte_in, cmp_node_luma_matte_out);
+ node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_luma_matte_in, cmp_node_luma_matte_out);
node_type_size(&ntype, 200, 80, 250);
node_type_init(&ntype, node_composit_init_luma_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c b/source/blender/nodes/composite/nodes/node_composite_mapUV.c
index 6b2c561b14a..b1cae62274b 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_mapUV.c
+++ b/source/blender/nodes/composite/nodes/node_composite_mapUV.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_mapUV.c
+/** \file blender/nodes/composite/nodes/node_composite_mapUV.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Map UV ******************** */
-static bNodeSocketType cmp_node_mapuv_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "UV", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_mapuv_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_VECTOR, 1, "UV", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_mapuv_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_mapuv_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -168,8 +168,8 @@ void register_node_type_cmp_mapuv(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT, NODE_OPTIONS,
- cmp_node_mapuv_in, cmp_node_mapuv_out);
+ node_type_base(&ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_mapuv_in, cmp_node_mapuv_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_mapuv);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c b/source/blender/nodes/composite/nodes/node_composite_mapValue.c
index f14e0fbd804..95e0f3dadd1 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_mapValue.c
+++ b/source/blender/nodes/composite/nodes/node_composite_mapValue.c
@@ -27,20 +27,20 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_mapValue.c
+/** \file blender/nodes/composite/nodes/node_composite_mapValue.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** MAP VALUE ******************** */
-static bNodeSocketType cmp_node_map_value_in[]= {
- { SOCK_VALUE, 1, "Value", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_map_value_in[]= {
+ { SOCK_FLOAT, 1, "Value", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_map_value_out[]= {
- { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_map_value_out[]= {
+ { SOCK_FLOAT, 0, "Value"},
{ -1, 0, "" }
};
@@ -79,7 +79,7 @@ static void node_composit_exec_map_value(void *UNUSED(data), bNode *node, bNodeS
}
-static void node_composit_init_map_value(bNode* node)
+static void node_composit_init_map_value(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= add_mapping();
}
@@ -88,8 +88,8 @@ void register_node_type_cmp_map_value(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR, NODE_OPTIONS,
- cmp_node_map_value_in, cmp_node_map_value_out);
+ node_type_base(&ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_map_value_in, cmp_node_map_value_out);
node_type_size(&ntype, 100, 60, 150);
node_type_init(&ntype, node_composit_init_map_value);
node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_math.c b/source/blender/nodes/composite/nodes/node_composite_math.c
index b7a67f3563b..a8a631bdbad 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_math.c
+++ b/source/blender/nodes/composite/nodes/node_composite_math.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_math.c
+/** \file blender/nodes/composite/nodes/node_composite_math.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** SCALAR MATH ******************** */
-static bNodeSocketType cmp_node_math_in[]= {
- { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f},
- { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f},
+static bNodeSocketTemplate cmp_node_math_in[]= {
+ { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -10000.0f, 10000.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_math_out[]= {
- { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_math_out[]= {
+ { SOCK_FLOAT, 0, "Value"},
{ -1, 0, "" }
};
@@ -145,7 +145,6 @@ static void do_math(bNode *node, float *out, float *in, float *in2)
out[0]= floorf(in[0] / in2[0] + 0.5f) * in2[0];
else
out[0]= floorf(in[0] + 0.5f);
-
}
break;
case 15: /* Less Than */
@@ -201,8 +200,8 @@ void register_node_type_cmp_math(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_math_in, cmp_node_math_out);
+ node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_math_in, cmp_node_math_out);
node_type_size(&ntype, 120, 110, 160);
node_type_label(&ntype, node_math_label);
node_type_exec(&ntype, node_composit_exec_math);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c
index d2454b37c29..eaab24d628a 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
+++ b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
+/** \file blender/nodes/composite/nodes/node_composite_mixrgb.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** MIX RGB ******************** */
-static bNodeSocketType cmp_node_mix_rgb_in[]= {
- { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f},
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_mix_rgb_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_mix_rgb_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_mix_rgb_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -88,8 +88,8 @@ void register_node_type_cmp_mix_rgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_mix_rgb_in, cmp_node_mix_rgb_out);
+ node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_mix_rgb_in, cmp_node_mix_rgb_out);
node_type_size(&ntype, 110, 60, 120);
node_type_label(&ntype, node_blend_label);
node_type_exec(&ntype, node_composit_exec_mix_rgb);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_normal.c b/source/blender/nodes/composite/nodes/node_composite_normal.c
index f53d3041947..adf087019dc 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_normal.c
+++ b/source/blender/nodes/composite/nodes/node_composite_normal.c
@@ -27,30 +27,30 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_normal.c
+/** \file blender/nodes/composite/nodes/node_composite_normal.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** NORMAL ******************** */
-static bNodeSocketType cmp_node_normal_in[]= {
- { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_normal_in[]= {
+ { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_normal_out[]= {
- { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_VALUE, 0, "Dot", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_normal_out[]= {
+ { SOCK_VECTOR, 0, "Normal"},
+ { SOCK_FLOAT, 0, "Dot"},
{ -1, 0, "" }
};
static void do_normal(bNode *node, float *out, float *in)
{
bNodeSocket *sock= node->outputs.first;
- float *nor= sock->ns.vec;
+ float *nor= ((bNodeSocketValueVector*)sock->default_value)->value;
/* render normals point inside... the widget points outside */
out[0]= -INPR(nor, in);
@@ -60,12 +60,13 @@ static void do_normal(bNode *node, float *out, float *in)
static void node_composit_exec_normal(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
{
bNodeSocket *sock= node->outputs.first;
+ float *nor= ((bNodeSocketValueVector*)sock->default_value)->value;
/* stack order input: normal */
/* stack order output: normal, value */
/* input no image? then only vector op */
if(in[0]->data==NULL) {
- VECCOPY(out[0]->vec, sock->ns.vec);
+ VECCOPY(out[0]->vec, nor);
/* render normals point inside... the widget points outside */
out[1]->vec[0]= -INPR(out[0]->vec, in[0]->vec);
}
@@ -82,12 +83,23 @@ static void node_composit_exec_normal(void *UNUSED(data), bNode *node, bNodeStac
}
+static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
+{
+ bNodeSocket *sock= node->outputs.first;
+ float *nor= ((bNodeSocketValueVector*)sock->default_value)->value;
+
+ nor[0] = 0.0f;
+ nor[1] = 0.0f;
+ nor[2] = 1.0f;
+}
+
void register_node_type_cmp_normal(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS,
- cmp_node_normal_in, cmp_node_normal_out);
+ node_type_base(&ntype, CMP_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_normal_in, cmp_node_normal_out);
+ node_type_init(&ntype, init);
node_type_size(&ntype, 100, 60, 200);
node_type_exec(&ntype, node_composit_exec_normal);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c b/source/blender/nodes/composite/nodes/node_composite_normalize.c
index 22ebd924f09..3a913b1a0a2 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_normalize.c
+++ b/source/blender/nodes/composite/nodes/node_composite_normalize.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_normalize.c
+/** \file blender/nodes/composite/nodes/node_composite_normalize.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** NORMALIZE single channel, useful for Z buffer ******************** */
-static bNodeSocketType cmp_node_normalize_in[]= {
- { SOCK_VALUE, 1, "Value", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_normalize_in[]= {
+ { SOCK_FLOAT, 1, "Value", 1.0f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_normalize_out[]= {
- { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_normalize_out[]= {
+ { SOCK_FLOAT, 0, "Value"},
{ -1, 0, "" }
};
@@ -107,8 +107,8 @@ void register_node_type_cmp_normalize(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR, NODE_OPTIONS,
- cmp_node_normalize_in, cmp_node_normalize_out);
+ node_type_base(&ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_normalize_in, cmp_node_normalize_out);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, node_composit_exec_normalize);
node_type_storage(&ntype, "TexMapping", NULL, NULL);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
index 1d52e694ea9..20203f66b5a 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
+++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
@@ -27,17 +27,17 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_outputFile.c
+/** \file blender/nodes/composite/nodes/node_composite_outputFile.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** OUTPUT FILE ******************** */
-static bNodeSocketType cmp_node_output_file_in[]= {
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Z", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_output_file_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Z", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
@@ -93,7 +93,7 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack *
}
}
-static void node_composit_init_output_file(bNode *node)
+static void node_composit_init_output_file(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
Scene *scene= (Scene *)node->id;
NodeImageFile *nif= MEM_callocN(sizeof(NodeImageFile), "node image file");
@@ -113,8 +113,8 @@ void register_node_type_cmp_output_file(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_output_file_in, NULL);
+ node_type_base(&ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_output_file_in, NULL);
node_type_size(&ntype, 140, 80, 300);
node_type_init(&ntype, node_composit_init_output_file);
node_type_storage(&ntype, "NodeImageFile", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_premulkey.c b/source/blender/nodes/composite/nodes/node_composite_premulkey.c
index 15d2ac25180..a3f958e04d9 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_premulkey.c
+++ b/source/blender/nodes/composite/nodes/node_composite_premulkey.c
@@ -28,21 +28,21 @@
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_premulkey.c
+/** \file blender/nodes/composite/nodes/node_composite_premulkey.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Premul and Key Alpha Convert ******************** */
-static bNodeSocketType cmp_node_premulkey_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_premulkey_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_premulkey_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_premulkey_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -67,8 +67,8 @@ void register_node_type_cmp_premulkey(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_premulkey_in, cmp_node_premulkey_out);
+ node_type_base(&ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_premulkey_in, cmp_node_premulkey_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_premulkey);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_rgb.c b/source/blender/nodes/composite/nodes/node_composite_rgb.c
index 36b7988c4e0..b9287a4978e 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_rgb.c
+++ b/source/blender/nodes/composite/nodes/node_composite_rgb.c
@@ -27,33 +27,46 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_rgb.c
+/** \file blender/nodes/composite/nodes/node_composite_rgb.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** RGB ******************** */
-static bNodeSocketType cmp_node_rgb_out[]= {
- { SOCK_RGBA, 0, "RGBA", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_rgb_out[]= {
+ { SOCK_RGBA, 0, "RGBA", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
+static void node_composit_init_rgb(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
+{
+ bNodeSocket *sock= node->outputs.first;
+ float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
+ /* uses the default value of the output socket, must be initialized here */
+ col[0] = 0.5f;
+ col[1] = 0.5f;
+ col[2] = 0.5f;
+ col[3] = 1.0f;
+}
+
static void node_composit_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
{
bNodeSocket *sock= node->outputs.first;
+ float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
- QUATCOPY(out[0]->vec, sock->ns.vec);
+ QUATCOPY(out[0]->vec, col);
}
void register_node_type_cmp_rgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS,
- NULL, cmp_node_rgb_out);
+ node_type_base(&ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, cmp_node_rgb_out);
+ node_type_init(&ntype, node_composit_init_rgb);
node_type_size(&ntype, 140, 80, 140);
node_type_exec(&ntype, node_composit_exec_rgb);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c b/source/blender/nodes/composite/nodes/node_composite_rotate.c
index eccac4f0e6d..2bbb77cd1da 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
+++ b/source/blender/nodes/composite/nodes/node_composite_rotate.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_rotate.c
+/** \file blender/nodes/composite/nodes/node_composite_rotate.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Rotate ******************** */
-static bNodeSocketType cmp_node_rotate_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Degr", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
+static bNodeSocketTemplate cmp_node_rotate_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Degr", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_ANGLE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_rotate_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_rotate_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -122,7 +122,7 @@ static void node_composit_exec_rotate(void *UNUSED(data), bNode *node, bNodeStac
}
}
-static void node_composit_init_rotate(bNode *node)
+static void node_composit_init_rotate(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->custom1= 1; /* Bilinear Filter*/
}
@@ -131,8 +131,8 @@ void register_node_type_cmp_rotate(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS,
- cmp_node_rotate_in, cmp_node_rotate_out);
+ node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_rotate_in, cmp_node_rotate_out);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_rotate);
node_type_exec(&ntype, node_composit_exec_rotate);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c b/source/blender/nodes/composite/nodes/node_composite_scale.c
index b6030cc5a5f..b6ad36f957f 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c
+++ b/source/blender/nodes/composite/nodes/node_composite_scale.c
@@ -27,25 +27,25 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_scale.c
+/** \file blender/nodes/composite/nodes/node_composite_scale.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Scale ******************** */
#define CMP_SCALE_MAX 12000
-static bNodeSocketType cmp_node_scale_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "X", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, CMP_SCALE_MAX},
- { SOCK_VALUE, 1, "Y", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, CMP_SCALE_MAX},
+static bNodeSocketTemplate cmp_node_scale_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "X", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, CMP_SCALE_MAX, PROP_FACTOR},
+ { SOCK_FLOAT, 1, "Y", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, CMP_SCALE_MAX, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_scale_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_scale_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -118,8 +118,8 @@ void register_node_type_cmp_scale(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS,
- cmp_node_scale_in, cmp_node_scale_out);
+ node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_scale_in, cmp_node_scale_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_scale);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
index 87c4ed1dac0..6b1813d2142 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
@@ -27,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
+/** \file blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** SEPARATE HSVA ******************** */
-static bNodeSocketType cmp_node_sephsva_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_sephsva_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_sephsva_out[]= {
- { SOCK_VALUE, 0, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "A", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_sephsva_out[]= {
+ { SOCK_FLOAT, 0, "H"},
+ { SOCK_FLOAT, 0, "S"},
+ { SOCK_FLOAT, 0, "V"},
+ { SOCK_FLOAT, 0, "A"},
{ -1, 0, "" }
};
@@ -105,8 +105,8 @@ void register_node_type_cmp_sephsva(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0,
- cmp_node_sephsva_in, cmp_node_sephsva_out);
+ node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0);
+ node_type_socket_templates(&ntype, cmp_node_sephsva_in, cmp_node_sephsva_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_sephsva);
@@ -115,15 +115,15 @@ void register_node_type_cmp_sephsva(ListBase *lb)
/* **************** COMBINE HSVA ******************** */
-static bNodeSocketType cmp_node_combhsva_in[]= {
- { SOCK_VALUE, 1, "H", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "S", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+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 bNodeSocketType cmp_node_combhsva_out[]= {
- { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_combhsva_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -175,8 +175,8 @@ void register_node_type_cmp_combhsva(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_combhsva_in, cmp_node_combhsva_out);
+ node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_combhsva_in, cmp_node_combhsva_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_combhsva);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c
index 11afd1eaaef..a60f6b81c95 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_sepcombRGBA.c
+/** \file blender/nodes/composite/nodes/node_composite_sepcombRGBA.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** SEPARATE RGBA ******************** */
-static bNodeSocketType cmp_node_seprgba_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_seprgba_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_seprgba_out[]= {
- { SOCK_VALUE, 0, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "A", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_seprgba_out[]= {
+ { SOCK_FLOAT, 0, "R"},
+ { SOCK_FLOAT, 0, "G"},
+ { SOCK_FLOAT, 0, "B"},
+ { SOCK_FLOAT, 0, "A"},
{ -1, 0, "" }
};
@@ -83,8 +83,8 @@ void register_node_type_cmp_seprgba(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTOR, 0,
- cmp_node_seprgba_in, cmp_node_seprgba_out);
+ node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTOR, 0);
+ node_type_socket_templates(&ntype, cmp_node_seprgba_in, cmp_node_seprgba_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_seprgba);
@@ -94,15 +94,15 @@ void register_node_type_cmp_seprgba(ListBase *lb)
/* **************** COMBINE RGBA ******************** */
-static bNodeSocketType cmp_node_combrgba_in[]= {
- { SOCK_VALUE, 1, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_combrgba_in[]= {
+ { SOCK_FLOAT, 1, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "B", 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 bNodeSocketType cmp_node_combrgba_out[]= {
- { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_combrgba_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -151,8 +151,8 @@ void register_node_type_cmp_combrgba(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_combrgba_in, cmp_node_combrgba_out);
+ node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_combrgba_in, cmp_node_combrgba_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_combrgba);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
index 81591602dae..5e042f54fb0 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
@@ -27,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_sepcombYCCA.c
+/** \file blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** SEPARATE YCCA ******************** */
-static bNodeSocketType cmp_node_sepycca_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_sepycca_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_sepycca_out[]= {
- { SOCK_VALUE, 0, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Cb", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Cr", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "A", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_sepycca_out[]= {
+ { SOCK_FLOAT, 0, "Y"},
+ { SOCK_FLOAT, 0, "Cb"},
+ { SOCK_FLOAT, 0, "Cr"},
+ { SOCK_FLOAT, 0, "A"},
{ -1, 0, "" }
};
@@ -154,8 +154,8 @@ void register_node_type_cmp_sepycca(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_sepycca_in, cmp_node_sepycca_out);
+ node_type_base(&ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_sepycca_in, cmp_node_sepycca_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_sepycca);
@@ -165,15 +165,15 @@ void register_node_type_cmp_sepycca(ListBase *lb)
/* **************** COMBINE YCCA ******************** */
-static bNodeSocketType cmp_node_combycca_in[]= {
- { SOCK_VALUE, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Cb", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Cr", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_combycca_in[]= {
+ { SOCK_FLOAT, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Cb", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Cr", 0.5f, 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 bNodeSocketType cmp_node_combycca_out[]= {
- { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_combycca_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -301,8 +301,8 @@ void register_node_type_cmp_combycca(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_combycca_in, cmp_node_combycca_out);
+ node_type_base(&ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_combycca_in, cmp_node_combycca_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_combycca);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
index 8687e307df3..70bc36a020d 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
@@ -27,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_sepcombYUVA.c
+/** \file blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** SEPARATE YUVA ******************** */
-static bNodeSocketType cmp_node_sepyuva_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_sepyuva_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_sepyuva_out[]= {
- { SOCK_VALUE, 0, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "U", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "A", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_sepyuva_out[]= {
+ { SOCK_FLOAT, 0, "Y"},
+ { SOCK_FLOAT, 0, "U"},
+ { SOCK_FLOAT, 0, "V"},
+ { SOCK_FLOAT, 0, "A"},
{ -1, 0, "" }
};
@@ -105,8 +105,8 @@ void register_node_type_cmp_sepyuva(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTOR, 0,
- cmp_node_sepyuva_in, cmp_node_sepyuva_out);
+ node_type_base(&ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTOR, 0);
+ node_type_socket_templates(&ntype, cmp_node_sepyuva_in, cmp_node_sepyuva_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_sepyuva);
@@ -116,15 +116,15 @@ void register_node_type_cmp_sepyuva(ListBase *lb)
/* **************** COMBINE YUVA ******************** */
-static bNodeSocketType cmp_node_combyuva_in[]= {
- { SOCK_VALUE, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "U", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "V", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "A", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_combyuva_in[]= {
+ { SOCK_FLOAT, 1, "Y", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "U", 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 bNodeSocketType cmp_node_combyuva_out[]= {
- { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_combyuva_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -176,8 +176,8 @@ void register_node_type_cmp_combyuva(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_combyuva_in, cmp_node_combyuva_out);
+ node_type_base(&ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_combyuva_in, cmp_node_combyuva_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_combyuva);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_setalpha.c b/source/blender/nodes/composite/nodes/node_composite_setalpha.c
index bb8533a79f6..8264d4d4dea 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_setalpha.c
+++ b/source/blender/nodes/composite/nodes/node_composite_setalpha.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_setalpha.c
+/** \file blender/nodes/composite/nodes/node_composite_setalpha.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** SET ALPHA ******************** */
-static bNodeSocketType cmp_node_setalpha_in[]= {
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_setalpha_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_setalpha_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_setalpha_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -79,8 +79,8 @@ void register_node_type_cmp_setalpha(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_setalpha_in, cmp_node_setalpha_out);
+ node_type_base(&ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_setalpha_in, cmp_node_setalpha_out);
node_type_size(&ntype, 120, 40, 140);
node_type_exec(&ntype, node_composit_exec_setalpha);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c
index 13cb3bcfed5..e73caa542b7 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
+++ b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c
@@ -27,17 +27,17 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_splitViewer.c
+/** \file blender/nodes/composite/nodes/node_composite_splitViewer.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** SPLIT VIEWER ******************** */
-static bNodeSocketType cmp_node_splitviewer_in[]= {
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_splitviewer_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -141,7 +141,7 @@ static void node_composit_exec_splitviewer(void *data, bNode *node, bNodeStack *
}
}
-static void node_composit_init_splitviewer(bNode* node)
+static void node_composit_init_splitviewer(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
node->storage= iuser;
@@ -155,8 +155,8 @@ void register_node_type_cmp_splitviewer(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SPLITVIEWER, "SplitViewer", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS,
- cmp_node_splitviewer_in, NULL);
+ node_type_base(&ntype, CMP_NODE_SPLITVIEWER, "SplitViewer", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_splitviewer_in, NULL);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_splitviewer);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c b/source/blender/nodes/composite/nodes/node_composite_texture.c
index 46e71b8b8e5..1dbbd56d2f1 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_texture.c
+++ b/source/blender/nodes/composite/nodes/node_composite_texture.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_texture.c
+/** \file blender/nodes/composite/nodes/node_composite_texture.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** TEXTURE ******************** */
-static bNodeSocketType cmp_node_texture_in[]= {
- { SOCK_VECTOR, 1, "Offset", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f},
- { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 1.0f, -10.0f, 10.0f},
+static bNodeSocketTemplate cmp_node_texture_in[]= {
+ { SOCK_VECTOR, 1, "Offset", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_TRANSLATION},
+ { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 1.0f, -10.0f, 10.0f, PROP_XYZ},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_texture_out[]= {
- { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA , 0, "Color", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_texture_out[]= {
+ { SOCK_FLOAT, 0, "Value"},
+ { SOCK_RGBA , 0, "Color"},
{ -1, 0, "" }
};
@@ -148,8 +148,8 @@ void register_node_type_cmp_texture(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW,
- cmp_node_texture_in, cmp_node_texture_out);
+ node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_socket_templates(&ntype, cmp_node_texture_in, cmp_node_texture_out);
node_type_size(&ntype, 120, 80, 240);
node_type_exec(&ntype, node_composit_exec_texture);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
index f15811ec790..ba2dc9c5c79 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c
+++ b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,19 +27,19 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_tonemap.c
+/** \file blender/nodes/composite/nodes/node_composite_tonemap.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
-static bNodeSocketType cmp_node_tonemap_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_tonemap_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_tonemap_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_tonemap_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -147,7 +148,7 @@ static void node_composit_exec_tonemap(void *UNUSED(data), bNode *node, bNodeSta
free_compbuf(img);
}
-static void node_composit_init_tonemap(bNode* node)
+static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeTonemap *ntm = MEM_callocN(sizeof(NodeTonemap), "node tonemap data");
ntm->type = 1;
@@ -167,8 +168,8 @@ void register_node_type_cmp_tonemap(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_tonemap_in, cmp_node_tonemap_out);
+ node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_tonemap_in, cmp_node_tonemap_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_tonemap);
node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_translate.c b/source/blender/nodes/composite/nodes/node_composite_translate.c
index eb69523e7a9..872667a4e17 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_translate.c
+++ b/source/blender/nodes/composite/nodes/node_composite_translate.c
@@ -27,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_translate.c
+/** \file blender/nodes/composite/nodes/node_composite_translate.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Translate ******************** */
-static bNodeSocketType cmp_node_translate_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "X", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
- { SOCK_VALUE, 1, "Y", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
+static bNodeSocketTemplate cmp_node_translate_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "X", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Y", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_translate_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_translate_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -65,8 +65,8 @@ void register_node_type_cmp_translate(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS,
- cmp_node_translate_in, cmp_node_translate_out);
+ node_type_base(&ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_translate_in, cmp_node_translate_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_translate);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c
index 1e1c8c61b46..edd315e5a92 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_valToRgb.c
+++ b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_valToRgb.c
+/** \file blender/nodes/composite/nodes/node_composite_valToRgb.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** VALTORGB ******************** */
-static bNodeSocketType cmp_node_valtorgb_in[]= {
- { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_valtorgb_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_valtorgb_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_valtorgb_out[]= {
+ { SOCK_RGBA, 0, "Image"},
+ { SOCK_FLOAT, 0, "Alpha"},
{ -1, 0, "" }
};
@@ -80,7 +80,7 @@ static void node_composit_exec_valtorgb(void *UNUSED(data), bNode *node, bNodeSt
}
}
-static void node_composit_init_valtorgb(bNode* node)
+static void node_composit_init_valtorgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= add_colorband(1);
}
@@ -89,8 +89,8 @@ void register_node_type_cmp_valtorgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- cmp_node_valtorgb_in, cmp_node_valtorgb_out);
+ node_type_base(&ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_valtorgb_in, cmp_node_valtorgb_out);
node_type_size(&ntype, 240, 200, 300);
node_type_init(&ntype, node_composit_init_valtorgb);
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
@@ -102,12 +102,12 @@ void register_node_type_cmp_valtorgb(ListBase *lb)
/* **************** RGBTOBW ******************** */
-static bNodeSocketType cmp_node_rgbtobw_in[]= {
+static bNodeSocketTemplate cmp_node_rgbtobw_in[]= {
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_rgbtobw_out[]= {
- { SOCK_VALUE, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_rgbtobw_out[]= {
+ { SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -143,8 +143,8 @@ void register_node_type_cmp_rgbtobw(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0,
- cmp_node_rgbtobw_in, cmp_node_rgbtobw_out);
+ node_type_base(&ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
+ node_type_socket_templates(&ntype, cmp_node_rgbtobw_in, cmp_node_rgbtobw_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_composit_exec_rgbtobw);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_value.c b/source/blender/nodes/composite/nodes/node_composite_value.c
index 46762065bb4..ed650477f50 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_value.c
+++ b/source/blender/nodes/composite/nodes/node_composite_value.c
@@ -27,32 +27,45 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_value.c
+/** \file blender/nodes/composite/nodes/node_composite_value.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** VALUE ******************** */
-static bNodeSocketType cmp_node_value_out[]= {
- { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
+static bNodeSocketTemplate cmp_node_value_out[]= {
+ /* XXX value nodes use the output sockets for buttons, so we need explicit limits here! */
+ { SOCK_FLOAT, 0, "Value", 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
{ -1, 0, "" }
};
+static void node_composit_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
+{
+ bNodeSocket *sock= node->outputs.first;
+ bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value;
+ /* uses the default value of the output socket, must be initialized here */
+ dval->value = 0.5f;
+ dval->min = -FLT_MAX;
+ dval->max = FLT_MAX;
+}
+
static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
{
bNodeSocket *sock= node->outputs.first;
+ float val= ((bNodeSocketValueFloat*)sock->default_value)->value;
- out[0]->vec[0]= sock->ns.vec[0];
+ out[0]->vec[0]= val;
}
void register_node_type_cmp_value(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS,
- NULL, cmp_node_value_out);
+ node_type_base(&ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, cmp_node_value_out);
+ node_type_init(&ntype, node_composit_init_value);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_composit_exec_value);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c b/source/blender/nodes/composite/nodes/node_composite_vecBlur.c
index c43bfa2435a..26fcffa93ac 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_vecBlur.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_vecBlur.c
+/** \file blender/nodes/composite/nodes/node_composite_vecBlur.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** VECTOR BLUR ******************** */
-static bNodeSocketType cmp_node_vecblur_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Z", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "Speed", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_vecblur_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Z", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_VECTOR, 1, "Speed", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_VELOCITY},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_vecblur_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_vecblur_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -87,7 +87,7 @@ static void node_composit_exec_vecblur(void *UNUSED(data), bNode *node, bNodeSta
free_compbuf(img);
}
-static void node_composit_init_vecblur(bNode* node)
+static void node_composit_init_vecblur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
NodeBlurData *nbd= MEM_callocN(sizeof(NodeBlurData), "node blur data");
node->storage= nbd;
@@ -100,8 +100,8 @@ void register_node_type_cmp_vecblur(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS,
- cmp_node_vecblur_in, cmp_node_vecblur_out);
+ node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_vecblur_in, cmp_node_vecblur_out);
node_type_size(&ntype, 120, 80, 200);
node_type_init(&ntype, node_composit_init_vecblur);
node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c b/source/blender/nodes/composite/nodes/node_composite_viewer.c
index c4e719efbf9..8b052c5db35 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_viewer.c
+++ b/source/blender/nodes/composite/nodes/node_composite_viewer.c
@@ -27,19 +27,19 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_viewer.c
+/** \file blender/nodes/composite/nodes/node_composite_viewer.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** VIEWER ******************** */
-static bNodeSocketType cmp_node_viewer_in[]= {
- { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_viewer_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Z", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
@@ -124,7 +124,7 @@ static void node_composit_exec_viewer(void *data, bNode *node, bNodeStack **in,
}
}
-static void node_composit_init_viewer(bNode* node)
+static void node_composit_init_viewer(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
node->storage= iuser;
@@ -137,8 +137,8 @@ void register_node_type_cmp_viewer(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW,
- cmp_node_viewer_in, NULL);
+ node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+ node_type_socket_templates(&ntype, cmp_node_viewer_in, NULL);
node_type_size(&ntype, 80, 60, 200);
node_type_init(&ntype, node_composit_init_viewer);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
@@ -146,5 +146,3 @@ void register_node_type_cmp_viewer(ListBase *lb)
nodeRegisterType(lb, &ntype);
}
-
-
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c b/source/blender/nodes/composite/nodes/node_composite_zcombine.c
index 0fae0fcd4d5..220b770198a 100644
--- a/source/blender/nodes/intern/CMP_nodes/CMP_zcombine.c
+++ b/source/blender/nodes/composite/nodes/node_composite_zcombine.c
@@ -27,26 +27,26 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/CMP_nodes/CMP_zcombine.c
+/** \file blender/nodes/composite/nodes/node_composite_zcombine.c
* \ingroup cmpnodes
*/
-#include "../CMP_util.h"
+#include "node_composite_util.h"
/* **************** Z COMBINE ******************** */
/* lazy coder note: node->custom2 is abused to send signal */
-static bNodeSocketType cmp_node_zcombine_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f},
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f},
+static bNodeSocketTemplate cmp_node_zcombine_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f, PROP_NONE},
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
+ { SOCK_FLOAT, 1, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType cmp_node_zcombine_out[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Z", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 10000.0f},
+static bNodeSocketTemplate cmp_node_zcombine_out[]= {
+ { SOCK_RGBA, 0, "Image"},
+ { SOCK_FLOAT, 0, "Z"},
{ -1, 0, "" }
};
@@ -228,8 +228,8 @@ void register_node_type_cmp_zcombine(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- cmp_node_zcombine_in, cmp_node_zcombine_out);
+ node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, cmp_node_zcombine_in, cmp_node_zcombine_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_composit_exec_zcombine);
diff --git a/source/blender/nodes/intern/SHD_util.c b/source/blender/nodes/intern/SHD_util.c
deleted file mode 100644
index 2c0dc98fd3b..00000000000
--- a/source/blender/nodes/intern/SHD_util.c
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * $Id$
- *
- * ***** 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 *****
- */
-
-/** \file blender/nodes/intern/SHD_util.c
- * \ingroup nodes
- */
-
-
-#include "SHD_util.h"
-
-
-
-
-
-/* ****** */
-
-void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
-{
- float *from= ns->vec;
-
- if(type_in==SOCK_VALUE) {
- if(ns->sockettype==SOCK_VALUE)
- *in= *from;
- else
- *in= 0.333333f*(from[0]+from[1]+from[2]);
- }
- else if(type_in==SOCK_VECTOR) {
- if(ns->sockettype==SOCK_VALUE) {
- in[0]= from[0];
- in[1]= from[0];
- in[2]= from[0];
- }
- else {
- VECCOPY(in, from);
- }
- }
- else { /* type_in==SOCK_RGBA */
- if(ns->sockettype==SOCK_RGBA) {
- QUATCOPY(in, from);
- }
- else if(ns->sockettype==SOCK_VALUE) {
- in[0]= from[0];
- in[1]= from[0];
- in[2]= from[0];
- in[3]= 1.0f;
- }
- else {
- VECCOPY(in, from);
- in[3]= 1.0f;
- }
- }
-}
-
-
-/* ******************* execute and parse ************ */
-
-void ntreeShaderExecTree(bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr)
-{
- ShaderCallData scd;
- /*
- @note: preserve material from ShadeInput for material id, nodetree execs change it
- fix for bug "[#28012] Mat ID messy with shader nodes"
- */
- Material *mat = shi->mat;
- /* convert caller data to struct */
- scd.shi= shi;
- scd.shr= shr;
-
- /* each material node has own local shaderesult, with optional copying */
- memset(shr, 0, sizeof(ShadeResult));
-
- ntreeExecTree(ntree, &scd, shi->thread); /* threads */
- // @note: set material back to preserved material
- shi->mat = mat;
- /* better not allow negative for now */
- if(shr->combined[0]<0.0f) shr->combined[0]= 0.0f;
- if(shr->combined[1]<0.0f) shr->combined[1]= 0.0f;
- if(shr->combined[2]<0.0f) shr->combined[2]= 0.0f;
-
-}
-
-/* go over all used Geometry and Texture nodes, and return a texco flag */
-/* no group inside needed, this function is called for groups too */
-void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mode)
-{
- bNode *node;
- bNodeSocket *sock;
- int a;
-
- ntreeSocketUseFlags(ntree);
-
- for(node= ntree->nodes.first; node; node= node->next) {
- if(node->type==SH_NODE_TEXTURE) {
- if((r_mode & R_OSA) && node->id) {
- Tex *tex= (Tex *)node->id;
- if ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)
- *texco |= TEXCO_OSA|NEED_UV;
- }
- /* usability exception... without input we still give the node orcos */
- sock= node->inputs.first;
- if(sock==NULL || sock->link==NULL)
- *texco |= TEXCO_ORCO|NEED_UV;
- }
- else if(node->type==SH_NODE_GEOMETRY) {
- /* 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) {
- case GEOM_OUT_GLOB:
- *texco |= TEXCO_GLOB|NEED_UV; break;
- case GEOM_OUT_VIEW:
- *texco |= TEXCO_VIEW|NEED_UV; break;
- case GEOM_OUT_ORCO:
- *texco |= TEXCO_ORCO|NEED_UV; break;
- case GEOM_OUT_UV:
- *texco |= TEXCO_UV|NEED_UV; break;
- case GEOM_OUT_NORMAL:
- *texco |= TEXCO_NORM|NEED_UV; break;
- case GEOM_OUT_VCOL:
- *texco |= NEED_UV; *mode |= MA_VERTEXCOL; break;
- case GEOM_OUT_VCOL_ALPHA:
- *texco |= NEED_UV; *mode |= MA_VERTEXCOL; break;
- }
- }
- }
- }
- }
-}
-
-/* nodes that use ID data get synced with local data */
-void nodeShaderSynchronizeID(bNode *node, int copyto)
-{
- if(node->id==NULL) return;
-
- if(ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT)) {
- bNodeSocket *sock;
- Material *ma= (Material *)node->id;
- int a;
-
- /* hrmf, case in loop isnt super fast, but we dont edit 100s of material at same time either! */
- for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
- if(!(sock->flag & SOCK_HIDDEN)) {
- if(copyto) {
- switch(a) {
- case MAT_IN_COLOR:
- VECCOPY(&ma->r, sock->ns.vec); break;
- case MAT_IN_SPEC:
- VECCOPY(&ma->specr, sock->ns.vec); break;
- case MAT_IN_REFL:
- ma->ref= sock->ns.vec[0]; break;
- case MAT_IN_MIR:
- VECCOPY(&ma->mirr, sock->ns.vec); break;
- case MAT_IN_AMB:
- ma->amb= sock->ns.vec[0]; break;
- case MAT_IN_EMIT:
- ma->emit= sock->ns.vec[0]; break;
- case MAT_IN_SPECTRA:
- ma->spectra= sock->ns.vec[0]; break;
- case MAT_IN_RAY_MIRROR:
- ma->ray_mirror= sock->ns.vec[0]; break;
- case MAT_IN_ALPHA:
- ma->alpha= sock->ns.vec[0]; break;
- case MAT_IN_TRANSLUCENCY:
- ma->translucency= sock->ns.vec[0]; break;
- }
- }
- else {
- switch(a) {
- case MAT_IN_COLOR:
- VECCOPY(sock->ns.vec, &ma->r); break;
- case MAT_IN_SPEC:
- VECCOPY(sock->ns.vec, &ma->specr); break;
- case MAT_IN_REFL:
- sock->ns.vec[0]= ma->ref; break;
- case MAT_IN_MIR:
- VECCOPY(sock->ns.vec, &ma->mirr); break;
- case MAT_IN_AMB:
- sock->ns.vec[0]= ma->amb; break;
- case MAT_IN_EMIT:
- sock->ns.vec[0]= ma->emit; break;
- case MAT_IN_SPECTRA:
- sock->ns.vec[0]= ma->spectra; break;
- case MAT_IN_RAY_MIRROR:
- sock->ns.vec[0]= ma->ray_mirror; break;
- case MAT_IN_ALPHA:
- sock->ns.vec[0]= ma->alpha; break;
- case MAT_IN_TRANSLUCENCY:
- sock->ns.vec[0]= ma->translucency; break;
- }
- }
- }
- }
- }
-
-}
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
new file mode 100644
index 00000000000..35f2dbf7b32
--- /dev/null
+++ b/source/blender/nodes/intern/node_common.c
@@ -0,0 +1,983 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Lukas Toenne.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/intern/node_common.c
+ * \ingroup nodes
+ */
+
+
+#include <string.h>
+
+#include "DNA_action_types.h"
+#include "DNA_anim_types.h"
+#include "DNA_node_types.h"
+
+#include "BLI_listbase.h"
+#include "BLI_string.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_action.h"
+#include "BKE_animsys.h"
+#include "BKE_global.h"
+#include "BKE_library.h"
+#include "BKE_main.h"
+#include "BLI_math.h"
+#include "BKE_node.h"
+#include "BKE_utildefines.h"
+
+#include "RNA_access.h"
+#include "RNA_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "node_common.h"
+#include "node_exec.h"
+#include "NOD_socket.h"
+
+/**** Group ****/
+
+bNodeSocket *node_group_find_input(bNode *gnode, bNodeSocket *gsock)
+{
+ bNodeSocket *sock;
+ for (sock=gnode->inputs.first; sock; sock=sock->next)
+ if (sock->groupsock == gsock)
+ return sock;
+ return NULL;
+}
+
+bNodeSocket *node_group_find_output(bNode *gnode, bNodeSocket *gsock)
+{
+ bNodeSocket *sock;
+ for (sock=gnode->outputs.first; sock; sock=sock->next)
+ if (sock->groupsock == gsock)
+ return sock;
+ return NULL;
+}
+
+bNodeSocket *node_group_add_extern_socket(bNodeTree *UNUSED(ntree), ListBase *lb, int in_out, bNodeSocket *gsock)
+{
+ bNodeSocket *sock;
+
+ if (gsock->flag & SOCK_INTERNAL)
+ return NULL;
+
+ sock= MEM_callocN(sizeof(bNodeSocket), "sock");
+
+ /* make a copy of the group socket */
+ *sock = *gsock;
+ sock->link = NULL;
+ sock->next = sock->prev = NULL;
+ sock->new_sock = NULL;
+
+ /* group sockets are dynamically added */
+ sock->flag |= SOCK_DYNAMIC;
+
+ sock->own_index = gsock->own_index;
+ sock->groupsock = gsock;
+ sock->limit = (in_out==SOCK_IN ? 1 : 0xFFF);
+
+ if (gsock->default_value)
+ sock->default_value = MEM_dupallocN(gsock->default_value);
+
+ if(lb)
+ BLI_addtail(lb, sock);
+
+ return sock;
+}
+
+bNode *node_group_make_from_selected(bNodeTree *ntree)
+{
+ bNodeLink *link, *linkn;
+ bNode *node, *gnode, *nextn;
+ bNodeTree *ngroup;
+ bNodeSocket *gsock;
+ ListBase anim_basepaths = {NULL, NULL};
+ float min[2], max[2];
+ int totnode=0;
+ bNodeTemplate ntemp;
+
+ INIT_MINMAX2(min, max);
+
+ /* is there something to group? also do some clearing */
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->flag & NODE_SELECT) {
+ /* no groups in groups */
+ if(node->type==NODE_GROUP)
+ return NULL;
+ DO_MINMAX2( (&node->locx), min, max);
+ totnode++;
+ }
+ node->done= 0;
+ }
+ if(totnode==0) return NULL;
+
+ /* check if all connections are OK, no unselected node has both
+ inputs and outputs to a selection */
+ for(link= ntree->links.first; link; link= link->next) {
+ if(link->fromnode && link->tonode && link->fromnode->flag & NODE_SELECT)
+ link->tonode->done |= 1;
+ if(link->fromnode && link->tonode && link->tonode->flag & NODE_SELECT)
+ link->fromnode->done |= 2;
+ }
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if((node->flag & NODE_SELECT)==0)
+ if(node->done==3)
+ break;
+ }
+ if(node)
+ return NULL;
+
+ /* OK! new nodetree */
+ ngroup= ntreeAddTree("NodeGroup", ntree->type, NODE_GROUP);
+
+ /* move nodes over */
+ for(node= ntree->nodes.first; node; node= nextn) {
+ nextn= node->next;
+ if(node->flag & NODE_SELECT) {
+ /* keep track of this node's RNA "base" path (the part of the pat identifying the node)
+ * if the old nodetree has animation data which potentially covers this node
+ */
+ if (ntree->adt) {
+ PointerRNA ptr;
+ char *path;
+
+ RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
+ path = RNA_path_from_ID_to_struct(&ptr);
+
+ if (path)
+ BLI_addtail(&anim_basepaths, BLI_genericNodeN(path));
+ }
+
+ /* change node-collection membership */
+ BLI_remlink(&ntree->nodes, node);
+ BLI_addtail(&ngroup->nodes, node);
+
+ node->locx-= 0.5f*(min[0]+max[0]);
+ node->locy-= 0.5f*(min[1]+max[1]);
+ }
+ }
+
+ /* move animation data over */
+ if (ntree->adt) {
+ LinkData *ld, *ldn=NULL;
+
+ BKE_animdata_separate_by_basepath(&ntree->id, &ngroup->id, &anim_basepaths);
+
+ /* paths + their wrappers need to be freed */
+ for (ld = anim_basepaths.first; ld; ld = ldn) {
+ ldn = ld->next;
+
+ MEM_freeN(ld->data);
+ BLI_freelinkN(&anim_basepaths, ld);
+ }
+ }
+
+ /* make group node */
+ ntemp.type = NODE_GROUP;
+ ntemp.ngroup = ngroup;
+ gnode= nodeAddNode(ntree, &ntemp);
+ gnode->locx= 0.5f*(min[0]+max[0]);
+ gnode->locy= 0.5f*(min[1]+max[1]);
+
+ /* relink external sockets */
+ for(link= ntree->links.first; link; link= linkn) {
+ linkn= link->next;
+
+ if(link->fromnode && link->tonode && (link->fromnode->flag & link->tonode->flag & NODE_SELECT)) {
+ BLI_remlink(&ntree->links, link);
+ BLI_addtail(&ngroup->links, link);
+ }
+ else if(link->tonode && (link->tonode->flag & NODE_SELECT)) {
+ gsock = node_group_expose_socket(ngroup, link->tosock, SOCK_IN);
+ link->tosock->link = nodeAddLink(ngroup, NULL, gsock, link->tonode, link->tosock);
+ link->tosock = node_group_add_extern_socket(ntree, &gnode->inputs, SOCK_IN, gsock);
+ link->tonode = gnode;
+ }
+ else if(link->fromnode && (link->fromnode->flag & NODE_SELECT)) {
+ /* search for existing group node socket */
+ for (gsock=ngroup->outputs.first; gsock; gsock=gsock->next)
+ if (gsock->link && gsock->link->fromsock==link->fromsock)
+ break;
+ if (!gsock) {
+ gsock = node_group_expose_socket(ngroup, link->fromsock, SOCK_OUT);
+ gsock->link = nodeAddLink(ngroup, link->fromnode, link->fromsock, NULL, gsock);
+ link->fromsock = node_group_add_extern_socket(ntree, &gnode->outputs, SOCK_OUT, gsock);
+ }
+ else
+ link->fromsock = node_group_find_output(gnode, gsock);
+ link->fromnode = gnode;
+ }
+ }
+
+ ngroup->update |= NTREE_UPDATE;
+ ntreeUpdateTree(ngroup);
+ ntree->update |= NTREE_UPDATE_NODES|NTREE_UPDATE_LINKS;
+ ntreeUpdateTree(ntree);
+
+ return gnode;
+}
+
+/* XXX This is a makeshift function to have useful initial group socket values.
+ * In the end this should be implemented by a flexible socket data conversion system,
+ * which is yet to be implemented. The idea is that beside default standard conversions,
+ * such as int-to-float, it should be possible to quickly select a conversion method or
+ * a chain of conversions for each input, whenever there is more than one option.
+ * E.g. a vector-to-float conversion could use either of the x/y/z components or
+ * the vector length.
+ *
+ * In the interface this could be implemented by a pseudo-script textbox on linked inputs,
+ * with quick selection from a predefined list of conversion options. Some Examples:
+ * - vector component 'z' (vector->float): "z"
+ * - greyscale color (float->color): "grey"
+ * - color luminance (color->float): "lum"
+ * - matrix column 2 length (matrix->vector->float): "col[1].len"
+ * - mesh vertex coordinate 'y' (mesh->vertex->vector->float): "vertex.co.y"
+ *
+ * The actual conversion is then done by a series of conversion functions,
+ * which are defined in the socket type structs.
+ */
+static void convert_socket_value(bNodeSocket *from, bNodeSocket *to)
+{
+ /* XXX only one of these pointers is valid! just putting them here for convenience */
+ bNodeSocketValueFloat *fromfloat= (bNodeSocketValueFloat*)from->default_value;
+ bNodeSocketValueInt *fromint= (bNodeSocketValueInt*)from->default_value;
+ bNodeSocketValueBoolean *frombool= (bNodeSocketValueBoolean*)from->default_value;
+ bNodeSocketValueVector *fromvector= (bNodeSocketValueVector*)from->default_value;
+ bNodeSocketValueRGBA *fromrgba= (bNodeSocketValueRGBA*)from->default_value;
+
+ bNodeSocketValueFloat *tofloat= (bNodeSocketValueFloat*)to->default_value;
+ bNodeSocketValueInt *toint= (bNodeSocketValueInt*)to->default_value;
+ bNodeSocketValueBoolean *tobool= (bNodeSocketValueBoolean*)to->default_value;
+ bNodeSocketValueVector *tovector= (bNodeSocketValueVector*)to->default_value;
+ bNodeSocketValueRGBA *torgba= (bNodeSocketValueRGBA*)to->default_value;
+
+ switch (from->type) {
+ case SOCK_FLOAT:
+ switch (to->type) {
+ case SOCK_FLOAT:
+ tofloat->value = fromfloat->value;
+ break;
+ case SOCK_INT:
+ toint->value = (int)fromfloat->value;
+ break;
+ case SOCK_BOOLEAN:
+ tobool->value = (fromfloat->value > 0.0f);
+ break;
+ case SOCK_VECTOR:
+ tovector->value[0] = tovector->value[1] = tovector->value[2] = fromfloat->value;
+ break;
+ case SOCK_RGBA:
+ torgba->value[0] = torgba->value[1] = torgba->value[2] = torgba->value[3] = fromfloat->value;
+ break;
+ }
+ break;
+ case SOCK_INT:
+ switch (to->type) {
+ case SOCK_FLOAT:
+ tofloat->value = (float)fromint->value;
+ break;
+ case SOCK_INT:
+ toint->value = fromint->value;
+ break;
+ case SOCK_BOOLEAN:
+ tobool->value = (fromint->value > 0);
+ break;
+ case SOCK_VECTOR:
+ tovector->value[0] = tovector->value[1] = tovector->value[2] = (float)fromint->value;
+ break;
+ case SOCK_RGBA:
+ torgba->value[0] = torgba->value[1] = torgba->value[2] = torgba->value[3] = (float)fromint->value;
+ break;
+ }
+ break;
+ case SOCK_BOOLEAN:
+ switch (to->type) {
+ case SOCK_FLOAT:
+ tofloat->value = (float)frombool->value;
+ break;
+ case SOCK_INT:
+ toint->value = (int)frombool->value;
+ break;
+ case SOCK_BOOLEAN:
+ tobool->value = frombool->value;
+ break;
+ case SOCK_VECTOR:
+ tovector->value[0] = tovector->value[1] = tovector->value[2] = (float)frombool->value;
+ break;
+ case SOCK_RGBA:
+ torgba->value[0] = torgba->value[1] = torgba->value[2] = torgba->value[3] = (float)frombool->value;
+ break;
+ }
+ break;
+ case SOCK_VECTOR:
+ switch (to->type) {
+ case SOCK_FLOAT:
+ tofloat->value = fromvector->value[0];
+ break;
+ case SOCK_INT:
+ toint->value = (int)fromvector->value[0];
+ break;
+ case SOCK_BOOLEAN:
+ tobool->value = (fromvector->value[0] > 0.0f);
+ break;
+ case SOCK_VECTOR:
+ copy_v3_v3(tovector->value, fromvector->value);
+ break;
+ case SOCK_RGBA:
+ copy_v3_v3(torgba->value, fromvector->value);
+ torgba->value[3] = 1.0f;
+ break;
+ }
+ break;
+ case SOCK_RGBA:
+ switch (to->type) {
+ case SOCK_FLOAT:
+ tofloat->value = fromrgba->value[0];
+ break;
+ case SOCK_INT:
+ toint->value = (int)fromrgba->value[0];
+ break;
+ case SOCK_BOOLEAN:
+ tobool->value = (fromrgba->value[0] > 0.0f);
+ break;
+ case SOCK_VECTOR:
+ copy_v3_v3(tovector->value, fromrgba->value);
+ break;
+ case SOCK_RGBA:
+ copy_v4_v4(torgba->value, fromrgba->value);
+ break;
+ }
+ break;
+ }
+}
+
+static void copy_socket_value(bNodeSocket *from, bNodeSocket *to)
+{
+ /* XXX only one of these pointers is valid! just putting them here for convenience */
+ bNodeSocketValueFloat *fromfloat= (bNodeSocketValueFloat*)from->default_value;
+ bNodeSocketValueInt *fromint= (bNodeSocketValueInt*)from->default_value;
+ bNodeSocketValueBoolean *frombool= (bNodeSocketValueBoolean*)from->default_value;
+ bNodeSocketValueVector *fromvector= (bNodeSocketValueVector*)from->default_value;
+ bNodeSocketValueRGBA *fromrgba= (bNodeSocketValueRGBA*)from->default_value;
+
+ bNodeSocketValueFloat *tofloat= (bNodeSocketValueFloat*)to->default_value;
+ bNodeSocketValueInt *toint= (bNodeSocketValueInt*)to->default_value;
+ bNodeSocketValueBoolean *tobool= (bNodeSocketValueBoolean*)to->default_value;
+ bNodeSocketValueVector *tovector= (bNodeSocketValueVector*)to->default_value;
+ bNodeSocketValueRGBA *torgba= (bNodeSocketValueRGBA*)to->default_value;
+
+ if (from->type != to->type)
+ return;
+
+ switch (from->type) {
+ case SOCK_FLOAT:
+ *tofloat = *fromfloat;
+ break;
+ case SOCK_INT:
+ *toint = *fromint;
+ break;
+ case SOCK_BOOLEAN:
+ *tobool = *frombool;
+ break;
+ case SOCK_VECTOR:
+ *tovector = *fromvector;
+ break;
+ case SOCK_RGBA:
+ *torgba = *fromrgba;
+ break;
+ }
+}
+
+/* returns 1 if its OK */
+int node_group_ungroup(bNodeTree *ntree, bNode *gnode)
+{
+ bNodeLink *link, *linkn;
+ bNode *node, *nextn;
+ bNodeTree *ngroup, *wgroup;
+ ListBase anim_basepaths = {NULL, NULL};
+
+ ngroup= (bNodeTree *)gnode->id;
+ if(ngroup==NULL) return 0;
+
+ /* clear new pointers, set in copytree */
+ for(node= ntree->nodes.first; node; node= node->next)
+ node->new_node= NULL;
+
+ /* wgroup is a temporary copy of the NodeTree we're merging in
+ * - all of wgroup's nodes are transferred across to their new home
+ * - ngroup (i.e. the source NodeTree) is left unscathed
+ */
+ wgroup= ntreeCopyTree(ngroup);
+
+ /* add the nodes into the ntree */
+ for(node= wgroup->nodes.first; node; node= nextn) {
+ nextn= node->next;
+
+ /* keep track of this node's RNA "base" path (the part of the pat identifying the node)
+ * if the old nodetree has animation data which potentially covers this node
+ */
+ if (wgroup->adt) {
+ PointerRNA ptr;
+ char *path;
+
+ RNA_pointer_create(&wgroup->id, &RNA_Node, node, &ptr);
+ path = RNA_path_from_ID_to_struct(&ptr);
+
+ if (path)
+ BLI_addtail(&anim_basepaths, BLI_genericNodeN(path));
+ }
+
+ /* migrate node */
+ BLI_remlink(&wgroup->nodes, node);
+ BLI_addtail(&ntree->nodes, node);
+
+ node->locx+= gnode->locx;
+ node->locy+= gnode->locy;
+
+ node->flag |= NODE_SELECT;
+ }
+
+ /* restore external links to and from the gnode */
+ for(link= ntree->links.first; link; link= link->next) {
+ if (link->fromnode==gnode) {
+ if (link->fromsock->groupsock) {
+ bNodeSocket *gsock= link->fromsock->groupsock;
+ if (gsock->link) {
+ if (gsock->link->fromnode) {
+ /* NB: using the new internal copies here! the groupsock pointer still maps to the old tree */
+ link->fromnode = (gsock->link->fromnode ? gsock->link->fromnode->new_node : NULL);
+ link->fromsock = gsock->link->fromsock->new_sock;
+ }
+ else {
+ /* group output directly maps to group input */
+ bNodeSocket *insock= node_group_find_input(gnode, gsock->link->fromsock);
+ if (insock->link) {
+ link->fromnode = insock->link->fromnode;
+ link->fromsock = insock->link->fromsock;
+ }
+ }
+ }
+ else {
+ /* copy the default input value from the group socket default to the external socket */
+ convert_socket_value(gsock, link->tosock);
+ }
+ }
+ }
+ }
+ /* remove internal output links, these are not used anymore */
+ for(link=wgroup->links.first; link; link= linkn) {
+ linkn = link->next;
+ if (!link->tonode)
+ nodeRemLink(wgroup, link);
+ }
+ /* restore links from internal nodes */
+ for(link= wgroup->links.first; link; link= link->next) {
+ /* indicates link to group input */
+ if (!link->fromnode) {
+ /* NB: can't use find_group_node_input here,
+ * because gnode sockets still point to the old tree!
+ */
+ bNodeSocket *insock;
+ for (insock= gnode->inputs.first; insock; insock= insock->next)
+ if (insock->groupsock->new_sock == link->fromsock)
+ break;
+ if (insock->link) {
+ link->fromnode = insock->link->fromnode;
+ link->fromsock = insock->link->fromsock;
+ }
+ else {
+ /* copy the default input value from the group node socket default to the internal socket */
+ convert_socket_value(insock, link->tosock);
+ nodeRemLink(wgroup, link);
+ }
+ }
+ }
+
+ /* add internal links to the ntree */
+ for(link= wgroup->links.first; link; link= linkn) {
+ linkn= link->next;
+ BLI_remlink(&wgroup->links, link);
+ BLI_addtail(&ntree->links, link);
+ }
+
+ /* and copy across the animation */
+ if (wgroup->adt) {
+ LinkData *ld, *ldn=NULL;
+ 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);
+
+ /* now perform the moving */
+ BKE_animdata_separate_by_basepath(&wgroup->id, &ntree->id, &anim_basepaths);
+
+ /* paths + their wrappers need to be freed */
+ for (ld = anim_basepaths.first; ld; ld = ldn) {
+ ldn = ld->next;
+
+ MEM_freeN(ld->data);
+ BLI_freelinkN(&anim_basepaths, ld);
+ }
+
+ /* free temp action too */
+ free_libblock(&G.main->action, waction);
+ }
+
+ /* delete the group instance. this also removes old input links! */
+ nodeFreeNode(ntree, gnode);
+
+ /* free the group tree (takes care of user count) */
+ free_libblock(&G.main->nodetree, wgroup);
+
+ ntree->update |= NTREE_UPDATE_NODES|NTREE_UPDATE_LINKS;
+ ntreeUpdateTree(ntree);
+
+ return 1;
+}
+
+bNodeSocket *node_group_add_socket(bNodeTree *ngroup, const char *name, int type, int in_out)
+{
+ bNodeSocketType *stype = ntreeGetSocketType(type);
+ bNodeSocket *gsock = MEM_callocN(sizeof(bNodeSocket), "bNodeSocket");
+
+ strncpy(gsock->name, name, sizeof(gsock->name));
+ gsock->type = type;
+ /* group sockets are dynamically added */
+ gsock->flag |= SOCK_DYNAMIC;
+
+ gsock->next = gsock->prev = NULL;
+ gsock->new_sock = NULL;
+ gsock->link = NULL;
+ /* assign new unique index */
+ gsock->own_index = ngroup->cur_index++;
+ gsock->limit = (in_out==SOCK_IN ? 0xFFF : 1);
+
+ if (stype->value_structsize > 0)
+ gsock->default_value = MEM_callocN(stype->value_structsize, "default socket value");
+
+ BLI_addtail(in_out==SOCK_IN ? &ngroup->inputs : &ngroup->outputs, gsock);
+
+ ngroup->update |= (in_out==SOCK_IN ? NTREE_UPDATE_GROUP_IN : NTREE_UPDATE_GROUP_OUT);
+
+ return gsock;
+}
+
+bNodeSocket *node_group_expose_socket(bNodeTree *ngroup, bNodeSocket *sock, int in_out)
+{
+ bNodeSocket *gsock= node_group_add_socket(ngroup, sock->name, sock->type, in_out);
+
+ /* initialize the default value. */
+ copy_socket_value(sock, gsock);
+
+ return gsock;
+}
+
+void node_group_expose_all_sockets(bNodeTree *ngroup)
+{
+ bNode *node;
+ bNodeSocket *sock, *gsock;
+
+ for (node=ngroup->nodes.first; node; node=node->next) {
+ for (sock=node->inputs.first; sock; sock=sock->next) {
+ if (!sock->link && !(sock->flag & SOCK_HIDDEN)) {
+ gsock = node_group_add_socket(ngroup, sock->name, sock->type, SOCK_IN);
+
+ /* initialize the default value. */
+ copy_socket_value(sock, gsock);
+
+ sock->link = nodeAddLink(ngroup, NULL, gsock, node, sock);
+ }
+ }
+ for (sock=node->outputs.first; sock; sock=sock->next) {
+ if (nodeCountSocketLinks(ngroup, sock)==0 && !(sock->flag & SOCK_HIDDEN)) {
+ gsock = node_group_add_socket(ngroup, sock->name, sock->type, SOCK_OUT);
+
+ /* initialize the default value. */
+ copy_socket_value(sock, gsock);
+
+ gsock->link = nodeAddLink(ngroup, node, sock, NULL, gsock);
+ }
+ }
+ }
+}
+
+void node_group_remove_socket(bNodeTree *ngroup, bNodeSocket *gsock, int in_out)
+{
+ nodeRemSocketLinks(ngroup, gsock);
+
+ switch (in_out) {
+ case SOCK_IN:
+ BLI_remlink(&ngroup->inputs, gsock);
+ ngroup->update |= NTREE_UPDATE_GROUP_IN;
+ break;
+ case SOCK_OUT:
+ BLI_remlink(&ngroup->outputs, gsock);
+ ngroup->update |= NTREE_UPDATE_GROUP_OUT;
+ break;
+ }
+
+ if (gsock->default_value)
+ MEM_freeN(gsock->default_value);
+
+ MEM_freeN(gsock);
+}
+
+/* groups display their internal tree name as label */
+const char *node_group_label(bNode *node)
+{
+ return (node->id)? node->id->name+2: "Missing Datablock";
+}
+
+int node_group_valid(bNodeTree *ntree, bNodeTemplate *ntemp)
+{
+ bNodeTemplate childtemp;
+ bNode *node;
+
+ /* regular groups cannot be recursive */
+ if (ntree == ntemp->ngroup)
+ return 0;
+
+ /* make sure all children are valid */
+ for (node=ntemp->ngroup->nodes.first; node; node=node->next) {
+ childtemp = nodeMakeTemplate(node);
+ if (!nodeValid(ntree, &childtemp))
+ return 0;
+ }
+
+ return 1;
+}
+
+bNodeTemplate node_group_template(bNode *node)
+{
+ bNodeTemplate ntemp;
+ ntemp.type = NODE_GROUP;
+ ntemp.ngroup = (bNodeTree*)node->id;
+ return ntemp;
+}
+
+void node_group_init(bNodeTree *ntree, bNode *node, bNodeTemplate *ntemp)
+{
+ node->id = (ID*)ntemp->ngroup;
+
+ /* NB: group socket input/output roles are inverted internally!
+ * Group "inputs" work as outputs in links and vice versa.
+ */
+ if (ntemp->ngroup) {
+ bNodeSocket *gsock;
+ for (gsock=ntemp->ngroup->inputs.first; gsock; gsock=gsock->next)
+ node_group_add_extern_socket(ntree, &node->inputs, SOCK_IN, gsock);
+ for (gsock=ntemp->ngroup->outputs.first; gsock; gsock=gsock->next)
+ node_group_add_extern_socket(ntree, &node->outputs, SOCK_OUT, gsock);
+ }
+}
+
+static bNodeSocket *group_verify_socket(bNodeTree *ntree, ListBase *lb, int in_out, bNodeSocket *gsock)
+{
+ bNodeSocket *sock;
+
+ /* group sockets tagged as internal are not exposed ever */
+ if (gsock->flag & SOCK_INTERNAL)
+ return NULL;
+
+ for(sock= lb->first; sock; sock= sock->next) {
+ if(sock->own_index==gsock->own_index)
+ break;
+ }
+ if(sock) {
+ sock->groupsock = gsock;
+
+ strcpy(sock->name, gsock->name);
+ sock->type= 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.
+ */
+ sock->limit = (in_out==SOCK_IN ? 1 : 0xFFF);
+
+ BLI_remlink(lb, sock);
+
+ return sock;
+ }
+ else {
+ return node_group_add_extern_socket(ntree, NULL, in_out, gsock);
+ }
+}
+
+static void group_verify_socket_list(bNodeTree *ntree, bNode *node, ListBase *lb, int in_out, ListBase *glb)
+{
+ bNodeSocket *sock, *nextsock, *gsock;
+
+ /* step by step compare */
+ for (gsock= glb->first; gsock; gsock=gsock->next) {
+ /* abusing new_sock pointer for verification here! only used inside this function */
+ gsock->new_sock= group_verify_socket(ntree, lb, in_out, gsock);
+ }
+ /* leftovers are removed */
+ for (sock=lb->first; sock; sock=nextsock) {
+ nextsock=sock->next;
+ if (sock->flag & SOCK_DYNAMIC)
+ nodeRemoveSocket(ntree, node, sock);
+ }
+ /* and we put back the verified sockets */
+ for (gsock= glb->first; gsock; gsock=gsock->next) {
+ if (gsock->new_sock) {
+ BLI_addtail(lb, gsock->new_sock);
+ gsock->new_sock = NULL;
+ }
+ }
+}
+
+/* make sure all group node in ntree, which use ngroup, are sync'd */
+void node_group_verify(struct bNodeTree *ntree, struct bNode *node, struct ID *id)
+{
+ /* check inputs and outputs, and remove or insert them */
+ if (node->id==id) {
+ bNodeTree *ngroup= (bNodeTree*)node->id;
+ group_verify_socket_list(ntree, node, &node->inputs, SOCK_IN, &ngroup->inputs);
+ group_verify_socket_list(ntree, node, &node->outputs, SOCK_OUT, &ngroup->outputs);
+ }
+}
+
+struct bNodeTree *node_group_edit_get(bNode *node)
+{
+ if (node->flag & NODE_GROUP_EDIT)
+ return (bNodeTree*)node->id;
+ else
+ return NULL;
+}
+
+struct bNodeTree *node_group_edit_set(bNode *node, int edit)
+{
+ if (edit) {
+ bNodeTree *ngroup= (bNodeTree*)node->id;
+ if (ngroup) {
+ if(ngroup->id.lib)
+ ntreeMakeLocal(ngroup);
+
+ node->flag |= NODE_GROUP_EDIT;
+ }
+ return ngroup;
+ }
+ else {
+ node->flag &= ~NODE_GROUP_EDIT;
+ return NULL;
+ }
+}
+
+void node_group_edit_clear(bNode *node)
+{
+ bNodeTree *ngroup= (bNodeTree*)node->id;
+ bNode *inode;
+
+ node->flag &= ~NODE_GROUP_EDIT;
+
+ if (ngroup)
+ for (inode=ngroup->nodes.first; inode; inode=inode->next)
+ nodeGroupEditClear(inode);
+}
+
+void node_group_link(bNodeTree *ntree, bNodeSocket *sock, int in_out)
+{
+ node_group_expose_socket(ntree, sock, in_out);
+}
+
+/**** For Loop ****/
+
+/* Essentially a group node with slightly different behavior.
+ * The internal tree is executed several times, with each output being re-used
+ * as an input in the next iteration. For this purpose, input and output socket
+ * lists are kept identical!
+ */
+
+bNodeTemplate node_forloop_template(bNode *node)
+{
+ bNodeTemplate ntemp;
+ ntemp.type = NODE_FORLOOP;
+ ntemp.ngroup = (bNodeTree*)node->id;
+ return ntemp;
+}
+
+void node_forloop_init(bNodeTree *ntree, bNode *node, bNodeTemplate *ntemp)
+{
+ /* bNodeSocket *sock; */ /* UNUSED */
+
+ node->id = (ID*)ntemp->ngroup;
+
+ /* sock = */ nodeAddInputFloat(ntree, node, "Iterations", PROP_UNSIGNED, 1, 0, 10000);
+
+ /* NB: group socket input/output roles are inverted internally!
+ * Group "inputs" work as outputs in links and vice versa.
+ */
+ if (ntemp->ngroup) {
+ bNodeSocket *gsock;
+ for (gsock=ntemp->ngroup->inputs.first; gsock; gsock=gsock->next)
+ node_group_add_extern_socket(ntree, &node->inputs, SOCK_IN, gsock);
+ for (gsock=ntemp->ngroup->outputs.first; gsock; gsock=gsock->next)
+ node_group_add_extern_socket(ntree, &node->outputs, SOCK_OUT, gsock);
+ }
+}
+
+void node_forloop_init_tree(bNodeTree *ntree)
+{
+ bNodeSocket *sock;
+ sock = node_group_add_socket(ntree, "Iteration", SOCK_FLOAT, SOCK_IN);
+ sock->flag |= SOCK_INTERNAL;
+}
+
+static void loop_sync(bNodeTree *ntree, int sync_in_out)
+{
+ bNodeSocket *sock, *sync, *nsync, *mirror;
+ ListBase *sync_lb;
+
+ if (sync_in_out==SOCK_IN) {
+ sock = ntree->outputs.first;
+
+ sync = ntree->inputs.first;
+ sync_lb = &ntree->inputs;
+ }
+ else {
+ sock = ntree->inputs.first;
+
+ sync = ntree->outputs.first;
+ sync_lb = &ntree->outputs;
+ }
+
+ /* NB: the sock->storage pointer is used here directly to store the own_index int
+ * out the mirrored socket counterpart!
+ */
+
+ while (sock) {
+ /* skip static and internal sockets on the sync side (preserves socket order!) */
+ while (sync && ((sync->flag & SOCK_INTERNAL) || !(sync->flag & SOCK_DYNAMIC)))
+ sync = sync->next;
+
+ if (sync && !(sync->flag & SOCK_INTERNAL) && (sync->flag & SOCK_DYNAMIC)) {
+ if (sock->storage==NULL) {
+ /* if mirror index is 0, the sockets is newly added and a new mirror must be created. */
+ mirror = node_group_expose_socket(ntree, sock, sync_in_out);
+ /* store the mirror index */
+ sock->storage = SET_INT_IN_POINTER(mirror->own_index);
+ mirror->storage = SET_INT_IN_POINTER(sock->own_index);
+ /* move mirror to the right place */
+ BLI_remlink(sync_lb, mirror);
+ if (sync)
+ BLI_insertlinkbefore(sync_lb, sync, mirror);
+ else
+ BLI_addtail(sync_lb, mirror);
+ }
+ else {
+ /* look up the mirror socket */
+ for (mirror=sync; mirror; mirror=mirror->next)
+ if (mirror->own_index == GET_INT_FROM_POINTER(sock->storage))
+ break;
+ /* make sure the name is the same (only for identification by user, no deeper meaning) */
+ strcpy(mirror->name, sock->name);
+ /* fix the socket order if necessary */
+ if (mirror != sync) {
+ BLI_remlink(sync_lb, mirror);
+ BLI_insertlinkbefore(sync_lb, sync, mirror);
+ }
+ else
+ sync = sync->next;
+ }
+ }
+
+ sock = sock->next;
+ }
+
+ /* remaining sockets in sync_lb are leftovers from deleted sockets, remove them */
+ while (sync) {
+ nsync = sync->next;
+ if (!(sync->flag & SOCK_INTERNAL) && (sync->flag & SOCK_DYNAMIC))
+ node_group_remove_socket(ntree, sync, sync_in_out);
+ sync = nsync;
+ }
+}
+
+void node_loop_update_tree(bNodeTree *ngroup)
+{
+ /* make sure inputs & outputs are identical */
+ if (ngroup->update & NTREE_UPDATE_GROUP_IN)
+ loop_sync(ngroup, SOCK_OUT);
+ if (ngroup->update & NTREE_UPDATE_GROUP_OUT)
+ loop_sync(ngroup, SOCK_IN);
+}
+
+void node_whileloop_init(bNodeTree *ntree, bNode *node, bNodeTemplate *ntemp)
+{
+ /* bNodeSocket *sock; */ /* UNUSED */
+
+ node->id = (ID*)ntemp->ngroup;
+
+ /* sock = */ nodeAddInputFloat(ntree, node, "Condition", PROP_NONE, 1, 0, 1);
+
+ /* max iterations */
+ node->custom1 = 10000;
+
+ /* NB: group socket input/output roles are inverted internally!
+ * Group "inputs" work as outputs in links and vice versa.
+ */
+ if (ntemp->ngroup) {
+ bNodeSocket *gsock;
+ for (gsock=ntemp->ngroup->inputs.first; gsock; gsock=gsock->next)
+ node_group_add_extern_socket(ntree, &node->inputs, SOCK_IN, gsock);
+ for (gsock=ntemp->ngroup->outputs.first; gsock; gsock=gsock->next)
+ node_group_add_extern_socket(ntree, &node->outputs, SOCK_OUT, gsock);
+ }
+}
+
+void node_whileloop_init_tree(bNodeTree *ntree)
+{
+ bNodeSocket *sock;
+ sock = node_group_add_socket(ntree, "Condition", SOCK_FLOAT, SOCK_OUT);
+ sock->flag |= SOCK_INTERNAL;
+}
+
+bNodeTemplate node_whileloop_template(bNode *node)
+{
+ bNodeTemplate ntemp;
+ ntemp.type = NODE_WHILELOOP;
+ ntemp.ngroup = (bNodeTree*)node->id;
+ return ntemp;
+}
+
+/**** FRAME ****/
+
+void register_node_type_frame(ListBase *lb)
+{
+ /* frame type is used for all tree types, needs dynamic allocation */
+ bNodeType *ntype= MEM_callocN(sizeof(bNodeType), "frame node type");
+
+ node_type_base(ntype, NODE_FRAME, "Frame", NODE_CLASS_LAYOUT, NODE_BACKGROUND);
+ node_type_size(ntype, 150, 100, 0);
+
+ ntype->needs_free = 1;
+ nodeRegisterType(lb, ntype);
+}
diff --git a/source/blender/nodes/intern/node_common.h b/source/blender/nodes/intern/node_common.h
new file mode 100644
index 00000000000..2723c595380
--- /dev/null
+++ b/source/blender/nodes/intern/node_common.h
@@ -0,0 +1,66 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Lukas Toenne.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/intern/node_common.h
+ * \ingroup nodes
+ */
+
+
+#ifndef NODE_COMMON_H_
+#define NODE_COMMON_H_
+
+#include "DNA_listBase.h"
+
+struct bNodeTree;
+
+struct bNodeSocket *node_group_add_extern_socket(struct bNodeTree *ntree, ListBase *lb, int in_out, struct bNodeSocket *gsock);
+
+void node_group_init(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp);
+void node_forloop_init(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp);
+void node_whileloop_init(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp);
+
+void node_forloop_init_tree(struct bNodeTree *ntree);
+void node_whileloop_init_tree(struct bNodeTree *ntree);
+
+const char *node_group_label(struct bNode *node);
+
+struct bNodeTemplate node_group_template(struct bNode *node);
+struct bNodeTemplate node_forloop_template(struct bNode *node);
+struct bNodeTemplate node_whileloop_template(struct bNode *node);
+
+int node_group_valid(struct bNodeTree *ntree, struct bNodeTemplate *ntemp);
+void node_group_verify(struct bNodeTree *ntree, struct bNode *node, struct ID *id);
+
+struct bNodeTree *node_group_edit_get(struct bNode *node);
+struct bNodeTree *node_group_edit_set(struct bNode *node, int edit);
+void node_group_edit_clear(bNode *node);
+
+void node_loop_update_tree(struct bNodeTree *ngroup);
+
+#endif
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c
new file mode 100644
index 00000000000..608347bc258
--- /dev/null
+++ b/source/blender/nodes/intern/node_exec.c
@@ -0,0 +1,309 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Nathan Letwory.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/intern/node_exec.c
+ * \ingroup nodes
+ */
+
+
+#include "DNA_node_types.h"
+
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_node.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "node_exec.h"
+
+
+/* for a given socket, find the actual stack entry */
+bNodeStack *node_get_socket_stack(bNodeStack *stack, bNodeSocket *sock)
+{
+ return stack + sock->stack_index;
+}
+
+void node_get_stack(bNode *node, bNodeStack *stack, bNodeStack **in, bNodeStack **out)
+{
+ bNodeSocket *sock;
+
+ /* build pointer stack */
+ if (in) {
+ for(sock= node->inputs.first; sock; sock= sock->next) {
+ *(in++) = node_get_socket_stack(stack, sock);
+ }
+ }
+
+ if (out) {
+ for(sock= node->outputs.first; sock; sock= sock->next) {
+ *(out++) = node_get_socket_stack(stack, sock);
+ }
+ }
+}
+
+void node_init_input_index(bNodeSocket *sock, int *index)
+{
+ if (sock->link && sock->link->fromsock) {
+ sock->stack_index = sock->link->fromsock->stack_index;
+ }
+ else {
+ sock->stack_index = (*index)++;
+ }
+}
+
+void node_init_output_index(bNodeSocket *sock, int *index)
+{
+ sock->stack_index = (*index)++;
+}
+
+/* basic preparation of socket stacks */
+static struct bNodeStack *setup_stack(bNodeStack *stack, bNodeSocket *sock)
+{
+ bNodeStack *ns = node_get_socket_stack(stack, sock);
+ float null_value[4]= {0.0f, 0.0f, 0.0f, 0.0f};
+
+ /* don't mess with remote socket stacks, these are initialized by other nodes! */
+ if (sock->link)
+ return ns;
+
+ ns->sockettype = sock->type;
+
+ if (sock->default_value) {
+ switch (sock->type) {
+ case SOCK_FLOAT:
+ ns->vec[0] = ((bNodeSocketValueFloat*)sock->default_value)->value;
+ break;
+ case SOCK_VECTOR:
+ copy_v3_v3(ns->vec, ((bNodeSocketValueVector*)sock->default_value)->value);
+ break;
+ case SOCK_RGBA:
+ copy_v4_v4(ns->vec, ((bNodeSocketValueRGBA*)sock->default_value)->value);
+ break;
+ }
+ }
+ else {
+ switch (sock->type) {
+ case SOCK_FLOAT:
+ ns->vec[0] = 0.0f;
+ break;
+ case SOCK_VECTOR:
+ copy_v3_v3(ns->vec, null_value);
+ break;
+ case SOCK_RGBA:
+ copy_v4_v4(ns->vec, null_value);
+ break;
+ }
+ }
+
+ return ns;
+}
+
+bNodeTreeExec *ntree_exec_begin(bNodeTree *ntree)
+{
+ bNodeTreeExec *exec;
+ bNode *node;
+ bNodeExec *nodeexec;
+ bNodeSocket *sock, *gsock;
+ bNodeStack *ns;
+ int index= 0;
+ bNode **nodelist;
+ int totnodes, n;
+
+ if((ntree->init & NTREE_TYPE_INIT)==0)
+ ntreeInitTypes(ntree);
+
+ /* get a dependency-sorted list of nodes */
+ ntreeGetDependencyList(ntree, &nodelist, &totnodes);
+
+ /* XXX could let callbacks do this for specialized data */
+ exec = MEM_callocN(sizeof(bNodeTreeExec), "node tree execution data");
+ /* backpointer to node tree */
+ exec->nodetree = ntree;
+
+ /* group inputs essentially work as outputs */
+ for(gsock=ntree->inputs.first; gsock; gsock = gsock->next)
+ node_init_output_index(gsock, &index);
+ /* set stack indexes */
+ for(n=0; n < totnodes; ++n) {
+ node = nodelist[n];
+
+ node->stack_index = index;
+
+ /* init node socket stack indexes */
+ for (sock=node->inputs.first; sock; sock=sock->next)
+ node_init_input_index(sock, &index);
+ for (sock=node->outputs.first; sock; sock=sock->next)
+ node_init_output_index(sock, &index);
+ }
+ /* group outputs essentially work as inputs */
+ for(gsock=ntree->outputs.first; gsock; gsock = gsock->next)
+ node_init_input_index(gsock, &index);
+
+ /* allocated exec data pointers for nodes */
+ exec->totnodes = totnodes;
+ exec->nodeexec = MEM_callocN(exec->totnodes * sizeof(bNodeExec), "node execution data");
+ /* allocate data pointer for node stack */
+ exec->stacksize = index;
+ exec->stack = MEM_callocN(exec->stacksize * sizeof(bNodeStack), "bNodeStack");
+
+ /* prepare group tree inputs */
+ for (sock=ntree->inputs.first; sock; sock=sock->next) {
+ ns = setup_stack(exec->stack, sock);
+ if (ns->hasoutput)
+ ns->hasinput = 1;
+ }
+ /* prepare all internal nodes for execution */
+ for(n=0, nodeexec= exec->nodeexec; n < totnodes; ++n, ++nodeexec) {
+ node = nodeexec->node = nodelist[n];
+
+ /* tag inputs */
+ for (sock=node->inputs.first; sock; sock=sock->next) {
+ /* disable the node if an input link is invalid */
+ if(sock->link && !(sock->link->flag & NODE_LINK_VALID))
+ node->need_exec= 0;
+
+ ns = setup_stack(exec->stack, sock);
+ if (ns->hasoutput)
+ ns->hasinput = 1;
+ }
+
+ /* tag all outputs */
+ for (sock=node->outputs.first; sock; sock=sock->next) {
+ ns = setup_stack(exec->stack, sock);
+ ns->hasoutput = 1;
+ }
+
+ if(node->typeinfo->initexecfunc)
+ nodeexec->data = node->typeinfo->initexecfunc(node);
+ }
+ /* prepare group tree outputs */
+ for (sock=ntree->outputs.first; sock; sock=sock->next) {
+ ns = setup_stack(exec->stack, sock);
+ ns->hasoutput = 1;
+ }
+
+ if (nodelist)
+ MEM_freeN(nodelist);
+
+ return exec;
+}
+
+void ntree_exec_end(bNodeTreeExec *exec)
+{
+ bNodeExec *nodeexec;
+ int n;
+
+ if (exec->stack)
+ MEM_freeN(exec->stack);
+
+ for(n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ if (nodeexec->node->typeinfo->freeexecfunc)
+ nodeexec->node->typeinfo->freeexecfunc(nodeexec->node, nodeexec->data);
+ }
+
+ if (exec->nodeexec)
+ MEM_freeN(exec->nodeexec);
+
+ MEM_freeN(exec);
+}
+
+/**** Compositor/Material/Texture trees ****/
+
+bNodeThreadStack *ntreeGetThreadStack(bNodeTreeExec *exec, int thread)
+{
+ ListBase *lb= &exec->threadstack[thread];
+ bNodeThreadStack *nts;
+
+ for(nts=lb->first; nts; nts=nts->next) {
+ if(!nts->used) {
+ nts->used= 1;
+ break;
+ }
+ }
+
+ if (!nts) {
+ nts= MEM_callocN(sizeof(bNodeThreadStack), "bNodeThreadStack");
+ nts->stack= MEM_dupallocN(exec->stack);
+ nts->used= 1;
+ BLI_addtail(lb, nts);
+ }
+
+ return nts;
+}
+
+void ntreeReleaseThreadStack(bNodeThreadStack *nts)
+{
+ nts->used = 0;
+}
+
+void ntreeExecNodes(bNodeTreeExec *exec, void *callerdata, int thread)
+{
+ bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeExec *nodeexec;
+ bNode *node;
+ int n;
+
+ /* nodes are presorted, so exec is in order of list */
+
+ for(n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ node = nodeexec->node;
+ if(node->need_exec) {
+ node_get_stack(node, exec->stack, nsin, nsout);
+ if(node->typeinfo->execfunc)
+ node->typeinfo->execfunc(callerdata, node, nsin, nsout);
+ else if (node->typeinfo->newexecfunc)
+ node->typeinfo->newexecfunc(callerdata, thread, node, nodeexec->data, nsin, nsout);
+ }
+ }
+}
+
+void ntreeExecThreadNodes(bNodeTreeExec *exec, bNodeThreadStack *nts, void *callerdata, int thread)
+{
+ bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeExec *nodeexec;
+ bNode *node;
+ int n;
+
+ /* nodes are presorted, so exec is in order of list */
+
+ for(n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ node = nodeexec->node;
+ if(node->need_exec) {
+ node_get_stack(node, nts->stack, nsin, nsout);
+ if(node->typeinfo->execfunc)
+ node->typeinfo->execfunc(callerdata, node, nsin, nsout);
+ else if (node->typeinfo->newexecfunc)
+ node->typeinfo->newexecfunc(callerdata, thread, node, nodeexec->data, nsin, nsout);
+ }
+ }
+}
diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h
new file mode 100644
index 00000000000..567c6ae56cf
--- /dev/null
+++ b/source/blender/nodes/intern/node_exec.h
@@ -0,0 +1,90 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Nathan Letwory.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/intern/node_exec.h
+ * \ingroup nodes
+ */
+
+
+#ifndef NODE_EXEC_H_
+#define NODE_EXEC_H_
+
+#include "DNA_listBase.h"
+
+#include "BLI_utildefines.h"
+
+#include "BKE_node.h"
+
+#include "RNA_types.h"
+
+struct bNodeTree;
+struct bNode;
+struct bNodeStack;
+
+/* Node execution data */
+typedef struct bNodeExec {
+ struct bNode *node; /* backpointer to node */
+ void *data; /* custom data storage */
+} bNodeExec;
+
+/* Execution Data for each instance of node tree execution */
+typedef struct bNodeTreeExec {
+ struct bNodeTree *nodetree; /* backpointer to node tree */
+
+ int totnodes; /* total node count */
+ struct bNodeExec *nodeexec; /* per-node execution data */
+
+ int stacksize;
+ struct bNodeStack *stack; /* socket data stack */
+ /* only used by material and texture trees to keep one stack for each thread */
+ ListBase *threadstack; /* one instance of the stack for each thread */
+} bNodeTreeExec;
+
+/* stores one stack copy for each thread (material and texture trees) */
+typedef struct bNodeThreadStack {
+ struct bNodeThreadStack *next, *prev;
+ struct bNodeStack *stack;
+ int used;
+} bNodeThreadStack;
+
+struct bNodeStack *node_get_socket_stack(struct bNodeStack *stack, struct bNodeSocket *sock);
+void node_get_stack(struct bNode *node, struct bNodeStack *stack, struct bNodeStack **in, struct bNodeStack **out);
+void node_init_input_index(struct bNodeSocket *sock, int *index);
+void node_init_output_index(struct bNodeSocket *sock, int *index);
+
+struct bNodeTreeExec *ntree_exec_begin(struct bNodeTree *ntree);
+void ntree_exec_end(struct bNodeTreeExec *exec);
+
+void ntreeExecNodes(struct bNodeTreeExec *exec, void *callerdata, int thread);
+
+struct bNodeThreadStack *ntreeGetThreadStack(struct bNodeTreeExec *exec, int thread);
+void ntreeReleaseThreadStack(struct bNodeThreadStack *nts);
+void ntreeExecThreadNodes(struct bNodeTreeExec *exec, struct bNodeThreadStack *nts, void *callerdata, int thread);
+
+#endif
diff --git a/source/blender/nodes/intern/node_socket.c b/source/blender/nodes/intern/node_socket.c
new file mode 100644
index 00000000000..aabaf5b86de
--- /dev/null
+++ b/source/blender/nodes/intern/node_socket.c
@@ -0,0 +1,433 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Lukas Toennne
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/intern/node_socket.c
+ * \ingroup nodes
+ */
+
+
+#include "DNA_node_types.h"
+
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_DerivedMesh.h"
+#include "BKE_node.h"
+
+#include "RNA_access.h"
+#include "RNA_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "NOD_socket.h"
+
+/****************** FLOAT ******************/
+
+static bNodeSocketType node_socket_type_float = {
+ /* type */ SOCK_FLOAT,
+ /* ui_name */ "Float",
+ /* ui_description */ "Floating Point",
+ /* ui_icon */ 0,
+ /* ui_color */ {160,160,160,255},
+
+ /* value_structname */ "bNodeSocketValueFloat",
+ /* value_structsize */ sizeof(bNodeSocketValueFloat),
+
+ /* buttonfunc */ NULL,
+};
+
+/****************** VECTOR ******************/
+
+static bNodeSocketType node_socket_type_vector = {
+ /* type */ SOCK_VECTOR,
+ /* ui_name */ "Vector",
+ /* ui_description */ "3-dimensional floating point vector",
+ /* ui_icon */ 0,
+ /* ui_color */ {100,100,200,255},
+
+ /* value_structname */ "bNodeSocketValueVector",
+ /* value_structsize */ sizeof(bNodeSocketValueVector),
+
+ /* buttonfunc */ NULL,
+};
+
+/****************** RGBA ******************/
+
+static bNodeSocketType node_socket_type_rgba = {
+ /* type */ SOCK_RGBA,
+ /* ui_name */ "RGBA",
+ /* ui_description */ "RGBA color",
+ /* ui_icon */ 0,
+ /* ui_color */ {200,200,40,255},
+
+ /* value_structname */ "bNodeSocketValueRGBA",
+ /* value_structsize */ sizeof(bNodeSocketValueRGBA),
+
+ /* buttonfunc */ NULL,
+};
+
+/****************** INT ******************/
+
+static bNodeSocketType node_socket_type_int = {
+ /* type */ SOCK_INT,
+ /* ui_name */ "Int",
+ /* ui_description */ "Integer",
+ /* ui_icon */ 0,
+ /* ui_color */ {17,133,37,255},
+
+ /* value_structname */ "bNodeSocketValueInt",
+ /* value_structsize */ sizeof(bNodeSocketValueInt),
+
+ /* buttonfunc */ NULL,
+};
+
+/****************** BOOLEAN ******************/
+
+static bNodeSocketType node_socket_type_boolean = {
+ /* type */ SOCK_BOOLEAN,
+ /* ui_name */ "Boolean",
+ /* ui_description */ "Boolean",
+ /* ui_icon */ 0,
+ /* ui_color */ {158,139,63,255},
+
+ /* value_structname */ "bNodeSocketValueBoolean",
+ /* value_structsize */ sizeof(bNodeSocketValueBoolean),
+
+ /* buttonfunc */ NULL,
+};
+
+/****************** MESH ******************/
+
+static bNodeSocketType node_socket_type_mesh = {
+ /* type */ SOCK_MESH,
+ /* ui_name */ "Mesh",
+ /* ui_description */ "Mesh geometry data",
+ /* ui_icon */ 0,
+ /* ui_color */ {255,133,7,255},
+
+ /* value_structname */ NULL,
+ /* value_structsize */ 0,
+
+ /* buttonfunc */ NULL,
+};
+
+
+void node_socket_type_init(bNodeSocketType *types[])
+{
+ #define INIT_TYPE(name) types[node_socket_type_##name.type] = &node_socket_type_##name;
+
+ INIT_TYPE(float);
+ INIT_TYPE(vector);
+ INIT_TYPE(rgba);
+ INIT_TYPE(int);
+ INIT_TYPE(boolean);
+ INIT_TYPE(mesh);
+
+ #undef INIT_TYPE
+}
+
+struct bNodeSocket *nodeAddInputInt(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype,
+ int value, int min, int max)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_INT);
+ bNodeSocketValueInt *dval= (bNodeSocketValueInt*)sock->default_value;
+ dval->subtype = subtype;
+ dval->value = value;
+ dval->min = min;
+ dval->max = max;
+ return sock;
+}
+struct bNodeSocket *nodeAddOutputInt(struct bNodeTree *ntree, struct bNode *node, const char *name)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_INT);
+ return sock;
+}
+
+struct bNodeSocket *nodeAddInputFloat(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype,
+ float value, float min, float max)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_FLOAT);
+ bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value;
+ dval->subtype = subtype;
+ dval->value = value;
+ dval->min = min;
+ dval->max = max;
+ return sock;
+}
+struct bNodeSocket *nodeAddOutputFloat(struct bNodeTree *ntree, struct bNode *node, const char *name)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_FLOAT);
+ return sock;
+}
+
+struct bNodeSocket *nodeAddInputBoolean(struct bNodeTree *ntree, struct bNode *node, const char *name, char value)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_BOOLEAN);
+ bNodeSocketValueBoolean *dval= (bNodeSocketValueBoolean*)sock->default_value;
+ dval->value = value;
+ return sock;
+}
+struct bNodeSocket *nodeAddOutputBoolean(struct bNodeTree *ntree, struct bNode *node, const char *name)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_BOOLEAN);
+ return sock;
+}
+
+struct bNodeSocket *nodeAddInputVector(struct bNodeTree *ntree, struct bNode *node, const char *name, PropertySubType subtype,
+ float x, float y, float z, float min, float max)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_VECTOR);
+ bNodeSocketValueVector *dval= (bNodeSocketValueVector*)sock->default_value;
+ dval->subtype = subtype;
+ dval->value[0] = x;
+ dval->value[1] = y;
+ dval->value[2] = z;
+ dval->min = min;
+ dval->max = max;
+ return sock;
+}
+struct bNodeSocket *nodeAddOutputVector(struct bNodeTree *ntree, struct bNode *node, const char *name)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_VECTOR);
+ return sock;
+}
+
+struct bNodeSocket *nodeAddInputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name,
+ float r, float g, float b, float a)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_RGBA);
+ bNodeSocketValueRGBA *dval= (bNodeSocketValueRGBA*)sock->default_value;
+ dval->value[0] = r;
+ dval->value[1] = g;
+ dval->value[2] = b;
+ dval->value[3] = a;
+ return sock;
+}
+struct bNodeSocket *nodeAddOutputRGBA(struct bNodeTree *ntree, struct bNode *node, const char *name)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_RGBA);
+ return sock;
+}
+
+struct bNodeSocket *nodeAddInputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_IN, name, SOCK_MESH);
+ return sock;
+}
+struct bNodeSocket *nodeAddOutputMesh(struct bNodeTree *ntree, struct bNode *node, const char *name)
+{
+ bNodeSocket *sock= nodeAddSocket(ntree, node, SOCK_OUT, name, SOCK_MESH);
+ return sock;
+}
+
+struct bNodeSocket *node_add_input_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp)
+{
+ bNodeSocket *sock;
+ switch (stemp->type) {
+ case SOCK_INT:
+ sock = nodeAddInputInt(ntree, node, stemp->name, stemp->subtype, (int)stemp->val1, (int)stemp->min, (int)stemp->max);
+ break;
+ case SOCK_FLOAT:
+ sock = nodeAddInputFloat(ntree, node, stemp->name, stemp->subtype, stemp->val1, stemp->min, stemp->max);
+ break;
+ case SOCK_BOOLEAN:
+ sock = nodeAddInputBoolean(ntree, node, stemp->name, (char)stemp->val1);
+ break;
+ case SOCK_VECTOR:
+ sock = nodeAddInputVector(ntree, node, stemp->name, stemp->subtype, stemp->val1, stemp->val2, stemp->val3, stemp->min, stemp->max);
+ break;
+ case SOCK_RGBA:
+ sock = nodeAddInputRGBA(ntree, node, stemp->name, stemp->val1, stemp->val2, stemp->val3, stemp->val4);
+ break;
+ case SOCK_MESH:
+ sock = nodeAddInputMesh(ntree, node, stemp->name);
+ break;
+ default:
+ sock = nodeAddSocket(ntree, node, SOCK_IN, stemp->name, stemp->type);
+ }
+ return sock;
+}
+
+struct bNodeSocket *node_add_output_from_template(struct bNodeTree *ntree, struct bNode *node, struct bNodeSocketTemplate *stemp)
+{
+ bNodeSocket *sock;
+ switch (stemp->type) {
+ case SOCK_INT:
+ sock = nodeAddOutputInt(ntree, node, stemp->name);
+ break;
+ case SOCK_FLOAT:
+ sock = nodeAddOutputFloat(ntree, node, stemp->name);
+ break;
+ case SOCK_BOOLEAN:
+ sock = nodeAddOutputBoolean(ntree, node, stemp->name);
+ break;
+ case SOCK_VECTOR:
+ sock = nodeAddOutputVector(ntree, node, stemp->name);
+ break;
+ case SOCK_RGBA:
+ sock = nodeAddOutputRGBA(ntree, node, stemp->name);
+ break;
+ case SOCK_MESH:
+ sock = nodeAddOutputMesh(ntree, node, stemp->name);
+ break;
+ default:
+ sock = nodeAddSocket(ntree, node, SOCK_OUT, stemp->name, stemp->type);
+ }
+ return sock;
+}
+
+static bNodeSocket *verify_socket_template(bNodeTree *ntree, bNode *node, int in_out, ListBase *socklist, bNodeSocketTemplate *stemp)
+{
+ bNodeSocket *sock;
+
+ for(sock= socklist->first; sock; sock= sock->next) {
+ if(!(sock->flag & SOCK_DYNAMIC) && strncmp(sock->name, stemp->name, NODE_MAXSTR)==0)
+ break;
+ }
+ if(sock) {
+ sock->type= stemp->type; /* in future, read this from tydefs! */
+ if(stemp->limit==0) sock->limit= 0xFFF;
+ else sock->limit= stemp->limit;
+
+ /* Copy the property range and subtype parameters in case the template changed.
+ * NOT copying the actual value here, only button behavior changes!
+ */
+ switch (sock->type) {
+ case SOCK_FLOAT:
+ {
+ bNodeSocketValueFloat *dval= sock->default_value;
+ dval->min = stemp->min;
+ dval->max = stemp->max;
+ dval->subtype = stemp->subtype;
+ }
+ break;
+ case SOCK_INT:
+ {
+ bNodeSocketValueInt *dval= sock->default_value;
+ dval->min = stemp->min;
+ dval->max = stemp->max;
+ dval->subtype = stemp->subtype;
+ }
+ break;
+ case SOCK_VECTOR:
+ {
+ bNodeSocketValueVector *dval= sock->default_value;
+ dval->min = stemp->min;
+ dval->max = stemp->max;
+ dval->subtype = stemp->subtype;
+ }
+ break;
+ }
+
+ BLI_remlink(socklist, sock);
+
+ return sock;
+ }
+ else {
+ /* no socket for this template found, make a new one */
+ if (in_out==SOCK_IN)
+ sock = node_add_input_from_template(ntree, node, stemp);
+ else
+ sock = node_add_output_from_template(ntree, node, stemp);
+ /* remove the new socket from the node socket list first,
+ * will be added back after verification.
+ */
+ BLI_remlink(socklist, sock);
+ }
+
+ return sock;
+}
+
+static void verify_socket_template_list(bNodeTree *ntree, bNode *node, int in_out, ListBase *socklist, bNodeSocketTemplate *stemp_first)
+{
+ bNodeSocket *sock;
+ bNodeSocketTemplate *stemp;
+
+ /* no inputs anymore? */
+ if(stemp_first==NULL) {
+ while(socklist->first) {
+ sock = (bNodeSocket*)socklist->first;
+ if (!(sock->flag & SOCK_DYNAMIC))
+ nodeRemoveSocket(ntree, node, socklist->first);
+ }
+ }
+ else {
+ /* step by step compare */
+ stemp= stemp_first;
+ while(stemp->type != -1) {
+ stemp->sock= verify_socket_template(ntree, node, in_out, socklist, stemp);
+ stemp++;
+ }
+ /* leftovers are removed */
+ while(socklist->first) {
+ sock = (bNodeSocket*)socklist->first;
+ if (!(sock->flag & SOCK_DYNAMIC))
+ nodeRemoveSocket(ntree, node, socklist->first);
+ }
+
+ /* and we put back the verified sockets */
+ stemp= stemp_first;
+ if (socklist->first) {
+ /* some dynamic sockets left, store the list start
+ * so we can add static sockets infront of it.
+ */
+ sock = socklist->first;
+ while(stemp->type != -1) {
+ /* put static sockets infront of dynamic */
+ BLI_insertlinkbefore(socklist, sock, stemp->sock);
+ stemp++;
+ }
+ }
+ else {
+ while(stemp->type != -1) {
+ BLI_addtail(socklist, stemp->sock);
+ stemp++;
+ }
+ }
+ }
+}
+
+void node_verify_socket_templates(bNodeTree *ntree, bNode *node)
+{
+ bNodeType *ntype= node->typeinfo;
+ /* XXX Small trick: don't try to match socket lists when there are no templates.
+ * This also prevents group node sockets from being removed, without the need to explicitly
+ * check the node type here.
+ */
+ if(ntype && ((ntype->inputs && ntype->inputs[0].type>=0) || (ntype->outputs && ntype->outputs[0].type>=0))) {
+ verify_socket_template_list(ntree, node, SOCK_IN, &node->inputs, ntype->inputs);
+ verify_socket_template_list(ntree, node, SOCK_OUT, &node->outputs, ntype->outputs);
+ }
+}
diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c
index 1cc8c282179..bdf53df06af 100644
--- a/source/blender/nodes/intern/node_util.c
+++ b/source/blender/nodes/intern/node_util.c
@@ -32,12 +32,24 @@
*/
-#include "CMP_util.h"
-#include "SHD_util.h"
+#include "DNA_action_types.h"
+#include "DNA_node_types.h"
+
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_colortools.h"
+#include "BKE_node.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
+#include "MEM_guardedalloc.h"
+
+#include "node_util.h"
+
+/**** Storage Data ****/
+
void node_free_curves(bNode *node)
{
curvemapping_free(node->storage);
@@ -58,6 +70,8 @@ void node_copy_standard_storage(bNode *orig_node, bNode *new_node)
new_node->storage= MEM_dupallocN(orig_node->storage);
}
+/**** Labels ****/
+
const char *node_blend_label(bNode *node)
{
const char *name;
diff --git a/source/blender/nodes/intern/node_util.h b/source/blender/nodes/intern/node_util.h
index 5a78fc07883..8d38d57f577 100644
--- a/source/blender/nodes/intern/node_util.h
+++ b/source/blender/nodes/intern/node_util.h
@@ -35,14 +35,27 @@
#ifndef NODE_UTIL_H_
#define NODE_UTIL_H_
+#include "DNA_listBase.h"
+
+#include "BKE_node.h"
+
#include "MEM_guardedalloc.h"
+#include "NOD_socket.h"
+
+struct bNodeTree;
+struct bNode;
+
+/**** Storage Data ****/
+
extern void node_free_curves(struct bNode *node);
extern void node_free_standard_storage(struct bNode *node);
extern void node_copy_curves(struct bNode *orig_node, struct bNode *new_node);
extern void node_copy_standard_storage(struct bNode *orig_node, struct bNode *new_node);
+/**** Labels ****/
+
const char *node_blend_label(struct bNode *node);
const char *node_math_label(struct bNode *node);
const char *node_vect_math_label(struct bNode *node);
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
new file mode 100644
index 00000000000..28f0f983454
--- /dev/null
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -0,0 +1,225 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/shader/node_shader_tree.c
+ * \ingroup nodes
+ */
+
+
+#include <string.h>
+
+#include "DNA_material_types.h"
+#include "DNA_node_types.h"
+
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+#include "BLI_threads.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_global.h"
+#include "BKE_main.h"
+#include "BKE_node.h"
+#include "BKE_utildefines.h"
+
+#include "GPU_material.h"
+
+#include "RE_shader_ext.h"
+
+#include "node_exec.h"
+#include "node_util.h"
+#include "node_shader_util.h"
+
+static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func)
+{
+ Material *ma;
+ for(ma= main->mat.first; ma; ma= ma->id.next) {
+ if(ma->nodetree) {
+ func(calldata, &ma->id, ma->nodetree);
+ }
+ }
+}
+
+static void local_sync(bNodeTree *localtree, bNodeTree *ntree)
+{
+ bNode *lnode;
+
+ /* copy over contents of previews */
+ for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) {
+ if(ntreeNodeExists(ntree, lnode->new_node)) {
+ bNode *node= lnode->new_node;
+
+ if(node->preview && node->preview->rect) {
+ if(lnode->preview && lnode->preview->rect) {
+ int xsize= node->preview->xsize;
+ int ysize= node->preview->ysize;
+ memcpy(node->preview->rect, lnode->preview->rect, 4*xsize + xsize*ysize*sizeof(char)*4);
+ }
+ }
+ }
+ }
+}
+
+bNodeTreeType ntreeType_Shader = {
+ /* type */ NTREE_SHADER,
+ /* id_name */ "NTShader Nodetree",
+
+ /* node_types */ { NULL, NULL },
+
+ /* free_cache */ NULL,
+ /* free_node_cache */ NULL,
+ /* foreach_nodetree */ foreach_nodetree,
+ /* localize */ NULL,
+ /* local_sync */ local_sync,
+ /* local_merge */ NULL,
+ /* update */ NULL,
+ /* update_node */ NULL
+};
+
+/* GPU material from shader nodes */
+
+void ntreeGPUMaterialNodes(bNodeTree *ntree, GPUMaterial *mat)
+{
+ bNodeTreeExec *exec;
+
+ exec = ntreeShaderBeginExecTree(ntree, 1);
+
+ ntreeExecGPUNodes(exec, mat, 1);
+
+ ntreeShaderEndExecTree(exec, 1);
+}
+
+/* **************** call to switch lamploop for material node ************ */
+
+void (*node_shader_lamp_loop)(struct ShadeInput *, struct ShadeResult *);
+
+void set_node_shader_lamp_loop(void (*lamp_loop_func)(ShadeInput *, ShadeResult *))
+{
+ node_shader_lamp_loop= lamp_loop_func;
+}
+
+
+/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes.
+ * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees.
+ */
+bNodeTreeExec *ntreeShaderBeginExecTree(bNodeTree *ntree, int use_tree_data)
+{
+ bNodeTreeExec *exec;
+ bNode *node;
+
+ if (use_tree_data) {
+ /* XXX hack: prevent exec data from being generated twice.
+ * this should be handled by the renderer!
+ */
+ if (ntree->execdata)
+ return ntree->execdata;
+ }
+
+ /* ensures only a single output node is enabled */
+ ntreeSetOutput(ntree);
+
+ /* common base initialization */
+ exec = ntree_exec_begin(ntree);
+
+ /* allocate the thread stack listbase array */
+ exec->threadstack= MEM_callocN(BLENDER_MAX_THREADS*sizeof(ListBase), "thread stack array");
+
+ for(node= exec->nodetree->nodes.first; node; node= node->next)
+ node->need_exec= 1;
+
+ if (use_tree_data) {
+ /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes,
+ * which only store the ntree pointer. Should be fixed at some point!
+ */
+ ntree->execdata = exec;
+ }
+
+ return exec;
+}
+
+/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes.
+ * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees.
+ */
+void ntreeShaderEndExecTree(bNodeTreeExec *exec, int use_tree_data)
+{
+ if(exec) {
+ bNodeTree *ntree= exec->nodetree;
+ bNodeThreadStack *nts;
+ int a;
+
+ if(exec->threadstack) {
+ for(a=0; a<BLENDER_MAX_THREADS; a++) {
+ for(nts=exec->threadstack[a].first; nts; nts=nts->next)
+ if (nts->stack) MEM_freeN(nts->stack);
+ BLI_freelistN(&exec->threadstack[a]);
+ }
+
+ MEM_freeN(exec->threadstack);
+ exec->threadstack= NULL;
+ }
+
+ ntree_exec_end(exec);
+
+ if (use_tree_data) {
+ /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */
+ ntree->execdata = NULL;
+ }
+ }
+}
+
+void ntreeShaderExecTree(bNodeTree *ntree, ShadeInput *shi, ShadeResult *shr)
+{
+ ShaderCallData scd;
+ /*
+ @note: preserve material from ShadeInput for material id, nodetree execs change it
+ fix for bug "[#28012] Mat ID messy with shader nodes"
+ */
+ Material *mat = shi->mat; bNodeThreadStack *nts = NULL;
+ bNodeTreeExec *exec = ntree->execdata;
+
+ /* convert caller data to struct */
+ scd.shi= shi;
+ scd.shr= shr;
+
+ /* each material node has own local shaderesult, with optional copying */
+ memset(shr, 0, sizeof(ShadeResult));
+
+ if (!exec)
+ exec = ntree->execdata = ntreeShaderBeginExecTree(ntree, 1);
+
+ nts= ntreeGetThreadStack(exec, shi->thread);
+ ntreeExecThreadNodes(exec, nts, &scd, shi->thread);
+ ntreeReleaseThreadStack(nts);
+
+ // @note: set material back to preserved material
+ shi->mat = mat;
+ /* better not allow negative for now */
+ if(shr->combined[0]<0.0f) shr->combined[0]= 0.0f;
+ if(shr->combined[1]<0.0f) shr->combined[1]= 0.0f;
+ if(shr->combined[2]<0.0f) shr->combined[2]= 0.0f;
+}
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
new file mode 100644
index 00000000000..5c54f7816ff
--- /dev/null
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -0,0 +1,289 @@
+/*
+ * $Id$
+ *
+ * ***** 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 *****
+ */
+
+/** \file blender/nodes/shader/node_shader_util.c
+ * \ingroup nodes
+ */
+
+
+#include "DNA_node_types.h"
+
+#include "node_shader_util.h"
+
+#include "node_exec.h"
+
+/* ****** */
+
+void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
+{
+ float *from= ns->vec;
+
+ if(type_in==SOCK_FLOAT) {
+ if(ns->sockettype==SOCK_FLOAT)
+ *in= *from;
+ else
+ *in= 0.333333f*(from[0]+from[1]+from[2]);
+ }
+ else if(type_in==SOCK_VECTOR) {
+ if(ns->sockettype==SOCK_FLOAT) {
+ in[0]= from[0];
+ in[1]= from[0];
+ in[2]= from[0];
+ }
+ else {
+ VECCOPY(in, from);
+ }
+ }
+ else { /* type_in==SOCK_RGBA */
+ if(ns->sockettype==SOCK_RGBA) {
+ QUATCOPY(in, from);
+ }
+ else if(ns->sockettype==SOCK_FLOAT) {
+ in[0]= from[0];
+ in[1]= from[0];
+ in[2]= from[0];
+ in[3]= 1.0f;
+ }
+ else {
+ VECCOPY(in, from);
+ in[3]= 1.0f;
+ }
+ }
+}
+
+
+/* ******************* execute and parse ************ */
+
+/* go over all used Geometry and Texture nodes, and return a texco flag */
+/* no group inside needed, this function is called for groups too */
+void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mode)
+{
+ bNode *node;
+ bNodeSocket *sock;
+ int a;
+
+ ntreeSocketUseFlags(ntree);
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->type==SH_NODE_TEXTURE) {
+ if((r_mode & R_OSA) && node->id) {
+ Tex *tex= (Tex *)node->id;
+ if ELEM3(tex->type, TEX_IMAGE, TEX_PLUGIN, TEX_ENVMAP)
+ *texco |= TEXCO_OSA|NEED_UV;
+ }
+ /* usability exception... without input we still give the node orcos */
+ sock= node->inputs.first;
+ if(sock==NULL || sock->link==NULL)
+ *texco |= TEXCO_ORCO|NEED_UV;
+ }
+ else if(node->type==SH_NODE_GEOMETRY) {
+ /* 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) {
+ case GEOM_OUT_GLOB:
+ *texco |= TEXCO_GLOB|NEED_UV; break;
+ case GEOM_OUT_VIEW:
+ *texco |= TEXCO_VIEW|NEED_UV; break;
+ case GEOM_OUT_ORCO:
+ *texco |= TEXCO_ORCO|NEED_UV; break;
+ case GEOM_OUT_UV:
+ *texco |= TEXCO_UV|NEED_UV; break;
+ case GEOM_OUT_NORMAL:
+ *texco |= TEXCO_NORM|NEED_UV; break;
+ case GEOM_OUT_VCOL:
+ *texco |= NEED_UV; *mode |= MA_VERTEXCOL; break;
+ case GEOM_OUT_VCOL_ALPHA:
+ *texco |= NEED_UV; *mode |= MA_VERTEXCOL; break;
+ }
+ }
+ }
+ }
+ }
+}
+
+/* nodes that use ID data get synced with local data */
+void nodeShaderSynchronizeID(bNode *node, int copyto)
+{
+ if(node->id==NULL) return;
+
+ if(ELEM(node->type, SH_NODE_MATERIAL, SH_NODE_MATERIAL_EXT)) {
+ bNodeSocket *sock;
+ Material *ma= (Material *)node->id;
+ int a;
+
+ /* hrmf, case in loop isnt super fast, but we dont edit 100s of material at same time either! */
+ for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
+ if(!(sock->flag & SOCK_HIDDEN)) {
+ if(copyto) {
+ switch(a) {
+ case MAT_IN_COLOR:
+ VECCOPY(&ma->r, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
+ case MAT_IN_SPEC:
+ VECCOPY(&ma->specr, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
+ case MAT_IN_REFL:
+ ma->ref= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
+ case MAT_IN_MIR:
+ VECCOPY(&ma->mirr, ((bNodeSocketValueRGBA*)sock->default_value)->value); break;
+ case MAT_IN_AMB:
+ ma->amb= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
+ case MAT_IN_EMIT:
+ ma->emit= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
+ case MAT_IN_SPECTRA:
+ ma->spectra= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
+ case MAT_IN_RAY_MIRROR:
+ ma->ray_mirror= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
+ case MAT_IN_ALPHA:
+ ma->alpha= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
+ case MAT_IN_TRANSLUCENCY:
+ ma->translucency= ((bNodeSocketValueFloat*)sock->default_value)->value; break;
+ }
+ }
+ else {
+ switch(a) {
+ case MAT_IN_COLOR:
+ VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->r); break;
+ case MAT_IN_SPEC:
+ VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->specr); break;
+ case MAT_IN_REFL:
+ ((bNodeSocketValueFloat*)sock->default_value)->value= ma->ref; break;
+ case MAT_IN_MIR:
+ VECCOPY(((bNodeSocketValueRGBA*)sock->default_value)->value, &ma->mirr); break;
+ case MAT_IN_AMB:
+ ((bNodeSocketValueFloat*)sock->default_value)->value= ma->amb; break;
+ case MAT_IN_EMIT:
+ ((bNodeSocketValueFloat*)sock->default_value)->value= ma->emit; break;
+ case MAT_IN_SPECTRA:
+ ((bNodeSocketValueFloat*)sock->default_value)->value= ma->spectra; break;
+ case MAT_IN_RAY_MIRROR:
+ ((bNodeSocketValueFloat*)sock->default_value)->value= ma->ray_mirror; break;
+ case MAT_IN_ALPHA:
+ ((bNodeSocketValueFloat*)sock->default_value)->value= ma->alpha; break;
+ case MAT_IN_TRANSLUCENCY:
+ ((bNodeSocketValueFloat*)sock->default_value)->value= ma->translucency; break;
+ }
+ }
+ }
+ }
+ }
+
+}
+
+
+void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns)
+{
+ memset(gs, 0, sizeof(*gs));
+
+ QUATCOPY(gs->vec, ns->vec);
+ gs->link= ns->data;
+
+ if (type == SOCK_FLOAT)
+ gs->type= GPU_FLOAT;
+ else if (type == SOCK_VECTOR)
+ gs->type= GPU_VEC3;
+ else if (type == SOCK_RGBA)
+ gs->type= GPU_VEC4;
+ else
+ gs->type= GPU_NONE;
+
+ gs->name = "";
+ gs->hasinput= ns->hasinput && ns->data;
+ gs->hasoutput= ns->hasoutput && ns->data;
+ gs->sockettype= ns->sockettype;
+}
+
+void node_data_from_gpu_stack(bNodeStack *ns, GPUNodeStack *gs)
+{
+ ns->data= gs->link;
+ ns->sockettype= gs->sockettype;
+}
+
+static void gpu_stack_from_data_list(GPUNodeStack *gs, ListBase *sockets, bNodeStack **ns)
+{
+ bNodeSocket *sock;
+ int i;
+
+ for (sock=sockets->first, i=0; sock; sock=sock->next, i++)
+ node_gpu_stack_from_data(&gs[i], sock->type, ns[i]);
+
+ gs[i].type= GPU_NONE;
+}
+
+static void data_from_gpu_stack_list(ListBase *sockets, bNodeStack **ns, GPUNodeStack *gs)
+{
+ bNodeSocket *sock;
+ int i;
+
+ for (sock=sockets->first, i=0; sock; sock=sock->next, i++)
+ node_data_from_gpu_stack(ns[i], &gs[i]);
+}
+
+void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, int do_outputs)
+{
+ bNodeExec *nodeexec;
+ bNode *node;
+ int n;
+ bNodeStack *stack;
+ bNodeStack *nsin[MAX_SOCKET]; /* arbitrary... watch this */
+ bNodeStack *nsout[MAX_SOCKET]; /* arbitrary... watch this */
+ GPUNodeStack gpuin[MAX_SOCKET+1], gpuout[MAX_SOCKET+1];
+ int doit;
+
+ stack= exec->stack;
+
+ for(n=0, nodeexec= exec->nodeexec; n < exec->totnodes; ++n, ++nodeexec) {
+ node = nodeexec->node;
+
+ doit = 0;
+ /* for groups, only execute outputs for edited group */
+ if(node->typeinfo->nclass==NODE_CLASS_OUTPUT) {
+ if(do_outputs && (node->flag & NODE_DO_OUTPUT))
+ doit = 1;
+ }
+ else
+ doit = 1;
+
+ if (doit) {
+ if(node->typeinfo->gpufunc) {
+ node_get_stack(node, stack, nsin, nsout);
+ gpu_stack_from_data_list(gpuin, &node->inputs, nsin);
+ gpu_stack_from_data_list(gpuout, &node->outputs, nsout);
+ if(node->typeinfo->gpufunc(mat, node, gpuin, gpuout))
+ data_from_gpu_stack_list(&node->outputs, nsout, gpuout);
+ }
+ else if(node->typeinfo->gpuextfunc) {
+ node_get_stack(node, stack, nsin, nsout);
+ gpu_stack_from_data_list(gpuin, &node->inputs, nsin);
+ gpu_stack_from_data_list(gpuout, &node->outputs, nsout);
+ if(node->typeinfo->gpuextfunc(mat, node, nodeexec->data, gpuin, gpuout))
+ data_from_gpu_stack_list(&node->outputs, nsout, gpuout);
+ }
+ }
+ }
+}
diff --git a/source/blender/nodes/intern/SHD_util.h b/source/blender/nodes/shader/node_shader_util.h
index 583810565b2..23b169328bc 100644
--- a/source/blender/nodes/intern/SHD_util.h
+++ b/source/blender/nodes/shader/node_shader_util.h
@@ -27,13 +27,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_util.h
+/** \file blender/nodes/shader/node_shader_util.h
* \ingroup nodes
*/
-#ifndef SHD_NODE_UTIL_H_
-#define SHD_NODE_UTIL_H_
+#ifndef NODE_SHADER_UTIL_H_
+#define NODE_SHADER_UTIL_H_
#include <math.h>
#include <float.h>
@@ -61,7 +61,7 @@
#include "BKE_library.h"
-#include "../SHD_node.h"
+#include "NOD_shader.h"
#include "node_util.h"
#include "BLI_math.h"
@@ -123,4 +123,9 @@ typedef struct ShaderCallData {
extern void node_ID_title_cb(void *node_v, void *unused_v);
void nodestack_get_vec(float *in, short type_in, bNodeStack *ns);
+void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, struct bNodeStack *ns);
+void node_data_from_gpu_stack(struct bNodeStack *ns, struct GPUNodeStack *gs);
+
+void ntreeExecGPUNodes(struct bNodeTreeExec *exec, struct GPUMaterial *mat, int do_outputs);
+
#endif
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_camera.c b/source/blender/nodes/shader/nodes/node_shader_camera.c
index eea572bf271..c1e737fcb53 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_camera.c
+++ b/source/blender/nodes/shader/nodes/node_shader_camera.c
@@ -27,18 +27,18 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_camera.c
+/** \file blender/nodes/shader/nodes/node_shader_camera.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** CAMERA INFO ******************** */
-static bNodeSocketType sh_node_camera_out[]= {
- { SOCK_VECTOR, 0, "View Vector", 1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f}, /* None of these actually */
- { SOCK_VALUE, 0, "View Z Depth", 0.f, 0.0f, 0.0f, 0.0f, 0.0f, 99999999999.0f}, /* have any limits on their */
- { SOCK_VALUE, 0, "View Distance", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 99999999999.0f}, /* values. */
+static bNodeSocketTemplate sh_node_camera_out[]= {
+ { SOCK_VECTOR, 0, "View Vector"},
+ { SOCK_FLOAT, 0, "View Z Depth"},
+ { SOCK_FLOAT, 0, "View Distance"},
{ -1, 0, "" }
};
@@ -63,8 +63,8 @@ void register_node_type_sh_camera(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT, 0,
- NULL, sh_node_camera_out);
+ node_type_base(&ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT, 0);
+ node_type_socket_templates(&ntype, NULL, sh_node_camera_out);
node_type_size(&ntype, 95, 95, 120);
node_type_storage(&ntype, "node_camera", NULL, NULL);
node_type_exec(&ntype, node_shader_exec_camera);
diff --git a/source/blender/nodes/shader/nodes/node_shader_common.c b/source/blender/nodes/shader/nodes/node_shader_common.c
new file mode 100644
index 00000000000..2dd15ab1e99
--- /dev/null
+++ b/source/blender/nodes/shader/nodes/node_shader_common.c
@@ -0,0 +1,327 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Campbell Barton, Alfredo de Greef, David Millan Escriva,
+ * Juho Vepsäläinen
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/shader/nodes/node_shader_common.c
+ * \ingroup shdnodes
+ */
+
+
+#include "DNA_node_types.h"
+
+#include "BKE_node.h"
+
+#include "node_shader_util.h"
+#include "node_common.h"
+#include "node_exec.h"
+
+static void copy_stack(bNodeStack *to, bNodeStack *from)
+{
+ if (to != from) {
+ copy_v4_v4(to->vec, from->vec);
+ to->data = from->data;
+ to->datatype = from->datatype;
+
+ /* tag as copy to prevent freeing */
+ to->is_copy = 1;
+ }
+}
+
+static void move_stack(bNodeStack *to, bNodeStack *from)
+{
+ if (to != from) {
+ copy_v4_v4(to->vec, from->vec);
+ to->data = from->data;
+ to->datatype = from->datatype;
+ to->is_copy = from->is_copy;
+
+ zero_v4(from->vec);
+ from->data = NULL;
+ from->datatype = 0;
+ from->is_copy = 0;
+ }
+}
+
+/**** GROUP ****/
+
+static void *group_initexec(bNode *node)
+{
+ bNodeTree *ngroup= (bNodeTree*)node->id;
+ bNodeTreeExec *exec;
+
+ /* initialize the internal node tree execution */
+ exec = ntreeShaderBeginExecTree(ngroup, 0);
+
+ return exec;
+}
+
+static void group_freeexec(bNode *UNUSED(node), void *nodedata)
+{
+ bNodeTreeExec*gexec= (bNodeTreeExec*)nodedata;
+
+ ntreeShaderEndExecTree(gexec, 0);
+}
+
+/* Copy inputs to the internal stack.
+ */
+static void group_copy_inputs(bNode *node, bNodeStack **in, bNodeStack *gstack)
+{
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int a;
+ for (sock=node->inputs.first, a=0; sock; sock=sock->next, ++a) {
+ if (sock->groupsock) {
+ ns = node_get_socket_stack(gstack, sock->groupsock);
+ copy_stack(ns, in[a]);
+ }
+ }
+}
+
+/* Copy internal results to the external outputs.
+ */
+static void group_move_outputs(bNode *node, bNodeStack **out, bNodeStack *gstack)
+{
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int a;
+ for (sock=node->outputs.first, a=0; sock; sock=sock->next, ++a) {
+ if (sock->groupsock) {
+ ns = node_get_socket_stack(gstack, sock->groupsock);
+ move_stack(out[a], ns);
+ }
+ }
+}
+
+static void group_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ bNodeThreadStack *nts;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ nts = ntreeGetThreadStack(exec, thread);
+
+ group_copy_inputs(node, in, nts->stack);
+ ntreeExecThreadNodes(exec, nts, data, thread);
+ group_move_outputs(node, out, nts->stack);
+
+ ntreeReleaseThreadStack(nts);
+}
+
+static void group_gpu_copy_inputs(bNode *node, GPUNodeStack *in, bNodeStack *gstack)
+{
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int a;
+ for (sock=node->inputs.first, a=0; sock; sock=sock->next, ++a) {
+ if (sock->groupsock) {
+ ns = node_get_socket_stack(gstack, sock->groupsock);
+ /* convert the external gpu stack back to internal node stack data */
+ node_data_from_gpu_stack(ns, &in[a]);
+ }
+ }
+}
+
+/* Copy internal results to the external outputs.
+ */
+static void group_gpu_move_outputs(bNode *node, GPUNodeStack *out, bNodeStack *gstack)
+{
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int a;
+ for (sock=node->outputs.first, a=0; sock; sock=sock->next, ++a) {
+ if (sock->groupsock) {
+ ns = node_get_socket_stack(gstack, sock->groupsock);
+ /* convert the node stack data result back to gpu stack */
+ node_gpu_stack_from_data(&out[a], sock->type, ns);
+ }
+ }
+}
+
+static int gpu_group_execute(GPUMaterial *mat, bNode *node, void *nodedata, GPUNodeStack *in, GPUNodeStack *out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+
+ group_gpu_copy_inputs(node, in, exec->stack);
+ ntreeExecGPUNodes(exec, mat, (node->flag & NODE_GROUP_EDIT));
+ group_gpu_move_outputs(node, out, exec->stack);
+
+ return 1;
+}
+
+void register_node_type_sh_group(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_group_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_group_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute);
+ node_type_gpu_ext(&ntype, gpu_group_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+
+
+/**** FOR LOOP ****/
+
+#if 0 /* XXX loop nodes don't work nicely with current trees */
+static void forloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ bNodeThreadStack *nts;
+ int iterations= (int)in[0]->vec[0];
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int iteration;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ nts = ntreeGetThreadStack(exec, thread);
+
+ /* "Iteration" socket */
+ sock = exec->nodetree->inputs.first;
+ ns = node_get_socket_stack(nts->stack, sock);
+
+// group_copy_inputs(node, in, nts->stack);
+ for (iteration=0; iteration < iterations; ++iteration) {
+ /* first input contains current iteration counter */
+ ns->vec[0] = (float)iteration;
+ ns->vec[1]=ns->vec[2]=ns->vec[3] = 0.0f;
+
+// if (iteration > 0)
+// loop_init_iteration(exec->nodetree, nts->stack);
+// ntreeExecThreadNodes(exec, nts, data, thread);
+ }
+// loop_copy_outputs(node, in, out, exec->stack);
+
+ ntreeReleaseThreadStack(nts);
+}
+
+void register_node_type_sh_forloop(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_forloop_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_forloop_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_tree(&ntype, node_forloop_init_tree, node_loop_update_tree);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+#endif
+
+/**** WHILE LOOP ****/
+
+#if 0 /* XXX loop nodes don't work nicely with current trees */
+static void whileloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ bNodeThreadStack *nts;
+ int condition= (in[0]->vec[0] > 0.0f);
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int iteration;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ nts = ntreeGetThreadStack(exec, thread);
+
+ /* "Condition" socket */
+ sock = exec->nodetree->outputs.first;
+ ns = node_get_socket_stack(nts->stack, sock);
+
+ iteration = 0;
+// group_copy_inputs(node, in, nts->stack);
+ while (condition && iteration < node->custom1) {
+// if (iteration > 0)
+// loop_init_iteration(exec->nodetree, nts->stack);
+// ntreeExecThreadNodes(exec, nts, data, thread);
+
+ condition = (ns->vec[0] > 0.0f);
+ ++iteration;
+ }
+// loop_copy_outputs(node, in, out, exec->stack);
+
+ ntreeReleaseThreadStack(nts);
+}
+
+void register_node_type_sh_whileloop(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_whileloop_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_whileloop_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_tree(&ntype, node_whileloop_init_tree, node_loop_update_tree);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+#endif
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_curves.c b/source/blender/nodes/shader/nodes/node_shader_curves.c
index a39a639897e..9dedeba6d39 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_curves.c
+++ b/source/blender/nodes/shader/nodes/node_shader_curves.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_curves.c
+/** \file blender/nodes/shader/nodes/node_shader_curves.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** CURVE VEC ******************** */
-static bNodeSocketType sh_node_curve_vec_in[]= {
- { SOCK_VALUE, 0, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_curve_vec_in[]= {
+ { SOCK_FLOAT, 0, "Fac", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_curve_vec_out[]= {
- { SOCK_VECTOR, 0, "Vector", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_curve_vec_out[]= {
+ { SOCK_VECTOR, 0, "Vector"},
{ -1, 0, "" }
};
@@ -57,7 +57,7 @@ static void node_shader_exec_curve_vec(void *UNUSED(data), bNode *node, bNodeSta
curvemapping_evaluate3F(node->storage, out[0]->vec, vec);
}
-static void node_shader_init_curve_vec(bNode* node)
+static void node_shader_init_curve_vec(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f);
}
@@ -75,8 +75,8 @@ void register_node_type_sh_curve_vec(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS,
- sh_node_curve_vec_in, sh_node_curve_vec_out);
+ node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_curve_vec_in, sh_node_curve_vec_out);
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, node_shader_init_curve_vec);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
@@ -88,14 +88,14 @@ void register_node_type_sh_curve_vec(ListBase *lb)
/* **************** CURVE RGB ******************** */
-static bNodeSocketType sh_node_curve_rgb_in[]= {
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_curve_rgb_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_curve_rgb_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_curve_rgb_out[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -112,7 +112,7 @@ static void node_shader_exec_curve_rgb(void *UNUSED(data), bNode *node, bNodeSta
}
}
-static void node_shader_init_curve_rgb(bNode *node)
+static void node_shader_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
}
@@ -129,8 +129,8 @@ void register_node_type_sh_curve_rgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- sh_node_curve_rgb_in, sh_node_curve_rgb_out);
+ node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_curve_rgb_in, sh_node_curve_rgb_out);
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, node_shader_init_curve_rgb);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c b/source/blender/nodes/shader/nodes/node_shader_dynamic.c
index d5e5d5eeb93..5aae54d858b 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_dynamic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_dynamic.c
@@ -27,7 +27,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_dynamic.c
+/** \file blender/nodes/shader/nodes/node_shader_dynamic.c
* \ingroup shdnodes
*/
@@ -54,7 +54,7 @@
#endif
#endif
-#include "../SHD_util.h"
+#include "node_shader_util.h"
// XXX
#if 0
@@ -95,7 +95,7 @@ static bNodeType *node_dynamic_find_typeinfo(ListBase *list, ID *id)
static void node_dynamic_free_typeinfo_sockets(bNodeType *tinfo)
{
- bNodeSocketType *sock;
+ bNodeSocketTemplate *sock;
if (!tinfo) return;
@@ -782,7 +782,7 @@ void register_node_type_sh_dynamic(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, 0, NULL, NULL);
+ node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, 0);
nodeRegisterType(lb, &ntype);
}
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_geom.c b/source/blender/nodes/shader/nodes/node_shader_geom.c
index b349406932e..495de0247a1 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_geom.c
+++ b/source/blender/nodes/shader/nodes/node_shader_geom.c
@@ -27,28 +27,28 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_geom.c
+/** \file blender/nodes/shader/nodes/node_shader_geom.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
#include "DNA_customdata_types.h"
/* **************** GEOMETRY ******************** */
/* output socket type definition */
-static bNodeSocketType sh_node_geom_out[]= {
- { SOCK_VECTOR, 0, "Global", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, /* btw; uses no limit */
- { SOCK_VECTOR, 0, "Local", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_VECTOR, 0, "View", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_VECTOR, 0, "Orco", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_VECTOR, 0, "UV", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_RGBA, 0, "Vertex Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Vertex Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Front/Back", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_geom_out[]= {
+ { SOCK_VECTOR, 0, "Global"},
+ { SOCK_VECTOR, 0, "Local"},
+ { SOCK_VECTOR, 0, "View"},
+ { SOCK_VECTOR, 0, "Orco"},
+ { SOCK_VECTOR, 0, "UV"},
+ { SOCK_VECTOR, 0, "Normal"},
+ { SOCK_RGBA, 0, "Vertex Color"},
+ { SOCK_FLOAT, 0, "Vertex Alpha"},
+ { SOCK_FLOAT, 0, "Front/Back"},
{ -1, 0, "" }
};
@@ -73,12 +73,12 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(i
}
/* out: global, local, view, orco, uv, normal, vertex color */
- VECCOPY(out[GEOM_OUT_GLOB]->vec, shi->gl);
- VECCOPY(out[GEOM_OUT_LOCAL]->vec, shi->co);
- VECCOPY(out[GEOM_OUT_VIEW]->vec, shi->view);
- VECCOPY(out[GEOM_OUT_ORCO]->vec, shi->lo);
- VECCOPY(out[GEOM_OUT_UV]->vec, suv->uv);
- VECCOPY(out[GEOM_OUT_NORMAL]->vec, shi->vno);
+ copy_v3_v3(out[GEOM_OUT_GLOB]->vec, shi->gl);
+ copy_v3_v3(out[GEOM_OUT_LOCAL]->vec, shi->co);
+ copy_v3_v3(out[GEOM_OUT_VIEW]->vec, shi->view);
+ copy_v3_v3(out[GEOM_OUT_ORCO]->vec, shi->lo);
+ copy_v3_v3(out[GEOM_OUT_UV]->vec, suv->uv);
+ copy_v3_v3(out[GEOM_OUT_NORMAL]->vec, shi->vno);
if (shi->totcol) {
/* find vertex color layer by name */
@@ -95,10 +95,9 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(i
VECCOPY(out[GEOM_OUT_VCOL]->vec, scol->col);
out[GEOM_OUT_VCOL]->vec[3]= scol->col[3];
-
out[GEOM_OUT_VCOL_ALPHA]->vec[0]= scol->col[3];
}
- else {
+ else {
memcpy(out[GEOM_OUT_VCOL]->vec, defaultvcol, sizeof(defaultvcol));
out[GEOM_OUT_VCOL_ALPHA]->vec[0]= 1.0f;
}
@@ -123,7 +122,7 @@ static void node_shader_exec_geom(void *data, bNode *node, bNodeStack **UNUSED(i
}
}
-static void node_shader_init_geometry(bNode *node)
+static void node_shader_init_geometry(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= MEM_callocN(sizeof(NodeGeometry), "NodeGeometry");
}
@@ -145,8 +144,8 @@ void register_node_type_sh_geom(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_GEOMETRY, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS,
- NULL, sh_node_geom_out);
+ node_type_base(&ntype, SH_NODE_GEOMETRY, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, sh_node_geom_out);
node_type_size(&ntype, 120, 80, 160);
node_type_init(&ntype, node_shader_init_geometry);
node_type_storage(&ntype, "NodeGeometry", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
index 91fd995dbbe..f4f69cf56fe 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c
+++ b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
@@ -1,5 +1,5 @@
/*
- *
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -27,25 +27,25 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_hueSatVal.c
+/** \file blender/nodes/shader/nodes/node_shader_hueSatVal.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** Hue Saturation ******************** */
-static bNodeSocketType sh_node_hue_sat_in[]= {
- { SOCK_VALUE, 1, "Hue", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Saturation", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f},
- { SOCK_VALUE, 1, "Value", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f},
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_hue_sat_in[]= {
+ { SOCK_FLOAT, 1, "Hue", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Saturation", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR},
+ { SOCK_FLOAT, 1, "Value", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR},
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_hue_sat_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_hue_sat_out[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -86,8 +86,8 @@ void register_node_type_sh_hue_sat(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- sh_node_hue_sat_in, sh_node_hue_sat_out);
+ node_type_base(&ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_hue_sat_in, sh_node_hue_sat_out);
node_type_size(&ntype, 150, 80, 250);
node_type_exec(&ntype, node_shader_exec_hue_sat);
node_type_gpu(&ntype, gpu_shader_hue_sat);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_invert.c b/source/blender/nodes/shader/nodes/node_shader_invert.c
index f8d6e54859e..5347d98b42e 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_invert.c
+++ b/source/blender/nodes/shader/nodes/node_shader_invert.c
@@ -27,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_invert.c
+/** \file blender/nodes/shader/nodes/node_shader_invert.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** INVERT ******************** */
-static bNodeSocketType sh_node_invert_in[]= {
- { SOCK_VALUE, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_invert_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_invert_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_invert_out[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -78,8 +78,8 @@ void register_node_type_sh_invert(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- sh_node_invert_in, sh_node_invert_out);
+ node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_invert_in, sh_node_invert_out);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, node_shader_exec_invert);
node_type_gpu(&ntype, gpu_shader_invert);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c
index eb300301ce2..05432708b29 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_mapping.c
+/** \file blender/nodes/shader/nodes/node_shader_mapping.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** MAPPING ******************** */
-static bNodeSocketType sh_node_mapping_in[]= {
- { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_mapping_in[]= {
+ { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_mapping_out[]= {
- { SOCK_VECTOR, 0, "Vector", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_mapping_out[]= {
+ { SOCK_VECTOR, 0, "Vector"},
{ -1, 0, "" }
};
@@ -69,7 +69,7 @@ static void node_shader_exec_mapping(void *UNUSED(data), bNode *node, bNodeStack
}
-static void node_shader_init_mapping(bNode *node)
+static void node_shader_init_mapping(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= add_mapping();
}
@@ -92,8 +92,8 @@ void register_node_type_sh_mapping(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, NODE_OPTIONS,
- sh_node_mapping_in, sh_node_mapping_out);
+ node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_mapping_in, sh_node_mapping_out);
node_type_size(&ntype, 240, 160, 320);
node_type_init(&ntype, node_shader_init_mapping);
node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_material.c b/source/blender/nodes/shader/nodes/node_shader_material.c
index f78dd9ec727..21fb4db115b 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_material.c
+++ b/source/blender/nodes/shader/nodes/node_shader_material.c
@@ -27,54 +27,54 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_material.c
+/** \file blender/nodes/shader/nodes/node_shader_material.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** MATERIAL ******************** */
-static bNodeSocketType sh_node_material_in[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_material_in[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_material_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_material_out[]= {
+ { SOCK_RGBA, 0, "Color"},
+ { SOCK_FLOAT, 0, "Alpha"},
+ { SOCK_VECTOR, 0, "Normal"},
{ -1, 0, "" }
};
/* **************** EXTENDED MATERIAL ******************** */
-static bNodeSocketType sh_node_material_ext_in[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_RGBA, 1, "Mirror", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Ambient", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Emit", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "SpecTra", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Ray Mirror", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Translucency", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_material_ext_in[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_RGBA, 1, "Spec", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Refl", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_DIRECTION},
+ { SOCK_RGBA, 1, "Mirror", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Ambient", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_FLOAT, 1, "Emit", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED},
+ { SOCK_FLOAT, 1, "SpecTra", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_FLOAT, 1, "Ray Mirror", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
+ { SOCK_FLOAT, 1, "Alpha", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED},
+ { SOCK_FLOAT, 1, "Translucency", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_material_ext_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_RGBA, 0, "Diffuse", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 0, "Spec", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 0, "AO", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_material_ext_out[]= {
+ { SOCK_RGBA, 0, "Color"},
+ { SOCK_FLOAT, 0, "Alpha"},
+ { SOCK_VECTOR, 0, "Normal"},
+ { SOCK_RGBA, 0, "Diffuse"},
+ { SOCK_RGBA, 0, "Spec"},
+ { SOCK_RGBA, 0, "AO"},
{ -1, 0, "" }
};
@@ -112,7 +112,7 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in,
nodestack_get_vec(&shi->specr, SOCK_VECTOR, in[MAT_IN_SPEC]);
if(hasinput[MAT_IN_REFL])
- nodestack_get_vec(&shi->refl, SOCK_VALUE, in[MAT_IN_REFL]);
+ nodestack_get_vec(&shi->refl, SOCK_FLOAT, in[MAT_IN_REFL]);
/* retrieve normal */
if(hasinput[MAT_IN_NORMAL]) {
@@ -120,30 +120,28 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in,
normalize_v3(shi->vn);
}
else
- VECCOPY(shi->vn, shi->vno);
+ copy_v3_v3(shi->vn, shi->vno);
/* custom option to flip normal */
if(node->custom1 & SH_NODE_MAT_NEG) {
- shi->vn[0]= -shi->vn[0];
- shi->vn[1]= -shi->vn[1];
- shi->vn[2]= -shi->vn[2];
+ negate_v3(shi->vn);
}
if (node->type == SH_NODE_MATERIAL_EXT) {
if(hasinput[MAT_IN_MIR])
nodestack_get_vec(&shi->mirr, SOCK_VECTOR, in[MAT_IN_MIR]);
if(hasinput[MAT_IN_AMB])
- nodestack_get_vec(&shi->amb, SOCK_VALUE, in[MAT_IN_AMB]);
+ nodestack_get_vec(&shi->amb, SOCK_FLOAT, in[MAT_IN_AMB]);
if(hasinput[MAT_IN_EMIT])
- nodestack_get_vec(&shi->emit, SOCK_VALUE, in[MAT_IN_EMIT]);
+ nodestack_get_vec(&shi->emit, SOCK_FLOAT, in[MAT_IN_EMIT]);
if(hasinput[MAT_IN_SPECTRA])
- nodestack_get_vec(&shi->spectra, SOCK_VALUE, in[MAT_IN_SPECTRA]);
+ nodestack_get_vec(&shi->spectra, SOCK_FLOAT, in[MAT_IN_SPECTRA]);
if(hasinput[MAT_IN_RAY_MIRROR])
- nodestack_get_vec(&shi->ray_mirror, SOCK_VALUE, in[MAT_IN_RAY_MIRROR]);
+ nodestack_get_vec(&shi->ray_mirror, SOCK_FLOAT, in[MAT_IN_RAY_MIRROR]);
if(hasinput[MAT_IN_ALPHA])
- nodestack_get_vec(&shi->alpha, SOCK_VALUE, in[MAT_IN_ALPHA]);
+ nodestack_get_vec(&shi->alpha, SOCK_FLOAT, in[MAT_IN_ALPHA]);
if(hasinput[MAT_IN_TRANSLUCENCY])
- nodestack_get_vec(&shi->translucency, SOCK_VALUE, in[MAT_IN_TRANSLUCENCY]);
+ nodestack_get_vec(&shi->translucency, SOCK_FLOAT, in[MAT_IN_TRANSLUCENCY]);
}
shi->nodes= 1; /* temp hack to prevent trashadow recursion */
@@ -204,7 +202,7 @@ static void node_shader_exec_material(void *data, bNode *node, bNodeStack **in,
}
-static void node_shader_init_material(bNode* node)
+static void node_shader_init_material(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->custom1= SH_NODE_MAT_DIFF|SH_NODE_MAT_SPEC;
}
@@ -308,8 +306,8 @@ void register_node_type_sh_material(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MATERIAL, "Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW,
- sh_node_material_in, sh_node_material_out);
+ node_type_base(&ntype, SH_NODE_MATERIAL, "Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_socket_templates(&ntype, sh_node_material_in, sh_node_material_out);
node_type_size(&ntype, 120, 80, 240);
node_type_init(&ntype, node_shader_init_material);
node_type_exec(&ntype, node_shader_exec_material);
@@ -323,8 +321,8 @@ void register_node_type_sh_material_ext(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MATERIAL_EXT, "Extended Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW,
- sh_node_material_ext_in, sh_node_material_ext_out);
+ node_type_base(&ntype, SH_NODE_MATERIAL_EXT, "Extended Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_socket_templates(&ntype, sh_node_material_ext_in, sh_node_material_ext_out);
node_type_size(&ntype, 120, 80, 240);
node_type_init(&ntype, node_shader_init_material);
node_type_exec(&ntype, node_shader_exec_material);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c
index dd0a564dc4b..592779d6803 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_math.c
+++ b/source/blender/nodes/shader/nodes/node_shader_math.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_math.c
+/** \file blender/nodes/shader/nodes/node_shader_math.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** SCALAR MATH ******************** */
-static bNodeSocketType sh_node_math_in[]= {
- { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f},
- { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f},
+static bNodeSocketTemplate sh_node_math_in[]= {
+ { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_math_out[]= {
- { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_math_out[]= {
+ { SOCK_FLOAT, 0, "Value"},
{ -1, 0, "" }
};
@@ -242,8 +242,8 @@ void register_node_type_sh_math(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- sh_node_math_in, sh_node_math_out);
+ node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_math_in, sh_node_math_out);
node_type_size(&ntype, 120, 110, 160);
node_type_label(&ntype, node_math_label);
node_type_storage(&ntype, "node_math", NULL, NULL);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
index 8b3033a98ca..a9e4f2129be 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_mixRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_mixRgb.c
+/** \file blender/nodes/shader/nodes/node_shader_mixRgb.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** MIX RGB ******************** */
-static bNodeSocketType sh_node_mix_rgb_in[]= {
- { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Color1", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA, 1, "Color2", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_mix_rgb_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 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},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_mix_rgb_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_mix_rgb_out[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -54,7 +54,7 @@ static void node_shader_exec_mix_rgb(void *UNUSED(data), bNode *node, bNodeStack
float fac;
float vec[3];
- nodestack_get_vec(&fac, SOCK_VALUE, in[0]);
+ nodestack_get_vec(&fac, SOCK_FLOAT, in[0]);
CLAMP(fac, 0.0f, 1.0f);
nodestack_get_vec(col, SOCK_VECTOR, in[1]);
@@ -79,8 +79,8 @@ void register_node_type_sh_mix_rgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- sh_node_mix_rgb_in, sh_node_mix_rgb_out);
+ node_type_base(&ntype, SH_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_mix_rgb_in, sh_node_mix_rgb_out);
node_type_size(&ntype, 100, 60, 150);
node_type_label(&ntype, node_blend_label);
node_type_exec(&ntype, node_shader_exec_mix_rgb);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_normal.c b/source/blender/nodes/shader/nodes/node_shader_normal.c
index a4e39935cea..1ce7c61c593 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_normal.c
+++ b/source/blender/nodes/shader/nodes/node_shader_normal.c
@@ -27,25 +27,36 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_normal.c
+/** \file blender/nodes/shader/nodes/node_shader_normal.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** NORMAL ******************** */
-static bNodeSocketType sh_node_normal_in[]= {
- { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_normal_in[]= {
+ { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_normal_out[]= {
- { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
- { SOCK_VALUE, 0, "Dot", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_normal_out[]= {
+ { SOCK_VECTOR, 0, "Normal"},
+ { SOCK_FLOAT, 0, "Dot"},
{ -1, 0, "" }
};
+static void node_shader_init_normal(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
+{
+ bNodeSocket *sock= node->outputs.first;
+ bNodeSocketValueVector *dval= (bNodeSocketValueVector*)sock->default_value;
+
+ /* output value is used for normal vector */
+ dval->value[0] = 0.0f;
+ dval->value[1] = 0.0f;
+ dval->value[2] = 1.0f;
+}
+
/* generates normal, does dot product */
static void node_shader_exec_normal(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
{
@@ -57,7 +68,7 @@ static void node_shader_exec_normal(void *UNUSED(data), bNode *node, bNodeStack
nodestack_get_vec(vec, SOCK_VECTOR, in[0]);
- VECCOPY(out[0]->vec, sock->ns.vec);
+ VECCOPY(out[0]->vec, ((bNodeSocketValueVector*)sock->default_value)->value);
/* render normals point inside... the widget points outside */
out[1]->vec[0]= -INPR(out[0]->vec, vec);
}
@@ -65,7 +76,7 @@ static void node_shader_exec_normal(void *UNUSED(data), bNode *node, bNodeStack
static int gpu_shader_normal(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
{
bNodeSocket *sock= node->outputs.first;
- GPUNodeLink *vec = GPU_uniform(sock->ns.vec);
+ GPUNodeLink *vec = GPU_uniform(((bNodeSocketValueVector*)sock->default_value)->value);
return GPU_stack_link(mat, "normal", in, out, vec);
}
@@ -74,8 +85,9 @@ void register_node_type_sh_normal(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS,
- sh_node_normal_in, sh_node_normal_out);
+ node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_normal_in, sh_node_normal_out);
+ node_type_init(&ntype, node_shader_init_normal);
node_type_exec(&ntype, node_shader_exec_normal);
node_type_gpu(&ntype, gpu_shader_normal);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_output.c b/source/blender/nodes/shader/nodes/node_shader_output.c
index e42caabff34..94990bd9cf1 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_output.c
+++ b/source/blender/nodes/shader/nodes/node_shader_output.c
@@ -27,17 +27,17 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_output.c
+/** \file blender/nodes/shader/nodes/node_shader_output.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** OUTPUT ******************** */
-static bNodeSocketType sh_node_output_in[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_output_in[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
@@ -49,7 +49,7 @@ static void node_shader_exec_output(void *data, bNode *node, bNodeStack **in, bN
/* stack order input sockets: col, alpha, normal */
nodestack_get_vec(col, SOCK_VECTOR, in[0]);
- nodestack_get_vec(col+3, SOCK_VALUE, in[1]);
+ nodestack_get_vec(col+3, SOCK_FLOAT, in[1]);
if(shi->do_preview) {
nodeAddToPreview(node, col, shi->xs, shi->ys, shi->do_manage);
@@ -84,8 +84,8 @@ void register_node_type_sh_output(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW,
- sh_node_output_in, NULL);
+ node_type_base(&ntype, SH_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+ node_type_socket_templates(&ntype, sh_node_output_in, NULL);
node_type_size(&ntype, 80, 60, 200);
node_type_exec(&ntype, node_shader_exec_output);
node_type_gpu(&ntype, gpu_shader_output);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c b/source/blender/nodes/shader/nodes/node_shader_rgb.c
index 3d7f401b055..d612e5c228f 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_rgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_rgb.c
@@ -27,30 +27,43 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_rgb.c
+/** \file blender/nodes/shader/nodes/node_shader_rgb.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** RGB ******************** */
-static bNodeSocketType sh_node_rgb_out[]= {
- { SOCK_RGBA, 0, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_rgb_out[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
+static void node_shader_init_rgb(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
+{
+ bNodeSocket *sock= node->outputs.first;
+ bNodeSocketValueRGBA *dval= (bNodeSocketValueRGBA*)sock->default_value;
+ /* uses the default value of the output socket, must be initialized here */
+ dval->value[0] = 0.5f;
+ dval->value[1] = 0.5f;
+ dval->value[2] = 0.5f;
+ dval->value[3] = 1.0f;
+}
+
static void node_shader_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
{
bNodeSocket *sock= node->outputs.first;
+ float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
- VECCOPY(out[0]->vec, sock->ns.vec);
+ VECCOPY(out[0]->vec, col);
}
static int gpu_shader_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
{
bNodeSocket *sock= node->outputs.first;
- GPUNodeLink *vec = GPU_uniform(sock->ns.vec);
+ float *col= ((bNodeSocketValueRGBA*)sock->default_value)->value;
+ GPUNodeLink *vec = GPU_uniform(col);
return GPU_stack_link(mat, "set_rgba", in, out, vec);
}
@@ -59,8 +72,9 @@ void register_node_type_sh_rgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS,
- NULL, sh_node_rgb_out);
+ node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, sh_node_rgb_out);
+ node_type_init(&ntype, node_shader_init_rgb);
node_type_size(&ntype, 140, 80, 140);
node_type_exec(&ntype, node_shader_exec_rgb);
node_type_gpu(&ntype, gpu_shader_rgb);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c
index e4fa0b02521..15a8a4952fb 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c
+++ b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c
@@ -1,5 +1,5 @@
/*
- *
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -27,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_sepcombRGB.c
+/** \file blender/nodes/shader/nodes/node_shader_sepcombRGB.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** SEPARATE RGBA ******************** */
-static bNodeSocketType sh_node_seprgb_in[]= {
- { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_seprgb_in[]= {
+ { SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_seprgb_out[]= {
- { SOCK_VALUE, 0, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_seprgb_out[]= {
+ { SOCK_FLOAT, 0, "R"},
+ { SOCK_FLOAT, 0, "G"},
+ { SOCK_FLOAT, 0, "B"},
{ -1, 0, "" }
};
@@ -62,8 +62,8 @@ void register_node_type_sh_seprgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0,
- sh_node_seprgb_in, sh_node_seprgb_out);
+ node_type_base(&ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0);
+ node_type_socket_templates(&ntype, sh_node_seprgb_in, sh_node_seprgb_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_shader_exec_seprgb);
node_type_gpu(&ntype, gpu_shader_seprgb);
@@ -74,14 +74,14 @@ void register_node_type_sh_seprgb(ListBase *lb)
/* **************** COMBINE RGB ******************** */
-static bNodeSocketType sh_node_combrgb_in[]= {
- { SOCK_VALUE, 1, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_combrgb_in[]= {
+ { SOCK_FLOAT, 1, "R", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED},
+ { SOCK_FLOAT, 1, "G", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED},
+ { SOCK_FLOAT, 1, "B", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_UNSIGNED},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_combrgb_out[]= {
- { SOCK_RGBA, 0, "Image", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_combrgb_out[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -101,8 +101,8 @@ void register_node_type_sh_combrgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- sh_node_combrgb_in, sh_node_combrgb_out);
+ node_type_base(&ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_combrgb_in, sh_node_combrgb_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_shader_exec_combrgb);
node_type_gpu(&ntype, gpu_shader_combrgb);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c b/source/blender/nodes/shader/nodes/node_shader_squeeze.c
index 80693ff08f0..b9eb116b866 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_squeeze.c
+++ b/source/blender/nodes/shader/nodes/node_shader_squeeze.c
@@ -27,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_squeeze.c
+/** \file blender/nodes/shader/nodes/node_shader_squeeze.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** VALUE SQUEEZE ******************** */
-static bNodeSocketType sh_node_squeeze_in[]= {
- { SOCK_VALUE, 1, "Value", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f},
- { SOCK_VALUE, 1, "Width", 1.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f},
- { SOCK_VALUE, 1, "Center", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f},
+static bNodeSocketTemplate sh_node_squeeze_in[]= {
+ { SOCK_FLOAT, 1, "Value", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Width", 1.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Center", 0.0f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_squeeze_out[]= {
- { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_squeeze_out[]= {
+ { SOCK_FLOAT, 0, "Value"},
{ -1, 0, "" }
};
@@ -52,9 +52,9 @@ bNodeStack **out)
{
float vec[3];
- nodestack_get_vec(vec, SOCK_VALUE, in[0]);
- nodestack_get_vec(vec+1, SOCK_VALUE, in[1]);
- nodestack_get_vec(vec+2, SOCK_VALUE, in[2]);
+ nodestack_get_vec(vec, SOCK_FLOAT, in[0]);
+ nodestack_get_vec(vec+1, SOCK_FLOAT, in[1]);
+ nodestack_get_vec(vec+2, SOCK_FLOAT, in[2]);
out[0]->vec[0] = 1.0f / (1.0f + pow(2.71828183,-((vec[0]-vec[2])*vec[1]))) ;
}
@@ -68,8 +68,8 @@ void register_node_type_sh_squeeze(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- sh_node_squeeze_in, sh_node_squeeze_out);
+ node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_squeeze_in, sh_node_squeeze_out);
node_type_size(&ntype, 120, 110, 160);
node_type_storage(&ntype, "node_squeeze", NULL, NULL);
node_type_exec(&ntype, node_shader_exec_squeeze);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_texture.c b/source/blender/nodes/shader/nodes/node_shader_texture.c
index 249e4eeca5d..09716820800 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_texture.c
+++ b/source/blender/nodes/shader/nodes/node_shader_texture.c
@@ -27,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_texture.c
+/** \file blender/nodes/shader/nodes/node_shader_texture.c
* \ingroup shdnodes
*/
#include "DNA_texture_types.h"
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** TEXTURE ******************** */
-static bNodeSocketType sh_node_texture_in[]= {
- { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f}, /* no limit */
+static bNodeSocketTemplate sh_node_texture_in[]= {
+ { SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE}, /* no limit */
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_texture_out[]= {
- { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_RGBA , 0, "Color", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate sh_node_texture_out[]= {
+ { SOCK_FLOAT, 0, "Value"},
+ { SOCK_RGBA , 0, "Color"},
+ { SOCK_VECTOR, 0, "Normal"},
{ -1, 0, "" }
};
@@ -137,8 +137,8 @@ void register_node_type_sh_texture(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW,
- sh_node_texture_in, sh_node_texture_out);
+ node_type_base(&ntype, SH_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_socket_templates(&ntype, sh_node_texture_in, sh_node_texture_out);
node_type_size(&ntype, 120, 80, 240);
node_type_exec(&ntype, node_shader_exec_texture);
node_type_gpu(&ntype, gpu_shader_texture);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
index 86f832c12ee..5c1d3096a6e 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_valToRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_valToRgb.c
+/** \file blender/nodes/shader/nodes/node_shader_valToRgb.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** VALTORGB ******************** */
-static bNodeSocketType sh_node_valtorgb_in[]= {
- { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_valtorgb_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_valtorgb_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_valtorgb_out[]= {
+ { SOCK_RGBA, 0, "Color"},
+ { SOCK_FLOAT, 0, "Alpha"},
{ -1, 0, "" }
};
@@ -52,14 +52,14 @@ static void node_shader_exec_valtorgb(void *UNUSED(data), bNode *node, bNodeStac
if(node->storage) {
float fac;
- nodestack_get_vec(&fac, SOCK_VALUE, in[0]);
+ nodestack_get_vec(&fac, SOCK_FLOAT, in[0]);
do_colorband(node->storage, fac, out[0]->vec);
out[1]->vec[0]= out[0]->vec[3];
}
}
-static void node_shader_init_valtorgb(bNode *node)
+static void node_shader_init_valtorgb(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= add_colorband(1);
}
@@ -77,8 +77,8 @@ void register_node_type_sh_valtorgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- sh_node_valtorgb_in, sh_node_valtorgb_out);
+ node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_valtorgb_in, sh_node_valtorgb_out);
node_type_size(&ntype, 240, 200, 300);
node_type_init(&ntype, node_shader_init_valtorgb);
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
@@ -90,12 +90,12 @@ void register_node_type_sh_valtorgb(ListBase *lb)
/* **************** RGBTOBW ******************** */
-static bNodeSocketType sh_node_rgbtobw_in[]= {
+static bNodeSocketTemplate sh_node_rgbtobw_in[]= {
{ SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_rgbtobw_out[]= {
- { SOCK_VALUE, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_rgbtobw_out[]= {
+ { SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -117,8 +117,8 @@ void register_node_type_sh_rgbtobw(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0,
- sh_node_rgbtobw_in, sh_node_rgbtobw_out);
+ node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
+ node_type_socket_templates(&ntype, sh_node_rgbtobw_in, sh_node_rgbtobw_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_shader_exec_rgbtobw);
node_type_gpu(&ntype, gpu_shader_rgbtobw);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_value.c b/source/blender/nodes/shader/nodes/node_shader_value.c
index 29a75bbf36d..119a3664308 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_value.c
+++ b/source/blender/nodes/shader/nodes/node_shader_value.c
@@ -27,30 +27,43 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_value.c
+/** \file blender/nodes/shader/nodes/node_shader_value.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** VALUE ******************** */
-static bNodeSocketType sh_node_value_out[]= {
- { SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f},
+static bNodeSocketTemplate sh_node_value_out[]= {
+ /* XXX value nodes use the output sockets for buttons, so we need explicit limits here! */
+ { SOCK_FLOAT, 0, "Value", 0.0f, 0.0f, 0.0f, 0.0f, -FLT_MAX, FLT_MAX},
{ -1, 0, "" }
};
+static void node_shader_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
+{
+ bNodeSocket *sock= node->outputs.first;
+ bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value;
+ /* uses the default value of the output socket, must be initialized here */
+ dval->value = 0.5f;
+ dval->min = -FLT_MAX;
+ dval->max = FLT_MAX;
+}
+
static void node_shader_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
{
bNodeSocket *sock= node->outputs.first;
+ float val= ((bNodeSocketValueFloat*)sock->default_value)->value;
- out[0]->vec[0]= sock->ns.vec[0];
+ out[0]->vec[0]= val;
}
static int gpu_shader_value(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
{
bNodeSocket *sock= node->outputs.first;
- GPUNodeLink *vec = GPU_uniform(sock->ns.vec);
+ float *val= &((bNodeSocketValueFloat*)sock->default_value)->value;
+ GPUNodeLink *vec = GPU_uniform(val);
return GPU_stack_link(mat, "set_value", in, out, vec);
}
@@ -59,8 +72,9 @@ void register_node_type_sh_value(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS,
- NULL, sh_node_value_out);
+ node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, sh_node_value_out);
+ node_type_init(&ntype, node_shader_init_value);
node_type_size(&ntype, 80, 50, 120);
node_type_exec(&ntype, node_shader_exec_value);
node_type_gpu(&ntype, gpu_shader_value);
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c
index 9979e488a71..ca31d879e3e 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c
+++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c
@@ -27,25 +27,25 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/SHD_nodes/SHD_vectMath.c
+/** \file blender/nodes/shader/nodes/node_shader_vectMath.c
* \ingroup shdnodes
*/
-#include "../SHD_util.h"
+#include "node_shader_util.h"
/* **************** VECTOR MATH ******************** */
-static bNodeSocketType sh_node_vect_math_in[]= {
- { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_vect_math_in[]= {
+ { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f, PROP_NONE},
+ { SOCK_VECTOR, 1, "Vector", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType sh_node_vect_math_out[]= {
- { SOCK_VECTOR, 0, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate sh_node_vect_math_out[]= {
+ { SOCK_VECTOR, 0, "Vector"},
+ { SOCK_FLOAT, 0, "Value"},
{ -1, 0, "" }
};
@@ -136,8 +136,8 @@ void register_node_type_sh_vect_math(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VECT_MATH, "Vector Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- sh_node_vect_math_in, sh_node_vect_math_out);
+ node_type_base(&ntype, SH_NODE_VECT_MATH, "Vector Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, sh_node_vect_math_in, sh_node_vect_math_out);
node_type_size(&ntype, 80, 75, 140);
node_type_label(&ntype, node_vect_math_label);
node_type_storage(&ntype, "node_vect_math", NULL, NULL);
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c
new file mode 100644
index 00000000000..603aa7ceb77
--- /dev/null
+++ b/source/blender/nodes/texture/node_texture_tree.c
@@ -0,0 +1,251 @@
+/**
+ * $Id$
+ *
+ * ***** 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) 2007 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/texture/node_texture_tree.c
+ * \ingroup nodes
+ */
+
+
+#include <string.h>
+
+#include "DNA_texture_types.h"
+#include "DNA_node_types.h"
+
+#include "BLI_listbase.h"
+#include "BLI_threads.h"
+#include "BLI_utildefines.h"
+
+#include "BKE_global.h"
+#include "BKE_main.h"
+#include "BKE_node.h"
+
+#include "node_exec.h"
+#include "node_util.h"
+#include "NOD_texture.h"
+#include "node_texture_util.h"
+
+#include "RE_pipeline.h"
+#include "RE_shader_ext.h"
+
+
+static void foreach_nodetree(Main *main, void *calldata, bNodeTreeCallback func)
+{
+ Tex *tx;
+ for(tx= main->tex.first; tx; tx= tx->id.next) {
+ if(tx->nodetree) {
+ func(calldata, &tx->id, tx->nodetree);
+ }
+ }
+}
+
+static void local_sync(bNodeTree *localtree, bNodeTree *ntree)
+{
+ bNode *lnode;
+
+ /* copy over contents of previews */
+ for(lnode= localtree->nodes.first; lnode; lnode= lnode->next) {
+ if(ntreeNodeExists(ntree, lnode->new_node)) {
+ bNode *node= lnode->new_node;
+
+ if(node->preview && node->preview->rect) {
+ if(lnode->preview && lnode->preview->rect) {
+ int xsize= node->preview->xsize;
+ int ysize= node->preview->ysize;
+ memcpy(node->preview->rect, lnode->preview->rect, 4*xsize + xsize*ysize*sizeof(char)*4);
+ }
+ }
+ }
+ }
+}
+
+bNodeTreeType ntreeType_Texture = {
+ /* type */ NTREE_TEXTURE,
+ /* id_name */ "NTTexture Nodetree",
+
+ /* node_types */ { NULL, NULL },
+
+ /* free_cache */ NULL,
+ /* free_node_cache */ NULL,
+ /* foreach_nodetree */ foreach_nodetree,
+ /* localize */ NULL,
+ /* local_sync */ local_sync,
+ /* local_merge */ NULL,
+ /* update */ NULL,
+ /* update_node */ NULL
+};
+
+int ntreeTexTagAnimated(bNodeTree *ntree)
+{
+ bNode *node;
+
+ if(ntree==NULL) return 0;
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->type==TEX_NODE_CURVE_TIME) {
+ NodeTagChanged(ntree, node);
+ return 1;
+ }
+ else if(node->type==NODE_GROUP) {
+ if( ntreeTexTagAnimated((bNodeTree *)node->id) ) {
+ return 1;
+ }
+ }
+ }
+
+ return 0;
+}
+
+/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes.
+ * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees.
+ */
+bNodeTreeExec *ntreeTexBeginExecTree(bNodeTree *ntree, int use_tree_data)
+{
+ bNodeTreeExec *exec;
+ bNode *node;
+
+ if (use_tree_data) {
+ /* XXX hack: prevent exec data from being generated twice.
+ * this should be handled by the renderer!
+ */
+ if (ntree->execdata)
+ return ntree->execdata;
+ }
+
+ /* common base initialization */
+ exec = ntree_exec_begin(ntree);
+
+ /* allocate the thread stack listbase array */
+ exec->threadstack= MEM_callocN(BLENDER_MAX_THREADS*sizeof(ListBase), "thread stack array");
+
+ for(node= exec->nodetree->nodes.first; node; node= node->next)
+ node->need_exec= 1;
+
+ if (use_tree_data) {
+ /* XXX this should not be necessary, but is still used for cmp/sha/tex nodes,
+ * which only store the ntree pointer. Should be fixed at some point!
+ */
+ ntree->execdata = exec;
+ }
+
+ return exec;
+}
+
+/* free texture delegates */
+static void tex_free_delegates(bNodeTreeExec *exec)
+{
+ bNodeThreadStack *nts;
+ bNodeStack *ns;
+ int th, a;
+
+ for(th=0; th<BLENDER_MAX_THREADS; th++)
+ for(nts=exec->threadstack[th].first; nts; nts=nts->next)
+ for(ns= nts->stack, a=0; a<exec->stacksize; a++, ns++)
+ if(ns->data && !ns->is_copy)
+ MEM_freeN(ns->data);
+}
+
+/* XXX Group nodes must set use_tree_data to false, since their trees can be shared by multiple nodes.
+ * If use_tree_data is true, the ntree->execdata pointer is checked to avoid multiple execution of top-level trees.
+ */
+void ntreeTexEndExecTree(bNodeTreeExec *exec, int use_tree_data)
+{
+ if(exec) {
+ bNodeTree *ntree= exec->nodetree;
+ bNodeThreadStack *nts;
+ int a;
+
+ if(exec->threadstack) {
+ tex_free_delegates(exec);
+
+ for(a=0; a<BLENDER_MAX_THREADS; a++) {
+ for(nts=exec->threadstack[a].first; nts; nts=nts->next)
+ if (nts->stack) MEM_freeN(nts->stack);
+ BLI_freelistN(&exec->threadstack[a]);
+ }
+
+ MEM_freeN(exec->threadstack);
+ exec->threadstack= NULL;
+ }
+
+ ntree_exec_end(exec);
+
+ if (use_tree_data) {
+ /* XXX clear nodetree backpointer to exec data, same problem as noted in ntreeBeginExecTree */
+ ntree->execdata = NULL;
+ }
+ }
+}
+
+int ntreeTexExecTree(
+ bNodeTree *nodes,
+ TexResult *texres,
+ float *co,
+ float *dxt, float *dyt,
+ int osatex,
+ short thread,
+ Tex *UNUSED(tex),
+ short which_output,
+ int cfra,
+ int preview,
+ ShadeInput *shi,
+ MTex *mtex
+){
+ TexCallData data;
+ float *nor= texres->nor;
+ int retval = TEX_INT;
+ bNodeThreadStack *nts = NULL;
+ bNodeTreeExec *exec= nodes->execdata;
+
+ data.co = co;
+ data.dxt = dxt;
+ data.dyt = dyt;
+ data.osatex = osatex;
+ data.target = texres;
+ data.do_preview = preview;
+ data.thread = thread;
+ data.which_output = which_output;
+ data.cfra= cfra;
+ data.mtex= mtex;
+ data.shi= shi;
+
+ if (!exec)
+ exec = ntreeTexBeginExecTree(nodes, 1);
+
+ nts= ntreeGetThreadStack(exec, thread);
+ ntreeExecThreadNodes(exec, nts, &data, thread);
+ ntreeReleaseThreadStack(nts);
+
+ if(texres->nor) retval |= TEX_NOR;
+ retval |= TEX_RGB;
+ /* confusing stuff; the texture output node sets this to NULL to indicate no normal socket was set
+ however, the texture code checks this for other reasons (namely, a normal is required for material) */
+ texres->nor= nor;
+
+ return retval;
+}
diff --git a/source/blender/nodes/intern/TEX_util.c b/source/blender/nodes/texture/node_texture_util.c
index b5e27ca2ccb..7b8f42aa925 100644
--- a/source/blender/nodes/intern/TEX_util.c
+++ b/source/blender/nodes/texture/node_texture_util.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,7 +27,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_util.c
+/** \file blender/nodes/texture/node_texture_util.c
* \ingroup nodes
*/
@@ -48,11 +49,11 @@
*/
#include <assert.h>
-#include "TEX_util.h"
+#include "node_texture_util.h"
#define PREV_RES 128 /* default preview resolution */
-void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, short thread)
+static void tex_call_delegate(TexDelegate *dg, float *out, TexParams *params, short thread)
{
if(dg->node->need_exec) {
dg->fn(out, params, dg->node, dg->in, thread);
@@ -68,7 +69,7 @@ static void tex_input(float *out, int sz, bNodeStack *in, TexParams *params, sho
if(dg) {
tex_call_delegate(dg, in->vec, params, thread);
- if(in->hasoutput && in->sockettype == SOCK_VALUE)
+ if(in->hasoutput && in->sockettype == SOCK_FLOAT)
in->vec[1] = in->vec[2] = in->vec[0];
}
memcpy(out, in->vec, sz * sizeof(float));
@@ -83,7 +84,7 @@ void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread)
{
tex_input(out, 4, in, params, thread);
- if(in->hasoutput && in->sockettype == SOCK_VALUE)
+ if(in->hasoutput && in->sockettype == SOCK_FLOAT)
{
out[1] = out[2] = out[0];
out[3] = 1;
@@ -170,45 +171,3 @@ void ntreeTexCheckCyclics(struct bNodeTree *ntree)
}
}
-
-int ntreeTexExecTree(
- bNodeTree *nodes,
- TexResult *texres,
- float *co,
- float *dxt, float *dyt,
- int osatex,
- short thread,
- Tex *UNUSED(tex),
- short which_output,
- int cfra,
- int preview,
- ShadeInput *shi,
- MTex *mtex
-){
- TexCallData data;
- float *nor= texres->nor;
- int retval = TEX_INT;
-
- data.co = co;
- data.dxt = dxt;
- data.dyt = dyt;
- data.osatex = osatex;
- data.target = texres;
- data.do_preview = preview;
- data.thread = thread;
- data.which_output = which_output;
- data.cfra= cfra;
- data.mtex= mtex;
- data.shi= shi;
-
- ntreeExecTree(nodes, &data, thread);
-
- if(texres->nor) retval |= TEX_NOR;
- retval |= TEX_RGB;
- /* confusing stuff; the texture output node sets this to NULL to indicate no normal socket was set
- however, the texture code checks this for other reasons (namely, a normal is required for material) */
- texres->nor= nor;
-
- return retval;
-}
-
diff --git a/source/blender/nodes/intern/TEX_util.h b/source/blender/nodes/texture/node_texture_util.h
index 0875bcd52bf..ccaf5df9897 100644
--- a/source/blender/nodes/intern/TEX_util.h
+++ b/source/blender/nodes/texture/node_texture_util.h
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,13 +27,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_util.h
+/** \file blender/nodes/texture/node_texture_util.h
* \ingroup nodes
*/
-#ifndef TEX_NODE_UTIL_H_
-#define TEX_NODE_UTIL_H_
+#ifndef NODE_TEXTURE_UTIL_H_
+#define NODE_TEXTURE_UTIL_H_
#include <math.h>
#include <string.h>
@@ -60,7 +61,6 @@
#include "BKE_library.h"
-#include "../SHD_node.h"
#include "node_util.h"
#include "BLI_math.h"
@@ -112,8 +112,6 @@ typedef struct TexDelegate {
int type;
} TexDelegate;
-void tex_call_delegate(TexDelegate*, float *out, TexParams *params, short thread);
-
void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread);
void tex_input_vec(float *out, bNodeStack *in, TexParams *params, short thread);
float tex_input_value(bNodeStack *in, TexParams *params, short thread);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_at.c b/source/blender/nodes/texture/nodes/node_texture_at.c
index d5980b786b0..34993a93092 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_at.c
+++ b/source/blender/nodes/texture/nodes/node_texture_at.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_at.c
+/** \file blender/nodes/texture/nodes/node_texture_at.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Texture", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_VECTOR, 1, "Coordinates", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Texture", 0.0f, 0.0f, 0.0f, 1.0f },
+ { SOCK_VECTOR, 1, "Coordinates", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Texture", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Texture" },
{ -1, 0, "" }
};
@@ -63,8 +64,8 @@ void register_node_type_tex_at(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_AT, "At", NODE_CLASS_DISTORT, 0,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_AT, "At", NODE_CLASS_DISTORT, 0);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c
index 0eb982496a9..a9a82fe4d65 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_bricks.c
+++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,32 +27,33 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_bricks.c
+/** \file blender/nodes/texture/nodes/node_texture_bricks.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
#include <math.h>
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Bricks 1", 0.596f, 0.282f, 0.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_RGBA, 1, "Bricks 2", 0.632f, 0.504f, 0.05f, 1.0f, 0.0f, 1.0f },
- { SOCK_RGBA, 1, "Mortar", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 1, "Thickness", 0.02f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 1, "Bias", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f },
- { SOCK_VALUE, 1, "Brick Width", 0.5f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f },
- { SOCK_VALUE, 1, "Row Height", 0.25f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Bricks 1", 0.596f, 0.282f, 0.0f, 1.0f },
+ { SOCK_RGBA, 1, "Bricks 2", 0.632f, 0.504f, 0.05f, 1.0f },
+ { SOCK_RGBA, 1, "Mortar", 0.0f, 0.0f, 0.0f, 1.0f },
+ { SOCK_FLOAT, 1, "Thickness", 0.02f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Bias", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
+ { SOCK_FLOAT, 1, "Brick Width", 0.5f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Row Height", 0.25f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
-static void init(bNode *node) {
+static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
+{
node->custom3 = 0.5; /* offset */
node->custom4 = 1.0; /* squash */
}
@@ -123,8 +125,8 @@ void register_node_type_tex_bricks(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 150, 60, 150);
node_type_init(&ntype, init);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_checker.c b/source/blender/nodes/texture/nodes/node_texture_checker.c
index c6c25ba1a8a..7762c9ef992 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_checker.c
+++ b/source/blender/nodes/texture/nodes/node_texture_checker.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_checker.c
+/** \file blender/nodes/texture/nodes/node_texture_checker.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
#include <math.h>
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color1", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_RGBA, 1, "Color2", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 1, "Size", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 100.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color1", 1.0f, 0.0f, 0.0f, 1.0f },
+ { SOCK_RGBA, 1, "Color2", 1.0f, 1.0f, 1.0f, 1.0f },
+ { SOCK_FLOAT, 1, "Size", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 100.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color" },
{ -1, 0, "" }
};
@@ -74,8 +75,8 @@ void register_node_type_tex_checker(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c
new file mode 100644
index 00000000000..1b46b830909
--- /dev/null
+++ b/source/blender/nodes/texture/nodes/node_texture_common.c
@@ -0,0 +1,271 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Campbell Barton, Alfredo de Greef, David Millan Escriva,
+ * Juho Vepsäläinen
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/texture/nodes/node_texture_common.c
+ * \ingroup texnodes
+ */
+
+
+#include "DNA_node_types.h"
+
+#include "BKE_node.h"
+
+#include "node_texture_util.h"
+#include "node_common.h"
+#include "node_exec.h"
+
+static void copy_stack(bNodeStack *to, bNodeStack *from)
+{
+ if (to != from) {
+ copy_v4_v4(to->vec, from->vec);
+ to->data = from->data;
+ to->datatype = from->datatype;
+
+ /* tag as copy to prevent freeing */
+ to->is_copy = 1;
+ }
+}
+
+/**** GROUP ****/
+
+static void *group_initexec(bNode *node)
+{
+ bNodeTree *ngroup= (bNodeTree*)node->id;
+ void *exec;
+
+ /* initialize the internal node tree execution */
+ exec = ntreeTexBeginExecTree(ngroup, 0);
+
+ return exec;
+}
+
+static void group_freeexec(bNode *UNUSED(node), void *nodedata)
+{
+ bNodeTreeExec*gexec= (bNodeTreeExec*)nodedata;
+
+ ntreeTexEndExecTree(gexec, 0);
+}
+
+/* Copy inputs to the internal stack.
+ * This is a shallow copy, no buffers are duplicated here!
+ */
+static void group_copy_inputs(bNode *node, bNodeStack **in, bNodeStack *gstack)
+{
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int a;
+ for (sock=node->inputs.first, a=0; sock; sock=sock->next, ++a) {
+ if (sock->groupsock) {
+ ns = node_get_socket_stack(gstack, sock->groupsock);
+ copy_stack(ns, in[a]);
+ }
+ }
+}
+
+/* Copy internal results to the external outputs.
+ */
+static void group_copy_outputs(bNode *node, bNodeStack **out, bNodeStack *gstack)
+{
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int a;
+ for (sock=node->outputs.first, a=0; sock; sock=sock->next, ++a) {
+ if (sock->groupsock) {
+ ns = node_get_socket_stack(gstack, sock->groupsock);
+ copy_stack(out[a], ns);
+ }
+ }
+}
+
+static void group_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ bNodeThreadStack *nts;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ nts = ntreeGetThreadStack(exec, thread);
+
+ group_copy_inputs(node, in, nts->stack);
+ ntreeExecThreadNodes(exec, nts, data, thread);
+ group_copy_outputs(node, out, nts->stack);
+
+ ntreeReleaseThreadStack(nts);
+}
+
+void register_node_type_tex_group(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_group_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_group_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+
+
+/**** FOR LOOP ****/
+
+#if 0 /* XXX loop nodes don't work nicely with current trees */
+static void forloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ bNodeThreadStack *nts;
+ int iterations= (int)in[0]->vec[0];
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int iteration;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ nts = ntreeGetThreadStack(exec, thread);
+
+ /* "Iteration" socket */
+ sock = exec->nodetree->inputs.first;
+ ns = node_get_socket_stack(nts->stack, sock);
+
+// group_copy_inputs(node, in, nts->stack);
+ for (iteration=0; iteration < iterations; ++iteration) {
+ /* first input contains current iteration counter */
+ ns->vec[0] = (float)iteration;
+ ns->vec[1]=ns->vec[2]=ns->vec[3] = 0.0f;
+
+// if (iteration > 0)
+// loop_init_iteration(exec->nodetree, nts->stack);
+// ntreeExecThreadNodes(exec, nts, data, thread);
+ }
+// loop_copy_outputs(node, in, out, exec->stack);
+
+ ntreeReleaseThreadStack(nts);
+}
+
+void register_node_type_tex_forloop(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_forloop_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_forloop_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_tree(&ntype, node_forloop_init_tree, node_loop_update_tree);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+#endif
+
+/**** WHILE LOOP ****/
+
+#if 0 /* XXX loop nodes don't work nicely with current trees */
+static void whileloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
+{
+ bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ bNodeThreadStack *nts;
+ int condition= (in[0]->vec[0] > 0.0f);
+ bNodeSocket *sock;
+ bNodeStack *ns;
+ int iteration;
+
+ /* 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.
+ */
+ {
+ bNode *inode;
+ for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
+ inode->need_exec = 1;
+ }
+
+ nts = ntreeGetThreadStack(exec, thread);
+
+ /* "Condition" socket */
+ sock = exec->nodetree->outputs.first;
+ ns = node_get_socket_stack(nts->stack, sock);
+
+ iteration = 0;
+// group_copy_inputs(node, in, nts->stack);
+ while (condition && iteration < node->custom1) {
+// if (iteration > 0)
+// loop_init_iteration(exec->nodetree, nts->stack);
+// ntreeExecThreadNodes(exec, nts, data, thread);
+
+ condition = (ns->vec[0] > 0.0f);
+ ++iteration;
+ }
+// loop_copy_outputs(node, in, out, exec->stack);
+
+ ntreeReleaseThreadStack(nts);
+}
+
+void register_node_type_tex_whileloop(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, NULL);
+ node_type_size(&ntype, 120, 60, 200);
+ node_type_label(&ntype, node_group_label);
+ node_type_init(&ntype, node_whileloop_init);
+ node_type_valid(&ntype, node_group_valid);
+ node_type_template(&ntype, node_whileloop_template);
+ node_type_update(&ntype, NULL, node_group_verify);
+ node_type_tree(&ntype, node_whileloop_init_tree, node_loop_update_tree);
+ node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
+ node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute);
+
+ nodeRegisterType(lb, &ntype);
+}
+#endif
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_compose.c b/source/blender/nodes/texture/nodes/node_texture_compose.c
index 6eae78ec3de..d224ae793e2 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_compose.c
+++ b/source/blender/nodes/texture/nodes/node_texture_compose.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_compose.c
+/** \file blender/nodes/texture/nodes/node_texture_compose.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType inputs[]= {
- { SOCK_VALUE, 1, "Red", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 1, "Green", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 1, "Blue", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_FLOAT, 1, "Red", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Green", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Blue", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color" },
{ -1, 0, "" }
};
@@ -62,8 +63,8 @@ void register_node_type_tex_compose(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_COMPOSE, "Compose RGBA", NODE_CLASS_OP_COLOR, 0,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_COMPOSE, "Compose RGBA", NODE_CLASS_OP_COLOR, 0);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_coord.c b/source/blender/nodes/texture/nodes/node_texture_coord.c
index 3c46971f0d4..2bfa2ff2314 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_coord.c
+++ b/source/blender/nodes/texture/nodes/node_texture_coord.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,16 +27,16 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_coord.c
+/** \file blender/nodes/texture/nodes/node_texture_coord.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType outputs[]= {
- { SOCK_VECTOR, 0, "Coordinates", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_VECTOR, 0, "Coordinates" },
{ -1, 0, "" }
};
@@ -55,8 +56,8 @@ void register_node_type_tex_coord(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT, NODE_OPTIONS,
- NULL, outputs);
+ node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, outputs);
node_type_size(&ntype, 120, 110, 160);
node_type_storage(&ntype, "node_coord", NULL, NULL);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c b/source/blender/nodes/texture/nodes/node_texture_curves.c
index b7af6c748ff..dd65f979bbe 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c
+++ b/source/blender/nodes/texture/nodes/node_texture_curves.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,19 +27,19 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_curves.c
+/** \file blender/nodes/texture/nodes/node_texture_curves.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
/* **************** CURVE Time ******************** */
/* custom1 = sfra, custom2 = efra */
-static bNodeSocketType time_outputs[]= {
- { SOCK_VALUE, 0, "Value", 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate time_outputs[]= {
+ { SOCK_FLOAT, 0, "Value" },
{ -1, 0, "" }
};
@@ -60,7 +61,7 @@ static void time_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out
}
-static void time_init(bNode* node)
+static void time_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->custom1= 1;
node->custom2= 250;
@@ -71,8 +72,8 @@ void register_node_type_tex_curve_time(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS,
- NULL, time_outputs);
+ node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, time_outputs);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, time_init);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
@@ -82,13 +83,13 @@ void register_node_type_tex_curve_time(ListBase *lb)
}
/* **************** CURVE RGB ******************** */
-static bNodeSocketType rgb_inputs[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate rgb_inputs[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType rgb_outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 1.0f, 1.0f, -1.0f, 1.0f},
+static bNodeSocketTemplate rgb_outputs[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -106,7 +107,7 @@ static void rgb_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &rgb_colorfn, data);
}
-static void rgb_init(bNode *node)
+static void rgb_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
}
@@ -115,8 +116,8 @@ void register_node_type_tex_curve_rgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- rgb_inputs, rgb_outputs);
+ node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, rgb_inputs, rgb_outputs);
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, rgb_init);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c b/source/blender/nodes/texture/nodes/node_texture_decompose.c
index f27d8c98716..016ee5498d8 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_decompose.c
+++ b/source/blender/nodes/texture/nodes/node_texture_decompose.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_decompose.c
+/** \file blender/nodes/texture/nodes/node_texture_decompose.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
#include <math.h>
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_VALUE, 0, "Red", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 0, "Green", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 0, "Blue", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 0, "Alpha", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_FLOAT, 0, "Red" },
+ { SOCK_FLOAT, 0, "Green" },
+ { SOCK_FLOAT, 0, "Blue" },
+ { SOCK_FLOAT, 0, "Alpha" },
{ -1, 0, "" }
};
@@ -83,8 +84,8 @@ void register_node_type_tex_decompose(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_DECOMPOSE, "Decompose RGBA", NODE_CLASS_OP_COLOR, 0,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_DECOMPOSE, "Decompose RGBA", NODE_CLASS_OP_COLOR, 0);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c
index b460844ba4a..ef3f701d8f3 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_distance.c
+++ b/source/blender/nodes/texture/nodes/node_texture_distance.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_distance.c
+/** \file blender/nodes/texture/nodes/node_texture_distance.c
* \ingroup texnodes
*/
#include <math.h>
#include "BLI_math.h"
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType inputs[]= {
- { SOCK_VECTOR, 1, "Coordinate 1", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f },
- { SOCK_VECTOR, 1, "Coordinate 2", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_VECTOR, 1, "Coordinate 1", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
+ { SOCK_VECTOR, 1, "Coordinate 2", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_FLOAT, 0, "Value" },
{ -1, 0, "" }
};
@@ -66,8 +67,8 @@ void register_node_type_tex_distance(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 120, 110, 160);
node_type_storage(&ntype, "node_distance", NULL, NULL);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
index 471d8db2c03..cd7ebb18018 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c
+++ b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,25 +27,25 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_hueSatVal.c
+/** \file blender/nodes/texture/nodes/node_texture_hueSatVal.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType inputs[]= {
- { SOCK_VALUE, 1, "Hue", 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.5f },
- { SOCK_VALUE, 1, "Saturation", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f },
- { SOCK_VALUE, 1, "Value", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f },
- { SOCK_VALUE, 1, "Factor", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_FLOAT, 1, "Hue", 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.5f, PROP_NONE },
+ { SOCK_FLOAT, 1, "Saturation", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR },
+ { SOCK_FLOAT, 1, "Value", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR },
+ { SOCK_FLOAT, 1, "Factor", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR },
+ { SOCK_RGBA, 1, "Color", 0.8f, 0.8f, 0.8f, 1.0f },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color" },
{ -1, 0, "" }
};
@@ -97,8 +98,8 @@ void register_node_type_tex_hue_sat(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 150, 80, 250);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c
index a54ca4bb119..6e749a80d99 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_image.c
+++ b/source/blender/nodes/texture/nodes/node_texture_image.c
@@ -27,16 +27,16 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_image.c
+/** \file blender/nodes/texture/nodes/node_texture_image.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Image", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Image"},
{ -1, 0, "" }
};
@@ -88,7 +88,7 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-static void init(bNode* node)
+static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
ImageUser *iuser= MEM_callocN(sizeof(ImageUser), "node image user");
node->storage= iuser;
@@ -101,8 +101,8 @@ void register_node_type_tex_image(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS,
- NULL, outputs);
+ node_type_base(&ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, outputs);
node_type_size(&ntype, 120, 80, 300);
node_type_init(&ntype, init);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_invert.c b/source/blender/nodes/texture/nodes/node_texture_invert.c
index e908bdcff07..d18bb86d5fa 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_invert.c
+++ b/source/blender/nodes/texture/nodes/node_texture_invert.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_invert.c
+/** \file blender/nodes/texture/nodes/node_texture_invert.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
/* **************** INVERT ******************** */
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -68,8 +69,8 @@ void register_node_type_tex_invert(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c
index 18468bdd55c..04f399069c1 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_math.c
+++ b/source/blender/nodes/texture/nodes/node_texture_math.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_math.c
+/** \file blender/nodes/texture/nodes/node_texture_math.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
/* **************** SCALAR MATH ******************** */
-static bNodeSocketType inputs[]= {
- { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f},
- { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f},
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_FLOAT, 0, "Value"},
{ -1, 0, "" }
};
@@ -189,8 +190,8 @@ void register_node_type_tex_math(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 120, 110, 160);
node_type_label(&ntype, node_math_label);
node_type_storage(&ntype, "node_math", NULL, NULL);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
index c7668c27b99..933a0302df8 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_mixRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_mixRgb.c
+/** \file blender/nodes/texture/nodes/node_texture_mixRgb.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
/* **************** MIX RGB ******************** */
-static bNodeSocketType inputs[]= {
- { SOCK_VALUE, 1, "Factor", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f },
- { SOCK_RGBA, 1, "Color1", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f },
- { SOCK_RGBA , 1, "Color2", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f },
+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 },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color" },
{ -1, 0, "" }
};
@@ -69,8 +70,8 @@ void register_node_type_tex_mix_rgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_label(&ntype, node_blend_label);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c
index 046ad724507..3095e224446 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_output.c
+++ b/source/blender/nodes/texture/nodes/node_texture_output.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,18 +27,18 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_output.c
+/** \file blender/nodes/texture/nodes/node_texture_output.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
/* **************** COMPOSITE ******************** */
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION},
{ -1, 0, "" }
};
@@ -141,7 +142,7 @@ static void assign_index(struct bNode *node)
node->custom1 = index;
}
-static void init(bNode *node)
+static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
TexNodeOutput *tno = MEM_callocN(sizeof(TexNodeOutput), "TEX_output");
node->storage= tno;
@@ -162,8 +163,8 @@ void register_node_type_tex_output(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS,
- inputs, NULL);
+ node_type_base(&ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, NULL);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, init);
node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, copy);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c
index 294c1f7322f..237e4d6923d 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_proc.c
+++ b/source/blender/nodes/texture/nodes/node_texture_proc.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,13 +27,13 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_proc.c
+/** \file blender/nodes/texture/nodes/node_texture_proc.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
#include "RE_shader_ext.h"
@@ -41,21 +42,21 @@
*/
-static bNodeSocketType outputs_both[]= {
- { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs_both[]= {
+ { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f },
+ { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION },
{ -1, 0, "" }
};
-static bNodeSocketType outputs_color_only[]= {
- { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs_color_only[]= {
+ { SOCK_RGBA, 0, "Color" },
{ -1, 0, "" }
};
/* Inputs common to all, #defined because nodes will need their own inputs too */
#define I 2 /* count */
#define COMMON_INPUTS \
- { SOCK_RGBA, 1, "Color 1", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f }, \
- { SOCK_RGBA, 1, "Color 2", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f }
+ { SOCK_RGBA, 1, "Color 1", 0.0f, 0.0f, 0.0f, 1.0f }, \
+ { SOCK_RGBA, 1, "Color 2", 1.0f, 1.0f, 1.0f, 1.0f }
/* Calls multitex and copies the result to the outputs. Called by xxx_exec, which handles inputs. */
static void do_proc(float *result, TexParams *p, float *col1, float *col2, char is_normal, Tex *tex, short thread)
@@ -139,15 +140,15 @@ static int count_outputs(bNode *node)
/* --- VORONOI -- */
-static bNodeSocketType voronoi_inputs[]= {
+static bNodeSocketTemplate voronoi_inputs[]= {
COMMON_INPUTS,
- { SOCK_VALUE, 1, "W1", 1.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f },
- { SOCK_VALUE, 1, "W2", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f },
- { SOCK_VALUE, 1, "W3", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f },
- { SOCK_VALUE, 1, "W4", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f },
+ { SOCK_FLOAT, 1, "W1", 1.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE },
+ { SOCK_FLOAT, 1, "W2", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE },
+ { SOCK_FLOAT, 1, "W3", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE },
+ { SOCK_FLOAT, 1, "W4", 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE },
- { SOCK_VALUE, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.01f, 10.0f },
- { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 4.0f },
+ { SOCK_FLOAT, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.01f, 10.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 4.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
@@ -164,7 +165,7 @@ static void voronoi_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short th
ProcDef(voronoi)
/* --- BLEND -- */
-static bNodeSocketType blend_inputs[]= {
+static bNodeSocketTemplate blend_inputs[]= {
COMMON_INPUTS,
{ -1, 0, "" }
};
@@ -172,9 +173,9 @@ ProcNoInputs(blend)
ProcDef(blend)
/* -- MAGIC -- */
-static bNodeSocketType magic_inputs[]= {
+static bNodeSocketTemplate magic_inputs[]= {
COMMON_INPUTS,
- { SOCK_VALUE, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f },
+ { SOCK_FLOAT, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
static void magic_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
@@ -184,10 +185,10 @@ static void magic_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thre
ProcDef(magic)
/* --- MARBLE --- */
-static bNodeSocketType marble_inputs[]= {
+static bNodeSocketTemplate marble_inputs[]= {
COMMON_INPUTS,
- { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f },
- { SOCK_VALUE, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f },
+ { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
static void marble_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
@@ -198,9 +199,9 @@ static void marble_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thr
ProcDef(marble)
/* --- CLOUDS --- */
-static bNodeSocketType clouds_inputs[]= {
+static bNodeSocketTemplate clouds_inputs[]= {
COMMON_INPUTS,
- { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f },
+ { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
static void clouds_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
@@ -210,10 +211,10 @@ static void clouds_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thr
ProcDef(clouds)
/* --- DISTORTED NOISE --- */
-static bNodeSocketType distnoise_inputs[]= {
+static bNodeSocketTemplate distnoise_inputs[]= {
COMMON_INPUTS,
- { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f },
- { SOCK_VALUE, 1, "Distortion", 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f },
+ { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Distortion", 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
static void distnoise_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
@@ -224,10 +225,10 @@ static void distnoise_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short
ProcDef(distnoise)
/* --- WOOD --- */
-static bNodeSocketType wood_inputs[]= {
+static bNodeSocketTemplate wood_inputs[]= {
COMMON_INPUTS,
- { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f },
- { SOCK_VALUE, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f },
+ { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
static void wood_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
@@ -238,14 +239,14 @@ static void wood_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short threa
ProcDef(wood)
/* --- MUSGRAVE --- */
-static bNodeSocketType musgrave_inputs[]= {
+static bNodeSocketTemplate musgrave_inputs[]= {
COMMON_INPUTS,
- { SOCK_VALUE, 1, "H", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f },
- { SOCK_VALUE, 1, "Lacunarity", 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f },
- { SOCK_VALUE, 1, "Octaves", 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 8.0f },
+ { SOCK_FLOAT, 1, "H", 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Lacunarity", 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Octaves", 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 8.0f, PROP_UNSIGNED },
- { SOCK_VALUE, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f },
- { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f },
+ { SOCK_FLOAT, 1, "iScale", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 10.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
static void musgrave_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
@@ -259,7 +260,7 @@ static void musgrave_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short t
ProcDef(musgrave)
/* --- NOISE --- */
-static bNodeSocketType noise_inputs[]= {
+static bNodeSocketTemplate noise_inputs[]= {
COMMON_INPUTS,
{ -1, 0, "" }
};
@@ -267,10 +268,10 @@ ProcNoInputs(noise)
ProcDef(noise)
/* --- STUCCI --- */
-static bNodeSocketType stucci_inputs[]= {
+static bNodeSocketTemplate stucci_inputs[]= {
COMMON_INPUTS,
- { SOCK_VALUE, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f },
- { SOCK_VALUE, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f },
+ { SOCK_FLOAT, 1, "Size", 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
+ { SOCK_FLOAT, 1, "Turbulence", 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
static void stucci_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thread)
@@ -282,7 +283,7 @@ ProcDef(stucci)
/* --- */
-static void init(bNode *node)
+static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
Tex *tex = MEM_callocN(sizeof(Tex), "Tex");
node->storage= tex;
@@ -301,7 +302,8 @@ void register_node_type_tex_proc_##name(ListBase *lb) \
{ \
static bNodeType ntype; \
\
- node_type_base(&ntype, TEX_NODE_PROC+TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW|NODE_OPTIONS, name##_inputs, outputs); \
+ node_type_base(&ntype, TEX_NODE_PROC+TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW|NODE_OPTIONS); \
+ node_type_socket_templates(&ntype, name##_inputs, outputs); \
node_type_size(&ntype, 140, 80, 140); \
node_type_init(&ntype, init); \
node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c b/source/blender/nodes/texture/nodes/node_texture_rotate.c
index 1be6152a2b3..afba9f199f9 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
+++ b/source/blender/nodes/texture/nodes/node_texture_rotate.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,25 +27,25 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_rotate.c
+/** \file blender/nodes/texture/nodes/node_texture_rotate.c
* \ingroup texnodes
*/
#include <math.h>
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VALUE, 1, "Turns", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f },
- { SOCK_VECTOR, 1, "Axis", 0.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_FLOAT, 1, "Turns", 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
+ { SOCK_VECTOR, 1, "Axis", 0.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f, PROP_DIRECTION },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -100,8 +101,8 @@ void register_node_type_tex_rotate(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c
index cfffcfda2e5..e3aee35977a 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_scale.c
+++ b/source/blender/nodes/texture/nodes/node_texture_scale.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_scale.c
+/** \file blender/nodes/texture/nodes/node_texture_scale.c
* \ingroup texnodes
*/
#include <math.h>
-#include "../TEX_util.h"
+#include "node_texture_util.h"
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f },
+ { SOCK_VECTOR, 1, "Scale", 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f, PROP_FACTOR },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -73,8 +74,8 @@ void register_node_type_tex_scale(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c
index c58595866af..96d6325671a 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_texture.c
+++ b/source/blender/nodes/texture/nodes/node_texture_texture.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,24 +27,24 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_texture.c
+/** \file blender/nodes/texture/nodes/node_texture_texture.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
#include "RE_shader_ext.h"
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color1", 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_RGBA, 1, "Color2", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color1", 1.0f, 1.0f, 1.0f, 1.0f },
+ { SOCK_RGBA, 1, "Color2", 0.0f, 0.0f, 0.0f, 1.0f },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color" },
{ -1, 0, "" }
};
@@ -53,7 +54,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
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);
copy_v3_v3(dxt, p->dxt);
copy_v3_v3(dyt, p->dyt);
@@ -70,7 +71,7 @@ static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
tex_input_rgba(col1, in[0], p, thread);
tex_input_rgba(col2, in[1], p, thread);
-
+
texres.nor = nor;
textype = multitex_nodes(nodetex, co, dxt, dyt, p->osatex,
&texres, thread, 0, p->shi, p->mtex);
@@ -94,8 +95,8 @@ void register_node_type_tex_texture(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 120, 80, 240);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c
index 8f7d6d837d7..b970bfbff76 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_translate.c
+++ b/source/blender/nodes/texture/nodes/node_texture_translate.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,23 +27,23 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_translate.c
+/** \file blender/nodes/texture/nodes/node_texture_translate.c
* \ingroup texnodes
*/
#include <math.h>
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
- { SOCK_VECTOR, 1, "Offset", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color", 0.0f, 0.0f, 0.0f, 1.0f},
+ { SOCK_VECTOR, 1, "Offset", 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_TRANSLATION },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -69,8 +70,8 @@ void register_node_type_tex_translate(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c b/source/blender/nodes/texture/nodes/node_texture_valToNor.c
index e430c0c9a95..523f416568c 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_valToNor.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToNor.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,22 +27,22 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_valToNor.c
+/** \file blender/nodes/texture/nodes/node_texture_valToNor.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
-static bNodeSocketType inputs[]= {
- { SOCK_VALUE, 1, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
- { SOCK_VALUE, 1, "Nabla", 0.025f, 0.0f, 0.0f, 0.0f, 0.001f, 0.1f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_FLOAT, 1, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE },
+ { SOCK_FLOAT, 1, "Nabla", 0.025f, 0.0f, 0.0f, 0.0f, 0.001f, 0.1f, PROP_UNSIGNED },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
- { SOCK_VECTOR, 0, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate outputs[]= {
+ { SOCK_VECTOR, 0, "Normal" },
{ -1, 0, "" }
};
@@ -85,8 +86,8 @@ void register_node_type_tex_valtonor(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
index 8f59828081c..6398a398b32 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_valToRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
@@ -27,21 +27,21 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_valToRgb.c
+/** \file blender/nodes/texture/nodes/node_texture_valToRgb.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
/* **************** VALTORGB ******************** */
-static bNodeSocketType valtorgb_in[]= {
- { SOCK_VALUE, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate valtorgb_in[]= {
+ { SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketType valtorgb_out[]= {
- { SOCK_RGBA, 0, "Color", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate valtorgb_out[]= {
+ { SOCK_RGBA, 0, "Color"},
{ -1, 0, "" }
};
@@ -59,7 +59,7 @@ static void valtorgb_exec(void *data, bNode *node, bNodeStack **in, bNodeStack *
tex_output(node, in, out[0], &valtorgb_colorfn, data);
}
-static void valtorgb_init(bNode *node)
+static void valtorgb_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
{
node->storage = add_colorband(1);
}
@@ -68,8 +68,8 @@ void register_node_type_tex_valtorgb(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
- valtorgb_in, valtorgb_out);
+ node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, valtorgb_in, valtorgb_out);
node_type_size(&ntype, 240, 200, 300);
node_type_init(&ntype, valtorgb_init);
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
@@ -79,12 +79,12 @@ void register_node_type_tex_valtorgb(ListBase *lb)
}
/* **************** RGBTOBW ******************** */
-static bNodeSocketType rgbtobw_in[]= {
+static bNodeSocketTemplate rgbtobw_in[]= {
{ SOCK_RGBA, 1, "Color", 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketType rgbtobw_out[]= {
- { SOCK_VALUE, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate rgbtobw_out[]= {
+ { SOCK_FLOAT, 0, "Val", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
@@ -106,8 +106,8 @@ void register_node_type_tex_rgbtobw(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0,
- rgbtobw_in, rgbtobw_out);
+ node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
+ node_type_socket_templates(&ntype, rgbtobw_in, rgbtobw_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, rgbtobw_exec);
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c b/source/blender/nodes/texture/nodes/node_texture_viewer.c
index e917e525e17..b0aa74a83b2 100644
--- a/source/blender/nodes/intern/TEX_nodes/TEX_viewer.c
+++ b/source/blender/nodes/texture/nodes/node_texture_viewer.c
@@ -1,4 +1,5 @@
/*
+ * $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
@@ -26,20 +27,20 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/nodes/intern/TEX_nodes/TEX_viewer.c
+/** \file blender/nodes/texture/nodes/node_texture_viewer.c
* \ingroup texnodes
*/
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
#include <math.h>
-static bNodeSocketType inputs[]= {
- { SOCK_RGBA, 1, "Color", 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f },
+static bNodeSocketTemplate inputs[]= {
+ { SOCK_RGBA, 1, "Color", 1.0f, 0.0f, 0.0f, 1.0f },
{ -1, 0, "" }
};
-static bNodeSocketType outputs[]= {
+static bNodeSocketTemplate outputs[]= {
{ -1, 0, "" }
};
@@ -61,8 +62,8 @@ void register_node_type_tex_viewer(ListBase *lb)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW,
- inputs, outputs);
+ node_type_base(&ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+ node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, exec);
diff --git a/source/blender/python/SConscript b/source/blender/python/SConscript
index dec0de4a6ab..5cc3f3bedc4 100644
--- a/source/blender/python/SConscript
+++ b/source/blender/python/SConscript
@@ -5,7 +5,7 @@
Import ('env')
incs = '. ../editors/include ../makesdna ../makesrna ../blenlib ../blenkernel ../nodes'
-incs += ' ../imbuf ../blenloader ../render/extern/include ../windowmanager'
+incs += ' ../imbuf ../blenloader ../gpu ../render/extern/include ../windowmanager'
incs += ' #intern/guardedalloc #intern/memutil #extern/glew/include'
incs += ' #intern/audaspace/intern ' + env['BF_PYTHON_INC']
@@ -17,6 +17,9 @@ defs = []
if is_debug:
defs.append('_DEBUG')
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('INTERNATIONAL')
+
sources = env.Glob('generic/*.c')
env.BlenderLib( libname = 'bf_python_ext', sources = Split(sources), includes = Split(incs), defines = defs, libtype = ['core','player'], priority = [363,165]) # ketsji is 360
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index 8dfbf476995..0a49036c15d 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -48,5 +48,8 @@ set(SRC
py_capi_utils.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DINTERNATIONAL)
+endif()
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 ae8069cf3c5..44d42a479ec 100644
--- a/source/blender/python/generic/bgl.c
+++ b/source/blender/python/generic/bgl.c
@@ -61,9 +61,9 @@ static PySequenceMethods Buffer_SeqMethods = {
(binaryfunc) NULL, /*sq_concat */
(ssizeargfunc) NULL, /*sq_repeat */
(ssizeargfunc) Buffer_item, /*sq_item */
- (ssizessizeargfunc) Buffer_slice, /*sq_slice, deprecated TODO, replace */
+ (ssizessizeargfunc) NULL, /*sq_slice, deprecated, handled in Buffer_item */
(ssizeobjargproc) Buffer_ass_item, /*sq_ass_item */
- (ssizessizeobjargproc) Buffer_ass_slice, /*sq_ass_slice, deprecated TODO, replace */
+ (ssizessizeobjargproc) NULL, /*sq_ass_slice, deprecated handled in Buffer_ass_item */
(objobjproc) NULL, /* sq_contains */
(binaryfunc) NULL, /* sq_inplace_concat */
(ssizeargfunc) NULL, /* sq_inplace_repeat */
@@ -112,13 +112,6 @@ static PyObject *Buffer_to_list_recursive(Buffer *self)
return list;
}
-/* *DEPRECATED* 2011/7/17 bgl.Buffer.list */
-static PyObject *Buffer_list(Buffer *self, void *UNUSED(arg))
-{
- fprintf(stderr, "Warning: 'Buffer.list' deprecated, use '[:]' instead\n");
- return Buffer_to_list(self);
-}
-
static PyObject *Buffer_dimensions(Buffer *self, void *UNUSED(arg))
{
PyObject *list= PyList_New(self->ndimensions);
@@ -138,7 +131,6 @@ static PyMethodDef Buffer_methods[] = {
};
static PyGetSetDef Buffer_getseters[] = {
- {(char *)"list", (getter)Buffer_list, NULL, NULL, NULL},
{(char *)"dimensions", (getter)Buffer_dimensions, NULL, NULL, NULL},
{NULL, NULL, NULL, NULL, NULL}
};
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c
index 3cf0b0f1f27..87e4a301eff 100644
--- a/source/blender/python/generic/blf_py_api.c
+++ b/source/blender/python/generic/blf_py_api.c
@@ -31,9 +31,13 @@
#include "blf_py_api.h"
#include "../../blenfont/BLF_api.h"
+#include "../../blenfont/BLF_translation.h"
#include "BLI_utildefines.h"
+#ifdef INTERNATIONAL
+#include "DNA_userdef_types.h" /* is it bad level? */
+#endif
PyDoc_STRVAR(py_blf_position_doc,
@@ -367,6 +371,35 @@ static PyObject *py_blf_load(PyObject *UNUSED(self), PyObject *args)
return PyLong_FromLong(BLF_load(filename));
}
+PyDoc_STRVAR(py_blf_gettext_doc,
+".. function:: gettext(msgid)\n"
+"\n"
+" Get a msg in local language.\n"
+"\n"
+" :arg msgid: the source string.\n"
+" :type msgid: string\n"
+" :return: the localized string.\n"
+" :rtype: string\n"
+);
+static PyObject *py_blf_gettext(PyObject *UNUSED(self), PyObject *value)
+{
+#ifdef INTERNATIONAL
+ if ((U.transopts & USER_DOTRANSLATE) && (U.transopts & USER_TR_IFACE)) {
+ const char *msgid= _PyUnicode_AsString(value);
+ if(msgid == NULL) {
+ PyErr_SetString(PyExc_TypeError, "blf.gettext expects a single string argument");
+ return NULL;
+ }
+
+ return PyUnicode_FromString(BLF_gettext(msgid));
+ }
+ else
+#endif /* INTERNATIONAL */
+ {
+ return Py_INCREF(value), value;
+ }
+}
+
/*----------------------------MODULE INIT-------------------------*/
static PyMethodDef BLF_methods[] = {
{"aspect", (PyCFunction) py_blf_aspect, METH_VARARGS, py_blf_aspect_doc},
@@ -382,6 +415,7 @@ static PyMethodDef BLF_methods[] = {
{"shadow_offset", (PyCFunction) py_blf_shadow_offset, METH_VARARGS, py_blf_shadow_offset_doc},
{"size", (PyCFunction) py_blf_size, METH_VARARGS, py_blf_size_doc},
{"load", (PyCFunction) py_blf_load, METH_VARARGS, py_blf_load_doc},
+ {"gettext", (PyCFunction) py_blf_gettext, METH_O, py_blf_gettext_doc},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c
index f0158fe72c3..67ed90c79eb 100644
--- a/source/blender/python/generic/bpy_internal_import.c
+++ b/source/blender/python/generic/bpy_internal_import.c
@@ -344,7 +344,7 @@ void bpy_text_clear_modules(int clear_all)
/* looping over the dict */
PyObject *key, *value;
- int pos= 0;
+ Py_ssize_t pos= 0;
/* new list */
PyObject *list;
@@ -374,7 +374,7 @@ void bpy_text_clear_modules(int clear_all)
}
/* remove all our modules */
- for(pos=0; pos < PyList_Size(list); pos++) {
+ for(pos=0; pos < PyList_GET_SIZE(list); pos++) {
/* PyObject_Print(key, stderr, 0); */
key= PyList_GET_ITEM(list, pos);
PyDict_DelItem(modules, key);
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index b7e67ec5a93..d5bd44fc288 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -208,7 +208,49 @@ PyObject *PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...)
return item;
}
+/* similar to PyErr_Format(),
+ *
+ * implimentation - we cant actually preprend the existing exception,
+ * because it could have _any_ argiments given to it, so instead we get its
+ * __str__ output and raise our own exception including it.
+ */
+PyObject *PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *format, ...)
+{
+ PyObject *error_value_prefix;
+ va_list args;
+
+ va_start(args, format);
+ error_value_prefix= PyUnicode_FromFormatV(format, args); /* can fail and be NULL */
+ va_end(args);
+
+ if(PyErr_Occurred()) {
+ PyObject *error_type, *error_value, *error_traceback;
+ PyErr_Fetch(&error_type, &error_value, &error_traceback);
+ PyErr_Format(exception_type_prefix,
+ "%S, %.200s(%S)",
+ error_value_prefix,
+ Py_TYPE(error_value)->tp_name,
+ error_value
+ );
+ }
+ else {
+ PyErr_SetObject(exception_type_prefix,
+ error_value_prefix
+ );
+ }
+
+ Py_XDECREF(error_value_prefix);
+
+ /* dumb to always return NULL but matches PyErr_Format */
+ return NULL;
+}
+
+
/* returns the exception string as a new PyUnicode object, depends on external traceback module */
+#if 0
+
+/* this version uses traceback module but somehow fails on UI errors */
+
PyObject *PyC_ExceptionBuffer(void)
{
PyObject *traceback_mod= NULL;
@@ -236,6 +278,78 @@ error_cleanup:
return ret;
}
+#else /* verbose, non-threadsafe version */
+PyObject *PyC_ExceptionBuffer(void)
+{
+ PyObject *stdout_backup = PySys_GetObject("stdout"); /* borrowed */
+ PyObject *stderr_backup = PySys_GetObject("stderr"); /* borrowed */
+ PyObject *string_io = NULL;
+ PyObject *string_io_buf = NULL;
+ PyObject *string_io_mod= NULL;
+ PyObject *string_io_getvalue= NULL;
+
+ PyObject *error_type, *error_value, *error_traceback;
+
+ if (!PyErr_Occurred())
+ return NULL;
+
+ PyErr_Fetch(&error_type, &error_value, &error_traceback);
+
+ PyErr_Clear();
+
+ /* import io
+ * string_io = io.StringIO()
+ */
+
+ if(! (string_io_mod= PyImport_ImportModule("io")) ) {
+ goto error_cleanup;
+ }
+ else if (! (string_io = PyObject_CallMethod(string_io_mod, (char *)"StringIO", NULL))) {
+ goto error_cleanup;
+ }
+ else if (! (string_io_getvalue= PyObject_GetAttrString(string_io, "getvalue"))) {
+ goto error_cleanup;
+ }
+
+ Py_INCREF(stdout_backup); // since these were borrowed we dont want them freed when replaced.
+ Py_INCREF(stderr_backup);
+
+ PySys_SetObject("stdout", string_io); // both of these are free'd when restoring
+ PySys_SetObject("stderr", string_io);
+
+ PyErr_Restore(error_type, error_value, error_traceback);
+ PyErr_Print(); /* print the error */
+ PyErr_Clear();
+
+ string_io_buf = PyObject_CallObject(string_io_getvalue, NULL);
+
+ PySys_SetObject("stdout", stdout_backup);
+ PySys_SetObject("stderr", stderr_backup);
+
+ Py_DECREF(stdout_backup); /* now sys owns the ref again */
+ Py_DECREF(stderr_backup);
+
+ Py_DECREF(string_io_mod);
+ Py_DECREF(string_io_getvalue);
+ Py_DECREF(string_io); /* free the original reference */
+
+ PyErr_Clear();
+ return string_io_buf;
+
+
+error_cleanup:
+ /* could not import the module so print the error and close */
+ Py_XDECREF(string_io_mod);
+ Py_XDECREF(string_io);
+
+ PyErr_Restore(error_type, error_value, error_traceback);
+ PyErr_Print(); /* print the error */
+ PyErr_Clear();
+
+ return NULL;
+}
+#endif
+
/* string conversion, escape non-unicode chars, coerce must be set to NULL */
const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h
index 96c93ab71f8..03a8637710e 100644
--- a/source/blender/python/generic/py_capi_utils.h
+++ b/source/blender/python/generic/py_capi_utils.h
@@ -34,6 +34,7 @@ void PyC_ObSpit(const char *name, PyObject *var);
void PyC_LineSpit(void);
PyObject * PyC_ExceptionBuffer(void);
PyObject * PyC_Object_GetAttrStringArgs(PyObject *o, Py_ssize_t n, ...);
+PyObject * PyC_Err_Format_Prefix(PyObject *exception_type_prefix, const char *format, ...);
void PyC_FileAndNum(const char **filename, int *lineno);
int PyC_AsArray(void *array, PyObject *value, const int length, const PyTypeObject *type, const short is_double, const char *error_prefix);
diff --git a/source/blender/python/intern/CMakeLists.txt b/source/blender/python/intern/CMakeLists.txt
index 93a4b3ec269..acdee5328e7 100644
--- a/source/blender/python/intern/CMakeLists.txt
+++ b/source/blender/python/intern/CMakeLists.txt
@@ -32,6 +32,7 @@ set(INC
../../makesdna
../../makesrna
../../windowmanager
+ ../../gpu
../../../../intern/guardedalloc
)
@@ -40,11 +41,13 @@ set(INC_SYS
)
set(SRC
+ gpu.c
bpy.c
bpy_app.c
bpy_app_handlers.c
bpy_driver.c
bpy_interface.c
+ bpy_interface_atexit.c
bpy_intern_string.c
bpy_library.c
bpy_operator.c
@@ -58,6 +61,7 @@ set(SRC
bpy_util.c
stubs.c
+ gpu.h
bpy.h
bpy_app.h
bpy_app_handlers.h
diff --git a/source/blender/python/intern/bpy.h b/source/blender/python/intern/bpy.h
index 0ebc6bb2438..f60146021d3 100644
--- a/source/blender/python/intern/bpy.h
+++ b/source/blender/python/intern/bpy.h
@@ -28,3 +28,7 @@
void BPy_init_modules(void);
extern PyObject *bpy_package_py;
+
+/* bpy_interface_atexit.c */
+void BPY_atexit_register(void);
+void BPY_atexit_unregister(void);
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index e7e46160199..b909a0d5f55 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -63,7 +63,7 @@ static PyStructSequence_Desc app_cb_info_desc= {
#endif
*/
-static PyObject *py_cb_array[BLI_CB_EVT_TOT]= {0};
+static PyObject *py_cb_array[BLI_CB_EVT_TOT]= {NULL};
static PyObject *make_app_cb_info(void)
{
@@ -102,7 +102,7 @@ PyObject *BPY_app_handlers_struct(void)
/* assign the C callbacks */
if(ret) {
- static bCallbackFuncStore funcstore_array[BLI_CB_EVT_TOT]= {{0}};
+ static bCallbackFuncStore funcstore_array[BLI_CB_EVT_TOT]= {{NULL}};
bCallbackFuncStore *funcstore;
int pos= 0;
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index e5e90380d61..429a74fddc0 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -30,7 +30,7 @@
/* grr, python redefines */
#ifdef _POSIX_C_SOURCE
-#undef _POSIX_C_SOURCE
+# undef _POSIX_C_SOURCE
#endif
#include <Python.h>
@@ -40,6 +40,7 @@
#include "RNA_types.h"
#include "bpy.h"
+#include "gpu.h"
#include "bpy_rna.h"
#include "bpy_util.h"
#include "bpy_traceback.h"
@@ -181,6 +182,7 @@ static struct _inittab bpy_internal_modules[]= {
#ifdef WITH_AUDASPACE
{(char *)"aud", AUD_initPython},
#endif
+ {(char *)"gpu", GPU_initPython},
{NULL, NULL}
};
@@ -239,6 +241,8 @@ void BPY_python_start(int argc, const char **argv)
pyrna_alloc_types();
+ BPY_atexit_register(); /* this can init any time */
+
#ifndef WITH_PYTHON_MODULE
py_tstate= PyGILState_GetThisThreadState();
PyEval_ReleaseThread(py_tstate);
@@ -258,6 +262,8 @@ void BPY_python_end(void)
bpy_intern_string_exit();
+ BPY_atexit_unregister(); /* without this we get recursive calls to WM_exit */
+
Py_Finalize();
#ifdef TIME_PY_RUN
diff --git a/source/blender/python/intern/bpy_interface_atexit.c b/source/blender/python/intern/bpy_interface_atexit.c
new file mode 100644
index 00000000000..ac8c90198a0
--- /dev/null
+++ b/source/blender/python/intern/bpy_interface_atexit.c
@@ -0,0 +1,94 @@
+/*
+ * $Id$
+ *
+ * ***** 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/python/intern/bpy_interface_atexit.c
+ * \ingroup pythonintern
+ */
+
+
+#include <Python.h>
+
+#include "bpy_util.h"
+
+#include "WM_api.h"
+
+#include "BLI_utildefines.h"
+
+static PyObject *bpy_atexit(PyObject *UNUSED(self), PyObject *UNUSED(args), PyObject *UNUSED(kw))
+{
+ /* close down enough of blender at least not to crash */
+ struct bContext *C= BPy_GetContext();
+
+ WM_exit_ext(C, 0);
+
+ Py_RETURN_NONE;
+}
+
+static PyMethodDef meth_bpy_atexit= {"bpy_atexit", (PyCFunction)bpy_atexit, METH_NOARGS, NULL};
+static PyObject *func_bpy_atregister= NULL; /* borrowed referebce, atexit holds */
+
+static void atexit_func_call(const char *func_name, PyObject *atexit_func_arg)
+{
+ /* note - no error checking, if any of these fail we'll get a crash
+ * this is intended, but if its problematic it could be changed
+ * - campbell */
+
+ PyObject *atexit_mod= PyImport_ImportModuleLevel((char *)"atexit", NULL, NULL, NULL, 0);
+ PyObject *atexit_func= PyObject_GetAttrString(atexit_mod, func_name);
+ PyObject *args= PyTuple_New(1);
+ PyObject *ret;
+
+ PyTuple_SET_ITEM(args, 0, atexit_func_arg);
+ Py_INCREF(atexit_func_arg); /* only incref so we dont dec'ref along with 'args' */
+
+ ret= PyObject_CallObject(atexit_func, args);
+
+ Py_DECREF(atexit_mod);
+ Py_DECREF(atexit_func);
+ Py_DECREF(args);
+
+ if(ret) {
+ Py_DECREF(ret);
+ }
+ else { /* should never happen */
+ PyErr_Print();
+ }
+}
+
+void BPY_atexit_register(void)
+{
+ /* atexit module owns this new function reference */
+ BLI_assert(func_bpy_atregister == NULL);
+
+ func_bpy_atregister= (PyObject *)PyCFunction_New(&meth_bpy_atexit, NULL);
+ atexit_func_call("register", func_bpy_atregister);
+}
+
+void BPY_atexit_unregister(void)
+{
+ BLI_assert(func_bpy_atregister != NULL);
+
+ atexit_func_call("unregister", func_bpy_atregister);
+ func_bpy_atregister= NULL; /* don't really need to set but just incase */
+}
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index d10c8c843e8..a63cee4e505 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -1525,10 +1525,22 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
#endif // USE_STRING_COERCE
if (param==NULL) {
- PyErr_Format(PyExc_TypeError,
- "%.200s %.200s.%.200s expected a string type, not %.200s",
- error_prefix, RNA_struct_identifier(ptr->type),
- RNA_property_identifier(prop), Py_TYPE(value)->tp_name);
+ if(PyUnicode_Check(value)) {
+ /* there was an error assigning a string type,
+ * rather than setting a new error, prefix the existing one
+ */
+ PyC_Err_Format_Prefix(PyExc_TypeError,
+ "%.200s %.200s.%.200s error assigning string",
+ error_prefix, RNA_struct_identifier(ptr->type),
+ RNA_property_identifier(prop));
+ }
+ else {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s %.200s.%.200s expected a string type, not %.200s",
+ error_prefix, RNA_struct_identifier(ptr->type),
+ RNA_property_identifier(prop), Py_TYPE(value)->tp_name);
+ }
+
return -1;
}
else {
@@ -4608,7 +4620,7 @@ static PyObject *pyrna_func_call(BPy_FunctionRNA *self, PyObject *args, PyObject
#ifdef DEBUG_STRING_FREE
- // if(PyList_Size(string_free_ls)) printf("%.200s.%.200s(): has %d strings\n", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), (int)PyList_Size(string_free_ls));
+ // if(PyList_GET_SIZE(string_free_ls)) printf("%.200s.%.200s(): has %d strings\n", RNA_struct_identifier(self_ptr->type), RNA_function_identifier(self_func), (int)PyList_GET_SIZE(string_free_ls));
Py_DECREF(string_free_ls);
#undef DEBUG_STRING_FREE
#endif
@@ -5443,7 +5455,7 @@ static PyObject* pyrna_srna_ExternalType(StructRNA *srna)
if(bpy_types==NULL) {
PyErr_Print();
PyErr_Clear();
- fprintf(stderr, "pyrna_srna_ExternalType: failed to find 'bpy_types' module\n");
+ fprintf(stderr, "%s: failed to find 'bpy_types' module\n", __func__);
return NULL;
}
bpy_types_dict= PyModule_GetDict(bpy_types); // borrow
@@ -5457,18 +5469,18 @@ static PyObject* pyrna_srna_ExternalType(StructRNA *srna)
PyObject *base_compare= pyrna_srna_PyBase(srna);
//PyObject *slots= PyObject_GetAttrString(newclass, "__slots__"); // cant do this because it gets superclasses values!
//PyObject *bases= PyObject_GetAttrString(newclass, "__bases__"); // can do this but faster not to.
- PyObject *bases= ((PyTypeObject *)newclass)->tp_bases;
- PyObject *slots= PyDict_GetItem(((PyTypeObject *)newclass)->tp_dict, bpy_intern_str___slots__);
+ PyObject *tp_bases= ((PyTypeObject *)newclass)->tp_bases;
+ PyObject *tp_slots= PyDict_GetItem(((PyTypeObject *)newclass)->tp_dict, bpy_intern_str___slots__);
- if(slots==NULL) {
- fprintf(stderr, "pyrna_srna_ExternalType: expected class '%s' to have __slots__ defined\n\nSee bpy_types.py\n", idname);
+ if(tp_slots==NULL) {
+ fprintf(stderr, "%s: expected class '%s' to have __slots__ defined\n\nSee bpy_types.py\n", __func__, idname);
newclass= NULL;
}
- else if(PyTuple_GET_SIZE(bases)) {
- PyObject *base= PyTuple_GET_ITEM(bases, 0);
+ else if(PyTuple_GET_SIZE(tp_bases)) {
+ PyObject *base= PyTuple_GET_ITEM(tp_bases, 0);
if(base_compare != base) {
- fprintf(stderr, "pyrna_srna_ExternalType: incorrect subclassing of SRNA '%s'\nSee bpy_types.py\n", idname);
+ fprintf(stderr, "%s: incorrect subclassing of SRNA '%s'\nSee bpy_types.py\n", __func__, idname);
PyC_ObSpit("Expected! ", base_compare);
newclass= NULL;
}
@@ -5538,7 +5550,7 @@ static PyObject* pyrna_srna_Subtype(StructRNA *srna)
}
else {
/* this should not happen */
- printf("Error registering '%s'\n", idname);
+ printf("%s: error registering '%s'\n", __func__, idname);
PyErr_Print();
PyErr_Clear();
}
@@ -5581,7 +5593,7 @@ PyObject *pyrna_struct_CreatePyObject(PointerRNA *ptr)
Py_DECREF(tp); /* srna owns, cant hold a ref */
}
else {
- fprintf(stderr, "Could not make type\n");
+ fprintf(stderr, "%s: could not make type\n", __func__);
pyrna= (BPy_StructRNA *) PyObject_GC_New(BPy_StructRNA, &pyrna_struct_Type);
#ifdef USE_WEAKREFS
pyrna->in_weakreflist= NULL;
@@ -6231,10 +6243,10 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
#endif
py_class= RNA_struct_py_type_get(ptr->type);
-
/* rare case. can happen when registering subclasses */
if(py_class==NULL) {
- fprintf(stderr, "bpy_class_call(): unable to get python class for rna struct '%.200s'\n", RNA_struct_identifier(ptr->type));
+ fprintf(stderr, "%s: unable to get python class for rna struct '%.200s'\n",
+ __func__, RNA_struct_identifier(ptr->type));
return -1;
}
@@ -6427,14 +6439,11 @@ static int bpy_class_call(bContext *C, PointerRNA *ptr, FunctionRNA *func, Param
* no line number since the func has finished calling on error,
* re-raise the exception with more info since it would be slow to
* create prefix on every call (when there are no errors) */
- if(err == -1 && PyErr_Occurred()) {
- PyObject *error_type, *error_value, *error_traceback;
- PyErr_Fetch(&error_type, &error_value, &error_traceback);
-
- PyErr_Format(error_type,
- "class %.200s, function %.200s: incompatible return value%S",
- RNA_struct_identifier(ptr->type), RNA_function_identifier(func),
- error_value);
+ if(err == -1) {
+ PyC_Err_Format_Prefix(PyExc_RuntimeError,
+ "class %.200s, function %.200s: incompatible return value ",
+ RNA_struct_identifier(ptr->type), RNA_function_identifier(func)
+ );
}
}
else if (ret_len > 1) {
diff --git a/source/blender/python/intern/gpu.c b/source/blender/python/intern/gpu.c
new file mode 100644
index 00000000000..8fa6a7b0629
--- /dev/null
+++ b/source/blender/python/intern/gpu.c
@@ -0,0 +1,291 @@
+/*
+ * $Id$
+ *
+ * ***** 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) 2006 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Benoit Bolsee.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/python/intern/gpu.c
+ * \ingroup pythonintern
+ */
+
+/* python redefines */
+#ifdef _POSIX_C_SOURCE
+#undef _POSIX_C_SOURCE
+#endif
+
+#include <Python.h>
+
+#include "GPU_material.h"
+
+#include "DNA_scene_types.h"
+#include "DNA_image_types.h"
+#include "DNA_material_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_object_types.h"
+#include "DNA_ID.h"
+#include "DNA_customdata_types.h"
+
+#include "BLI_listbase.h"
+#include "BLI_utildefines.h"
+
+#include "RNA_access.h"
+
+#include "bpy_rna.h"
+
+#include "gpu.h"
+
+#define PY_MODULE_ADD_CONSTANT(module, name) PyModule_AddIntConstant(module, #name, name)
+
+PyDoc_STRVAR(M_gpu_doc,
+ "This module provides access to the GLSL shader.");
+
+static struct PyModuleDef gpumodule = {
+ PyModuleDef_HEAD_INIT,
+ "gpu", /* name of module */
+ M_gpu_doc, /* module documentation */
+ -1, /* size of per-interpreter state of the module,
+ or -1 if the module keeps state in global variables. */
+ NULL, NULL, NULL, NULL, NULL
+};
+
+PyMODINIT_FUNC
+PyInit_gpu(void)
+{
+ PyObject* m;
+
+ m = PyModule_Create(&gpumodule);
+ if(m == NULL)
+ return NULL;
+
+ // device constants
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_OBJECT_VIEWMAT);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_OBJECT_MAT);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_OBJECT_VIEWIMAT);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_OBJECT_IMAT);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_OBJECT_COLOR);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_LAMP_DYNVEC);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_LAMP_DYNCO);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_LAMP_DYNIMAT);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_LAMP_DYNPERSMAT);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_LAMP_DYNENERGY);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_LAMP_DYNCOL);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_SAMPLER_2DBUFFER);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_SAMPLER_2DIMAGE);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DYNAMIC_SAMPLER_2DSHADOW);
+
+ PY_MODULE_ADD_CONSTANT(m, GPU_DATA_1I);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DATA_1F);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DATA_2F);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DATA_3F);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DATA_4F);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DATA_9F);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DATA_16F);
+ PY_MODULE_ADD_CONSTANT(m, GPU_DATA_4UB);
+
+ PY_MODULE_ADD_CONSTANT(m, CD_MTFACE);
+ PY_MODULE_ADD_CONSTANT(m, CD_ORCO);
+ PY_MODULE_ADD_CONSTANT(m, CD_TANGENT);
+ PY_MODULE_ADD_CONSTANT(m, CD_MCOL);
+ return m;
+}
+
+#define PY_DICT_ADD_STRING(d,s,f) \
+ val = PyUnicode_FromString(s->f); \
+ PyDict_SetItemString(d, #f, val); \
+ Py_DECREF(val)
+
+#define PY_DICT_ADD_LONG(d,s,f) \
+ val = PyLong_FromLong(s->f); \
+ PyDict_SetItemString(d, #f, val); \
+ Py_DECREF(val)
+
+#define PY_DICT_ADD_ID(d,s,f) \
+ RNA_id_pointer_create((struct ID*)s->f, &tptr); \
+ val = pyrna_struct_CreatePyObject(&tptr); \
+ PyDict_SetItemString(d, #f, val); \
+ Py_DECREF(val)
+
+#define PY_OBJ_ADD_ID(d,s,f) \
+ val = PyUnicode_FromString(&s->f->id.name[2]); \
+ PyObject_SetAttrString(d, #f, val); \
+ Py_DECREF(val)
+
+#define PY_OBJ_ADD_LONG(d,s,f) \
+ val = PyLong_FromLong(s->f); \
+ PyObject_SetAttrString(d, #f, val); \
+ Py_DECREF(val)
+
+#define PY_OBJ_ADD_STRING(d,s,f) \
+ val = PyUnicode_FromString(s->f); \
+ PyObject_SetAttrString(d, #f, val); \
+ Py_DECREF(val)
+
+static PyObject* GPU_export_shader(PyObject* UNUSED(self), PyObject *args, PyObject *kwds)
+{
+ PyObject* pyscene;
+ PyObject* pymat;
+ PyObject* as_pointer;
+ PyObject* pointer;
+ PyObject* result;
+ PyObject* dict;
+ PyObject* val;
+ PyObject* seq;
+
+ int i;
+ Scene *scene;
+ PointerRNA tptr;
+ Material *material;
+ GPUShaderExport *shader;
+ GPUInputUniform *uniform;
+ GPUInputAttribute *attribute;
+
+ static const char *kwlist[] = {"scene", "material", NULL};
+
+ if(!PyArg_ParseTupleAndKeywords(args, kwds, "OO:export_shader", (char**)(kwlist), &pyscene, &pymat))
+ return NULL;
+
+ if (!strcmp(Py_TYPE(pyscene)->tp_name, "Scene") &&
+ (as_pointer = PyObject_GetAttrString(pyscene, "as_pointer")) != NULL &&
+ PyCallable_Check(as_pointer)) {
+ // must be a scene object
+ pointer = PyObject_CallObject(as_pointer, NULL);
+ if (!pointer) {
+ PyErr_SetString(PyExc_SystemError, "scene.as_pointer() failed");
+ return NULL;
+ }
+ scene = (Scene*)PyLong_AsVoidPtr(pointer);
+ Py_DECREF(pointer);
+ if (!scene) {
+ PyErr_SetString(PyExc_SystemError, "scene.as_pointer() failed");
+ return NULL;
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError, "gpu.export_shader() first argument should be of Scene type");
+ return NULL;
+ }
+
+ if (!strcmp(Py_TYPE(pymat)->tp_name, "Material") &&
+ (as_pointer = PyObject_GetAttrString(pymat, "as_pointer")) != NULL &&
+ PyCallable_Check(as_pointer)) {
+ // must be a material object
+ pointer = PyObject_CallObject(as_pointer, NULL);
+ if (!pointer) {
+ PyErr_SetString(PyExc_SystemError, "scene.as_pointer() failed");
+ return NULL;
+ }
+ material = (Material*)PyLong_AsVoidPtr(pointer);
+ Py_DECREF(pointer);
+ if (!material) {
+ PyErr_SetString(PyExc_SystemError, "scene.as_pointer() failed");
+ return NULL;
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError, "gpu.export_shader() second argument should be of Material type");
+ return NULL;
+ }
+ // we can call our internal function at last:
+ shader = GPU_shader_export(scene, material);
+ if (!shader) {
+ PyErr_SetString(PyExc_RuntimeError, "cannot export shader");
+ return NULL;
+ }
+ // build a dictionary
+ result = PyDict_New();
+ if (shader->fragment) {
+ PY_DICT_ADD_STRING(result,shader,fragment);
+ }
+ if (shader->vertex) {
+ PY_DICT_ADD_STRING(result,shader,vertex);
+ }
+ seq = PyList_New(BLI_countlist(&shader->uniforms));
+ for (i=0, uniform=shader->uniforms.first; uniform; uniform=uniform->next, i++) {
+ dict = PyDict_New();
+ PY_DICT_ADD_STRING(dict,uniform,varname);
+ PY_DICT_ADD_LONG(dict,uniform,datatype);
+ PY_DICT_ADD_LONG(dict,uniform,type);
+ if (uniform->lamp) {
+ PY_DICT_ADD_ID(dict,uniform,lamp);
+ }
+ if (uniform->image) {
+ PY_DICT_ADD_ID(dict,uniform,image);
+ }
+ if (uniform->type == GPU_DYNAMIC_SAMPLER_2DBUFFER ||
+ uniform->type == GPU_DYNAMIC_SAMPLER_2DIMAGE ||
+ uniform->type == GPU_DYNAMIC_SAMPLER_2DSHADOW) {
+ PY_DICT_ADD_LONG(dict,uniform,texnumber);
+ }
+ if (uniform->texpixels) {
+ val = PyByteArray_FromStringAndSize((const char *)uniform->texpixels, uniform->texsize);
+ PyDict_SetItemString(dict, "texpixels", val);
+ Py_DECREF(val);
+ PY_DICT_ADD_LONG(dict,uniform,texsize);
+ }
+ PyList_SET_ITEM(seq, i, dict);
+ }
+ PyDict_SetItemString(result, "uniforms", seq);
+ Py_DECREF(seq);
+
+ seq = PyList_New(BLI_countlist(&shader->attributes));
+ for (i=0, attribute=shader->attributes.first; attribute; attribute=attribute->next, i++) {
+ dict = PyDict_New();
+ PY_DICT_ADD_STRING(dict,attribute,varname);
+ PY_DICT_ADD_LONG(dict,attribute,datatype);
+ PY_DICT_ADD_LONG(dict,attribute,type);
+ PY_DICT_ADD_LONG(dict,attribute,number);
+ if (attribute->name) {
+ if (attribute->name[0] != 0) {
+ PY_DICT_ADD_STRING(dict,attribute,name);
+ } else {
+ val = PyLong_FromLong(0);
+ PyDict_SetItemString(dict, "name", val);
+ Py_DECREF(val);
+ }
+ }
+ PyList_SET_ITEM(seq, i, dict);
+ }
+ PyDict_SetItemString(result, "attributes", seq);
+ Py_DECREF(seq);
+
+ GPU_free_shader_export(shader);
+
+ return result;
+}
+
+static PyMethodDef meth_export_shader[] = {{ "export_shader", (PyCFunction)GPU_export_shader, METH_VARARGS | METH_KEYWORDS,
+ "export_shader(scene,material)\n\n"
+ "Returns the GLSL shader that produces the visual effect of material in scene.\n\n"
+ ":return: Dictionary defining the shader, uniforms and attributes.\n"
+ ":rtype: Dict"}};
+
+PyObject* GPU_initPython(void)
+{
+ PyObject* module = PyInit_gpu();
+ PyModule_AddObject(module, "export_shader", (PyObject *)PyCFunction_New(meth_export_shader, NULL));
+ PyDict_SetItemString(PyImport_GetModuleDict(), "gpu", module);
+
+ return module;
+}
+
diff --git a/source/blender/python/intern/gpu.h b/source/blender/python/intern/gpu.h
new file mode 100644
index 00000000000..d604c7c6201
--- /dev/null
+++ b/source/blender/python/intern/gpu.h
@@ -0,0 +1,41 @@
+/*
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This shader 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. The Blender
+ * Foundation also sells licenses for use in proprietary software under
+ * the Blender License. See http://www.blender.org/BL/ for information
+ * about this.
+ *
+ * This shader 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 shader; 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): Benoit Bolsee.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/python/intern/gpu.h
+ * \ingroup pythonintern
+ */
+
+/**
+ * Initalizes the gpu Python module.
+ */
+PyObject* GPU_initPython(void);
+
diff --git a/source/blender/python/mathutils/mathutils_Euler.c b/source/blender/python/mathutils/mathutils_Euler.c
index 5c609d8961f..c96eafcd6ad 100644
--- a/source/blender/python/mathutils/mathutils_Euler.c
+++ b/source/blender/python/mathutils/mathutils_Euler.c
@@ -196,16 +196,18 @@ PyDoc_STRVAR(Euler_rotate_axis_doc,
static PyObject *Euler_rotate_axis(EulerObject * self, PyObject *args)
{
float angle = 0.0f;
- const char *axis;
+ int axis; /* actually a character */
- if(!PyArg_ParseTuple(args, "sf:rotate", &axis, &angle)){
+ if(!PyArg_ParseTuple(args, "Cf:rotate", &axis, &angle)){
PyErr_SetString(PyExc_TypeError,
- "euler.rotate(): "
- "expected angle (float) and axis (x, y, z)");
+ "Euler.rotate_axis(): "
+ "expected an axis 'X', 'Y', 'Z' and an angle (float)");
return NULL;
}
- if(!(ELEM3(*axis, 'X', 'Y', 'Z') && axis[1]=='\0')){
- PyErr_SetString(PyExc_ValueError, "euler.rotate(): "
+
+ if(!(ELEM3(axis, 'X', 'Y', 'Z'))){
+ PyErr_SetString(PyExc_ValueError,
+ "Euler.rotate_axis(): "
"expected axis to be 'X', 'Y' or 'Z'");
return NULL;
}
@@ -214,7 +216,7 @@ static PyObject *Euler_rotate_axis(EulerObject * self, PyObject *args)
return NULL;
- rotate_eulO(self->eul, self->order, *axis, angle);
+ rotate_eulO(self->eul, self->order, (char)axis, angle);
(void)BaseMath_WriteCallback(self);
diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c
index 3953171f263..a2a15600965 100644
--- a/source/blender/python/mathutils/mathutils_Matrix.c
+++ b/source/blender/python/mathutils/mathutils_Matrix.c
@@ -119,7 +119,7 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
if(kwds && PyDict_Size(kwds)) {
PyErr_SetString(PyExc_TypeError,
- "mathutils.Matrix(): "
+ "Matrix(): "
"takes no keyword args");
return NULL;
}
@@ -155,7 +155,7 @@ static PyObject *Matrix_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
/* will overwrite error */
PyErr_SetString(PyExc_TypeError,
- "mathutils.Matrix(): "
+ "Matrix(): "
"expects no args or 2-4 numeric sequences");
return NULL;
}
@@ -216,7 +216,7 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args)
if(!PyArg_ParseTuple(args, "di|O", &angle, &matSize, &vec)) {
PyErr_SetString(PyExc_TypeError,
- "mathutils.RotationMatrix(angle, size, axis): "
+ "Matrix.Rotation(angle, size, axis): "
"expected float int and a string or vector");
return NULL;
}
@@ -225,7 +225,7 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args)
axis= _PyUnicode_AsString((PyObject *)vec);
if(axis==NULL || axis[0]=='\0' || axis[1]!='\0' || axis[0] < 'X' || axis[0] > 'Z') {
PyErr_SetString(PyExc_ValueError,
- "mathutils.RotationMatrix(): "
+ "Matrix.Rotation(): "
"3rd argument axis value must be a 3D vector "
"or a string in 'X', 'Y', 'Z'");
return NULL;
@@ -240,19 +240,19 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args)
if(matSize != 2 && matSize != 3 && matSize != 4) {
PyErr_SetString(PyExc_ValueError,
- "mathutils.RotationMatrix(): "
+ "Matrix.Rotation(): "
"can only return a 2x2 3x3 or 4x4 matrix");
return NULL;
}
if(matSize == 2 && (vec != NULL)) {
PyErr_SetString(PyExc_ValueError,
- "mathutils.RotationMatrix(): "
+ "Matrix.Rotation(): "
"cannot create a 2x2 rotation matrix around arbitrary axis");
return NULL;
}
if((matSize == 3 || matSize == 4) && (axis == NULL) && (vec == NULL)) {
PyErr_SetString(PyExc_ValueError,
- "mathutils.RotationMatrix(): "
+ "Matrix.Rotation(): "
"axis of rotation for 3d and 4d matrices is required");
return NULL;
}
@@ -261,47 +261,24 @@ static PyObject *C_Matrix_Rotation(PyObject *cls, PyObject *args)
if(vec) {
float tvec[3];
- if (mathutils_array_parse(tvec, 3, 3, vec, "mathutils.RotationMatrix(angle, size, axis), invalid 'axis' arg") == -1)
+ if (mathutils_array_parse(tvec, 3, 3, vec, "Matrix.Rotation(angle, size, axis), invalid 'axis' arg") == -1)
return NULL;
axis_angle_to_mat3((float (*)[3])mat, tvec, angle);
}
- else if(matSize == 2) {
+ else if (matSize == 2) {
+ const float angle_cos= cosf(angle);
+ const float angle_sin= sinf(angle);
+
//2D rotation matrix
- mat[0] = (float) cos (angle);
- mat[1] = (float) sin (angle);
- mat[2] = -((float) sin(angle));
- mat[3] = (float) cos(angle);
- }
- else if(strcmp(axis, "X") == 0) {
- //rotation around X
- mat[0] = 1.0f;
- mat[4] = (float) cos(angle);
- mat[5] = (float) sin(angle);
- mat[7] = -((float) sin(angle));
- mat[8] = (float) cos(angle);
- }
- else if(strcmp(axis, "Y") == 0) {
- //rotation around Y
- mat[0] = (float) cos(angle);
- mat[2] = -((float) sin(angle));
- mat[4] = 1.0f;
- mat[6] = (float) sin(angle);
- mat[8] = (float) cos(angle);
- }
- else if(strcmp(axis, "Z") == 0) {
- //rotation around Z
- mat[0] = (float) cos(angle);
- mat[1] = (float) sin(angle);
- mat[3] = -((float) sin(angle));
- mat[4] = (float) cos(angle);
- mat[8] = 1.0f;
+ mat[0] = angle_cos;
+ mat[1] = angle_sin;
+ mat[2] = -angle_sin;
+ mat[3] = angle_cos;
}
else {
- /* should never get here */
- PyErr_SetString(PyExc_ValueError,
- "mathutils.RotationMatrix(): unknown error");
- return NULL;
+ /* valid axis checked above */
+ single_axis_angle_to_mat3((float (*)[3])mat, axis[0], angle);
}
if(matSize == 4) {
@@ -451,7 +428,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args)
}
if(matSize != 2 && matSize != 3 && matSize != 4) {
PyErr_SetString(PyExc_ValueError,
- "mathutils.Matrix.OrthoProjection(): "
+ "Matrix.OrthoProjection(): "
"can only return a 2x2 3x3 or 4x4 matrix");
return NULL;
}
@@ -468,7 +445,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args)
}
else {
PyErr_Format(PyExc_ValueError,
- "mathutils.Matrix.OrthoProjection(): "
+ "Matrix.OrthoProjection(): "
"unknown plane, expected: X, Y, not '%.200s'",
plane);
return NULL;
@@ -489,7 +466,7 @@ static PyObject *C_Matrix_OrthoProjection(PyObject *cls, PyObject *args)
}
else {
PyErr_Format(PyExc_ValueError,
- "mathutils.Matrix.OrthoProjection(): "
+ "Matrix.OrthoProjection(): "
"unknown plane, expected: XY, XZ, YZ, not '%.200s'",
plane);
return NULL;
@@ -568,7 +545,7 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args)
}
if(matSize != 2 && matSize != 3 && matSize != 4) {
PyErr_SetString(PyExc_ValueError,
- "mathutils.Matrix.Shear(): "
+ "Matrix.Shear(): "
"can only return a 2x2 3x3 or 4x4 matrix");
return NULL;
}
@@ -578,7 +555,7 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args)
if(factor==-1.0f && PyErr_Occurred()) {
PyErr_SetString(PyExc_TypeError,
- "mathutils.Matrix.Shear(): "
+ "Matrix.Shear(): "
"the factor to be a float");
return NULL;
}
@@ -627,7 +604,7 @@ static PyObject *C_Matrix_Shear(PyObject *cls, PyObject *args)
}
else {
PyErr_SetString(PyExc_ValueError,
- "mathutils.Matrix.Shear(): "
+ "Matrix.Shear(): "
"expected: X, Y, XY, XZ, YZ");
return NULL;
}
@@ -686,7 +663,7 @@ static PyObject *Matrix_to_quaternion(MatrixObject *self)
/*must be 3-4 cols, 3-4 rows, square matrix*/
if((self->col_size < 3) || (self->row_size < 3) || (self->col_size != self->row_size)) {
PyErr_SetString(PyExc_ValueError,
- "matrix.to_quat(): "
+ "Matrix.to_quat(): "
"inappropriate matrix size - expects 3x3 or 4x4 matrix");
return NULL;
}
@@ -750,13 +727,13 @@ static PyObject *Matrix_to_euler(MatrixObject *self, PyObject *args)
}
else {
PyErr_SetString(PyExc_ValueError,
- "matrix.to_euler(): "
+ "Matrix.to_euler(): "
"inappropriate matrix size - expects 3x3 or 4x4 matrix");
return NULL;
}
if(order_str) {
- order= euler_order_from_string(order_str, "matrix.to_euler()");
+ order= euler_order_from_string(order_str, "Matrix.to_euler()");
if(order == -1)
return NULL;
@@ -785,11 +762,13 @@ static PyObject *Matrix_resize_4x4(MatrixObject *self)
if(self->wrapped==Py_WRAP){
PyErr_SetString(PyExc_TypeError,
+ "Matrix.resize_4x4(): "
"cannot resize wrapped data - make a copy and resize that");
return NULL;
}
if(self->cb_user){
PyErr_SetString(PyExc_TypeError,
+ "Matrix.resize_4x4(): "
"cannot resize owned data - make a copy and resize that");
return NULL;
}
@@ -797,7 +776,8 @@ static PyObject *Matrix_resize_4x4(MatrixObject *self)
self->contigPtr = PyMem_Realloc(self->contigPtr, (sizeof(float) * 16));
if(self->contigPtr == NULL) {
PyErr_SetString(PyExc_MemoryError,
- "matrix.resize_4x4(): problem allocating pointer space");
+ "Matrix.resize_4x4(): "
+ "problem allocating pointer space");
return NULL;
}
/*set row pointers*/
@@ -858,7 +838,8 @@ static PyObject *Matrix_to_4x4(MatrixObject *self)
/* TODO, 2x2 matrix */
PyErr_SetString(PyExc_TypeError,
- "matrix.to_4x4(): inappropriate matrix size");
+ "Matrix.to_4x4(): "
+ "inappropriate matrix size");
return NULL;
}
@@ -879,7 +860,7 @@ static PyObject *Matrix_to_3x3(MatrixObject *self)
if((self->col_size < 3) || (self->row_size < 3)) {
PyErr_SetString(PyExc_TypeError,
- "matrix.to_3x3(): inappropriate matrix size");
+ "Matrix.to_3x3(): inappropriate matrix size");
return NULL;
}
@@ -903,7 +884,7 @@ static PyObject *Matrix_to_translation(MatrixObject *self)
if((self->col_size < 3) || self->row_size < 4){
PyErr_SetString(PyExc_TypeError,
- "matrix.to_translation(): "
+ "Matrix.to_translation(): "
"inappropriate matrix size");
return NULL;
}
@@ -933,7 +914,7 @@ static PyObject *Matrix_to_scale(MatrixObject *self)
/*must be 3-4 cols, 3-4 rows, square matrix*/
if((self->col_size < 3) || (self->row_size < 3)) {
PyErr_SetString(PyExc_TypeError,
- "matrix.to_scale(): "
+ "Matrix.to_scale(): "
"inappropriate matrix size, 3x3 minimum size");
return NULL;
}
@@ -969,7 +950,7 @@ static PyObject *Matrix_invert(MatrixObject *self)
if(self->row_size != self->col_size){
PyErr_SetString(PyExc_TypeError,
- "matrix.invert(ed): "
+ "Matrix.invert(ed): "
"only square matrices are supported");
return NULL;
}
@@ -1005,6 +986,7 @@ static PyObject *Matrix_invert(MatrixObject *self)
}
else {
PyErr_SetString(PyExc_ValueError,
+ "Matrix.invert(ed): "
"matrix does not have an inverse");
return NULL;
}
@@ -1050,7 +1032,8 @@ static PyObject *Matrix_rotate(MatrixObject *self, PyObject *value)
if(self->col_size != 3 || self->row_size != 3) {
PyErr_SetString(PyExc_TypeError,
- "Matrix must have 3x3 dimensions");
+ "Matrix.rotate(): "
+ "must have 3x3 dimensions");
return NULL;
}
@@ -1082,7 +1065,7 @@ static PyObject *Matrix_decompose(MatrixObject *self)
if(self->col_size != 4 || self->row_size != 4) {
PyErr_SetString(PyExc_TypeError,
- "matrix.decompose(): "
+ "Matrix.decompose(): "
"inappropriate matrix size - expects 4x4 matrix");
return NULL;
}
@@ -1125,7 +1108,7 @@ static PyObject *Matrix_lerp(MatrixObject *self, PyObject *args)
if(self->row_size != mat2->row_size || self->col_size != mat2->col_size) {
PyErr_SetString(PyExc_ValueError,
- "matrix.lerp(): "
+ "Matrix.lerp(): "
"expects both matrix objects of the same dimensions");
return NULL;
}
@@ -1142,7 +1125,7 @@ static PyObject *Matrix_lerp(MatrixObject *self, PyObject *args)
}
else {
PyErr_SetString(PyExc_ValueError,
- "matrix.lerp(): "
+ "Matrix.lerp(): "
"only 3x3 and 4x4 matrices supported");
return NULL;
}
@@ -1168,7 +1151,7 @@ static PyObject *Matrix_determinant(MatrixObject *self)
if(self->row_size != self->col_size){
PyErr_SetString(PyExc_TypeError,
- "matrix.determinant: "
+ "Matrix.determinant(): "
"only square matrices are supported");
return NULL;
}
@@ -1192,7 +1175,7 @@ static PyObject *Matrix_transpose(MatrixObject *self)
if(self->row_size != self->col_size){
PyErr_SetString(PyExc_TypeError,
- "matrix.transpose(d): "
+ "Matrix.transpose(d): "
"only square matrices are supported");
return NULL;
}
@@ -1261,7 +1244,7 @@ static PyObject *Matrix_identity(MatrixObject *self)
if(self->row_size != self->col_size){
PyErr_SetString(PyExc_TypeError,
- "matrix.identity: "
+ "Matrix.identity(): "
"only square matrices are supported");
return NULL;
}
@@ -1794,7 +1777,7 @@ static PyObject *Matrix_median_scale_get(MatrixObject *self, void *UNUSED(closur
/*must be 3-4 cols, 3-4 rows, square matrix*/
if((self->col_size < 3) || (self->row_size < 3)) {
PyErr_SetString(PyExc_AttributeError,
- "matrix.median_scale: "
+ "Matrix.median_scale: "
"inappropriate matrix size, 3x3 minimum");
return NULL;
}
@@ -1816,7 +1799,7 @@ static PyObject *Matrix_is_negative_get(MatrixObject *self, void *UNUSED(closure
return PyBool_FromLong(is_negative_m3((float (*)[3])self->contigPtr));
else {
PyErr_SetString(PyExc_AttributeError,
- "matrix.is_negative: "
+ "Matrix.is_negative: "
"inappropriate matrix size - expects 3x3 or 4x4 matrix");
return NULL;
}
@@ -1834,7 +1817,7 @@ static PyObject *Matrix_is_orthogonal_get(MatrixObject *self, void *UNUSED(closu
return PyBool_FromLong(is_orthogonal_m3((float (*)[3])self->contigPtr));
else {
PyErr_SetString(PyExc_AttributeError,
- "matrix.is_orthogonal: "
+ "Matrix.is_orthogonal: "
"inappropriate matrix size - expects 3x3 or 4x4 matrix");
return NULL;
}
diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c
index 2be258a1ef0..947e4425d3f 100644
--- a/source/blender/python/mathutils/mathutils_Quaternion.c
+++ b/source/blender/python/mathutils/mathutils_Quaternion.c
@@ -161,7 +161,7 @@ static PyObject *Quaternion_cross(QuaternionObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value, "quaternion.cross(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value, "Quaternion.cross(other), invalid 'other' arg") == -1)
return NULL;
mul_qt_qtqt(quat, self->quat, tquat);
@@ -186,7 +186,7 @@ static PyObject *Quaternion_dot(QuaternionObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value, "quaternion.dot(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value, "Quaternion.dot(other), invalid 'other' arg") == -1)
return NULL;
return PyFloat_FromDouble(dot_qtqt(self->quat, tquat));
@@ -209,7 +209,7 @@ static PyObject *Quaternion_rotation_difference(QuaternionObject *self, PyObject
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value, "quaternion.difference(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value, "Quaternion.difference(other), invalid 'other' arg") == -1)
return NULL;
rotation_between_quats_to_quat(quat, self->quat, tquat);
@@ -244,7 +244,7 @@ static PyObject *Quaternion_slerp(QuaternionObject *self, PyObject *args)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value, "quaternion.slerp(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tquat, QUAT_SIZE, QUAT_SIZE, value, "Quaternion.slerp(other), invalid 'other' arg") == -1)
return NULL;
if(fac > 1.0f || fac < 0.0f) {
@@ -275,7 +275,7 @@ static PyObject *Quaternion_rotate(QuaternionObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_any_to_rotmat(other_rmat, value, "quaternion.rotate(value)") == -1)
+ if(mathutils_any_to_rotmat(other_rmat, value, "Quaternion.rotate(value)") == -1)
return NULL;
length= normalize_qt_qt(tquat, self->quat);
@@ -909,7 +909,7 @@ static int Quaternion_setAngle(QuaternionObject *self, PyObject *value, void *UN
if(angle==-1.0 && PyErr_Occurred()) { /* parsed item not a number */
PyErr_SetString(PyExc_TypeError,
- "quaternion.angle = value: float expected");
+ "Quaternion.angle = value: float expected");
return -1;
}
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 56c1334ecac..413df78f09e 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -48,6 +48,7 @@
static PyObject *Vector_copy(VectorObject *self);
static PyObject *Vector_to_tuple_ext(VectorObject *self, int ndigits);
+static int row_vector_multiplication(float rvec[MAX_DIMENSIONS], VectorObject *vec, MatrixObject *mat);
/* Supports 2D, 3D, and 4D vector objects both int and float values
* accepted. Mixed float and int values accepted. Ints are parsed to float
@@ -158,13 +159,13 @@ static PyObject *Vector_resize_2d(VectorObject *self)
{
if(self->wrapped==Py_WRAP) {
PyErr_SetString(PyExc_TypeError,
- "vector.resize_2d(): "
+ "Vector.resize_2d(): "
"cannot resize wrapped data - only python vectors");
return NULL;
}
if(self->cb_user) {
PyErr_SetString(PyExc_TypeError,
- "vector.resize_2d(): "
+ "Vector.resize_2d(): "
"cannot resize a vector that has an owner");
return NULL;
}
@@ -172,7 +173,7 @@ static PyObject *Vector_resize_2d(VectorObject *self)
self->vec = PyMem_Realloc(self->vec, (sizeof(float) * 2));
if(self->vec == NULL) {
PyErr_SetString(PyExc_MemoryError,
- "vector.resize_2d(): "
+ "Vector.resize_2d(): "
"problem allocating pointer space");
return NULL;
}
@@ -193,13 +194,13 @@ static PyObject *Vector_resize_3d(VectorObject *self)
{
if (self->wrapped==Py_WRAP) {
PyErr_SetString(PyExc_TypeError,
- "vector.resize_3d(): "
+ "Vector.resize_3d(): "
"cannot resize wrapped data - only python vectors");
return NULL;
}
if(self->cb_user) {
PyErr_SetString(PyExc_TypeError,
- "vector.resize_3d(): "
+ "Vector.resize_3d(): "
"cannot resize a vector that has an owner");
return NULL;
}
@@ -207,7 +208,7 @@ static PyObject *Vector_resize_3d(VectorObject *self)
self->vec = PyMem_Realloc(self->vec, (sizeof(float) * 3));
if(self->vec == NULL) {
PyErr_SetString(PyExc_MemoryError,
- "vector.resize_3d(): "
+ "Vector.resize_3d(): "
"problem allocating pointer space");
return NULL;
}
@@ -231,13 +232,13 @@ static PyObject *Vector_resize_4d(VectorObject *self)
{
if(self->wrapped==Py_WRAP) {
PyErr_SetString(PyExc_TypeError,
- "vector.resize_4d(): "
+ "Vector.resize_4d(): "
"cannot resize wrapped data - only python vectors");
return NULL;
}
if(self->cb_user) {
PyErr_SetString(PyExc_TypeError,
- "vector.resize_4d(): "
+ "Vector.resize_4d(): "
"cannot resize a vector that has an owner");
return NULL;
}
@@ -245,7 +246,7 @@ static PyObject *Vector_resize_4d(VectorObject *self)
self->vec = PyMem_Realloc(self->vec, (sizeof(float) * 4));
if(self->vec == NULL) {
PyErr_SetString(PyExc_MemoryError,
- "vector.resize_4d(): "
+ "Vector.resize_4d(): "
"problem allocating pointer space");
return NULL;
}
@@ -353,7 +354,7 @@ static PyObject *Vector_to_tuple(VectorObject *self, PyObject *args)
if(ndigits > 22 || ndigits < 0) {
PyErr_SetString(PyExc_ValueError,
- "vector.to_tuple(ndigits): "
+ "Vector.to_tuple(ndigits): "
"ndigits must be between 0 and 21");
return NULL;
}
@@ -390,7 +391,7 @@ static PyObject *Vector_to_track_quat(VectorObject *self, PyObject *args)
if (self->size != 3) {
PyErr_SetString(PyExc_TypeError,
- "vector.to_track_quat(): "
+ "Vector.to_track_quat(): "
"only for 3D vectors");
return NULL;
}
@@ -511,7 +512,7 @@ static PyObject *Vector_reflect(VectorObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if((value_size= mathutils_array_parse(tvec, 2, 4, value, "vector.reflect(other), invalid 'other' arg")) == -1)
+ if((value_size= mathutils_array_parse(tvec, 2, 4, value, "Vector.reflect(other), invalid 'other' arg")) == -1)
return NULL;
mirror[0] = tvec[0];
@@ -550,7 +551,7 @@ static PyObject *Vector_cross(VectorObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(tvec, self->size, self->size, value, "vector.cross(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tvec, self->size, self->size, value, "Vector.cross(other), invalid 'other' arg") == -1)
return NULL;
ret= (VectorObject *)newVectorObject(NULL, 3, Py_NEW, Py_TYPE(self));
@@ -577,7 +578,7 @@ static PyObject *Vector_dot(VectorObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(tvec, self->size, self->size, value, "vector.dot(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tvec, self->size, self->size, value, "Vector.dot(other), invalid 'other' arg") == -1)
return NULL;
for(x = 0; x < self->size; x++) {
@@ -617,7 +618,7 @@ static PyObject *Vector_angle(VectorObject *self, PyObject *args)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(tvec, size, size, value, "vector.angle(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tvec, size, size, value, "Vector.angle(other), invalid 'other' arg") == -1)
return NULL;
for(x = 0; x < size; x++) {
@@ -632,7 +633,7 @@ static PyObject *Vector_angle(VectorObject *self, PyObject *args)
}
else {
PyErr_SetString(PyExc_ValueError,
- "vector.angle(other): "
+ "Vector.angle(other): "
"zero length vectors have no valid angle");
return NULL;
}
@@ -674,7 +675,7 @@ static PyObject *Vector_rotation_difference(VectorObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(vec_b, 3, MAX_DIMENSIONS, value, "vector.difference(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(vec_b, 3, MAX_DIMENSIONS, value, "Vector.difference(other), invalid 'other' arg") == -1)
return NULL;
normalize_v3_v3(vec_a, self->vec);
@@ -706,7 +707,7 @@ static PyObject *Vector_project(VectorObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_array_parse(tvec, size, size, value, "vector.project(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tvec, size, size, value, "Vector.project(other), invalid 'other' arg") == -1)
return NULL;
if(BaseMath_ReadCallback(self) == -1)
@@ -748,7 +749,7 @@ static PyObject *Vector_lerp(VectorObject *self, PyObject *args)
if(!PyArg_ParseTuple(args, "Of:lerp", &value, &fac))
return NULL;
- if(mathutils_array_parse(tvec, size, size, value, "vector.lerp(other), invalid 'other' arg") == -1)
+ if(mathutils_array_parse(tvec, size, size, value, "Vector.lerp(other), invalid 'other' arg") == -1)
return NULL;
if(BaseMath_ReadCallback(self) == -1)
@@ -777,7 +778,7 @@ static PyObject *Vector_rotate(VectorObject *self, PyObject *value)
if(BaseMath_ReadCallback(self) == -1)
return NULL;
- if(mathutils_any_to_rotmat(other_rmat, value, "vector.rotate(value)") == -1)
+ if(mathutils_any_to_rotmat(other_rmat, value, "Vector.rotate(value)") == -1)
return NULL;
if(self->size < 3) {
@@ -838,7 +839,7 @@ static PyObject *vector_item_internal(VectorObject *self, int i, const int is_at
if(i < 0 || i >= self->size) {
if(is_attr) {
PyErr_Format(PyExc_AttributeError,
- "vector.%c: unavailable on %dd vector",
+ "Vector.%c: unavailable on %dd vector",
*(((char *)"xyzw") + i), self->size);
}
else {
@@ -874,7 +875,7 @@ static int vector_ass_item_internal(VectorObject *self, int i, PyObject *value,
if(i < 0 || i >= self->size){
if(is_attr) {
PyErr_Format(PyExc_AttributeError,
- "vector.%c = x: unavailable on %dd vector",
+ "Vector.%c = x: unavailable on %dd vector",
*(((char *)"xyzw") + i), self->size);
}
else {
@@ -1159,28 +1160,16 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2)
}
else if (vec1) {
if (MatrixObject_Check(v2)) {
-
-/* ------ to be removed ------*/
-#if 1
- PyErr_SetString(PyExc_ValueError,
- "(Vector * Matrix) is now removed, reverse the "
- "order (promoted to an Error for Debug builds)");
- return NULL;
-#else
-
/* VEC * MATRIX */
- /* this is deprecated!, use the reverse instead */
float tvec[MAX_DIMENSIONS];
if(BaseMath_ReadCallback((MatrixObject *)v2) == -1)
return NULL;
- if(column_vector_multiplication(tvec, vec1, (MatrixObject*)v2) == -1) {
+ if(row_vector_multiplication(tvec, vec1, (MatrixObject*)v2) == -1) {
return NULL;
}
return newVectorObject(tvec, vec1->size, Py_NEW, Py_TYPE(vec1));
-#endif
-/* ------ to be removed ------*/
}
else if (QuaternionObject_Check(v2)) {
/* VEC * QUAT */
@@ -2219,20 +2208,19 @@ if len(unique) != len(items):
print "ERROR"
*/
-#if 0
-//ROW VECTOR Multiplication - Vector X Matrix
-//[x][y][z] * [1][4][7]
-// [2][5][8]
-// [3][6][9]
-//vector/matrix multiplication IS NOT COMMUTATIVE!!!!
-static int row_vector_multiplication(float rvec[4], VectorObject* vec, MatrixObject * mat)
+/* ROW VECTOR Multiplication - Vector X Matrix
+ * [x][y][z] * [1][4][7]
+ * [2][5][8]
+ * [3][6][9]
+ * vector/matrix multiplication IS NOT COMMUTATIVE!!!! */
+static int row_vector_multiplication(float rvec[MAX_DIMENSIONS], VectorObject *vec, MatrixObject *mat)
{
- float vec_cpy[4];
+ float vec_cpy[MAX_DIMENSIONS];
double dot = 0.0f;
- int x, y, z = 0, vec_size = vec->size;
+ int x, y, z= 0, vec_size= vec->size;
- if(mat->colSize != vec_size){
- if(mat->colSize == 4 && vec_size != 3){
+ if(mat->col_size != vec_size){
+ if(mat->col_size == 4 && vec_size != 3){
PyErr_SetString(PyExc_ValueError,
"vector * matrix: matrix column size "
"and the vector size must be the same");
@@ -2247,11 +2235,11 @@ static int row_vector_multiplication(float rvec[4], VectorObject* vec, MatrixObj
return -1;
memcpy(vec_cpy, vec->vec, vec_size * sizeof(float));
-
+printf("asasas\n");
rvec[3] = 1.0f;
//muliplication
- for(x = 0; x < mat->rowSize; x++) {
- for(y = 0; y < mat->colSize; y++) {
+ for(x = 0; x < mat->row_size; x++) {
+ for(y = 0; y < mat->col_size; y++) {
dot += mat->matrix[x][y] * vec_cpy[y];
}
rvec[z++] = (float)dot;
@@ -2259,7 +2247,6 @@ static int row_vector_multiplication(float rvec[4], VectorObject* vec, MatrixObj
}
return 0;
}
-#endif
/*----------------------------Vector.negate() -------------------- */
PyDoc_STRVAR(Vector_negate_doc,
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index bcdfe020e1a..0394d732ae3 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -983,7 +983,7 @@ static PyObject *M_Geometry_tesselate_polygon(PyObject *UNUSED(self), PyObject *
static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
{
- int len, i;
+ Py_ssize_t len, i;
PyObject *list_item, *item_1, *item_2;
boxPack *box;
@@ -995,14 +995,14 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
return -1;
}
- len= PyList_Size(value);
+ len= PyList_GET_SIZE(value);
(*boxarray)= MEM_mallocN(len*sizeof(boxPack), "boxPack box");
for(i= 0; i < len; i++) {
list_item= PyList_GET_ITEM(value, i);
- if(!PyList_Check(list_item) || PyList_Size(list_item) < 4) {
+ if(!PyList_Check(list_item) || PyList_GET_SIZE(list_item) < 4) {
MEM_freeN(*boxarray);
PyErr_SetString(PyExc_TypeError,
"can only pack a list of [x, y, w, h]");
@@ -1034,11 +1034,11 @@ static int boxPack_FromPyObject(PyObject *value, boxPack **boxarray)
static void boxPack_ToPyObject(PyObject *value, boxPack **boxarray)
{
- int len, i;
+ Py_ssize_t len, i;
PyObject *list_item;
boxPack *box;
- len= PyList_Size(value);
+ len= PyList_GET_SIZE(value);
for(i= 0; i < len; i++) {
box= (*boxarray)+i;
@@ -1062,7 +1062,7 @@ PyDoc_STRVAR(M_Geometry_box_pack_2d_doc,
static PyObject *M_Geometry_box_pack_2d(PyObject *UNUSED(self), PyObject *boxlist)
{
float tot_width= 0.0f, tot_height= 0.0f;
- int len;
+ Py_ssize_t len;
PyObject *ret;
diff --git a/source/blender/render/extern/include/RE_render_ext.h b/source/blender/render/extern/include/RE_render_ext.h
index 849640a5c16..e98f481b162 100644
--- a/source/blender/render/extern/include/RE_render_ext.h
+++ b/source/blender/render/extern/include/RE_render_ext.h
@@ -55,10 +55,10 @@ struct ImBuf;
//void RE_zbufferall_radio(struct RadView *vw, struct RNode **rg_elem, int rg_totelem, struct Render *re);
/* particle.c, effect.c, editmesh_modes.c and brush.c, returns 1 if rgb, 0 otherwise */
-int externtex(struct MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *tb, float *ta, const int thread);
+int externtex(struct MTex *mtex, const float vec[3], float *tin, float *tr, float *tg, float *tb, float *ta, const int thread);
/* particle.c */
-void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg, int blendtype);
+void texture_rgb_blend(float in[3], const float tex[3], const float out[3], float fact, float facg, int blendtype);
float texture_value_blend(float tex, float out, float fact, float facg, int blendtype);
/* node_composite.c */
diff --git a/source/blender/render/intern/include/pixelshading.h b/source/blender/render/intern/include/pixelshading.h
index 0298f90c0d0..feabfea9319 100644
--- a/source/blender/render/intern/include/pixelshading.h
+++ b/source/blender/render/intern/include/pixelshading.h
@@ -58,10 +58,10 @@ int shadeHaloFloat(HaloRen *har,
/**
* Render the sky at pixel (x, y).
*/
-void shadeSkyPixel(float *collector, float fx, float fy, short thread);
-void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short thread);
+void shadeSkyPixel(float collector[4], float fx, float fy, short thread);
+void shadeSkyView(float col_r[3], const float rco[3], const float view[3], const float dxyview[2], short thread);
void shadeAtmPixel(struct SunSky *sunsky, float *collector, float fx, float fy, float distance);
-void shadeSunView(float *colf, float *view);
+void shadeSunView(float col_r[3], const float view[3]);
/* ------------------------------------------------------------------------- */
#endif
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h
index 13ca40bfd20..0b339d285ce 100644
--- a/source/blender/render/intern/include/render_types.h
+++ b/source/blender/render/intern/include/render_types.h
@@ -338,7 +338,7 @@ typedef struct ObjectInstanceRen {
struct VolumePrecache *volume_precache;
- float *vectors;
+ float *vectors; /* (RE_WINSPEED_ELEMS * VertRen.index) */
int totvector;
/* used on makeraytree */
@@ -354,8 +354,8 @@ typedef struct VertRen
float co[3];
float n[3];
float *orco;
- short clip;
- unsigned short flag; /* in use for clipping zbuffer parts, temp setting stuff in convertblender.c */
+ unsigned int flag; /* in use for clipping zbuffer parts, temp setting stuff in convertblender.c
+ * only an 'int' because of alignment, could be a char too */
float accum; /* accum for radio weighting, and for strand texco static particles */
int index; /* index allows extending vertren with any property */
} VertRen;
diff --git a/source/blender/render/intern/include/rendercore.h b/source/blender/render/intern/include/rendercore.h
index 67c3cbcebe2..f9486b5d5c0 100644
--- a/source/blender/render/intern/include/rendercore.h
+++ b/source/blender/render/intern/include/rendercore.h
@@ -81,8 +81,8 @@ float mistfactor(float zcor, float *co); /* dist and height, return alpha */
void renderspothalo(struct ShadeInput *shi, float *col, float alpha);
void add_halo_flare(Render *re);
-void calc_renderco_zbuf(float *co, float *view, int z);
-void calc_renderco_ortho(float *co, float x, float y, int z);
+void calc_renderco_zbuf(float co[3], float *view, int z);
+void calc_renderco_ortho(float co[3], float x, float y, int z);
int count_mask(unsigned short mask);
diff --git a/source/blender/render/intern/include/renderdatabase.h b/source/blender/render/intern/include/renderdatabase.h
index e1fa208d0b6..06185d0ae74 100644
--- a/source/blender/render/intern/include/renderdatabase.h
+++ b/source/blender/render/intern/include/renderdatabase.h
@@ -91,7 +91,7 @@ void free_renderdata_vertnodes(struct VertTableNode *vertnodes);
void free_renderdata_vlaknodes(struct VlakTableNode *vlaknodes);
void set_normalflags(struct Render *re, struct ObjectRen *obr);
-void project_renderdata(struct Render *re, void (*projectfunc)(float *, float mat[][4], float *), int do_pano, float xoffs, int do_buckets);
+void project_renderdata(struct Render *re, void (*projectfunc)(const float *, float mat[][4], float *), int do_pano, float xoffs, int do_buckets);
int clip_render_object(float boundbox[][3], float *bounds, float mat[][4]);
/* functions are not exported... so wrong names */
diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h
index 2dca9963e4f..5bed39db3e9 100644
--- a/source/blender/render/intern/include/shadbuf.h
+++ b/source/blender/render/intern/include/shadbuf.h
@@ -59,13 +59,13 @@ void threaded_makeshadowbufs(struct Render *re);
* @param inp The inproduct between viewvector and ?
*
*/
-float testshadowbuf(struct Render *re, struct ShadBuf *shb, float *rco, float *dxco, float *dyco, float inp, float mat_bias);
+float testshadowbuf(struct Render *re, struct ShadBuf *shb, const float rco[3], const float dxco[3], const float dyco[3], float inp, float mat_bias);
/**
* Determines the shadow factor for lamp <lar>, between <p1>
* and <p2>. (Which CS?)
*/
-float shadow_halo(LampRen *lar, float *p1, float *p2);
+float shadow_halo(LampRen *lar, const float p1[3], const float p2[3]);
/**
* Irregular shadowbuffer
diff --git a/source/blender/render/intern/include/shading.h b/source/blender/render/intern/include/shading.h
index 07d24ea6d66..91507ef3f98 100644
--- a/source/blender/render/intern/include/shading.h
+++ b/source/blender/render/intern/include/shading.h
@@ -63,7 +63,7 @@ void shade_volume_loop(struct ShadeInput *shi, struct ShadeResult *shr);
void shade_input_set_triangle_i(struct ShadeInput *shi, struct ObjectInstanceRen *obi, struct VlakRen *vlr, short i1, short i2, short i3);
void shade_input_set_triangle(struct ShadeInput *shi, volatile int obi, volatile int facenr, int normal_flip);
void shade_input_copy_triangle(struct ShadeInput *shi, struct ShadeInput *from);
-void shade_input_calc_viewco(struct ShadeInput *shi, float x, float y, float z, float *view, float *dxyview, float *co, float *dxco, float *dyco);
+void shade_input_calc_viewco(struct ShadeInput *shi, float x, float y, float z, float view[3], float *dxyview, float *co, float *dxco, float *dyco);
void shade_input_set_viewco(struct ShadeInput *shi, float x, float y, float sx, float sy, float z);
void shade_input_set_uv(struct ShadeInput *shi);
void shade_input_set_normals(struct ShadeInput *shi);
@@ -96,7 +96,7 @@ void ambient_occlusion(struct ShadeInput *shi);
void environment_lighting_apply(struct ShadeInput *shi, struct ShadeResult *shr);
ListBase *get_lights(struct ShadeInput *shi);
-float lamp_get_visibility(struct LampRen *lar, float *co, float *lv, float *dist);
+float lamp_get_visibility(struct LampRen *lar, const float co[3], float *lv, float *dist);
void lamp_get_shadow(struct LampRen *lar, ShadeInput *shi, float inp, float *shadfac, int do_real);
float fresnel_fac(float *view, float *vn, float fresnel, float fac);
diff --git a/source/blender/render/intern/include/texture.h b/source/blender/render/intern/include/texture.h
index 1da144a099f..294c7b53766 100644
--- a/source/blender/render/intern/include/texture.h
+++ b/source/blender/render/intern/include/texture.h
@@ -64,11 +64,11 @@ struct ImBuf;
/* texture.h */
-void do_halo_tex(struct HaloRen *har, float xn, float yn, float *colf);
-void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, float *blend, int skyflag, short thread);
+void do_halo_tex(struct HaloRen *har, float xn, float yn, float col_r[4]);
+void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float hor[3], float zen[3], float *blend, int skyflag, short thread);
void do_material_tex(struct ShadeInput *shi);
-void do_lamp_tex(LampRen *la, float *lavec, struct ShadeInput *shi, float *colf, int effect);
-void do_volume_tex(struct ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val, struct Render *re);
+void do_lamp_tex(LampRen *la, const float lavec[3], struct ShadeInput *shi, float col_r[3], int effect);
+void do_volume_tex(struct ShadeInput *shi, const float *xyz, int mapto_flag, float *col, float *val, struct Render *re);
void init_render_textures(Render *re);
void end_render_textures(Render *re);
@@ -77,8 +77,8 @@ void render_realtime_texture(struct ShadeInput *shi, struct Image *ima);
/* imagetexture.h */
-int imagewraposa(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, float *texvec, float *dxt, float *dyt, struct TexResult *texres);
-int imagewrap(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, float *texvec, struct TexResult *texres);
+int imagewraposa(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, const float texvec[3], const float dxt[3], const float dyt[3], struct TexResult *texres);
+int imagewrap(struct Tex *tex, struct Image *ima, struct ImBuf *ibuf, const float texvec[3], struct TexResult *texres);
void image_sample(struct Image *ima, float fx, float fy, float dx, float dy, float *result);
#endif /* TEXTURE_EXT_H */
diff --git a/source/blender/render/intern/include/volumetric.h b/source/blender/render/intern/include/volumetric.h
index 6d8d4cbe0f2..87d74de9134 100644
--- a/source/blender/render/intern/include/volumetric.h
+++ b/source/blender/render/intern/include/volumetric.h
@@ -35,8 +35,8 @@ struct Isect;
struct ShadeInput;
struct ShadeResult;
-float vol_get_density(struct ShadeInput *shi, float *co);
-void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co_);
+float vol_get_density(struct ShadeInput *shi, const float co[3]);
+void vol_get_scattering(ShadeInput *shi, float scatter_col[3], const float co[3], const float view[3]);
void shade_volume_outside(ShadeInput *shi, ShadeResult *shr);
void shade_volume_inside(ShadeInput *shi, ShadeResult *shr);
diff --git a/source/blender/render/intern/include/voxeldata.h b/source/blender/render/intern/include/voxeldata.h
index 2353b24f310..68e924c1f2e 100644
--- a/source/blender/render/intern/include/voxeldata.h
+++ b/source/blender/render/intern/include/voxeldata.h
@@ -46,6 +46,6 @@ typedef struct VoxelDataHeader
void cache_voxeldata(Tex *tex, int scene_frame);
void make_voxeldata(struct Render *re);
void free_voxeldata(struct Render *re);
-int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres);
+int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texres);
#endif /* VOXELDATA_H */
diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h
index 4c87520d4d1..0d129081d62 100644
--- a/source/blender/render/intern/include/zbuf.h
+++ b/source/blender/render/intern/include/zbuf.h
@@ -51,9 +51,9 @@ void fillrect(int *rect, int x, int y, int val);
* Converts a world coordinate into a homogenous coordinate in view
* coordinates.
*/
-void projectvert(float *v1, float winmat[][4], float *adr);
-void projectverto(float *v1, float winmat[][4], float *adr);
-int testclip(float *v);
+void projectvert(const float v1[3], float winmat[][4], float adr[4]);
+void projectverto(const float v1[3], float winmat[][4], float adr[4]);
+int testclip(const float v[3]);
void zbuffer_shadow(struct Render *re, float winmat[][4], struct LampRen *lar, int *rectz, int size, float jitx, float jity);
void zbuffer_abuf_shadow(struct Render *re, struct LampRen *lar, float winmat[][4], struct APixstr *APixbuf, struct APixstrand *apixbuf, struct ListBase *apsmbase, int size, int samples, float (*jit)[2]);
diff --git a/source/blender/render/intern/raytrace/rayobject_octree.cpp b/source/blender/render/intern/raytrace/rayobject_octree.cpp
index e35fcbc2df7..5fa0b836f4f 100644
--- a/source/blender/render/intern/raytrace/rayobject_octree.cpp
+++ b/source/blender/render/intern/raytrace/rayobject_octree.cpp
@@ -264,7 +264,7 @@ static int face_in_node(RayFace *face, short x, short y, short z, float rtf[][3]
return 0;
}
-static void ocwrite(Octree *oc, RayFace *face, int quad, short x, short y, short z, float rtf[][3])
+static void ocwrite(Octree *oc, RayFace *face, int quad, short x, short y, short z, float rtf[4][3])
{
Branch *br;
Node *no;
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 2f79560efd6..a15662f86f4 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -142,7 +142,7 @@ static HaloRen *initstar(Render *re, ObjectRen *obr, float *vec, float hasize)
har= RE_findOrAddHalo(obr, obr->tothalo++);
/* projectvert is done in function zbufvlaggen again, because of parts */
- VECCOPY(har->co, vec);
+ copy_v3_v3(har->co, vec);
har->hasize= hasize;
har->zd= 0.0;
@@ -547,7 +547,7 @@ static void GetPosition(const SMikkTSpaceContext * pContext, float fPos[], const
SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData;
VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num);
const float *co= (&vlr->v1)[vert_index]->co;
- VECCOPY(fPos, co);
+ copy_v3_v3(fPos, co);
}
static void GetTextureCoordinate(const SMikkTSpaceContext * pContext, float fUV[], const int face_num, const int vert_index)
@@ -576,7 +576,7 @@ static void GetNormal(const SMikkTSpaceContext * pContext, float fNorm[], const
SRenderMeshToTangent * pMesh = (SRenderMeshToTangent *) pContext->m_pUserData;
VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num);
const float *n= (&vlr->v1)[vert_index]->n;
- VECCOPY(fNorm, n);
+ copy_v3_v3(fNorm, n);
}
static void SetTSpace(const SMikkTSpaceContext * pContext, const float fvTangent[], const float fSign, const int face_num, const int iVert)
{
@@ -585,7 +585,7 @@ static void SetTSpace(const SMikkTSpaceContext * pContext, const float fvTangent
VlakRen *vlr= RE_findOrAddVlak(pMesh->obr, face_num);
float * ftang= RE_vlakren_get_nmap_tangent(pMesh->obr, vlr, 1);
if(ftang!=NULL) {
- VECCOPY(&ftang[iVert*4+0], fvTangent);
+ copy_v3_v3(&ftang[iVert*4+0], fvTangent);
ftang[iVert*4+3]=fSign;
}
}
@@ -632,10 +632,10 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen
VlakRen *vlr= RE_findOrAddVlak(obr, a);
if((vlr->flag & ME_SMOOTH)==0) {
- if(is_zero_v3(vlr->v1->n)) VECCOPY(vlr->v1->n, vlr->n);
- if(is_zero_v3(vlr->v2->n)) VECCOPY(vlr->v2->n, vlr->n);
- if(is_zero_v3(vlr->v3->n)) VECCOPY(vlr->v3->n, vlr->n);
- if(vlr->v4 && is_zero_v3(vlr->v4->n)) VECCOPY(vlr->v4->n, vlr->n);
+ if(is_zero_v3(vlr->v1->n)) copy_v3_v3(vlr->v1->n, vlr->n);
+ if(is_zero_v3(vlr->v2->n)) copy_v3_v3(vlr->v2->n, vlr->n);
+ if(is_zero_v3(vlr->v3->n)) copy_v3_v3(vlr->v3->n, vlr->n);
+ if(vlr->v4 && is_zero_v3(vlr->v4->n)) copy_v3_v3(vlr->v4->n, vlr->n);
}
if(do_nmap_tangent) {
@@ -647,17 +647,17 @@ static void calc_vertexnormals(Render *UNUSED(re), ObjectRen *obr, int do_tangen
float *vtang, *ftang= RE_vlakren_get_nmap_tangent(obr, vlr, 1);
vtang= find_vertex_tangent(vtangents[v1->index], tface->uv[0]);
- VECCOPY(ftang, vtang);
+ copy_v3_v3(ftang, vtang);
normalize_v3(ftang);
vtang= find_vertex_tangent(vtangents[v2->index], tface->uv[1]);
- VECCOPY(ftang+4, vtang);
+ copy_v3_v3(ftang+4, vtang);
normalize_v3(ftang+4);
vtang= find_vertex_tangent(vtangents[v3->index], tface->uv[2]);
- VECCOPY(ftang+8, vtang);
+ copy_v3_v3(ftang+8, vtang);
normalize_v3(ftang+8);
if(v4) {
vtang= find_vertex_tangent(vtangents[v4->index], tface->uv[3]);
- VECCOPY(ftang+12, vtang);
+ copy_v3_v3(ftang+12, vtang);
normalize_v3(ftang+12);
}
for(k=0; k<4; k++) ftang[4*k+3]=1;
@@ -822,7 +822,7 @@ static void autosmooth(Render *UNUSED(re), ObjectRen *obr, float mat[][4], int d
if(obr->totvert==0) return;
asverts= MEM_callocN(sizeof(ASvert)*obr->totvert, "all smooth verts");
- thresh= cosf((float)M_PI*(0.5f+(float)degr)/180.0f );
+ thresh= cosf(DEG2RADF((0.5f + (float)degr)));
/* step zero: give faces normals of original mesh, if this is provided */
@@ -981,7 +981,7 @@ static void flag_render_node_material(Render *re, bNodeTree *ntree)
}
}
-static Material *give_render_material(Render *re, Object *ob, int nr)
+static Material *give_render_material(Render *re, Object *ob, short nr)
{
extern Material defmaterial; /* material.c */
Material *ma;
@@ -1023,7 +1023,7 @@ typedef struct ParticleStrandData
}
ParticleStrandData;
/* future thread problem... */
-static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, ParticleStrandData *sd, float *vec, float *vec1)
+static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, ParticleStrandData *sd, const float vec[3], const float vec1[3])
{
static VertRen *v1= NULL, *v2= NULL;
VlakRen *vlr= NULL;
@@ -1090,27 +1090,27 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
vlr->v3= RE_findOrAddVert(obr, obr->totvert++);
vlr->v4= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(vlr->v1->co, vec);
+ copy_v3_v3(vlr->v1->co, vec);
add_v3_v3(vlr->v1->co, cross);
- VECCOPY(vlr->v1->n, nor);
+ copy_v3_v3(vlr->v1->n, nor);
vlr->v1->orco= sd->orco;
vlr->v1->accum= -1.0f; // accum abuse for strand texco
- VECCOPY(vlr->v2->co, vec);
+ copy_v3_v3(vlr->v2->co, vec);
sub_v3_v3v3(vlr->v2->co, vlr->v2->co, cross);
- VECCOPY(vlr->v2->n, nor);
+ copy_v3_v3(vlr->v2->n, nor);
vlr->v2->orco= sd->orco;
vlr->v2->accum= vlr->v1->accum;
- VECCOPY(vlr->v4->co, vec1);
+ copy_v3_v3(vlr->v4->co, vec1);
add_v3_v3(vlr->v4->co, cross);
- VECCOPY(vlr->v4->n, nor);
+ copy_v3_v3(vlr->v4->n, nor);
vlr->v4->orco= sd->orco;
vlr->v4->accum= 1.0f; // accum abuse for strand texco
- VECCOPY(vlr->v3->co, vec1);
+ copy_v3_v3(vlr->v3->co, vec1);
sub_v3_v3v3(vlr->v3->co, vlr->v3->co, cross);
- VECCOPY(vlr->v3->n, nor);
+ copy_v3_v3(vlr->v3->n, nor);
vlr->v3->orco= sd->orco;
vlr->v3->accum= vlr->v4->accum;
@@ -1121,7 +1121,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
if(sd->surfnor) {
float *snor= RE_vlakren_get_surfnor(obr, vlr, 1);
- VECCOPY(snor, sd->surfnor);
+ copy_v3_v3(snor, sd->surfnor);
}
if(sd->uvco){
@@ -1156,23 +1156,23 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
/* first two vertices of a strand */
else if(sd->first) {
if(sd->adapt){
- VECCOPY(anor, nor);
- VECCOPY(avec, vec);
+ copy_v3_v3(anor, nor);
+ copy_v3_v3(avec, vec);
second=1;
}
v1= RE_findOrAddVert(obr, obr->totvert++);
v2= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(v1->co, vec);
+ copy_v3_v3(v1->co, vec);
add_v3_v3(v1->co, cross);
- VECCOPY(v1->n, nor);
+ copy_v3_v3(v1->n, nor);
v1->orco= sd->orco;
v1->accum= -1.0f; // accum abuse for strand texco
- VECCOPY(v2->co, vec);
+ copy_v3_v3(v2->co, vec);
sub_v3_v3v3(v2->co, v2->co, cross);
- VECCOPY(v2->n, nor);
+ copy_v3_v3(v2->n, nor);
v2->orco= sd->orco;
v2->accum= v1->accum;
}
@@ -1192,8 +1192,8 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
if(sd->adapt){
second=0;
- VECCOPY(anor,nor);
- VECCOPY(avec,vec);
+ copy_v3_v3(anor,nor);
+ copy_v3_v3(avec,vec);
}
}
@@ -1218,23 +1218,23 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
v1= vlr->v4; // cycle
v2= vlr->v3; // cycle
- VECCOPY(anor,nor);
- VECCOPY(avec,vec);
+ copy_v3_v3(anor,nor);
+ copy_v3_v3(avec,vec);
}
else{
vlr= RE_findOrAddVlak(obr, obr->totvlak-1);
}
}
- VECCOPY(vlr->v4->co, vec);
+ copy_v3_v3(vlr->v4->co, vec);
add_v3_v3(vlr->v4->co, cross);
- VECCOPY(vlr->v4->n, nor);
+ copy_v3_v3(vlr->v4->n, nor);
vlr->v4->orco= sd->orco;
vlr->v4->accum= -1.0f + 2.0f*sd->time; // accum abuse for strand texco
- VECCOPY(vlr->v3->co, vec);
+ copy_v3_v3(vlr->v3->co, vec);
sub_v3_v3v3(vlr->v3->co, vlr->v3->co, cross);
- VECCOPY(vlr->v3->n, nor);
+ copy_v3_v3(vlr->v3->n, nor);
vlr->v3->orco= sd->orco;
vlr->v3->accum= vlr->v4->accum;
@@ -1245,7 +1245,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
if(sd->surfnor) {
float *snor= RE_vlakren_get_surfnor(obr, vlr, 1);
- VECCOPY(snor, sd->surfnor);
+ copy_v3_v3(snor, sd->surfnor);
}
if(sd->uvco){
@@ -1279,7 +1279,7 @@ static void static_particle_strand(Render *re, ObjectRen *obr, Material *ma, Par
}
}
-static void static_particle_wire(ObjectRen *obr, Material *ma, float *vec, float *vec1, int first, int line)
+static void static_particle_wire(ObjectRen *obr, Material *ma, const float vec[3], const float vec1[3], int first, int line)
{
VlakRen *vlr;
static VertRen *v1;
@@ -1291,13 +1291,13 @@ static void static_particle_wire(ObjectRen *obr, Material *ma, float *vec, float
vlr->v3= vlr->v2;
vlr->v4= NULL;
- VECCOPY(vlr->v1->co, vec);
- VECCOPY(vlr->v2->co, vec1);
+ copy_v3_v3(vlr->v1->co, vec);
+ copy_v3_v3(vlr->v2->co, vec1);
sub_v3_v3v3(vlr->n, vec, vec1);
normalize_v3(vlr->n);
- VECCOPY(vlr->v1->n, vlr->n);
- VECCOPY(vlr->v2->n, vlr->n);
+ copy_v3_v3(vlr->v1->n, vlr->n);
+ copy_v3_v3(vlr->v2->n, vlr->n);
vlr->mat= ma;
vlr->ec= ME_V1V2;
@@ -1305,7 +1305,7 @@ static void static_particle_wire(ObjectRen *obr, Material *ma, float *vec, float
}
else if(first) {
v1= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(v1->co, vec);
+ copy_v3_v3(v1->co, vec);
}
else {
vlr= RE_findOrAddVlak(obr, obr->totvlak++);
@@ -1315,11 +1315,11 @@ static void static_particle_wire(ObjectRen *obr, Material *ma, float *vec, float
vlr->v4= NULL;
v1= vlr->v2; // cycle
- VECCOPY(v1->co, vec);
+ copy_v3_v3(v1->co, vec);
sub_v3_v3v3(vlr->n, vec, vec1);
normalize_v3(vlr->n);
- VECCOPY(v1->n, vlr->n);
+ copy_v3_v3(v1->n, vlr->n);
vlr->mat= ma;
vlr->ec= ME_V1V2;
@@ -1376,10 +1376,10 @@ static void particle_billboard(Render *re, ObjectRen *obr, Material *ma, Particl
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);
- VECCOPY(vlr->v1->n,vlr->n);
- VECCOPY(vlr->v2->n,vlr->n);
- VECCOPY(vlr->v3->n,vlr->n);
- VECCOPY(vlr->v4->n,vlr->n);
+ 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;
@@ -1470,7 +1470,7 @@ static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re
{
float loc[3], loc0[3], loc1[3], vel[3];
- VECCOPY(loc, state->co);
+ copy_v3_v3(loc, state->co);
if(ren_as != PART_DRAW_BB)
mul_m4_v3(re->viewmat, loc);
@@ -1481,15 +1481,15 @@ static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re
sd->time = 0.0f;
sd->size = hasize;
- VECCOPY(vel, state->vel);
+ copy_v3_v3(vel, state->vel);
mul_mat3_m4_v3(re->viewmat, vel);
normalize_v3(vel);
if(part->draw & PART_DRAW_VEL_LENGTH)
mul_v3_fl(vel, len_v3(state->vel));
- VECADDFAC(loc0, loc, vel, -part->draw_line[0]);
- VECADDFAC(loc1, loc, vel, part->draw_line[1]);
+ madd_v3_v3v3fl(loc0, loc, vel, -part->draw_line[0]);
+ madd_v3_v3v3fl(loc1, loc, vel, part->draw_line[1]);
particle_curve(re, obr, dm, ma, sd, loc0, loc1, seed, pa_co);
@@ -1497,8 +1497,8 @@ static void particle_normal_ren(short ren_as, ParticleSettings *part, Render *re
case PART_DRAW_BB:
- VECCOPY(bb->vec, loc);
- VECCOPY(bb->vel, state->vel);
+ copy_v3_v3(bb->vec, loc);
+ copy_v3_v3(bb->vel, state->vel);
particle_billboard(re, obr, ma, bb);
@@ -1717,7 +1717,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if(part->draw & PART_DRAW_REN_ADAPT) {
sd.adapt = 1;
sd.adapt_pix = (float)part->adapt_pix;
- sd.adapt_angle = cos((float)part->adapt_angle * (float)(M_PI / 180.0));
+ sd.adapt_angle = cosf(DEG2RADF((float)part->adapt_angle));
}
if(re->r.renderer==R_INTERN && part->draw&PART_DRAW_REN_STRAND) {
@@ -1728,7 +1728,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
strandbuf->winx= re->winx;
strandbuf->winy= re->winy;
strandbuf->maxdepth= 2;
- strandbuf->adaptcos= cos((float)part->adapt_angle*(float)(M_PI/180.0));
+ strandbuf->adaptcos= cosf(DEG2RADF((float)part->adapt_angle));
strandbuf->overrideuv= sd.override_uv;
strandbuf->minwidth= ma->strand_min;
@@ -1892,7 +1892,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
strand= RE_findOrAddStrand(obr, obr->totstrand++);
strand->buffer= strandbuf;
strand->vert= svert;
- VECCOPY(strand->orco, sd.orco);
+ copy_v3_v3(strand->orco, sd.orco);
if(dosimplify) {
float *ssimplify= RE_strandren_get_simplify(obr, strand, 1);
@@ -1902,7 +1902,7 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
if(sd.surfnor) {
float *snor= RE_strandren_get_surfnor(obr, strand, 1);
- VECCOPY(snor, sd.surfnor);
+ copy_v3_v3(snor, sd.surfnor);
}
if(dosurfacecache && num >= 0) {
@@ -1945,8 +1945,8 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
float time;
if(k<=max_k){
- VECCOPY(state.co,(cache+k)->co);
- VECCOPY(state.vel,(cache+k)->vel);
+ copy_v3_v3(state.co,(cache+k)->co);
+ copy_v3_v3(state.vel,(cache+k)->vel);
}
else
continue;
@@ -1955,11 +1955,11 @@ static int render_new_particle_system(Render *re, ObjectRen *obr, ParticleSystem
curlen += len_v3v3((cache+k-1)->co, (cache+k)->co);
time= curlen/strandlen;
- VECCOPY(loc,state.co);
+ copy_v3_v3(loc,state.co);
mul_m4_v3(re->viewmat,loc);
if(strandbuf) {
- VECCOPY(svert->co, loc);
+ copy_v3_v3(svert->co, loc);
svert->strandco= -1.0f + 2.0f*time;
svert++;
strand->totvert++;
@@ -1982,7 +1982,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);
- VECCOPY(loc1,loc);
+ copy_v3_v3(loc1,loc);
}
}
@@ -2147,7 +2147,7 @@ static void make_render_halos(Render *re, ObjectRen *obr, Mesh *UNUSED(me), int
if(ok) {
hasize= ma->hasize;
- VECCOPY(vec, mvert->co);
+ copy_v3_v3(vec, mvert->co);
mul_m4_v3(mat, vec);
if(ma->mode & MA_HALOPUNO) {
@@ -2161,7 +2161,7 @@ static void make_render_halos(Render *re, ObjectRen *obr, Mesh *UNUSED(me), int
nor[2]= imat[2][0]*xn+imat[2][1]*yn+imat[2][2]*zn;
normalize_v3(nor);
- VECCOPY(view, vec);
+ copy_v3_v3(view, vec);
normalize_v3(view);
zn= nor[0]*view[0]+nor[1]*view[1]+nor[2]*view[2];
@@ -2238,9 +2238,9 @@ static void displace_render_vert(Render *re, ObjectRen *obr, ShadeInput *shi, Ve
int i;
/* shi->co is current render coord, just make sure at least some vector is here */
- VECCOPY(shi->co, vr->co);
+ copy_v3_v3(shi->co, vr->co);
/* vertex normal is used for textures type 'col' and 'var' */
- VECCOPY(shi->vn, vr->n);
+ copy_v3_v3(shi->vn, vr->n);
if(mat)
mul_m4_v3(mat, shi->co);
@@ -2269,7 +2269,7 @@ static void displace_render_vert(Render *re, ObjectRen *obr, ShadeInput *shi, Ve
/* set all rendercoords, 'texco' is an ORed value for all textures needed */
if ((texco & TEXCO_ORCO) && (vr->orco)) {
- VECCOPY(shi->lo, vr->orco);
+ copy_v3_v3(shi->lo, vr->orco);
}
if (texco & TEXCO_STICKY) {
float *sticky= RE_vertren_get_sticky(obr, vr, 0);
@@ -2280,11 +2280,11 @@ static void displace_render_vert(Render *re, ObjectRen *obr, ShadeInput *shi, Ve
}
}
if (texco & TEXCO_GLOB) {
- VECCOPY(shi->gl, shi->co);
+ copy_v3_v3(shi->gl, shi->co);
mul_m4_v3(re->viewinv, shi->gl);
}
if (texco & TEXCO_NORM) {
- VECCOPY(shi->orn, shi->vn);
+ copy_v3_v3(shi->orn, shi->vn);
}
if(texco & TEXCO_REFL) {
/* not (yet?) */
@@ -2461,7 +2461,7 @@ static void init_render_mball(Render *re, ObjectRen *obr)
for(a=0; a<dl->nr; a++, data+=3, nors+=3) {
ver= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(ver->co, data);
+ copy_v3_v3(ver->co, data);
mul_m4_v3(mat, ver->co);
/* render normals are inverted */
@@ -2540,7 +2540,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
data= dl->verts;
for (u = 0; u < sizeu; u++) {
v1 = RE_findOrAddVert(obr, obr->totvert++); /* save this for possible V wrapping */
- VECCOPY(v1->co, data); data += 3;
+ copy_v3_v3(v1->co, data); data += 3;
if(orco) {
v1->orco= orco; orco+= 3; orcoret++;
}
@@ -2548,7 +2548,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
for (v = 1; v < sizev; v++) {
ver= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(ver->co, data); data += 3;
+ copy_v3_v3(ver->co, data); data += 3;
if(orco) {
ver->orco= orco; orco+= 3; orcoret++;
}
@@ -2557,7 +2557,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
/* if V-cyclic, add extra vertices at end of the row */
if (dl->flag & DL_CYCL_U) {
ver= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(ver->co, v1->co);
+ copy_v3_v3(ver->co, v1->co);
if(orco) {
ver->orco= orco; orco+=3; orcoret++; //orcobase + 3*(u*sizev + 0);
}
@@ -2573,7 +2573,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
for (v = 0; v < nsizev; v++) {
v1= RE_findOrAddVert(obr, startvert + v);
ver= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(ver->co, v1->co);
+ copy_v3_v3(ver->co, v1->co);
if(orco) {
ver->orco= orco; orco+=3; orcoret++; //ver->orco= orcobase + 3*(0*sizev + v);
}
@@ -2602,7 +2602,7 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
normal_quad_v3( n1,vlr->v4->co, vlr->v3->co, vlr->v2->co, vlr->v1->co);
- VECCOPY(vlr->n, n1);
+ copy_v3_v3(vlr->n, n1);
vlr->mat= matar[ dl->col];
vlr->ec= ME_V1V2+ME_V2V3;
@@ -2670,10 +2670,10 @@ static int dl_surf_to_renderdata(ObjectRen *obr, DispList *dl, Material **matar,
add_v3_v3(n1, vlr2->n);
vlr3= RE_findOrAddVlak(obr, UVTOINDEX(sizeu-1, 0)); /* (m,0) */
add_v3_v3(n1, vlr3->n);
- VECCOPY(vlr->v3->n, n1);
- VECCOPY(vlr1->v1->n, n1);
- VECCOPY(vlr2->v2->n, n1);
- VECCOPY(vlr3->v4->n, n1);
+ copy_v3_v3(vlr->v3->n, n1);
+ copy_v3_v3(vlr1->v1->n, n1);
+ copy_v3_v3(vlr2->v2->n, n1);
+ copy_v3_v3(vlr3->v4->n, n1);
}
for(a = startvert; a < obr->totvert; a++) {
ver= RE_findOrAddVert(obr, a);
@@ -2688,7 +2688,8 @@ static void init_render_dm(DerivedMesh *dm, Render *re, ObjectRen *obr,
int timeoffset, float *orco, float mat[4][4])
{
Object *ob= obr->ob;
- int a, a1, end, totvert, vertofs;
+ int a, end, totvert, vertofs;
+ short mat_iter;
VertRen *ver;
VlakRen *vlr;
MVert *mvert = NULL;
@@ -2701,7 +2702,7 @@ static void init_render_dm(DerivedMesh *dm, Render *re, ObjectRen *obr,
for(a=0; a<totvert; a++, mvert++) {
ver= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(ver->co, mvert->co);
+ copy_v3_v3(ver->co, mvert->co);
mul_m4_v3(mat, ver->co);
if(orco) {
@@ -2718,16 +2719,16 @@ static void init_render_dm(DerivedMesh *dm, Render *re, ObjectRen *obr,
/* faces in order of color blocks */
vertofs= obr->totvert - totvert;
- for(a1=0; (a1<ob->totcol || (a1==0 && ob->totcol==0)); a1++) {
+ for(mat_iter= 0; (mat_iter < ob->totcol || (mat_iter==0 && ob->totcol==0)); mat_iter++) {
- ma= give_render_material(re, ob, a1+1);
+ ma= give_render_material(re, ob, mat_iter+1);
end= dm->getNumFaces(dm);
mface= dm->getFaceArray(dm);
for(a=0; a<end; a++, mface++) {
int v1, v2, v3, v4, flag;
- if( mface->mat_nr==a1 ) {
+ if(mface->mat_nr == mat_iter) {
float len;
v1= mface->v1;
@@ -2913,7 +2914,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
for(a=0; a<dl->nr; a++, data+=3) {
ver= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(ver->co, data);
+ copy_v3_v3(ver->co, data);
mul_m4_v3(mat, ver->co);
@@ -2979,7 +2980,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
while(nr--) {
ver= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(ver->co, fp);
+ copy_v3_v3(ver->co, fp);
mul_m4_v3(mat, ver->co);
fp+= 3;
@@ -3340,7 +3341,7 @@ static void init_render_mesh(Render *re, ObjectRen *obr, int timeoffset)
for(a=0; a<totvert; a++, mvert++) {
ver= RE_findOrAddVert(obr, obr->totvert++);
- VECCOPY(ver->co, mvert->co);
+ copy_v3_v3(ver->co, mvert->co);
if(do_autosmooth==0) { /* autosmooth on original unrotated data to prevent differences between frames */
normal_short_to_float_v3(ver->n, mvert->no);
mul_m4_v3(mat, ver->co);
@@ -3782,7 +3783,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;
- VECCOPY(vec,ob->obmat[2]);
+ copy_v3_v3(vec,ob->obmat[2]);
normalize_v3(vec);
InitSunSky(lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness,
@@ -4001,7 +4002,7 @@ void init_render_world(Render *re)
cp[2]= 255.0f*re->wrld.horb;
cp[3]= 1;
- VECCOPY(re->grvec, re->viewmat[2]);
+ copy_v3_v3(re->grvec, re->viewmat[2]);
normalize_v3(re->grvec);
copy_m3_m4(re->imat, re->viewinv);
@@ -4051,25 +4052,25 @@ static void set_phong_threshold(ObjectRen *obr)
for(i=0; i<obr->totvlak; i++) {
vlr= RE_findOrAddVlak(obr, i);
if(vlr->flag & R_SMOOTH) {
- dot= INPR(vlr->n, vlr->v1->n);
+ dot= dot_v3v3(vlr->n, vlr->v1->n);
dot= ABS(dot);
if(dot>0.9f) {
thresh+= dot; tot++;
}
- dot= INPR(vlr->n, vlr->v2->n);
+ dot= dot_v3v3(vlr->n, vlr->v2->n);
dot= ABS(dot);
if(dot>0.9f) {
thresh+= dot; tot++;
}
- dot= INPR(vlr->n, vlr->v3->n);
+ dot= dot_v3v3(vlr->n, vlr->v3->n);
dot= ABS(dot);
if(dot>0.9f) {
thresh+= dot; tot++;
}
if(vlr->v4) {
- dot= INPR(vlr->n, vlr->v4->n);
+ dot= dot_v3v3(vlr->n, vlr->v4->n);
dot= ABS(dot);
if(dot>0.9f) {
thresh+= dot; tot++;
@@ -4340,16 +4341,16 @@ static void finalize_render_object(Render *re, ObjectRen *obr, int timeoffset)
strand_minmax(strand, smin, smax, width);
}
- VECCOPY(sbound->boundbox[0], smin);
- VECCOPY(sbound->boundbox[1], smax);
+ copy_v3_v3(sbound->boundbox[0], smin);
+ copy_v3_v3(sbound->boundbox[1], smax);
DO_MINMAX(smin, min, max);
DO_MINMAX(smax, min, max);
}
}
- VECCOPY(obr->boundbox[0], min);
- VECCOPY(obr->boundbox[1], max);
+ copy_v3_v3(obr->boundbox[0], min);
+ copy_v3_v3(obr->boundbox[1], max);
}
}
}
@@ -4932,7 +4933,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
/* fill in instance variables for texturing */
set_dupli_tex_mat(re, obi, dob);
if(dob->type != OB_DUPLIGROUP) {
- VECCOPY(obi->dupliorco, dob->orco);
+ copy_v3_v3(obi->dupliorco, dob->orco);
obi->dupliuv[0]= dob->uv[0];
obi->dupliuv[1]= dob->uv[1];
}
@@ -4958,7 +4959,7 @@ static void database_init_objects(Render *re, unsigned int renderlay, int nolamp
set_dupli_tex_mat(re, obi, dob);
if(dob->type != OB_DUPLIGROUP) {
- VECCOPY(obi->dupliorco, dob->orco);
+ copy_v3_v3(obi->dupliorco, dob->orco);
obi->dupliuv[0]= dob->uv[0];
obi->dupliuv[1]= dob->uv[1];
}
@@ -5064,7 +5065,7 @@ void RE_Database_FromScene(Render *re, Main *bmain, Scene *scene, unsigned int l
/* still bad... doing all */
init_render_textures(re);
- VECCOPY(amb, &re->wrld.ambr);
+ copy_v3_v3(amb, &re->wrld.ambr);
init_render_materials(re->main, re->r.mode, amb);
set_node_shader_lamp_loop(shade_material_loop);
@@ -5216,7 +5217,7 @@ static void database_fromscene_vectors(Render *re, Scene *scene, unsigned int la
}
/* choose to use static, to prevent giving too many args to this call */
-static void speedvector_project(Render *re, float *zco, float *co, float *ho)
+static void speedvector_project(Render *re, float zco[2], const float co[3], const float ho[4])
{
static float pixelphix=0.0f, pixelphiy=0.0f, zmulx=0.0f, zmuly=0.0f;
static int pano= 0;
@@ -5251,7 +5252,7 @@ static void speedvector_project(Render *re, float *zco, float *co, float *ho)
if(pano) {
float vec[3], ang;
/* angle between (0,0,-1) and (co) */
- VECCOPY(vec, co);
+ copy_v3_v3(vec, co);
ang= saacos(-vec[2]/sqrt(vec[0]*vec[0] + vec[2]*vec[2]));
if(vec[0]<0.0f) ang= -ang;
@@ -5267,7 +5268,7 @@ static void speedvector_project(Render *re, float *zco, float *co, float *ho)
}
}
-static void calculate_speedvector(float *vectors, int step, float winsq, float winroot, float *co, float *ho, float *speed)
+static void calculate_speedvector(const float vectors[2], int step, float winsq, float winroot, const float co[3], const float ho[4], float speed[4])
{
float zco[2], len;
@@ -5764,7 +5765,7 @@ void RE_Database_Baking(Render *re, Main *bmain, Scene *scene, unsigned int lay,
/* still bad... doing all */
init_render_textures(re);
- VECCOPY(amb, &re->wrld.ambr);
+ copy_v3_v3(amb, &re->wrld.ambr);
init_render_materials(re->main, re->r.mode, amb);
set_node_shader_lamp_loop(shade_material_loop);
@@ -5860,7 +5861,7 @@ void RE_make_sticky(Scene *scene, View3D *v3d)
ms= me->msticky;
for(a=0; a<me->totvert; a++, ms++, mvert++) {
- VECCOPY(ho, mvert->co);
+ copy_v3_v3(ho, mvert->co);
mul_m4_v3(mat, ho);
projectverto(ho, re->winmat, ho);
ms->co[0]= ho[0]/ho[3];
diff --git a/source/blender/render/intern/source/envmap.c b/source/blender/render/intern/source/envmap.c
index 66a73b47790..e2b3b23b9c9 100644
--- a/source/blender/render/intern/source/envmap.c
+++ b/source/blender/render/intern/source/envmap.c
@@ -240,8 +240,8 @@ static void envmap_transmatrix(float mat[][4], int part)
copy_m4_m4(tmat, mat);
eul_to_mat4( rotmat,eul);
mul_serie_m4(mat, tmat, rotmat,
- 0, 0, 0,
- 0, 0, 0);
+ NULL, NULL, NULL,
+ NULL, NULL, NULL);
}
/* ------------------------------------------------------------------------- */
diff --git a/source/blender/render/intern/source/imagetexture.c b/source/blender/render/intern/source/imagetexture.c
index 6d264951204..b290459a7c9 100644
--- a/source/blender/render/intern/source/imagetexture.c
+++ b/source/blender/render/intern/source/imagetexture.c
@@ -111,7 +111,7 @@ static void ibuf_get_color(float *col, struct ImBuf *ibuf, int x, int y)
}
}
-int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, TexResult *texres)
+int imagewrap(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], TexResult *texres)
{
float fx, fy, val1, val2, val3;
int x, y, retval;
@@ -1019,7 +1019,7 @@ static void image_mipmap_test(Tex *tex, ImBuf *ibuf)
}
-static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *dxt, float *dyt, TexResult *texres)
+static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], float dxt[3], float dyt[3], TexResult *texres)
{
TexResult texr;
float fx, fy, minx, maxx, miny, maxy;
@@ -1409,7 +1409,7 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec,
}
-int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, float *DYT, TexResult *texres)
+int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const float DXT[3], const float DYT[3], TexResult *texres)
{
TexResult texr;
float fx, fy, minx, maxx, miny, maxy, dx, dy, dxt[3], dyt[3];
@@ -1418,8 +1418,8 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, float *texvec, float *DXT, f
// TXF: since dxt/dyt might be modified here and since they might be needed after imagewraposa() call,
// make a local copy here so that original vecs remain untouched
- VECCOPY(dxt, DXT);
- VECCOPY(dyt, DYT);
+ copy_v3_v3(dxt, DXT);
+ copy_v3_v3(dyt, DYT);
// anisotropic filtering
if (tex->texfilter != TXF_BOX)
diff --git a/source/blender/render/intern/source/occlusion.c b/source/blender/render/intern/source/occlusion.c
index 54137c62d22..36dd4eb9708 100644
--- a/source/blender/render/intern/source/occlusion.c
+++ b/source/blender/render/intern/source/occlusion.c
@@ -1777,11 +1777,11 @@ void sample_occ(Render *re, ShadeInput *shi)
if(cache->sample && cache->step) {
sample= &cache->sample[(shi->ys-cache->y)*cache->w + (shi->xs-cache->x)];
- VECCOPY(sample->co, shi->co);
- VECCOPY(sample->n, shi->vno);
- VECCOPY(sample->ao, shi->ao);
- VECCOPY(sample->env, shi->env);
- VECCOPY(sample->indirect, shi->indirect);
+ copy_v3_v3(sample->co, shi->co);
+ copy_v3_v3(sample->n, shi->vno);
+ copy_v3_v3(sample->ao, shi->ao);
+ copy_v3_v3(sample->env, shi->env);
+ copy_v3_v3(sample->indirect, shi->indirect);
sample->intensity= MAX3(sample->ao[0], sample->ao[1], sample->ao[2]);
sample->intensity= MAX2(sample->intensity, MAX3(sample->env[0], sample->env[1], sample->env[2]));
sample->intensity= MAX2(sample->intensity, MAX3(sample->indirect[0], sample->indirect[1], sample->indirect[2]));
@@ -1872,11 +1872,11 @@ void cache_occ_samples(Render *re, RenderPart *pa, ShadeSample *ssamp)
exclude.facenr= shi->vlr->index;
sample_occ_tree(re, tree, &exclude, shi->co, shi->vno, shi->thread, onlyshadow, shi->ao, shi->env, shi->indirect);
- VECCOPY(sample->co, shi->co);
- VECCOPY(sample->n, shi->vno);
- VECCOPY(sample->ao, shi->ao);
- VECCOPY(sample->env, shi->env);
- VECCOPY(sample->indirect, shi->indirect);
+ copy_v3_v3(sample->co, shi->co);
+ copy_v3_v3(sample->n, shi->vno);
+ copy_v3_v3(sample->ao, shi->ao);
+ copy_v3_v3(sample->env, shi->env);
+ copy_v3_v3(sample->indirect, shi->indirect);
sample->intensity= MAX3(sample->ao[0], sample->ao[1], sample->ao[2]);
sample->intensity= MAX2(sample->intensity, MAX3(sample->env[0], sample->env[1], sample->env[2]));
sample->intensity= MAX2(sample->intensity, MAX3(sample->indirect[0], sample->indirect[1], sample->indirect[2]));
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 49e5e7b989d..05bcc32a90a 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -1452,10 +1452,12 @@ void RE_test_break_cb(Render *re, void *handle, int (*f)(void *handle))
/* object is considered fully prepared on correct time etc */
/* includes lights */
+#if 0
void RE_AddObject(Render *UNUSED(re), Object *UNUSED(ob))
{
}
+#endif
/* *************************************** */
diff --git a/source/blender/render/intern/source/pixelshading.c b/source/blender/render/intern/source/pixelshading.c
index febfea89f04..5c5162d268b 100644
--- a/source/blender/render/intern/source/pixelshading.c
+++ b/source/blender/render/intern/source/pixelshading.c
@@ -76,7 +76,7 @@ extern struct Render R;
extern float hashvectf[];
-static void render_lighting_halo(HaloRen *har, float *colf)
+static void render_lighting_halo(HaloRen *har, float col_r[3])
{
GroupObject *go;
LampRen *lar;
@@ -246,9 +246,9 @@ static void render_lighting_halo(HaloRen *har, float *colf)
if(ig<0.0f) ig= 0.0f;
if(ib<0.0f) ib= 0.0f;
- colf[0]*= ir;
- colf[1]*= ig;
- colf[2]*= ib;
+ col_r[0]*= ir;
+ col_r[1]*= ig;
+ col_r[2]*= ib;
}
@@ -306,7 +306,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz,
/* soften the halo if it intersects geometry */
if(har->mat && har->mat->mode & MA_HALO_SOFT) {
- float segment_length, halo_depth, distance_from_z, visible_depth, soften;
+ float segment_length, halo_depth, distance_from_z /* , visible_depth */ /* UNUSED */, soften;
/* calculate halo depth */
segment_length= har->hasize*sasqrt(1.0f - dist/(har->rad*har->rad));
@@ -317,7 +317,7 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz,
/* calculate how much of this depth is visible */
distance_from_z = haloZtoDist(zz) - haloZtoDist(har->zs);
- visible_depth = halo_depth;
+ /* visible_depth = halo_depth; */ /* UNUSED */
if(distance_from_z < segment_length) {
soften= (segment_length + distance_from_z)/halo_depth;
@@ -502,8 +502,8 @@ int shadeHaloFloat(HaloRen *har, float *col, int zz,
/* ------------------------------------------------------------------------- */
-/* Only view vector is important here. Result goes to colf[3] */
-void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short thread)
+/* Only view vector is important here. Result goes to col_r[3] */
+void shadeSkyView(float col_r[3], const float rco[3], const float view[3], const float dxyview[2], short thread)
{
float lo[3], zen[3], hor[3], blend, blendm;
int skyflag;
@@ -528,13 +528,13 @@ void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short th
blend= fabs(0.5f + view[1]);
}
- VECCOPY(hor, &R.wrld.horr);
- VECCOPY(zen, &R.wrld.zenr);
+ copy_v3_v3(hor, &R.wrld.horr);
+ copy_v3_v3(zen, &R.wrld.zenr);
/* Careful: SKYTEX and SKYBLEND are NOT mutually exclusive! If */
/* SKYBLEND is active, the texture and color blend are added. */
if(R.wrld.skytype & WO_SKYTEX) {
- VECCOPY(lo, view);
+ copy_v3_v3(lo, view);
if(R.wrld.skytype & WO_SKYREAL) {
mul_m3_v3(R.imat, lo);
@@ -550,19 +550,19 @@ void shadeSkyView(float *colf, float *rco, float *view, float *dxyview, short th
/* No clipping, no conversion! */
if(R.wrld.skytype & WO_SKYBLEND) {
- colf[0] = (blendm*hor[0] + blend*zen[0]);
- colf[1] = (blendm*hor[1] + blend*zen[1]);
- colf[2] = (blendm*hor[2] + blend*zen[2]);
+ col_r[0] = (blendm*hor[0] + blend*zen[0]);
+ col_r[1] = (blendm*hor[1] + blend*zen[1]);
+ col_r[2] = (blendm*hor[2] + blend*zen[2]);
} else {
/* Done when a texture was grabbed. */
- colf[0]= hor[0];
- colf[1]= hor[1];
- colf[2]= hor[2];
+ col_r[0]= hor[0];
+ col_r[1]= hor[1];
+ col_r[2]= hor[2];
}
}
/* shade sky according to sun lamps, all parameters are like shadeSkyView except sunsky*/
-void shadeSunView(float *colf, float *view)
+void shadeSunView(float col_r[3], const float view[3])
{
GroupObject *go;
LampRen *lar;
@@ -576,9 +576,8 @@ void shadeSunView(float *colf, float *view)
float colorxyz[3];
if(do_init) {
-
- VECCOPY(sview, view);
- normalize_v3(sview);
+
+ normalize_v3_v3(sview, view);
mul_m3_v3(R.imat, sview);
if (sview[2] < 0.0f)
sview[2] = 0.0f;
@@ -590,7 +589,7 @@ void shadeSunView(float *colf, float *view)
xyz_to_rgb(colorxyz[0], colorxyz[1], colorxyz[2], &sun_collector[0], &sun_collector[1], &sun_collector[2],
lar->sunsky->sky_colorspace);
- ramp_blend(lar->sunsky->skyblendtype, colf, colf+1, colf+2, lar->sunsky->skyblendfac, sun_collector);
+ ramp_blend(lar->sunsky->skyblendtype, col_r, col_r+1, col_r+2, lar->sunsky->skyblendfac, sun_collector);
}
}
}
@@ -599,7 +598,7 @@ void shadeSunView(float *colf, float *view)
/*
Stuff the sky color into the collector.
*/
-void shadeSkyPixel(float *collector, float fx, float fy, short thread)
+void shadeSkyPixel(float collector[4], float fx, float fy, short thread)
{
float view[3], dxyview[2];
@@ -649,10 +648,10 @@ void shadeSkyPixel(float *collector, float fx, float fy, short thread)
}
/* aerial perspective */
-void shadeAtmPixel(struct SunSky *sunsky, float *collector, float fx, float fy, float distance)
+void shadeAtmPixel(struct SunSky *sunsky, float collector[3], float fx, float fy, float distance)
{
float view[3];
-
+
calc_view_vector(view, fx, fy);
normalize_v3(view);
/*mul_m3_v3(R.imat, view);*/
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index 28406732b9d..5f5a4e9c638 100644
--- a/source/blender/render/intern/source/pointdensity.c
+++ b/source/blender/render/intern/source/pointdensity.c
@@ -107,7 +107,7 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
ParticleSimulationData sim= {NULL};
ParticleData *pa=NULL;
float cfra = BKE_curframe(re->scene);
- int i, childexists;
+ int i /*, childexists*/ /* UNUSED */;
int total_particles, offset=0;
int data_used = point_data_used(pd);
float partco[3];
@@ -143,9 +143,11 @@ static void pointdensity_cache_psys(Render *re, PointDensity *pd, Object *ob, Pa
pd->totpoints = total_particles;
if (data_used & POINT_DATA_VEL) offset = pd->totpoints*3;
+#if 0 /* UNUSED */
if (psys->totchild > 0 && !(psys->part->draw & PART_DRAW_PARENT))
childexists = 1;
-
+#endif
+
for (i=0, pa=psys->particles; i < total_particles; i++, pa++) {
state.time = cfra;
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index 56b6dedd24c..2b04a3520e8 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -125,7 +125,7 @@ static void init_render_texture(Render *re, Tex *tex)
}
if(tex->nodetree && tex->use_nodes) {
- ntreeBeginExecTree(tex->nodetree); /* has internal flag to detect it only does it once */
+ ntreeTexBeginExecTree(tex->nodetree, 1); /* has internal flag to detect it only does it once */
}
}
@@ -144,8 +144,8 @@ void init_render_textures(Render *re)
static void end_render_texture(Tex *tex)
{
- if(tex && tex->use_nodes && tex->nodetree)
- ntreeEndExecTree(tex->nodetree);
+ if(tex && tex->use_nodes && tex->nodetree && tex->nodetree->execdata)
+ ntreeTexEndExecTree(tex->nodetree->execdata, 1);
}
void end_render_textures(Render *re)
@@ -505,7 +505,7 @@ static int stucci(Tex *tex, float *texvec, TexResult *texres)
if(texres->nor) {
- VECCOPY(texres->nor, nor);
+ copy_v3_v3(texres->nor, nor);
tex_normal_derivate(tex, texres);
if(tex->stype==TEX_WALLOUT) {
@@ -755,9 +755,9 @@ static int plugintex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex
if(pit && pit->doit) {
if(texres->nor) {
if (pit->version < 6) {
- VECCOPY(pit->result+5, texres->nor);
+ copy_v3_v3(pit->result+5, texres->nor);
} else {
- VECCOPY(result+5, texres->nor);
+ copy_v3_v3(result+5, texres->nor);
}
}
if (pit->version < 6) {
@@ -781,9 +781,9 @@ static int plugintex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex
if(rgbnor & TEX_NOR) {
if(texres->nor) {
if (pit->version < 6) {
- VECCOPY(texres->nor, pit->result+5);
+ copy_v3_v3(texres->nor, pit->result+5);
} else {
- VECCOPY(texres->nor, result+5);
+ copy_v3_v3(texres->nor, result+5);
}
}
}
@@ -820,7 +820,7 @@ static int cubemap_glob(float *n, float x, float y, float z, float *adr1, float
nor[0]= x; nor[1]= y; nor[2]= z; // use local render coord
}
else {
- VECCOPY(nor, n);
+ copy_v3_v3(nor, n);
}
mul_mat3_m4_v3(R.viewinv, nor);
@@ -914,7 +914,7 @@ static int cubemap_ob(Object *ob, float *n, float x, float y, float z, float *ad
if(n==NULL) return 0;
- VECCOPY(nor, n);
+ copy_v3_v3(nor, n);
if(ob) mul_mat3_m4_v3(ob->imat, nor);
x1= fabs(nor[0]);
@@ -1219,7 +1219,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
/* ton: added this, for Blender convention reason.
* artificer: added the use of tmpvec to avoid scaling texvec
*/
- VECCOPY(tmpvec, texvec);
+ copy_v3_v3(tmpvec, texvec);
mul_v3_fl(tmpvec, 1.0f/tex->noisesize);
switch(tex->stype) {
@@ -1241,7 +1241,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
/* ton: added this, for Blender convention reason.
* artificer: added the use of tmpvec to avoid scaling texvec
*/
- VECCOPY(tmpvec, texvec);
+ copy_v3_v3(tmpvec, texvec);
mul_v3_fl(tmpvec, 1.0f/tex->noisesize);
retval= voronoiTex(tex, tmpvec, texres);
@@ -1250,7 +1250,7 @@ static int multitex(Tex *tex, float *texvec, float *dxt, float *dyt, int osatex,
/* ton: added this, for Blender convention reason.
* artificer: added the use of tmpvec to avoid scaling texvec
*/
- VECCOPY(tmpvec, texvec);
+ copy_v3_v3(tmpvec, texvec);
mul_v3_fl(tmpvec, 1.0f/tex->noisesize);
retval= mg_distNoiseTex(tex, tmpvec, texres);
@@ -1374,7 +1374,7 @@ int multitex_ext_safe(Tex *tex, float *texvec, TexResult *texres)
/* in = destination, tex = texture, out = previous color */
/* fact = texture strength, facg = button strength value */
-void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg, int blendtype)
+void texture_rgb_blend(float in[3], const float tex[3], const float out[3], float fact, float facg, int blendtype)
{
float facm, col;
@@ -1477,32 +1477,32 @@ void texture_rgb_blend(float *in, float *tex, float *out, float fact, float facg
case MTEX_BLEND_HUE:
fact*= facg;
- VECCOPY(in, out);
+ copy_v3_v3(in, out);
ramp_blend(MA_RAMP_HUE, in, in+1, in+2, fact, tex);
break;
case MTEX_BLEND_SAT:
fact*= facg;
- VECCOPY(in, out);
+ copy_v3_v3(in, out);
ramp_blend(MA_RAMP_SAT, in, in+1, in+2, fact, tex);
break;
case MTEX_BLEND_VAL:
fact*= facg;
- VECCOPY(in, out);
+ copy_v3_v3(in, out);
ramp_blend(MA_RAMP_VAL, in, in+1, in+2, fact, tex);
break;
case MTEX_BLEND_COLOR:
fact*= facg;
- VECCOPY(in, out);
+ copy_v3_v3(in, out);
ramp_blend(MA_RAMP_COLOR, in, in+1, in+2, fact, tex);
break;
case MTEX_SOFT_LIGHT:
fact*= facg;
- VECCOPY(in, out);
+ copy_v3_v3(in, out);
ramp_blend(MA_RAMP_SOFT, in, in+1, in+2, fact, tex);
break;
case MTEX_LIN_LIGHT:
fact*= facg;
- VECCOPY(in, out);
+ copy_v3_v3(in, out);
ramp_blend(MA_RAMP_LINEAR, in, in+1, in+2, fact, tex);
break;
}
@@ -1924,8 +1924,8 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
Hscale *= 0.1f; // factor 0.1 proved to look like the previous bump code
if( !ntap_bump->init_done ) {
- VECCOPY(ntap_bump->vNacc, shi->vn);
- VECCOPY(ntap_bump->vNorg, shi->vn);
+ copy_v3_v3(ntap_bump->vNacc, shi->vn);
+ copy_v3_v3(ntap_bump->vNorg, shi->vn);
ntap_bump->fPrevMagnitude = 1.0f;
ntap_bump->iPrevBumpSpace = 0;
@@ -1994,7 +1994,7 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
else {
/* same as above, but doing 5 taps, increasing quality at cost of speed */
float STc[3], STl[3], STr[3], STd[3], STu[3];
- float Hc, Hl, Hr, Hd, Hu;
+ float /* Hc, */ /* UNUSED */ Hl, Hr, Hd, Hu;
texco_mapping(shi, tex, mtex, co, dx, dy, texvec, dxt, dyt);
@@ -2017,7 +2017,7 @@ 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;
+ /* Hc = (fromrgb)? RGBTOBW(texres->tr, texres->tg, texres->tb) : texres->tin; */ /* UNUSED */
// use ttexr for the other taps
multitex_mtex(shi, mtex, STl, dxt, dyt, &ttexr);
@@ -2056,9 +2056,9 @@ static int ntap_bump_compute(NTapBump *ntap_bump, ShadeInput *shi, MTex *mtex, T
float obj2view[3][3], view2obj[3][3], tmp[4][4];
// local copies of derivatives and normal
float dPdx[3], dPdy[3], vN[3];
- VECCOPY(dPdx, shi->dxco);
- VECCOPY(dPdy, shi->dyco);
- VECCOPY(vN, ntap_bump->vNorg);
+ copy_v3_v3(dPdx, shi->dxco);
+ copy_v3_v3(dPdy, shi->dyco);
+ copy_v3_v3(vN, ntap_bump->vNorg);
if( mtex->texflag & MTEX_BUMP_OBJECTSPACE ) {
// TODO: these calculations happen for every pixel!
@@ -2200,14 +2200,14 @@ void do_material_tex(ShadeInput *shi)
co= tempvec;
dx= dxt;
dy= dyt;
- VECCOPY(tempvec, shi->co);
+ copy_v3_v3(tempvec, shi->co);
if(mtex->texflag & MTEX_OB_DUPLI_ORIG)
if(shi->obi && shi->obi->duplitexmat)
mul_m4_v3(shi->obi->duplitexmat, tempvec);
mul_m4_v3(ob->imat_ren, tempvec);
if(shi->osatex) {
- VECCOPY(dxt, shi->dxco);
- VECCOPY(dyt, shi->dyco);
+ copy_v3_v3(dxt, shi->dxco);
+ copy_v3_v3(dyt, shi->dyco);
mul_mat3_m4_v3(ob->imat_ren, dxt);
mul_mat3_m4_v3(ob->imat_ren, dyt);
}
@@ -2369,7 +2369,7 @@ void do_material_tex(ShadeInput *shi)
float *warpnor= texres.nor, warpnor_[3];
if(use_ntap_bump) {
- VECCOPY(warpnor_, texres.nor);
+ copy_v3_v3(warpnor_, texres.nor);
warpnor= warpnor_;
normalize_v3(warpnor_);
}
@@ -2485,7 +2485,7 @@ void do_material_tex(ShadeInput *shi)
else {
float nor[3];
- VECCOPY(nor, texres.nor);
+ copy_v3_v3(nor, texres.nor);
if(mtex->normapspace == MTEX_NSPACE_CAMERA);
else if(mtex->normapspace == MTEX_NSPACE_WORLD) {
@@ -2526,7 +2526,7 @@ void do_material_tex(ShadeInput *shi)
nor[1]= Tnor*norfac*texres.nor[1];
nor[2]= Tnor*norfac*texres.nor[2];
- dot= 0.5f + 0.5f*INPR(nor, shi->vn);
+ dot= 0.5f + 0.5f * dot_v3v3(nor, shi->vn);
shi->vn[0]+= dot*nor[0];
shi->vn[1]+= dot*nor[1];
@@ -2658,7 +2658,7 @@ void do_material_tex(ShadeInput *shi)
}
-void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, float *val, Render *re)
+void do_volume_tex(ShadeInput *shi, const float *xyz, int mapto_flag, float *col, float *val, Render *re)
{
MTex *mtex;
Tex *tex;
@@ -2687,7 +2687,7 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa
if(mtex->texco==TEXCO_OBJECT) {
Object *ob= mtex->object;
if(ob) {
- VECCOPY(co, xyz);
+ copy_v3_v3(co, xyz);
if(mtex->texflag & MTEX_OB_DUPLI_ORIG) {
if(shi->obi && shi->obi->duplitexmat)
mul_m4_v3(shi->obi->duplitexmat, co);
@@ -2699,16 +2699,16 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa
else if(mtex->texco==TEXCO_ORCO) {
if(mtex->texflag & MTEX_DUPLI_MAPTO) {
- VECCOPY(co, shi->duplilo);
+ copy_v3_v3(co, shi->duplilo);
}
else {
Object *ob= shi->obi->ob;
- VECCOPY(co, xyz);
+ copy_v3_v3(co, xyz);
mul_m4_v3(ob->imat_ren, co);
}
}
else if(mtex->texco==TEXCO_GLOB) {
- VECCOPY(co, xyz);
+ copy_v3_v3(co, xyz);
mul_m4_v3(re->viewinv, co);
}
else continue; // can happen when texco defines disappear and it renders old files
@@ -2838,7 +2838,7 @@ void do_volume_tex(ShadeInput *shi, float *xyz, int mapto_flag, float *col, floa
/* ------------------------------------------------------------------------- */
-void do_halo_tex(HaloRen *har, float xn, float yn, float *colf)
+void do_halo_tex(HaloRen *har, float xn, float yn, float col_r[4])
{
MTex *mtex;
TexResult texres= {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL};
@@ -2945,23 +2945,23 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float *colf)
if(mtex->blendtype==MTEX_SUB) fact= -fact;
if(mtex->blendtype==MTEX_BLEND) {
- colf[0]= (fact*texres.tr + facm*har->r);
- colf[1]= (fact*texres.tg + facm*har->g);
- colf[2]= (fact*texres.tb + facm*har->b);
+ col_r[0]= (fact*texres.tr + facm*har->r);
+ col_r[1]= (fact*texres.tg + facm*har->g);
+ col_r[2]= (fact*texres.tb + facm*har->b);
}
else if(mtex->blendtype==MTEX_MUL) {
- colf[0]= (facm+fact*texres.tr)*har->r;
- colf[1]= (facm+fact*texres.tg)*har->g;
- colf[2]= (facm+fact*texres.tb)*har->b;
+ col_r[0]= (facm+fact*texres.tr)*har->r;
+ col_r[1]= (facm+fact*texres.tg)*har->g;
+ col_r[2]= (facm+fact*texres.tb)*har->b;
}
else {
- colf[0]= (fact*texres.tr + har->r);
- colf[1]= (fact*texres.tg + har->g);
- colf[2]= (fact*texres.tb + har->b);
+ col_r[0]= (fact*texres.tr + har->r);
+ col_r[1]= (fact*texres.tg + har->g);
+ col_r[2]= (fact*texres.tb + har->b);
- CLAMP(colf[0], 0.0f, 1.0f);
- CLAMP(colf[1], 0.0f, 1.0f);
- CLAMP(colf[2], 0.0f, 1.0f);
+ CLAMP(col_r[0], 0.0f, 1.0f);
+ CLAMP(col_r[1], 0.0f, 1.0f);
+ CLAMP(col_r[2], 0.0f, 1.0f);
}
}
if(mtex->mapto & MAP_ALPHA) {
@@ -2970,14 +2970,14 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float *colf)
else texres.tin= (0.35f*texres.tr+0.45f*texres.tg+0.2f*texres.tb);
}
- colf[3]*= texres.tin;
+ col_r[3]*= texres.tin;
}
}
/* ------------------------------------------------------------------------- */
/* hor and zen are RGB vectors, blend is 1 float, should all be initialized */
-void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, float *blend, int skyflag, short thread)
+void do_sky_tex(const float rco[3], float lo[3], const float dxyview[2], float hor[3], float zen[3], float *blend, int skyflag, short thread)
{
MTex *mtex;
Tex *tex;
@@ -3054,7 +3054,7 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f
break;
case TEXCO_OBJECT:
if(mtex->object) {
- VECCOPY(tempvec, lo);
+ copy_v3_v3(tempvec, lo);
mul_m4_v3(mtex->object->imat_ren, tempvec);
co= tempvec;
}
@@ -3062,16 +3062,16 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f
case TEXCO_GLOB:
if(rco) {
- VECCOPY(tempvec, rco);
+ copy_v3_v3(tempvec, rco);
mul_m4_v3(R.viewinv, tempvec);
co= tempvec;
}
else
co= lo;
-// VECCOPY(shi->dxgl, shi->dxco);
+// copy_v3_v3(shi->dxgl, shi->dxco);
// mul_m3_v3(R.imat, shi->dxco);
-// VECCOPY(shi->dygl, shi->dyco);
+// copy_v3_v3(shi->dygl, shi->dyco);
// mul_m3_v3(R.imat, shi->dyco);
break;
}
@@ -3172,9 +3172,9 @@ void do_sky_tex(float *rco, float *lo, float *dxyview, float *hor, float *zen, f
}
/* ------------------------------------------------------------------------- */
-/* colf supposed to be initialized with la->r,g,b */
+/* col_r supposed to be initialized with la->r,g,b */
-void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int effect)
+void do_lamp_tex(LampRen *la, const float lavec[3], ShadeInput *shi, float col_r[3], int effect)
{
Object *ob;
MTex *mtex;
@@ -3203,11 +3203,11 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
co= tempvec;
dx= dxt;
dy= dyt;
- VECCOPY(tempvec, shi->co);
+ copy_v3_v3(tempvec, shi->co);
mul_m4_v3(ob->imat_ren, tempvec);
if(shi->osatex) {
- VECCOPY(dxt, shi->dxco);
- VECCOPY(dyt, shi->dyco);
+ copy_v3_v3(dxt, shi->dxco);
+ copy_v3_v3(dyt, shi->dyco);
mul_mat3_m4_v3(ob->imat_ren, dxt);
mul_mat3_m4_v3(ob->imat_ren, dyt);
}
@@ -3219,12 +3219,12 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
}
else if(mtex->texco==TEXCO_GLOB) {
co= shi->gl; dx= shi->dxco; dy= shi->dyco;
- VECCOPY(shi->gl, shi->co);
+ copy_v3_v3(shi->gl, shi->co);
mul_m4_v3(R.viewinv, shi->gl);
}
else if(mtex->texco==TEXCO_VIEW) {
- VECCOPY(tempvec, lavec);
+ copy_v3_v3(tempvec, lavec);
mul_m3_v3(la->imat, tempvec);
if(la->type==LA_SPOT) {
@@ -3238,8 +3238,8 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
dx= dxt; dy= dyt;
if(shi->osatex) {
- VECCOPY(dxt, shi->dxlv);
- VECCOPY(dyt, shi->dylv);
+ copy_v3_v3(dxt, shi->dxlv);
+ copy_v3_v3(dyt, shi->dylv);
/* need some matrix conversion here? la->imat is a [3][3] matrix!!! **/
mul_m3_v3(la->imat, dxt);
mul_m3_v3(la->imat, dyt);
@@ -3356,7 +3356,7 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
col[1]= texres.tg*la->energy;
col[2]= texres.tb*la->energy;
- texture_rgb_blend(colf, col, colf, texres.tin, mtex->colfac, mtex->blendtype);
+ texture_rgb_blend(col_r, col, col_r, texres.tin, mtex->colfac, mtex->blendtype);
}
}
}
@@ -3364,7 +3364,7 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
/* ------------------------------------------------------------------------- */
-int externtex(MTex *mtex, float *vec, float *tin, float *tr, float *tg, float *tb, float *ta, const int thread)
+int externtex(MTex *mtex, const float vec[3], float *tin, float *tr, float *tg, float *tb, float *ta, const int thread)
{
Tex *tex;
TexResult texr;
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index b66740c87ba..bc5e7f23e21 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -128,7 +128,7 @@ void calc_view_vector(float *view, float x, float y)
}
}
-void calc_renderco_ortho(float *co, float x, float y, int z)
+void calc_renderco_ortho(float co[3], float x, float y, int z)
{
/* x and y 3d coordinate can be derived from pixel coord and winmat */
float fx= 2.0f/(R.winx*R.winmat[0][0]);
@@ -142,7 +142,7 @@ void calc_renderco_ortho(float *co, float x, float y, int z)
co[2]= R.winmat[3][2]/( R.winmat[2][3]*zco - R.winmat[2][2] );
}
-void calc_renderco_zbuf(float *co, float *view, int z)
+void calc_renderco_zbuf(float co[3], float *view, int z)
{
float fac, zco;
@@ -992,7 +992,7 @@ static void convert_to_key_alpha(RenderPart *pa, RenderLayer *rl)
}
/* adds only alpha values */
-void edge_enhance_tile(RenderPart *pa, float *rectf, int *rectz)
+static void edge_enhance_tile(RenderPart *pa, float *rectf, int *rectz)
{
/* use zbuffer to define edges, add it to the image */
int y, x, col, *rz, *rz1, *rz2, *rz3;
@@ -1133,7 +1133,7 @@ typedef struct ZbufSolidData {
float *edgerect;
} ZbufSolidData;
-void make_pixelstructs(RenderPart *pa, ZSpan *zspan, int sample, void *data)
+static void make_pixelstructs(RenderPart *pa, ZSpan *zspan, int sample, void *data)
{
ZbufSolidData *sdata= (ZbufSolidData*)data;
ListBase *lb= sdata->psmlist;
@@ -1515,7 +1515,7 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe
{
ShadeInput *shi= ssamp->shi;
ShadeResult shr;
- float texfac, orthoarea, nor[3], alpha, sx, sy;
+ float /* texfac,*/ /* UNUSED */ orthoarea, nor[3], alpha, sx, sy;
/* cache for shadow */
shi->samplenr= R.shadowsamplenr[shi->thread]++;
@@ -1578,7 +1578,7 @@ static void shade_sample_sss(ShadeSample *ssamp, Material *mat, ObjectInstanceRe
VECCOPY(color, shr.combined);
/* texture blending */
- texfac= shi->mat->sss_texfac;
+ /* texfac= shi->mat->sss_texfac; */ /* UNUSED */
alpha= shr.combined[3];
*area *= alpha;
@@ -2234,21 +2234,17 @@ static int bake_intersect_tree(RayObject* raytree, Isect* isect, float *start, f
maxdist= R.r.bake_maxdist;
else
maxdist= RE_RAYTRACE_MAXDIST + R.r.bake_biasdist;
-
+
/* 'dir' is always normalized */
- VECADDFAC(isect->start, start, dir, -R.r.bake_biasdist);
+ madd_v3_v3v3fl(isect->start, start, dir, -R.r.bake_biasdist);
- isect->dir[0] = dir[0]*sign;
- isect->dir[1] = dir[1]*sign;
- isect->dir[2] = dir[2]*sign;
+ mul_v3_v3fl(isect->dir, dir, sign);
isect->dist = maxdist;
hit = RE_rayobject_raycast(raytree, isect);
if(hit) {
- hitco[0] = isect->start[0] + isect->dist*isect->dir[0];
- hitco[1] = isect->start[1] + isect->dist*isect->dir[1];
- hitco[2] = isect->start[2] + isect->dist*isect->dir[2];
+ madd_v3_v3v3fl(hitco, isect->start, isect->dir, isect->dist);
*dist= isect->dist;
}
diff --git a/source/blender/render/intern/source/renderdatabase.c b/source/blender/render/intern/source/renderdatabase.c
index 0c5ad0475ab..7a39342ac8d 100644
--- a/source/blender/render/intern/source/renderdatabase.c
+++ b/source/blender/render/intern/source/renderdatabase.c
@@ -428,7 +428,7 @@ VlakRen *RE_vlakren_copy(ObjectRen *obr, VlakRen *vlr)
surfnor= RE_vlakren_get_surfnor(obr, vlr, 0);
if(surfnor) {
surfnor1= RE_vlakren_get_surfnor(obr, vlr1, 1);
- VECCOPY(surfnor1, surfnor);
+ copy_v3_v3(surfnor1, surfnor);
}
tangent= RE_vlakren_get_nmap_tangent(obr, vlr, 0);
@@ -451,13 +451,12 @@ void RE_vlakren_get_normal(Render *UNUSED(re), ObjectInstanceRen *obi, VlakRen *
float (*nmat)[3]= obi->nmat;
if(obi->flag & R_TRANSFORMED) {
- VECCOPY(nor, vlr->n);
-
- mul_m3_v3(nmat, nor);
+ mul_v3_m3v3(nor, nmat, vlr->n);
normalize_v3(nor);
}
- else
- VECCOPY(nor, vlr->n);
+ else {
+ copy_v3_v3(nor, vlr->n);
+ }
}
void RE_set_customdata_names(ObjectRen *obr, CustomData *data)
@@ -953,7 +952,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f
}
har= RE_findOrAddHalo(obr, obr->tothalo++);
- VECCOPY(har->co, vec);
+ copy_v3_v3(har->co, vec);
har->hasize= hasize;
/* actual projectvert is done in function project_renderdata() because of parts/border/pano */
@@ -1009,7 +1008,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f
else {
mtex= ma->mtex[0];
- VECCOPY(texvec, vec);
+ copy_v3_v3(texvec, vec);
if(mtex->texco & TEXCO_NORM) {
;
@@ -1022,7 +1021,7 @@ HaloRen *RE_inithalo(Render *re, ObjectRen *obr, Material *ma, float *vec, f
}
else {
if(orco) {
- VECCOPY(texvec, orco);
+ copy_v3_v3(texvec, orco);
}
}
@@ -1067,7 +1066,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
}
har= RE_findOrAddHalo(obr, obr->tothalo++);
- VECCOPY(har->co, vec);
+ copy_v3_v3(har->co, vec);
har->hasize= hasize;
/* actual projectvert is done in function project_renderdata() because of parts/border/pano */
@@ -1123,7 +1122,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
for(i=0; i<MAX_MTEX; i++)
if(ma->mtex[i] && (ma->septex & (1<<i))==0) {
mtex= ma->mtex[i];
- VECCOPY(texvec, vec);
+ copy_v3_v3(texvec, vec);
if(mtex->texco & TEXCO_NORM) {
;
@@ -1133,7 +1132,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
mul_m4_v3(mtex->object->imat_ren,texvec);
}
else if(mtex->texco & TEXCO_GLOB){
- VECCOPY(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);
@@ -1153,7 +1152,7 @@ HaloRen *RE_inithalo_particle(Render *re, ObjectRen *obr, DerivedMesh *dm, Mater
texvec[2] = pa_co[2];
}
else if(orco) {
- VECCOPY(texvec, orco);
+ copy_v3_v3(texvec, orco);
}
hasrgb = externtex(mtex, texvec, &tin, &tr, &tg, &tb, &ta, 0);
@@ -1238,7 +1237,7 @@ static int panotestclip(Render *re, int do_pano, float *v)
- shadow buffering (shadbuf.c)
*/
-void project_renderdata(Render *re, void (*projectfunc)(float *, float mat[][4], float *), int do_pano, float xoffs, int UNUSED(do_buckets))
+void project_renderdata(Render *re, void (*projectfunc)(const float *, float mat[][4], float *), int do_pano, float xoffs, int UNUSED(do_buckets))
{
ObjectRen *obr;
HaloRen *har = NULL;
@@ -1264,7 +1263,7 @@ void project_renderdata(Render *re, void (*projectfunc)(float *, float mat[][4],
vec[2]= -re->panosi*har->co[0] + re->panoco*har->co[2];
}
else {
- VECCOPY(vec, har->co);
+ copy_v3_v3(vec, har->co);
}
projectfunc(vec, re->winmat, hoco);
diff --git a/source/blender/render/intern/source/shadbuf.c b/source/blender/render/intern/source/shadbuf.c
index 5860c395b07..a4bf6c6b5e1 100644
--- a/source/blender/render/intern/source/shadbuf.c
+++ b/source/blender/render/intern/source/shadbuf.c
@@ -61,16 +61,16 @@
/* XXX, could be better implemented... this is for endian issues
*/
-#if defined(__sgi) || defined(__sparc) || defined(__sparc__) || defined (__PPC__) || defined (__ppc__) || defined (__hppa__) || defined (__BIG_ENDIAN__)
-#define RCOMP 3
-#define GCOMP 2
-#define BCOMP 1
-#define ACOMP 0
+#ifdef __BIG_ENDIAN__
+# define RCOMP 3
+# define GCOMP 2
+# define BCOMP 1
+# define ACOMP 0
#else
-#define RCOMP 0
-#define GCOMP 1
-#define BCOMP 2
-#define ACOMP 3
+# define RCOMP 0
+# define GCOMP 1
+# define BCOMP 2
+# define ACOMP 3
#endif
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
@@ -1099,7 +1099,7 @@ static float readshadowbuf(ShadBuf *shb, ShadSampleBuf *shsample, int bias, int
}
}
-static void shadowbuf_project_co(float *x, float *y, float *z, ShadBuf *shb, float co[3])
+static void shadowbuf_project_co(float *x, float *y, float *z, ShadBuf *shb, const float co[3])
{
float hco[4], size= 0.5f*(float)shb->size;
@@ -1115,7 +1115,7 @@ static void shadowbuf_project_co(float *x, float *y, float *z, ShadBuf *shb, flo
/* the externally called shadow testing (reading) function */
/* return 1.0: no shadow at all */
-float testshadowbuf(Render *re, ShadBuf *shb, float *co, float *dxco, float *dyco, float inp, float mat_bias)
+float testshadowbuf(Render *re, ShadBuf *shb, const float co[3], const float dxco[3], const float dyco[3], float inp, float mat_bias)
{
ShadSampleBuf *shsample;
float fac, dco[3], dx[3], dy[3], shadfac=0.0f;
@@ -1291,7 +1291,7 @@ static float readshadowbuf_halo(ShadBuf *shb, ShadSampleBuf *shsample, int xs, i
}
-float shadow_halo(LampRen *lar, float *p1, float *p2)
+float shadow_halo(LampRen *lar, const float p1[3], const float p2[3])
{
/* p1 p2 already are rotated in spot-space */
ShadBuf *shb= lar->shb;
@@ -1469,7 +1469,7 @@ static void init_box(Boxf *box)
}
/* use v1 to calculate boundbox */
-static void bound_boxf(Boxf *box, float *v1)
+static void bound_boxf(Boxf *box, const float v1[3])
{
if(v1[0] < box->xmin) box->xmin= v1[0];
if(v1[0] > box->xmax) box->xmax= v1[0];
@@ -1480,7 +1480,7 @@ static void bound_boxf(Boxf *box, float *v1)
}
/* use v1 to calculate boundbox */
-static void bound_rectf(rctf *box, float *v1)
+static void bound_rectf(rctf *box, const float v1[2])
{
if(v1[0] < box->xmin) box->xmin= v1[0];
if(v1[0] > box->xmax) box->xmax= v1[0];
@@ -1639,24 +1639,17 @@ static int isb_bsp_insert(ISBBranch *root, MemArena *memarena, ISBSample *sample
return 0;
}
-static float VecLen2f( float *v1, float *v2)
-{
- float x= v1[0]-v2[0];
- float y= v1[1]-v2[1];
- return (float)sqrt(x*x+y*y);
-}
-
/* initialize vars in face, for optimal point-in-face test */
static void bspface_init_strand(BSPFace *face)
{
- face->radline= 0.5f*VecLen2f(face->v1, face->v2);
+ face->radline= 0.5f* len_v2v2(face->v1, face->v2);
mid_v3_v3v3(face->vec1, face->v1, face->v2);
if(face->v4)
mid_v3_v3v3(face->vec2, face->v3, face->v4);
else
- VECCOPY(face->vec2, face->v3);
+ copy_v3_v3(face->vec2, face->v3);
face->rc[0]= face->vec2[0]-face->vec1[0];
face->rc[1]= face->vec2[1]-face->vec1[1];
@@ -1671,7 +1664,7 @@ static void bspface_init_strand(BSPFace *face)
}
/* brought back to a simple 2d case */
-static int point_behind_strand(float *p, BSPFace *face)
+static int point_behind_strand(const float p[3], BSPFace *face)
{
/* v1 - v2 is radius, v1 - v3 length */
float dist, rc[2], pt[2];
@@ -1712,7 +1705,7 @@ static int point_behind_strand(float *p, BSPFace *face)
/* return 1 if inside. code derived from src/parametrizer.c */
-static int point_behind_tria2d(float *p, float *v1, float *v2, float *v3)
+static int point_behind_tria2d(const float p[3], const float v1[3], const float v2[3], const float v3[3])
{
float a[2], c[2], h[2], div;
float u, v;
@@ -1751,7 +1744,7 @@ static int point_behind_tria2d(float *p, float *v1, float *v2, float *v3)
/* tested these calls, but it gives inaccuracy, 'side' cannot be found reliably using v3 */
/* check if line v1-v2 has all rect points on other side of point v3 */
-static int rect_outside_line(rctf *rect, float *v1, float *v2, float *v3)
+static int rect_outside_line(rctf *rect, const float v1[3], const float v2[3], const float v3[3])
{
float a, b, c;
int side;
@@ -1772,7 +1765,7 @@ static int rect_outside_line(rctf *rect, float *v1, float *v2, float *v3)
}
/* check if one of the triangle edges separates all rect points on 1 side */
-static int rect_isect_tria(rctf *rect, float *v1, float *v2, float *v3)
+static int rect_isect_tria(rctf *rect, const float v1[3], const float v2[3], const float v3[3])
{
if(rect_outside_line(rect, v1, v2, v3))
return 0;
@@ -1935,7 +1928,7 @@ static void isb_bsp_test_face(ZSpan *zspan, int obi, int zvlnr, float *v1, float
isb_bsp_face_inside((ISBBranch *)zspan->rectz, &face);
}
-static int testclip_minmax(float *ho, float *minmax)
+static int testclip_minmax(const float ho[4], const float minmax[4])
{
float wco= ho[3];
int flag= 0;
@@ -2064,7 +2057,7 @@ static void isb_bsp_fillfaces(Render *re, LampRen *lar, ISBBranch *root)
}
/* returns 1 when the viewpixel is visible in lampbuffer */
-static int viewpixel_to_lampbuf(ShadBuf *shb, ObjectInstanceRen *obi, VlakRen *vlr, float x, float y, float *co)
+static int viewpixel_to_lampbuf(ShadBuf *shb, ObjectInstanceRen *obi, VlakRen *vlr, float x, float y, float co_r[3])
{
float hoco[4], v1[3], nor[3];
float dface, fac, siz;
@@ -2123,12 +2116,12 @@ static int viewpixel_to_lampbuf(ShadBuf *shb, ObjectInstanceRen *obi, VlakRen *v
return 0;
siz= 0.5f*(float)shb->size;
- co[0]= siz*(1.0f+hoco[0]/hoco[3]) -0.5f;
- co[1]= siz*(1.0f+hoco[1]/hoco[3]) -0.5f;
- co[2]= ((float)0x7FFFFFFF)*(hoco[2]/hoco[3]);
+ co_r[0]= siz*(1.0f+hoco[0]/hoco[3]) -0.5f;
+ co_r[1]= siz*(1.0f+hoco[1]/hoco[3]) -0.5f;
+ co_r[2]= ((float)0x7FFFFFFF)*(hoco[2]/hoco[3]);
/* XXXX bias, much less than normal shadbuf, or do we need a constant? */
- co[2] -= 0.05f*shb->bias;
+ co_r[2] -= 0.05f*shb->bias;
return 1;
}
diff --git a/source/blender/render/intern/source/shadeinput.c b/source/blender/render/intern/source/shadeinput.c
index 7dc5f0dfa4a..44aa227fe4c 100644
--- a/source/blender/render/intern/source/shadeinput.c
+++ b/source/blender/render/intern/source/shadeinput.c
@@ -114,10 +114,8 @@ void shade_material_loop(ShadeInput *shi, ShadeResult *shr)
float fac= shi->translucency;
shade_input_init_material(shi);
-
- VECCOPY(shi->vn, shi->vno);
- VECMUL(shi->vn, -1.0f);
- VECMUL(shi->facenor, -1.0f);
+ negate_v3_v3(shi->vn, shi->vno);
+ negate_v3(shi->facenor);
shi->depth++; /* hack to get real shadow now */
shade_lamp_loop(shi, &shr_t);
shi->depth--;
@@ -184,8 +182,8 @@ void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr)
/* copy additional passes */
if(shi->passflag & (SCE_PASS_VECTOR|SCE_PASS_NORMAL)) {
- QUATCOPY(shr->winspeed, shi->winspeed);
- VECCOPY(shr->nor, shi->vn);
+ copy_v4_v4(shr->winspeed, shi->winspeed);
+ copy_v3_v3(shr->nor, shi->vn);
}
/* MIST */
@@ -286,9 +284,9 @@ void shade_input_set_triangle_i(ShadeInput *shi, ObjectInstanceRen *obi, VlakRen
/* calculate vertexnormals */
if(vlr->flag & R_SMOOTH) {
- VECCOPY(shi->n1, shi->v1->n);
- VECCOPY(shi->n2, shi->v2->n);
- VECCOPY(shi->n3, shi->v3->n);
+ copy_v3_v3(shi->n1, shi->v1->n);
+ copy_v3_v3(shi->n2, shi->v2->n);
+ copy_v3_v3(shi->n3, shi->v3->n);
if(obi->flag & R_TRANSFORMED) {
mul_m3_v3(obi->nmat, shi->n1); normalize_v3(shi->n1);
@@ -341,26 +339,26 @@ void shade_input_set_strand(ShadeInput *shi, StrandRen *strand, StrandPoint *spo
shi->mode= shi->mat->mode_l; /* or-ed result for all nodes */
/* shade_input_set_viewco equivalent */
- VECCOPY(shi->co, spoint->co);
- VECCOPY(shi->view, shi->co);
+ copy_v3_v3(shi->co, spoint->co);
+ copy_v3_v3(shi->view, shi->co);
normalize_v3(shi->view);
shi->xs= (int)spoint->x;
shi->ys= (int)spoint->y;
if(shi->osatex || (R.r.mode & R_SHADOW)) {
- VECCOPY(shi->dxco, spoint->dtco);
- VECCOPY(shi->dyco, spoint->dsco);
+ copy_v3_v3(shi->dxco, spoint->dtco);
+ copy_v3_v3(shi->dyco, spoint->dsco);
}
/* dxview, dyview, not supported */
/* facenormal, simply viewco flipped */
- VECCOPY(shi->facenor, spoint->nor);
+ copy_v3_v3(shi->facenor, spoint->nor);
/* shade_input_set_normals equivalent */
if(shi->mat->mode & MA_TANGENT_STR) {
- VECCOPY(shi->vn, spoint->tan)
+ copy_v3_v3(shi->vn, spoint->tan);
}
else {
float cross[3];
@@ -369,11 +367,11 @@ void shade_input_set_strand(ShadeInput *shi, StrandRen *strand, StrandPoint *spo
cross_v3_v3v3(shi->vn, cross, spoint->tan);
normalize_v3(shi->vn);
- if(INPR(shi->vn, shi->view) < 0.0f)
+ if(dot_v3v3(shi->vn, shi->view) < 0.0f)
negate_v3(shi->vn);
}
- VECCOPY(shi->vno, shi->vn);
+ copy_v3_v3(shi->vno, shi->vn);
}
void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert *svert, StrandPoint *spoint)
@@ -393,17 +391,17 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
}
if(mode & (MA_TANGENT_V|MA_NORMAP_TANG)) {
- VECCOPY(shi->tang, spoint->tan);
- VECCOPY(shi->nmaptang, spoint->tan);
+ copy_v3_v3(shi->tang, spoint->tan);
+ copy_v3_v3(shi->nmaptang, spoint->tan);
}
if(mode & MA_STR_SURFDIFF) {
float *surfnor= RE_strandren_get_surfnor(obr, strand, 0);
if(surfnor)
- VECCOPY(shi->surfnor, surfnor)
+ copy_v3_v3(shi->surfnor, surfnor);
else
- VECCOPY(shi->surfnor, shi->vn)
+ copy_v3_v3(shi->surfnor, shi->vn);
if(shi->mat->strand_surfnor > 0.0f) {
shi->surfdist= 0.0f;
@@ -418,7 +416,7 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
speed= RE_strandren_get_winspeed(shi->obi, strand, 0);
if(speed)
- QUATCOPY(shi->winspeed, speed)
+ copy_v4_v4(shi->winspeed, speed);
else
shi->winspeed[0]= shi->winspeed[1]= shi->winspeed[2]= shi->winspeed[3]= 0.0f;
}
@@ -426,18 +424,18 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
/* shade_input_set_shade_texco equivalent */
if(texco & NEED_UV) {
if(texco & TEXCO_ORCO) {
- VECCOPY(shi->lo, strand->orco);
+ copy_v3_v3(shi->lo, strand->orco);
/* no shi->osatex, orco derivatives are zero */
}
if(texco & TEXCO_GLOB) {
- VECCOPY(shi->gl, shi->co);
+ copy_v3_v3(shi->gl, shi->co);
mul_m4_v3(R.viewinv, shi->gl);
if(shi->osatex) {
- VECCOPY(shi->dxgl, shi->dxco);
+ copy_v3_v3(shi->dxgl, shi->dxco);
mul_mat3_m4_v3(R.viewinv, shi->dxgl);
- VECCOPY(shi->dygl, shi->dyco);
+ copy_v3_v3(shi->dygl, shi->dyco);
mul_mat3_m4_v3(R.viewinv, shi->dygl);
}
}
@@ -591,7 +589,7 @@ void shade_input_set_strand_texco(ShadeInput *shi, StrandRen *strand, StrandVert
}
/* from scanline pixel coordinates to 3d coordinates, requires set_triangle */
-void shade_input_calc_viewco(ShadeInput *shi, float x, float y, float z, float *view, float *dxyview, float *co, float *dxco, float *dyco)
+void shade_input_calc_viewco(ShadeInput *shi, float x, float y, float z, float view[3], float dxyview[2], float co[3], float dxco[3], float dyco[3])
{
/* returns not normalized, so is in viewplane coords */
calc_view_vector(view, x, y);
@@ -608,7 +606,7 @@ void shade_input_calc_viewco(ShadeInput *shi, float x, float y, float z, float *
/* for non-wire, intersect with the triangle to get the exact coord */
float fac, dface, v1[3];
- VECCOPY(v1, shi->v1->co);
+ copy_v3_v3(v1, shi->v1->co);
if(shi->obi->flag & R_TRANSFORMED)
mul_m4_v3(shi->obi->mat, v1);
@@ -726,9 +724,9 @@ void shade_input_set_uv(ShadeInput *shi)
if((vlr->flag & R_SMOOTH) || (shi->mat->texco & NEED_UV) || (shi->passflag & SCE_PASS_UV)) {
float v1[3], v2[3], v3[3];
- VECCOPY(v1, shi->v1->co);
- VECCOPY(v2, shi->v2->co);
- VECCOPY(v3, shi->v3->co);
+ copy_v3_v3(v1, shi->v1->co);
+ copy_v3_v3(v2, shi->v2->co);
+ copy_v3_v3(v3, shi->v3->co);
if(shi->obi->flag & R_TRANSFORMED) {
mul_m4_v3(shi->obi->mat, v1);
@@ -827,18 +825,18 @@ void shade_input_set_normals(ShadeInput *shi)
shi->vn[2]= l*n3[2]-u*n1[2]-v*n2[2];
// use unnormalized normal (closer to games)
- VECCOPY(shi->nmapnorm, shi->vn);
+ copy_v3_v3(shi->nmapnorm, shi->vn);
normalize_v3(shi->vn);
}
else
{
- VECCOPY(shi->vn, shi->facenor);
- VECCOPY(shi->nmapnorm, shi->vn);
+ copy_v3_v3(shi->vn, shi->facenor);
+ copy_v3_v3(shi->nmapnorm, shi->vn);
}
/* used in nodes */
- VECCOPY(shi->vno, shi->vn);
+ copy_v3_v3(shi->vno, shi->vn);
/* flip normals to viewing direction */
if(!(shi->vlr->flag & R_TANGENT))
@@ -861,18 +859,18 @@ void shade_input_set_vertex_normals(ShadeInput *shi)
shi->vn[2]= l*n3[2]-u*n1[2]-v*n2[2];
// use unnormalized normal (closer to games)
- VECCOPY(shi->nmapnorm, shi->vn);
+ copy_v3_v3(shi->nmapnorm, shi->vn);
normalize_v3(shi->vn);
}
else
{
- VECCOPY(shi->vn, shi->facenor);
- VECCOPY(shi->nmapnorm, shi->vn);
+ copy_v3_v3(shi->vn, shi->facenor);
+ copy_v3_v3(shi->nmapnorm, shi->vn);
}
/* used in nodes */
- VECCOPY(shi->vno, shi->vn);
+ copy_v3_v3(shi->vno, shi->vn);
}
@@ -961,7 +959,7 @@ void shade_input_set_shade_texco(ShadeInput *shi)
mul_m3_v3(obi->nmat, shi->tang);
normalize_v3(shi->tang);
- VECCOPY(shi->nmaptang, shi->tang);
+ copy_v3_v3(shi->nmaptang, shi->tang);
}
}
@@ -974,9 +972,9 @@ void shade_input_set_shade_texco(ShadeInput *shi)
vlr_set_uv_indices(shi->vlr, &j1, &j2, &j3);
- VECCOPY(c0, &tangent[j1*4]);
- VECCOPY(c1, &tangent[j2*4]);
- VECCOPY(c2, &tangent[j3*4]);
+ copy_v3_v3(c0, &tangent[j1*4]);
+ copy_v3_v3(c1, &tangent[j2*4]);
+ copy_v3_v3(c2, &tangent[j3*4]);
// keeping tangents normalized at vertex level
// corresponds better to how it's done in game engines
@@ -1004,12 +1002,12 @@ void shade_input_set_shade_texco(ShadeInput *shi)
float *surfnor= RE_vlakren_get_surfnor(obr, shi->vlr, 0);
if(surfnor) {
- VECCOPY(shi->surfnor, surfnor)
+ copy_v3_v3(shi->surfnor, surfnor);
if(obi->flag & R_TRANSFORMED)
mul_m3_v3(obi->nmat, shi->surfnor);
}
else
- VECCOPY(shi->surfnor, shi->vn)
+ copy_v3_v3(shi->surfnor, shi->vn);
shi->surfdist= 0.0f;
}
@@ -1062,16 +1060,16 @@ void shade_input_set_shade_texco(ShadeInput *shi)
}
}
- VECCOPY(shi->duplilo, obi->dupliorco);
+ copy_v3_v3(shi->duplilo, obi->dupliorco);
}
if(texco & TEXCO_GLOB) {
- VECCOPY(shi->gl, shi->co);
+ copy_v3_v3(shi->gl, shi->co);
mul_m4_v3(R.viewinv, shi->gl);
if(shi->osatex) {
- VECCOPY(shi->dxgl, shi->dxco);
+ copy_v3_v3(shi->dxgl, shi->dxco);
mul_mat3_m4_v3(R.viewinv, shi->dxgl);
- VECCOPY(shi->dygl, shi->dyco);
+ copy_v3_v3(shi->dygl, shi->dyco);
mul_mat3_m4_v3(R.viewinv, shi->dygl);
}
}
@@ -1181,8 +1179,9 @@ void shade_input_set_shade_texco(ShadeInput *shi)
shi->vcol[2]= 1.0f;
shi->vcol[3]= 1.0f;
}
- if(tface && tface->tpage)
+ if(tface->tpage) {
render_realtime_texture(shi, tface->tpage);
+ }
}
diff --git a/source/blender/render/intern/source/shadeoutput.c b/source/blender/render/intern/source/shadeoutput.c
index af4236e6d84..274c9bdc424 100644
--- a/source/blender/render/intern/source/shadeoutput.c
+++ b/source/blender/render/intern/source/shadeoutput.c
@@ -85,7 +85,7 @@ static void fogcolor(float *colf, float *rco, float *view)
hor[0]= R.wrld.horr; hor[1]= R.wrld.horg; hor[2]= R.wrld.horb;
zen[0]= R.wrld.zenr; zen[1]= R.wrld.zeng; zen[2]= R.wrld.zenb;
- VECCOPY(vec, rco);
+ copy_v3_v3(vec, rco);
/* we loop from cur coord to mist start in steps */
stepsize= 1.0f;
@@ -486,8 +486,8 @@ static float area_lamp_energy_multisample(LampRen *lar, float *co, float *vn)
int a= lar->ray_totsamp;
/* test if co is behind lamp */
- VECSUB(vec, co, lar->co);
- if(INPR(vec, lar->vec) < 0.0f)
+ sub_v3_v3v3(vec, co, lar->co);
+ if(dot_v3v3(vec, lar->vec) < 0.0f)
return 0.0f;
while(a--) {
@@ -1125,21 +1125,21 @@ float lamp_get_visibility(LampRen *lar, float *co, float *lv, float *dist)
{
if(lar->type==LA_SUN || lar->type==LA_HEMI) {
*dist= 1.0f;
- VECCOPY(lv, lar->vec);
+ copy_v3_v3(lv, lar->vec);
return 1.0f;
}
else {
float visifac= 1.0f, t;
- VECSUB(lv, co, lar->co);
- *dist= sqrt( INPR(lv, lv));
+ sub_v3_v3v3(lv, co, lar->co);
+ *dist= sqrtf(dot_v3v3(lv, lv));
t= 1.0f/dist[0];
- VECMUL(lv, t);
+ mul_v3_fl(lv, t);
/* area type has no quad or sphere option */
if(lar->type==LA_AREA) {
/* area is single sided */
- //if(INPR(lv, lar->vec) > 0.0f)
+ //if(dot_v3v3(lv, lar->vec) > 0.0f)
// visifac= 1.0f;
//else
// visifac= 0.0f;
@@ -1185,11 +1185,11 @@ float lamp_get_visibility(LampRen *lar, float *co, float *lv, float *dist)
float inpr;
if(lar->mode & LA_SQUARE) {
- if(lv[0]*lar->vec[0]+lv[1]*lar->vec[1]+lv[2]*lar->vec[2]>0.0f) {
+ if(dot_v3v3(lv, lar->vec) > 0.0f) {
float lvrot[3], x;
/* rotate view to lampspace */
- VECCOPY(lvrot, lv);
+ copy_v3_v3(lvrot, lv);
mul_m3_v3(lar->imat, lvrot);
x= MAX2(fabs(lvrot[0]/lvrot[2]) , fabs(lvrot[1]/lvrot[2]));
@@ -1285,7 +1285,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
cross_v3_v3v3(cross, shi->surfnor, vn);
cross_v3_v3v3(nstrand, vn, cross);
- blend= INPR(nstrand, shi->surfnor);
+ blend= dot_v3v3(nstrand, shi->surfnor);
blend= 1.0f - blend;
CLAMP(blend, 0.0f, 1.0f);
@@ -1320,8 +1320,8 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
/* dot product and reflectivity */
/* inp = dotproduct, is = shader result, i = lamp energy (with shadow), i_noshad = i without shadow */
- inp= vn[0]*lv[0] + vn[1]*lv[1] + vn[2]*lv[2];
-
+ inp= dot_v3v3(vn, lv);
+
/* phong threshold to prevent backfacing faces having artefacts on ray shadow (terminator problem) */
/* this complex construction screams for a nicer implementation! (ton) */
if(R.r.mode & R_SHADOW) {
@@ -1389,7 +1389,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
if(lar->shb || (lar->mode & LA_SHAD_RAY)) {
if(vn==vnor) /* tangent trigger */
- lamp_get_shadow(lar, shi, INPR(shi->vn, lv), shadfac, shi->depth);
+ lamp_get_shadow(lar, shi, dot_v3v3(shi->vn, lv), shadfac, shi->depth);
else
lamp_get_shadow(lar, shi, inp, shadfac, shi->depth);
@@ -1431,7 +1431,7 @@ static void shade_one_light(LampRen *lar, ShadeInput *shi, ShadeResult *shr, int
add_to_diffuse(shr->diff, shi, is, i_noshad*lacol[0], i_noshad*lacol[1], i_noshad*lacol[2]);
}
else
- VECCOPY(shr->diff, shr->shad);
+ copy_v3_v3(shr->diff, shr->shad);
}
}
@@ -1508,12 +1508,12 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
LampRen *lar;
GroupObject *go;
float inpr, lv[3];
- float *view, shadfac[4];
+ float /* *view, */ shadfac[4];
float ir, accum, visifac, lampdist;
float shaded = 0.0f, lightness = 0.0f;
- view= shi->view;
+ /* view= shi->view; */ /* UNUSED */
accum= ir= 0.0f;
lights= get_lights(shi);
@@ -1537,7 +1537,7 @@ static void shade_lamp_loop_only_shadow(ShadeInput *shi, ShadeResult *shr)
continue;
}
- inpr= INPR(shi->vn, lv);
+ inpr= dot_v3v3(shi->vn, lv);
if(inpr <= 0.0f) {
if (shi->mat->shadowonly_flag == MA_SO_OLD)
accum+= 1.0f;
@@ -1724,9 +1724,9 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
/* AO was calculated for scanline already */
if(shi->depth || shi->volume_depth)
ambient_occlusion(shi);
- VECCOPY(shr->ao, shi->ao);
- VECCOPY(shr->env, shi->env); // XXX multiply
- VECCOPY(shr->indirect, shi->indirect); // XXX multiply
+ copy_v3_v3(shr->ao, shi->ao);
+ copy_v3_v3(shr->env, shi->env); // XXX multiply
+ copy_v3_v3(shr->indirect, shi->indirect); // XXX multiply
}
}
}
@@ -1771,7 +1771,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
invalpha= (shr->col[3] > FLT_EPSILON)? 1.0f/shr->col[3]: 1.0f;
if(texfac==0.0f) {
- VECCOPY(col, shr->col);
+ copy_v3_v3(col, shr->col);
mul_v3_fl(col, invalpha);
}
else if(texfac==1.0f) {
@@ -1779,7 +1779,7 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
mul_v3_fl(col, invalpha);
}
else {
- VECCOPY(col, shr->col);
+ copy_v3_v3(col, shr->col);
mul_v3_fl(col, invalpha);
col[0]= pow(col[0], 1.0f-texfac);
col[1]= pow(col[1], 1.0f-texfac);
@@ -1799,9 +1799,9 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
}
if(shi->combinedflag & SCE_PASS_SHADOW)
- VECCOPY(shr->combined, shr->shad) /* note, no ';' ! */
+ copy_v3_v3(shr->combined, shr->shad); /* note, no ';' ! */
else
- VECCOPY(shr->combined, shr->diff);
+ copy_v3_v3(shr->combined, shr->diff);
/* calculate shadow pass, we use a multiplication mask */
/* if diff = 0,0,0 it doesn't matter what the shadow pass is, so leave it as is */
@@ -1876,10 +1876,10 @@ void shade_lamp_loop(ShadeInput *shi, ShadeResult *shr)
result[2]= shi->mirb*shi->refcol[3] + (1.0f - shi->mirb*shi->refcol[0])*shr->combined[2];
if(passflag & SCE_PASS_REFLECT)
- VECSUB(shr->refl, result, shr->combined);
+ sub_v3_v3v3(shr->refl, result, shr->combined);
if(shi->combinedflag & SCE_PASS_REFLECT)
- VECCOPY(shr->combined, result);
+ copy_v3_v3(shr->combined, result);
}
diff --git a/source/blender/render/intern/source/sss.c b/source/blender/render/intern/source/sss.c
index 0ba13b31c4b..36b577ce9a4 100644
--- a/source/blender/render/intern/source/sss.c
+++ b/source/blender/render/intern/source/sss.c
@@ -394,8 +394,8 @@ static void traverse_octree(ScatterTree *tree, ScatterNode *node, float *co, int
for(i=0; i<node->totpoint; i++) {
ScatterPoint *p= &node->points[i];
- VECSUB(sub, co, p->co);
- dist= INPR(sub, sub);
+ sub_v3_v3v3(sub, co, p->co);
+ dist= dot_v3v3(sub, sub);
if(p->back)
add_radiance(tree, NULL, p->rad, 0.0f, p->area, dist, result);
@@ -418,8 +418,8 @@ static void traverse_octree(ScatterTree *tree, ScatterNode *node, float *co, int
}
else {
/* decide subnode traversal based on maximum solid angle */
- VECSUB(sub, co, subnode->co);
- dist= INPR(sub, sub);
+ sub_v3_v3v3(sub, co, subnode->co);
+ dist= dot_v3v3(sub, sub);
/* actually area/dist > error, but this avoids division */
if(subnode->area+subnode->backarea>tree->error*dist) {
diff --git a/source/blender/render/intern/source/volume_precache.c b/source/blender/render/intern/source/volume_precache.c
index 2037acc943f..18132c4a7f3 100644
--- a/source/blender/render/intern/source/volume_precache.c
+++ b/source/blender/render/intern/source/volume_precache.c
@@ -490,7 +490,7 @@ static void *vol_precache_part(void *data)
RayObject *tree = pa->tree;
ShadeInput *shi = pa->shi;
float scatter_col[3] = {0.f, 0.f, 0.f};
- float co[3], cco[3];
+ float co[3], cco[3], view[3];
int x, y, z, i;
int res[3];
@@ -523,9 +523,9 @@ static void *vol_precache_part(void *data)
continue;
}
- copy_v3_v3(shi->view, cco);
- normalize_v3(shi->view);
- vol_get_scattering(shi, scatter_col, cco);
+ copy_v3_v3(view, cco);
+ normalize_v3(view);
+ vol_get_scattering(shi, scatter_col, cco, view);
obi->volume_precache->data_r[i] = scatter_col[0];
obi->volume_precache->data_g[i] = scatter_col[1];
diff --git a/source/blender/render/intern/source/volumetric.c b/source/blender/render/intern/source/volumetric.c
index dcb3c9d5749..807531f2daf 100644
--- a/source/blender/render/intern/source/volumetric.c
+++ b/source/blender/render/intern/source/volumetric.c
@@ -70,13 +70,13 @@ extern struct Render R;
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* luminance rec. 709 */
-BM_INLINE float luminance(float* col)
+BM_INLINE float luminance(const float col[3])
{
return (0.212671f*col[0] + 0.71516f*col[1] + 0.072169f*col[2]);
}
/* tracing */
-static float vol_get_shadow(ShadeInput *shi, LampRen *lar, float *co)
+static float vol_get_shadow(ShadeInput *shi, LampRen *lar, const float co[3])
{
float visibility = 1.f;
@@ -95,7 +95,7 @@ static float vol_get_shadow(ShadeInput *shi, LampRen *lar, float *co)
is.dir[2] = -lar->vec[2];
is.dist = R.maxdist;
} else {
- VECSUB( is.dir, lar->co, is.start );
+ sub_v3_v3v3(is.dir, lar->co, is.start);
is.dist = normalize_v3( is.dir );
}
@@ -121,11 +121,11 @@ static float vol_get_shadow(ShadeInput *shi, LampRen *lar, float *co)
return visibility;
}
-static int vol_get_bounds(ShadeInput *shi, float *co, float *vec, float *hitco, Isect *isect, int intersect_type)
+static int vol_get_bounds(ShadeInput *shi, const float co[3], const float vec[3], float hitco[3], Isect *isect, int intersect_type)
{
- VECCOPY(isect->start, co);
- VECCOPY(isect->dir, vec );
+ copy_v3_v3(isect->start, co);
+ copy_v3_v3(isect->dir, vec);
isect->dist = FLT_MAX;
isect->mode= RE_RAY_MIRROR;
isect->last_hit = NULL;
@@ -153,7 +153,7 @@ static int vol_get_bounds(ShadeInput *shi, float *co, float *vec, float *hitco,
}
}
-static void shade_intersection(ShadeInput *shi, float *col, Isect *is)
+static void shade_intersection(ShadeInput *shi, float col_r[4], Isect *is)
{
ShadeInput shi_new;
ShadeResult shr_new;
@@ -173,7 +173,7 @@ static void shade_intersection(ShadeInput *shi, float *col, Isect *is)
shi_new.light_override= shi->light_override;
shi_new.mat_override= shi->mat_override;
- VECCOPY(shi_new.camera_co, is->start);
+ copy_v3_v3(shi_new.camera_co, is->start);
memset(&shr_new, 0, sizeof(ShadeResult));
@@ -182,16 +182,16 @@ static void shade_intersection(ShadeInput *shi, float *col, Isect *is)
shade_ray(is, &shi_new, &shr_new);
}
- copy_v3_v3(col, shr_new.combined);
- col[3] = shr_new.alpha;
+ copy_v3_v3(col_r, shr_new.combined);
+ col_r[3] = shr_new.alpha;
}
-static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, float *co, float *col)
+static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, const float co[3], float col_r[4])
{
Isect isect;
- VECCOPY(isect.start, co);
- VECCOPY(isect.dir, shi->view);
+ copy_v3_v3(isect.start, co);
+ copy_v3_v3(isect.dir, shi->view);
isect.dist = FLT_MAX;
isect.mode= RE_RAY_MIRROR;
@@ -204,16 +204,16 @@ static void vol_trace_behind(ShadeInput *shi, VlakRen *vlr, float *co, float *co
/* check to see if there's anything behind the volume, otherwise shade the sky */
if(RE_rayobject_raycast(R.raytree, &isect)) {
- shade_intersection(shi, col, &isect);
+ shade_intersection(shi, col_r, &isect);
} else {
- shadeSkyView(col, co, shi->view, NULL, shi->thread);
- shadeSunView(col, shi->view);
+ shadeSkyView(col_r, co, shi->view, NULL, shi->thread);
+ shadeSunView(col_r, shi->view);
}
}
/* trilinear interpolation */
-static void vol_get_precached_scattering(Render *re, ShadeInput *shi, float *scatter_col, float *co)
+static void vol_get_precached_scattering(Render *re, ShadeInput *shi, float scatter_col[3], const float co[3])
{
VolumePrecache *vp = shi->obi->volume_precache;
float bbmin[3], bbmax[3], dim[3];
@@ -238,7 +238,7 @@ static void vol_get_precached_scattering(Render *re, ShadeInput *shi, float *sca
/* Meta object density, brute force for now
* (might be good enough anyway, don't need huge number of metaobs to model volumetric objects */
-static float metadensity(Object* ob, float* co)
+static float metadensity(Object* ob, const float co[3])
{
float mat[4][4], imat[4][4], dens = 0.f;
MetaBall* mb = (MetaBall*)ob->data;
@@ -284,7 +284,7 @@ static float metadensity(Object* ob, float* co)
return (dens < 0.f) ? 0.f : dens;
}
-float vol_get_density(struct ShadeInput *shi, float *co)
+float vol_get_density(struct ShadeInput *shi, const float co[3])
{
float density = shi->mat->vol.density;
float density_scale = shi->mat->vol.density_scale;
@@ -305,11 +305,11 @@ float vol_get_density(struct ShadeInput *shi, float *co)
/* Color of light that gets scattered out by the volume */
/* Uses same physically based scattering parameter as in transmission calculations,
* along with artificial reflection scale/reflection color tint */
-static void vol_get_reflection_color(ShadeInput *shi, float *ref_col, float *co)
+static void vol_get_reflection_color(ShadeInput *shi, float ref_col[3], const float co[3])
{
float scatter = shi->mat->vol.scattering;
float reflection= shi->mat->vol.reflection;
- VECCOPY(ref_col, shi->mat->vol.reflection_col);
+ copy_v3_v3(ref_col, shi->mat->vol.reflection_col);
if (shi->mat->mapto_textured & (MAP_SCATTERING+MAP_REFLECTION_COL))
do_volume_tex(shi, co, MAP_SCATTERING+MAP_REFLECTION_COL, ref_col, &scatter, &R);
@@ -325,10 +325,10 @@ static void vol_get_reflection_color(ShadeInput *shi, float *ref_col, float *co)
/* compute emission component, amount of radiance to add per segment
* can be textured with 'emit' */
-static void vol_get_emission(ShadeInput *shi, float *emission_col, float *co)
+static void vol_get_emission(ShadeInput *shi, float emission_col[3], const float co[3])
{
float emission = shi->mat->vol.emission;
- VECCOPY(emission_col, shi->mat->vol.emission_col);
+ copy_v3_v3(emission_col, shi->mat->vol.emission_col);
if (shi->mat->mapto_textured & (MAP_EMISSION+MAP_EMISSION_COL))
do_volume_tex(shi, co, MAP_EMISSION+MAP_EMISSION_COL, emission_col, &emission, &R);
@@ -343,7 +343,7 @@ static void vol_get_emission(ShadeInput *shi, float *emission_col, float *co)
* This can possibly use a specific scattering color,
* and absorption multiplier factor too, but these parameters are left out for simplicity.
* It's easy enough to get a good wide range of results with just these two parameters. */
-static void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co)
+static void vol_get_sigma_t(ShadeInput *shi, float sigma_t[3], const float co[3])
{
/* technically absorption, but named transmission color
* since it describes the effect of the coloring *after* absorption */
@@ -361,7 +361,7 @@ static void vol_get_sigma_t(ShadeInput *shi, float *sigma_t, float *co)
/* phase function - determines in which directions the light
* is scattered in the volume relative to incoming direction
* and view direction */
-static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, float *w, float *wp)
+static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, const float w[3], const float wp[3])
{
const float normalize = 0.25f; // = 1.f/4.f = M_PI/(4.f*M_PI)
@@ -408,7 +408,7 @@ static float vol_get_phasefunc(ShadeInput *UNUSED(shi), float g, float *w, float
}
/* Compute transmittance = e^(-attenuation) */
-static void vol_get_transmittance_seg(ShadeInput *shi, float *tr, float stepsize, float *co, float density)
+static void vol_get_transmittance_seg(ShadeInput *shi, float tr[3], float stepsize, const float co[3], float density)
{
/* input density = density at co */
float tau[3] = {0.f, 0.f, 0.f};
@@ -428,7 +428,7 @@ static void vol_get_transmittance_seg(ShadeInput *shi, float *tr, float stepsize
}
/* Compute transmittance = e^(-attenuation) */
-static void vol_get_transmittance(ShadeInput *shi, float *tr, float *co, float *endco)
+static void vol_get_transmittance(ShadeInput *shi, float tr[3], const float co[3], const float endco[3])
{
float p[3] = {co[0], co[1], co[2]};
float step_vec[3] = {endco[0] - co[0], endco[1] - co[1], endco[2] - co[2]};
@@ -464,7 +464,7 @@ static void vol_get_transmittance(ShadeInput *shi, float *tr, float *co, float *
tr[2] = expf(-tau[2]);
}
-static void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar, float *lacol)
+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};
@@ -487,7 +487,7 @@ static void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar,
mul_v3_fl(lacol, visifac);
if (ELEM(lar->type, LA_SUN, LA_HEMI))
- VECCOPY(lv, lar->vec);
+ copy_v3_v3(lv, lar->vec);
negate_v3(lv);
if (shi->mat->vol.shade_type == MA_VOL_SHADE_SHADOWED) {
@@ -535,7 +535,7 @@ static void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar,
if (luminance(lacol) < 0.001f) return;
normalize_v3(lv);
- p = vol_get_phasefunc(shi, shi->mat->vol.asymmetry, shi->view, lv);
+ p = vol_get_phasefunc(shi, shi->mat->vol.asymmetry, view, lv);
/* physically based scattering with non-physically based RGB gain */
vol_get_reflection_color(shi, ref_col, co);
@@ -546,14 +546,14 @@ static void vol_shade_one_lamp(struct ShadeInput *shi, float *co, LampRen *lar,
}
/* single scattering only for now */
-void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co)
+void vol_get_scattering(ShadeInput *shi, float scatter_col[3], const float co[3], const float view[3])
{
ListBase *lights;
GroupObject *go;
LampRen *lar;
-
- scatter_col[0] = scatter_col[1] = scatter_col[2] = 0.f;
-
+
+ zero_v3(scatter_col);
+
lights= get_lights(shi);
for(go=lights->first; go; go= go->next)
{
@@ -561,7 +561,7 @@ void vol_get_scattering(ShadeInput *shi, float *scatter_col, float *co)
lar= go->lampren;
if (lar) {
- vol_shade_one_lamp(shi, co, lar, lacol);
+ vol_shade_one_lamp(shi, co, view, lar, lacol);
add_v3_v3(scatter_col, lacol);
}
}
@@ -585,7 +585,7 @@ outgoing radiance from behind surface * beam transmittance/attenuation
* it also makes it harder to control the overall look of the volume since coloring the outscattered light results
* in the inverse color being transmitted through the rest of the volume.
*/
-static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float *endco)
+static void volumeintegrate(struct ShadeInput *shi, float col[4], const float co[3], const float endco[3])
{
float radiance[3] = {0.f, 0.f, 0.f};
float tr[3] = {1.f, 1.f, 1.f};
@@ -629,7 +629,7 @@ static void volumeintegrate(struct ShadeInput *shi, float *col, float *co, float
vol_get_precached_scattering(&R, shi, scatter_col, p2);
} else
- vol_get_scattering(shi, scatter_col, p);
+ vol_get_scattering(shi, scatter_col, p, shi->view);
radiance[0] += stepd * tr[0] * (emit_col[0] + scatter_col[0]);
radiance[1] += stepd * tr[1] * (emit_col[1] + scatter_col[1]);
@@ -699,7 +699,7 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in
} else {
/* we're tracing through the volume between the camera
* and a solid surface, so use that pre-shaded radiance */
- QUATCOPY(col, shr->combined);
+ copy_v4_v4(col, shr->combined);
}
/* shade volume from 'camera' to 1st hit point */
@@ -736,7 +736,7 @@ static void volume_trace(struct ShadeInput *shi, struct ShadeResult *shr, int in
copy_v3_v3(shr->combined, col);
shr->alpha = col[3];
- VECCOPY(shr->diff, shr->combined);
+ copy_v3_v3(shr->diff, shr->combined);
}
/* Traces a shadow through the object,
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index 3ef70d703a5..77219abee20 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -383,7 +383,7 @@ void make_voxeldata(struct Render *re)
}
-int voxeldatatex(struct Tex *tex, float *texvec, struct TexResult *texres)
+int voxeldatatex(struct Tex *tex, const float texvec[3], struct TexResult *texres)
{
int retval = TEX_INT;
VoxelData *vd = tex->vd;
diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c
index 925f8529dfa..f36994e0969 100644
--- a/source/blender/render/intern/source/zbuf.c
+++ b/source/blender/render/intern/source/zbuf.c
@@ -239,7 +239,7 @@ static short cliptestf(float p, float q, float *u1, float *u2)
return 1;
}
-int testclip(float *v)
+int testclip(const float v[4])
{
float abs4; /* WATCH IT: this function should do the same as cliptestf, otherwise troubles in zbufclip()*/
short c=0;
@@ -843,7 +843,7 @@ static void zbufline_onlyZ(ZSpan *zspan, int UNUSED(obi), int UNUSED(zvlnr), flo
}
-static int clipline(float *v1, float *v2) /* return 0: do not draw */
+static int clipline(float v1[4], float v2[4]) /* return 0: do not draw */
{
float dz,dw, u1=0.0, u2=1.0;
float dx, dy, v13;
@@ -893,7 +893,7 @@ static int clipline(float *v1, float *v2) /* return 0: do not draw */
return 0;
}
-void hoco_to_zco(ZSpan *zspan, float *zco, float *hoco)
+void hoco_to_zco(ZSpan *zspan, float zco[3], const float hoco[4])
{
float div;
@@ -998,7 +998,7 @@ void zbufclipwire(ZSpan *zspan, int obi, int zvlnr, int ec, float *ho1, float *h
}
-void zbufsinglewire(ZSpan *zspan, int obi, int zvlnr, float *ho1, float *ho2)
+void zbufsinglewire(ZSpan *zspan, int obi, int zvlnr, const float ho1[4], const float ho2[4])
{
float f1[4], f2[4];
int c1, c2;
@@ -1008,8 +1008,8 @@ void zbufsinglewire(ZSpan *zspan, int obi, int zvlnr, float *ho1, float *ho2)
if(c1 | c2) { /* not in the middle */
if(!(c1 & c2)) { /* not out completely */
- QUATCOPY(f1, ho1);
- QUATCOPY(f2, ho2);
+ copy_v4_v4(f1, ho1);
+ copy_v4_v4(f2, ho2);
if(clipline(f1, f2)) {
hoco_to_zco(zspan, f1, f1);
@@ -1692,7 +1692,7 @@ static void makevertpyra(float *vez, float *labda, float **trias, float *v1, flo
/* ------------------------------------------------------------------------- */
-void projectverto(float *v1, float winmat[][4], float *adr)
+void projectverto(const float v1[3], float winmat[][4], float adr[4])
{
/* calcs homogenic coord of vertex v1 */
float x,y,z;
@@ -1710,7 +1710,7 @@ void projectverto(float *v1, float winmat[][4], float *adr)
/* ------------------------------------------------------------------------- */
-void projectvert(float *v1, float winmat[][4], float *adr)
+void projectvert(const float v1[3], float winmat[][4], float adr[4])
{
/* calcs homogenic coord of vertex v1 */
float x,y,z;
@@ -2864,7 +2864,7 @@ void RE_zbuf_accumulate_vecblur(NodeBlurData *nbd, int xsize, int ysize, float *
float v1[3], v2[3], v3[3], v4[3], fx, fy;
float *rectvz, *dvz, *dimg, *dvec1, *dvec2, *dz, *dz1, *dz2, *rectz;
float *minvecbufrect= NULL, *rectweight, *rw, *rectmax, *rm, *ro;
- float maxspeedsq= (float)nbd->maxspeed*nbd->maxspeed, totfac;
+ float maxspeedsq= (float)nbd->maxspeed*nbd->maxspeed;
int y, x, step, maxspeed=nbd->maxspeed, samples= nbd->samples;
int tsktsk= 0;
static int firsttime= 1;
@@ -3038,7 +3038,6 @@ void RE_zbuf_accumulate_vecblur(NodeBlurData *nbd, int xsize, int ysize, float *
}
memset(newrect, 0, sizeof(float)*xsize*ysize*4);
- totfac= 0.0f;
/* accumulate */
samples/= 2;
diff --git a/source/blender/windowmanager/SConscript b/source/blender/windowmanager/SConscript
index 80c526f8649..c60752b85f8 100644
--- a/source/blender/windowmanager/SConscript
+++ b/source/blender/windowmanager/SConscript
@@ -39,4 +39,7 @@ if env['OURPLATFORM'] != 'darwin' or env['WITH_GHOST_COCOA']:
if env['BF_BUILDINFO']:
defs.append('WITH_BUILDINFO')
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('INTERNATIONAL')
+
env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defines=defs, libtype=['core'], priority=[5] )
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index 5bdf1ec2787..9e19a057175 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -72,6 +72,7 @@ void WM_setinitialstate_fullscreen(void);
void WM_setinitialstate_normal(void);
void WM_init (struct bContext *C, int argc, const char **argv);
+void WM_exit_ext (struct bContext *C, const short do_python);
void WM_exit (struct bContext *C);
void WM_main (struct bContext *C);
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 21a725124ad..29cbeb84058 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -256,7 +256,7 @@ static void wm_drop_operator_draw(char *name, int x, int y)
glColor4ub(0, 0, 0, 50);
- uiSetRoundBox(15+16);
+ uiSetRoundBox(UI_CNR_ALL | UI_RB_ALPHA);
uiRoundBox(x, y, x + width + 8, y + 15, 4);
glColor4ub(255, 255, 255, 255);
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 5711ec899bf..75fec6ed705 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -85,7 +85,7 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA
void wm_event_add(wmWindow *win, wmEvent *event_to_add)
{
- wmEvent *event= MEM_callocN(sizeof(wmEvent), "event");
+ wmEvent *event= MEM_callocN(sizeof(wmEvent), "wmEvent");
*event= *event_to_add;
BLI_addtail(&win->queue, event);
@@ -441,12 +441,17 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int pop
if(op->reports->list.first) {
/* FIXME, temp setting window, see other call to uiPupMenuReports for why */
wmWindow *win_prev= CTX_wm_window(C);
+ ScrArea *area_prev= CTX_wm_area(C);
+ ARegion *ar_prev= CTX_wm_region(C);
+
if(win_prev==NULL)
CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first);
uiPupMenuReports(C, op->reports);
CTX_wm_window_set(C, win_prev);
+ CTX_wm_area_set(C, area_prev);
+ CTX_wm_region_set(C, ar_prev);
}
}
@@ -886,8 +891,8 @@ static int wm_operator_call_internal(bContext *C, wmOperatorType *ot, PointerRNA
CTX_wm_region_set(C, NULL);
CTX_wm_area_set(C, NULL);
retval= wm_operator_invoke(C, ot, event, properties, reports, poll_only);
- CTX_wm_region_set(C, ar);
CTX_wm_area_set(C, area);
+ CTX_wm_region_set(C, ar);
return retval;
}
@@ -1394,6 +1399,9 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
* only have because lib linking errors need to be seen by users :(
* it can be removed without breaking anything but then no linking errors - campbell */
wmWindow *win_prev= CTX_wm_window(C);
+ ScrArea *area_prev= CTX_wm_area(C);
+ ARegion *ar_prev= CTX_wm_region(C);
+
if(win_prev==NULL)
CTX_wm_window_set(C, CTX_wm_manager(C)->windows.first);
@@ -1405,6 +1413,8 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
BLI_movelisttolist(&CTX_wm_reports(C)->list, &handler->op->reports->list);
CTX_wm_window_set(C, win_prev);
+ CTX_wm_area_set(C, area_prev);
+ CTX_wm_region_set(C, ar_prev);
}
WM_operator_free(handler->op);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 6b3a574b6b6..f862af6173a 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -59,6 +59,8 @@
#include "BLI_utildefines.h"
#include "BLI_callbacks.h"
+#include "BLF_translation.h"
+
#include "DNA_anim_types.h"
#include "DNA_ipo_types.h" // XXX old animation system
#include "DNA_object_types.h"
@@ -429,16 +431,17 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
else if(retval == BKE_READ_EXOTIC_OK_OTHER)
BKE_write_undo(C, "Import file");
else if(retval == BKE_READ_EXOTIC_FAIL_OPEN) {
- BKE_reportf(reports, RPT_ERROR, "Can't read file: \"%s\", %s.", filepath, errno ? strerror(errno) : "Unable to open the file");
+ BKE_reportf(reports, RPT_ERROR, UI_translate_do_iface(N_("Can't read file: \"%s\", %s.")), filepath,
+ errno ? strerror(errno) : UI_translate_do_iface(N_("Unable to open the file")));
}
else if(retval == BKE_READ_EXOTIC_FAIL_FORMAT) {
- BKE_reportf(reports, RPT_ERROR, "File format is not supported in file: \"%s\".", filepath);
+ BKE_reportf(reports, RPT_ERROR, UI_translate_do_iface(N_("File format is not supported in file: \"%s\".")), filepath);
}
else if(retval == BKE_READ_EXOTIC_FAIL_PATH) {
- BKE_reportf(reports, RPT_ERROR, "File path invalid: \"%s\".", filepath);
+ BKE_reportf(reports, RPT_ERROR, UI_translate_do_iface(N_("File path invalid: \"%s\".")), filepath);
}
else {
- BKE_reportf(reports, RPT_ERROR, "Unknown error loading: \"%s\".", filepath);
+ BKE_reportf(reports, RPT_ERROR, UI_translate_do_iface(N_("Unknown error loading: \"%s\".")), filepath);
BLI_assert(!"invalid 'retval'");
}
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c
index de4afa79448..52c0cb902c1 100644
--- a/source/blender/windowmanager/intern/wm_gesture.c
+++ b/source/blender/windowmanager/intern/wm_gesture.c
@@ -232,7 +232,7 @@ static void wm_gesture_draw_circle(wmGesture *gt)
static void draw_filled_lasso(wmGesture *gt)
{
EditVert *v=NULL, *lastv=NULL, *firstv=NULL;
- EditEdge *e;
+ /* EditEdge *e; */ /* UNUSED */
EditFace *efa;
short *lasso= (short *)gt->customdata;
int i;
@@ -246,7 +246,7 @@ static void draw_filled_lasso(wmGesture *gt)
v = BLI_addfillvert(co);
if (lastv)
- e = BLI_addfilledge(lastv, v);
+ /* e = */ /* UNUSED */ BLI_addfilledge(lastv, v);
lastv = v;
if (firstv==NULL) firstv = v;
}
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 850de9029c9..cf3f12da767 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -99,6 +99,7 @@
#include "UI_interface.h"
#include "BLF_api.h"
+#include "BLF_translation.h"
#include "GPU_buffers.h"
#include "GPU_extensions.h"
@@ -143,6 +144,8 @@ void WM_init(bContext *C, int argc, const char **argv)
/* get the default database, plus a wm */
WM_read_homefile(C, NULL, G.factory_startup);
+ BLF_lang_set(NULL);
+
/* note: there is a bug where python needs initializing before loading the
* startup.blend because it may contain PyDrivers. It also needs to be after
* initializing space types and other internal data.
@@ -296,6 +299,8 @@ int WM_init_game(bContext *C)
WM_operator_name_call(C, "VIEW3D_OT_game_start", WM_OP_EXEC_DEFAULT, NULL);
+ sound_exit();
+
return 1;
}
else
@@ -340,7 +345,8 @@ extern void free_fmodifiers_copybuf(void);
extern void free_posebuf(void);
/* called in creator.c even... tsk, split this! */
-void WM_exit(bContext *C)
+/* note, doesnt run exit() call WM_exit() for that */
+void WM_exit_ext(bContext *C, const short do_python)
{
wmWindow *win;
@@ -376,7 +382,7 @@ void WM_exit(bContext *C)
BIF_freeTemplates(C);
free_ttfont(); /* bke_font.h */
-
+
free_openrecent();
BKE_freecubetable();
@@ -396,6 +402,10 @@ void WM_exit(bContext *C)
free_posebuf();
BLF_exit();
+
+#ifdef INTERNATIONAL
+ BLF_free_unifont();
+#endif
ANIM_keyingset_infos_exit();
@@ -406,14 +416,17 @@ void WM_exit(bContext *C)
#ifdef WITH_PYTHON
- /* XXX - old note */
- /* before free_blender so py's gc happens while library still exists */
- /* needed at least for a rare sigsegv that can happen in pydrivers */
-
- /* Update for blender 2.5, move after free_blender because blender now holds references to PyObject's
- * so decref'ing them after python ends causes bad problems every time
- * the pyDriver bug can be fixed if it happens again we can deal with it then */
- BPY_python_end();
+ /* option not to close python so we can use 'atexit' */
+ if(do_python) {
+ /* XXX - old note */
+ /* before free_blender so py's gc happens while library still exists */
+ /* needed at least for a rare sigsegv that can happen in pydrivers */
+
+ /* Update for blender 2.5, move after free_blender because blender now holds references to PyObject's
+ * so decref'ing them after python ends causes bad problems every time
+ * the pyDriver bug can be fixed if it happens again we can deal with it then */
+ BPY_python_end();
+ }
#endif
GPU_global_buffer_pool_free();
@@ -458,6 +471,10 @@ void WM_exit(bContext *C)
getchar();
}
#endif
- exit(G.afbreek==1);
}
+void WM_exit(bContext *C)
+{
+ WM_exit_ext(C, 1);
+ exit(G.afbreek==1);
+}
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 0e94ad72d35..854fa688ea4 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -47,6 +47,7 @@
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
+#include "BKE_global.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_screen.h"
@@ -680,6 +681,17 @@ wmKeyMap *WM_modalkeymap_add(wmKeyConfig *keyconf, const char *idname, EnumPrope
wmKeyMap *km= WM_keymap_find(keyconf, idname, 0, 0);
km->flag |= KEYMAP_MODAL;
km->modal_items= items;
+
+ if(!items) {
+ /* init modal items from default config */
+ wmWindowManager *wm = G.main->wm.first;
+ wmKeyMap *defaultkm= WM_keymap_list_find(&wm->defaultconf->keymaps, km->idname, 0, 0);
+
+ if(defaultkm) {
+ km->modal_items = defaultkm->modal_items;
+ km->poll = defaultkm->poll;
+ }
+ }
return km;
}
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 0e0203543a4..320dc2ecdda 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -49,7 +49,7 @@
#include "DNA_userdef_types.h"
#include "DNA_windowmanager_types.h"
-#include "BLF_api.h"
+#include "BLF_translation.h"
#include "PIL_time.h"
@@ -78,8 +78,10 @@
#include "BIF_gl.h"
#include "BIF_glutil.h" /* for paint cursor */
+#include "BLF_api.h"
#include "IMB_imbuf_types.h"
+#include "IMB_imbuf.h"
#include "ED_screen.h"
#include "ED_util.h"
@@ -149,12 +151,11 @@ void WM_operatortype_append(void (*opfunc)(wmOperatorType*))
opfunc(ot);
if(ot->name==NULL) {
- static char dummy_name[] = "Dummy Name";
fprintf(stderr, "ERROR: Operator %s has no name property!\n", ot->idname);
- ot->name= dummy_name;
+ ot->name= UI_translate_do_iface(N_("Dummy Name"));
}
- RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:"(undocumented operator)"); // XXX All ops should have a description but for now allow them not to.
+ RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:UI_translate_do_iface(N_("(undocumented operator)"))); // XXX All ops should have a description but for now allow them not to.
RNA_def_struct_identifier(ot->srna, ot->idname);
BLI_ghash_insert(global_ops_hash, (void *)ot->idname, ot);
@@ -167,7 +168,7 @@ void WM_operatortype_append_ptr(void (*opfunc)(wmOperatorType*, void*), void *us
ot= MEM_callocN(sizeof(wmOperatorType), "operatortype");
ot->srna= RNA_def_struct(&BLENDER_RNA, "", "OperatorProperties");
opfunc(ot, userdata);
- RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:"(undocumented operator)");
+ RNA_def_struct_ui_text(ot->srna, ot->name, ot->description ? ot->description:UI_translate_do_iface(N_("(undocumented operator)")));
RNA_def_struct_identifier(ot->srna, ot->idname);
BLI_ghash_insert(global_ops_hash, (void *)ot->idname, ot);
@@ -361,7 +362,7 @@ wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *nam
ot->poll= NULL;
if(!ot->description)
- ot->description= "(undocumented operator)";
+ ot->description= UI_translate_do_iface(N_("(undocumented operator)"));
RNA_def_struct_ui_text(ot->srna, ot->name, ot->description); // XXX All ops should have a description but for now allow them not to.
RNA_def_struct_identifier(ot->srna, ot->idname);
@@ -386,7 +387,7 @@ void WM_operatortype_append_macro_ptr(void (*opfunc)(wmOperatorType*, void*), vo
ot->poll= NULL;
if(!ot->description)
- ot->description= "(undocumented operator)";
+ ot->description= UI_translate_do_iface(N_("(undocumented operator)"));
opfunc(ot, userdata);
@@ -783,7 +784,7 @@ int WM_operator_confirm_message(bContext *C, wmOperator *op, const char *message
else
properties= NULL;
- pup= uiPupMenuBegin(C, "OK?", ICON_QUESTION);
+ pup= uiPupMenuBegin(C, UI_translate_do_iface(N_("OK?")), ICON_QUESTION);
layout= uiPupMenuLayout(pup);
uiItemFullO(layout, op->type->idname, message, ICON_NONE, properties, WM_OP_EXEC_REGION_WIN, 0);
uiPupMenuEnd(C, pup);
@@ -864,10 +865,10 @@ void WM_operator_properties_filesel(wmOperatorType *ot, int filter, short type,
void WM_operator_properties_select_all(wmOperatorType *ot) {
static EnumPropertyItem select_all_actions[] = {
- {SEL_TOGGLE, "TOGGLE", 0, "Toggle", "Toggle selection for all elements"},
- {SEL_SELECT, "SELECT", 0, "Select", "Select all elements"},
- {SEL_DESELECT, "DESELECT", 0, "Deselect", "Deselect all elements"},
- {SEL_INVERT, "INVERT", 0, "Invert", "Invert selection of all elements"},
+ {SEL_TOGGLE, "TOGGLE", 0, N_("Toggle"), "Toggle selection for all elements"},
+ {SEL_SELECT, "SELECT", 0, N_("Select"), "Select all elements"},
+ {SEL_DESELECT, "DESELECT", 0, N_("Deselect"), "Deselect all elements"},
+ {SEL_INVERT, "INVERT", 0, N_("Invert"), "Invert selection of all elements"},
{0, NULL, 0, NULL, NULL}
};
@@ -876,25 +877,25 @@ void WM_operator_properties_select_all(wmOperatorType *ot) {
void WM_operator_properties_gesture_border(wmOperatorType *ot, int extend)
{
- RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, "Gesture Mode", "", INT_MIN, INT_MAX);
- 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);
- 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);
+ RNA_def_int(ot->srna, "gesture_mode", 0, INT_MIN, INT_MAX, N_("Gesture Mode"), "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "xmin", 0, INT_MIN, INT_MAX, N_("X Min"), "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "xmax", 0, INT_MIN, INT_MAX, N_("X Max"), "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "ymin", 0, INT_MIN, INT_MAX, N_("Y Min"), "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "ymax", 0, INT_MIN, INT_MAX, N_("Y Max"), "", INT_MIN, INT_MAX);
if(extend)
- RNA_def_boolean(ot->srna, "extend", 1, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "extend", 1, _("Extend"), _("Extend selection instead of deselecting everything first"));
}
void WM_operator_properties_gesture_straightline(wmOperatorType *ot, int cursor)
{
- RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, "X Start", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, "X End", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, "Y Start", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, "Y End", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "xstart", 0, INT_MIN, INT_MAX, N_("X Start"), "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "xend", 0, INT_MIN, INT_MAX, N_("X End"), "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "ystart", 0, INT_MIN, INT_MAX, N_("Y Start"), "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "yend", 0, INT_MIN, INT_MAX, N_("Y End"), "", INT_MIN, INT_MAX);
if(cursor)
- RNA_def_int(ot->srna, "cursor", cursor, 0, INT_MAX, "Cursor", "Mouse cursor style to use during the modal operator", 0, INT_MAX);
+ RNA_def_int(ot->srna, "cursor", cursor, 0, INT_MAX, N_("Cursor"), N_("Mouse cursor style to use during the modal operator"), 0, INT_MAX);
}
@@ -923,7 +924,7 @@ static uiBlock *wm_block_create_redo(bContext *C, ARegion *ar, void *arg_op)
wmOperator *op= arg_op;
uiBlock *block;
uiLayout *layout;
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
int width= 300;
@@ -1001,7 +1002,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData)
wmOperator *op= data->op;
uiBlock *block;
uiLayout *layout;
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
block = uiBeginBlock(C, ar, "operator dialog", UI_EMBOSS);
uiBlockClearFlag(block, UI_BLOCK_LOOP);
@@ -1025,7 +1026,7 @@ static uiBlock *wm_block_dialog_create(bContext *C, ARegion *ar, void *userData)
col= uiLayoutColumn(layout, FALSE);
col_block= uiLayoutGetBlock(col);
/* Create OK button, the callback of which will execute op */
- btn= uiDefBut(col_block, BUT, 0, "OK", 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
+ btn= uiDefBut(col_block, BUT, 0, UI_translate_do_iface(N_("OK")), 0, -30, 0, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");
uiButSetFunc(btn, dialog_exec_cb, data, col_block);
}
@@ -1042,7 +1043,7 @@ static uiBlock *wm_operator_ui_create(bContext *C, ARegion *ar, void *userData)
wmOperator *op= data->op;
uiBlock *block;
uiLayout *layout;
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
block= uiBeginBlock(C, ar, "opui_popup", UI_EMBOSS);
uiBlockClearFlag(block, UI_BLOCK_LOOP);
@@ -1206,14 +1207,19 @@ static int wm_resource_check_prev(void)
static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(arg))
{
+ extern char datatoc_splash_png[];
+ extern int datatoc_splash_png_size;
+
uiBlock *block;
uiBut *but;
uiLayout *layout, *split, *col;
- uiStyle *style= U.uistyles.first;
+ uiStyle *style= UI_GetStyle();
struct RecentFile *recent;
int i;
MenuType *mt= WM_menutype_find("USERPREF_MT_splash", TRUE);
char url[96];
+ /* hardcoded to splash, loading and freeing every draw, eek! */
+ ImBuf *ibuf= IMB_ibImageFromMemory((unsigned char*)datatoc_splash_png, datatoc_splash_png_size, IB_rect);
#ifdef WITH_BUILDINFO
int ver_width, rev_width;
@@ -1237,7 +1243,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
block= uiBeginBlock(C, ar, "_popup", UI_EMBOSS);
uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN);
- but= uiDefBut(block, BUT_IMAGE, 0, "", 0, 10, 501, 282, NULL, 0.0, 0.0, 0, 0, "");
+ but= uiDefBut(block, BUT_IMAGE, 0, "", 0, 10, 501, 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */
uiButSetFunc(but, wm_block_splash_close, block, NULL);
uiBlockSetFunc(block, wm_block_splash_refreshmenu, block, NULL);
@@ -1266,19 +1272,19 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
split = uiLayoutSplit(layout, 0, 0);
col = uiLayoutColumn(split, 0);
uiItemL(col, "Links", ICON_NONE);
- uiItemStringO(col, "Donations", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
- uiItemStringO(col, "Credits", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
- uiItemStringO(col, "Release Log", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-259");
- uiItemStringO(col, "Manual", ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
- uiItemStringO(col, "Blender Website", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
- uiItemStringO(col, "User Community", ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
+ uiItemStringO(col, UI_translate_do_iface(N_("Donations")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
+ uiItemStringO(col, UI_translate_do_iface(N_("Credits")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
+ uiItemStringO(col, UI_translate_do_iface(N_("Release Log")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-259");
+ uiItemStringO(col, UI_translate_do_iface(N_("Manual")), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
+ uiItemStringO(col, UI_translate_do_iface(N_("Blender Website")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
+ uiItemStringO(col, UI_translate_do_iface(N_("User Community")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
if(strcmp(STRINGIFY(BLENDER_VERSION_CYCLE), "release")==0) {
BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d" STRINGIFY(BLENDER_VERSION_CHAR) "_release", BLENDER_VERSION/100, BLENDER_VERSION%100);
}
else {
BLI_snprintf(url, sizeof(url), "http://www.blender.org/documentation/blender_python_api_%d_%d_%d", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION);
}
- uiItemStringO(col, "Python API Reference", ICON_URL, "WM_OT_url_open", "url", url);
+ uiItemStringO(col, UI_translate_do_iface(N_("Python API Reference")), ICON_URL, "WM_OT_url_open", "url", url);
uiItemL(col, "", ICON_NONE);
col = uiLayoutColumn(split, 0);
@@ -1288,7 +1294,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiItemS(col);
}
- uiItemL(col, "Recent", ICON_NONE);
+ uiItemL(col, UI_translate_do_iface(N_("Recent")), ICON_NONE);
for(recent = G.recent_files.first, i=0; (i<5) && (recent); recent = recent->next, i++) {
uiItemStringO(col, BLI_path_basename(recent->filepath), ICON_FILE_BLEND, "WM_OT_open_mainfile", "filepath", recent->filepath);
}
@@ -2082,7 +2088,9 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op)
}
RNA_string_get(op->ptr, "filepath", filename);
- collada_import(C, filename);
+ if(collada_import(C, filename)) return OPERATOR_FINISHED;
+
+ BKE_report(op->reports, RPT_ERROR, "Errors found during parsing COLLADA document. Please see console for error log.");
return OPERATOR_FINISHED;
}
@@ -3296,13 +3304,13 @@ static void redraw_timer_window_swap(bContext *C)
}
static EnumPropertyItem redraw_timer_type_items[] = {
- {0, "DRAW", 0, "Draw Region", "Draw Region"},
- {1, "DRAW_SWAP", 0, "Draw Region + Swap", "Draw Region and Swap"},
- {2, "DRAW_WIN", 0, "Draw Window", "Draw Window"},
- {3, "DRAW_WIN_SWAP", 0, "Draw Window + Swap", "Draw Window and Swap"},
- {4, "ANIM_STEP", 0, "Anim Step", "Animation Steps"},
- {5, "ANIM_PLAY", 0, "Anim Play", "Animation Playback"},
- {6, "UNDO", 0, "Undo/Redo", "Undo/Redo"},
+ {0, "DRAW", 0, N_("Draw Region"), N_("Draw Region")},
+ {1, "DRAW_SWAP", 0, N_("Draw Region + Swap"), N_("Draw Region and Swap")},
+ {2, "DRAW_WIN", 0, N_("Draw Window"), N_("Draw Window")},
+ {3, "DRAW_WIN_SWAP", 0, N_("Draw Window + Swap"), N_("Draw Window and Swap")},
+ {4, "ANIM_STEP", 0, N_("Anim Step"), N_("Animation Steps")},
+ {5, "ANIM_PLAY", 0, N_("Anim Play"), N_("Animation Playback")},
+ {6, "UNDO", 0, N_("Undo/Redo"), N_("Undo/Redo")},
{0, NULL, 0, NULL, NULL}};
static int redraw_timer_exec(bContext *C, wmOperator *op)
@@ -3535,14 +3543,14 @@ void wm_operatortype_init(void)
static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
{
static EnumPropertyItem modal_items[] = {
- {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
- {GESTURE_MODAL_CONFIRM, "CONFIRM", 0, "Confirm", ""},
- {GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, "Add", ""},
- {GESTURE_MODAL_CIRCLE_SUB, "SUBTRACT", 0, "Subtract", ""},
+ {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""},
+ {GESTURE_MODAL_CONFIRM, "CONFIRM", 0, N_("Confirm"), ""},
+ {GESTURE_MODAL_CIRCLE_ADD, "ADD", 0, N_("Add"), ""},
+ {GESTURE_MODAL_CIRCLE_SUB, "SUBTRACT", 0, N_("Subtract"), ""},
- {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""},
- {GESTURE_MODAL_DESELECT,"DESELECT", 0, "DeSelect", ""},
- {GESTURE_MODAL_NOP,"NOP", 0, "No Operation", ""},
+ {GESTURE_MODAL_SELECT, "SELECT", 0, N_("Select"), ""},
+ {GESTURE_MODAL_DESELECT,"DESELECT", 0, N_("DeSelect"), ""},
+ {GESTURE_MODAL_NOP,"NOP", 0, N_("No Operation"), ""},
{0, NULL, 0, NULL, NULL}};
@@ -3588,9 +3596,9 @@ static void gesture_circle_modal_keymap(wmKeyConfig *keyconf)
static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf)
{
static EnumPropertyItem modal_items[] = {
- {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
- {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""},
- {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""},
+ {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""},
+ {GESTURE_MODAL_SELECT, "SELECT", 0, N_("Select"), ""},
+ {GESTURE_MODAL_BEGIN, "BEGIN", 0, N_("Begin"), ""},
{0, NULL, 0, NULL, NULL}};
wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Straight Line");
@@ -3616,10 +3624,10 @@ static void gesture_straightline_modal_keymap(wmKeyConfig *keyconf)
static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
{
static EnumPropertyItem modal_items[] = {
- {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
- {GESTURE_MODAL_SELECT, "SELECT", 0, "Select", ""},
- {GESTURE_MODAL_DESELECT,"DESELECT", 0, "DeSelect", ""},
- {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""},
+ {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""},
+ {GESTURE_MODAL_SELECT, "SELECT", 0, N_("Select"), ""},
+ {GESTURE_MODAL_DESELECT,"DESELECT", 0, N_("DeSelect"), ""},
+ {GESTURE_MODAL_BEGIN, "BEGIN", 0, N_("Begin"), ""},
{0, NULL, 0, NULL, NULL}};
wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Border");
@@ -3671,10 +3679,10 @@ static void gesture_border_modal_keymap(wmKeyConfig *keyconf)
static void gesture_zoom_border_modal_keymap(wmKeyConfig *keyconf)
{
static EnumPropertyItem modal_items[] = {
- {GESTURE_MODAL_CANCEL, "CANCEL", 0, "Cancel", ""},
- {GESTURE_MODAL_IN, "IN", 0, "In", ""},
- {GESTURE_MODAL_OUT, "OUT", 0, "Out", ""},
- {GESTURE_MODAL_BEGIN, "BEGIN", 0, "Begin", ""},
+ {GESTURE_MODAL_CANCEL, "CANCEL", 0, N_("Cancel"), ""},
+ {GESTURE_MODAL_IN, "IN", 0, N_("In"), ""},
+ {GESTURE_MODAL_OUT, "OUT", 0, N_("Out"), ""},
+ {GESTURE_MODAL_BEGIN, "BEGIN", 0, N_("Begin"), ""},
{0, NULL, 0, NULL, NULL}};
wmKeyMap *keymap= WM_modalkeymap_get(keyconf, "Gesture Zoom Border");
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 7d6010786d2..d9ca275c819 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -48,6 +48,8 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLF_translation.h"
+
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_library.h"
@@ -73,6 +75,8 @@
#include "GPU_draw.h"
#include "GPU_extensions.h"
+#include "UI_interface.h"
+
/* the global to talk to ghost */
static GHOST_SystemHandle g_system= NULL;
@@ -504,11 +508,11 @@ void WM_window_open_temp(bContext *C, rcti *position, int type)
ED_screen_set(C, win->screen);
if(sa->spacetype==SPACE_IMAGE)
- GHOST_SetTitle(win->ghostwin, "Blender Render");
+ GHOST_SetTitle(win->ghostwin, UI_translate_do_iface(N_("Blender Render")));
else if(ELEM(sa->spacetype, SPACE_OUTLINER, SPACE_USERPREF))
- GHOST_SetTitle(win->ghostwin, "Blender User Preferences");
+ GHOST_SetTitle(win->ghostwin, UI_translate_do_iface(N_("Blender User Preferences")));
else if(sa->spacetype==SPACE_FILE)
- GHOST_SetTitle(win->ghostwin, "Blender File View");
+ GHOST_SetTitle(win->ghostwin, UI_translate_do_iface(N_("Blender File View")));
else
GHOST_SetTitle(win->ghostwin, "Blender");
}
diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt
index ddfdfc97bdc..c8bf3b002f1 100644
--- a/source/blenderplayer/CMakeLists.txt
+++ b/source/blenderplayer/CMakeLists.txt
@@ -138,6 +138,7 @@ endif()
bf_intern_ghost # duplicate for linking
bf_blenkernel # duplicate for linking
bf_intern_mikktspace
+ extern_recastnavigation
)
if(WITH_MOD_CLOTH_ELTOPO)
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index d5974042f40..f7a748e1369 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -81,6 +81,7 @@ struct SculptSession;
struct ShadeInput;
struct ShadeResult;
struct SpaceImage;
+struct SpaceNode;
struct Tex;
struct TexResult;
struct Text;
@@ -105,7 +106,6 @@ struct bConstraintOb;
struct Context;
struct ChannelDriver;
-
/*new render funcs */
float *RE_RenderLayerGetPass(struct RenderLayer *rl, int passtype) {return (float *) NULL;}
float RE_filter_value(int type, float x) {return 0.0f;}
@@ -192,7 +192,6 @@ void ED_update_for_newframe(struct Main *bmain, struct Scene *scene, struct bScr
struct EditBone *ED_armature_bone_get_mirrored(struct ListBase *edbo, struct EditBone *ebo){return (struct EditBone *) NULL;}
struct EditBone *ED_armature_edit_bone_add(struct bArmature *arm, char *name){return (struct EditBone*) NULL;}
-struct Object *ED_object_pose_armature(struct Object *ob){ return (struct Object *)NULL; }
struct ListBase *get_active_constraints (struct Object *ob){return (struct ListBase *) NULL;}
struct ListBase *get_constraint_lb(struct Object *ob, struct bConstraint *con, struct bPoseChannel **pchan_r){return (struct ListBase *) NULL;}
int ED_pose_channel_in_IK_chain(struct Object *ob, struct bPoseChannel *pchan){return 0;}
@@ -255,6 +254,7 @@ 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){}
+void ED_node_tree_update(struct SpaceNode *snode, struct Scene *scene){}
void ED_view3d_scene_layers_update(struct Main *bmain, struct Scene *scene){}
int ED_view3d_scene_layer_set(int lay, const int *values){return 0;}
void ED_view3d_quadview_update(struct ScrArea *sa, struct ARegion *ar){}
@@ -306,8 +306,6 @@ void ED_sequencer_update_view(struct bContext *C, int view){}
float ED_rollBoneToVector(struct EditBone *bone, float new_up_axis[3]){return 0.0f;}
void ED_space_image_size(struct SpaceImage *sima, int *width, int *height){}
-struct ListBase *ED_curve_editnurbs(struct Curve *cu){return NULL;}
-void free_curve_editNurb (struct Curve *cu){}
void ED_nurb_set_spline_type(struct Nurb *nu, int type){}
void EM_selectmode_set(struct EditMesh *em){}
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 315cd5312cf..0b5d9f7c15c 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -356,7 +356,9 @@ if(UNIX AND NOT APPLE)
)
install(
- DIRECTORY ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
+ DIRECTORY
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
@@ -430,17 +432,19 @@ elseif(WIN32)
DESTINATION ${TARGETDIR_VER}
)
install(
- DIRECTORY ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
+ DIRECTORY
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
- if(NOT CMAKE_CL_64)
- install(
- FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
- DESTINATION ${TARGETDIR}
- )
+ install(
+ FILES ${LIBDIR}/gettext/lib/gnu_gettext.dll
+ DESTINATION ${TARGETDIR}
+ )
+ if(NOT CMAKE_CL_64)
install(
FILES ${LIBDIR}/iconv/lib/iconv.dll
DESTINATION ${TARGETDIR}
@@ -449,8 +453,10 @@ elseif(WIN32)
endif()
install( # same as linux!, deduplicate
- DIRECTORY ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
- DESTINATION ${TARGETDIR_VER}/datafiles/locale
+ DIRECTORY
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+ DESTINATION ${TARGETDIR_VER}/datafiles
PATTERN ".svn" EXCLUDE
)
@@ -662,9 +668,12 @@ elseif(APPLE)
DESTINATION ${TARGETDIR_VER}/datafiles
)
- install_dir(
- ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale/
- \${TARGETDIR_VER}/datafiles/locale
+ install(
+ DIRECTORY
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+ ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
+ DESTINATION ${TARGETDIR_VER}/datafiles
+ PATTERN ".svn" EXCLUDE
)
endif()
@@ -712,13 +721,16 @@ add_dependencies(blender makesdna)
get_property(BLENDER_LINK_LIBS GLOBAL PROPERTY BLENDER_LINK_LIBS)
-set(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager bf_render)
+set(BLENDER_LINK_LIBS
+ ${BLENDER_LINK_LIBS}
+ bf_windowmanager
+ bf_render
+)
if(WITH_MOD_FLUID)
list(APPEND BLENDER_LINK_LIBS bf_intern_elbeem)
endif()
-
#if(UNIX)
# Sort libraries
set(BLENDER_SORTED_LIBS
@@ -799,6 +811,7 @@ endif()
extern_minilzo
extern_lzma
ge_logic_ketsji
+ extern_recastnavigation
ge_phys_common
ge_logic
ge_rasterizer
@@ -806,7 +819,6 @@ endif()
ge_logic_expressions
ge_scenegraph
ge_logic_network
- bf_python # duplicate for BPY_driver_exec
ge_logic_ngnetwork
extern_bullet
ge_logic_loopbacknetwork
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 9b2cfb08382..91c2d74dc26 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -542,22 +542,17 @@ static int set_output(int argc, const char **argv, void *data)
static int set_engine(int argc, const char **argv, void *data)
{
bContext *C = data;
- if (argc >= 1)
- {
- if (!strcmp(argv[1],"help"))
- {
+ if (argc >= 2) {
+ if (!strcmp(argv[1], "help")) {
RenderEngineType *type = NULL;
-
- for( type = R_engines.first; type; type = type->next )
- {
+ printf("Blender Engine Listing:\n");
+ for( type = R_engines.first; type; type = type->next ) {
printf("\t%s\n", type->idname);
}
exit(0);
}
- else
- {
- if (CTX_data_scene(C)==NULL)
- {
+ else {
+ if (CTX_data_scene(C)==NULL) {
printf("\nError: no blend loaded. order the arguments so '-E / --engine ' is after a blend is loaded.\n");
}
else {
@@ -565,7 +560,7 @@ static int set_engine(int argc, const char **argv, void *data)
RenderData *rd = &scene->r;
if(BLI_findstring(&R_engines, argv[1], offsetof(RenderEngineType, idname))) {
- BLI_strncpy(rd->engine, argv[1], sizeof(rd->engine));
+ BLI_strncpy_utf8(rd->engine, argv[1], sizeof(rd->engine));
}
}
}
@@ -574,7 +569,7 @@ static int set_engine(int argc, const char **argv, void *data)
}
else
{
- printf("\nEngine not specified.\n");
+ printf("\nEngine not specified, give 'help' for a list of available engines.\n");
return 0;
}
}
diff --git a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
index 40f1701e44a..ce542671425 100644
--- a/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
+++ b/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
@@ -169,6 +169,11 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
int disableVBO = (U.gameflags & USER_DISABLE_VBO);
U.gameflags |= USER_DISABLE_VBO;
+ // Globals to be carried on over blender files
+ GlobalSettings gs;
+ gs.matmode= startscene->gm.matmode;
+ gs.glslflag= startscene->gm.flag;
+
do
{
View3D *v3d= CTX_wm_view3d(C);
@@ -239,6 +244,9 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
ketsjiengine->SetTimingDisplay(frameRate, profile, properties);
ketsjiengine->SetRestrictAnimationFPS(restrictAnimFPS);
+ //set the global settings (carried over if restart/load new files)
+ ketsjiengine->SetGlobalSettings(&gs);
+
#ifdef WITH_PYTHON
CValue::SetDeprecationWarnings(nodepwarnings);
#endif
@@ -370,12 +378,12 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
if(GPU_glsl_support())
useglslmat = true;
- else if(scene->gm.matmode == GAME_MAT_GLSL)
+ else if(gs.matmode == GAME_MAT_GLSL)
usemat = false;
- if(usemat && (scene->gm.matmode != GAME_MAT_TEXFACE))
+ if(usemat && (gs.matmode != GAME_MAT_TEXFACE))
sceneconverter->SetMaterials(true);
- if(useglslmat && (scene->gm.matmode == GAME_MAT_GLSL))
+ if(useglslmat && (gs.matmode == GAME_MAT_GLSL))
sceneconverter->SetGLSLMaterials(true);
KX_Scene* startscene = new KX_Scene(keyboarddevice,
@@ -494,6 +502,7 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
}
printf("Blender Game Engine Finished\n");
exitstring = ketsjiengine->GetExitString();
+ gs = *(ketsjiengine->GetGlobalSettings());
// when exiting the mainloop
@@ -507,9 +516,10 @@ extern "C" void StartKetsjiShell(struct bContext *C, struct ARegion *ar, rcti *c
//PyDict_Clear(PyModule_GetDict(gameLogic));
// Keep original items, means python plugins will autocomplete members
- int listIndex;
PyObject *gameLogic_keys_new = PyDict_Keys(PyModule_GetDict(gameLogic));
- for (listIndex=0; listIndex < PyList_Size(gameLogic_keys_new); listIndex++) {
+ const Py_ssize_t numitems= PyList_GET_SIZE(gameLogic_keys_new);
+ Py_ssize_t listIndex;
+ for (listIndex=0; listIndex < numitems; listIndex++) {
PyObject* item = PyList_GET_ITEM(gameLogic_keys_new, listIndex);
if (!PySequence_Contains(gameLogic_keys, item)) {
PyDict_DelItem( PyModule_GetDict(gameLogic), item);
diff --git a/source/gameengine/Converter/BL_ArmatureObject.cpp b/source/gameengine/Converter/BL_ArmatureObject.cpp
index 684bd3f341e..c5bf28b9b8d 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.cpp
+++ b/source/gameengine/Converter/BL_ArmatureObject.cpp
@@ -110,7 +110,6 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
for (pchan=(bPoseChannel*)out->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) {
pchan->parent= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->parent);
pchan->child= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->child);
- pchan->path= NULL;
if (copy_constraint) {
ListBase listb;
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index fcfc07e631e..2c2fd052b5d 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -144,6 +144,8 @@ extern "C" {
#include "BKE_cdderivedmesh.h"
#include "BKE_DerivedMesh.h"
#include "BKE_material.h" /* give_current_material */
+#include "BKE_image.h"
+#include "IMB_imbuf_types.h"
extern Material defmaterial; /* material.c */
}
@@ -180,6 +182,9 @@ extern Material defmaterial; /* material.c */
#include "BL_ArmatureObject.h"
#include "BL_DeformableGameObject.h"
+#include "KX_NavMeshObject.h"
+#include "KX_ObstacleSimulation.h"
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -192,7 +197,7 @@ extern "C" {
}
#endif
-static int default_face_mode = TF_DYNAMIC;
+static bool default_light_mode = 0;
static unsigned int KX_rgbaint2uint_new(unsigned int icol)
{
@@ -231,9 +236,9 @@ static unsigned int KX_Mcol2uint_new(MCol col)
return out_color.integer;
}
-static void SetDefaultFaceType(Scene* scene)
+static void SetDefaultLightMode(Scene* scene)
{
- default_face_mode = TF_DYNAMIC;
+ default_light_mode = false;
Scene *sce_iter;
Base *base;
@@ -241,7 +246,7 @@ static void SetDefaultFaceType(Scene* scene)
{
if (base->object->type == OB_LAMP)
{
- default_face_mode = TF_DYNAMIC|TF_LIGHT;
+ default_light_mode = true;
return;
}
}
@@ -350,41 +355,41 @@ bool ConvertMaterial(
// use lighting?
material->ras_mode |= ( mat->mode & MA_SHLESS )?0:USE_LIGHT;
+ material->ras_mode |= ( mat->game.flag & GEMAT_BACKCULL )?0:TWOSIDED;
+
// cast shadows?
material->ras_mode |= ( mat->mode & MA_SHADBUF )?CAST_SHADOW:0;
MTex *mttmp = 0;
numchan = getNumTexChannels(mat);
int valid_index = 0;
- // use the face texture if
- // 1) it is set in the buttons
- // 2) we have a face texture and a material but no valid texture in slot 1
+ /* In Multitexture use the face texture if and only if
+ * it is set in the buttons
+ * In GLSL is not working yet :/ 3.2011 */
bool facetex = false;
if(validface && mat->mode &MA_FACETEXTURE)
facetex = true;
- if(validface && !mat->mtex[0])
- facetex = true;
- if(validface && mat->mtex[0]) {
- MTex *tmp = mat->mtex[0];
- if(!tmp->tex || (tmp->tex && !tmp->tex->ima))
- facetex = true;
- }
+
numchan = numchan>MAXTEX?MAXTEX:numchan;
+ if (facetex && numchan == 0) numchan = 1;
// foreach MTex
for(int i=0; i<numchan; i++) {
// use face tex
if(i==0 && facetex ) {
+ facetex = false;
Image*tmp = (Image*)(tface->tpage);
if(tmp) {
material->img[i] = tmp;
material->texname[i] = material->img[i]->id.name;
- material->flag[i] |= ( tface->transp &TF_ALPHA )?USEALPHA:0;
- material->flag[i] |= ( tface->transp &TF_ADD )?CALCALPHA:0;
material->flag[i] |= MIPMAP;
+ material->flag[i] |= ( mat->game.alpha_blend & GEMAT_ALPHA_SORT )?USEALPHA:0;
+ material->flag[i] |= ( mat->game.alpha_blend & GEMAT_ALPHA )?USEALPHA:0;
+ material->flag[i] |= ( mat->game.alpha_blend & GEMAT_ADD )?CALCALPHA:0;
+
if(material->img[i]->flag & IMA_REFLECT)
material->mapping[i].mapping |= USEREFL;
else
@@ -402,11 +407,6 @@ bool ConvertMaterial(
material->mapping[i].mapping |= USEUV;
}
- if(material->ras_mode & USE_LIGHT)
- material->ras_mode &= ~USE_LIGHT;
- if(tface->mode & TF_LIGHT)
- material->ras_mode |= USE_LIGHT;
-
valid_index++;
}
else {
@@ -564,25 +564,31 @@ bool ConvertMaterial(
material->ras_mode |= (mat->material_type == MA_TYPE_WIRE)? WIRE: 0;
}
- else {
+ else { // No Material
int valid = 0;
// check for tface tex to fallback on
if( validface ){
-
- // no light bugfix
- if(tface->mode) material->ras_mode |= USE_LIGHT;
-
material->img[0] = (Image*)(tface->tpage);
// ------------------------
if(material->img[0]) {
material->texname[0] = material->img[0]->id.name;
material->mapping[0].mapping |= ( (material->img[0]->flag & IMA_REFLECT)!=0 )?USEREFL:0;
- material->flag[0] |= ( tface->transp &TF_ALPHA )?USEALPHA:0;
- material->flag[0] |= ( tface->transp &TF_ADD )?CALCALPHA:0;
+
+ /* see if depth of the image is 32bits */
+ if(BKE_image_has_alpha(material->img[0])) {
+ material->flag[0] |= USEALPHA;
+ material->alphablend = GEMAT_ALPHA;
+ }
+ else
+ material->alphablend = GEMAT_SOLID;
+
valid++;
}
}
+ else
+ material->alphablend = GEMAT_SOLID;
+
material->SetUsers(-1);
material->num_enabled = valid;
material->IdMode = TEXFACE;
@@ -595,6 +601,9 @@ bool ConvertMaterial(
material->matcolor[2] = 0.5f;
material->spec_f = 0.5f;
material->ref = 0.8f;
+
+ // No material - old default TexFace properties
+ material->ras_mode |= USE_LIGHT;
}
MT_Point2 uv[4];
MT_Point2 uv2[4];
@@ -603,13 +612,10 @@ bool ConvertMaterial(
uv2[0]= uv2[1]= uv2[2]= uv2[3]= MT_Point2(0.0f, 0.0f);
+ /* No material, what to do? let's see what is in the UV and set the material accordingly
+ light and visible is always on */
if( validface ) {
-
- material->ras_mode |= (tface->mode & TF_INVISIBLE)?0:POLY_VIS;
-
- material->transp = tface->transp;
material->tile = tface->tile;
- material->mode = tface->mode;
uv[0].setValue(tface->uv[0]);
uv[1].setValue(tface->uv[1]);
@@ -622,31 +628,26 @@ bool ConvertMaterial(
}
else {
// nothing at all
- material->ras_mode |= (POLY_VIS| (validmat?0:USE_LIGHT));
- material->mode = default_face_mode;
- material->transp = TF_SOLID;
+ material->alphablend = GEMAT_SOLID;
material->tile = 0;
uv[0]= uv[1]= uv[2]= uv[3]= MT_Point2(0.0f, 0.0f);
}
+ if (validmat && validface) {
+ material->alphablend = mat->game.alpha_blend;
+ }
+
// with ztransp enabled, enforce alpha blending mode
- if(validmat && (mat->mode & MA_TRANSP) && (mat->mode & MA_ZTRANSP) && (material->transp == TF_SOLID))
- material->transp = TF_ALPHA;
+ if(validmat && (mat->mode & MA_TRANSP) && (mat->mode & MA_ZTRANSP) && (material->alphablend == GEMAT_SOLID))
+ material->alphablend = GEMAT_ALPHA;
// always zsort alpha + add
- if((material->transp == TF_ALPHA || material->transp == TF_ADD || texalpha) && (material->transp != TF_CLIP)) {
+ if((ELEM3(material->alphablend, GEMAT_ALPHA, GEMAT_ALPHA_SORT, GEMAT_ADD) || texalpha) && (material->alphablend != GEMAT_CLIP )) {
material->ras_mode |= ALPHA;
- material->ras_mode |= (material->mode & TF_ALPHASORT)? ZSORT: 0;
+ material->ras_mode |= (mat && (mat->game.alpha_blend & GEMAT_ALPHA_SORT))? ZSORT: 0;
}
- // collider or not?
- material->ras_mode |= (material->mode & TF_DYNAMIC)? COLLIDER: 0;
-
- // these flags are irrelevant at this point, remove so they
- // don't hurt material bucketing
- material->mode &= ~(TF_DYNAMIC|TF_ALPHASORT|TF_TEX);
-
// get uv sets
if(validmat)
{
@@ -703,8 +704,8 @@ bool ConvertMaterial(
unsigned int rgb[4];
GetRGB(type,mface,mmcol,mat,rgb[0],rgb[1],rgb[2], rgb[3]);
- // swap the material color, so MCol on TF_BMFONT works
- if (validmat && type==1 && (tface && tface->mode & TF_BMFONT))
+ // swap the material color, so MCol on bitmap font works
+ if (validmat && type==1 && (mat->game.flag & GEMAT_TEXT))
{
rgb[0] = KX_rgbaint2uint_new(rgb[0]);
rgb[1] = KX_rgbaint2uint_new(rgb[1]);
@@ -861,10 +862,6 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
ConvertMaterial(bl_mat, ma, tface, tfaceName, mface, mcol,
layers, converter->GetGLSLMaterials());
- visible = ((bl_mat->ras_mode & POLY_VIS)!=0);
- collider = ((bl_mat->ras_mode & COLLIDER)!=0);
- twoside = ((bl_mat->mode & TF_TWOSIDE)!=0);
-
/* vertex colors and uv's were stored in bl_mat temporarily */
bl_mat->GetConversionRGB(rgb);
rgb0 = rgb[0]; rgb1 = rgb[1];
@@ -882,7 +879,7 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
if (kx_blmat == NULL)
kx_blmat = new KX_BlenderMaterial();
- kx_blmat->Initialize(scene, bl_mat);
+ kx_blmat->Initialize(scene, bl_mat, (ma?&ma->game:NULL));
polymat = static_cast<RAS_IPolyMaterial*>(kx_blmat);
}
else {
@@ -890,37 +887,59 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
Image* bima = (tface)? (Image*)tface->tpage: NULL;
imastr = (tface)? (bima? (bima)->id.name : "" ) : "";
- char transp=0;
- short mode=0, tile=0;
+ char alpha_blend=0;
+ short tile=0;
int tilexrep=4,tileyrep = 4;
-
+
+ /* set material properties - old TexFace */
+ if (ma) {
+ alpha_blend = ma->game.alpha_blend;
+ /* Commented out for now. If we ever get rid of
+ * "Texture Face/Singletexture" we can then think about it */
+
+ /* Texture Face mode ignores texture but requires "Face Textures to be True "*/
+ /**
+ if ((ma->mode &MA_FACETEXTURE)==0 && (ma->game.flag &GEMAT_TEXT)==0) {
+ bima = NULL;
+ imastr = "";
+ alpha_blend = GEMAT_SOLID;
+ }
+ else
+ alpha_blend = ma->game.alpha_blend;
+ */
+ }
+ /* check for tface tex to fallback on */
+ else {
+ if (bima) {
+ /* see if depth of the image is 32 */
+ if (BKE_image_has_alpha(bima))
+ alpha_blend = GEMAT_ALPHA;
+ else
+ alpha_blend = GEMAT_SOLID;
+ }
+ else {
+ alpha_blend = GEMAT_SOLID;
+ }
+ }
+
if (bima) {
tilexrep = bima->xrep;
tileyrep = bima->yrep;
}
- /* get tface properties if available */
+ /* set UV properties */
if(tface) {
- /* TF_DYNAMIC means the polygon is a collision face */
- collider = ((tface->mode & TF_DYNAMIC) != 0);
- transp = tface->transp;
- tile = tface->tile;
- mode = tface->mode;
-
- visible = !(tface->mode & TF_INVISIBLE);
- twoside = ((tface->mode & TF_TWOSIDE)!=0);
-
uv0.setValue(tface->uv[0]);
uv1.setValue(tface->uv[1]);
uv2.setValue(tface->uv[2]);
if (mface->v4)
uv3.setValue(tface->uv[3]);
+
+ tile = tface->tile;
}
else {
- /* no texfaces, set COLLSION true and everything else FALSE */
- mode = default_face_mode;
- transp = TF_SOLID;
+ /* no texfaces */
tile = 0;
}
@@ -961,16 +980,20 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
if (mface->v4)
rgb3 = KX_rgbaint2uint_new(color);
}
-
+
// only zsort alpha + add
- bool alpha = (transp == TF_ALPHA || transp == TF_ADD);
- bool zsort = (mode & TF_ALPHASORT)? alpha: 0;
+ bool alpha = ELEM3(alpha_blend, GEMAT_ALPHA, GEMAT_ADD, GEMAT_ALPHA_SORT);
+ bool zsort = (alpha_blend == GEMAT_ALPHA_SORT);
+ bool light = (ma)?(ma->mode & MA_SHLESS)==0:default_light_mode;
+
+ // don't need zort anymore, deal as if it it's alpha blend
+ if (alpha_blend == GEMAT_ALPHA_SORT) alpha_blend = GEMAT_ALPHA;
if (kx_polymat == NULL)
kx_polymat = new KX_PolygonMaterial();
kx_polymat->Initialize(imastr, ma, (int)mface->mat_nr,
tile, tilexrep, tileyrep,
- mode, transp, alpha, zsort, lightlayer, tface, (unsigned int*)mcol);
+ alpha_blend, alpha, zsort, light, lightlayer, tface, (unsigned int*)mcol);
polymat = static_cast<RAS_IPolyMaterial*>(kx_polymat);
if (ma) {
@@ -984,6 +1007,19 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
}
}
+ // set render flags
+ if (ma)
+ {
+ visible = ((ma->game.flag & GEMAT_INVISIBLE)==0);
+ twoside = ((ma->game.flag & GEMAT_BACKCULL)==0);
+ collider = ((ma->game.flag & GEMAT_NOPHYSICS)==0);
+ }
+ else{
+ visible = true;
+ twoside = false;
+ collider = true;
+ }
+
/* mark face as flat, so vertices are split */
bool flat = (mface->flag & ME_SMOOTH) == 0;
@@ -1741,7 +1777,14 @@ static KX_GameObject *gameobject_from_blenderobject(
// needed for python scripting
kxscene->GetLogicManager()->RegisterMeshName(meshobj->GetName(),meshobj);
-
+
+ if (ob->gameflag & OB_NAVMESH)
+ {
+ gameobj = new KX_NavMeshObject(kxscene,KX_Scene::m_callbacks);
+ gameobj->AddMesh(meshobj);
+ break;
+ }
+
gameobj = new BL_DeformableGameObject(ob,kxscene,KX_Scene::m_callbacks);
// set transformation
@@ -2025,7 +2068,7 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
logicmgr->RegisterActionName(curAct->id.name + 2, curAct);
}
- SetDefaultFaceType(blenderscene);
+ SetDefaultLightMode(blenderscene);
// Let's support scene set.
// Beware of name conflict in linked data, it will not crash but will create confusion
// in Python scripting and in certain actuators (replace mesh). Linked scene *should* have
@@ -2710,6 +2753,46 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
converter->RegisterWorldInfo(worldinfo);
kxscene->SetWorldInfo(worldinfo);
+ //create object representations for obstacle simulation
+ KX_ObstacleSimulation* obssimulation = kxscene->GetObstacleSimulation();
+ if (obssimulation)
+ {
+ for ( i=0;i<objectlist->GetCount();i++)
+ {
+ KX_GameObject* gameobj = static_cast<KX_GameObject*>(objectlist->GetValue(i));
+ struct Object* blenderobject = gameobj->GetBlenderObject();
+ if (blenderobject->gameflag & OB_HASOBSTACLE)
+ {
+ obssimulation->AddObstacleForObj(gameobj);
+ }
+ }
+ }
+
+ //process navigation mesh objects
+ for ( i=0; i<objectlist->GetCount();i++)
+ {
+ KX_GameObject* gameobj = static_cast<KX_GameObject*>(objectlist->GetValue(i));
+ struct Object* blenderobject = gameobj->GetBlenderObject();
+ if (blenderobject->type==OB_MESH && (blenderobject->gameflag & OB_NAVMESH))
+ {
+ KX_NavMeshObject* navmesh = static_cast<KX_NavMeshObject*>(gameobj);
+ navmesh->SetVisible(0, true);
+ navmesh->BuildNavMesh();
+ if (obssimulation)
+ obssimulation->AddObstaclesForNavMesh(navmesh);
+ }
+ }
+ for ( i=0; i<inactivelist->GetCount();i++)
+ {
+ KX_GameObject* gameobj = static_cast<KX_GameObject*>(inactivelist->GetValue(i));
+ struct Object* blenderobject = gameobj->GetBlenderObject();
+ if (blenderobject->type==OB_MESH && (blenderobject->gameflag & OB_NAVMESH))
+ {
+ KX_NavMeshObject* navmesh = static_cast<KX_NavMeshObject*>(gameobj);
+ navmesh->SetVisible(0, true);
+ }
+ }
+
#define CONVERT_LOGIC
#ifdef CONVERT_LOGIC
// convert logic bricks, sensors, controllers and actuators
diff --git a/source/gameengine/Converter/BL_SkinDeformer.cpp b/source/gameengine/Converter/BL_SkinDeformer.cpp
index 3a379e8b0ed..93c65eb38de 100644
--- a/source/gameengine/Converter/BL_SkinDeformer.cpp
+++ b/source/gameengine/Converter/BL_SkinDeformer.cpp
@@ -243,7 +243,6 @@ void BL_SkinDeformer::BGEDeformVerts()
for (int i=0; i<m_bmesh->totvert; ++i)
{
float contrib = 0.f, weight, max_weight=0.f;
- Bone *bone;
bPoseChannel *pchan=NULL;
MDeformVert *dvert;
Eigen::Map<Eigen::Vector3f> norm(m_transnors[i]);
@@ -266,7 +265,6 @@ void BL_SkinDeformer::BGEDeformVerts()
if (index < numGroups && (pchan=m_dfnrToPC[index]))
{
weight = dvert->dw[j].weight;
- bone = pchan->bone;
if (weight)
{
@@ -318,8 +316,8 @@ bool BL_SkinDeformer::UpdateInternal(bool shape_applied)
/* duplicate */
for (int v =0; v<m_bmesh->totvert; v++)
{
- VECCOPY(m_transverts[v], m_bmesh->mvert[v].co);
- VECCOPY(m_transnors[v], m_bmesh->mvert[v].no);
+ copy_v3_v3(m_transverts[v], m_bmesh->mvert[v].co);
+ normal_short_to_float_v3(m_transnors[v], m_bmesh->mvert[v].no);
}
}
diff --git a/source/gameengine/Converter/CMakeLists.txt b/source/gameengine/Converter/CMakeLists.txt
index 3a217ce9d74..039f454e870 100644
--- a/source/gameengine/Converter/CMakeLists.txt
+++ b/source/gameengine/Converter/CMakeLists.txt
@@ -56,6 +56,7 @@ set(INC
../../../intern/guardedalloc
../../../intern/moto/include
../../../intern/string
+ ../../../extern/recastnavigation/Detour/Include
)
set(INC_SYS
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
index 7191730187c..656dcfa3220 100644
--- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
+++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
@@ -385,6 +385,12 @@ void KX_BlenderSceneConverter::ConvertScene(class KX_Scene* destinationscene,
//This cache mecanism is buggy so I leave it disable and the memory leak
//that would result from this is fixed in RemoveScene()
m_map_mesh_to_gamemesh.clear();
+
+#ifndef USE_BULLET
+ /* quiet compiler warning */
+ (void)useDbvtCulling;
+#endif
+
}
// This function removes all entities stored in the converter for that scene
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 8fc224fba6f..a14e5fb5449 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -72,6 +72,7 @@
#include "KX_SCA_ReplaceMeshActuator.h"
#include "KX_ParentActuator.h"
#include "KX_SCA_DynamicActuator.h"
+#include "KX_SteeringActuator.h"
#include "KX_Scene.h"
#include "KX_KetsjiEngine.h"
@@ -100,6 +101,7 @@
#include "BL_ActionActuator.h"
#include "BL_ShapeActionActuator.h"
#include "BL_ArmatureActuator.h"
+#include "RNA_access.h"
#include "BL_Action.h"
/* end of blender include block */
@@ -413,14 +415,21 @@ void BL_ConvertActuators(char* maggiename,
// if sound shall be 3D but isn't mono, we have to make it mono!
if(is3d)
{
- AUD_Reference<AUD_IReader> reader = snd_sound->createReader();
- if(reader->getSpecs().channels != AUD_CHANNELS_MONO)
+ try
{
- AUD_DeviceSpecs specs;
- specs.channels = AUD_CHANNELS_MONO;
- specs.rate = AUD_RATE_INVALID;
- specs.format = AUD_FORMAT_INVALID;
- snd_sound = new AUD_ChannelMapperFactory(snd_sound, specs);
+ AUD_Reference<AUD_IReader> reader = snd_sound->createReader();
+ if(reader->getSpecs().channels != AUD_CHANNELS_MONO)
+ {
+ AUD_DeviceSpecs specs;
+ specs.channels = AUD_CHANNELS_MONO;
+ specs.rate = AUD_RATE_INVALID;
+ specs.format = AUD_FORMAT_INVALID;
+ snd_sound = new AUD_ChannelMapperFactory(snd_sound, specs);
+ }
+ }
+ catch(AUD_Exception&)
+ {
+ // sound cannot be played... ignore
}
}
}
@@ -1057,6 +1066,45 @@ void BL_ConvertActuators(char* maggiename,
baseact = tmparmact;
break;
}
+ case ACT_STEERING:
+ {
+ bSteeringActuator *stAct = (bSteeringActuator *) bact->data;
+ KX_GameObject *navmeshob = NULL;
+ if (stAct->navmesh)
+ {
+ PointerRNA settings_ptr;
+ RNA_pointer_create((ID *)stAct->navmesh, &RNA_GameObjectSettings, stAct->navmesh, &settings_ptr);
+ if (RNA_enum_get(&settings_ptr, "physics_type") == OB_BODY_TYPE_NAVMESH)
+ navmeshob = converter->FindGameObject(stAct->navmesh);
+ }
+ KX_GameObject *targetob = converter->FindGameObject(stAct->target);
+
+ int mode = KX_SteeringActuator::KX_STEERING_NODEF;
+ switch(stAct->type)
+ {
+ case ACT_STEERING_SEEK:
+ mode = KX_SteeringActuator::KX_STEERING_SEEK;
+ break;
+ case ACT_STEERING_FLEE:
+ mode = KX_SteeringActuator::KX_STEERING_FLEE;
+ break;
+ case ACT_STEERING_PATHFOLLOWING:
+ mode = KX_SteeringActuator::KX_STEERING_PATHFOLLOWING;
+ break;
+ }
+
+ bool selfTerminated = (stAct->flag & ACT_STEERING_SELFTERMINATED) !=0;
+ bool enableVisualization = (stAct->flag & ACT_STEERING_ENABLEVISUALIZATION) !=0;
+ short facingMode = (stAct->flag & ACT_STEERING_AUTOMATICFACING) ? stAct->facingaxis : 0;
+ bool normalup = (stAct->flag & ACT_STEERING_NORMALUP) !=0;
+ KX_SteeringActuator *tmpstact
+ = new KX_SteeringActuator(gameobj, mode, targetob, navmeshob,stAct->dist,
+ stAct->velocity, stAct->acceleration, stAct->turnspeed,
+ selfTerminated, stAct->updateTime,
+ scene->GetObstacleSimulation(), facingMode, normalup, enableVisualization);
+ baseact = tmpstact;
+ break;
+ }
default:
; /* generate some error */
}
diff --git a/source/gameengine/Converter/SConscript b/source/gameengine/Converter/SConscript
index 0ae22d548c5..e155677e522 100644
--- a/source/gameengine/Converter/SConscript
+++ b/source/gameengine/Converter/SConscript
@@ -20,6 +20,7 @@ incs += ' #source/blender/misc #source/blender/blenloader #source/blender/gpu'
incs += ' #source/blender/windowmanager'
incs += ' #source/blender/makesrna'
incs += ' #source/blender/ikplugin'
+incs += ' #extern/recastnavigation/Detour/Include'
incs += ' #extern/Eigen2'
incs += ' ' + env['BF_BULLET_INC']
diff --git a/source/gameengine/Expressions/IfExpr.h b/source/gameengine/Expressions/IfExpr.h
index 5ac8d835afd..e67134c2271 100644
--- a/source/gameengine/Expressions/IfExpr.h
+++ b/source/gameengine/Expressions/IfExpr.h
@@ -20,7 +20,7 @@
#if !defined(AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_)
#define AFX_IFEXPR_H__1F691841_C5C7_11D1_A863_0000B4542BD8__INCLUDED_
-#if _MSC_VER >= 1000
+#if defined(_MSC_VER) && _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
diff --git a/source/gameengine/Expressions/ListValue.cpp b/source/gameengine/Expressions/ListValue.cpp
index 271d5067dd9..934f2a8dd87 100644
--- a/source/gameengine/Expressions/ListValue.cpp
+++ b/source/gameengine/Expressions/ListValue.cpp
@@ -387,7 +387,7 @@ PyObject* listvalue_buffer_slice(PyObject* self,Py_ssize_t ilow, Py_ssize_t ihig
static PyObject *listvalue_buffer_concat(PyObject * self, PyObject * other)
{
CListValue *listval= static_cast<CListValue *>(BGE_PROXY_REF(self));
- int i, numitems, numitems_orig;
+ Py_ssize_t i, numitems, numitems_orig;
if (listval==NULL) {
PyErr_SetString(PyExc_SystemError, "CList+other, "BGE_PROXY_ERROR_MSG);
@@ -408,7 +408,7 @@ static PyObject *listvalue_buffer_concat(PyObject * self, PyObject * other)
CValue* listitemval;
bool error = false;
- numitems = PyList_Size(other);
+ numitems = PyList_GET_SIZE(other);
/* copy the first part of the list */
listval_new->Resize(numitems_orig + numitems);
diff --git a/source/gameengine/Expressions/Value.cpp b/source/gameengine/Expressions/Value.cpp
index e60b380e95c..41c0850a779 100644
--- a/source/gameengine/Expressions/Value.cpp
+++ b/source/gameengine/Expressions/Value.cpp
@@ -546,8 +546,8 @@ CValue* CValue::ConvertPythonToValue(PyObject* pyobj, const char *error_prefix)
CListValue* listval = new CListValue();
bool error = false;
- int i;
- int numitems = PyList_Size(pyobj);
+ Py_ssize_t i;
+ Py_ssize_t numitems = PyList_GET_SIZE(pyobj);
for (i=0;i<numitems;i++)
{
PyObject* listitem = PyList_GetItem(pyobj,i); /* borrowed ref */
diff --git a/source/gameengine/GameLogic/SCA_IActuator.h b/source/gameengine/GameLogic/SCA_IActuator.h
index bfcec983e2a..d2a8de32895 100644
--- a/source/gameengine/GameLogic/SCA_IActuator.h
+++ b/source/gameengine/GameLogic/SCA_IActuator.h
@@ -90,6 +90,7 @@ public:
KX_ACT_SHAPEACTION,
KX_ACT_STATE,
KX_ACT_ARMATURE,
+ KX_ACT_STEERING,
};
SCA_IActuator(SCA_IObject* gameobj, KX_ACTUATOR_TYPE type);
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index 944ec9abd67..b452bb97cde 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -78,4 +78,8 @@ if(WITH_CODEC_FFMPEG)
add_definitions(-DWITH_FFMPEG)
endif()
+if(WITH_INTERNATIONAL)
+ add_definitions(-DINTERNATIONAL)
+endif()
+
blender_add_lib_nolist(ge_player_ghost "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
index 5bc6093a9ff..7b47d74d424 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
@@ -151,7 +151,7 @@ GPG_Application::~GPG_Application(void)
-bool GPG_Application::SetGameEngineData(struct Main* maggie, Scene *scene, int argc, char **argv)
+bool GPG_Application::SetGameEngineData(struct Main* maggie, Scene *scene, GlobalSettings *gs, int argc, char **argv)
{
bool result = false;
@@ -168,6 +168,9 @@ bool GPG_Application::SetGameEngineData(struct Main* maggie, Scene *scene, int a
m_argc= argc;
m_argv= argv;
+ /* Global Settings */
+ m_globalSettings= gs;
+
return result;
}
@@ -511,6 +514,12 @@ int GPG_Application::getExitRequested(void)
}
+GlobalSettings* GPG_Application::getGlobalSettings(void)
+{
+ return m_ketsjiengine->GetGlobalSettings();
+}
+
+
const STR_String& GPG_Application::getExitString(void)
{
@@ -552,7 +561,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
if(GPU_glsl_support())
m_blenderglslmat = (SYS_GetCommandLineInt(syshandle, "blender_glsl_material", 1) != 0);
- else if(gm->matmode == GAME_MAT_GLSL)
+ else if(m_globalSettings->matmode == GAME_MAT_GLSL)
m_blendermat = false;
// create the canvas, rasterizer and rendertools
@@ -629,6 +638,9 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode)
m_ketsjiengine->SetTimingDisplay(frameRate, profile, properties);
m_ketsjiengine->SetRestrictAnimationFPS(restrictAnimFPS);
+ //set the global settings (carried over if restart/load new files)
+ m_ketsjiengine->SetGlobalSettings(m_globalSettings);
+
m_engineInitialized = true;
}
@@ -685,9 +697,9 @@ bool GPG_Application::startEngine(void)
// if (always_use_expand_framing)
// sceneconverter->SetAlwaysUseExpandFraming(true);
- if(m_blendermat && (m_startScene->gm.matmode != GAME_MAT_TEXFACE))
+ if(m_blendermat && (m_globalSettings->matmode != GAME_MAT_TEXFACE))
m_sceneconverter->SetMaterials(true);
- if(m_blenderglslmat && (m_startScene->gm.matmode == GAME_MAT_GLSL))
+ if(m_blenderglslmat && (m_globalSettings->matmode == GAME_MAT_GLSL))
m_sceneconverter->SetGLSLMaterials(true);
KX_Scene* startscene = new KX_Scene(m_keyboard,
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.h b/source/gameengine/GamePlayer/ghost/GPG_Application.h
index c0638517657..df87aea1195 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_Application.h
+++ b/source/gameengine/GamePlayer/ghost/GPG_Application.h
@@ -39,6 +39,8 @@
#include <wtypes.h>
#endif
+#include "KX_KetsjiEngine.h"
+
class KX_KetsjiEngine;
class KX_ISceneConverter;
class NG_LoopBackNetworkDeviceInterface;
@@ -61,7 +63,7 @@ public:
GPG_Application(GHOST_ISystem* system);
~GPG_Application(void);
- bool SetGameEngineData(struct Main* maggie, struct Scene* scene, int argc, char** argv);
+ bool SetGameEngineData(struct Main* maggie, struct Scene* scene, GlobalSettings* gs, int argc, char** argv);
bool startWindow(STR_String& title, int windowLeft, int windowTop, int windowWidth, int windowHeight,
const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0);
bool startFullScreen(int width, int height, int bpp, int frequency, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0);
@@ -74,6 +76,7 @@ public:
virtual bool processEvent(GHOST_IEvent* event);
int getExitRequested(void);
const STR_String& getExitString(void);
+ GlobalSettings* getGlobalSettings(void);
bool StartGameEngine(int stereoMode);
void StopGameEngine();
@@ -111,6 +114,8 @@ protected:
/* Exit state. */
int m_exitRequested;
STR_String m_exitString;
+ GlobalSettings* m_globalSettings;
+
/* GHOST system abstraction. */
GHOST_ISystem* m_system;
/* Main window. */
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 3f8bcf9e2ad..726a1d4119a 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -81,6 +81,7 @@ extern char btempdir[]; /* use this to store a valid temp directory */
// For BLF
#include "BLF_api.h"
+#include "BLF_translation.h"
extern int datatoc_bfont_ttf_size;
extern char datatoc_bfont_ttf[];
@@ -404,7 +405,7 @@ int main(int argc, char** argv)
// We don't use threads directly in the BGE, but we need to call this so things like
// freeing up GPU_Textures works correctly.
BLI_threadapi_init();
-
+
RNA_init();
init_nodesystem();
@@ -420,6 +421,9 @@ int main(int argc, char** argv)
// Setup builtin font for BLF (mostly copied from creator.c, wm_init_exit.c and interface_style.c)
BLF_init(11, U.dpi);
BLF_lang_init();
+ BLF_lang_encoding("");
+ BLF_lang_set("");
+
BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
// Parse command line options
@@ -746,6 +750,11 @@ int main(int argc, char** argv)
if(filename[0])
BLI_path_cwd(filename);
+
+ // fill the GlobalSettings with the first scene files
+ // those may change during the game and persist after using Game Actuator
+ GlobalSettings gs;
+
do
{
// Read the Blender file
@@ -799,9 +808,13 @@ int main(int argc, char** argv)
Scene *scene = bfd->curscene;
G.main = maggie;
- if (firstTimeRunning)
+ if (firstTimeRunning) {
G.fileflags = bfd->fileflags;
+ gs.matmode= scene->gm.matmode;
+ gs.glslflag= scene->gm.flag;
+ }
+
//Seg Fault; icon.c gIcons == 0
BKE_icons_init(1);
@@ -861,7 +874,7 @@ int main(int argc, char** argv)
}
// GPG_Application app (system, maggie, startscenename);
- app.SetGameEngineData(maggie, scene, argc, argv); /* this argc cant be argc_py_clamped, since python uses it */
+ app.SetGameEngineData(maggie, scene, &gs, argc, argv); /* this argc cant be argc_py_clamped, since python uses it */
BLI_strncpy(pathname, maggie->name, sizeof(pathname));
if(G.main != maggie) {
BLI_strncpy(G.main->name, maggie->name, sizeof(G.main->name));
@@ -957,6 +970,7 @@ int main(int argc, char** argv)
{
run = false;
exitstring = app.getExitString();
+ gs = *app.getGlobalSettings();
}
}
app.StopGameEngine();
@@ -984,6 +998,11 @@ int main(int argc, char** argv)
// Cleanup
RNA_exit();
BLF_exit();
+
+#ifdef INTERNATIONAL
+ BLF_free_unifont();
+#endif
+
IMB_exit();
free_nodesystem();
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index de063f5e297..57c1122c2cd 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -51,4 +51,7 @@ if env['WITH_BF_PYTHON']:
if env['WITH_BF_FFMPEG']:
defs.append('WITH_FFMPEG')
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('INTERNATIONAL')
+
env.BlenderLib (libname='ge_player_ghost', sources=source_files, includes = incs, defines = defs, libtype=['player'],priority=[0], cxx_compileflags=env['BGE_CXXFLAGS'])
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.cpp b/source/gameengine/Ketsji/BL_BlenderShader.cpp
index 4ae937cdcd6..6680e9556b9 100644
--- a/source/gameengine/Ketsji/BL_BlenderShader.cpp
+++ b/source/gameengine/Ketsji/BL_BlenderShader.cpp
@@ -27,7 +27,7 @@ BL_BlenderShader::BL_BlenderShader(KX_Scene *scene, struct Material *ma, int lig
mGPUMat(NULL)
{
mBlenderScene = scene->GetBlenderScene();
- mBlendMode = GPU_BLEND_SOLID;
+ mAlphaBlend = GPU_BLEND_SOLID;
ReloadMaterial();
}
@@ -148,12 +148,12 @@ void BL_BlenderShader::Update(const RAS_MeshSlot & ms, RAS_IRasterizer* rasty )
GPU_material_bind_uniforms(gpumat, obmat, viewmat, viewinvmat, obcol);
- mBlendMode = GPU_material_blend_mode(gpumat, obcol);
+ mAlphaBlend = GPU_material_alpha_blend(gpumat, obcol);
}
-int BL_BlenderShader::GetBlendMode()
+int BL_BlenderShader::GetAlphaBlend()
{
- return mBlendMode;
+ return mAlphaBlend;
}
bool BL_BlenderShader::Equals(BL_BlenderShader *blshader)
diff --git a/source/gameengine/Ketsji/BL_BlenderShader.h b/source/gameengine/Ketsji/BL_BlenderShader.h
index 2f22e121b8c..f187d93d648 100644
--- a/source/gameengine/Ketsji/BL_BlenderShader.h
+++ b/source/gameengine/Ketsji/BL_BlenderShader.h
@@ -63,7 +63,7 @@ private:
struct Scene *mBlenderScene;
struct Material *mMat;
int mLightLayer;
- int mBlendMode;
+ int mAlphaBlend;
GPUMaterial *mGPUMat;
bool VerifyShader()
@@ -86,7 +86,7 @@ public:
void SetAttribs(class RAS_IRasterizer* ras, const BL_Material *mat);
void Update(const class RAS_MeshSlot & ms, class RAS_IRasterizer* rasty);
void ReloadMaterial();
- int GetBlendMode();
+ int GetAlphaBlend();
void SetScene(KX_Scene *scene)
{
diff --git a/source/gameengine/Ketsji/BL_Material.cpp b/source/gameengine/Ketsji/BL_Material.cpp
index 25fd5467e93..fd0756d067d 100644
--- a/source/gameengine/Ketsji/BL_Material.cpp
+++ b/source/gameengine/Ketsji/BL_Material.cpp
@@ -52,12 +52,11 @@ void BL_Material::Initialize()
speccolor[0] = 1.f;
speccolor[1] = 1.f;
speccolor[2] = 1.f;
- transp = 0;
+ alphablend = 0;
hard = 50.f;
spec_f = 0.5f;
alpha = 1.f;
emit = 0.f;
- mode = 0;
material = 0;
tface = 0;
materialindex = 0;
diff --git a/source/gameengine/Ketsji/BL_Material.h b/source/gameengine/Ketsji/BL_Material.h
index c0440e66501..2c6316ea32b 100644
--- a/source/gameengine/Ketsji/BL_Material.h
+++ b/source/gameengine/Ketsji/BL_Material.h
@@ -68,7 +68,7 @@ public:
float matcolor[4];
float speccolor[3];
- short transp, pad;
+ short alphablend, pad;
float hard, spec_f;
float alpha, emit, color_blend[MAXTEX], ref;
@@ -76,7 +76,6 @@ public:
int blend_mode[MAXTEX];
- int mode;
int num_enabled;
BL_Mapping mapping[MAXTEX];
@@ -151,14 +150,16 @@ enum BL_flag
// BL_Material::ras_mode
enum BL_ras_mode
{
- POLY_VIS=1,
+ // POLY_VIS=1,
COLLIDER=2,
ZSORT=4,
ALPHA=8,
// TRIANGLE=16,
USE_LIGHT=32,
WIRE=64,
- CAST_SHADOW=128
+ CAST_SHADOW=128,
+ TEX=256,
+ TWOSIDED=512
};
// -------------------------------------
diff --git a/source/gameengine/Ketsji/CMakeLists.txt b/source/gameengine/Ketsji/CMakeLists.txt
index 99c9fb25a65..9d8b1781869 100644
--- a/source/gameengine/Ketsji/CMakeLists.txt
+++ b/source/gameengine/Ketsji/CMakeLists.txt
@@ -57,6 +57,8 @@ set(INC
set(INC_SYS
${GLEW_INCLUDE_PATH}
+ ../../../extern/recastnavigation/Recast/Include
+ ../../../extern/recastnavigation/Detour/Include
)
set(SRC
@@ -90,9 +92,11 @@ set(SRC
KX_MeshProxy.cpp
KX_MotionState.cpp
KX_MouseFocusSensor.cpp
+ KX_NavMeshObject.cpp
KX_NearSensor.cpp
KX_ObColorIpoSGController.cpp
KX_ObjectActuator.cpp
+ KX_ObstacleSimulation.cpp
KX_OrientationInterpolator.cpp
KX_ParentActuator.cpp
KX_PhysicsObjectWrapper.cpp
@@ -120,6 +124,7 @@ set(SRC
KX_SceneActuator.cpp
KX_SoundActuator.cpp
KX_StateActuator.cpp
+ KX_SteeringActuator.cpp
KX_TimeCategoryLogger.cpp
KX_TimeLogger.cpp
KX_TouchEventManager.cpp
@@ -167,9 +172,11 @@ set(SRC
KX_MeshProxy.h
KX_MotionState.h
KX_MouseFocusSensor.h
+ KX_NavMeshObject.h
KX_NearSensor.h
KX_ObColorIpoSGController.h
KX_ObjectActuator.h
+ KX_ObstacleSimulation.h
KX_OrientationInterpolator.h
KX_ParentActuator.h
KX_PhysicsEngineEnums.h
@@ -199,6 +206,7 @@ set(SRC
KX_SceneActuator.h
KX_SoundActuator.h
KX_StateActuator.h
+ KX_SteeringActuator.h
KX_TimeCategoryLogger.h
KX_TimeLogger.h
KX_TouchEventManager.h
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
index 33da17cc505..1a1e046f54c 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.cpp
@@ -34,6 +34,8 @@
#include "DNA_meshdata_types.h"
#include "BKE_mesh.h"
// ------------------------------------
+#include "BLI_utildefines.h"
+
#define spit(x) std::cout << x << std::endl;
BL_Shader *KX_BlenderMaterial::mLastShader = NULL;
@@ -56,21 +58,24 @@ KX_BlenderMaterial::KX_BlenderMaterial()
}
void KX_BlenderMaterial::Initialize(
- KX_Scene *scene,
- BL_Material *data)
+ KX_Scene *scene,
+ BL_Material *data,
+ GameSettings *game)
{
RAS_IPolyMaterial::Initialize(
- data->texname[0],
- data->matname,
- data->materialindex,
- data->tile,
- data->tilexrep[0],
- data->tileyrep[0],
- data->mode,
- data->transp,
- ((data->ras_mode &ALPHA)!=0),
- ((data->ras_mode &ZSORT)!=0)
- );
+ data->texname[0],
+ data->matname,
+ data->materialindex,
+ data->tile,
+ data->tilexrep[0],
+ data->tileyrep[0],
+ data->alphablend,
+ ((data->ras_mode &ALPHA)!=0),
+ ((data->ras_mode &ZSORT)!=0),
+ ((data->ras_mode &USE_LIGHT)!=0),
+ ((data->ras_mode &TEX)),
+ game
+ );
mMaterial = data;
mShader = 0;
mBlenderShader = 0;
@@ -99,7 +104,7 @@ void KX_BlenderMaterial::Initialize(
for(int i=0; i<mMaterial->num_enabled; i++) {
m_multimode += (mMaterial->flag[i] + mMaterial->blend_mode[i]);
}
- m_multimode += mMaterial->IdMode+ (mMaterial->ras_mode & ~(COLLIDER|USE_LIGHT));
+ m_multimode += mMaterial->IdMode+ (mMaterial->ras_mode & ~(USE_LIGHT));
}
KX_BlenderMaterial::~KX_BlenderMaterial()
@@ -231,7 +236,7 @@ void KX_BlenderMaterial::OnExit()
}
if( mMaterial->tface )
- GPU_set_tpage(mMaterial->tface, 1);
+ GPU_set_tpage(mMaterial->tface, 1, mMaterial->alphablend);
}
@@ -247,7 +252,7 @@ void KX_BlenderMaterial::setShaderData( bool enable, RAS_IRasterizer *ras)
mLastShader = NULL;
}
- ras->SetBlendingMode(TF_SOLID);
+ ras->SetAlphaBlend(TF_SOLID);
BL_Texture::DisableAllTextures();
return;
}
@@ -268,11 +273,11 @@ void KX_BlenderMaterial::setShaderData( bool enable, RAS_IRasterizer *ras)
}
if(!mUserDefBlend) {
- ras->SetBlendingMode(mMaterial->transp);
+ ras->SetAlphaBlend(mMaterial->alphablend);
}
else {
- ras->SetBlendingMode(TF_SOLID);
- ras->SetBlendingMode(-1); // indicates custom mode
+ ras->SetAlphaBlend(TF_SOLID);
+ ras->SetAlphaBlend(-1); // indicates custom mode
// tested to be valid enums
glEnable(GL_BLEND);
@@ -283,7 +288,7 @@ void KX_BlenderMaterial::setShaderData( bool enable, RAS_IRasterizer *ras)
void KX_BlenderMaterial::setBlenderShaderData( bool enable, RAS_IRasterizer *ras)
{
if( !enable || !mBlenderShader->Ok() ) {
- ras->SetBlendingMode(TF_SOLID);
+ ras->SetAlphaBlend(TF_SOLID);
// frame cleanup.
if(mLastBlenderShader) {
@@ -297,7 +302,7 @@ void KX_BlenderMaterial::setBlenderShaderData( bool enable, RAS_IRasterizer *ras
}
if(!mBlenderShader->Equals(mLastBlenderShader)) {
- ras->SetBlendingMode(mMaterial->transp);
+ ras->SetAlphaBlend(mMaterial->alphablend);
if(mLastBlenderShader)
mLastBlenderShader->SetProg(false);
@@ -314,14 +319,14 @@ void KX_BlenderMaterial::setTexData( bool enable, RAS_IRasterizer *ras)
BL_Texture::DisableAllTextures();
if( !enable ) {
- ras->SetBlendingMode(TF_SOLID);
+ ras->SetAlphaBlend(TF_SOLID);
return;
}
BL_Texture::ActivateFirst();
if( mMaterial->IdMode == DEFAULT_BLENDER ) {
- ras->SetBlendingMode(mMaterial->transp);
+ ras->SetAlphaBlend(mMaterial->alphablend);
return;
}
@@ -331,7 +336,7 @@ void KX_BlenderMaterial::setTexData( bool enable, RAS_IRasterizer *ras)
mTextures[0].ActivateTexture();
mTextures[0].setTexEnv(0, true);
mTextures[0].SetMapping(mMaterial->mapping[0].mapping);
- ras->SetBlendingMode(mMaterial->transp);
+ ras->SetAlphaBlend(mMaterial->alphablend);
}
return;
}
@@ -354,11 +359,11 @@ void KX_BlenderMaterial::setTexData( bool enable, RAS_IRasterizer *ras)
}
if(!mUserDefBlend) {
- ras->SetBlendingMode(mMaterial->transp);
+ ras->SetAlphaBlend(mMaterial->alphablend);
}
else {
- ras->SetBlendingMode(TF_SOLID);
- ras->SetBlendingMode(-1); // indicates custom mode
+ ras->SetAlphaBlend(TF_SOLID);
+ ras->SetAlphaBlend(-1); // indicates custom mode
glEnable(GL_BLEND);
glBlendFunc(mBlendFunc[0], mBlendFunc[1]);
@@ -393,15 +398,15 @@ KX_BlenderMaterial::ActivatShaders(
else
tmp->setShaderData(false, rasty);
- if(mMaterial->mode & RAS_IRasterizer::KX_TWOSIDE)
+ if (mMaterial->ras_mode &TWOSIDED)
rasty->SetCullFace(false);
else
rasty->SetCullFace(true);
- if (((mMaterial->ras_mode &WIRE)!=0) || (mMaterial->mode & RAS_IRasterizer::KX_LINES) ||
+ if ((mMaterial->ras_mode &WIRE) ||
(rasty->GetDrawingMode() <= RAS_IRasterizer::KX_WIREFRAME))
{
- if((mMaterial->ras_mode &WIRE)!=0)
+ if (mMaterial->ras_mode &WIRE)
rasty->SetCullFace(false);
rasty->SetLines(true);
}
@@ -438,15 +443,15 @@ KX_BlenderMaterial::ActivateBlenderShaders(
else
tmp->setBlenderShaderData(false, rasty);
- if(mMaterial->mode & RAS_IRasterizer::KX_TWOSIDE)
+ if (mMaterial->ras_mode &TWOSIDED)
rasty->SetCullFace(false);
else
rasty->SetCullFace(true);
- if (((mMaterial->ras_mode & WIRE)!=0) || (mMaterial->mode & RAS_IRasterizer::KX_LINES) ||
+ if ((mMaterial->ras_mode &WIRE) ||
(rasty->GetDrawingMode() <= RAS_IRasterizer::KX_WIREFRAME))
{
- if((mMaterial->ras_mode &WIRE)!=0)
+ if (mMaterial->ras_mode &WIRE)
rasty->SetCullFace(false);
rasty->SetLines(true);
}
@@ -487,15 +492,15 @@ KX_BlenderMaterial::ActivateMat(
else
tmp->setTexData( false,rasty);
- if(mMaterial->mode & RAS_IRasterizer::KX_TWOSIDE)
+ if (mMaterial->ras_mode &TWOSIDED)
rasty->SetCullFace(false);
else
rasty->SetCullFace(true);
- if (((mMaterial->ras_mode &WIRE)!=0) || (mMaterial->mode & RAS_IRasterizer::KX_LINES) ||
+ if ((mMaterial->ras_mode &WIRE) ||
(rasty->GetDrawingMode() <= RAS_IRasterizer::KX_WIREFRAME))
{
- if((mMaterial->ras_mode &WIRE)!=0)
+ if (mMaterial->ras_mode &WIRE)
rasty->SetCullFace(false);
rasty->SetLines(true);
}
@@ -570,17 +575,17 @@ void KX_BlenderMaterial::ActivateMeshSlot(const RAS_MeshSlot & ms, RAS_IRasteriz
mShader->Update(ms, rasty);
}
else if(mBlenderShader && GLEW_ARB_shader_objects) {
- int blendmode;
+ int alphablend;
mBlenderShader->Update(ms, rasty);
/* we do blend modes here, because they can change per object
* with the same material due to obcolor/obalpha */
- blendmode = mBlenderShader->GetBlendMode();
- if((blendmode == TF_SOLID || blendmode == TF_ALPHA) && mMaterial->transp != TF_SOLID)
- blendmode = mMaterial->transp;
+ alphablend = mBlenderShader->GetAlphaBlend();
+ if(ELEM3(alphablend, GEMAT_SOLID, GEMAT_ALPHA, GEMAT_ALPHA_SORT) && mMaterial->alphablend != GEMAT_SOLID)
+ alphablend = mMaterial->alphablend;
- rasty->SetBlendingMode(blendmode);
+ rasty->SetAlphaBlend(alphablend);
}
}
diff --git a/source/gameengine/Ketsji/KX_BlenderMaterial.h b/source/gameengine/Ketsji/KX_BlenderMaterial.h
index 766e20be825..236bd6afdc8 100644
--- a/source/gameengine/Ketsji/KX_BlenderMaterial.h
+++ b/source/gameengine/Ketsji/KX_BlenderMaterial.h
@@ -38,7 +38,8 @@ public:
KX_BlenderMaterial();
void Initialize(
class KX_Scene* scene,
- BL_Material* mat
+ BL_Material* mat,
+ GameSettings* game
);
virtual ~KX_BlenderMaterial();
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index 00c5e5803a8..f0ea6f15ffe 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -561,7 +561,7 @@ void KX_Dome::CreateMeshDome180(void)
int i,j;
float uv_ratio = (float)(m_buffersize-1) / m_imagesize;
- m_radangle = m_angle * M_PI/180.0;//calculates the radians angle, used for flattening
+ m_radangle = DEG2RADF(m_angle); //calculates the radians angle, used for flattening
//creating faces for the env mapcube 180deg Dome
// Top Face - just a triangle
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 6adaea2d6ad..853b36b54f7 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -73,6 +73,7 @@ typedef unsigned long uint_ptr;
#include "SCA_ISensor.h"
#include "SCA_IController.h"
#include "NG_NetworkScene.h" //Needed for sendMessage()
+#include "KX_ObstacleSimulation.h"
#include "BL_ActionManager.h"
@@ -110,7 +111,8 @@ KX_GameObject::KX_GameObject(
m_xray(false),
m_pHitObject(NULL),
m_actionManager(NULL),
- m_isDeformable(false)
+ m_isDeformable(false),
+ m_pObstacleSimulation(NULL)
#ifdef WITH_PYTHON
, m_attr_dict(NULL)
#endif
@@ -157,6 +159,12 @@ KX_GameObject::~KX_GameObject()
{
delete m_pGraphicController;
}
+
+ if (m_pObstacleSimulation)
+ {
+ m_pObstacleSimulation->DestroyObstacleForObj(this);
+ }
+
if (m_actionManager)
{
KX_GetActiveScene()->RemoveAnimatedObject(this);
@@ -356,7 +364,9 @@ BL_ActionManager* KX_GameObject::GetActionManager()
{
// We only want to create an action manager if we need it
if (!m_actionManager)
- { KX_GetActiveScene()->AddAnimatedObject(this); m_actionManager = new BL_ActionManager(this);
+ {
+ KX_GetActiveScene()->AddAnimatedObject(this);
+ m_actionManager = new BL_ActionManager(this);
}
return m_actionManager;
}
@@ -428,6 +438,14 @@ void KX_GameObject::ProcessReplica()
m_actionManager = new BL_ActionManager(this);
m_state = 0;
+ KX_Scene* scene = KX_GetActiveScene();
+ KX_ObstacleSimulation* obssimulation = scene->GetObstacleSimulation();
+ struct Object* blenderobject = GetBlenderObject();
+ if (obssimulation && (blenderobject->gameflag & OB_HASOBSTACLE))
+ {
+ obssimulation->AddObstacleForObj(this);
+ }
+
#ifdef WITH_PYTHON
if(m_attr_dict)
m_attr_dict= PyDict_Copy(m_attr_dict);
diff --git a/source/gameengine/Ketsji/KX_GameObject.h b/source/gameengine/Ketsji/KX_GameObject.h
index 6e79914172b..655bc9ff080 100644
--- a/source/gameengine/Ketsji/KX_GameObject.h
+++ b/source/gameengine/Ketsji/KX_GameObject.h
@@ -65,6 +65,7 @@ class PHY_IGraphicController;
class PHY_IPhysicsEnvironment;
class BL_ActionManager;
struct Object;
+class KX_ObstacleSimulation;
struct bAction;
#ifdef WITH_PYTHON
@@ -115,6 +116,9 @@ protected:
MT_CmMatrix4x4 m_OpenGL_4x4Matrix;
+ KX_ObstacleSimulation* m_pObstacleSimulation;
+
+
// The action manager is used to play/stop/update actions
BL_ActionManager* m_actionManager;
@@ -864,6 +868,16 @@ public:
}
m_bSuspendDynamics = false;
}
+
+ void RegisterObstacle(KX_ObstacleSimulation* obstacleSimulation)
+ {
+ m_pObstacleSimulation = obstacleSimulation;
+ }
+
+ void UnregisterObstacle()
+ {
+ m_pObstacleSimulation = NULL;
+ }
KX_ClientObjectInfo* getClientInfo() { return m_pClient_info; }
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
index ca67333166c..acd25ace04a 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
@@ -84,6 +84,8 @@
#include "DNA_world_types.h"
#include "DNA_scene_types.h"
+#include "KX_NavMeshObject.h"
+
// If define: little test for Nzc: guarded drawing. If the canvas is
// not valid, skip rendering this frame.
//#define NZC_GUARDED_OUTPUT
@@ -325,6 +327,8 @@ void KX_KetsjiEngine::RenderDome()
// do the rendering
m_dome->RenderDomeFrame(scene,cam, i);
+ //render all the font objects for this scene
+ RenderFonts(scene);
}
list<class KX_Camera*>* cameras = scene->GetCameras();
@@ -342,6 +346,8 @@ void KX_KetsjiEngine::RenderDome()
// do the rendering
m_dome->RenderDomeFrame(scene, (*it),i);
+ //render all the font objects for this scene
+ RenderFonts(scene);
}
it++;
@@ -1343,7 +1349,7 @@ void KX_KetsjiEngine::PostRenderScene(KX_Scene* scene)
#ifdef WITH_PYTHON
scene->RunDrawingCallbacks(scene->GetPostDrawCB());
#endif
- m_rasterizer->FlushDebugLines();
+ m_rasterizer->FlushDebugShapes();
}
void KX_KetsjiEngine::StopEngine()
@@ -1934,4 +1940,14 @@ void KX_KetsjiEngine::GetOverrideFrameColor(float& r, float& g, float& b) const
b = m_overrideFrameColorB;
}
+void KX_KetsjiEngine::SetGlobalSettings(GlobalSettings* gs)
+{
+ m_globalsettings.matmode = gs->matmode;
+ m_globalsettings.glslflag = gs->glslflag;
+}
+
+GlobalSettings* KX_KetsjiEngine::GetGlobalSettings(void)
+{
+ return &m_globalsettings;
+}
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h
index b1009c7d8f0..f2f978a0afa 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.h
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h
@@ -62,6 +62,11 @@ enum KX_ExitRequestMode
KX_EXIT_REQUEST_MAX
};
+typedef struct {
+ short matmode;
+ short glslflag;
+} GlobalSettings;
+
/**
* KX_KetsjiEngine is the core game engine class.
*/
@@ -193,6 +198,9 @@ private:
/** Blue component of framing bar color. */
float m_overrideFrameColorB;
+ /** Settings that doesn't go away with Game Actuator */
+ GlobalSettings m_globalsettings;
+
void RenderFrame(KX_Scene* scene, KX_Camera* cam);
void PostRenderScene(KX_Scene* scene);
void RenderDebugProperties();
@@ -404,7 +412,10 @@ public:
KX_Scene* CreateScene(const STR_String& scenename);
KX_Scene* CreateScene(Scene *scene);
-
+
+ GlobalSettings* GetGlobalSettings(void);
+ void SetGlobalSettings(GlobalSettings* gs);
+
protected:
/**
* Processes all scheduled scene activity.
diff --git a/source/gameengine/Ketsji/KX_NavMeshObject.cpp b/source/gameengine/Ketsji/KX_NavMeshObject.cpp
new file mode 100644
index 00000000000..5747d8641d0
--- /dev/null
+++ b/source/gameengine/Ketsji/KX_NavMeshObject.cpp
@@ -0,0 +1,722 @@
+/**
+* $Id$
+* ***** 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 *****
+*/
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_math_vector.h"
+#include "KX_NavMeshObject.h"
+#include "RAS_MeshObject.h"
+
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+
+extern "C" {
+#include "BKE_scene.h"
+#include "BKE_customdata.h"
+#include "BKE_cdderivedmesh.h"
+#include "BKE_DerivedMesh.h"
+#include "BKE_navmesh_conversion.h"
+}
+
+#include "KX_PythonInit.h"
+#include "KX_PyMath.h"
+#include "Value.h"
+#include "Recast.h"
+#include "DetourStatNavMeshBuilder.h"
+#include "KX_ObstacleSimulation.h"
+
+static const int MAX_PATH_LEN = 256;
+static const float polyPickExt[3] = {2, 4, 2};
+
+static void calcMeshBounds(const float* vert, int nverts, float* bmin, float* bmax)
+{
+ bmin[0] = bmax[0] = vert[0];
+ bmin[1] = bmax[1] = vert[1];
+ bmin[2] = bmax[2] = vert[2];
+ for (int i=1; i<nverts; i++)
+ {
+ if (bmin[0]>vert[3*i+0]) bmin[0] = vert[3*i+0];
+ if (bmin[1]>vert[3*i+1]) bmin[1] = vert[3*i+1];
+ if (bmin[2]>vert[3*i+2]) bmin[2] = vert[3*i+2];
+
+ if (bmax[0]<vert[3*i+0]) bmax[0] = vert[3*i+0];
+ if (bmax[1]<vert[3*i+1]) bmax[1] = vert[3*i+1];
+ if (bmax[2]<vert[3*i+2]) bmax[2] = vert[3*i+2];
+ }
+}
+
+inline void flipAxes(float* vec)
+{
+ std::swap(vec[1],vec[2]);
+}
+KX_NavMeshObject::KX_NavMeshObject(void* sgReplicationInfo, SG_Callbacks callbacks)
+: KX_GameObject(sgReplicationInfo, callbacks)
+, m_navMesh(NULL)
+{
+
+}
+
+KX_NavMeshObject::~KX_NavMeshObject()
+{
+ if (m_navMesh)
+ delete m_navMesh;
+}
+
+CValue* KX_NavMeshObject::GetReplica()
+{
+ KX_NavMeshObject* replica = new KX_NavMeshObject(*this);
+ replica->ProcessReplica();
+ return replica;
+}
+
+void KX_NavMeshObject::ProcessReplica()
+{
+ KX_GameObject::ProcessReplica();
+
+ BuildNavMesh();
+ KX_Scene* scene = KX_GetActiveScene();
+ KX_ObstacleSimulation* obssimulation = scene->GetObstacleSimulation();
+ if (obssimulation)
+ obssimulation->AddObstaclesForNavMesh(this);
+
+}
+
+bool KX_NavMeshObject::BuildVertIndArrays(float *&vertices, int& nverts,
+ unsigned short* &polys, int& npolys, unsigned short *&dmeshes,
+ float *&dvertices, int &ndvertsuniq, unsigned short *&dtris,
+ int& ndtris, int &vertsPerPoly)
+{
+ DerivedMesh* dm = mesh_create_derived_no_virtual(KX_GetActiveScene()->GetBlenderScene(), GetBlenderObject(),
+ NULL, CD_MASK_MESH);
+ int* recastData = (int*) dm->getFaceDataArray(dm, CD_RECAST);
+ if (recastData)
+ {
+ int *dtrisToPolysMap=NULL, *dtrisToTrisMap=NULL, *trisToFacesMap=NULL;
+ int nAllVerts = 0;
+ float *allVerts = NULL;
+ buildNavMeshDataByDerivedMesh(dm, &vertsPerPoly, &nAllVerts, &allVerts, &ndtris, &dtris,
+ &npolys, &dmeshes, &polys, &dtrisToPolysMap, &dtrisToTrisMap, &trisToFacesMap);
+
+ MEM_freeN(dtrisToPolysMap);
+ MEM_freeN(dtrisToTrisMap);
+ MEM_freeN(trisToFacesMap);
+
+ unsigned short *verticesMap = new unsigned short[nAllVerts];
+ memset(verticesMap, 0xffff, sizeof(unsigned short)*nAllVerts);
+ int curIdx = 0;
+ //vertices - mesh verts
+ //iterate over all polys and create map for their vertices first...
+ for (int polyidx=0; polyidx<npolys; polyidx++)
+ {
+ unsigned short* poly = &polys[polyidx*vertsPerPoly*2];
+ for (int i=0; i<vertsPerPoly; i++)
+ {
+ unsigned short idx = poly[i];
+ if (idx==0xffff)
+ break;
+ if (verticesMap[idx]==0xffff)
+ {
+ verticesMap[idx] = curIdx++;
+ }
+ poly[i] = verticesMap[idx];
+ }
+ }
+ nverts = curIdx;
+ //...then iterate over detailed meshes
+ //transform indices to local ones (for each navigation polygon)
+ for (int polyidx=0; polyidx<npolys; polyidx++)
+ {
+ unsigned short *poly = &polys[polyidx*vertsPerPoly*2];
+ int nv = polyNumVerts(poly, vertsPerPoly);
+ unsigned short *dmesh = &dmeshes[4*polyidx];
+ unsigned short tribase = dmesh[2];
+ unsigned short trinum = dmesh[3];
+ unsigned short vbase = curIdx;
+ for (int j=0; j<trinum; j++)
+ {
+ unsigned short* dtri = &dtris[(tribase+j)*3*2];
+ for (int k=0; k<3; k++)
+ {
+ int newVertexIdx = verticesMap[dtri[k]];
+ if (newVertexIdx==0xffff)
+ {
+ newVertexIdx = curIdx++;
+ verticesMap[dtri[k]] = newVertexIdx;
+ }
+
+ if (newVertexIdx<nverts)
+ {
+ //it's polygon vertex ("shared")
+ int idxInPoly = polyFindVertex(poly, vertsPerPoly, newVertexIdx);
+ if (idxInPoly==-1)
+ {
+ printf("Building NavMeshObject: Error! Can't find vertex in polygon\n");
+ return false;
+ }
+ dtri[k] = idxInPoly;
+ }
+ else
+ {
+ dtri[k] = newVertexIdx - vbase + nv;
+ }
+ }
+ }
+ dmesh[0] = vbase-nverts; //verts base
+ dmesh[1] = curIdx-vbase; //verts num
+ }
+
+ vertices = new float[nverts*3];
+ ndvertsuniq = curIdx - nverts;
+ if (ndvertsuniq>0)
+ {
+ dvertices = new float[ndvertsuniq*3];
+ }
+ for (int vi=0; vi<nAllVerts; vi++)
+ {
+ int newIdx = verticesMap[vi];
+ if (newIdx!=0xffff)
+ {
+ if (newIdx<nverts)
+ {
+ //navigation mesh vertex
+ memcpy(vertices+3*newIdx, allVerts+3*vi, 3*sizeof(float));
+ }
+ else
+ {
+ //detailed mesh vertex
+ memcpy(dvertices+3*(newIdx-nverts), allVerts+3*vi, 3*sizeof(float));
+ }
+ }
+ }
+
+ MEM_freeN(allVerts);
+ }
+ else
+ {
+ //create from RAS_MeshObject (detailed mesh is fake)
+ RAS_MeshObject* meshobj = GetMesh(0);
+ vertsPerPoly = 3;
+ nverts = meshobj->m_sharedvertex_map.size();
+ if (nverts >= 0xffff)
+ return false;
+ //calculate count of tris
+ int nmeshpolys = meshobj->NumPolygons();
+ npolys = nmeshpolys;
+ for (int p=0; p<nmeshpolys; p++)
+ {
+ int vertcount = meshobj->GetPolygon(p)->VertexCount();
+ npolys+=vertcount-3;
+ }
+
+ //create verts
+ vertices = new float[nverts*3];
+ float* vert = vertices;
+ for (int vi=0; vi<nverts; vi++)
+ {
+ const float* pos = !meshobj->m_sharedvertex_map[vi].empty() ? meshobj->GetVertexLocation(vi) : NULL;
+ if (pos)
+ copy_v3_v3(vert, pos);
+ else
+ {
+ memset(vert, 0, 3*sizeof(float)); //vertex isn't in any poly, set dummy zero coordinates
+ }
+ vert+=3;
+ }
+
+ //create tris
+ polys = new unsigned short[npolys*3*2];
+ memset(polys, 0xff, sizeof(unsigned short)*3*2*npolys);
+ unsigned short *poly = polys;
+ RAS_Polygon* raspoly;
+ for (int p=0; p<nmeshpolys; p++)
+ {
+ raspoly = meshobj->GetPolygon(p);
+ for (int v=0; v<raspoly->VertexCount()-2; v++)
+ {
+ poly[0]= raspoly->GetVertex(0)->getOrigIndex();
+ for (size_t i=1; i<3; i++)
+ {
+ poly[i]= raspoly->GetVertex(v+i)->getOrigIndex();
+ }
+ poly += 6;
+ }
+ }
+ dmeshes = NULL;
+ dvertices = NULL;
+ ndvertsuniq = 0;
+ dtris = NULL;
+ ndtris = npolys;
+ }
+ dm->release(dm);
+
+ return true;
+}
+
+
+bool KX_NavMeshObject::BuildNavMesh()
+{
+ if (m_navMesh)
+ {
+ delete m_navMesh;
+ m_navMesh = NULL;
+ }
+
+ if (GetMeshCount()==0)
+ {
+ printf("Can't find mesh for navmesh object: %s \n", m_name.ReadPtr());
+ return false;
+ }
+
+ float *vertices = NULL, *dvertices = NULL;
+ unsigned short *polys = NULL, *dtris = NULL, *dmeshes = NULL;
+ int nverts = 0, npolys = 0, ndvertsuniq = 0, ndtris = 0;
+ int vertsPerPoly = 0;
+ if (!BuildVertIndArrays(vertices, nverts, polys, npolys,
+ dmeshes, dvertices, ndvertsuniq, dtris, ndtris, vertsPerPoly )
+ || vertsPerPoly<3)
+ {
+ printf("Can't build navigation mesh data for object:%s \n", m_name.ReadPtr());
+ return false;
+ }
+
+ MT_Point3 pos;
+ if (dmeshes==NULL)
+ {
+ for (int i=0; i<nverts; i++)
+ {
+ flipAxes(&vertices[i*3]);
+ }
+ for (int i=0; i<ndvertsuniq; i++)
+ {
+ flipAxes(&dvertices[i*3]);
+ }
+ }
+
+ buildMeshAdjacency(polys, npolys, nverts, vertsPerPoly);
+
+ float cs = 0.2f;
+
+ if (!nverts || !npolys)
+ return false;
+
+ float bmin[3], bmax[3];
+ calcMeshBounds(vertices, nverts, bmin, bmax);
+ //quantize vertex pos
+ unsigned short* vertsi = new unsigned short[3*nverts];
+ float ics = 1.f/cs;
+ for (int i=0; i<nverts; i++)
+ {
+ vertsi[3*i+0] = static_cast<unsigned short>((vertices[3*i+0]-bmin[0])*ics);
+ vertsi[3*i+1] = static_cast<unsigned short>((vertices[3*i+1]-bmin[1])*ics);
+ vertsi[3*i+2] = static_cast<unsigned short>((vertices[3*i+2]-bmin[2])*ics);
+ }
+
+ // Calculate data size
+ const int headerSize = sizeof(dtStatNavMeshHeader);
+ const int vertsSize = sizeof(float)*3*nverts;
+ const int polysSize = sizeof(dtStatPoly)*npolys;
+ const int nodesSize = sizeof(dtStatBVNode)*npolys*2;
+ const int detailMeshesSize = sizeof(dtStatPolyDetail)*npolys;
+ const int detailVertsSize = sizeof(float)*3*ndvertsuniq;
+ const int detailTrisSize = sizeof(unsigned char)*4*ndtris;
+
+ const int dataSize = headerSize + vertsSize + polysSize + nodesSize +
+ detailMeshesSize + detailVertsSize + detailTrisSize;
+ unsigned char* data = new unsigned char[dataSize];
+ if (!data)
+ return false;
+ memset(data, 0, dataSize);
+
+ unsigned char* d = data;
+ dtStatNavMeshHeader* header = (dtStatNavMeshHeader*)d; d += headerSize;
+ float* navVerts = (float*)d; d += vertsSize;
+ dtStatPoly* navPolys = (dtStatPoly*)d; d += polysSize;
+ dtStatBVNode* navNodes = (dtStatBVNode*)d; d += nodesSize;
+ dtStatPolyDetail* navDMeshes = (dtStatPolyDetail*)d; d += detailMeshesSize;
+ float* navDVerts = (float*)d; d += detailVertsSize;
+ unsigned char* navDTris = (unsigned char*)d; d += detailTrisSize;
+
+ // Store header
+ header->magic = DT_STAT_NAVMESH_MAGIC;
+ header->version = DT_STAT_NAVMESH_VERSION;
+ header->npolys = npolys;
+ header->nverts = nverts;
+ header->cs = cs;
+ header->bmin[0] = bmin[0];
+ header->bmin[1] = bmin[1];
+ header->bmin[2] = bmin[2];
+ header->bmax[0] = bmax[0];
+ header->bmax[1] = bmax[1];
+ header->bmax[2] = bmax[2];
+ header->ndmeshes = npolys;
+ header->ndverts = ndvertsuniq;
+ header->ndtris = ndtris;
+
+ // Store vertices
+ for (int i = 0; i < nverts; ++i)
+ {
+ const unsigned short* iv = &vertsi[i*3];
+ float* v = &navVerts[i*3];
+ v[0] = bmin[0] + iv[0] * cs;
+ v[1] = bmin[1] + iv[1] * cs;
+ v[2] = bmin[2] + iv[2] * cs;
+ }
+ //memcpy(navVerts, vertices, nverts*3*sizeof(float));
+
+ // Store polygons
+ const unsigned short* src = polys;
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtStatPoly* p = &navPolys[i];
+ p->nv = 0;
+ for (int j = 0; j < vertsPerPoly; ++j)
+ {
+ if (src[j] == 0xffff) break;
+ p->v[j] = src[j];
+ p->n[j] = src[vertsPerPoly+j]+1;
+ p->nv++;
+ }
+ src += vertsPerPoly*2;
+ }
+
+ header->nnodes = createBVTree(vertsi, nverts, polys, npolys, vertsPerPoly,
+ cs, cs, npolys*2, navNodes);
+
+
+ if (dmeshes==NULL)
+ {
+ //create fake detail meshes
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtStatPolyDetail& dtl = navDMeshes[i];
+ dtl.vbase = 0;
+ dtl.nverts = 0;
+ dtl.tbase = i;
+ dtl.ntris = 1;
+ }
+ // setup triangles.
+ unsigned char* tri = navDTris;
+ for(size_t i=0; i<ndtris; i++)
+ {
+ for (size_t j=0; j<3; j++)
+ tri[4*i+j] = j;
+ }
+ }
+ else
+ {
+ //verts
+ memcpy(navDVerts, dvertices, ndvertsuniq*3*sizeof(float));
+ //tris
+ unsigned char* tri = navDTris;
+ for(size_t i=0; i<ndtris; i++)
+ {
+ for (size_t j=0; j<3; j++)
+ tri[4*i+j] = dtris[6*i+j];
+ }
+ //detailed meshes
+ for (int i = 0; i < npolys; ++i)
+ {
+ dtStatPolyDetail& dtl = navDMeshes[i];
+ dtl.vbase = dmeshes[i*4+0];
+ dtl.nverts = dmeshes[i*4+1];
+ dtl.tbase = dmeshes[i*4+2];
+ dtl.ntris = dmeshes[i*4+3];
+ }
+ }
+
+ m_navMesh = new dtStatNavMesh;
+ m_navMesh->init(data, dataSize, true);
+
+ delete [] vertices;
+
+ /* navmesh conversion is using C guarded alloc for memory allocaitons */
+ MEM_freeN(polys);
+ if (dmeshes) MEM_freeN(dmeshes);
+ if (dtris) MEM_freeN(dtris);
+
+ if (dvertices)
+ {
+ delete [] dvertices;
+ }
+
+ return true;
+}
+
+dtStatNavMesh* KX_NavMeshObject::GetNavMesh()
+{
+ return m_navMesh;
+}
+
+void KX_NavMeshObject::DrawNavMesh(NavMeshRenderMode renderMode)
+{
+ if (!m_navMesh)
+ return;
+ MT_Vector3 color(0.f, 0.f, 0.f);
+
+ switch (renderMode)
+ {
+ case RM_POLYS :
+ case RM_WALLS :
+ for (int pi=0; pi<m_navMesh->getPolyCount(); pi++)
+ {
+ const dtStatPoly* poly = m_navMesh->getPoly(pi);
+
+ for (int i = 0, j = (int)poly->nv-1; i < (int)poly->nv; j = i++)
+ {
+ if (poly->n[j] && renderMode==RM_WALLS)
+ continue;
+ const float* vif = m_navMesh->getVertex(poly->v[i]);
+ const float* vjf = m_navMesh->getVertex(poly->v[j]);
+ MT_Point3 vi(vif[0], vif[2], vif[1]);
+ MT_Point3 vj(vjf[0], vjf[2], vjf[1]);
+ vi = TransformToWorldCoords(vi);
+ vj = TransformToWorldCoords(vj);
+ KX_RasterizerDrawDebugLine(vi, vj, color);
+ }
+ }
+ break;
+ case RM_TRIS :
+ for (int i = 0; i < m_navMesh->getPolyDetailCount(); ++i)
+ {
+ const dtStatPoly* p = m_navMesh->getPoly(i);
+ const dtStatPolyDetail* pd = m_navMesh->getPolyDetail(i);
+
+ for (int j = 0; j < pd->ntris; ++j)
+ {
+ const unsigned char* t = m_navMesh->getDetailTri(pd->tbase+j);
+ MT_Point3 tri[3];
+ for (int k = 0; k < 3; ++k)
+ {
+ const float* v;
+ if (t[k] < p->nv)
+ v = m_navMesh->getVertex(p->v[t[k]]);
+ else
+ v = m_navMesh->getDetailVertex(pd->vbase+(t[k]-p->nv));
+ float pos[3];
+ vcopy(pos, v);
+ flipAxes(pos);
+ tri[k].setValue(pos);
+ }
+
+ for (int k=0; k<3; k++)
+ tri[k] = TransformToWorldCoords(tri[k]);
+
+ for (int k=0; k<3; k++)
+ KX_RasterizerDrawDebugLine(tri[k], tri[(k+1)%3], color);
+ }
+ }
+ break;
+ default:
+ /* pass */
+ break;
+ }
+}
+
+MT_Point3 KX_NavMeshObject::TransformToLocalCoords(const MT_Point3& wpos)
+{
+ MT_Matrix3x3 orientation = NodeGetWorldOrientation();
+ const MT_Vector3& scaling = NodeGetWorldScaling();
+ orientation.scale(scaling[0], scaling[1], scaling[2]);
+ MT_Transform worldtr(NodeGetWorldPosition(), orientation);
+ MT_Transform invworldtr;
+ invworldtr.invert(worldtr);
+ MT_Point3 lpos = invworldtr(wpos);
+ return lpos;
+}
+
+MT_Point3 KX_NavMeshObject::TransformToWorldCoords(const MT_Point3& lpos)
+{
+ MT_Matrix3x3 orientation = NodeGetWorldOrientation();
+ const MT_Vector3& scaling = NodeGetWorldScaling();
+ orientation.scale(scaling[0], scaling[1], scaling[2]);
+ MT_Transform worldtr(NodeGetWorldPosition(), orientation);
+ MT_Point3 wpos = worldtr(lpos);
+ return wpos;
+}
+
+int KX_NavMeshObject::FindPath(const MT_Point3& from, const MT_Point3& to, float* path, int maxPathLen)
+{
+ if (!m_navMesh)
+ return 0;
+ MT_Point3 localfrom = TransformToLocalCoords(from);
+ MT_Point3 localto = TransformToLocalCoords(to);
+ float spos[3], epos[3];
+ localfrom.getValue(spos); flipAxes(spos);
+ localto.getValue(epos); flipAxes(epos);
+ dtStatPolyRef sPolyRef = m_navMesh->findNearestPoly(spos, polyPickExt);
+ dtStatPolyRef ePolyRef = m_navMesh->findNearestPoly(epos, polyPickExt);
+
+ int pathLen = 0;
+ if (sPolyRef && ePolyRef)
+ {
+ dtStatPolyRef* polys = new dtStatPolyRef[maxPathLen];
+ int npolys;
+ npolys = m_navMesh->findPath(sPolyRef, ePolyRef, spos, epos, polys, maxPathLen);
+ if (npolys)
+ {
+ pathLen = m_navMesh->findStraightPath(spos, epos, polys, npolys, path, maxPathLen);
+ for (int i=0; i<pathLen; i++)
+ {
+ flipAxes(&path[i*3]);
+ MT_Point3 waypoint(&path[i*3]);
+ waypoint = TransformToWorldCoords(waypoint);
+ waypoint.getValue(&path[i*3]);
+ }
+ }
+ }
+
+ return pathLen;
+}
+
+float KX_NavMeshObject::Raycast(const MT_Point3& from, const MT_Point3& to)
+{
+ if (!m_navMesh)
+ return 0.f;
+ MT_Point3 localfrom = TransformToLocalCoords(from);
+ MT_Point3 localto = TransformToLocalCoords(to);
+ float spos[3], epos[3];
+ localfrom.getValue(spos); flipAxes(spos);
+ localto.getValue(epos); flipAxes(epos);
+ dtStatPolyRef sPolyRef = m_navMesh->findNearestPoly(spos, polyPickExt);
+ float t=0;
+ static dtStatPolyRef polys[MAX_PATH_LEN];
+ m_navMesh->raycast(sPolyRef, spos, epos, t, polys, MAX_PATH_LEN);
+ return t;
+}
+
+void KX_NavMeshObject::DrawPath(const float *path, int pathLen, const MT_Vector3& color)
+{
+ MT_Vector3 a,b;
+ for (int i=0; i<pathLen-1; i++)
+ {
+ a.setValue(&path[3*i]);
+ b.setValue(&path[3*(i+1)]);
+ KX_RasterizerDrawDebugLine(a, b, color);
+ }
+}
+
+
+#ifndef DISABLE_PYTHON
+//----------------------------------------------------------------------------
+//Python
+
+PyTypeObject KX_NavMeshObject::Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "KX_NavMeshObject",
+ sizeof(PyObjectPlus_Proxy),
+ 0,
+ py_base_dealloc,
+ 0,
+ 0,
+ 0,
+ 0,
+ py_base_repr,
+ 0,
+ 0,
+ 0,
+ 0,0,0,0,0,0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &KX_GameObject::Type,
+ 0,0,0,0,0,0,
+ py_base_new
+};
+
+PyAttributeDef KX_NavMeshObject::Attributes[] = {
+ { NULL } //Sentinel
+};
+
+//KX_PYMETHODTABLE_NOARGS(KX_GameObject, getD),
+PyMethodDef KX_NavMeshObject::Methods[] = {
+ KX_PYMETHODTABLE(KX_NavMeshObject, findPath),
+ KX_PYMETHODTABLE(KX_NavMeshObject, raycast),
+ KX_PYMETHODTABLE(KX_NavMeshObject, draw),
+ KX_PYMETHODTABLE(KX_NavMeshObject, rebuild),
+ {NULL,NULL} //Sentinel
+};
+
+KX_PYMETHODDEF_DOC(KX_NavMeshObject, findPath,
+ "findPath(start, goal): find path from start to goal points\n"
+ "Returns a path as list of points)\n")
+{
+ PyObject *ob_from, *ob_to;
+ if (!PyArg_ParseTuple(args,"OO:getPath",&ob_from,&ob_to))
+ return NULL;
+ MT_Point3 from, to;
+ if (!PyVecTo(ob_from, from) || !PyVecTo(ob_to, to))
+ return NULL;
+
+ float path[MAX_PATH_LEN*3];
+ int pathLen = FindPath(from, to, path, MAX_PATH_LEN);
+ PyObject *pathList = PyList_New( pathLen );
+ for (int i=0; i<pathLen; i++)
+ {
+ MT_Point3 point(&path[3*i]);
+ PyList_SET_ITEM(pathList, i, PyObjectFrom(point));
+ }
+
+ return pathList;
+}
+
+KX_PYMETHODDEF_DOC(KX_NavMeshObject, raycast,
+ "raycast(start, goal): raycast from start to goal points\n"
+ "Returns hit factor)\n")
+{
+ PyObject *ob_from, *ob_to;
+ if (!PyArg_ParseTuple(args,"OO:getPath",&ob_from,&ob_to))
+ return NULL;
+ MT_Point3 from, to;
+ if (!PyVecTo(ob_from, from) || !PyVecTo(ob_to, to))
+ return NULL;
+ float hit = Raycast(from, to);
+ return PyFloat_FromDouble(hit);
+}
+
+KX_PYMETHODDEF_DOC(KX_NavMeshObject, draw,
+ "draw(mode): navigation mesh debug drawing\n"
+ "mode: WALLS, POLYS, TRIS\n")
+{
+ int arg;
+ NavMeshRenderMode renderMode = RM_TRIS;
+ if (PyArg_ParseTuple(args,"i:rebuild",&arg) && arg>=0 && arg<RM_MAX)
+ renderMode = (NavMeshRenderMode)arg;
+ DrawNavMesh(renderMode);
+ Py_RETURN_NONE;
+}
+
+KX_PYMETHODDEF_DOC_NOARGS(KX_NavMeshObject, rebuild,
+ "rebuild(): rebuild navigation mesh\n")
+{
+ BuildNavMesh();
+ Py_RETURN_NONE;
+}
+
+#endif // DISABLE_PYTHON
diff --git a/source/gameengine/Ketsji/KX_NavMeshObject.h b/source/gameengine/Ketsji/KX_NavMeshObject.h
new file mode 100644
index 00000000000..78e9488ad1c
--- /dev/null
+++ b/source/gameengine/Ketsji/KX_NavMeshObject.h
@@ -0,0 +1,83 @@
+/**
+* $Id$
+*
+* ***** 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 __KX_NAVMESHOBJECT
+#define __KX_NAVMESHOBJECT
+#include "DetourStatNavMesh.h"
+#include "KX_GameObject.h"
+#include "PyObjectPlus.h"
+#include <vector>
+
+class RAS_MeshObject;
+class MT_Transform;
+
+class KX_NavMeshObject: public KX_GameObject
+{
+ Py_Header;
+
+protected:
+ dtStatNavMesh* m_navMesh;
+
+ bool BuildVertIndArrays(float *&vertices, int& nverts,
+ unsigned short* &polys, int& npolys, unsigned short *&dmeshes,
+ float *&dvertices, int &ndvertsuniq, unsigned short* &dtris,
+ int& ndtris, int &vertsPerPoly);
+
+public:
+ KX_NavMeshObject(void* sgReplicationInfo, SG_Callbacks callbacks);
+ ~KX_NavMeshObject();
+
+ virtual CValue* GetReplica();
+ virtual void ProcessReplica();
+
+
+ bool BuildNavMesh();
+ dtStatNavMesh* GetNavMesh();
+ int FindPath(const MT_Point3& from, const MT_Point3& to, float* path, int maxPathLen);
+ float Raycast(const MT_Point3& from, const MT_Point3& to);
+
+ enum NavMeshRenderMode {RM_WALLS, RM_POLYS, RM_TRIS, RM_MAX};
+ void DrawNavMesh(NavMeshRenderMode mode);
+ void DrawPath(const float *path, int pathLen, const MT_Vector3& color);
+
+ MT_Point3 TransformToLocalCoords(const MT_Point3& wpos);
+ MT_Point3 TransformToWorldCoords(const MT_Point3& lpos);
+#ifndef DISABLE_PYTHON
+ /* --------------------------------------------------------------------- */
+ /* Python interface ---------------------------------------------------- */
+ /* --------------------------------------------------------------------- */
+
+ KX_PYMETHOD_DOC(KX_NavMeshObject, findPath);
+ KX_PYMETHOD_DOC(KX_NavMeshObject, raycast);
+ KX_PYMETHOD_DOC(KX_NavMeshObject, draw);
+ KX_PYMETHOD_DOC_NOARGS(KX_NavMeshObject, rebuild);
+#endif
+};
+
+#endif //__KX_NAVMESHOBJECT
+
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
new file mode 100644
index 00000000000..5f78d9a3722
--- /dev/null
+++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
@@ -0,0 +1,869 @@
+/**
+* Simulation for obstacle avoidance behavior
+*
+* $Id$
+*
+* ***** 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. The Blender
+* Foundation also sells licenses for use in proprietary software under
+* the Blender License. See http://www.blender.org/BL/ for information
+* about this.
+*
+* 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 *****
+*/
+
+#include "KX_ObstacleSimulation.h"
+#include "KX_NavMeshObject.h"
+#include "KX_PythonInit.h"
+#include "DNA_object_types.h"
+#include "BLI_math.h"
+
+namespace
+{
+ inline float perp(const MT_Vector2& a, const MT_Vector2& b) { return a.x()*b.y() - a.y()*b.x(); }
+
+ inline float sqr(float x) { return x*x; }
+ inline float lerp(float a, float b, float t) { return a + (b-a)*t; }
+ inline float clamp(float a, float mn, float mx) { return a < mn ? mn : (a > mx ? mx : a); }
+
+ inline float vdistsqr(const float* a, const float* b) { return sqr(b[0]-a[0]) + sqr(b[1]-a[1]); }
+ inline float vdist(const float* a, const float* b) { return sqrtf(vdistsqr(a,b)); }
+ inline void vcpy(float* a, const float* b) { a[0]=b[0]; a[1]=b[1]; }
+ inline float vdot(const float* a, const float* b) { return a[0]*b[0] + a[1]*b[1]; }
+ inline float vperp(const float* a, const float* b) { return a[0]*b[1] - a[1]*b[0]; }
+ inline void vsub(float* v, const float* a, const float* b) { v[0] = a[0]-b[0]; v[1] = a[1]-b[1]; }
+ inline void vadd(float* v, const float* a, const float* b) { v[0] = a[0]+b[0]; v[1] = a[1]+b[1]; }
+ inline void vscale(float* v, const float* a, const float s) { v[0] = a[0]*s; v[1] = a[1]*s; }
+ inline void vset(float* v, float x, float y) { v[0]=x; v[1]=y; }
+ inline float vlensqr(const float* v) { return vdot(v,v); }
+ inline float vlen(const float* v) { return sqrtf(vlensqr(v)); }
+ inline void vlerp(float* v, const float* a, const float* b, float t) { v[0] = lerp(a[0], b[0], t); v[1] = lerp(a[1], b[1], t); }
+ inline void vmad(float* v, const float* a, const float* b, float s) { v[0] = a[0] + b[0]*s; v[1] = a[1] + b[1]*s; }
+ inline void vnorm(float* v)
+ {
+ float d = vlen(v);
+ if (d > 0.0001f)
+ {
+ d = 1.0f/d;
+ v[0] *= d;
+ v[1] *= d;
+ }
+ }
+}
+inline float triarea(const float* a, const float* b, const float* c)
+{
+ return (b[0]*a[1] - a[0]*b[1]) + (c[0]*b[1] - b[0]*c[1]) + (a[0]*c[1] - c[0]*a[1]);
+}
+
+static void closestPtPtSeg(const float* pt,
+ const float* sp, const float* sq,
+ float& t)
+{
+ float dir[2],diff[3];
+ vsub(dir,sq,sp);
+ vsub(diff,pt,sp);
+ t = vdot(diff,dir);
+ if (t <= 0.0f) { t = 0; return; }
+ float d = vdot(dir,dir);
+ if (t >= d) { t = 1; return; }
+ t /= d;
+}
+
+static float distPtSegSqr(const float* pt, const float* sp, const float* sq)
+{
+ float t;
+ closestPtPtSeg(pt, sp,sq, t);
+ float np[2];
+ vlerp(np, sp,sq, t);
+ return vdistsqr(pt,np);
+}
+
+static int sweepCircleCircle(const MT_Vector3& pos0, const MT_Scalar r0, const MT_Vector2& v,
+ const MT_Vector3& pos1, const MT_Scalar r1,
+ float& tmin, float& tmax)
+{
+ static const float EPS = 0.0001f;
+ MT_Vector2 c0(pos0.x(), pos0.y());
+ MT_Vector2 c1(pos1.x(), pos1.y());
+ MT_Vector2 s = c1 - c0;
+ MT_Scalar r = r0+r1;
+ float c = s.length2() - r*r;
+ float a = v.length2();
+ if (a < EPS) return 0; // not moving
+
+ // Overlap, calc time to exit.
+ float b = MT_dot(v,s);
+ float d = b*b - a*c;
+ if (d < 0.0f) return 0; // no intersection.
+ tmin = (b - sqrtf(d)) / a;
+ tmax = (b + sqrtf(d)) / a;
+ return 1;
+}
+
+static int sweepCircleSegment(const MT_Vector3& pos0, const MT_Scalar r0, const MT_Vector2& v,
+ const MT_Vector3& pa, const MT_Vector3& pb, const MT_Scalar sr,
+ float& tmin, float &tmax)
+{
+ // equation parameters
+ MT_Vector2 c0(pos0.x(), pos0.y());
+ MT_Vector2 sa(pa.x(), pa.y());
+ MT_Vector2 sb(pb.x(), pb.y());
+ MT_Vector2 L = sb-sa;
+ MT_Vector2 H = c0-sa;
+ MT_Scalar radius = r0+sr;
+ float l2 = L.length2();
+ float r2 = radius * radius;
+ float dl = perp(v, L);
+ float hl = perp(H, L);
+ float a = dl * dl;
+ float b = 2.0f * hl * dl;
+ float c = hl * hl - (r2 * l2);
+ float d = (b*b) - (4.0f * a * c);
+
+ // infinite line missed by infinite ray.
+ if (d < 0.0f)
+ return 0;
+
+ d = sqrtf(d);
+ tmin = (-b - d) / (2.0f * a);
+ tmax = (-b + d) / (2.0f * a);
+
+ // line missed by ray range.
+ /* if (tmax < 0.0f || tmin > 1.0f)
+ return 0;*/
+
+ // find what part of the ray was collided.
+ MT_Vector2 Pedge;
+ Pedge = c0+v*tmin;
+ H = Pedge - sa;
+ float e0 = MT_dot(H, L) / l2;
+ Pedge = c0 + v*tmax;
+ H = Pedge - sa;
+ float e1 = MT_dot(H, L) / l2;
+
+ if (e0 < 0.0f || e1 < 0.0f)
+ {
+ float ctmin, ctmax;
+ if (sweepCircleCircle(pos0, r0, v, pa, sr, ctmin, ctmax))
+ {
+ if (e0 < 0.0f && ctmin > tmin)
+ tmin = ctmin;
+ if (e1 < 0.0f && ctmax < tmax)
+ tmax = ctmax;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ if (e0 > 1.0f || e1 > 1.0f)
+ {
+ float ctmin, ctmax;
+ if (sweepCircleCircle(pos0, r0, v, pb, sr, ctmin, ctmax))
+ {
+ if (e0 > 1.0f && ctmin > tmin)
+ tmin = ctmin;
+ if (e1 > 1.0f && ctmax < tmax)
+ tmax = ctmax;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+static bool inBetweenAngle(float a, float amin, float amax, float& t)
+{
+ if (amax < amin) amax += (float)M_PI*2;
+ if (a < amin-(float)M_PI) a += (float)M_PI*2;
+ if (a > amin+(float)M_PI) a -= (float)M_PI*2;
+ if (a >= amin && a < amax)
+ {
+ t = (a-amin) / (amax-amin);
+ return true;
+ }
+ return false;
+}
+
+static float interpolateToi(float a, const float* dir, const float* toi, const int ntoi)
+{
+ for (int i = 0; i < ntoi; ++i)
+ {
+ int next = (i+1) % ntoi;
+ float t;
+ if (inBetweenAngle(a, dir[i], dir[next], t))
+ {
+ return lerp(toi[i], toi[next], t);
+ }
+ }
+ return 0;
+}
+
+KX_ObstacleSimulation::KX_ObstacleSimulation(MT_Scalar levelHeight, bool enableVisualization)
+: m_levelHeight(levelHeight)
+, m_enableVisualization(enableVisualization)
+{
+
+}
+
+KX_ObstacleSimulation::~KX_ObstacleSimulation()
+{
+ for (size_t i=0; i<m_obstacles.size(); i++)
+ {
+ KX_Obstacle* obs = m_obstacles[i];
+ delete obs;
+ }
+ m_obstacles.clear();
+}
+KX_Obstacle* KX_ObstacleSimulation::CreateObstacle(KX_GameObject* gameobj)
+{
+ KX_Obstacle* obstacle = new KX_Obstacle();
+ obstacle->m_gameObj = gameobj;
+
+ vset(obstacle->vel, 0,0);
+ vset(obstacle->pvel, 0,0);
+ vset(obstacle->dvel, 0,0);
+ vset(obstacle->nvel, 0,0);
+ for (int i = 0; i < VEL_HIST_SIZE; ++i)
+ vset(&obstacle->hvel[i*2], 0,0);
+ obstacle->hhead = 0;
+
+ gameobj->RegisterObstacle(this);
+ m_obstacles.push_back(obstacle);
+ return obstacle;
+}
+
+void KX_ObstacleSimulation::AddObstacleForObj(KX_GameObject* gameobj)
+{
+ KX_Obstacle* obstacle = CreateObstacle(gameobj);
+ struct Object* blenderobject = gameobj->GetBlenderObject();
+ obstacle->m_type = KX_OBSTACLE_OBJ;
+ obstacle->m_shape = KX_OBSTACLE_CIRCLE;
+ obstacle->m_rad = blenderobject->obstacleRad;
+}
+
+void KX_ObstacleSimulation::AddObstaclesForNavMesh(KX_NavMeshObject* navmeshobj)
+{
+ dtStatNavMesh* navmesh = navmeshobj->GetNavMesh();
+ if (navmesh)
+ {
+ int npoly = navmesh->getPolyCount();
+ for (int pi=0; pi<npoly; pi++)
+ {
+ const dtStatPoly* poly = navmesh->getPoly(pi);
+
+ for (int i = 0, j = (int)poly->nv-1; i < (int)poly->nv; j = i++)
+ {
+ if (poly->n[j]) continue;
+ const float* vj = navmesh->getVertex(poly->v[j]);
+ const float* vi = navmesh->getVertex(poly->v[i]);
+
+ KX_Obstacle* obstacle = CreateObstacle(navmeshobj);
+ obstacle->m_type = KX_OBSTACLE_NAV_MESH;
+ obstacle->m_shape = KX_OBSTACLE_SEGMENT;
+ obstacle->m_pos = MT_Point3(vj[0], vj[2], vj[1]);
+ obstacle->m_pos2 = MT_Point3(vi[0], vi[2], vi[1]);
+ obstacle->m_rad = 0;
+ }
+ }
+ }
+}
+
+void KX_ObstacleSimulation::DestroyObstacleForObj(KX_GameObject* gameobj)
+{
+ for (size_t i=0; i<m_obstacles.size(); )
+ {
+ if (m_obstacles[i]->m_gameObj == gameobj)
+ {
+ KX_Obstacle* obstacle = m_obstacles[i];
+ obstacle->m_gameObj->UnregisterObstacle();
+ m_obstacles[i] = m_obstacles.back();
+ m_obstacles.pop_back();
+ delete obstacle;
+ }
+ else
+ i++;
+ }
+}
+
+void KX_ObstacleSimulation::UpdateObstacles()
+{
+ for (size_t i=0; i<m_obstacles.size(); i++)
+ {
+ if (m_obstacles[i]->m_type==KX_OBSTACLE_NAV_MESH || m_obstacles[i]->m_shape==KX_OBSTACLE_SEGMENT)
+ continue;
+
+ KX_Obstacle* obs = m_obstacles[i];
+ obs->m_pos = obs->m_gameObj->NodeGetWorldPosition();
+ obs->vel[0] = obs->m_gameObj->GetLinearVelocity().x();
+ obs->vel[1] = obs->m_gameObj->GetLinearVelocity().y();
+
+ // Update velocity history and calculate perceived (average) velocity.
+ vcpy(&obs->hvel[obs->hhead*2], obs->vel);
+ obs->hhead = (obs->hhead+1) % VEL_HIST_SIZE;
+ vset(obs->pvel,0,0);
+ for (int j = 0; j < VEL_HIST_SIZE; ++j)
+ vadd(obs->pvel, obs->pvel, &obs->hvel[j*2]);
+ vscale(obs->pvel, obs->pvel, 1.0f/VEL_HIST_SIZE);
+ }
+}
+
+KX_Obstacle* KX_ObstacleSimulation::GetObstacle(KX_GameObject* gameobj)
+{
+ for (size_t i=0; i<m_obstacles.size(); i++)
+ {
+ if (m_obstacles[i]->m_gameObj == gameobj)
+ return m_obstacles[i];
+ }
+
+ return NULL;
+}
+
+void KX_ObstacleSimulation::AdjustObstacleVelocity(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ MT_Vector3& velocity, MT_Scalar maxDeltaSpeed,MT_Scalar maxDeltaAngle)
+{
+}
+
+void KX_ObstacleSimulation::DrawObstacles()
+{
+ if (!m_enableVisualization)
+ return;
+ static const MT_Vector3 bluecolor(0,0,1);
+ static const MT_Vector3 normal(0.,0.,1.);
+ static const int SECTORS_NUM = 32;
+ for (size_t i=0; i<m_obstacles.size(); i++)
+ {
+ if (m_obstacles[i]->m_shape==KX_OBSTACLE_SEGMENT)
+ {
+ MT_Point3 p1 = m_obstacles[i]->m_pos;
+ MT_Point3 p2 = m_obstacles[i]->m_pos2;
+ //apply world transform
+ if (m_obstacles[i]->m_type == KX_OBSTACLE_NAV_MESH)
+ {
+ KX_NavMeshObject* navmeshobj = static_cast<KX_NavMeshObject*>(m_obstacles[i]->m_gameObj);
+ p1 = navmeshobj->TransformToWorldCoords(p1);
+ p2 = navmeshobj->TransformToWorldCoords(p2);
+ }
+
+ KX_RasterizerDrawDebugLine(p1, p2, bluecolor);
+ }
+ else if (m_obstacles[i]->m_shape==KX_OBSTACLE_CIRCLE)
+ {
+ KX_RasterizerDrawDebugCircle(m_obstacles[i]->m_pos, m_obstacles[i]->m_rad, bluecolor,
+ normal, SECTORS_NUM);
+ }
+ }
+}
+
+static MT_Point3 nearestPointToObstacle(MT_Point3& pos ,KX_Obstacle* obstacle)
+{
+ switch (obstacle->m_shape)
+ {
+ case KX_OBSTACLE_SEGMENT :
+ {
+ MT_Vector3 ab = obstacle->m_pos2 - obstacle->m_pos;
+ if (!ab.fuzzyZero())
+ {
+ MT_Vector3 abdir = ab.normalized();
+ MT_Vector3 v = pos - obstacle->m_pos;
+ MT_Scalar proj = abdir.dot(v);
+ CLAMP(proj, 0, ab.length());
+ MT_Point3 res = obstacle->m_pos + abdir*proj;
+ return res;
+ }
+ }
+ case KX_OBSTACLE_CIRCLE :
+ default:
+ return obstacle->m_pos;
+ }
+}
+
+static bool filterObstacle(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj, KX_Obstacle* otherObst,
+ float levelHeight)
+{
+ //filter obstacles by type
+ if ( (otherObst == activeObst) ||
+ (otherObst->m_type==KX_OBSTACLE_NAV_MESH && otherObst->m_gameObj!=activeNavMeshObj) )
+ return false;
+
+ //filter obstacles by position
+ MT_Point3 p = nearestPointToObstacle(activeObst->m_pos, otherObst);
+ if ( fabs(activeObst->m_pos.z() - p.z()) > levelHeight)
+ return false;
+
+ return true;
+}
+
+///////////*********TOI_rays**********/////////////////
+KX_ObstacleSimulationTOI::KX_ObstacleSimulationTOI(MT_Scalar levelHeight, bool enableVisualization)
+: KX_ObstacleSimulation(levelHeight, enableVisualization),
+ m_maxSamples(32),
+ m_minToi(0.0f),
+ m_maxToi(0.0f),
+ m_velWeight(1.0f),
+ m_curVelWeight(1.0f),
+ m_toiWeight(1.0f),
+ m_collisionWeight(1.0f)
+{
+}
+
+
+void KX_ObstacleSimulationTOI::AdjustObstacleVelocity(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ MT_Vector3& velocity, MT_Scalar maxDeltaSpeed, MT_Scalar maxDeltaAngle)
+{
+ int nobs = m_obstacles.size();
+ int obstidx = std::find(m_obstacles.begin(), m_obstacles.end(), activeObst) - m_obstacles.begin();
+ if (obstidx == nobs)
+ return;
+
+ vset(activeObst->dvel, velocity.x(), velocity.y());
+
+ //apply RVO
+ sampleRVO(activeObst, activeNavMeshObj, maxDeltaAngle);
+
+ // Fake dynamic constraint.
+ float dv[2];
+ float vel[2];
+ vsub(dv, activeObst->nvel, activeObst->vel);
+ float ds = vlen(dv);
+ if (ds > maxDeltaSpeed || ds<-maxDeltaSpeed)
+ vscale(dv, dv, fabs(maxDeltaSpeed/ds));
+ vadd(vel, activeObst->vel, dv);
+
+ velocity.x() = vel[0];
+ velocity.y() = vel[1];
+}
+
+///////////*********TOI_rays**********/////////////////
+static const int AVOID_MAX_STEPS = 128;
+struct TOICircle
+{
+ TOICircle() : n(0), minToi(0), maxToi(1) {}
+ float toi[AVOID_MAX_STEPS]; // Time of impact (seconds)
+ float toie[AVOID_MAX_STEPS]; // Time of exit (seconds)
+ float dir[AVOID_MAX_STEPS]; // Direction (radians)
+ int n; // Number of samples
+ float minToi, maxToi; // Min/max TOI (seconds)
+};
+
+KX_ObstacleSimulationTOI_rays::KX_ObstacleSimulationTOI_rays(MT_Scalar levelHeight, bool enableVisualization):
+ KX_ObstacleSimulationTOI(levelHeight, enableVisualization)
+{
+ m_maxSamples = 32;
+ m_minToi = 0.5f;
+ m_maxToi = 1.2f;
+ m_velWeight = 4.0f;
+ m_toiWeight = 1.0f;
+ m_collisionWeight = 100.0f;
+}
+
+
+void KX_ObstacleSimulationTOI_rays::sampleRVO(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ const float maxDeltaAngle)
+{
+ MT_Vector2 vel(activeObst->dvel[0], activeObst->dvel[1]);
+ float vmax = (float) vel.length();
+ float odir = (float) atan2(vel.y(), vel.x());
+
+ MT_Vector2 ddir = vel;
+ ddir.normalize();
+
+ float bestScore = FLT_MAX;
+ float bestDir = odir;
+ float bestToi = 0;
+
+ TOICircle tc;
+ tc.n = m_maxSamples;
+ tc.minToi = m_minToi;
+ tc.maxToi = m_maxToi;
+
+ const int iforw = m_maxSamples/2;
+ const float aoff = (float)iforw / (float)m_maxSamples;
+
+ size_t nobs = m_obstacles.size();
+ for (int iter = 0; iter < m_maxSamples; ++iter)
+ {
+ // Calculate sample velocity
+ const float ndir = ((float)iter/(float)m_maxSamples) - aoff;
+ const float dir = odir+ndir*M_PI*2;
+ MT_Vector2 svel;
+ svel.x() = cosf(dir) * vmax;
+ svel.y() = sinf(dir) * vmax;
+
+ // Find min time of impact and exit amongst all obstacles.
+ float tmin = m_maxToi;
+ float tmine = 0;
+ for (int i = 0; i < nobs; ++i)
+ {
+ KX_Obstacle* ob = m_obstacles[i];
+ bool res = filterObstacle(activeObst, activeNavMeshObj, ob, m_levelHeight);
+ if (!res)
+ continue;
+
+ float htmin,htmax;
+
+ if (ob->m_shape == KX_OBSTACLE_CIRCLE)
+ {
+ MT_Vector2 vab;
+ if (vlen(ob->vel) < 0.01f*0.01f)
+ {
+ // Stationary, use VO
+ vab = svel;
+ }
+ else
+ {
+ // Moving, use RVO
+ vab = 2*svel - vel - ob->vel;
+ }
+
+ if (!sweepCircleCircle(activeObst->m_pos, activeObst->m_rad,
+ vab, ob->m_pos, ob->m_rad, htmin, htmax))
+ continue;
+ }
+ else if (ob->m_shape == KX_OBSTACLE_SEGMENT)
+ {
+ MT_Point3 p1 = ob->m_pos;
+ MT_Point3 p2 = ob->m_pos2;
+ //apply world transform
+ if (ob->m_type == KX_OBSTACLE_NAV_MESH)
+ {
+ KX_NavMeshObject* navmeshobj = static_cast<KX_NavMeshObject*>(ob->m_gameObj);
+ p1 = navmeshobj->TransformToWorldCoords(p1);
+ p2 = navmeshobj->TransformToWorldCoords(p2);
+ }
+ if (!sweepCircleSegment(activeObst->m_pos, activeObst->m_rad, svel,
+ p1, p2, ob->m_rad, htmin, htmax))
+ continue;
+ }
+
+ if (htmin > 0.0f)
+ {
+ // The closest obstacle is somewhere ahead of us, keep track of nearest obstacle.
+ if (htmin < tmin)
+ tmin = htmin;
+ }
+ else if (htmax > 0.0f)
+ {
+ // The agent overlaps the obstacle, keep track of first safe exit.
+ if (htmax > tmine)
+ tmine = htmax;
+ }
+ }
+
+ // Calculate sample penalties and final score.
+ const float apen = m_velWeight * fabsf(ndir);
+ const float tpen = m_toiWeight * (1.0f/(0.0001f+tmin/m_maxToi));
+ const float cpen = m_collisionWeight * (tmine/m_minToi)*(tmine/m_minToi);
+ const float score = apen + tpen + cpen;
+
+ // Update best score.
+ if (score < bestScore)
+ {
+ bestDir = dir;
+ bestToi = tmin;
+ bestScore = score;
+ }
+
+ tc.dir[iter] = dir;
+ tc.toi[iter] = tmin;
+ tc.toie[iter] = tmine;
+ }
+
+ if (vlen(activeObst->vel) > 0.1)
+ {
+ // Constrain max turn rate.
+ float cura = atan2(activeObst->vel[1],activeObst->vel[0]);
+ float da = bestDir - cura;
+ if (da < -M_PI) da += (float)M_PI*2;
+ if (da > M_PI) da -= (float)M_PI*2;
+ if (da < -maxDeltaAngle)
+ {
+ bestDir = cura - maxDeltaAngle;
+ bestToi = min(bestToi, interpolateToi(bestDir, tc.dir, tc.toi, tc.n));
+ }
+ else if (da > maxDeltaAngle)
+ {
+ bestDir = cura + maxDeltaAngle;
+ bestToi = min(bestToi, interpolateToi(bestDir, tc.dir, tc.toi, tc.n));
+ }
+ }
+
+ // Adjust speed when time of impact is less than min TOI.
+ if (bestToi < m_minToi)
+ vmax *= bestToi/m_minToi;
+
+ // New steering velocity.
+ activeObst->nvel[0] = cosf(bestDir) * vmax;
+ activeObst->nvel[1] = sinf(bestDir) * vmax;
+}
+
+///////////********* TOI_cells**********/////////////////
+
+static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ KX_Obstacles& obstacles, float levelHeight, const float vmax,
+ const float* spos, const float cs, const int nspos, float* res,
+ float maxToi, float velWeight, float curVelWeight, float sideWeight,
+ float toiWeight)
+{
+ vset(res, 0,0);
+
+ const float ivmax = 1.0f / vmax;
+
+ float adir[2], adist;
+ vcpy(adir, activeObst->pvel);
+ if (vlen(adir) > 0.01f)
+ vnorm(adir);
+ else
+ vset(adir,0,0);
+ float activeObstPos[2];
+ vset(activeObstPos, activeObst->m_pos.x(), activeObst->m_pos.y());
+ adist = vdot(adir, activeObstPos);
+
+ float minPenalty = FLT_MAX;
+
+ for (int n = 0; n < nspos; ++n)
+ {
+ float vcand[2];
+ vcpy(vcand, &spos[n*2]);
+
+ // Find min time of impact and exit amongst all obstacles.
+ float tmin = maxToi;
+ float side = 0;
+ int nside = 0;
+
+ for (int i = 0; i < obstacles.size(); ++i)
+ {
+ KX_Obstacle* ob = obstacles[i];
+ bool res = filterObstacle(activeObst, activeNavMeshObj, ob, levelHeight);
+ if (!res)
+ continue;
+ float htmin, htmax;
+
+ if (ob->m_shape==KX_OBSTACLE_CIRCLE)
+ {
+ float vab[2];
+
+ // Moving, use RVO
+ vscale(vab, vcand, 2);
+ vsub(vab, vab, activeObst->vel);
+ vsub(vab, vab, ob->vel);
+
+ // Side
+ // NOTE: dp, and dv are constant over the whole calculation,
+ // they can be precomputed per object.
+ const float* pa = activeObstPos;
+ float pb[2];
+ vset(pb, ob->m_pos.x(), ob->m_pos.y());
+
+ const float orig[2] = {0,0};
+ float dp[2],dv[2],np[2];
+ vsub(dp,pb,pa);
+ vnorm(dp);
+ vsub(dv,ob->dvel, activeObst->dvel);
+
+ const float a = triarea(orig, dp,dv);
+ if (a < 0.01f)
+ {
+ np[0] = -dp[1];
+ np[1] = dp[0];
+ }
+ else
+ {
+ np[0] = dp[1];
+ np[1] = -dp[0];
+ }
+
+ side += clamp(min(vdot(dp,vab)*2,vdot(np,vab)*2), 0.0f, 1.0f);
+ nside++;
+
+ if (!sweepCircleCircle(activeObst->m_pos, activeObst->m_rad, vab, ob->m_pos, ob->m_rad,
+ htmin, htmax))
+ continue;
+
+ // Handle overlapping obstacles.
+ if (htmin < 0.0f && htmax > 0.0f)
+ {
+ // Avoid more when overlapped.
+ htmin = -htmin * 0.5f;
+ }
+ }
+ else if (ob->m_shape == KX_OBSTACLE_SEGMENT)
+ {
+ MT_Point3 p1 = ob->m_pos;
+ MT_Point3 p2 = ob->m_pos2;
+ //apply world transform
+ if (ob->m_type == KX_OBSTACLE_NAV_MESH)
+ {
+ KX_NavMeshObject* navmeshobj = static_cast<KX_NavMeshObject*>(ob->m_gameObj);
+ p1 = navmeshobj->TransformToWorldCoords(p1);
+ p2 = navmeshobj->TransformToWorldCoords(p2);
+ }
+ float p[2], q[2];
+ vset(p, p1.x(), p1.y());
+ vset(q, p2.x(), p2.y());
+
+ // NOTE: the segments are assumed to come from a navmesh which is shrunken by
+ // the agent radius, hence the use of really small radius.
+ // This can be handle more efficiently by using seg-seg test instead.
+ // If the whole segment is to be treated as obstacle, use agent->rad instead of 0.01f!
+ const float r = 0.01f; // agent->rad
+ if (distPtSegSqr(activeObstPos, p, q) < sqr(r+ob->m_rad))
+ {
+ float sdir[2], snorm[2];
+ vsub(sdir, q, p);
+ snorm[0] = sdir[1];
+ snorm[1] = -sdir[0];
+ // If the velocity is pointing towards the segment, no collision.
+ if (vdot(snorm, vcand) < 0.0f)
+ continue;
+ // Else immediate collision.
+ htmin = 0.0f;
+ htmax = 10.0f;
+ }
+ else
+ {
+ if (!sweepCircleSegment(activeObstPos, r, vcand, p, q, ob->m_rad, htmin, htmax))
+ continue;
+ }
+
+ // Avoid less when facing walls.
+ htmin *= 2.0f;
+ }
+
+ if (htmin >= 0.0f)
+ {
+ // The closest obstacle is somewhere ahead of us, keep track of nearest obstacle.
+ if (htmin < tmin)
+ tmin = htmin;
+ }
+ }
+
+ // Normalize side bias, to prevent it dominating too much.
+ if (nside)
+ side /= nside;
+
+ const float vpen = velWeight * (vdist(vcand, activeObst->dvel) * ivmax);
+ const float vcpen = curVelWeight * (vdist(vcand, activeObst->vel) * ivmax);
+ const float spen = sideWeight * side;
+ const float tpen = toiWeight * (1.0f/(0.1f+tmin/maxToi));
+
+ const float penalty = vpen + vcpen + spen + tpen;
+
+ if (penalty < minPenalty)
+ {
+ minPenalty = penalty;
+ vcpy(res, vcand);
+ }
+ }
+}
+
+void KX_ObstacleSimulationTOI_cells::sampleRVO(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ const float maxDeltaAngle)
+{
+ vset(activeObst->nvel, 0.f, 0.f);
+ float vmax = vlen(activeObst->dvel);
+
+ float* spos = new float[2*m_maxSamples];
+ int nspos = 0;
+
+ if (!m_adaptive)
+ {
+ const float cvx = activeObst->dvel[0]*m_bias;
+ const float cvy = activeObst->dvel[1]*m_bias;
+ float vmax = vlen(activeObst->dvel);
+ const float vrange = vmax*(1-m_bias);
+ const float cs = 1.0f / (float)m_sampleRadius*vrange;
+
+ for (int y = -m_sampleRadius; y <= m_sampleRadius; ++y)
+ {
+ for (int x = -m_sampleRadius; x <= m_sampleRadius; ++x)
+ {
+ if (nspos < m_maxSamples)
+ {
+ const float vx = cvx + (float)(x+0.5f)*cs;
+ const float vy = cvy + (float)(y+0.5f)*cs;
+ if (vx*vx+vy*vy > sqr(vmax+cs/2)) continue;
+ spos[nspos*2+0] = vx;
+ spos[nspos*2+1] = vy;
+ nspos++;
+ }
+ }
+ }
+ processSamples(activeObst, activeNavMeshObj, m_obstacles, m_levelHeight, vmax, spos, cs/2,
+ nspos, activeObst->nvel, m_maxToi, m_velWeight, m_curVelWeight, m_collisionWeight, m_toiWeight);
+ }
+ else
+ {
+ int rad;
+ float res[2];
+ float cs;
+ // First sample location.
+ rad = 4;
+ res[0] = activeObst->dvel[0]*m_bias;
+ res[1] = activeObst->dvel[1]*m_bias;
+ cs = vmax*(2-m_bias*2) / (float)(rad-1);
+
+ for (int k = 0; k < 5; ++k)
+ {
+ const float half = (rad-1)*cs*0.5f;
+
+ nspos = 0;
+ for (int y = 0; y < rad; ++y)
+ {
+ for (int x = 0; x < rad; ++x)
+ {
+ const float vx = res[0] + x*cs - half;
+ const float vy = res[1] + y*cs - half;
+ if (vx*vx+vy*vy > sqr(vmax+cs/2)) continue;
+ spos[nspos*2+0] = vx;
+ spos[nspos*2+1] = vy;
+ nspos++;
+ }
+ }
+
+ processSamples(activeObst, activeNavMeshObj, m_obstacles, m_levelHeight, vmax, spos, cs/2,
+ nspos, res, m_maxToi, m_velWeight, m_curVelWeight, m_collisionWeight, m_toiWeight);
+
+ cs *= 0.5f;
+ }
+ vcpy(activeObst->nvel, res);
+ }
+}
+
+KX_ObstacleSimulationTOI_cells::KX_ObstacleSimulationTOI_cells(MT_Scalar levelHeight, bool enableVisualization)
+: KX_ObstacleSimulationTOI(levelHeight, enableVisualization)
+, m_bias(0.4f)
+, m_adaptive(true)
+, m_sampleRadius(15)
+{
+ m_maxSamples = (m_sampleRadius*2+1)*(m_sampleRadius*2+1) + 100;
+ m_maxToi = 1.5f;
+ m_velWeight = 2.0f;
+ m_curVelWeight = 0.75f;
+ m_toiWeight = 2.5f;
+ m_collisionWeight = 0.75f; //side_weight
+}
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.h b/source/gameengine/Ketsji/KX_ObstacleSimulation.h
new file mode 100644
index 00000000000..d926e8deb71
--- /dev/null
+++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.h
@@ -0,0 +1,145 @@
+/**
+* Simulation for obstacle avoidance behavior
+* (based on Cane Project - http://code.google.com/p/cane by Mikko Mononen (c) 2009)
+*
+*
+* $Id$
+*
+* ***** 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. The Blender
+* Foundation also sells licenses for use in proprietary software under
+* the Blender License. See http://www.blender.org/BL/ for information
+* about this.
+*
+* 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 __KX_OBSTACLESIMULATION
+#define __KX_OBSTACLESIMULATION
+
+#include <vector>
+#include "MT_Point2.h"
+#include "MT_Point3.h"
+
+class KX_GameObject;
+class KX_NavMeshObject;
+
+enum KX_OBSTACLE_TYPE
+{
+ KX_OBSTACLE_OBJ,
+ KX_OBSTACLE_NAV_MESH,
+};
+
+enum KX_OBSTACLE_SHAPE
+{
+ KX_OBSTACLE_CIRCLE,
+ KX_OBSTACLE_SEGMENT,
+};
+
+#define VEL_HIST_SIZE 6
+struct KX_Obstacle
+{
+ KX_OBSTACLE_TYPE m_type;
+ KX_OBSTACLE_SHAPE m_shape;
+ MT_Point3 m_pos;
+ MT_Point3 m_pos2;
+ MT_Scalar m_rad;
+
+ float vel[2];
+ float pvel[2];
+ float dvel[2];
+ float nvel[2];
+ float hvel[VEL_HIST_SIZE*2];
+ int hhead;
+
+
+ KX_GameObject* m_gameObj;
+};
+typedef std::vector<KX_Obstacle*> KX_Obstacles;
+
+class KX_ObstacleSimulation
+{
+protected:
+ KX_Obstacles m_obstacles;
+
+ MT_Scalar m_levelHeight;
+ bool m_enableVisualization;
+
+ KX_Obstacle* CreateObstacle(KX_GameObject* gameobj);
+public:
+ KX_ObstacleSimulation(MT_Scalar levelHeight, bool enableVisualization);
+ virtual ~KX_ObstacleSimulation();
+
+ void DrawObstacles();
+ //void DebugDraw();
+
+ void AddObstacleForObj(KX_GameObject* gameobj);
+ void DestroyObstacleForObj(KX_GameObject* gameobj);
+ void AddObstaclesForNavMesh(KX_NavMeshObject* navmesh);
+ KX_Obstacle* GetObstacle(KX_GameObject* gameobj);
+ void UpdateObstacles();
+ virtual void AdjustObstacleVelocity(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ MT_Vector3& velocity, MT_Scalar maxDeltaSpeed,MT_Scalar maxDeltaAngle);
+
+};
+class KX_ObstacleSimulationTOI: public KX_ObstacleSimulation
+{
+protected:
+ int m_maxSamples; // Number of sample steps
+ float m_minToi; // Min TOI
+ float m_maxToi; // Max TOI
+ float m_velWeight; // Sample selection angle weight
+ float m_curVelWeight; // Sample selection current velocity weight
+ float m_toiWeight; // Sample selection TOI weight
+ float m_collisionWeight; // Sample selection collision weight
+
+ virtual void sampleRVO(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ const float maxDeltaAngle) = 0;
+public:
+ KX_ObstacleSimulationTOI(MT_Scalar levelHeight, bool enableVisualization);
+ virtual void AdjustObstacleVelocity(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ MT_Vector3& velocity, MT_Scalar maxDeltaSpeed,MT_Scalar maxDeltaAngle);
+};
+
+class KX_ObstacleSimulationTOI_rays: public KX_ObstacleSimulationTOI
+{
+protected:
+ virtual void sampleRVO(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ const float maxDeltaAngle);
+public:
+ KX_ObstacleSimulationTOI_rays(MT_Scalar levelHeight, bool enableVisualization);
+};
+
+class KX_ObstacleSimulationTOI_cells: public KX_ObstacleSimulationTOI
+{
+protected:
+ float m_bias;
+ bool m_adaptive;
+ int m_sampleRadius;
+ virtual void sampleRVO(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavMeshObj,
+ const float maxDeltaAngle);
+public:
+ KX_ObstacleSimulationTOI_cells(MT_Scalar levelHeight, bool enableVisualization);
+};
+
+#endif
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
index d32f267f0e0..098c136bfa3 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.cpp
@@ -78,10 +78,10 @@ void KX_PolygonMaterial::Initialize(
int tile,
int tilexrep,
int tileyrep,
- int mode,
- int transp,
+ int alphablend,
bool alpha,
bool zsort,
+ bool light,
int lightlayer,
struct MTFace* tface,
unsigned int* mcol)
@@ -93,10 +93,12 @@ void KX_PolygonMaterial::Initialize(
tile,
tilexrep,
tileyrep,
- mode,
- transp,
+ alphablend,
alpha,
- zsort);
+ zsort,
+ light,
+ (texname && texname != ""?true:false), /* if we have a texture we have image */
+ ma?&ma->game:NULL);
m_tface = tface;
m_mcol = mcol;
m_material = ma;
@@ -168,7 +170,7 @@ void KX_PolygonMaterial::DefaultActivate(RAS_IRasterizer* rasty, TCachingInfo& c
if (GetCachingInfo() != cachingInfo)
{
if (!cachingInfo)
- GPU_set_tpage(NULL, 0);
+ GPU_set_tpage(NULL, 0, 0);
cachingInfo = GetCachingInfo();
@@ -176,15 +178,15 @@ void KX_PolygonMaterial::DefaultActivate(RAS_IRasterizer* rasty, TCachingInfo& c
{
Image *ima = (Image*)m_tface->tpage;
GPU_update_image_time(ima, rasty->GetTime());
- GPU_set_tpage(m_tface, 1);
+ GPU_set_tpage(m_tface, 1, m_alphablend);
}
else
- GPU_set_tpage(NULL, 0);
+ GPU_set_tpage(NULL, 0, 0);
- if(m_drawingmode & RAS_IRasterizer::KX_TWOSIDE)
- rasty->SetCullFace(false);
- else
+ if(m_drawingmode & RAS_IRasterizer::KX_BACKCULL)
rasty->SetCullFace(true);
+ else
+ rasty->SetCullFace(false);
if ((m_drawingmode & RAS_IRasterizer::KX_LINES) ||
(rasty->GetDrawingMode() <= RAS_IRasterizer::KX_WIREFRAME))
@@ -318,7 +320,7 @@ KX_PYMETHODDEF_DOC(KX_PolygonMaterial, setTexture, "setTexture(tface)")
if (PyArg_ParseTuple(args, "O!:setTexture", &PyCapsule_Type, &pytface))
{
MTFace *tface = (MTFace*) PyCapsule_GetPointer(pytface, KX_POLYGONMATERIAL_CAPSULE_ID);
- GPU_set_tpage(tface, 1);
+ GPU_set_tpage(tface, 1, m_alphablend);
Py_RETURN_NONE;
}
diff --git a/source/gameengine/Ketsji/KX_PolygonMaterial.h b/source/gameengine/Ketsji/KX_PolygonMaterial.h
index 3520995def3..b09ddd39141 100644
--- a/source/gameengine/Ketsji/KX_PolygonMaterial.h
+++ b/source/gameengine/Ketsji/KX_PolygonMaterial.h
@@ -78,10 +78,10 @@ public:
int tile,
int tilexrep,
int tileyrep,
- int mode,
- int transp,
+ int alphablend,
bool alpha,
bool zsort,
+ bool light,
int lightlayer,
struct MTFace* tface,
unsigned int* mcol);
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 395e2048cb7..62ca2910c60 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -87,6 +87,8 @@ extern "C" {
#include "KX_GameActuator.h"
#include "KX_ParentActuator.h"
#include "KX_SCA_DynamicActuator.h"
+#include "KX_SteeringActuator.h"
+#include "KX_NavMeshObject.h"
#include "SCA_IInputDevice.h"
#include "SCA_PropertySensor.h"
@@ -181,6 +183,13 @@ void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,cons
gp_Rasterizer->DrawDebugLine(from,to,color);
}
+void KX_RasterizerDrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
+ const MT_Vector3& normal, int nsector)
+{
+ if (gp_Rasterizer)
+ gp_Rasterizer->DrawDebugCircle(center, radius, color, normal, nsector);
+}
+
#ifdef WITH_PYTHON
static PyObject *gp_OrigPythonSysPath= NULL;
@@ -725,7 +734,7 @@ static PyObject *gLibNew(PyObject*, PyObject* args)
if(idcode==ID_ME) {
PyObject *ret= PyList_New(0);
PyObject *item;
- for(int i= 0; i < PyList_GET_SIZE(names); i++) {
+ for(Py_ssize_t i= 0; i < PyList_GET_SIZE(names); i++) {
name= _PyUnicode_AsString(PyList_GET_ITEM(names, i));
if(name) {
RAS_MeshObject *meshobj= kx_scene->GetSceneConverter()->ConvertMeshSpecial(kx_scene, maggie, name);
@@ -1104,7 +1113,7 @@ static PyObject* gPySetGLSLMaterialSetting(PyObject*,
PyObject* args,
PyObject*)
{
- GameData *gm= &(gp_KetsjiScene->GetBlenderScene()->gm);
+ GlobalSettings *gs= gp_KetsjiEngine->GetGlobalSettings();
char *setting;
int enable, flag, sceneflag;
@@ -1118,15 +1127,15 @@ static PyObject* gPySetGLSLMaterialSetting(PyObject*,
return NULL;
}
- sceneflag= gm->flag;
+ sceneflag= gs->glslflag;
if (enable)
- gm->flag &= ~flag;
+ gs->glslflag &= ~flag;
else
- gm->flag |= flag;
+ gs->glslflag |= flag;
/* display lists and GLSL materials need to be remade */
- if(sceneflag != gm->flag) {
+ if(sceneflag != gs->glslflag) {
GPU_materials_free();
if(gp_KetsjiEngine) {
KX_SceneList *scenes = gp_KetsjiEngine->CurrentScenes();
@@ -1147,7 +1156,7 @@ static PyObject* gPyGetGLSLMaterialSetting(PyObject*,
PyObject* args,
PyObject*)
{
- GameData *gm= &(gp_KetsjiScene->GetBlenderScene()->gm);
+ GlobalSettings *gs= gp_KetsjiEngine->GetGlobalSettings();
char *setting;
int enabled = 0, flag;
@@ -1161,7 +1170,7 @@ static PyObject* gPyGetGLSLMaterialSetting(PyObject*,
return NULL;
}
- enabled = ((gm->flag & flag) != 0);
+ enabled = ((gs->glslflag & flag) != 0);
return PyLong_FromSsize_t(enabled);
}
@@ -1173,18 +1182,18 @@ static PyObject* gPySetMaterialType(PyObject*,
PyObject* args,
PyObject*)
{
- GameData *gm= &(gp_KetsjiScene->GetBlenderScene()->gm);
+ GlobalSettings *gs= gp_KetsjiEngine->GetGlobalSettings();
int type;
if (!PyArg_ParseTuple(args,"i:setMaterialType",&type))
return NULL;
if(type == KX_BLENDER_GLSL_MATERIAL)
- gm->matmode= GAME_MAT_GLSL;
+ gs->matmode= GAME_MAT_GLSL;
else if(type == KX_BLENDER_MULTITEX_MATERIAL)
- gm->matmode= GAME_MAT_MULTITEX;
+ gs->matmode= GAME_MAT_MULTITEX;
else if(type == KX_TEXFACE_MATERIAL)
- gm->matmode= GAME_MAT_TEXFACE;
+ gs->matmode= GAME_MAT_TEXFACE;
else {
PyErr_SetString(PyExc_ValueError, "Rasterizer.setMaterialType(int): material type is not known");
return NULL;
@@ -1195,12 +1204,12 @@ static PyObject* gPySetMaterialType(PyObject*,
static PyObject* gPyGetMaterialType(PyObject*)
{
- GameData *gm= &(gp_KetsjiScene->GetBlenderScene()->gm);
+ GlobalSettings *gs= gp_KetsjiEngine->GetGlobalSettings();
int flag;
- if(gm->matmode == GAME_MAT_GLSL)
+ if(gs->matmode == GAME_MAT_GLSL)
flag = KX_BLENDER_GLSL_MATERIAL;
- else if(gm->matmode == GAME_MAT_MULTITEX)
+ else if(gs->matmode == GAME_MAT_MULTITEX)
flag = KX_BLENDER_MULTITEX_MATERIAL;
else
flag = KX_TEXFACE_MATERIAL;
@@ -1655,6 +1664,16 @@ PyObject* initGameLogic(KX_KetsjiEngine *engine, KX_Scene* scene) // quick hack
KX_MACRO_addTypesToDict(d, ROT_MODE_ZXY, ROT_MODE_ZXY);
KX_MACRO_addTypesToDict(d, ROT_MODE_ZYX, ROT_MODE_ZYX);
+ /* Steering actuator */
+ KX_MACRO_addTypesToDict(d, KX_STEERING_SEEK, KX_SteeringActuator::KX_STEERING_SEEK);
+ KX_MACRO_addTypesToDict(d, KX_STEERING_FLEE, KX_SteeringActuator::KX_STEERING_FLEE);
+ KX_MACRO_addTypesToDict(d, KX_STEERING_PATHFOLLOWING, KX_SteeringActuator::KX_STEERING_PATHFOLLOWING);
+
+ /* KX_NavMeshObject render mode */
+ KX_MACRO_addTypesToDict(d, RM_WALLS, KX_NavMeshObject::RM_WALLS);
+ KX_MACRO_addTypesToDict(d, RM_POLYS, KX_NavMeshObject::RM_POLYS);
+ KX_MACRO_addTypesToDict(d, RM_TRIS, KX_NavMeshObject::RM_TRIS);
+
/* BL_Action play modes */
KX_MACRO_addTypesToDict(d, KX_ACTION_MODE_PLAY, BL_Action::ACT_MODE_PLAY);
KX_MACRO_addTypesToDict(d, KX_ACTION_MODE_LOOP, BL_Action::ACT_MODE_LOOP);
@@ -1751,7 +1770,7 @@ static void initPySysObjects(Main *maggie)
initPySysObjects__append(sys_path, gp_GamePythonPath);
-// fprintf(stderr, "\nNew Path: %d ", PyList_Size(sys_path));
+// fprintf(stderr, "\nNew Path: %d ", PyList_GET_SIZE(sys_path));
// PyObject_Print(sys_path, stderr, 0);
}
@@ -1775,7 +1794,7 @@ static void restorePySysObjects(void)
gp_OrigPythonSysModules= NULL;
-// fprintf(stderr, "\nRestore Path: %d ", PyList_Size(sys_path));
+// fprintf(stderr, "\nRestore Path: %d ", PyList_GET_SIZE(sys_path));
// PyObject_Print(sys_path, stderr, 0);
}
diff --git a/source/gameengine/Ketsji/KX_PythonInit.h b/source/gameengine/Ketsji/KX_PythonInit.h
index 1b172c35eff..d76e8f913df 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.h
+++ b/source/gameengine/Ketsji/KX_PythonInit.h
@@ -72,6 +72,9 @@ class KX_KetsjiEngine* KX_GetActiveEngine();
#include "MT_Vector3.h"
void KX_RasterizerDrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color);
+void KX_RasterizerDrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
+ const MT_Vector3& normal, int nsector);
+
#endif //__KX_PYTHON_INIT
diff --git a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
index 1c4a17e31fc..49a08135c38 100644
--- a/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInitTypes.cpp
@@ -68,6 +68,7 @@
#include "KX_SCA_ReplaceMeshActuator.h"
#include "KX_SceneActuator.h"
#include "KX_StateActuator.h"
+#include "KX_SteeringActuator.h"
#include "KX_TrackToActuator.h"
#include "KX_VehicleWrapper.h"
#include "KX_VertexProxy.h"
@@ -99,6 +100,7 @@
#include "SCA_PythonController.h"
#include "SCA_RandomActuator.h"
#include "SCA_IController.h"
+#include "KX_NavMeshObject.h"
static void PyType_Attr_Set(PyGetSetDef *attr_getset, PyAttributeDef *attr)
{
@@ -217,9 +219,11 @@ void initPyTypes(void)
PyType_Ready_Attr(dict, KX_SCA_EndObjectActuator, init_getset);
PyType_Ready_Attr(dict, KX_SCA_ReplaceMeshActuator, init_getset);
PyType_Ready_Attr(dict, KX_Scene, init_getset);
+ PyType_Ready_Attr(dict, KX_NavMeshObject, init_getset);
PyType_Ready_Attr(dict, KX_SceneActuator, init_getset);
PyType_Ready_Attr(dict, KX_SoundActuator, init_getset);
PyType_Ready_Attr(dict, KX_StateActuator, init_getset);
+ PyType_Ready_Attr(dict, KX_SteeringActuator, init_getset);
PyType_Ready_Attr(dict, KX_TouchSensor, init_getset);
PyType_Ready_Attr(dict, KX_TrackToActuator, init_getset);
PyType_Ready_Attr(dict, KX_VehicleWrapper, init_getset);
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index 06e343cedb2..7ff4a786387 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -87,6 +87,7 @@
#include "BL_ModifierDeformer.h"
#include "BL_ShapeDeformer.h"
#include "BL_DeformableGameObject.h"
+#include "KX_ObstacleSimulation.h"
#ifdef USE_BULLET
#include "KX_SoftBodyDeformer.h"
@@ -214,6 +215,19 @@ KX_Scene::KX_Scene(class SCA_IInputDevice* keyboarddevice,
m_bucketmanager=new RAS_BucketManager();
+ bool showObstacleSimulation = scene->gm.flag & GAME_SHOW_OBSTACLE_SIMULATION;
+ switch (scene->gm.obstacleSimulation)
+ {
+ case OBSTSIMULATION_TOI_rays:
+ m_obstacleSimulation = new KX_ObstacleSimulationTOI_rays((MT_Scalar)scene->gm.levelHeight, showObstacleSimulation);
+ break;
+ case OBSTSIMULATION_TOI_cells:
+ m_obstacleSimulation = new KX_ObstacleSimulationTOI_cells((MT_Scalar)scene->gm.levelHeight, showObstacleSimulation);
+ break;
+ default:
+ m_obstacleSimulation = NULL;
+ }
+
#ifdef WITH_PYTHON
m_attr_dict = PyDict_New(); /* new ref */
m_draw_call_pre = NULL;
@@ -236,6 +250,9 @@ KX_Scene::~KX_Scene()
this->RemoveObject(parentobj);
}
+ if (m_obstacleSimulation)
+ delete m_obstacleSimulation;
+
if(m_objectlist)
m_objectlist->Release();
@@ -1017,6 +1034,8 @@ int KX_Scene::NewRemoveObject(class CValue* gameobj)
ret = newobj->Release();
if (m_euthanasyobjects->RemoveValue(newobj))
ret = newobj->Release();
+ if (m_animatedlist->RemoveValue(newobj))
+ ret = newobj->Release();
if (newobj == m_active_camera)
{
@@ -1508,6 +1527,7 @@ void KX_Scene::LogicBeginFrame(double curtime)
void KX_Scene::AddAnimatedObject(CValue* gameobj)
{
+ gameobj->AddRef();
m_animatedlist->Add(gameobj);
}
@@ -1520,7 +1540,7 @@ void KX_Scene::UpdateAnimations(double curtime)
{
// Update any animations
for (int i=0; i<m_animatedlist->GetCount(); ++i)
- ((KX_GameObject*)GetObjectList()->GetValue(i))->UpdateActionManager(curtime);
+ ((KX_GameObject*)m_animatedlist->GetValue(i))->UpdateActionManager(curtime);
}
void KX_Scene::LogicUpdateFrame(double curtime, bool frame)
@@ -1545,6 +1565,10 @@ void KX_Scene::LogicEndFrame()
obj->Release();
RemoveObject(obj);
}
+
+ //prepare obstacle simulation for new frame
+ if (m_obstacleSimulation)
+ m_obstacleSimulation->UpdateObstacles();
}
@@ -1916,7 +1940,7 @@ void KX_Scene::Render2DFilters(RAS_ICanvas* canvas)
void KX_Scene::RunDrawingCallbacks(PyObject* cb_list)
{
- int len;
+ Py_ssize_t len;
if (cb_list && (len=PyList_GET_SIZE(cb_list)))
{
@@ -1925,7 +1949,7 @@ void KX_Scene::RunDrawingCallbacks(PyObject* cb_list)
PyObject* ret;
// Iterate the list and run the callbacks
- for (int pos=0; pos < len; pos++)
+ for (Py_ssize_t pos=0; pos < len; pos++)
{
func= PyList_GET_ITEM(cb_list, pos);
ret= PyObject_Call(func, args, NULL);
@@ -1977,6 +2001,8 @@ PyMethodDef KX_Scene::Methods[] = {
KX_PYMETHODTABLE(KX_Scene, replace),
KX_PYMETHODTABLE(KX_Scene, suspend),
KX_PYMETHODTABLE(KX_Scene, resume),
+ KX_PYMETHODTABLE(KX_Scene, drawObstacleSimulation),
+
/* dict style access */
KX_PYMETHODTABLE(KX_Scene, get),
@@ -2301,6 +2327,16 @@ KX_PYMETHODDEF_DOC(KX_Scene, resume,
Py_RETURN_NONE;
}
+KX_PYMETHODDEF_DOC(KX_Scene, drawObstacleSimulation,
+ "drawObstacleSimulation()\n"
+ "Draw debug visualization of obstacle simulation.\n")
+{
+ if (GetObstacleSimulation())
+ GetObstacleSimulation()->DrawObstacles();
+
+ Py_RETURN_NONE;
+}
+
/* Matches python dict.get(key, [default]) */
KX_PYMETHODDEF_DOC(KX_Scene, get, "")
{
diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h
index 499861bce50..5954d5465ba 100644
--- a/source/gameengine/Ketsji/KX_Scene.h
+++ b/source/gameengine/Ketsji/KX_Scene.h
@@ -88,6 +88,7 @@ class SCA_JoystickManager;
class btCollisionShape;
class KX_BlenderSceneConverter;
struct KX_ClientObjectInfo;
+class KX_ObstacleSimulation;
#ifdef WITH_CXX_GUARDEDALLOC
#include "MEM_guardedalloc.h"
@@ -293,6 +294,9 @@ protected:
struct Scene* m_blenderScene;
RAS_2DFilterManager m_filtermanager;
+
+ KX_ObstacleSimulation* m_obstacleSimulation;
+
public:
KX_Scene(class SCA_IInputDevice* keyboarddevice,
class SCA_IInputDevice* mousedevice,
@@ -585,6 +589,8 @@ public:
void Update2DFilter(vector<STR_String>& propNames, void* gameObj, RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode, int pass, STR_String& text);
void Render2DFilters(RAS_ICanvas* canvas);
+ KX_ObstacleSimulation* GetObstacleSimulation() {return m_obstacleSimulation;};
+
#ifdef WITH_PYTHON
/* --------------------------------------------------------------------- */
/* Python interface ---------------------------------------------------- */
@@ -597,6 +603,8 @@ public:
KX_PYMETHOD_DOC(KX_Scene, suspend);
KX_PYMETHOD_DOC(KX_Scene, resume);
KX_PYMETHOD_DOC(KX_Scene, get);
+ KX_PYMETHOD_DOC(KX_Scene, drawObstacleSimulation);
+
/* attributes */
static PyObject* pyattr_get_name(void* self_v, const KX_PYATTRIBUTE_DEF *attrdef);
diff --git a/source/gameengine/Ketsji/KX_SoundActuator.cpp b/source/gameengine/Ketsji/KX_SoundActuator.cpp
index 6c7b515c095..f24243fcdfc 100644
--- a/source/gameengine/Ketsji/KX_SoundActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SoundActuator.cpp
@@ -108,7 +108,15 @@ void KX_SoundActuator::play()
break;
}
- m_handle = AUD_getDevice()->play(sound, 0);
+ try
+ {
+ m_handle = AUD_getDevice()->play(sound, 0);
+ }
+ catch(AUD_Exception&)
+ {
+ // cannot play back, ignore
+ return;
+ }
AUD_Reference<AUD_I3DHandle> handle3d = AUD_Reference<AUD_I3DHandle>(m_handle);
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.cpp b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
new file mode 100644
index 00000000000..a0a2e148c1e
--- /dev/null
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
@@ -0,0 +1,630 @@
+/**
+* Add steering behaviors
+*
+* $Id$
+*
+* ***** 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. The Blender
+* Foundation also sells licenses for use in proprietary software under
+* the Blender License. See http://www.blender.org/BL/ for information
+* about this.
+*
+* 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 *****
+*/
+
+#include "BLI_math.h"
+#include "KX_SteeringActuator.h"
+#include "KX_GameObject.h"
+#include "KX_NavMeshObject.h"
+#include "KX_ObstacleSimulation.h"
+#include "KX_PythonInit.h"
+#include "KX_PyMath.h"
+#include "Recast.h"
+
+/* ------------------------------------------------------------------------- */
+/* Native functions */
+/* ------------------------------------------------------------------------- */
+
+KX_SteeringActuator::KX_SteeringActuator(SCA_IObject *gameobj,
+ int mode,
+ KX_GameObject *target,
+ KX_GameObject *navmesh,
+ float distance,
+ float velocity,
+ float acceleration,
+ float turnspeed,
+ bool isSelfTerminated,
+ int pathUpdatePeriod,
+ KX_ObstacleSimulation* simulation,
+ short facingmode,
+ bool normalup,
+ bool enableVisualization) :
+ SCA_IActuator(gameobj, KX_ACT_STEERING),
+ m_mode(mode),
+ m_target(target),
+ m_distance(distance),
+ m_velocity(velocity),
+ m_acceleration(acceleration),
+ m_turnspeed(turnspeed),
+ m_isSelfTerminated(isSelfTerminated),
+ m_pathUpdatePeriod(pathUpdatePeriod),
+ m_updateTime(0),
+ m_isActive(false),
+ m_simulation(simulation),
+ m_enableVisualization(enableVisualization),
+ m_facingMode(facingmode),
+ m_normalUp(normalup),
+ m_obstacle(NULL),
+ m_pathLen(0),
+ m_wayPointIdx(-1),
+ m_steerVec(MT_Vector3(0, 0, 0))
+{
+ m_navmesh = static_cast<KX_NavMeshObject*>(navmesh);
+ if (m_navmesh)
+ m_navmesh->RegisterActuator(this);
+ if (m_target)
+ m_target->RegisterActuator(this);
+
+ if (m_simulation)
+ m_obstacle = m_simulation->GetObstacle((KX_GameObject*)gameobj);
+ KX_GameObject* parent = ((KX_GameObject*)gameobj)->GetParent();
+ if (m_facingMode>0 && parent)
+ {
+ m_parentlocalmat = parent->GetSGNode()->GetLocalOrientation();
+ }
+ else
+ m_parentlocalmat.setIdentity();
+}
+
+KX_SteeringActuator::~KX_SteeringActuator()
+{
+ if (m_navmesh)
+ m_navmesh->UnregisterActuator(this);
+ if (m_target)
+ m_target->UnregisterActuator(this);
+}
+
+CValue* KX_SteeringActuator::GetReplica()
+{
+ KX_SteeringActuator* replica = new KX_SteeringActuator(*this);
+ // replication just copy the m_base pointer => common random generator
+ replica->ProcessReplica();
+ return replica;
+}
+
+void KX_SteeringActuator::ProcessReplica()
+{
+ if (m_target)
+ m_target->RegisterActuator(this);
+ if (m_navmesh)
+ m_navmesh->RegisterActuator(this);
+ SCA_IActuator::ProcessReplica();
+}
+
+
+bool KX_SteeringActuator::UnlinkObject(SCA_IObject* clientobj)
+{
+ if (clientobj == m_target)
+ {
+ m_target = NULL;
+ return true;
+ }
+ else if (clientobj == m_navmesh)
+ {
+ m_navmesh = NULL;
+ return true;
+ }
+ return false;
+}
+
+void KX_SteeringActuator::Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map)
+{
+ void **h_obj = (*obj_map)[m_target];
+ if (h_obj) {
+ if (m_target)
+ m_target->UnregisterActuator(this);
+ m_target = (KX_GameObject*)(*h_obj);
+ m_target->RegisterActuator(this);
+ }
+
+ h_obj = (*obj_map)[m_navmesh];
+ if (h_obj) {
+ if (m_navmesh)
+ m_navmesh->UnregisterActuator(this);
+ m_navmesh = (KX_NavMeshObject*)(*h_obj);
+ m_navmesh->RegisterActuator(this);
+ }
+}
+
+bool KX_SteeringActuator::Update(double curtime, bool frame)
+{
+ if (frame)
+ {
+ double delta = curtime - m_updateTime;
+ m_updateTime = curtime;
+
+ if (m_posevent && !m_isActive)
+ {
+ delta = 0;
+ m_pathUpdateTime = -1;
+ m_updateTime = curtime;
+ m_isActive = true;
+ }
+ bool bNegativeEvent = IsNegativeEvent();
+ if (bNegativeEvent)
+ m_isActive = false;
+
+ RemoveAllEvents();
+
+ if (!delta)
+ return true;
+
+ if (bNegativeEvent || !m_target)
+ return false; // do nothing on negative events
+
+ KX_GameObject *obj = (KX_GameObject*) GetParent();
+ const MT_Point3& mypos = obj->NodeGetWorldPosition();
+ const MT_Point3& targpos = m_target->NodeGetWorldPosition();
+ MT_Vector3 vectotarg = targpos - mypos;
+ MT_Vector3 vectotarg2d = vectotarg;
+ vectotarg2d.z() = 0;
+ m_steerVec = MT_Vector3(0, 0, 0);
+ bool apply_steerforce = false;
+ bool terminate = true;
+
+ switch (m_mode) {
+ case KX_STEERING_SEEK:
+ if (vectotarg2d.length2()>m_distance*m_distance)
+ {
+ terminate = false;
+ m_steerVec = vectotarg;
+ m_steerVec.normalize();
+ apply_steerforce = true;
+ }
+ break;
+ case KX_STEERING_FLEE:
+ if (vectotarg2d.length2()<m_distance*m_distance)
+ {
+ terminate = false;
+ m_steerVec = -vectotarg;
+ m_steerVec.normalize();
+ apply_steerforce = true;
+ }
+ break;
+ case KX_STEERING_PATHFOLLOWING:
+ if (m_navmesh && vectotarg.length2()>m_distance*m_distance)
+ {
+ terminate = false;
+
+ static const MT_Scalar WAYPOINT_RADIUS(0.25);
+
+ if (m_pathUpdateTime<0 || (m_pathUpdatePeriod>=0 &&
+ curtime - m_pathUpdateTime>((double)m_pathUpdatePeriod/1000)))
+ {
+ m_pathUpdateTime = curtime;
+ m_pathLen = m_navmesh->FindPath(mypos, targpos, m_path, MAX_PATH_LENGTH);
+ m_wayPointIdx = m_pathLen > 1 ? 1 : -1;
+ }
+
+ if (m_wayPointIdx>0)
+ {
+ MT_Vector3 waypoint(&m_path[3*m_wayPointIdx]);
+ if ((waypoint-mypos).length2()<WAYPOINT_RADIUS*WAYPOINT_RADIUS)
+ {
+ m_wayPointIdx++;
+ if (m_wayPointIdx>=m_pathLen)
+ {
+ m_wayPointIdx = -1;
+ terminate = true;
+ }
+ else
+ waypoint.setValue(&m_path[3*m_wayPointIdx]);
+ }
+
+ m_steerVec = waypoint - mypos;
+ apply_steerforce = true;
+
+
+ if (m_enableVisualization)
+ {
+ //debug draw
+ static const MT_Vector3 PATH_COLOR(1,0,0);
+ m_navmesh->DrawPath(m_path, m_pathLen, PATH_COLOR);
+ }
+ }
+
+ }
+ break;
+ }
+
+ if (apply_steerforce)
+ {
+ bool isdyna = obj->IsDynamic();
+ if (isdyna)
+ m_steerVec.z() = 0;
+ if (!m_steerVec.fuzzyZero())
+ m_steerVec.normalize();
+ MT_Vector3 newvel = m_velocity*m_steerVec;
+
+ //adjust velocity to avoid obstacles
+ if (m_simulation && m_obstacle /*&& !newvel.fuzzyZero()*/)
+ {
+ if (m_enableVisualization)
+ KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(1.,0.,0.));
+ m_simulation->AdjustObstacleVelocity(m_obstacle, m_mode!=KX_STEERING_PATHFOLLOWING ? m_navmesh : NULL,
+ newvel, m_acceleration*delta, m_turnspeed/180.0f*M_PI*delta);
+ if (m_enableVisualization)
+ KX_RasterizerDrawDebugLine(mypos, mypos + newvel, MT_Vector3(0.,1.,0.));
+ }
+
+ HandleActorFace(newvel);
+ if (isdyna)
+ {
+ //temporary solution: set 2D steering velocity directly to obj
+ //correct way is to apply physical force
+ MT_Vector3 curvel = obj->GetLinearVelocity();
+ newvel.z() = curvel.z();
+ obj->setLinearVelocity(newvel, false);
+ }
+ else
+ {
+ MT_Vector3 movement = delta*newvel;
+ obj->ApplyMovement(movement, false);
+ }
+ }
+ else
+ {
+ if (m_simulation && m_obstacle)
+ {
+ m_obstacle->dvel[0] = 0.f;
+ m_obstacle->dvel[1] = 0.f;
+ }
+
+ }
+
+ if (terminate && m_isSelfTerminated)
+ return false;
+ }
+
+ return true;
+}
+
+const MT_Vector3& KX_SteeringActuator::GetSteeringVec()
+{
+ static MT_Vector3 ZERO_VECTOR(0, 0, 0);
+ if (m_isActive)
+ return m_steerVec;
+ else
+ return ZERO_VECTOR;
+}
+
+inline float vdot2(const float* a, const float* b)
+{
+ return a[0]*b[0] + a[2]*b[2];
+}
+static bool barDistSqPointToTri(const float* p, const float* a, const float* b, const float* c)
+{
+ float v0[3], v1[3], v2[3];
+ vsub(v0, c,a);
+ vsub(v1, b,a);
+ vsub(v2, p,a);
+
+ const float dot00 = vdot2(v0, v0);
+ const float dot01 = vdot2(v0, v1);
+ const float dot02 = vdot2(v0, v2);
+ const float dot11 = vdot2(v1, v1);
+ const float dot12 = vdot2(v1, v2);
+
+ // Compute barycentric coordinates
+ float invDenom = 1.0f / (dot00 * dot11 - dot01 * dot01);
+ float u = (dot11 * dot02 - dot01 * dot12) * invDenom;
+ float v = (dot00 * dot12 - dot01 * dot02) * invDenom;
+
+ float ud = u<0.f ? -u : (u>1.f ? u-1.f : 0.f);
+ float vd = v<0.f ? -v : (v>1.f ? v-1.f : 0.f);
+ return ud*ud+vd*vd ;
+}
+
+inline void flipAxes(float* vec)
+{
+ std::swap(vec[1],vec[2]);
+}
+
+static bool getNavmeshNormal(dtStatNavMesh* navmesh, const MT_Vector3& pos, MT_Vector3& normal)
+{
+ static const float polyPickExt[3] = {2, 4, 2};
+ float spos[3];
+ pos.getValue(spos);
+ flipAxes(spos);
+ dtStatPolyRef sPolyRef = navmesh->findNearestPoly(spos, polyPickExt);
+ if (sPolyRef == 0)
+ return false;
+ const dtStatPoly* p = navmesh->getPoly(sPolyRef-1);
+ const dtStatPolyDetail* pd = navmesh->getPolyDetail(sPolyRef-1);
+
+ float distMin = FLT_MAX;
+ int idxMin = -1;
+ for (int i = 0; i < pd->ntris; ++i)
+ {
+ const unsigned char* t = navmesh->getDetailTri(pd->tbase+i);
+ const float* v[3];
+ for (int j = 0; j < 3; ++j)
+ {
+ if (t[j] < p->nv)
+ v[j] = navmesh->getVertex(p->v[t[j]]);
+ else
+ v[j] = navmesh->getDetailVertex(pd->vbase+(t[j]-p->nv));
+ }
+ float dist = barDistSqPointToTri(spos, v[0], v[1], v[2]);
+ if (dist<distMin)
+ {
+ distMin = dist;
+ idxMin = i;
+ }
+ }
+
+ if (idxMin>=0)
+ {
+ const unsigned char* t = navmesh->getDetailTri(pd->tbase+idxMin);
+ const float* v[3];
+ for (int j = 0; j < 3; ++j)
+ {
+ if (t[j] < p->nv)
+ v[j] = navmesh->getVertex(p->v[t[j]]);
+ else
+ v[j] = navmesh->getDetailVertex(pd->vbase+(t[j]-p->nv));
+ }
+ MT_Vector3 tri[3];
+ for (size_t j=0; j<3; j++)
+ tri[j].setValue(v[j][0],v[j][2],v[j][1]);
+ MT_Vector3 a,b;
+ a = tri[1]-tri[0];
+ b = tri[2]-tri[0];
+ normal = b.cross(a).safe_normalized();
+ return true;
+ }
+
+ return false;
+}
+
+void KX_SteeringActuator::HandleActorFace(MT_Vector3& velocity)
+{
+ if (m_facingMode==0 && (!m_navmesh || !m_normalUp))
+ return;
+ KX_GameObject* curobj = (KX_GameObject*) GetParent();
+ MT_Vector3 dir = m_facingMode==0 ? curobj->NodeGetLocalOrientation().getColumn(1) : velocity;
+ if (dir.fuzzyZero())
+ return;
+ dir.normalize();
+ MT_Vector3 up(0,0,1);
+ MT_Vector3 left;
+ MT_Matrix3x3 mat;
+
+ if (m_navmesh && m_normalUp)
+ {
+ dtStatNavMesh* navmesh = m_navmesh->GetNavMesh();
+ MT_Vector3 normal;
+ MT_Vector3 trpos = m_navmesh->TransformToLocalCoords(curobj->NodeGetWorldPosition());
+ if (getNavmeshNormal(navmesh, trpos, normal))
+ {
+
+ left = (dir.cross(up)).safe_normalized();
+ dir = (-left.cross(normal)).safe_normalized();
+ up = normal;
+ }
+ }
+
+ switch (m_facingMode)
+ {
+ case 1: // TRACK X
+ {
+ left = dir.safe_normalized();
+ dir = -(left.cross(up)).safe_normalized();
+ break;
+ };
+ case 2: // TRACK Y
+ {
+ left = (dir.cross(up)).safe_normalized();
+ break;
+ }
+
+ case 3: // track Z
+ {
+ left = up.safe_normalized();
+ up = dir.safe_normalized();
+ dir = left;
+ left = (dir.cross(up)).safe_normalized();
+ break;
+ }
+
+ case 4: // TRACK -X
+ {
+ left = -dir.safe_normalized();
+ dir = -(left.cross(up)).safe_normalized();
+ break;
+ };
+ case 5: // TRACK -Y
+ {
+ left = (-dir.cross(up)).safe_normalized();
+ dir = -dir;
+ break;
+ }
+ case 6: // track -Z
+ {
+ left = up.safe_normalized();
+ up = -dir.safe_normalized();
+ dir = left;
+ left = (dir.cross(up)).safe_normalized();
+ break;
+ }
+ }
+
+ mat.setValue (
+ left[0], dir[0],up[0],
+ left[1], dir[1],up[1],
+ left[2], dir[2],up[2]
+ );
+
+
+
+ KX_GameObject* parentObject = curobj->GetParent();
+ if(parentObject)
+ {
+ MT_Point3 localpos;
+ localpos = curobj->GetSGNode()->GetLocalPosition();
+ MT_Matrix3x3 parentmatinv;
+ parentmatinv = parentObject->NodeGetWorldOrientation ().inverse ();
+ mat = parentmatinv * mat;
+ mat = m_parentlocalmat * mat;
+ curobj->NodeSetLocalOrientation(mat);
+ curobj->NodeSetLocalPosition(localpos);
+ }
+ else
+ {
+ curobj->NodeSetLocalOrientation(mat);
+ }
+
+}
+
+#ifndef DISABLE_PYTHON
+
+/* ------------------------------------------------------------------------- */
+/* Python functions */
+/* ------------------------------------------------------------------------- */
+
+/* Integration hooks ------------------------------------------------------- */
+PyTypeObject KX_SteeringActuator::Type = {
+ PyVarObject_HEAD_INIT(NULL, 0)
+ "KX_SteeringActuator",
+ sizeof(PyObjectPlus_Proxy),
+ 0,
+ py_base_dealloc,
+ 0,
+ 0,
+ 0,
+ 0,
+ py_base_repr,
+ 0,0,0,0,0,0,0,0,0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
+ 0,0,0,0,0,0,0,
+ Methods,
+ 0,
+ 0,
+ &SCA_IActuator::Type,
+ 0,0,0,0,0,0,
+ py_base_new
+};
+
+PyMethodDef KX_SteeringActuator::Methods[] = {
+ {NULL,NULL} //Sentinel
+};
+
+PyAttributeDef KX_SteeringActuator::Attributes[] = {
+ KX_PYATTRIBUTE_INT_RW("behaviour", KX_STEERING_NODEF+1, KX_STEERING_MAX-1, true, KX_SteeringActuator, m_mode),
+ KX_PYATTRIBUTE_RW_FUNCTION("target", KX_SteeringActuator, pyattr_get_target, pyattr_set_target),
+ KX_PYATTRIBUTE_RW_FUNCTION("navmesh", KX_SteeringActuator, pyattr_get_navmesh, pyattr_set_navmesh),
+ KX_PYATTRIBUTE_FLOAT_RW("distance", 0.0f, 1000.0f, KX_SteeringActuator, m_distance),
+ KX_PYATTRIBUTE_FLOAT_RW("velocity", 0.0f, 1000.0f, KX_SteeringActuator, m_velocity),
+ KX_PYATTRIBUTE_FLOAT_RW("acceleration", 0.0f, 1000.0f, KX_SteeringActuator, m_acceleration),
+ KX_PYATTRIBUTE_FLOAT_RW("turnspeed", 0.0f, 720.0f, KX_SteeringActuator, m_turnspeed),
+ KX_PYATTRIBUTE_BOOL_RW("selfterminated", KX_SteeringActuator, m_isSelfTerminated),
+ KX_PYATTRIBUTE_BOOL_RW("enableVisualization", KX_SteeringActuator, m_enableVisualization),
+ KX_PYATTRIBUTE_RO_FUNCTION("steeringVec", KX_SteeringActuator, pyattr_get_steeringVec),
+ KX_PYATTRIBUTE_SHORT_RW("facingMode", 0, 6, true, KX_SteeringActuator, m_facingMode),
+ KX_PYATTRIBUTE_INT_RW("pathUpdatePeriod", -1, 100000, true, KX_SteeringActuator, m_pathUpdatePeriod),
+ { NULL } //Sentinel
+};
+
+PyObject* KX_SteeringActuator::pyattr_get_target(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
+{
+ KX_SteeringActuator* actuator = static_cast<KX_SteeringActuator*>(self);
+ if (!actuator->m_target)
+ Py_RETURN_NONE;
+ else
+ return actuator->m_target->GetProxy();
+}
+
+int KX_SteeringActuator::pyattr_set_target(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
+{
+ KX_SteeringActuator* actuator = static_cast<KX_SteeringActuator*>(self);
+ KX_GameObject *gameobj;
+
+ if (!ConvertPythonToGameObject(value, &gameobj, true, "actuator.object = value: KX_SteeringActuator"))
+ return PY_SET_ATTR_FAIL; // ConvertPythonToGameObject sets the error
+
+ if (actuator->m_target != NULL)
+ actuator->m_target->UnregisterActuator(actuator);
+
+ actuator->m_target = (KX_GameObject*) gameobj;
+
+ if (actuator->m_target)
+ actuator->m_target->RegisterActuator(actuator);
+
+ return PY_SET_ATTR_SUCCESS;
+}
+
+PyObject* KX_SteeringActuator::pyattr_get_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
+{
+ KX_SteeringActuator* actuator = static_cast<KX_SteeringActuator*>(self);
+ if (!actuator->m_navmesh)
+ Py_RETURN_NONE;
+ else
+ return actuator->m_navmesh->GetProxy();
+}
+
+int KX_SteeringActuator::pyattr_set_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value)
+{
+ KX_SteeringActuator* actuator = static_cast<KX_SteeringActuator*>(self);
+ KX_GameObject *gameobj;
+
+ if (!ConvertPythonToGameObject(value, &gameobj, true, "actuator.object = value: KX_SteeringActuator"))
+ return PY_SET_ATTR_FAIL; // ConvertPythonToGameObject sets the error
+
+ if (!PyObject_TypeCheck(value, &KX_NavMeshObject::Type))
+ {
+ PyErr_Format(PyExc_TypeError, "KX_NavMeshObject is expected");
+ return PY_SET_ATTR_FAIL;
+ }
+
+ if (actuator->m_navmesh != NULL)
+ actuator->m_navmesh->UnregisterActuator(actuator);
+
+ actuator->m_navmesh = static_cast<KX_NavMeshObject*>(gameobj);
+
+ if (actuator->m_navmesh)
+ actuator->m_navmesh->RegisterActuator(actuator);
+
+ return PY_SET_ATTR_SUCCESS;
+}
+
+PyObject* KX_SteeringActuator::pyattr_get_steeringVec(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef)
+{
+ KX_SteeringActuator* actuator = static_cast<KX_SteeringActuator*>(self);
+ const MT_Vector3& steeringVec = actuator->GetSteeringVec();
+ return PyObjectFrom(steeringVec);
+}
+
+#endif // DISABLE_PYTHON
+
+/* eof */
+
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.h b/source/gameengine/Ketsji/KX_SteeringActuator.h
new file mode 100644
index 00000000000..4f8303107f7
--- /dev/null
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.h
@@ -0,0 +1,130 @@
+/**
+* Add steering behaviors
+*
+*
+* $Id$
+*
+* ***** 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. The Blender
+* Foundation also sells licenses for use in proprietary software under
+* the Blender License. See http://www.blender.org/BL/ for information
+* about this.
+*
+* 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 __KX_STEERINGACTUATOR
+#define __KX_STEERINGACTUATOR
+
+#include "SCA_IActuator.h"
+#include "SCA_LogicManager.h"
+#include "MT_Matrix3x3.h"
+
+class KX_GameObject;
+class KX_NavMeshObject;
+struct KX_Obstacle;
+class KX_ObstacleSimulation;
+const int MAX_PATH_LENGTH = 128;
+
+class KX_SteeringActuator : public SCA_IActuator
+{
+ Py_Header;
+
+ /** Target object */
+ KX_GameObject *m_target;
+ KX_NavMeshObject *m_navmesh;
+ int m_mode;
+ float m_distance;
+ float m_velocity;
+ float m_acceleration;
+ float m_turnspeed;
+ KX_ObstacleSimulation* m_simulation;
+
+ KX_Obstacle* m_obstacle;
+ double m_updateTime;
+ bool m_isActive;
+ bool m_isSelfTerminated;
+ bool m_enableVisualization;
+ short m_facingMode;
+ bool m_normalUp;
+ float m_path[MAX_PATH_LENGTH*3];
+ int m_pathLen;
+ int m_pathUpdatePeriod;
+ double m_pathUpdateTime;
+ int m_wayPointIdx;
+ MT_Matrix3x3 m_parentlocalmat;
+ MT_Vector3 m_steerVec;
+ void HandleActorFace(MT_Vector3& velocity);
+public:
+ enum KX_STEERINGACT_MODE
+ {
+ KX_STEERING_NODEF = 0,
+ KX_STEERING_SEEK,
+ KX_STEERING_FLEE,
+ KX_STEERING_PATHFOLLOWING,
+ KX_STEERING_MAX
+ };
+
+ KX_SteeringActuator(class SCA_IObject* gameobj,
+ int mode,
+ KX_GameObject *target,
+ KX_GameObject *navmesh,
+ float distance,
+ float velocity,
+ float acceleration,
+ float turnspeed,
+ bool isSelfTerminated,
+ int pathUpdatePeriod,
+ KX_ObstacleSimulation* simulation,
+ short facingmode,
+ bool normalup,
+ bool enableVisualization);
+ virtual ~KX_SteeringActuator();
+ virtual bool Update(double curtime, bool frame);
+
+ virtual CValue* GetReplica();
+ virtual void ProcessReplica();
+ virtual void Relink(CTR_Map<CTR_HashedPtr, void*> *obj_map);
+ virtual bool UnlinkObject(SCA_IObject* clientobj);
+ const MT_Vector3& GetSteeringVec();
+
+#ifndef DISABLE_PYTHON
+
+ /* --------------------------------------------------------------------- */
+ /* Python interface ---------------------------------------------------- */
+ /* --------------------------------------------------------------------- */
+
+ /* These are used to get and set m_target */
+ static PyObject* pyattr_get_target(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+ static int pyattr_set_target(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+ static PyObject* pyattr_get_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+ static int pyattr_set_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+ static PyObject* pyattr_get_steeringVec(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
+
+
+#endif // DISABLE_PYTHON
+
+}; /* end of class KX_SteeringActuator : public SCA_PropertyActuator */
+
+#endif
+
diff --git a/source/gameengine/Ketsji/SConscript b/source/gameengine/Ketsji/SConscript
index c5509dd7de8..9b453ed76d5 100644
--- a/source/gameengine/Ketsji/SConscript
+++ b/source/gameengine/Ketsji/SConscript
@@ -20,6 +20,7 @@ incs += ' #source/gameengine/GameLogic #source/gameengine/Expressions #source/ga
incs += ' #source/gameengine/SceneGraph #source/gameengine/Physics/common'
incs += ' #source/gameengine/Physics/Dummy'
incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include #source/blender/gpu'
+incs += ' #extern/recastnavigation/Recast/Include #extern/recastnavigation/Detour/Include'
incs += ' ' + env['BF_BULLET_INC']
incs += ' ' + env['BF_OPENGL_INC']
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
index 5a1b52489b4..9948f48d7f3 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
@@ -36,6 +36,7 @@
#include "DNA_image_types.h"
#include "DNA_meshdata_types.h"
+#include "DNA_material_types.h"
void RAS_IPolyMaterial::Initialize(
const STR_String& texname,
@@ -44,10 +45,12 @@ void RAS_IPolyMaterial::Initialize(
int tile,
int tilexrep,
int tileyrep,
- int mode,
- int transp,
+ int alphablend,
bool alpha,
- bool zsort)
+ bool zsort,
+ bool light,
+ bool image,
+ struct GameSettings* game)
{
m_texturename = texname;
m_materialname = matname;
@@ -55,10 +58,10 @@ void RAS_IPolyMaterial::Initialize(
m_tile = tile;
m_tilexrep = tilexrep;
m_tileyrep = tileyrep;
- m_drawingmode = mode;
- m_transp = transp;
+ m_alphablend = alphablend;
m_alpha = alpha;
m_zsort = zsort;
+ m_light = light;
m_polymatid = m_newpolymatid++;
m_flag = 0;
m_multimode = 0;
@@ -66,6 +69,7 @@ void RAS_IPolyMaterial::Initialize(
m_specular.setValue(0.5,0.5,0.5);
m_specularity = 1.0;
m_diffuse.setValue(0.5,0.5,0.5);
+ m_drawingmode = ConvertFaceMode(game, image);
}
RAS_IPolyMaterial::RAS_IPolyMaterial()
@@ -75,9 +79,10 @@ RAS_IPolyMaterial::RAS_IPolyMaterial()
m_tilexrep(0),
m_tileyrep(0),
m_drawingmode (0),
- m_transp(0),
+ m_alphablend(0),
m_alpha(false),
m_zsort(false),
+ m_light(false),
m_materialindex(0),
m_polymatid(0),
m_flag(0),
@@ -95,8 +100,7 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname,
int tile,
int tilexrep,
int tileyrep,
- int mode,
- int transp,
+ int alphablend,
bool alpha,
bool zsort)
: m_texturename(texname),
@@ -104,8 +108,7 @@ RAS_IPolyMaterial::RAS_IPolyMaterial(const STR_String& texname,
m_tile(tile),
m_tilexrep(tilexrep),
m_tileyrep(tileyrep),
- m_drawingmode (mode),
- m_transp(transp),
+ m_alphablend(alphablend),
m_alpha(alpha),
m_zsort(zsort),
m_materialindex(materialindex),
@@ -128,9 +131,9 @@ bool RAS_IPolyMaterial::Equals(const RAS_IPolyMaterial& lhs) const
this->m_multimode == lhs.m_multimode &&
this->m_flag == lhs.m_flag &&
this->m_drawingmode == lhs.m_drawingmode &&
- this->m_transp == lhs.m_transp &&
- this->m_texturename.hash() == lhs.m_texturename.hash() &&
- this->m_materialname.hash() == lhs.m_materialname.hash()
+ this->m_alphablend == lhs.m_alphablend &&
+ this->m_texturename.hash() == lhs.m_texturename.hash() &&
+ this->m_materialname.hash() == lhs.m_materialname.hash()
);
return test;
@@ -141,9 +144,10 @@ bool RAS_IPolyMaterial::Equals(const RAS_IPolyMaterial& lhs) const
this->m_tile == lhs.m_tile &&
this->m_tilexrep == lhs.m_tilexrep &&
this->m_tileyrep == lhs.m_tileyrep &&
- this->m_transp == lhs.m_transp &&
+ this->m_alphablend == lhs.m_alphablend &&
this->m_alpha == lhs.m_alpha &&
this->m_zsort == lhs.m_zsort &&
+ this->m_light == lhs.m_light &&
this->m_drawingmode == lhs.m_drawingmode &&
this->m_texturename.hash() == lhs.m_texturename.hash() &&
this->m_materialname.hash() == lhs.m_materialname.hash()
@@ -151,6 +155,21 @@ bool RAS_IPolyMaterial::Equals(const RAS_IPolyMaterial& lhs) const
}
}
+int RAS_IPolyMaterial::ConvertFaceMode(struct GameSettings *game, bool image) const
+{
+ if (!game) return (image?GEMAT_TEX:0);
+
+ int modefinal = 0;
+
+ int orimode = game->face_orientation;
+ int alpha_blend = game->alpha_blend;
+ int flags = game->flag & (GEMAT_TEXT | GEMAT_BACKCULL);
+
+ modefinal = orimode | alpha_blend | flags;
+ modefinal |= (image ? GEMAT_TEX : 0);
+
+ return modefinal;
+}
void RAS_IPolyMaterial::GetMaterialRGBAColor(unsigned char *rgba) const
{
@@ -241,7 +260,7 @@ bool RAS_IPolyMaterial::UsesLighting(RAS_IRasterizer *rasty) const
else if(rasty->GetDrawingMode() < RAS_IRasterizer::KX_SOLID);
else if(rasty->GetDrawingMode() == RAS_IRasterizer::KX_SHADOW);
else
- dolights = (m_drawingmode & RAS_IRasterizer::KX_LIGHT)!=0;
+ dolights = m_light;
return dolights;
}
diff --git a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
index 2a5c6a179b6..69d07713c49 100644
--- a/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
+++ b/source/gameengine/Rasterizer/RAS_IPolygonMaterial.h
@@ -49,6 +49,7 @@ struct Material;
struct Image;
struct Scene;
class SCA_IScene;
+struct GameSettings;
enum MaterialProps
{
@@ -78,10 +79,11 @@ protected:
STR_HashedString m_materialname; //also needed for touchsensor
int m_tile;
int m_tilexrep,m_tileyrep;
- int m_drawingmode; // tface->mode
- int m_transp;
+ int m_drawingmode;
+ int m_alphablend;
bool m_alpha;
bool m_zsort;
+ bool m_light;
int m_materialindex;
unsigned int m_polymatid;
@@ -102,9 +104,9 @@ public:
// care! these are taken from blender polygonflags, see file DNA_mesh_types.h for #define TF_BILLBOARD etc.
enum MaterialFlags
{
- BILLBOARD_SCREENALIGNED = 256,
- BILLBOARD_AXISALIGNED = 4096,
- SHADOW =8192
+ BILLBOARD_SCREENALIGNED = 512, /* GEMAT_HALO */
+ BILLBOARD_AXISALIGNED = 1024, /* GEMAT_BILLBOARD */
+ SHADOW =2048 /* GEMAT_SHADOW */
};
RAS_IPolyMaterial();
@@ -114,7 +116,6 @@ public:
int tile,
int tilexrep,
int tileyrep,
- int mode,
int transp,
bool alpha,
bool zsort);
@@ -124,10 +125,13 @@ public:
int tile,
int tilexrep,
int tileyrep,
- int mode,
int transp,
bool alpha,
- bool zsort);
+ bool zsort,
+ bool light,
+ bool image,
+ struct GameSettings* game);
+
virtual ~RAS_IPolyMaterial() {};
/**
@@ -174,6 +178,11 @@ public:
virtual void Replace_IScene(SCA_IScene *val) {}; /* overridden by KX_BlenderMaterial */
+ /**
+ * @return the equivalent drawing mode for the material settings (equivalent to old TexFace tface->mode).
+ */
+ int ConvertFaceMode(struct GameSettings *game, bool image) const;
+
/*
* PreCalculate texture gen
*/
diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h
index c46ebf742a0..2988aa4effb 100644
--- a/source/gameengine/Rasterizer/RAS_IRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h
@@ -68,11 +68,7 @@ class RAS_IRasterizer
public:
RAS_IRasterizer(RAS_ICanvas* canv){};
virtual ~RAS_IRasterizer(){};
- /**
- */
- enum {
- RAS_RENDER_3DPOLYGON_TEXT = 16384 /* TF_BMFONT */
- };
+
/**
* Drawing types
*/
@@ -106,9 +102,9 @@ public:
/**
*/
enum {
- KX_TEX = 4, /* TF_TEX */
- KX_LIGHT = 16, /* TF_LIGHT */
- KX_TWOSIDE = 512, /* TF_TWOSIDE */
+ RAS_RENDER_3DPOLYGON_TEXT = 64, /* GEMAT_TEXT */
+ KX_BACKCULL = 16, /* GEMAT_BACKCULL */
+ KX_TEX = 4096, /* GEMAT_TEX */
KX_LINES = 32768
};
@@ -393,7 +389,9 @@ 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 FlushDebugLines()=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;
@@ -415,7 +413,7 @@ public:
virtual int GetMotionBlurState()=0;
virtual void SetMotionBlurState(int newstate)=0;
- virtual void SetBlendingMode(int blendmode)=0;
+ virtual void SetAlphaBlend(int alphablend)=0;
virtual void SetFrontFace(bool ccw)=0;
virtual void SetAnisotropicFiltering(short level)=0;
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 50d034a5a5a..d9039a2a68d 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -55,6 +55,10 @@
#include "BKE_DerivedMesh.h"
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
/**
* 32x32 bit masks for vinterlace stereo mode
*/
@@ -85,7 +89,7 @@ RAS_OpenGLRasterizer::RAS_OpenGLRasterizer(RAS_ICanvas* canvas)
m_motionblurvalue(-1.0),
m_texco_num(0),
m_attrib_num(0),
- //m_last_blendmode(GPU_BLEND_SOLID),
+ //m_last_alphablend(GPU_BLEND_SOLID),
m_last_frontface(true),
m_materialCachingInfo(0)
{
@@ -122,8 +126,8 @@ bool RAS_OpenGLRasterizer::Init()
glDisable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
- //m_last_blendmode = GPU_BLEND_SOLID;
- GPU_set_material_blend_mode(GPU_BLEND_SOLID);
+ //m_last_alphablend = GPU_BLEND_SOLID;
+ GPU_set_material_alpha_blend(GPU_BLEND_SOLID);
glFrontFace(GL_CCW);
m_last_frontface = true;
@@ -299,8 +303,8 @@ bool RAS_OpenGLRasterizer::BeginFrame(int drawingmode, double time)
glDisable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
- //m_last_blendmode = GPU_BLEND_SOLID;
- GPU_set_material_blend_mode(GPU_BLEND_SOLID);
+ //m_last_alphablend = GPU_BLEND_SOLID;
+ GPU_set_material_alpha_blend(GPU_BLEND_SOLID);
glFrontFace(GL_CCW);
m_last_frontface = true;
@@ -354,9 +358,9 @@ void RAS_OpenGLRasterizer::ClearCachingInfo(void)
m_materialCachingInfo = 0;
}
-void RAS_OpenGLRasterizer::FlushDebugLines()
+void RAS_OpenGLRasterizer::FlushDebugShapes()
{
- if(!m_debugLines.size())
+ if(!m_debugShapes.size())
return;
// DrawDebugLines
@@ -368,29 +372,67 @@ void RAS_OpenGLRasterizer::FlushDebugLines()
if(light) glDisable(GL_LIGHTING);
if(tex) glDisable(GL_TEXTURE_2D);
+ //draw lines
glBegin(GL_LINES);
- for (unsigned int i=0;i<m_debugLines.size();i++)
+ for (unsigned int i=0;i<m_debugShapes.size();i++)
{
- glColor4f(m_debugLines[i].m_color[0],m_debugLines[i].m_color[1],m_debugLines[i].m_color[2],1.f);
- const MT_Scalar* fromPtr = &m_debugLines[i].m_from.x();
- const MT_Scalar* toPtr= &m_debugLines[i].m_to.x();
-
+ if (m_debugShapes[i].m_type != OglDebugShape::LINE)
+ continue;
+ glColor4f(m_debugShapes[i].m_color[0],m_debugShapes[i].m_color[1],m_debugShapes[i].m_color[2],1.f);
+ const MT_Scalar* fromPtr = &m_debugShapes[i].m_pos.x();
+ const MT_Scalar* toPtr= &m_debugShapes[i].m_param.x();
glVertex3dv(fromPtr);
glVertex3dv(toPtr);
}
glEnd();
+ //draw circles
+ for (unsigned int i=0;i<m_debugShapes.size();i++)
+ {
+ if (m_debugShapes[i].m_type != OglDebugShape::CIRCLE)
+ continue;
+ glBegin(GL_LINE_LOOP);
+ glColor4f(m_debugShapes[i].m_color[0],m_debugShapes[i].m_color[1],m_debugShapes[i].m_color[2],1.f);
+
+ static const MT_Vector3 worldUp(0.,0.,1.);
+ MT_Vector3 norm = m_debugShapes[i].m_param;
+ MT_Matrix3x3 tr;
+ if (norm.fuzzyZero() || norm == worldUp)
+ {
+ tr.setIdentity();
+ }
+ else
+ {
+ MT_Vector3 xaxis, yaxis;
+ xaxis = MT_cross(norm, worldUp);
+ yaxis = MT_cross(xaxis, norm);
+ tr.setValue(xaxis.x(), xaxis.y(), xaxis.z(),
+ yaxis.x(), yaxis.y(), yaxis.z(),
+ norm.x(), norm.y(), norm.z());
+ }
+ MT_Scalar rad = m_debugShapes[i].m_param2.x();
+ int n = (int) m_debugShapes[i].m_param2.y();
+ for (int j = 0; j<n; j++)
+ {
+ MT_Scalar theta = j*M_PI*2/n;
+ MT_Vector3 pos(cos(theta)*rad, sin(theta)*rad, 0.);
+ pos = pos*tr;
+ pos += m_debugShapes[i].m_pos;
+ const MT_Scalar* posPtr = &pos.x();
+ glVertex3dv(posPtr);
+ }
+ glEnd();
+ }
+
if(light) glEnable(GL_LIGHTING);
if(tex) glEnable(GL_TEXTURE_2D);
- m_debugLines.clear();
+ m_debugShapes.clear();
}
void RAS_OpenGLRasterizer::EndFrame()
{
-
-
- FlushDebugLines();
+ FlushDebugShapes();
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
@@ -831,10 +873,10 @@ void RAS_OpenGLRasterizer::IndexPrimitivesInternal(RAS_MeshSlot& ms, bool multi)
// MCol *mcol = (MCol*)ms.m_pDerivedMesh->getFaceDataArray(ms.m_pDerivedMesh, CD_MCOL); /* UNUSED */
// handle two-side
- if (current_polymat->GetDrawingMode() & RAS_IRasterizer::KX_TWOSIDE)
- this->SetCullFace(false);
- else
+ if (current_polymat->GetDrawingMode() & RAS_IRasterizer::KX_BACKCULL)
this->SetCullFace(true);
+ else
+ this->SetCullFace(false);
if (current_polymat->GetFlag() & RAS_BLENDERGLSL) {
// GetMaterialIndex return the original mface material index,
@@ -848,9 +890,9 @@ void RAS_OpenGLRasterizer::IndexPrimitivesInternal(RAS_MeshSlot& ms, bool multi)
else
memset(&current_gpu_attribs, 0, sizeof(current_gpu_attribs));
// DM draw can mess up blending mode, restore at the end
- int current_blend_mode = GPU_get_material_blend_mode();
+ int current_blend_mode = GPU_get_material_alpha_blend();
ms.m_pDerivedMesh->drawFacesGLSL(ms.m_pDerivedMesh, CheckMaterialDM);
- GPU_set_material_blend_mode(current_blend_mode);
+ GPU_set_material_alpha_blend(current_blend_mode);
} else {
//ms.m_pDerivedMesh->drawMappedFacesTex(ms.m_pDerivedMesh, CheckTexfaceDM, mcol);
current_blmat_nr = current_polymat->GetMaterialIndex();
@@ -1162,36 +1204,36 @@ void RAS_OpenGLRasterizer::DisableMotionBlur()
m_motionblurvalue = -1.0;
}
-void RAS_OpenGLRasterizer::SetBlendingMode(int blendmode)
+void RAS_OpenGLRasterizer::SetAlphaBlend(int alphablend)
{
- GPU_set_material_blend_mode(blendmode);
+ GPU_set_material_alpha_blend(alphablend);
/*
- if(blendmode == m_last_blendmode)
+ if(alphablend == m_last_alphablend)
return;
- if(blendmode == GPU_BLEND_SOLID) {
+ if(alphablend == GPU_BLEND_SOLID) {
glDisable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
- else if(blendmode == GPU_BLEND_ADD) {
+ else if(alphablend == GPU_BLEND_ADD) {
glBlendFunc(GL_ONE, GL_ONE);
glEnable(GL_BLEND);
glDisable(GL_ALPHA_TEST);
}
- else if(blendmode == GPU_BLEND_ALPHA) {
+ else if(alphablend == GPU_BLEND_ALPHA) {
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.0f);
}
- else if(blendmode == GPU_BLEND_CLIP) {
+ else if(alphablend == GPU_BLEND_CLIP) {
glDisable(GL_BLEND);
glEnable(GL_ALPHA_TEST);
glAlphaFunc(GL_GREATER, 0.5f);
}
- m_last_blendmode = blendmode;
+ m_last_alphablend = alphablend;
*/
}
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
index 61568df91eb..cbfa49510a5 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
@@ -49,10 +49,15 @@ using namespace std;
#define RAS_MAX_TEXCO 8 // match in BL_Material
#define RAS_MAX_ATTRIB 16 // match in BL_BlenderShader
-struct OglDebugLine
+struct OglDebugShape
{
- MT_Vector3 m_from;
- MT_Vector3 m_to;
+ enum SHAPE_TYPE{
+ LINE, CIRCLE
+ };
+ SHAPE_TYPE m_type;
+ MT_Vector3 m_pos;
+ MT_Vector3 m_param;
+ MT_Vector3 m_param2;
MT_Vector3 m_color;
};
@@ -106,7 +111,7 @@ protected:
TexCoGen m_attrib[RAS_MAX_ATTRIB];
int m_texco_num;
int m_attrib_num;
- //int m_last_blendmode;
+ //int m_last_alphablend;
bool m_last_frontface;
/** Stores the caching information for the last material activated. */
@@ -256,18 +261,32 @@ public:
virtual void SetPolygonOffset(float mult, float add);
- virtual void FlushDebugLines();
+ virtual void FlushDebugShapes();
- virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)
+ virtual void DrawDebugLine(const MT_Vector3& from,const MT_Vector3& to,const MT_Vector3& color)
{
- OglDebugLine line;
- line.m_from = from;
- line.m_to = to;
+ OglDebugShape line;
+ line.m_type = OglDebugShape::LINE;
+ line.m_pos= from;
+ line.m_param = to;
line.m_color = color;
- m_debugLines.push_back(line);
+ m_debugShapes.push_back(line);
+ }
+
+ virtual void DrawDebugCircle(const MT_Vector3& center, const MT_Scalar radius, const MT_Vector3& color,
+ const MT_Vector3& normal, int nsector)
+ {
+ OglDebugShape line;
+ line.m_type = OglDebugShape::CIRCLE;
+ line.m_pos= center;
+ line.m_param = normal;
+ line.m_color = color;
+ line.m_param2.x() = radius;
+ line.m_param2.y() = (float) nsector;
+ m_debugShapes.push_back(line);
}
- std::vector <OglDebugLine> m_debugLines;
+ std::vector <OglDebugShape> m_debugShapes;
virtual void SetTexCoordNum(int num);
virtual void SetAttribNum(int num);
@@ -293,7 +312,7 @@ public:
m_motionblur = newstate;
};
- virtual void SetBlendingMode(int blendmode);
+ virtual void SetAlphaBlend(int alphablend);
virtual void SetFrontFace(bool ccw);
virtual void SetAnisotropicFiltering(short level);
diff --git a/source/gameengine/VideoTexture/CMakeLists.txt b/source/gameengine/VideoTexture/CMakeLists.txt
index 04683a5f99b..448fb307d2d 100644
--- a/source/gameengine/VideoTexture/CMakeLists.txt
+++ b/source/gameengine/VideoTexture/CMakeLists.txt
@@ -95,7 +95,6 @@ if(WITH_CODEC_FFMPEG)
${PTHREADS_INCLUDE_DIRS}
)
add_definitions(-DWITH_FFMPEG)
- add_definitions(-D__STDC_CONSTANT_MACROS)
endif()
blender_add_lib(ge_videotex "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/gameengine/VideoTexture/blendVideoTex.cpp b/source/gameengine/VideoTexture/blendVideoTex.cpp
index 2cb3831de52..e7244265fc4 100644
--- a/source/gameengine/VideoTexture/blendVideoTex.cpp
+++ b/source/gameengine/VideoTexture/blendVideoTex.cpp
@@ -112,7 +112,7 @@ static PyMethodDef moduleMethods[] =
{NULL} /* Sentinel */
};
-#if WITH_FFMPEG
+#ifdef WITH_FFMPEG
extern PyTypeObject VideoFFmpegType;
extern PyTypeObject ImageFFmpegType;
#endif
@@ -134,7 +134,7 @@ extern PyTypeObject ImageViewportType;
static void registerAllTypes(void)
{
-#if WITH_FFMPEG
+#ifdef WITH_FFMPEG
pyImageTypes.add(&VideoFFmpegType, "VideoFFmpeg");
pyImageTypes.add(&ImageFFmpegType, "ImageFFmpeg");
#endif